spree_zero_stock_products 2.2.0 → 2.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f24c9eac70e202faf1f758f32d77df59a4615f7f
4
- data.tar.gz: 53ae8321af78437dd12233824c9e054fbcac523c
3
+ metadata.gz: 53ad9ff267b8651ab633c37d3d08a9279ea45d60
4
+ data.tar.gz: 4b7d86c9299352ed75450304eee6d98b229e1859
5
5
  SHA512:
6
- metadata.gz: 0d9c3daf77e99103a6efe0e624d88b5d6644927622b9762fe1924bd453e841d659d76184a8dae622b106dec4cbaa5d1f813ef59011a6d477a06d0ca672bbd412
7
- data.tar.gz: e3386758e325996db1e1a3dcef6c64a1d5c588213fa5637f3db94d98a731b2ebf4037956dc1c09bc4d2e62e74cda21c82de2fd105ffad55fea6b160a6e073f93
6
+ metadata.gz: 8153f791b3067a858db47f624ded05f76b97b1ad12da120c8122e5395cfb909b80aae93dc1fba00ac2bb754679bc8a1732e2a17e5c078b7db0514eee7ba4695d
7
+ data.tar.gz: a7939d96a6e54fc4a78f729cf7f3eb1daf473fe6c89372e6f335ce5195e8ffd52159637b00468f0508cb0e6f8f2d40344ad7716e92e588017b927ec4def31e76
data/.travis.yml CHANGED
@@ -5,18 +5,14 @@ script:
5
5
  rvm:
6
6
  - 1.9.3
7
7
  - 2.0.0
8
- - 2.1.0
9
- - jruby-19mode
10
- - jruby-20mode
11
- - rbx
8
+ - 2.1
12
9
  env:
13
10
  - DB=sqlite
14
11
  - DB=mysql
15
12
  - DB=postgres
16
13
  language: ruby
17
14
  matrix:
18
- allow_failures:
19
- - rvm: rbx
15
+ fast_finish: true
20
16
  notifications:
21
17
  recipients:
22
18
  - swrobel@gmail.com
data/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ ## 2.3.0
2
+
3
+ * Spree ~> 2.3.0 compatibility
4
+ * Drop jruby support as Spree doesn't seem to support it
5
+ * Drop rbx experimental support since Travis never seems to build using it
6
+
1
7
  ## 2.2.0
2
8
 
3
9
  * Spree ~> 2.2.0 compatibility
data/Gemfile CHANGED
@@ -1,15 +1,10 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
- platforms :jruby do
4
- gem 'activerecord-jdbcsqlite3-adapter'
5
- gem 'activerecord-jdbcpostgresql-adapter'
6
- gem 'activerecord-jdbcmysql-adapter'
7
- end
8
-
9
3
  platforms :ruby do
10
4
  gem 'sqlite3'
11
- gem 'pg'
12
- gem 'mysql2'
5
+ # The following 2 are only for TravisCI
6
+ gem 'pg' if ENV['DB'] == 'postgres'
7
+ gem 'mysql2' if ENV['DB'] == 'mysql'
13
8
  end
14
9
 
15
10
  gemspec
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  Spree Zero Stock Products
2
2
  ======================
