diff --git a/.travis.yml b/.travis.yml index 38000543..d787b8bd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,34 +1,46 @@ sudo: required dist: trusty -script: - - bundle exec rake test_app - - bundle exec rake spec - -addons: - chrome: stable +language: ruby env: - - DB=mysql - DB=postgres + - DB=mysql -language: ruby - -rvm: - - 2.3.3 - - 2.4.2 - - 2.5.2 - -matrix: - allow_failures: - - gemfile: gemfiles/spree_master.gemfile +addons: + chrome: stable + postgresql: 9.4 gemfile: - - gemfiles/spree_3_2.gemfile - gemfiles/spree_3_5.gemfile - gemfiles/spree_3_7.gemfile + - gemfiles/spree_4_0.gemfile - gemfiles/spree_master.gemfile +script: + - bundle exec rake test_app + - bundle exec rake spec + +rvm: + - 2.5.1 + - 2.4.4 + - 2.3.8 + +matrix: + allow_failures: + - gemfile: gemfiles/spree_master.gemfile + exclude: + - rvm: 2.3.8 + gemfile: gemfiles/spree_4_0.gemfile + - rvm: 2.4.4 + gemfile: gemfiles/spree_4_0.gemfile + - rvm: 2.3.8 + gemfile: gemfiles/spree_master.gemfile + - rvm: 2.4.4 + gemfile: gemfiles/spree_master.gemfile + - rvm: 2.5.1 + gemfile: gemfiles/spree_3_5.gemfile + before_install: - mysql -u root -e "GRANT ALL ON *.* TO 'travis'@'%';" - wget -N https://chromedriver.storage.googleapis.com/2.35/chromedriver_linux64.zip -P ~/ @@ -36,4 +48,4 @@ before_install: - rm ~/chromedriver_linux64.zip - sudo mv -f ~/chromedriver /usr/local/share/ - sudo chmod +x /usr/local/share/chromedriver - - sudo ln -s /usr/local/share/chromedriver /usr/local/bin/chromedriver + - sudo ln -s /usr/local/share/chromedriver /usr/local/bin/chromedriver \ No newline at end of file diff --git a/Appraisals b/Appraisals index 04489688..9077bc0a 100644 --- a/Appraisals +++ b/Appraisals @@ -11,6 +11,12 @@ end appraise 'spree-3-7' do gem 'spree', '~> 3.7.0' gem 'rails-controller-testing' + gem 'sass-rails' +end + +appraise 'spree-4-0' do + gem 'spree', '~> 4.0.0.beta' + gem 'rails-controller-testing' end appraise 'spree-master' do diff --git a/gemfiles/spree_3_7.gemfile b/gemfiles/spree_3_7.gemfile index 9e347b33..1433e138 100644 --- a/gemfiles/spree_3_7.gemfile +++ b/gemfiles/spree_3_7.gemfile @@ -4,5 +4,6 @@ source "https://rubygems.org/" gem "rails-controller-testing" gem "spree", "~> 3.7.0" +gem "sass-rails" gemspec path: "../" diff --git a/gemfiles/spree_3_2.gemfile b/gemfiles/spree_4_0.gemfile similarity index 81% rename from gemfiles/spree_3_2.gemfile rename to gemfiles/spree_4_0.gemfile index d9bf3b7a..5bd42a1f 100644 --- a/gemfiles/spree_3_2.gemfile +++ b/gemfiles/spree_4_0.gemfile @@ -3,6 +3,6 @@ source "https://rubygems.org/" gem "rails-controller-testing" -gem "spree", "~> 3.2.0" +gem "spree", "~> 4.0.0.beta" gemspec path: "../" diff --git a/spec/controllers/static_content_controller_spec.rb b/spec/controllers/static_content_controller_spec.rb index 1eb1a720..98e5324c 100644 --- a/spec/controllers/static_content_controller_spec.rb +++ b/spec/controllers/static_content_controller_spec.rb @@ -11,21 +11,21 @@ page = create(:page, slug: '/', stores: [store]) request.path = page.slug get :show, params: { path: page.slug } - expect(response).to be_success + expect(response.status).to eq(200) end it 'accepts path as string' do page = create(:page, slug: 'hello', stores: [store]) request.path = page.slug get :show, params: { path: page.slug } - expect(response).to be_success + expect(response.status).to eq(200) end it 'accepts path as nested' do page = create(:page, slug: 'aa/bb/cc', stores: [store]) request.path = page.slug get :show, params: { path: page.slug } - expect(response).to be_success + expect(response.status).to eq(200) end it 'respond with a 404 when no page exists' do diff --git a/spree_static_content.gemspec b/spree_static_content.gemspec index 3c0f7298..c7d9e1f6 100644 --- a/spree_static_content.gemspec +++ b/spree_static_content.gemspec @@ -24,12 +24,13 @@ Gem::Specification.new do |s| s.add_dependency 'spree_core', '>= 3.1.0', '< 5.0' s.add_dependency 'spree_extension' + s.add_dependency 'deface', '~> 1.5' s.add_development_dependency 'capybara' s.add_development_dependency 'factory_bot', '~> 4.7' s.add_development_dependency 'ffaker' s.add_development_dependency 'database_cleaner' - s.add_development_dependency 'rspec-rails' + s.add_development_dependency 'rspec-rails', '~> 4.0.0.beta2' s.add_development_dependency 'selenium-webdriver' s.add_development_dependency 'simplecov' s.add_development_dependency 'coffee-rails' @@ -39,7 +40,7 @@ Gem::Specification.new do |s| s.add_development_dependency 'rubocop' s.add_development_dependency 'pg', '~> 0.18' s.add_development_dependency 'mysql2' - s.add_development_dependency 'sqlite3', '~> 1.3.6' + s.add_development_dependency 'sqlite3' s.add_development_dependency 'appraisal' s.add_development_dependency 'puma' end