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 +4 -4
- data/CHANGELOG.md +3 -0
- data/README.md +2 -1
- data/app/models/product_decorator.rb +2 -1
- data/spec/spec_helper.rb +15 -12
- data/spree_zero_stock_products.gemspec +3 -2
- metadata +19 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 09b4aea5cb9817e78a9f3c440ccace45133dfd87
|
4
|
+
data.tar.gz: c0e6562afb1a38874c075e2350b462433a4044f0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cad9263f48df7e4027a5034fa5b57c18de742955ac427c0bbe8113b33e2edb91ef9490920b4986c17d053c22dae81263a19809a0da9f8091f90837c91e85ddff
|
7
|
+
data.tar.gz: 34fab5c9a659bb35f7ae76ce9e1b3259da937a03f6e50903338882fb640f7d38904317670c2bd114ce96b6d28d88e79389646685e38e4bcfebd8395eaf941871
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -1,5 +1,6 @@
|
|
1
|
-
|
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
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
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.
|
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.
|
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.
|
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-
|
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.
|
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.
|
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.
|
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+
|