solidus_sample 4.3.4 → 4.4.0

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
  SHA256:
3
- metadata.gz: 532735163ad664f5f2c6f8530ddedc4c98571d02dc94a874751ee586aee1edee
4
- data.tar.gz: 24a4d5d5602e071910640fc88b76a604bd04ad655709b2d4ce299079fe7e0424
3
+ metadata.gz: c345bdffb3ee83363653ada0a07169920faed11b47f55e651cf78c9d677e1393
4
+ data.tar.gz: 39d4e99f6d244cdfea08897b0a66ab62d692bfdfd30b99ebaba0f1b1c99cc0bd
5
5
  SHA512:
6
- metadata.gz: 66c930ec27874ca425c6baa1baafc1ba56073803be6e5f4e0cba791299039828fe82239d0afe7a747cdbe104f771941a1abcfb1c15cc3f638502f37a473e98d6
7
- data.tar.gz: d96a4b958404ef6739cba6b10f52e47e855f3e70e4bdc2b770f8b1ec24650a59d68e7ca723a7e8b9028cd920653a5b9a21190d06a2275f87dc7bbaf844f5f74f
6
+ metadata.gz: 1c93cca1926f8a241e67da554cec2603654b6b68bc592081b0b1708335a5d643990dc9cc78fda87f7fc28e4fc06c6ffbba290b88cd82a66c55fb449bd6faa2af
7
+ data.tar.gz: 3c125d9dc134ed4ab213357d928529dba3b4d363e006081fbb7e5f576ac218d60752981244ac3108e91c067edb53d9db466ec12d3ea7002c1b45b393e9ff9902
data/db/samples/orders.rb CHANGED
@@ -41,8 +41,8 @@ orders[1].line_items.create!(
41
41
  )
42
42
 
43
43
  orders.each do |order|
44
- order.payments.create!(payment_method: payment_method)
45
- order.update(store: store)
44
+ order.payments.create!(payment_method:)
45
+ order.update(store:)
46
46
 
47
47
  order.next! while !order.can_complete?
48
48
  order.complete!
@@ -5,12 +5,17 @@ Spree::Sample.load_sample("products")
5
5
  size = Spree::OptionType.find_by!(presentation: "Size")
6
6
  color = Spree::OptionType.find_by!(presentation: "Color")
7
7
 
8
- solidus_cap = Spree::Product.find_by!(name: "Solidus cap")
8
+ products_with_variants = [
9
+ "Solidus cap",
10
+ "Solidus hoodie",
11
+ "Solidus t-shirt",
12
+ "Solidus mug set",
13
+ "Solidus tote",
14
+ "Solidus Water Bottle"
15
+ ]
9
16
 
10
- solidus_cap.option_types = [size, color]
11
- solidus_cap.save!
12
-
13
- solidus_hoodie = Spree::Product.find_by!(name: "Solidus hoodie")
14
-
15
- solidus_hoodie.option_types = [size, color]
16
- solidus_hoodie.save!
17
+ products_with_variants.each do |name|
18
+ product = Spree::Product.find_by!(name:)
19
+ product.option_types = [size, color]
20
+ product.save!
21
+ end
@@ -72,7 +72,7 @@ products =
72
72
  }
73
73
 
74
74
  products.each do |name, properties|
75
- product = Spree::Product.find_by(name: name)
75
+ product = Spree::Product.find_by(name:)
76
76
  properties.each do |prop_name, prop_value|
77
77
  product.set_property(prop_name, prop_value)
78
78
  end
