From a6db54caccb1c986002c141094349039fa78bba7 Mon Sep 17 00:00:00 2001 From: peggles2 Date: Thu, 14 Feb 2019 14:39:50 -0500 Subject: [PATCH] SRCH-372 - Update Rails to compile assets (#232) * SRCH-372 - Update Rails to compile assets * SRCH-355 - update compass-rails to 3.1.0 --- .gitignore | 1 + Gemfile | 2 +- Gemfile.lock | 27 +++++----- .../searches/custom_bootstrap/_sprites.less | 4 +- config/initializers/assets.rb | 1 + deploy/before_symlink.rb | 7 +-- .../affiliate_image_search_steps.rb | 4 +- spec/helpers/search_helper_spec.rb | 38 +++++++++++--- .../shared/_searchresults.html.haml_spec.rb | 50 ++++++++++++------- 9 files changed, 84 insertions(+), 50 deletions(-) diff --git a/.gitignore b/.gitignore index e084bb6717..168f9c5333 100644 --- a/.gitignore +++ b/.gitignore @@ -17,3 +17,4 @@ generate_top_queries_from_file_input_file.txt Procfile .byebug_history config/secrets.yml +public/assets/** diff --git a/Gemfile b/Gemfile index 564ad90ab9..a5bb74def6 100644 --- a/Gemfile +++ b/Gemfile @@ -100,7 +100,7 @@ gem 'cld3', '~> 3.2.3' gem 'coffee-rails', '~> 4.2.2' gem 'uglifier', '~> 4.1.2' gem 'less-rails-bootstrap', '~> 3.3.5' -gem 'compass-rails', '~> 2.0.5' +gem 'compass-rails', '~> 3.1.0' gem 'compass-blueprint', '~> 1.0.0' gem 'jquery-ui-rails', '~> 6.0.1' gem 'jquery-rails', git: 'https://github.com/GSA/jquery-rails', ref: 'c0c56208f57746a4bc63431d5e771cea4486efca' diff --git a/Gemfile.lock b/Gemfile.lock index dbfa11b3f4..0184dce692 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -174,7 +174,7 @@ GEM capybara-screenshot (1.0.22) capybara (>= 1.0, < 4) launchy - chunky_png (1.3.10) + chunky_png (1.3.11) cld3 (3.2.3) ffi (>= 1.1.0, < 1.10.0) climate_control (0.2.0) @@ -207,10 +207,10 @@ GEM sass (>= 3.3.0, < 3.5) compass-import-once (1.0.5) sass (>= 3.2, < 3.5) - compass-rails (2.0.5) + compass-rails (3.1.0) compass (~> 1.0.0) sass-rails (< 5.1) - sprockets (< 2.13) + sprockets (< 4.0) concurrent-ruby (1.1.4) cookiejar (0.3.3) counter_culture (2.0.0) @@ -347,7 +347,6 @@ GEM hashdiff (0.3.7) hashie (3.3.2) highline (1.7.10) - hike (1.2.3) html_truncator (0.4.2) nokogiri (~> 1.5) htmlentities (4.3.4) @@ -645,15 +644,13 @@ GEM tilt (>= 1.3, < 3) spring (2.0.2) activesupport (>= 4.2) - sprockets (2.12.5) - hike (~> 1.2) - multi_json (~> 1.0) - rack (~> 1.0) - tilt (~> 1.1, != 1.3.0) - sprockets-rails (2.3.3) - actionpack (>= 3.0) - activesupport (>= 3.0) - sprockets (>= 2.8, < 4.0) + sprockets (3.7.2) + concurrent-ruby (~> 1.0) + rack (> 1, < 3) + sprockets-rails (3.2.1) + actionpack (>= 4.0) + activesupport (>= 4.0) + sprockets (>= 3.0.0) temple (0.8.0) terminal-table (1.8.0) unicode-display_width (~> 1.1, >= 1.1.1) @@ -671,7 +668,7 @@ GEM thor (0.20.3) thread (0.2.2) thread_safe (0.3.6) - tilt (1.4.1) + tilt (2.0.9) timecop (0.9.1) truncator (0.1.7) activesupport @@ -764,7 +761,7 @@ DEPENDENCIES coffee-rails (~> 4.2.2) colorize (~> 0.8.1) compass-blueprint (~> 1.0.0) - compass-rails (~> 2.0.5) + compass-rails (~> 3.1.0) counter_culture (~> 2.0.0) cucumber-rails (~> 1.6.0) curb (~> 0.9.4) diff --git a/app/assets/stylesheets/searches/custom_bootstrap/_sprites.less b/app/assets/stylesheets/searches/custom_bootstrap/_sprites.less index cb620cebf1..125294f3ad 100755 --- a/app/assets/stylesheets/searches/custom_bootstrap/_sprites.less +++ b/app/assets/stylesheets/searches/custom_bootstrap/_sprites.less @@ -16,8 +16,8 @@ // Sprite icons path // ------------------------- -@iconSpritePath: "bootstrap/glyphicons-halflings.png"; -@iconWhiteSpritePath: "bootstrap/glyphicons-halflings-white.png"; +@iconSpritePath: asset-url('bootstrap/glyphicons-halflings.png'); +@iconWhiteSpritePath: asset-url('bootstrap/glyphicons-halflings-white.png'); .icon { display: inline-block; diff --git a/config/initializers/assets.rb b/config/initializers/assets.rb index 06a3e02ef3..bbb3f9886d 100644 --- a/config/initializers/assets.rb +++ b/config/initializers/assets.rb @@ -17,5 +17,6 @@ # Rails.application.config.assets.precompile += %w( search.js ) Rails.application.config.assets.precompile += %w(font-awesome-grunticon-rails.js) Rails.application.config.assets.precompile += %w(*.png *.gif) +Rails.application.config.assets.precompile += %w( application.css ) Rails.application.config.assets.precompile += Dir.entries("#{Rails.root}/app/assets/javascripts/").select { |e| e =~ /^(?!application\.js).+\.js$/ } Rails.application.config.assets.precompile += Dir.entries("#{Rails.root}/app/assets/stylesheets/").select { |e| e =~ /^(?!application\.css).+\.css$/ } diff --git a/deploy/before_symlink.rb b/deploy/before_symlink.rb index 12dd372097..5c6fc0f243 100644 --- a/deploy/before_symlink.rb +++ b/deploy/before_symlink.rb @@ -19,10 +19,5 @@ # updated whenever our asset fingerprints change. run <