spree_sample 2.1.3 → 2.1.4

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: 13662c162ebffec7df5b260b95ab5aec5df10b51
4
- data.tar.gz: e1f0e58ca609c648bc4228c3f96e3ade895fa7fb
3
+ metadata.gz: ace303c64584b077482c78a4ccb07e76569f22a9
4
+ data.tar.gz: 9aa97994aeba812f815e0b7ebb58c113c7652beb
5
5
  SHA512:
6
- metadata.gz: a50898c4534d54f5cd05020bc62c97beb52765891db97683b68c660d64d258047db8fdf76d58f8af57c3f922c27865f17b937a5234307533eb3b6a0585fa934b
7
- data.tar.gz: 14f2ee8ee7eb31e6675d8b2e23f7cc465711d92dbd9c2cf5d76be3a9844eac188b92e6be096c85536d13cd731882895893ae80b1c3949d8d6935f0e0c45676ea
6
+ metadata.gz: bc50bd24e7090ebad226c5e7e4f56ea5db9699c78e03eb32d7611c1a71bec6c92d8b98f0f745d7fd5055c4fd9080482855f2dde0d4dbebb87b64261679ff58f8
7
+ data.tar.gz: e179ec3f70ce3af41f56c4997a1dd0bd53c26ba21e78ea7b8163ac8bcfd4e03376d1a51d2b68bb53a96710416f75e0dfc853ffc3cb890910851cdd2e71f8650f
@@ -9,7 +9,7 @@ end
9
9
  europe_vat = Spree::Zone.find_by_name!("EU_VAT")
10
10
  shipping_category = Spree::ShippingCategory.find_or_create_by!(name: 'Default')
11
11
 
12
- shipping_methods = [
12
+ Spree::ShippingMethod.create!([
13
13
  {
14
14
  :name => "UPS Ground (USD)",
15
15
  :zones => [north_america],
@@ -28,28 +28,30 @@ shipping_methods = [
28
28
  :calculator => Spree::Calculator::Shipping::FlatRate.create!,
29
29
  :shipping_categories => [shipping_category]
30
30
  },
31
+ {
32
+ :name => "UPS Ground (EU)",
33
+ :zones => [europe_vat],
34
+ :calculator => Spree::Calculator::Shipping::FlatRate.create!,
35
+ :shipping_categories => [shipping_category]
36
+ },
31
37
  {
32
38
  :name => "UPS Ground (EUR)",
33
39
  :zones => [europe_vat],
34
40
  :calculator => Spree::Calculator::Shipping::FlatRate.create!,
35
41
  :shipping_categories => [shipping_category]
36
42
  }
37
- ]
38
-
39
- shipping_methods.each do |shipping_method_attrs|
40
- Spree::ShippingMethod.create!(shipping_method_attrs)
41
- end
43
+ ])
42
44
 
43
45
  {
44
46
  "UPS Ground (USD)" => [5, "USD"],
45
- "UPS Ground (EUR)" => [5, "EUR"],
47
+ "UPS Ground (EU)" => [5, "USD"],
46
48
  "UPS One Day (USD)" => [15, "USD"],
47
- "UPS Two Day (USD)" => [10, "USD"]
49
+ "UPS Two Day (USD)" => [10, "USD"],
50
+ "UPS Ground (EUR)" => [8, "EUR"]
48
51
  }.each do |shipping_method_name, (price, currency)|
49
52
  shipping_method = Spree::ShippingMethod.find_by_name!(shipping_method_name)
50
53
  shipping_method.calculator.preferred_amount = price
51
54
  shipping_method.calculator.preferred_currency = currency
52
- shipping_method.shipping_categories << Spree::ShippingCategory.first
53
55
  shipping_method.save!
54
56
  end
55
57
 
data/db/samples/taxons.rb CHANGED
@@ -94,22 +94,46 @@ taxons = [
94
94
  {
95
95
  :name => "Ruby",
96
96
  :taxonomy => brands,
97
- :parent => "Brand"
97
+ :parent => "Brand",
98
+ :products => [
99
+ products[:ruby_baseball_jersey]
100
+ ]
98
101
  },
99
102
  {
100
103
  :name => "Apache",
101
104
  :taxonomy => brands,
102
- :parent => "Brand"
105
+ :parent => "Brand",
106
+ :products => [
107
+ products[:apache_baseball_jersey]
108
+ ]
103
109
  },
104
110
  {
105
111
  :name => "Spree",
106
112
  :taxonomy => brands,
107
- :parent => "Brand"
113
+ :parent => "Brand",
114
+ :products => [
115
+ products[:spree_stein],
116
+ products[:spree_mug],
117
+ products[:spree_ringer],
118
+ products[:spree_baseball_jersey],
119
+ products[:spree_tote],
120
+ products[:spree_bag],
121
+ products[:spree_jr_spaghetti],
122
+ ]
108
123
  },
109
124
  {
110
125
  :name => "Rails",
111
126
  :taxonomy => brands,
112
- :parent => "Brand"
127
+ :parent => "Brand",
128
+ :products => [
129
+ products[:ror_tote],
130
+ products[:ror_bag],
131
+ products[:ror_mug],
132
+ products[:ror_stein],
133
+ products[:ror_baseball_jersey],
134
+ products[:ror_jr_spaghetti],
135
+ products[:ror_ringer],
136
+ ]
113
137
  },
114
138
  ]
115
139
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spree_sample
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.3
4
+ version: 2.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sean Schofield
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-11-20 00:00:00.000000000 Z
11
+ date: 2014-01-23 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.1.3
19
+ version: 2.1.4
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.1.3
26
+ version: 2.1.4
27
27
  description: Required dependency for Spree
28
28
  email: sean@spreecommerce.com
29
29
  executables: []
@@ -31,9 +31,7 @@ extensions: []
31
31
  extra_rdoc_files: []
32
32
  files:
33
33
  - LICENSE
34
- - lib/spree/sample.rb
35
- - lib/spree_sample.rb
36
- - lib/tasks/sample.rake
34
+ - db/samples.rb
37
35
  - db/samples/addresses.rb
38
36
  - db/samples/adjustments.rb
39
37
  - db/samples/assets.rb
@@ -86,7 +84,9 @@ files:
86
84
  - db/samples/taxonomies.rb
87
85
  - db/samples/taxons.rb
88
86
  - db/samples/variants.rb
89
- - db/samples.rb
87
+ - lib/spree/sample.rb
88
+ - lib/spree_sample.rb
89
+ - lib/tasks/sample.rake
90
90
  homepage: http://spreecommerce.com
91
91
  licenses:
92
92
  - BSD-3
@@ -97,18 +97,18 @@ require_paths:
97
97
  - lib
98
98
  required_ruby_version: !ruby/object:Gem::Requirement
99
99
  requirements:
100
- - - '>='
100
+ - - ">="
101
101
  - !ruby/object:Gem::Version
102
102
  version: 1.9.3
103
103
  required_rubygems_version: !ruby/object:Gem::Requirement
104
104
  requirements:
105
- - - '>='
105
+ - - ">="
106
106
  - !ruby/object:Gem::Version
107
107
  version: '0'
108
108
  requirements:
109
109
  - none
110
110
  rubyforge_project:
111
- rubygems_version: 2.1.0
111
+ rubygems_version: 2.2.0
112
112
  signing_key:
113
113
  specification_version: 4
114
114
  summary: Sample data (including images) for use with Spree.