From 7c9024101b9ae22c3e34cea8a7a00eccab5d758c Mon Sep 17 00:00:00 2001 From: Luis Ramos Date: Fri, 15 Jan 2021 23:26:19 +0000 Subject: [PATCH 1/3] Some css fixes to make it all work in rails 5 --- app/assets/stylesheets/darkswarm/sidebar.scss | 6 +++--- config/initializers/compass.rb | 2 ++ lib/spree/i18n.rb | 1 + 3 files changed, 6 insertions(+), 3 deletions(-) create mode 100644 config/initializers/compass.rb diff --git a/app/assets/stylesheets/darkswarm/sidebar.scss b/app/assets/stylesheets/darkswarm/sidebar.scss index 18718062da..2e6a7d0a2e 100644 --- a/app/assets/stylesheets/darkswarm/sidebar.scss +++ b/app/assets/stylesheets/darkswarm/sidebar.scss @@ -3,9 +3,9 @@ // See https://github.com/zurb/foundation/issues/3855#issuecomment-30372252 @import "variables"; -@import "components/global"; -@import "components/buttons"; -@import "components/panels"; +@import "foundation/components/global"; +@import "foundation/components/buttons"; +@import "foundation/components/panels"; #sidebar { margin-top: 1.875em; diff --git a/config/initializers/compass.rb b/config/initializers/compass.rb new file mode 100644 index 0000000000..ea537f0390 --- /dev/null +++ b/config/initializers/compass.rb @@ -0,0 +1,2 @@ +require 'compass' +Sass.load_paths << Compass::Frameworks['compass'].stylesheets_directory diff --git a/lib/spree/i18n.rb b/lib/spree/i18n.rb index 7780bc3ad7..39bd4590cd 100644 --- a/lib/spree/i18n.rb +++ b/lib/spree/i18n.rb @@ -6,6 +6,7 @@ require 'spree/i18n/base' module Spree extend ActionView::Helpers::TranslationHelper + extend ActionView::Helpers::TagHelper if ENV['DEPENDENCIES_NEXT'] class << self # Add spree namespace and delegate to Rails TranslationHelper for some nice From d8436c2dab824b0a9cfebe29c9552835db129411 Mon Sep 17 00:00:00 2001 From: Luis Ramos Date: Sat, 16 Jan 2021 22:02:59 +0000 Subject: [PATCH 2/3] Downgrade libv8 so that mini racer keeps working --- Gemfile | 1 + Gemfile_next.lock | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Gemfile b/Gemfile index 39c0140964..5518b8d7af 100644 --- a/Gemfile +++ b/Gemfile @@ -21,6 +21,7 @@ if ENV['DEPENDENCIES_NEXT'] gem 'responders' gem 'sass', '<= 4.7.1' gem 'sass-rails', '< 6.0.0' + gem 'libv8', '< 8' else gem 'rails', '~> 4.2' diff --git a/Gemfile_next.lock b/Gemfile_next.lock index 290d607b46..683842987f 100644 --- a/Gemfile_next.lock +++ b/Gemfile_next.lock @@ -268,7 +268,7 @@ GEM addressable (~> 2.3) letter_opener (1.7.0) launchy (~> 2.2) - libv8 (8.4.255.0) + libv8 (7.3.492.27.1) loofah (2.7.0) crass (~> 1.0.2) nokogiri (>= 1.5.9) @@ -605,6 +605,7 @@ DEPENDENCIES kaminari (~> 1.2.1) knapsack letter_opener (>= 1.4.1) + libv8 (< 8) mini_racer (= 0.2.15) monetize (~> 1.1) oauth2 (~> 1.4.4) From 80075541763fce80e048032dd6b671df258e6d43 Mon Sep 17 00:00:00 2001 From: Luis Ramos Date: Tue, 19 Jan 2021 00:32:42 +0000 Subject: [PATCH 3/3] Remove test_after_commit gem, it's baked into rails 5 now --- Gemfile | 5 ++++- Gemfile_next.lock | 3 --- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Gemfile b/Gemfile index 5518b8d7af..b3f3358721 100644 --- a/Gemfile +++ b/Gemfile @@ -35,6 +35,10 @@ else gem 'db2fog' gem 'unicorn' + + group :test do + gem 'test_after_commit' # needed to test Devise callbacks + end end gem 'i18n' @@ -160,7 +164,6 @@ end group :test do gem 'simplecov', require: false gem 'test-prof' - gem 'test_after_commit' # needed to test Devise callbacks gem 'webmock' # See spec/spec_helper.rb for instructions # gem 'perftools.rb' diff --git a/Gemfile_next.lock b/Gemfile_next.lock index 683842987f..724a917b6d 100644 --- a/Gemfile_next.lock +++ b/Gemfile_next.lock @@ -500,8 +500,6 @@ GEM test-prof (0.7.5) test-unit (3.3.7) power_assert - test_after_commit (1.1.0) - activerecord (>= 3.2) thor (0.20.3) thread_safe (0.3.6) tilt (2.0.10) @@ -647,7 +645,6 @@ DEPENDENCIES stripe test-prof test-unit (~> 3.3) - test_after_commit timecop uglifier (>= 1.0.3) unicorn-rails