Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Looks like sprockets v4.0.0 upgrade changed to use manifest file heav… #1406

Merged
merged 4 commits into from
Jan 9, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ and releases in Jupiter project adheres to [Semantic Versioning](http://semver.o

### Fixed
- failing tests [#1376](https://github.com/ualbertalib/jupiter/issues/1376)
- Fix Sprockets v4.0.0 upgrade problem with how Sass Variables were being defined

## [1.2.18] - 2019-10-22
- Removed Rack Attack
Expand Down
114 changes: 57 additions & 57 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -11,46 +11,46 @@ GEM
specs:
aasm (5.0.6)
concurrent-ruby (~> 1.0)
actioncable (5.2.3)
actionpack (= 5.2.3)
actioncable (5.2.4.1)
actionpack (= 5.2.4.1)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
actionmailer (5.2.3)
actionpack (= 5.2.3)
actionview (= 5.2.3)
activejob (= 5.2.3)
actionmailer (5.2.4.1)
actionpack (= 5.2.4.1)
actionview (= 5.2.4.1)
activejob (= 5.2.4.1)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 2.0)
actionpack (5.2.3)
actionview (= 5.2.3)
activesupport (= 5.2.3)
rack (~> 2.0)
actionpack (5.2.4.1)
actionview (= 5.2.4.1)
activesupport (= 5.2.4.1)
rack (~> 2.0, >= 2.0.8)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.2)
actionview (5.2.3)
activesupport (= 5.2.3)
actionview (5.2.4.1)
activesupport (= 5.2.4.1)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.3)
active_link_to (1.0.5)
actionpack
addressable
activejob (5.2.3)
activesupport (= 5.2.3)
activejob (5.2.4.1)
activesupport (= 5.2.4.1)
globalid (>= 0.3.6)
activemodel (5.2.3)
activesupport (= 5.2.3)
activerecord (5.2.3)
activemodel (= 5.2.3)
activesupport (= 5.2.3)
activemodel (5.2.4.1)
activesupport (= 5.2.4.1)
activerecord (5.2.4.1)
activemodel (= 5.2.4.1)
activesupport (= 5.2.4.1)
arel (>= 9.0)
activestorage (5.2.3)
actionpack (= 5.2.3)
activerecord (= 5.2.3)
activestorage (5.2.4.1)
actionpack (= 5.2.4.1)
activerecord (= 5.2.4.1)
marcel (~> 0.3.1)
activesupport (5.2.3)
activesupport (5.2.4.1)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 0.7, < 2)
minitest (~> 5.1)
Expand All @@ -59,13 +59,13 @@ GEM
public_suffix (>= 2.0.2, < 5.0)
arel (9.0.0)
ast (2.4.0)
autoprefixer-rails (9.4.7)
autoprefixer-rails (9.7.3)
execjs
better_errors (2.5.1)
coderay (>= 1.0.0)
erubi (>= 1.0.0)
rack (>= 0.9.0)
bindex (0.5.0)
bindex (0.8.1)
binding_of_caller (0.8.0)
debug_inspector (>= 0.0.1)
bootsnap (1.4.5)
Expand All @@ -75,9 +75,9 @@ GEM
popper_js (>= 1.14.3, < 2)
sassc-rails (>= 2.0.0)
brakeman (4.7.2)
builder (3.2.3)
builder (3.2.4)
bump (0.8.0)
byebug (11.0.0)
byebug (11.0.1)
canonical-rails (0.2.6)
rails (>= 4.1, < 6.1)
capybara (3.30.0)
Expand Down Expand Up @@ -122,22 +122,22 @@ GEM
dropzonejs-rails (0.8.4)
rails (> 3.1)
erubi (1.9.0)
et-orbi (1.1.8)
et-orbi (1.2.2)
tzinfo
execjs (2.7.0)
ezid-client (1.8.0)
hashie (~> 3.4, >= 3.4.3)
nokogiri
faker (2.10.0)
i18n (>= 1.6, < 1.8)
faraday (0.12.2)
faraday (0.17.3)
multipart-post (>= 1.2, < 3)
faraday-http-cache (2.0.0)
faraday (~> 0.8)
ffi (1.11.3)
font-awesome-rails (4.7.0.5)
railties (>= 3.2, < 6.1)
fugit (1.2.0)
fugit (1.3.3)
et-orbi (~> 1.1, >= 1.1.8)
raabro (~> 1.1)
git (1.5.0)
Expand All @@ -150,17 +150,17 @@ GEM
hashie (3.6.0)
i18n (1.7.0)
concurrent-ruby (~> 1.0)
image_processing (1.10.0)
image_processing (1.10.1)
mini_magick (>= 4.9.5, < 5)
ruby-vips (>= 2.0.13, < 3)
ruby-vips (>= 2.0.17, < 3)
jaro_winkler (1.5.4)
jbuilder (2.9.1)
activesupport (>= 4.2.0)
jquery-rails (4.3.5)
rails-dom-testing (>= 1, < 3)
railties (>= 4.2.0)
thor (>= 0.14, < 2.0)
json (2.2.0)
json (2.3.0)
kaminari (1.1.1)
activesupport (>= 4.1.0)
kaminari-actionview (= 1.1.1)
Expand Down Expand Up @@ -191,22 +191,23 @@ GEM
mimemagic (~> 0.3.2)
method_source (0.9.2)
mimemagic (0.3.3)
mini_magick (4.9.5)
mini_magick (4.10.1)
mini_mime (1.0.2)
mini_portile2 (2.4.0)
minitest (5.13.0)
minitest-hooks (1.5.0)
minitest (> 5.3)
msgpack (1.3.1)
multipart-post (2.1.1)
mustermann (1.1.0)
mustermann (1.1.1)
ruby2_keywords (~> 0.0.1)
nap (1.1.0)
nio4r (2.5.2)
no_proxy_fix (0.1.2)
nokogiri (1.10.7)
mini_portile2 (~> 2.4.0)
octokit (4.14.0)
octokit (4.15.0)
faraday (>= 0.9)
sawyer (~> 0.8.0, >= 0.5.3)
omniauth (1.9.0)
hashie (>= 3.4.6, < 3.7.0)
Expand Down Expand Up @@ -244,27 +245,27 @@ GEM
rack
rack-test (1.1.0)
rack (>= 1.0, < 3)
rails (5.2.3)
actioncable (= 5.2.3)
actionmailer (= 5.2.3)
actionpack (= 5.2.3)
actionview (= 5.2.3)
activejob (= 5.2.3)
activemodel (= 5.2.3)
activerecord (= 5.2.3)
activestorage (= 5.2.3)
activesupport (= 5.2.3)
rails (5.2.4.1)
actioncable (= 5.2.4.1)
actionmailer (= 5.2.4.1)
actionpack (= 5.2.4.1)
actionview (= 5.2.4.1)
activejob (= 5.2.4.1)
activemodel (= 5.2.4.1)
activerecord (= 5.2.4.1)
activestorage (= 5.2.4.1)
activesupport (= 5.2.4.1)
bundler (>= 1.3.0)
railties (= 5.2.3)
railties (= 5.2.4.1)
sprockets-rails (>= 2.0.0)
rails-dom-testing (2.0.3)
activesupport (>= 4.2.0)
nokogiri (>= 1.6)
rails-html-sanitizer (1.3.0)
loofah (~> 2.3)
railties (5.2.3)
actionpack (= 5.2.3)
activesupport (= 5.2.3)
railties (5.2.4.1)
actionpack (= 5.2.4.1)
activesupport (= 5.2.4.1)
method_source
rake (>= 0.8.7)
thor (>= 0.19.0, < 2.0)
Expand All @@ -284,7 +285,7 @@ GEM
link_header (~> 0.0, >= 0.0.8)
rdf-vocab (3.1.0)
rdf (~> 3.1)
rdoc (6.1.1)
rdoc (6.2.1)
redis (4.1.3)
regexp_parser (1.6.0)
rollbar (2.23.1)
Expand All @@ -304,9 +305,9 @@ GEM
rack (>= 1.1)
rubocop (>= 0.72.0)
ruby-progressbar (1.10.1)
ruby-saml (1.9.0)
ruby-saml (1.11.0)
nokogiri (>= 1.5.10)
ruby-vips (2.0.16)
ruby-vips (2.0.17)
ffi (~> 1.9)
ruby2_keywords (0.0.1)
rubyzip (2.0.0)
Expand All @@ -318,9 +319,8 @@ GEM
sass-listen (4.0.0)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
sassc (2.0.1)
sassc (2.2.1)
ffi (~> 1.9)
rake
sassc-rails (2.1.2)
railties (>= 4.0.0)
sassc (>= 2.0)
Expand Down Expand Up @@ -369,7 +369,7 @@ GEM
skylight-core (= 4.2.0)
skylight-core (4.2.0)
activesupport (>= 4.2.0)
sprockets (3.7.2)
sprockets (4.0.0)
concurrent-ruby (~> 1.0)
rack (> 1, < 3)
sprockets-rails (3.2.1)
Expand All @@ -384,7 +384,7 @@ GEM
turbolinks (5.2.1)
turbolinks-source (~> 5.2)
turbolinks-source (5.2.0)
tzinfo (1.2.5)
tzinfo (1.2.6)
thread_safe (~> 0.1)
uglifier (4.2.0)
execjs (>= 0.3.0, < 3)
Expand Down
4 changes: 3 additions & 1 deletion app/assets/config/manifest.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//= link_tree ../images
//= link_directory ../javascripts .js
//= link_directory ../stylesheets .css
Copy link
Contributor Author

@murny murny Jan 7, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So this is the problem. It was loading it in a order we didn't want. We want to load just the application.css file and the order that is specified by that file.

rails/sprockets#597 (comment)


//= link application.css
//= link admin.js
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of Rails.application.config.assets.precompile += %w[admin.js] we put it here

Tested both quickly by running Rails s and looking at admin section. All seems good

5 changes: 1 addition & 4 deletions app/assets/stylesheets/items.scss
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
$cc-background: $gray-100;

.community-collection {
.card {
// TODO: have real designer pick this
background-color: $cc-background;
background-color: $gray-100;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clean this up a bit. Don't need the secondary variable and TODO isn't really relevant anymore 😅

}
}

Expand Down
2 changes: 1 addition & 1 deletion config/initializers/assets.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@
# Precompile additional assets.
# application.js, application.css, and all non-JS/CSS in the app/assets
# folder are already added.
Rails.application.config.assets.precompile += %w[admin.js]
# Rails.application.config.assets.precompile += %w[admin.js]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apparently you don't do this anymore in Sprockets v4.0.0, they want you to use manifest instead.