comable-sample 0.7.0.beta1 → 0.7.0.beta2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +7 -2
- data/db/samples/shipments.rb +1 -1
- data/db/samples/variants.rb +10 -10
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2ef33a5afa0d88cf71b7e276185a564c513414fb
|
4
|
+
data.tar.gz: 270915d4b6becffb8a8fa3017b3a9948177811bf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ac44aeb48b88454edac6f59e247217c13556a823f7b2f851cfdfec96d2eaf40ad54ae6454eca6e2cdf8069c86c44e25d47ed1096bc559e72eb0e89a86ba10af7
|
7
|
+
data.tar.gz: 6c566b7e1af6f655cfbab5ce1f2231576158120da041b1a5b0785936c9b01f24b910fd93402fdc0802d04874521f72b792b7bb47ad49987e5ce7654fccb3549d
|
data/Rakefile
CHANGED
@@ -4,6 +4,7 @@ rescue LoadError
|
|
4
4
|
puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
|
5
5
|
end
|
6
6
|
|
7
|
+
require 'rspec/core/rake_task'
|
7
8
|
require 'rdoc/task'
|
8
9
|
|
9
10
|
RDoc::Task.new(:rdoc) do |rdoc|
|
@@ -69,9 +70,9 @@ if File.exist?('comable.gemspec')
|
|
69
70
|
end
|
70
71
|
end
|
71
72
|
|
72
|
-
task default: ['app:spec:all', 'rubocop', 'brakeman:all']
|
73
|
+
task default: ['app:spec:all', 'jasmine', 'rubocop', 'brakeman:all']
|
73
74
|
else
|
74
|
-
task default: ['app:spec', 'rubocop', 'brakeman']
|
75
|
+
task default: ['app:spec', 'jasmine', 'rubocop', 'brakeman']
|
75
76
|
end
|
76
77
|
|
77
78
|
Bundler::GemHelper.install_tasks
|
@@ -79,6 +80,10 @@ Bundler::GemHelper.install_tasks
|
|
79
80
|
# from https://github.com/rspec/rspec-rails/issues/936
|
80
81
|
task 'test:prepare'
|
81
82
|
|
83
|
+
task :jasmine do
|
84
|
+
sh 'bundle exec rake app:spec:javascript RAILS_ENV=test'
|
85
|
+
end
|
86
|
+
|
82
87
|
task :rubocop do
|
83
88
|
sh 'rubocop'
|
84
89
|
end
|
data/db/samples/shipments.rb
CHANGED
@@ -4,7 +4,7 @@ Comable::Sample.import('shipment_methods')
|
|
4
4
|
shipment_method = Comable::ShipmentMethod.first
|
5
5
|
|
6
6
|
Comable::Order.complete.each do |order|
|
7
|
-
shipment = order.
|
7
|
+
shipment = order.shipments.create!(shipment_method: shipment_method, fee: shipment_method.fee)
|
8
8
|
shipment.state = 'ready'
|
9
9
|
shipment.save!
|
10
10
|
end
|
data/db/samples/variants.rb
CHANGED
@@ -13,60 +13,60 @@ variants_attributes = [
|
|
13
13
|
{
|
14
14
|
product: suede_dress,
|
15
15
|
options: [name: Comable::Sample.t(:size), value: 'S'] + [name: Comable::Sample.t(:color), value: Comable::Sample.t(:navy)],
|
16
|
-
|
16
|
+
stocks_attributes: [default_stock_attributes],
|
17
17
|
sku: 'SUEDE-DRESS-SN'
|
18
18
|
},
|
19
19
|
{
|
20
20
|
product: suede_dress,
|
21
21
|
options: [name: Comable::Sample.t(:size), value: 'M'] + [name: Comable::Sample.t(:color), value: Comable::Sample.t(:navy)],
|
22
|
-
|
22
|
+
stocks_attributes: [default_stock_attributes],
|
23
23
|
sku: 'SUEDE-DRESS-MN'
|
24
24
|
},
|
25
25
|
{
|
26
26
|
product: girly_coat,
|
27
27
|
options: [name: Comable::Sample.t(:size), value: 'S'] + [name: Comable::Sample.t(:color), value: Comable::Sample.t(:beige)],
|
28
|
-
|
28
|
+
stocks_attributes: [default_stock_attributes],
|
29
29
|
sku: 'GIRLY-COAT-SB'
|
30
30
|
},
|
31
31
|
{
|
32
32
|
product: girly_coat,
|
33
33
|
options: [name: Comable::Sample.t(:size), value: 'M'] + [name: Comable::Sample.t(:color), value: Comable::Sample.t(:beige)],
|
34
|
-
|
34
|
+
stocks_attributes: [default_stock_attributes],
|
35
35
|
sku: 'GIRLY-COAT-MB'
|
36
36
|
},
|
37
37
|
{
|
38
38
|
product: girly_coat,
|
39
39
|
options: [name: Comable::Sample.t(:size), value: 'S'] + [name: Comable::Sample.t(:color), value: Comable::Sample.t(:navy)],
|
40
|
-
|
40
|
+
stocks_attributes: [default_stock_attributes],
|
41
41
|
sku: 'GIRLY-COAT-SN'
|
42
42
|
},
|
43
43
|
{
|
44
44
|
product: girly_coat,
|
45
45
|
options: [name: Comable::Sample.t(:size), value: 'M'] + [name: Comable::Sample.t(:color), value: Comable::Sample.t(:navy)],
|
46
|
-
|
46
|
+
stocks_attributes: [default_stock_attributes],
|
47
47
|
sku: 'GIRLY-COAT-MN'
|
48
48
|
},
|
49
49
|
{
|
50
50
|
product: fur_gloves,
|
51
|
-
|
51
|
+
stocks_attributes: [default_stock_attributes],
|
52
52
|
sku: 'FUR-GLOVES'
|
53
53
|
},
|
54
54
|
{
|
55
55
|
product: leather_boots,
|
56
56
|
options: [name: Comable::Sample.t(:size), value: 'S'],
|
57
|
-
|
57
|
+
stocks_attributes: [quantity: 0],
|
58
58
|
sku: 'LEATHER-BOOTS-S'
|
59
59
|
},
|
60
60
|
{
|
61
61
|
product: leather_boots,
|
62
62
|
options: [name: Comable::Sample.t(:size), value: 'M'],
|
63
|
-
|
63
|
+
stocks_attributes: [quantity: 1],
|
64
64
|
sku: 'LEATHER-BOOTS-M'
|
65
65
|
},
|
66
66
|
{
|
67
67
|
product: leather_boots,
|
68
68
|
options: [name: Comable::Sample.t(:size), value: 'L'],
|
69
|
-
|
69
|
+
stocks_attributes: [default_stock_attributes],
|
70
70
|
sku: 'LEATHER-BOOTS-L'
|
71
71
|
}
|
72
72
|
]
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: comable-sample
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.0.
|
4
|
+
version: 0.7.0.beta2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- YOSHIDA Hiroki
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-10-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: comable-core
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.7.0.
|
19
|
+
version: 0.7.0.beta2
|
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: 0.7.0.
|
26
|
+
version: 0.7.0.beta2
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: ffaker
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -90,7 +90,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
90
90
|
version: 1.3.1
|
91
91
|
requirements: []
|
92
92
|
rubyforge_project:
|
93
|
-
rubygems_version: 2.
|
93
|
+
rubygems_version: 2.4.5
|
94
94
|
signing_key:
|
95
95
|
specification_version: 4
|
96
96
|
summary: Provide sample data for Comable.
|