3
- [![Build Status](http://img.shields.io/travis/swrobel/spree_zero_stock_products/2-2-stable.svg)](https://travis-ci.org/swrobel/spree_zero_stock_products) [![Dependency Status](http://img.shields.io/gemnasium/swrobel/spree_zero_stock_products.svg)](https://gemnasium.com/swrobel/spree_zero_stock_products) [![Coverage Status](http://img.shields.io/coveralls/swrobel/spree_zero_stock_products/2-2-stable.svg)](https://coveralls.io/r/swrobel/spree_zero_stock_products) [![Code Climate]( http://img.shields.io/codeclimate/github/swrobel/spree_zero_stock_products.svg)](https://codeclimate.com/github/swrobel/spree_zero_stock_products)
3
+ [![Build Status](http://img.shields.io/travis/swrobel/spree_zero_stock_products/2-3-stable.svg?style=flat)](https://travis-ci.org/swrobel/spree_zero_stock_products) [![Dependency Status](http://img.shields.io/gemnasium/swrobel/spree_zero_stock_products.svg?style=flat)](https://gemnasium.com/swrobel/spree_zero_stock_products) [![Coverage Status](http://img.shields.io/coveralls/swrobel/spree_zero_stock_products/2-3-stable.svg?style=flat)](https://coveralls.io/r/swrobel/spree_zero_stock_products) [![Code Climate]( http://img.shields.io/codeclimate/github/swrobel/spree_zero_stock_products.svg?style=flat)](https://codeclimate.com/github/swrobel/spree_zero_stock_products)
4
4
 
5
5
  Restore the `show_zero_stock_products` preference & related functionality in Spree 2.0+
6
6
 
@@ -23,7 +23,7 @@ Installation
23
23
  bundle
24
24
  ```
25
25
 
26
- 1. Set the preference in an intializer such as `config/initializers/spree.rb`:
26
+ 1. Set the preference in an initializer such as `config/initializers/spree.rb`:
27
27
 
28
28
  ```ruby
29
29
  Spree.config do |config|
@@ -48,9 +48,6 @@ This extension is tested against the following rubies:
48
48
  * 1.9.3
49
49
  * 2.0
50
50
  * 2.1
51
- * jruby-19mode
52
- * jruby-20mode
53
- * rubinius (experimental)
54
51
 
55
52
  As well as the following databases:
56
53
 
data/Versionfile CHANGED
@@ -1,15 +1,5 @@
1
- # This file is used to designate compatibilty with different versions of Spree
2
- # Please see http://spreecommerce.com/documentation/extensions.html#versionfile for details
3
-
4
- # Examples
5
- #
6
- # '1.2.x' => { :branch => 'master' }
7
- # '1.1.x' => { :branch => '1-1-stable' }
8
- # '1.0.x' => { :branch => '1-0-stable' }
9
- # '0.70.x' => { :branch => '0-70-stable' }
10
- # '0.40.x' => { :tag => 'v1.0.0', :version => '1.0.0' }
11
-
12
- "2.3.x" => { :branch => "master" }
1
+ "2.4.x" => { :branch => "2-4-stable" }
2
+ "2.3.x" => { :branch => "2-3-stable" }
13
3
  "2.2.x" => { :branch => "2-2-stable" }
14
4
  "2.1.x" => { :branch => "2-1-stable" }
15
5
  "2.0.x" => { :branch => "2-0-stable" }
@@ -1,7 +1,7 @@
1
1
  Spree::Core::Search::Base.class_eval do
2
2
 
3
3
  protected
4
- durably_decorate :get_base_scope, mode: 'soft', sha: '0030f517d06459bfcde9ae18157806c3b702a71f' do
4
+ durably_decorate :get_base_scope, mode: 'soft', sha: '666c885704fa5faab8fe1ca64a7032b2c7d0253a' do
5
5
  if Spree::Config[:show_zero_stock_products]
6
6
  original_get_base_scope
7
7
  else
data/spec/spec_helper.rb CHANGED
@@ -7,6 +7,7 @@ SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
7
7
  ]
8
8
  SimpleCov.start do
9
9
  add_filter 'spec/dummy'
10
+ add_filter 'vendor/bundle'
10
11
  add_group 'Controllers', 'app/controllers'
11
12
  add_group 'Helpers', 'app/helpers'
12
13
  add_group 'Mailers', 'app/mailers'
@@ -21,6 +22,7 @@ ENV['RAILS_ENV'] = 'test'
21
22
  require File.expand_path('../dummy/config/environment.rb', __FILE__)
22
23
 
23
24
  require 'rspec/rails'
25
+ require 'database_cleaner'
24
26
  require 'ffaker'
25
27
 
26
28
  # Requires supporting ruby files with custom matchers and macros, etc,
@@ -51,5 +53,22 @@ RSpec.configure do |config|
51
53
 
52
54
  config.use_transactional_fixtures = true
53
55
 
56
+ # Ensure Suite is set to use transactions for speed.
57
+ config.before :suite do
58
+ DatabaseCleaner.strategy = :transaction
59
+ DatabaseCleaner.clean_with :truncation
60
+ end
61
+
62
+ # Before each spec check if it is a Javascript test and switch between using database transactions or not where necessary.
63
+ config.before :each do
64
+ DatabaseCleaner.strategy = RSpec.current_example.metadata[:js] ? :truncation : :transaction
65
+ DatabaseCleaner.start
66
+ end
67
+
68
+ # After each spec clean the database.
69
+ config.after :each do
70
+ DatabaseCleaner.clean
71
+ end
72
+
54
73
  config.fail_fast = ENV['FAIL_FAST'] || false
55
74
  end
@@ -2,7 +2,7 @@
2
2
  Gem::Specification.new do |s|
3
3
  s.platform = Gem::Platform::RUBY
4
4
  s.name = 'spree_zero_stock_products'
5
- s.version = '2.2.0'
5
+ s.version = '2.3.0'
6
6
  s.summary = 'Restore show_zero_stock_products functionality in Spree 2.0+'
7
7
  s.description = 'Restore show_zero_stock_products functionality in Spree 2.0+'
8
8
  s.required_ruby_version = '>= 1.9.3'
@@ -17,9 +17,10 @@ Gem::Specification.new do |s|
17
17
  s.require_path = 'lib'
18
18
  s.requirements << 'none'
19
19
 
20
- s.add_dependency 'spree_core', '~> 2.2.0'
20
+ s.add_dependency 'spree_core', '~> 2.3.0'
21
21
  s.add_dependency 'durable_decorator', '~> 0.2.0'
22
22
 
23
+ s.add_development_dependency 'database_cleaner'
23
24
  s.add_development_dependency 'factory_girl', '~> 4.2'
24
25
  s.add_development_dependency 'ffaker'
25
26
  s.add_development_dependency 'rspec-rails', '~> 2.13'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spree_zero_stock_products
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.0
4
+ version: 2.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stefan Wrobel
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-03-12 00:00:00.000000000 Z
11
+ date: 2014-11-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: spree_core
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 2.2.0
19
+ version: 2.3.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 2.2.0
26
+ version: 2.3.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: durable_decorator
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -38,6 +38,20 @@ dependencies:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: 0.2.0
41
+ - !ruby/object:Gem::Dependency
42
+ name: database_cleaner
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
41
55
  - !ruby/object:Gem::Dependency
42
56
  name: factory_girl
43
57
  requirement: !ruby/object:Gem::Requirement
@@ -145,7 +159,6 @@ files:
145
159
  - lib/spree_zero_stock_products.rb
146
160
  - lib/spree_zero_stock_products/engine.rb
147
161
  - lib/spree_zero_stock_products/factories.rb
148
- - script/rails
149
162
  - spec/lib/search/base_spec.rb
150
163
  - spec/models/spree/product/scopes_spec.rb
151
164
  - spec/models/spree/taxon/taxon_spec.rb
data/script/rails DELETED
@@ -1,7 +0,0 @@
1
- # This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application.
2
-
3
- ENGINE_ROOT = File.expand_path('../..', __FILE__)
4
- ENGINE_PATH = File.expand_path('../../lib/spree_zero_stock_products/engine', __FILE__)
5
-
6
- require 'rails/all'
7
- require 'rails/engine/commands'