spree_zero_stock_products 2.0.1 → 2.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0ad3df76675515354b52c60af398f0ca74908a53
4
- data.tar.gz: c4918e30f68ef32b1d4c588cec5714b5f2de4868
3
+ metadata.gz: 09b4aea5cb9817e78a9f3c440ccace45133dfd87
4
+ data.tar.gz: c0e6562afb1a38874c075e2350b462433a4044f0
5
5
  SHA512:
6
- metadata.gz: c4d5340c1f2e73075193d10952e6226eba34bf04a90f74a506cafc83adb807af118b1e0976ffe2168b5f40506d3992720723ae7a18cf0d0980ad4541516fa5fa
7
- data.tar.gz: 0523fc527d6bb5272579809826ce5c385e03aa39344ff271b88f0f75e8f6feeabec37388367fd862f73f2d6458644aa3495570852af9adf977e7ff64b41b82d0
6
+ metadata.gz: cad9263f48df7e4027a5034fa5b57c18de742955ac427c0bbe8113b33e2edb91ef9490920b4986c17d053c22dae81263a19809a0da9f8091f90837c91e85ddff
7
+ data.tar.gz: 34fab5c9a659bb35f7ae76ce9e1b3259da937a03f6e50903338882fb640f7d38904317670c2bd114ce96b6d28d88e79389646685e38e4bcfebd8395eaf941871
data/CHANGELOG.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # Spree Zero Stock Products Changelog
2
2
 
3
+ ## 2.0.2
4
+ Fix for Spree >= 2.0.5 because StockItems can now be deleted
5
+
3
6
  ## 2.0.1
4
7
 
5
8
  * Backorderable products will now be shown even if `show_zero_stock_products = false`
data/README.md CHANGED
@@ -1,5 +1,6 @@
1
- SpreeZeroStockProducts [![Build Status](https://travis-ci.org/swrobel/spree_zero_stock_products.png?branch=2-0-stable)](https://travis-ci.org/swrobel/spree_zero_stock_products)
1
+ Spree Zero Stock Products
2
2
  ======================
3
+ [![Build Status](https://travis-ci.org/swrobel/spree_zero_stock_products.png?branch=2-0-stable)](https://travis-ci.org/swrobel/spree_zero_stock_products) [![Dependency Status](https://gemnasium.com/swrobel/spree_zero_stock_products.png)](https://gemnasium.com/swrobel/spree_zero_stock_products) [![Coverage Status](https://coveralls.io/repos/swrobel/spree_zero_stock_products/badge.png)](https://coveralls.io/r/swrobel/spree_zero_stock_products) [![Code Climate](https://codeclimate.com/github/swrobel/spree_zero_stock_products.png)](https://codeclimate.com/github/swrobel/spree_zero_stock_products)
3
4
 
4
5
  Restore the `show_zero_stock_products` preference & related functionality in Spree 2.0+
5
6
 
@@ -8,7 +8,8 @@ Spree::Product.class_eval do
8
8
  SELECT product_id FROM #{Spree::Variant.table_name} v
9
9
  JOIN #{Spree::StockItem.table_name} i
10
10
  ON v.id = i.variant_id
11
- WHERE deleted_at IS NULL
11
+ WHERE v.deleted_at IS NULL
12
+ AND i.deleted_at IS NULL
12
13
  GROUP BY product_id
13
14
  HAVING SUM(count_on_hand) > 0
14
15
  OR MAX(CASE backorderable
data/spec/spec_helper.rb CHANGED
@@ -1,15 +1,18 @@
1
- unless ENV['TRAVIS']
2
- # Run Coverage report
3
- require 'simplecov'
4
- SimpleCov.start do
5
- add_filter 'spec/dummy'
6
- add_group 'Controllers', 'app/controllers'
7
- add_group 'Helpers', 'app/helpers'
8
- add_group 'Mailers', 'app/mailers'
9
- add_group 'Models', 'app/models'
10
- add_group 'Views', 'app/views'
11
- add_group 'Libraries', 'lib'
12
- end
1
+ # Run Coverage report
2
+ require 'simplecov'
3
+ require 'coveralls'
4
+ SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
5
+ SimpleCov::Formatter::HTMLFormatter,
6
+ Coveralls::SimpleCov::Formatter
7
+ ]
8
+ SimpleCov.start do
9
+ add_filter 'spec/dummy'
10
+ add_group 'Controllers', 'app/controllers'
11
+ add_group 'Helpers', 'app/helpers'
12
+ add_group 'Mailers', 'app/mailers'
13
+ add_group 'Models', 'app/models'
14
+ add_group 'Views', 'app/views'
15
+ add_group 'Libraries', 'lib'
13
16
  end
14
17
 
15
18
  # Configure Rails Environment
@@ -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.0.1'
5
+ s.version = '2.0.2'
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,7 +17,7 @@ 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.0.0'
20
+ s.add_dependency 'spree_core', '~> 2.0.5'
21
21
  s.add_dependency 'durable_decorator', '~> 0.2.0'
22
22
 
23
23
  s.add_development_dependency 'factory_girl', '~> 4.2'
@@ -25,4 +25,5 @@ Gem::Specification.new do |s|
25
25
  s.add_development_dependency 'rspec-rails', '~> 2.13'
26
26
  s.add_development_dependency 'simplecov'
27
27
  s.add_development_dependency 'durable_decorator_rails', '~> 0.1.0'
28
+ s.add_development_dependency 'coveralls'
28
29
  end
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.0.1
4
+ version: 2.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stefan Wrobel
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-09-10 00:00:00.000000000 Z
11
+ date: 2013-09-17 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.0.0
19
+ version: 2.0.5
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.0.0
26
+ version: 2.0.5
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: durable_decorator
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -108,6 +108,20 @@ dependencies:
108
108
  - - ~>
109
109
  - !ruby/object:Gem::Version
110
110
  version: 0.1.0
111
+ - !ruby/object:Gem::Dependency
112
+ name: coveralls
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - '>='
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - '>='
123
+ - !ruby/object:Gem::Version
124
+ version: '0'
111
125
  description: Restore show_zero_stock_products functionality in Spree 2.0+
112
126
  email: swrobel@gmail.com
113
127
  executables: []
@@ -158,7 +172,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
158
172
  requirements:
159
173
  - none
160
174
  rubyforge_project:
161
- rubygems_version: 2.0.3
175
+ rubygems_version: 2.1.3
162
176
  signing_key:
163
177
  specification_version: 4
164
178
  summary: Restore show_zero_stock_products functionality in Spree 2.0+