spree_sample 3.3.0.rc2 → 3.3.0.rc3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/db/samples/addresses.rb +2 -2
- data/db/samples/adjustments.rb +2 -2
- data/db/samples/assets.rb +16 -16
- data/db/samples/option_values.rb +2 -2
- data/db/samples/orders.rb +2 -2
- data/db/samples/product_option_types.rb +4 -4
- data/db/samples/product_properties.rb +1 -1
- data/db/samples/products.rb +2 -2
- data/db/samples/shipping_methods.rb +3 -3
- data/db/samples/tax_rates.rb +2 -2
- data/db/samples/taxons.rb +3 -3
- data/db/samples/variants.rb +16 -16
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 32436c76185db2ec32bce267353fac331138cbba
|
4
|
+
data.tar.gz: 3d39012d5946dd98a09f236ac41692b2c591e0f3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ddaf826364907224393cb03df685c9c214d086505c32251cb6c317d3f0998ba8a87f1ca2e3005580149ae49a5c68a42cd32fb49774afbfc7eaaa75cb016aac96
|
7
|
+
data.tar.gz: 2993d6347b1e59c1a9c1eb284cc38ee7d7ea40c381539f14a02dca4d9bddf2d981ab30a65222082455cb237a88e92a8bc206f760d7b23b7649ecc1621b844aaa
|
data/db/samples/addresses.rb
CHANGED
data/db/samples/adjustments.rb
CHANGED
@@ -4,7 +4,7 @@ first_order = Spree::Order.find_by!(number: "R123456789")
|
|
4
4
|
last_order = Spree::Order.find_by!(number: "R987654321")
|
5
5
|
|
6
6
|
first_order.adjustments.where(
|
7
|
-
source: Spree::TaxRate.
|
7
|
+
source: Spree::TaxRate.find_by!(name: "North America"),
|
8
8
|
order: first_order,
|
9
9
|
label: "Tax",
|
10
10
|
state: "open",
|
@@ -13,7 +13,7 @@ first_order.adjustments.where(
|
|
13
13
|
end
|
14
14
|
|
15
15
|
last_order.adjustments.where(
|
16
|
-
source: Spree::TaxRate.
|
16
|
+
source: Spree::TaxRate.find_by!(name: "North America"),
|
17
17
|
order: last_order,
|
18
18
|
label: "Tax",
|
19
19
|
state: "open",
|
data/db/samples/assets.rb
CHANGED
@@ -2,22 +2,22 @@ Spree::Sample.load_sample("products")
|
|
2
2
|
Spree::Sample.load_sample("variants")
|
3
3
|
|
4
4
|
products = {}
|
5
|
-
products[:ror_baseball_jersey] = Spree::Product.
|
6
|
-
products[:ror_tote] = Spree::Product.
|
7
|
-
products[:ror_bag] = Spree::Product.
|
8
|
-
products[:ror_jr_spaghetti] = Spree::Product.
|
9
|
-
products[:ror_mug] = Spree::Product.
|
10
|
-
products[:ror_ringer] = Spree::Product.
|
11
|
-
products[:ror_stein] = Spree::Product.
|
12
|
-
products[:spree_baseball_jersey] = Spree::Product.
|
13
|
-
products[:spree_stein] = Spree::Product.
|
14
|
-
products[:spree_jr_spaghetti] = Spree::Product.
|
15
|
-
products[:spree_mug] = Spree::Product.
|
16
|
-
products[:spree_ringer] = Spree::Product.
|
17
|
-
products[:spree_tote] = Spree::Product.
|
18
|
-
products[:spree_bag] = Spree::Product.
|
19
|
-
products[:ruby_baseball_jersey] = Spree::Product.
|
20
|
-
products[:apache_baseball_jersey] = Spree::Product.
|
5
|
+
products[:ror_baseball_jersey] = Spree::Product.find_by!(name: "Ruby on Rails Baseball Jersey")
|
6
|
+
products[:ror_tote] = Spree::Product.find_by!(name: "Ruby on Rails Tote")
|
7
|
+
products[:ror_bag] = Spree::Product.find_by!(name: "Ruby on Rails Bag")
|
8
|
+
products[:ror_jr_spaghetti] = Spree::Product.find_by!(name: "Ruby on Rails Jr. Spaghetti")
|
9
|
+
products[:ror_mug] = Spree::Product.find_by!(name: "Ruby on Rails Mug")
|
10
|
+
products[:ror_ringer] = Spree::Product.find_by!(name: "Ruby on Rails Ringer T-Shirt")
|
11
|
+
products[:ror_stein] = Spree::Product.find_by!(name: "Ruby on Rails Stein")
|
12
|
+
products[:spree_baseball_jersey] = Spree::Product.find_by!(name: "Spree Baseball Jersey")
|
13
|
+
products[:spree_stein] = Spree::Product.find_by!(name: "Spree Stein")
|
14
|
+
products[:spree_jr_spaghetti] = Spree::Product.find_by!(name: "Spree Jr. Spaghetti")
|
15
|
+
products[:spree_mug] = Spree::Product.find_by!(name: "Spree Mug")
|
16
|
+
products[:spree_ringer] = Spree::Product.find_by!(name: "Spree Ringer T-Shirt")
|
17
|
+
products[:spree_tote] = Spree::Product.find_by!(name: "Spree Tote")
|
18
|
+
products[:spree_bag] = Spree::Product.find_by!(name: "Spree Bag")
|
19
|
+
products[:ruby_baseball_jersey] = Spree::Product.find_by!(name: "Ruby Baseball Jersey")
|
20
|
+
products[:apache_baseball_jersey] = Spree::Product.find_by!(name: "Apache Baseball Jersey")
|
21
21
|
|
22
22
|
def image(name, type = "jpeg")
|
23
23
|
images_path = Pathname.new(File.dirname(__FILE__)) + "images"
|
data/db/samples/option_values.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
Spree::Sample.load_sample("option_types")
|
2
2
|
|
3
|
-
size = Spree::OptionType.
|
4
|
-
color = Spree::OptionType.
|
3
|
+
size = Spree::OptionType.find_by!(presentation: "Size")
|
4
|
+
color = Spree::OptionType.find_by!(presentation: "Color")
|
5
5
|
|
6
6
|
option_values_attributes = [
|
7
7
|
{
|
data/db/samples/orders.rb
CHANGED
@@ -21,14 +21,14 @@ orders << Spree::Order.where(
|
|
21
21
|
|
22
22
|
unless orders[0].line_items.any?
|
23
23
|
orders[0].line_items.new(
|
24
|
-
variant: Spree::Product.
|
24
|
+
variant: Spree::Product.find_by!(name: "Ruby on Rails Tote").master,
|
25
25
|
quantity: 1,
|
26
26
|
price: 15.99).save!
|
27
27
|
end
|
28
28
|
|
29
29
|
unless orders[1].line_items.any?
|
30
30
|
orders[1].line_items.new(
|
31
|
-
variant: Spree::Product.
|
31
|
+
variant: Spree::Product.find_by!(name: "Ruby on Rails Bag").master,
|
32
32
|
quantity: 1,
|
33
33
|
price: 22.99).save!
|
34
34
|
end
|
@@ -1,12 +1,12 @@
|
|
1
1
|
Spree::Sample.load_sample("products")
|
2
2
|
|
3
|
-
size = Spree::OptionType.
|
4
|
-
color = Spree::OptionType.
|
3
|
+
size = Spree::OptionType.find_by!(presentation: "Size")
|
4
|
+
color = Spree::OptionType.find_by!(presentation: "Color")
|
5
5
|
|
6
|
-
ror_baseball_jersey = Spree::Product.
|
6
|
+
ror_baseball_jersey = Spree::Product.find_by!(name: "Ruby on Rails Baseball Jersey")
|
7
7
|
ror_baseball_jersey.option_types = [size, color]
|
8
8
|
ror_baseball_jersey.save!
|
9
9
|
|
10
|
-
spree_baseball_jersey = Spree::Product.
|
10
|
+
spree_baseball_jersey = Spree::Product.find_by!(name: "Spree Baseball Jersey")
|
11
11
|
spree_baseball_jersey.option_types = [size, color]
|
12
12
|
spree_baseball_jersey.save!
|
@@ -111,7 +111,7 @@ products =
|
|
111
111
|
}
|
112
112
|
|
113
113
|
products.each do |name, properties|
|
114
|
-
product = Spree::Product.
|
114
|
+
product = Spree::Product.find_by(name: name)
|
115
115
|
properties.each do |prop_name, prop_value|
|
116
116
|
product.set_property(prop_name, prop_value)
|
117
117
|
end
|
data/db/samples/products.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
Spree::Sample.load_sample("tax_categories")
|
2
2
|
Spree::Sample.load_sample("shipping_categories")
|
3
3
|
|
4
|
-
clothing = Spree::TaxCategory.
|
4
|
+
clothing = Spree::TaxCategory.find_by!(name: "Clothing")
|
5
5
|
|
6
6
|
products = [
|
7
7
|
{
|
@@ -99,7 +99,7 @@ products = [
|
|
99
99
|
}
|
100
100
|
]
|
101
101
|
|
102
|
-
default_shipping_category = Spree::ShippingCategory.
|
102
|
+
default_shipping_category = Spree::ShippingCategory.find_by!(name: "Default")
|
103
103
|
|
104
104
|
products.each do |product_attrs|
|
105
105
|
Spree::Config[:currency] = "USD"
|
@@ -1,12 +1,12 @@
|
|
1
1
|
begin
|
2
|
-
north_america = Spree::Zone.
|
2
|
+
north_america = Spree::Zone.find_by!(name: "North America")
|
3
3
|
rescue ActiveRecord::RecordNotFound
|
4
4
|
puts "Couldn't find 'North America' zone. Did you run `rake db:seed` first?"
|
5
5
|
puts "That task will set up the countries, states and zones required for Spree."
|
6
6
|
exit
|
7
7
|
end
|
8
8
|
|
9
|
-
europe_vat = Spree::Zone.
|
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
12
|
shipping_methods = [
|
@@ -58,7 +58,7 @@ end
|
|
58
58
|
"UPS Two Day (USD)" => [10, "USD"],
|
59
59
|
"UPS Ground (EUR)" => [8, "EUR"]
|
60
60
|
}.each do |shipping_method_name, (price, currency)|
|
61
|
-
shipping_method = Spree::ShippingMethod.
|
61
|
+
shipping_method = Spree::ShippingMethod.find_by!(name: shipping_method_name)
|
62
62
|
shipping_method.calculator.preferences = {
|
63
63
|
amount: price,
|
64
64
|
currency: currency
|
data/db/samples/tax_rates.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
north_america = Spree::Zone.
|
2
|
-
clothing = Spree::TaxCategory.
|
1
|
+
north_america = Spree::Zone.find_by!(name: "North America")
|
2
|
+
clothing = Spree::TaxCategory.find_by!(name: "Clothing")
|
3
3
|
|
4
4
|
Spree::TaxRate.where(
|
5
5
|
name: "North America",
|
data/db/samples/taxons.rb
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
Spree::Sample.load_sample("taxonomies")
|
2
2
|
Spree::Sample.load_sample("products")
|
3
3
|
|
4
|
-
categories = Spree::Taxonomy.
|
5
|
-
brands = Spree::Taxonomy.
|
4
|
+
categories = Spree::Taxonomy.find_by!(name: I18n.t('spree.taxonomy_categories_name'))
|
5
|
+
brands = Spree::Taxonomy.find_by!(name: I18n.t('spree.taxonomy_brands_name'))
|
6
6
|
|
7
7
|
products = {
|
8
8
|
ror_tote: "Ruby on Rails Tote",
|
@@ -24,7 +24,7 @@ products = {
|
|
24
24
|
}
|
25
25
|
|
26
26
|
products.each do |key, name|
|
27
|
-
products[key] = Spree::Product.
|
27
|
+
products[key] = Spree::Product.find_by!(name: name)
|
28
28
|
end
|
29
29
|
|
30
30
|
taxons = [
|
data/db/samples/variants.rb
CHANGED
@@ -1,22 +1,22 @@
|
|
1
1
|
Spree::Sample.load_sample("option_values")
|
2
2
|
Spree::Sample.load_sample("products")
|
3
3
|
|
4
|
-
ror_baseball_jersey = Spree::Product.
|
5
|
-
ror_tote = Spree::Product.
|
6
|
-
ror_bag = Spree::Product.
|
7
|
-
ror_jr_spaghetti = Spree::Product.
|
8
|
-
ror_mug = Spree::Product.
|
9
|
-
ror_ringer = Spree::Product.
|
10
|
-
ror_stein = Spree::Product.
|
11
|
-
spree_baseball_jersey = Spree::Product.
|
12
|
-
spree_stein = Spree::Product.
|
13
|
-
spree_jr_spaghetti = Spree::Product.
|
14
|
-
spree_mug = Spree::Product.
|
15
|
-
spree_ringer = Spree::Product.
|
16
|
-
spree_tote = Spree::Product.
|
17
|
-
spree_bag = Spree::Product.
|
18
|
-
ruby_baseball_jersey = Spree::Product.
|
19
|
-
apache_baseball_jersey = Spree::Product.
|
4
|
+
ror_baseball_jersey = Spree::Product.find_by!(name: "Ruby on Rails Baseball Jersey")
|
5
|
+
ror_tote = Spree::Product.find_by!(name: "Ruby on Rails Tote")
|
6
|
+
ror_bag = Spree::Product.find_by!(name: "Ruby on Rails Bag")
|
7
|
+
ror_jr_spaghetti = Spree::Product.find_by!(name: "Ruby on Rails Jr. Spaghetti")
|
8
|
+
ror_mug = Spree::Product.find_by!(name: "Ruby on Rails Mug")
|
9
|
+
ror_ringer = Spree::Product.find_by!(name: "Ruby on Rails Ringer T-Shirt")
|
10
|
+
ror_stein = Spree::Product.find_by!(name: "Ruby on Rails Stein")
|
11
|
+
spree_baseball_jersey = Spree::Product.find_by!(name: "Spree Baseball Jersey")
|
12
|
+
spree_stein = Spree::Product.find_by!(name: "Spree Stein")
|
13
|
+
spree_jr_spaghetti = Spree::Product.find_by!(name: "Spree Jr. Spaghetti")
|
14
|
+
spree_mug = Spree::Product.find_by!(name: "Spree Mug")
|
15
|
+
spree_ringer = Spree::Product.find_by!(name: "Spree Ringer T-Shirt")
|
16
|
+
spree_tote = Spree::Product.find_by!(name: "Spree Tote")
|
17
|
+
spree_bag = Spree::Product.find_by!(name: "Spree Bag")
|
18
|
+
ruby_baseball_jersey = Spree::Product.find_by!(name: "Ruby Baseball Jersey")
|
19
|
+
apache_baseball_jersey = Spree::Product.find_by!(name: "Apache Baseball Jersey")
|
20
20
|
|
21
21
|
small = Spree::OptionValue.where(name: "Small").first
|
22
22
|
medium = Spree::OptionValue.where(name: "Medium").first
|
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: 3.3.0.
|
4
|
+
version: 3.3.0.rc3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sean Schofield
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-08-03 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: 3.3.0.
|
19
|
+
version: 3.3.0.rc3
|
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: 3.3.0.
|
26
|
+
version: 3.3.0.rc3
|
27
27
|
description: Required dependency for Spree
|
28
28
|
email: sean@spreecommerce.com
|
29
29
|
executables: []
|