Skip to content
This repository has been archived by the owner on Aug 10, 2021. It is now read-only.

Commit

Permalink
Merge pull request #265 from spark-solutions/feature/spree-4-0
Browse files Browse the repository at this point in the history
Spree 4 and Rails 6 support
  • Loading branch information
damianlegawiec authored Sep 9, 2019
2 parents 017b411 + 64be6f7 commit 08f2b39
Show file tree
Hide file tree
Showing 6 changed files with 45 additions and 25 deletions.
50 changes: 31 additions & 19 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,39 +1,51 @@
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 ~/
- unzip ~/chromedriver_linux64.zip -d ~/
- 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
6 changes: 6 additions & 0 deletions Appraisals
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions gemfiles/spree_3_7.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@ source "https://rubygems.org/"

gem "rails-controller-testing"
gem "spree", "~> 3.7.0"
gem "sass-rails"

gemspec path: "../"
2 changes: 1 addition & 1 deletion gemfiles/spree_3_2.gemfile → gemfiles/spree_4_0.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -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: "../"
6 changes: 3 additions & 3 deletions spec/controllers/static_content_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 3 additions & 2 deletions spree_static_content.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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

0 comments on commit 08f2b39

Please sign in to comment.