Skip to content

Commit

Permalink
Merge pull request #6 from deseretbook/v2.1
Browse files Browse the repository at this point in the history
V2.1
  • Loading branch information
skukx authored May 9, 2017
2 parents 6d4b7b3 + 3c37109 commit 76e107e
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 8 deletions.
14 changes: 12 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,22 @@

source 'https://rubygems.org'

branch = ENV.fetch('SOLIDUS_BRANCH', 'master')

gem 'solidus', github: 'solidusio/solidus', branch: branch
gem 'solidus_auth_devise', '~> 1.0'

if branch == "master" || branch >= "v2.0"
gem "rails-controller-testing", group: :test
else
gem "rails", "~> 4.2"
gem "rails_test_params_backport", group: :test
end

gem 'deface'
gem 'solidus', '~> 2.0.0'

gemspec

group :development, :test do
gem 'rails-controller-testing'
gem 'rubocop'
end
4 changes: 2 additions & 2 deletions app/models/spree/variant_decorator.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Spree::Variant.class_eval do
# Sorts by option value position and other criteria after variant position.
scope :order_by_option_value, ->{
scope :order_by_option_value, (->{
left_outer_joins(:option_values)
.unscope(:order).order(
position: :asc
Expand All @@ -10,7 +10,7 @@
is_master: :desc,
id: :asc
)
}
})

# Returns this variant's option value for its product's first option type.
def first_option_value
Expand Down
12 changes: 10 additions & 2 deletions circle.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
machine:
environment:
SOLIDUS_BRANCH: v2.1
ruby:
version: 2.3.1

test:
dependencies:
pre:
- gem install bundler

database:
override:
- bundle exec rake test_app

test:
override:
- bundle exec rubocop -R
- bundle exec rspec
- bundle exec rake
1 change: 1 addition & 0 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@

RSpec.configure do |config|
config.include FactoryGirl::Syntax::Methods
config.include Devise::Test::ControllerHelpers, type: :controller

# Infer an example group's spec type from the file location.
# config.infer_spec_type_from_file_location!
Expand Down
5 changes: 3 additions & 2 deletions spree_variant_picker.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Gem::Specification.new do |s|
s.platform = Gem::Platform::RUBY
s.name = 'solidus_variant_picker'
s.version = '2.0.0'
s.version = '2.1'
s.summary = 'Enhanced variant listing on Spree product pages'
s.description = 'Enhanced variant listing on Spree product pages'
s.required_ruby_version = '>= 2.2.2'
Expand All @@ -17,7 +17,7 @@ Gem::Specification.new do |s|
s.require_path = 'lib'
s.requirements << 'none'

s.add_dependency 'solidus', ['>= 1.0.0', '< 3']
s.add_dependency 'solidus', ['>= 1.0', '< 3']
s.add_dependency 'deface'

s.add_development_dependency 'capybara'
Expand All @@ -30,5 +30,6 @@ Gem::Specification.new do |s|
s.add_development_dependency 'poltergeist'
s.add_development_dependency 'simplecov'
s.add_development_dependency 'sqlite3'
s.add_development_dependency 'rubocop'
s.add_development_dependency 'pry'
end

0 comments on commit 76e107e

Please sign in to comment.