@@ -23,8 +23,8 @@ default_attrs = {
23
23
  products = [
24
24
  {
25
25
  name: "Solidus Water Bottle",
26
- tax_category: tax_category,
27
- shipping_category: shipping_category,
26
+ tax_category:,
27
+ shipping_category:,
28
28
  price: 19.99,
29
29
  eur_price: 16,
30
30
  weight: 0.5,
@@ -34,8 +34,8 @@ products = [
34
34
  },
35
35
  {
36
36
  name: "Solidus tote",
37
- tax_category: tax_category,
38
- shipping_category: shipping_category,
37
+ tax_category:,
38
+ shipping_category:,
39
39
  price: 19.99,
40
40
  eur_price: 16,
41
41
  weight: 0.5,
@@ -45,8 +45,8 @@ products = [
45
45
  },
46
46
  {
47
47
  name: "Solidus hoodie",
48
- tax_category: tax_category,
49
- shipping_category: shipping_category,
48
+ tax_category:,
49
+ shipping_category:,
50
50
  price: 29.99,
51
51
  eur_price: 27,
52
52
  weight: 1,
@@ -56,8 +56,8 @@ products = [
56
56
  },
57
57
  {
58
58
  name: "Solidus mug set",
59
- tax_category: tax_category,
60
- shipping_category: shipping_category,
59
+ tax_category:,
60
+ shipping_category:,
61
61
  price: 19.99,
62
62
  eur_price: 16,
63
63
  weight: 0.5,
@@ -67,8 +67,8 @@ products = [
67
67
  },
68
68
  {
69
69
  name: "Solidus winter hat",
70
- tax_category: tax_category,
71
- shipping_category: shipping_category,
70
+ tax_category:,
71
+ shipping_category:,
72
72
  price: 29.99,
73
73
  eur_price: 27,
74
74
  weight: 1,
@@ -78,8 +78,8 @@ products = [
78
78
  },
79
79
  {
80
80
  name: "Solidus circle sticker",
81
- tax_category: tax_category,
82
- shipping_category: shipping_category,
81
+ tax_category:,
82
+ shipping_category:,
83
83
  price: 29.99,
84
84
  eur_price: 27,
85
85
  weight: 0.8,
@@ -89,8 +89,8 @@ products = [
89
89
  },
90
90
  {
91
91
  name: "Solidus notebook",
92
- tax_category: tax_category,
93
- shipping_category: shipping_category,
92
+ tax_category:,
93
+ shipping_category:,
94
94
  price: 26.99,
95
95
  eur_price: 23,
96
96
  weight: 0.5,
@@ -100,8 +100,8 @@ products = [
100
100
  },
101
101
  {
102
102
  name: "Solidus t-shirt",
103
- tax_category: tax_category,
104
- shipping_category: shipping_category,
103
+ tax_category:,
104
+ shipping_category:,
105
105
  price: 9.99,
106
106
  eur_price: 7,
107
107
  weight: 1,
@@ -111,8 +111,8 @@ products = [
111
111
  },
112
112
  {
113
113
  name: "Solidus long sleeve tee",
114
- tax_category: tax_category,
115
- shipping_category: shipping_category,
114
+ tax_category:,
115
+ shipping_category:,
116
116
  price: 15.99,
117
117
  eur_price: 14,
118
118
  weight: 0.5,
@@ -122,8 +122,8 @@ products = [
122
122
  },
123
123
  {
124
124
  name: "Solidus dark tee",
125
- tax_category: tax_category,
126
- shipping_category: shipping_category,
125
+ tax_category:,
126
+ shipping_category:,
127
127
  price: 15.99,
128
128
  eur_price: 14,
129
129
  weight: 0.5,
@@ -133,8 +133,8 @@ products = [
133
133
  },
134
134
  {
135
135
  name: "Solidus canvas tote bag",
136
- tax_category: tax_category,
137
- shipping_category: shipping_category,
136
+ tax_category:,
137
+ shipping_category:,
138
138
  price: 15.99,
139
139
  eur_price: 14,
140
140
  weight: 0.5,
@@ -145,8 +145,8 @@ products = [
145
145
  {
146
146
  name: "Solidus cap",
147
147
  description: "Step into style with our signature cap – a perfect blend of comfort and trendsetting flair. Crafted with care and designed for the fashion-forward, this cap adds an instant touch of cool to any outfit. Whether you're hitting the streets or simply seeking shade, our cap is your go-to accessory. Elevate your look today!",
148
- tax_category: tax_category,
149
- shipping_category: shipping_category,
148
+ tax_category:,
149
+ shipping_category:,
150
150
  price: 24,
151
151
  eur_price: 22,
152
152
  weight: 0.5,
@@ -22,20 +22,20 @@ end
22
22
 
23
23
  # Create a return authorization
24
24
  return_item = Spree::ReturnItem.new(
25
- inventory_unit: inventory_unit,
26
- preferred_reimbursement_type: preferred_reimbursement_type
25
+ inventory_unit:,
26
+ preferred_reimbursement_type:
27
27
  )
28
28
 
29
29
  order.return_authorizations.create!(
30
30
  reason: return_reason,
31
31
  return_items: [return_item],
32
- stock_location: stock_location
32
+ stock_location:
33
33
  )
34
34
 
35
35
  # Create a customer return and mark it as received
36
36
  customer_return = Spree::CustomerReturn.create!(
37
37
  return_items: [return_item],
38
- stock_location: stock_location
38
+ stock_location:
39
39
  )
40
40
  return_item.reload
41
41
  return_item.receive!
@@ -17,35 +17,35 @@ Spree::ShippingMethod.create!([
17
17
  name: "UPS Ground (USD)",
18
18
  zones: [north_america],
19
19
  calculator: Spree::Calculator::Shipping::FlatRate.create!,
20
- tax_category: tax_category,
20
+ tax_category:,
21
21
  shipping_categories: [shipping_category]
22
22
  },
23
23
  {
24
24
  name: "UPS Two Day (USD)",
25
25
  zones: [north_america],
26
26
  calculator: Spree::Calculator::Shipping::FlatRate.create!,
27
- tax_category: tax_category,
27
+ tax_category:,
28
28
  shipping_categories: [shipping_category]
29
29
  },
30
30
  {
31
31
  name: "UPS One Day (USD)",
32
32
  zones: [north_america],
33
33
  calculator: Spree::Calculator::Shipping::FlatRate.create!,
34
- tax_category: tax_category,
34
+ tax_category:,
35
35
  shipping_categories: [shipping_category]
36
36
  },
37
37
  {
38
38
  name: "UPS Ground (EU)",
39
39
  zones: [europe_vat],
40
40
  calculator: Spree::Calculator::Shipping::FlatRate.create!,
41
- tax_category: tax_category,
41
+ tax_category:,
42
42
  shipping_categories: [shipping_category]
43
43
  },
44
44
  {
45
45
  name: "UPS Ground (EUR)",
46
46
  zones: [europe_vat],
47
47
  calculator: Spree::Calculator::Shipping::FlatRate.create!,
48
- tax_category: tax_category,
48
+ tax_category:,
49
49
  shipping_categories: [shipping_category]
50
50
  }
51
51
  ])
@@ -60,7 +60,7 @@ Spree::ShippingMethod.create!([
60
60
  shipping_method = Spree::ShippingMethod.find_by!(name: shipping_method_name)
61
61
  shipping_method.calculator.preferences = {
62
62
  amount: price,
63
- currency: currency
63
+ currency:
64
64
  }
65
65
  shipping_method.calculator.save!
66
66
  shipping_method.save!
data/db/samples/stock.rb CHANGED
@@ -3,12 +3,12 @@
3
3
  Spree::Sample.load_sample("variants")
4
4
 
5
5
  country = Spree::Country.find_by(iso: 'US')
6
- location = Spree::StockLocation.first_or_create! name: 'default', address1: 'Example Street', city: 'City', zipcode: '12345', country: country, state: country.states.first
6
+ location = Spree::StockLocation.first_or_create! name: 'default', address1: 'Example Street', city: 'City', zipcode: '12345', country:, state: country.states.first
7
7
  location.active = true
8
8
  location.save!
9
9
 
10
10
  Spree::Variant.all.find_each do |variant|
11
11
  variant.stock_items.each do |stock_item|
12
- Spree::StockMovement.create(quantity: 10, stock_item: stock_item)
12
+ Spree::StockMovement.create(quantity: 10, stock_item:)
13
13
  end
14
14
  end
@@ -10,6 +10,6 @@ tax_rate = Spree::TaxRate.create(
10
10
  tax_rate.calculator = Spree::Calculator::DefaultTax.create!
11
11
  tax_rate.save!
12
12
  Spree::TaxRateTaxCategory.create!(
13
- tax_rate: tax_rate,
13
+ tax_rate:,
14
14
  tax_category: clothing
15
15
  )
data/db/samples/taxons.rb CHANGED
@@ -21,7 +21,7 @@ products = {
21
21
  }
22
22
 
23
23
  products.each do |key, name|
24
- products[key] = Spree::Product.find_by!(name: name)
24
+ products[key] = Spree::Product.find_by!(name:)
25
25
  end
26
26
 
27
27
  taxons = [
@@ -20,7 +20,7 @@ Gem::Specification.new do |s|
20
20
  f.match(%r{^(spec|script)/})
21
21
  end
22
22
 
23
- s.required_ruby_version = '>= 3.0.0'
23
+ s.required_ruby_version = '>= 3.1.0'
24
24
  s.required_rubygems_version = '>= 1.8.23'
25
25
 
26
26
  s.add_dependency 'solidus_core', s.version
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: solidus_sample
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.3.4
4
+ version: 4.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Solidus Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-04-05 00:00:00.000000000 Z
11
+ date: 2024-11-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: solidus_core
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 4.3.4
19
+ version: 4.4.0
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: 4.3.4
26
+ version: 4.4.0
27
27
  description: Sample data (including images) for use with Solidus.
28
28
  email: contact@solidus.io
29
29
  executables: []
@@ -95,14 +95,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
95
95
  requirements:
96
96
  - - ">="
97
97
  - !ruby/object:Gem::Version
98
- version: 3.0.0
98
+ version: 3.1.0
99
99
  required_rubygems_version: !ruby/object:Gem::Requirement
100
100
  requirements:
101
101
  - - ">="
102
102
  - !ruby/object:Gem::Version
103
103
  version: 1.8.23
104
104
  requirements: []
105
- rubygems_version: 3.4.19
105
+ rubygems_version: 3.5.22
106
106
  signing_key:
107
107
  specification_version: 4
108
108
  summary: Sample data (including images) for use with Solidus.