solidus_core 2.6.2 → 2.6.3

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of solidus_core might be problematic. Click here for more details.

Files changed (43) hide show
  1. checksums.yaml +4 -4
  2. data/lib/spree/core/version.rb +1 -1
  3. data/lib/spree/testing_support/factories/address_factory.rb +12 -12
  4. data/lib/spree/testing_support/factories/adjustment_factory.rb +5 -5
  5. data/lib/spree/testing_support/factories/calculator_factory.rb +5 -5
  6. data/lib/spree/testing_support/factories/country_factory.rb +1 -1
  7. data/lib/spree/testing_support/factories/credit_card_factory.rb +5 -5
  8. data/lib/spree/testing_support/factories/customer_return_factory.rb +1 -1
  9. data/lib/spree/testing_support/factories/inventory_unit_factory.rb +2 -2
  10. data/lib/spree/testing_support/factories/line_item_factory.rb +2 -2
  11. data/lib/spree/testing_support/factories/option_type_factory.rb +1 -1
  12. data/lib/spree/testing_support/factories/option_value_factory.rb +1 -1
  13. data/lib/spree/testing_support/factories/order_factory.rb +13 -13
  14. data/lib/spree/testing_support/factories/payment_factory.rb +6 -6
  15. data/lib/spree/testing_support/factories/payment_method_factory.rb +15 -15
  16. data/lib/spree/testing_support/factories/price_factory.rb +2 -2
  17. data/lib/spree/testing_support/factories/product_factory.rb +6 -6
  18. data/lib/spree/testing_support/factories/promotion_category_factory.rb +1 -1
  19. data/lib/spree/testing_support/factories/promotion_factory.rb +5 -5
  20. data/lib/spree/testing_support/factories/property_factory.rb +2 -2
  21. data/lib/spree/testing_support/factories/refund_factory.rb +2 -2
  22. data/lib/spree/testing_support/factories/reimbursement_factory.rb +1 -1
  23. data/lib/spree/testing_support/factories/reimbursement_type_factory.rb +2 -2
  24. data/lib/spree/testing_support/factories/return_authorization_factory.rb +1 -1
  25. data/lib/spree/testing_support/factories/role_factory.rb +1 -1
  26. data/lib/spree/testing_support/factories/shipment_factory.rb +4 -4
  27. data/lib/spree/testing_support/factories/shipping_method_factory.rb +6 -6
  28. data/lib/spree/testing_support/factories/state_factory.rb +2 -2
  29. data/lib/spree/testing_support/factories/stock_item_factory.rb +1 -1
  30. data/lib/spree/testing_support/factories/stock_location_factory.rb +8 -8
  31. data/lib/spree/testing_support/factories/stock_movement_factory.rb +3 -3
  32. data/lib/spree/testing_support/factories/store_credit_category_factory.rb +1 -1
  33. data/lib/spree/testing_support/factories/store_credit_factory.rb +2 -2
  34. data/lib/spree/testing_support/factories/store_credit_update_reason_factory.rb +1 -1
  35. data/lib/spree/testing_support/factories/store_factory.rb +1 -1
  36. data/lib/spree/testing_support/factories/tax_rate_factory.rb +1 -1
  37. data/lib/spree/testing_support/factories/taxon_factory.rb +2 -2
  38. data/lib/spree/testing_support/factories/taxonomy_factory.rb +1 -1
  39. data/lib/spree/testing_support/factories/user_factory.rb +1 -1
  40. data/lib/spree/testing_support/factories/variant_factory.rb +7 -7
  41. data/lib/spree/testing_support/factories/variant_property_rule_factory.rb +1 -1
  42. data/lib/spree/testing_support/factories/zone_factory.rb +1 -1
  43. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cf28b5ea54158e822d31a3a6ba042b80f75f8ff510af541778484ade6fd09338
4
- data.tar.gz: b8f3bd12e1e28e627ae8a5539310fa5751dfd9cbf7832dd7c4c22172dccab7da
3
+ metadata.gz: 6cd2f50ef956981c4eea96a103f8b55dacbd4346154398d182b666fa8d9bc481
4
+ data.tar.gz: 68e8a3ae5c6ae357056baa0b77c50d7908ee797e4d3f85536bcae32caf5b10d7
5
5
  SHA512:
6
- metadata.gz: efb8385b16798e48b89107236ec196a8691238d9f4cc52730f5b95950ede78f8dbb5bb3971576e8cb623ba9382315ed62838a6f01a706ad9169bee0fe626e532
7
- data.tar.gz: e38f0cef8b418e6c7eb84b4ed3ea2d1413de7c1e8d6a59b11e3263692b4cea472b542a45dddfa0727127dd03443b649b6ff3ac492e45a1a8bd682bc53a1e2e09
6
+ metadata.gz: 538ddcf9279c83fd9048f7a773a64b24229beff0e40dd37d247e80b7299cbee41c45a9ce94bf106cfa3230af729f597a1d31272fd4f06b2376ec121b64253885
7
+ data.tar.gz: c1acc659d80a20a6caa9e8eb4b32b5dc16be15c7c8cc76a3d216efc06440dd3e06cac13a3cce888836bb5481a5f84a1d449f8f3a3d425b9d92a335ef2ef5bfbd
@@ -2,7 +2,7 @@
2
2
 
3
3
  module Spree
4
4
  def self.solidus_version
5
- "2.6.2"
5
+ "2.6.3"
6
6
  end
7
7
 
8
8
  def self.solidus_gem_version
@@ -7,19 +7,19 @@ FactoryBot.define do
7
7
  factory :address, class: 'Spree::Address' do
8
8
  transient do
9
9
  # There's `Spree::Address#country_iso=`, prohibiting me from using `country_iso` here
10
- country_iso_code 'US'
11
- state_code 'AL'
10
+ country_iso_code { 'US' }
11
+ state_code { 'AL' }
12
12
  end
13
13
 
14
- firstname 'John'
15
- lastname nil
16
- company 'Company'
17
- address1 '10 Lovely Street'
18
- address2 'Northwest'
19
- city 'Herndon'
14
+ firstname { 'John' }
15
+ lastname { nil }
16
+ company { 'Company' }
17
+ address1 { '10 Lovely Street' }
18
+ address2 { 'Northwest' }
19
+ city { 'Herndon' }
20
20
  sequence(:zipcode, 10001) { |i| i.to_s }
21
- phone '555-555-0199'
22
- alternative_phone '555-555-0199'
21
+ phone { '555-555-0199' }
22
+ alternative_phone { '555-555-0199' }
23
23
 
24
24
  state do |address|
25
25
  Spree::State.joins(:country).where('spree_countries.iso = (?)', country_iso_code).find_by(abbr: state_code) ||
@@ -36,10 +36,10 @@ FactoryBot.define do
36
36
  end
37
37
 
38
38
  factory :ship_address, parent: :address do
39
- address1 'A Different Road'
39
+ address1 { 'A Different Road' }
40
40
  end
41
41
 
42
42
  factory :bill_address, parent: :address do
43
- address1 'PO Box 1337'
43
+ address1 { 'PO Box 1337' }
44
44
  end
45
45
  end
@@ -10,10 +10,10 @@ FactoryBot.define do
10
10
  factory :adjustment, class: 'Spree::Adjustment' do
11
11
  order
12
12
  adjustable { order }
13
- amount 100.0
14
- label 'Shipping'
13
+ amount { 100.0 }
14
+ label { 'Shipping' }
15
15
  association(:source, factory: :tax_rate)
16
- eligible true
16
+ eligible { true }
17
17
 
18
18
  after(:build) do |adjustment|
19
19
  adjustments = adjustment.adjustable.adjustments
@@ -25,8 +25,8 @@ FactoryBot.define do
25
25
  factory :tax_adjustment, class: 'Spree::Adjustment' do
26
26
  order { adjustable.order }
27
27
  association(:adjustable, factory: :line_item)
28
- amount 10.0
29
- label 'VAT 5%'
28
+ amount { 10.0 }
29
+ label { 'VAT 5%' }
30
30
 
31
31
  after(:create) do |adjustment|
32
32
  # Set correct tax category, so that adjustment amount is not 0
@@ -2,25 +2,25 @@
2
2
 
3
3
  FactoryBot.define do
4
4
  factory :calculator, aliases: [:flat_rate_calculator], class: 'Spree::Calculator::FlatRate' do
5
- preferred_amount 10.0
5
+ preferred_amount { 10.0 }
6
6
  end
7
7
 
8
8
  factory :no_amount_calculator, class: 'Spree::Calculator::FlatRate' do
9
- preferred_amount 0
9
+ preferred_amount { 0 }
10
10
  end
11
11
 
12
12
  factory :default_tax_calculator, class: 'Spree::Calculator::DefaultTax' do
13
13
  end
14
14
 
15
15
  factory :shipping_calculator, class: 'Spree::Calculator::Shipping::FlatRate' do
16
- preferred_amount 10.0
16
+ preferred_amount { 10.0 }
17
17
  end
18
18
 
19
19
  factory :shipping_no_amount_calculator, class: 'Spree::Calculator::Shipping::FlatRate' do
20
- preferred_amount 0
20
+ preferred_amount { 0 }
21
21
  end
22
22
 
23
23
  factory :percent_on_item_calculator, class: 'Spree::Calculator::PercentOnLineItem' do
24
- preferred_percent 10
24
+ preferred_percent { 10 }
25
25
  end
26
26
  end
@@ -4,7 +4,7 @@ require 'carmen'
4
4
 
5
5
  FactoryBot.define do
6
6
  factory :country, class: 'Spree::Country' do
7
- iso 'US'
7
+ iso { 'US' }
8
8
 
9
9
  transient do
10
10
  carmen_country { Carmen::Country.coded(iso) || fail("Unknown country iso code: #{iso.inspect}") }
@@ -2,16 +2,16 @@
2
2
 
3
3
  FactoryBot.define do
4
4
  factory :credit_card, class: 'Spree::CreditCard' do
5
- verification_value 123
6
- month 12
5
+ verification_value { 123 }
6
+ month { 12 }
7
7
  year { 1.year.from_now.year }
8
- number '4111111111111111'
9
- name 'Spree Commerce'
8
+ number { '4111111111111111' }
9
+ name { 'Spree Commerce' }
10
10
  association(:payment_method, factory: :credit_card_payment_method)
11
11
  association(:address)
12
12
 
13
13
  trait :failing do
14
- number "0000000000000000"
14
+ number { "0000000000000000" }
15
15
  end
16
16
  end
17
17
  end
@@ -9,7 +9,7 @@ FactoryBot.define do
9
9
  association(:stock_location, factory: :stock_location)
10
10
 
11
11
  transient do
12
- line_items_count 1
12
+ line_items_count { 1 }
13
13
  return_items_count { line_items_count }
14
14
  shipped_order { create :shipped_order, line_items_count: line_items_count }
15
15
  return_authorization { create :return_authorization, order: shipped_order }
@@ -8,7 +8,7 @@ require 'spree/testing_support/factories/shipment_factory'
8
8
  FactoryBot.define do
9
9
  factory :inventory_unit, class: 'Spree::InventoryUnit' do
10
10
  transient do
11
- order nil
11
+ order { nil }
12
12
  end
13
13
 
14
14
  variant
@@ -19,7 +19,7 @@ FactoryBot.define do
19
19
  build(:line_item, variant: variant)
20
20
  end
21
21
  end
22
- state 'on_hand'
22
+ state { 'on_hand' }
23
23
  shipment { build(:shipment, state: 'pending', order: line_item.order) }
24
24
  # return_authorization
25
25
  end
@@ -5,11 +5,11 @@ require 'spree/testing_support/factories/product_factory'
5
5
 
6
6
  FactoryBot.define do
7
7
  factory :line_item, class: 'Spree::LineItem' do
8
- quantity 1
8
+ quantity { 1 }
9
9
  price { BigDecimal('10.00') }
10
10
  order
11
11
  transient do
12
- product nil
12
+ product { nil }
13
13
  end
14
14
  variant do
15
15
  (product || create(:product)).master
@@ -3,6 +3,6 @@
3
3
  FactoryBot.define do
4
4
  factory :option_type, class: 'Spree::OptionType' do
5
5
  sequence(:name) { |n| "foo-size-#{n}" }
6
- presentation 'Size'
6
+ presentation { 'Size' }
7
7
  end
8
8
  end
@@ -4,7 +4,7 @@ FactoryBot.define do
4
4
  factory :option_value, class: 'Spree::OptionValue' do
5
5
  sequence(:name) { |n| "Size-#{n}" }
6
6
 
7
- presentation 'S'
7
+ presentation { 'S' }
8
8
  option_type
9
9
  end
10
10
  end
@@ -12,7 +12,7 @@ FactoryBot.define do
12
12
  user
13
13
  bill_address
14
14
  ship_address
15
- completed_at nil
15
+ completed_at { nil }
16
16
  email { user.try(:email) }
17
17
  store
18
18
 
@@ -40,10 +40,10 @@ FactoryBot.define do
40
40
  ship_address
41
41
 
42
42
  transient do
43
- line_items_count 1
43
+ line_items_count { 1 }
44
44
  line_items_attributes { [{}] * line_items_count }
45
- shipment_cost 100
46
- shipping_method nil
45
+ shipment_cost { 100 }
46
+ shipping_method { nil }
47
47
  stock_location { create(:stock_location) }
48
48
  end
49
49
 
@@ -64,7 +64,7 @@ FactoryBot.define do
64
64
 
65
65
  factory :completed_order_with_promotion do
66
66
  transient do
67
- promotion nil
67
+ promotion { nil }
68
68
  end
69
69
 
70
70
  after(:create) do |order, evaluator|
@@ -81,11 +81,11 @@ FactoryBot.define do
81
81
  end
82
82
 
83
83
  factory :order_ready_to_complete do
84
- state 'confirm'
85
- payment_state 'checkout'
84
+ state { 'confirm' }
85
+ payment_state { 'checkout' }
86
86
 
87
87
  transient do
88
- payment_type :credit_card_payment
88
+ payment_type { :credit_card_payment }
89
89
  end
90
90
 
91
91
  after(:create) do |order, evaluator|
@@ -100,7 +100,7 @@ FactoryBot.define do
100
100
  end
101
101
 
102
102
  factory :completed_order_with_totals do
103
- state 'complete'
103
+ state { 'complete' }
104
104
 
105
105
  after(:create) do |order|
106
106
  order.shipments.each do |shipment|
@@ -116,11 +116,11 @@ FactoryBot.define do
116
116
  end
117
117
 
118
118
  factory :order_ready_to_ship do
119
- payment_state 'paid'
120
- shipment_state 'ready'
119
+ payment_state { 'paid' }
120
+ shipment_state { 'ready' }
121
121
 
122
122
  transient do
123
- payment_type :credit_card_payment
123
+ payment_type { :credit_card_payment }
124
124
  end
125
125
 
126
126
  after(:create) do |order, evaluator|
@@ -133,7 +133,7 @@ FactoryBot.define do
133
133
 
134
134
  factory :shipped_order do
135
135
  transient do
136
- with_cartons true
136
+ with_cartons { true }
137
137
  end
138
138
  after(:create) do |order, evaluator|
139
139
  order.shipments.each do |shipment|
@@ -10,26 +10,26 @@ FactoryBot.define do
10
10
  association(:payment_method, factory: :credit_card_payment_method)
11
11
  source { create(:credit_card, user: order.user, address: order.bill_address) }
12
12
  order
13
- state 'checkout'
14
- response_code '12345'
13
+ state { 'checkout' }
14
+ response_code { '12345' }
15
15
 
16
16
  trait :completed do
17
- state 'completed'
17
+ state { 'completed' }
18
18
  end
19
19
 
20
20
  trait :failing do
21
- response_code '00000'
21
+ response_code { '00000' }
22
22
  association(:source, :failing, { factory: :credit_card })
23
23
  end
24
24
 
25
25
  factory :payment_with_refund do
26
26
  transient do
27
- refund_amount 5
27
+ refund_amount { 5 }
28
28
  end
29
29
 
30
30
  amount { refund_amount }
31
31
 
32
- state 'completed'
32
+ state { 'completed' }
33
33
 
34
34
  refunds { build_list :refund, 1, amount: refund_amount }
35
35
  end
@@ -2,31 +2,31 @@
2
2
 
3
3
  FactoryBot.define do
4
4
  factory :payment_method, aliases: [:credit_card_payment_method], class: 'Spree::PaymentMethod::BogusCreditCard' do
5
- name 'Credit Card'
6
- available_to_admin true
7
- available_to_users true
5
+ name { 'Credit Card' }
6
+ available_to_admin { true }
7
+ available_to_users { true }
8
8
  end
9
9
 
10
10
  factory :check_payment_method, class: 'Spree::PaymentMethod::Check' do
11
- name 'Check'
12
- available_to_admin true
13
- available_to_users true
11
+ name { 'Check' }
12
+ available_to_admin { true }
13
+ available_to_users { true }
14
14
  end
15
15
 
16
16
  # authorize.net was moved to spree_gateway.
17
17
  # Leaving this factory in place with bogus in case anyone is using it.
18
18
  factory :simple_credit_card_payment_method, class: 'Spree::PaymentMethod::SimpleBogusCreditCard' do
19
- name 'Credit Card'
20
- available_to_admin true
21
- available_to_users true
19
+ name { 'Credit Card' }
20
+ available_to_admin { true }
21
+ available_to_users { true }
22
22
  end
23
23
 
24
24
  factory :store_credit_payment_method, class: 'Spree::PaymentMethod::StoreCredit' do
25
- name "Store Credit"
26
- description "Store Credit"
27
- active true
28
- available_to_admin false
29
- available_to_users false
30
- auto_capture true
25
+ name { "Store Credit" }
26
+ description { "Store Credit" }
27
+ active { true }
28
+ available_to_admin { false }
29
+ available_to_users { false }
30
+ auto_capture { true }
31
31
  end
32
32
  end
@@ -5,7 +5,7 @@ require 'spree/testing_support/factories/variant_factory'
5
5
  FactoryBot.define do
6
6
  factory :price, class: 'Spree::Price' do
7
7
  variant
8
- amount 19.99
9
- currency 'USD'
8
+ amount { 19.99 }
9
+ currency { 'USD' }
10
10
  end
11
11
  end
@@ -9,20 +9,20 @@ require 'spree/testing_support/factories/product_option_type_factory'
9
9
  FactoryBot.define do
10
10
  factory :base_product, class: 'Spree::Product' do
11
11
  sequence(:name) { |n| "Product ##{n} - #{Kernel.rand(9999)}" }
12
- description "As seen on TV!"
13
- price 19.99
14
- cost_price 17.00
12
+ description { "As seen on TV!" }
13
+ price { 19.99 }
14
+ cost_price { 17.00 }
15
15
  sku { generate(:sku) }
16
16
  available_on { 1.year.ago }
17
- deleted_at nil
17
+ deleted_at { nil }
18
18
  shipping_category { |r| Spree::ShippingCategory.first || r.association(:shipping_category) }
19
19
 
20
20
  # ensure stock item will be created for this products master
21
21
  before(:create) { create(:stock_location) if Spree::StockLocation.count == 0 }
22
22
 
23
23
  factory :custom_product do
24
- name 'Custom Product'
25
- price 17.99
24
+ name { 'Custom Product' }
25
+ price { 17.99 }
26
26
 
27
27
  tax_category { |r| Spree::TaxCategory.first || r.association(:tax_category) }
28
28
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  FactoryBot.define do
4
4
  factory :promotion_category, class: 'Spree::PromotionCategory' do
5
- name 'Promotion Category'
5
+ name { 'Promotion Category' }
6
6
  end
7
7
  end
@@ -5,10 +5,10 @@ require 'spree/testing_support/factories/variant_factory'
5
5
 
6
6
  FactoryBot.define do
7
7
  factory :promotion, class: 'Spree::Promotion' do
8
- name 'Promo'
8
+ name { 'Promo' }
9
9
 
10
10
  transient do
11
- code nil
11
+ code { nil }
12
12
  end
13
13
  before(:create) do |promotion, evaluator|
14
14
  if evaluator.code
@@ -18,7 +18,7 @@ FactoryBot.define do
18
18
 
19
19
  trait :with_line_item_adjustment do
20
20
  transient do
21
- adjustment_rate 10
21
+ adjustment_rate { 10 }
22
22
  end
23
23
 
24
24
  after(:create) do |promotion, evaluator|
@@ -31,7 +31,7 @@ FactoryBot.define do
31
31
 
32
32
  trait :with_order_adjustment do
33
33
  transient do
34
- weighted_order_adjustment_amount 10
34
+ weighted_order_adjustment_amount { 10 }
35
35
  end
36
36
 
37
37
  after(:create) do |promotion, evaluator|
@@ -46,7 +46,7 @@ FactoryBot.define do
46
46
 
47
47
  trait :with_item_total_rule do
48
48
  transient do
49
- item_total_threshold_amount 10
49
+ item_total_threshold_amount { 10 }
50
50
  end
51
51
 
52
52
  after(:create) do |promotion, evaluator|
@@ -2,7 +2,7 @@
2
2
 
3
3
  FactoryBot.define do
4
4
  factory :property, class: 'Spree::Property' do
5
- name 'baseball_cap_color'
6
- presentation 'cap color'
5
+ name { 'baseball_cap_color' }
6
+ presentation { 'cap color' }
7
7
  end
8
8
  end
@@ -8,10 +8,10 @@ FactoryBot.define do
8
8
 
9
9
  factory :refund, class: 'Spree::Refund' do
10
10
  transient do
11
- payment_amount 100
11
+ payment_amount { 100 }
12
12
  end
13
13
 
14
- amount 100.00
14
+ amount { 100.00 }
15
15
  transaction_id { generate(:refund_transaction_id) }
16
16
  payment do
17
17
  association(:payment, state: 'completed', amount: payment_amount)
@@ -5,7 +5,7 @@ require 'spree/testing_support/factories/customer_return_factory'
5
5
  FactoryBot.define do
6
6
  factory :reimbursement, class: 'Spree::Reimbursement' do
7
7
  transient do
8
- return_items_count 1
8
+ return_items_count { 1 }
9
9
  end
10
10
 
11
11
  customer_return { create(:customer_return_with_accepted_items, line_items_count: return_items_count) }
@@ -3,7 +3,7 @@
3
3
  FactoryBot.define do
4
4
  factory :reimbursement_type, class: 'Spree::ReimbursementType' do
5
5
  sequence(:name) { |n| "Reimbursement Type #{n}" }
6
- active true
7
- mutable true
6
+ active { true }
7
+ mutable { true }
8
8
  end
9
9
  end
@@ -9,7 +9,7 @@ FactoryBot.define do
9
9
  association(:order, factory: :shipped_order)
10
10
  association(:stock_location, factory: :stock_location)
11
11
  association(:reason, factory: :return_reason)
12
- memo 'Items were broken'
12
+ memo { 'Items were broken' }
13
13
  end
14
14
 
15
15
  factory :new_return_authorization, class: 'Spree::ReturnAuthorization' do
@@ -5,7 +5,7 @@ FactoryBot.define do
5
5
  sequence(:name) { |n| "Role ##{n}" }
6
6
 
7
7
  factory :admin_role do
8
- name 'admin'
8
+ name { 'admin' }
9
9
  end
10
10
  end
11
11
  end
@@ -6,14 +6,14 @@ require 'spree/testing_support/factories/shipping_method_factory'
6
6
 
7
7
  FactoryBot.define do
8
8
  factory :shipment, class: 'Spree::Shipment' do
9
- tracking 'U10000'
10
- cost 100.00
11
- state 'pending'
9
+ tracking { 'U10000' }
10
+ cost { 100.00 }
11
+ state { 'pending' }
12
12
  order
13
13
  stock_location
14
14
 
15
15
  transient do
16
- shipping_method nil
16
+ shipping_method { nil }
17
17
  end
18
18
 
19
19
  after(:create) do |shipment, evaluator|
@@ -16,15 +16,15 @@ FactoryBot.define do
16
16
  [Spree::Zone.find_by(name: 'GlobalZone') || FactoryBot.create(:global_zone)]
17
17
  end
18
18
 
19
- name 'UPS Ground'
20
- code 'UPS_GROUND'
21
- carrier 'UPS'
22
- service_level '1DAYGROUND'
19
+ name { 'UPS Ground' }
20
+ code { 'UPS_GROUND' }
21
+ carrier { 'UPS' }
22
+ service_level { '1DAYGROUND' }
23
23
 
24
24
  calculator { |s| s.association(:shipping_calculator, strategy: :build, preferred_amount: s.cost, preferred_currency: s.currency) }
25
25
 
26
26
  transient do
27
- cost 10.0
27
+ cost { 10.0 }
28
28
  currency { Spree::Config[:currency] }
29
29
  end
30
30
 
@@ -35,7 +35,7 @@ FactoryBot.define do
35
35
  end
36
36
 
37
37
  factory :free_shipping_method, class: 'Spree::ShippingMethod' do
38
- cost nil
38
+ cost { nil }
39
39
  association(:calculator, factory: :shipping_no_amount_calculator, strategy: :build)
40
40
  end
41
41
  end
@@ -5,8 +5,8 @@ require 'spree/testing_support/factories/country_factory'
5
5
  FactoryBot.define do
6
6
  factory :state, class: 'Spree::State' do
7
7
  transient do
8
- country_iso 'US'
9
- state_code 'AL'
8
+ country_iso { 'US' }
9
+ state_code { 'AL' }
10
10
 
11
11
  carmen_subregion do
12
12
  carmen_country = Carmen::Country.coded(country.iso)
@@ -5,7 +5,7 @@ require 'spree/testing_support/factories/variant_factory'
5
5
 
6
6
  FactoryBot.define do
7
7
  factory :stock_item, class: 'Spree::StockItem' do
8
- backorderable true
8
+ backorderable { true }
9
9
  association :stock_location, factory: :stock_location_without_variant_propagation
10
10
  variant
11
11
 
@@ -6,13 +6,13 @@ require 'spree/testing_support/factories/product_factory'
6
6
 
7
7
  FactoryBot.define do
8
8
  factory :stock_location, class: 'Spree::StockLocation' do
9
- name 'NY Warehouse'
10
- address1 '1600 Pennsylvania Ave NW'
11
- city 'Washington'
12
- zipcode '20500'
13
- phone '(202) 456-1111'
14
- active true
15
- backorderable_default true
9
+ name { 'NY Warehouse' }
10
+ address1 { '1600 Pennsylvania Ave NW' }
11
+ city { 'Washington' }
12
+ zipcode { '20500' }
13
+ phone { '(202) 456-1111' }
14
+ active { true }
15
+ backorderable_default { true }
16
16
 
17
17
  country { |stock_location| Spree::Country.first || stock_location.association(:country) }
18
18
  state do |stock_location|
@@ -23,7 +23,7 @@ FactoryBot.define do
23
23
  end
24
24
 
25
25
  factory :stock_location_without_variant_propagation do
26
- propagate_all_variants false
26
+ propagate_all_variants { false }
27
27
  end
28
28
 
29
29
  factory :stock_location_with_items do
@@ -4,12 +4,12 @@ require 'spree/testing_support/factories/stock_item_factory'
4
4
 
5
5
  FactoryBot.define do
6
6
  factory :stock_movement, class: 'Spree::StockMovement' do
7
- quantity 1
8
- action 'sold'
7
+ quantity { 1 }
8
+ action { 'sold' }
9
9
  stock_item
10
10
  end
11
11
 
12
12
  trait :received do
13
- action 'received'
13
+ action { 'received' }
14
14
  end
15
15
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  FactoryBot.define do
4
4
  factory :store_credit_category, class: 'Spree::StoreCreditCategory' do
5
- name "Exchange"
5
+ name { "Exchange" }
6
6
  end
7
7
  end
@@ -9,8 +9,8 @@ FactoryBot.define do
9
9
  user
10
10
  association :created_by, factory: :user
11
11
  association :category, factory: :store_credit_category
12
- amount 150.00
13
- currency "USD"
12
+ amount { 150.00 }
13
+ currency { "USD" }
14
14
  association :credit_type, factory: :primary_credit_type
15
15
  end
16
16
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  FactoryBot.define do
4
4
  factory :store_credit_update_reason, class: 'Spree::StoreCreditUpdateReason' do
5
- name "Input error"
5
+ name { "Input error" }
6
6
  end
7
7
  end
@@ -5,6 +5,6 @@ FactoryBot.define do
5
5
  sequence(:code) { |i| "spree_#{i}" }
6
6
  sequence(:name) { |i| "Spree Test Store #{i}" }
7
7
  sequence(:url) { |i| "www.example#{i}.com" }
8
- mail_from_address 'spree@example.org'
8
+ mail_from_address { 'spree@example.org' }
9
9
  end
10
10
  end
@@ -7,7 +7,7 @@ require 'spree/testing_support/factories/zone_factory'
7
7
  FactoryBot.define do
8
8
  factory :tax_rate, class: 'Spree::TaxRate' do
9
9
  zone
10
- amount 0.1
10
+ amount { 0.1 }
11
11
  association(:calculator, factory: :default_tax_calculator)
12
12
  tax_categories { [build(:tax_category)] }
13
13
  end
@@ -4,8 +4,8 @@ require 'spree/testing_support/factories/taxonomy_factory'
4
4
 
5
5
  FactoryBot.define do
6
6
  factory :taxon, class: 'Spree::Taxon' do
7
- name 'Ruby on Rails'
7
+ name { 'Ruby on Rails' }
8
8
  taxonomy
9
- parent_id nil
9
+ parent_id { nil }
10
10
  end
11
11
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  FactoryBot.define do
4
4
  factory :taxonomy, class: 'Spree::Taxonomy' do
5
- name 'Brand'
5
+ name { 'Brand' }
6
6
  end
7
7
  end
@@ -7,7 +7,7 @@ require 'spree/testing_support/factories/address_factory'
7
7
  FactoryBot.define do
8
8
  factory :user, class: Spree::UserClassHandle.new do
9
9
  email { generate(:email) }
10
- password 'secret'
10
+ password { 'secret' }
11
11
  password_confirmation { password }
12
12
 
13
13
  trait :with_api_key do
@@ -9,11 +9,11 @@ FactoryBot.define do
9
9
  sequence(:random_float) { BigDecimal("#{rand(200)}.#{rand(99)}") }
10
10
 
11
11
  factory :base_variant, class: 'Spree::Variant' do
12
- price 19.99
13
- cost_price 17.00
12
+ price { 19.99 }
13
+ cost_price { 17.00 }
14
14
  sku { generate(:sku) }
15
- is_master 0
16
- track_inventory true
15
+ is_master { 0 }
16
+ track_inventory { true }
17
17
 
18
18
  product { |p| p.association(:base_product) }
19
19
 
@@ -27,16 +27,16 @@ FactoryBot.define do
27
27
  end
28
28
 
29
29
  factory :master_variant do
30
- is_master 1
30
+ is_master { 1 }
31
31
  before(:create){ |variant| variant.product.master = variant }
32
32
  product { build(:base_product) }
33
33
  end
34
34
 
35
35
  factory :on_demand_variant do
36
- track_inventory false
36
+ track_inventory { false }
37
37
 
38
38
  factory :on_demand_master_variant do
39
- is_master 1
39
+ is_master { 1 }
40
40
  end
41
41
  end
42
42
  end
@@ -11,7 +11,7 @@ FactoryBot.define do
11
11
  transient do
12
12
  property { create(:property) }
13
13
  option_value { create(:option_value) }
14
- property_value nil
14
+ property_value { nil }
15
15
  end
16
16
 
17
17
  after(:build) do |rule, evaluator|
@@ -5,7 +5,7 @@ require 'spree/testing_support/factories/country_factory'
5
5
 
6
6
  FactoryBot.define do
7
7
  factory :global_zone, class: 'Spree::Zone' do
8
- name 'GlobalZone'
8
+ name { 'GlobalZone' }
9
9
  zone_members do |proxy|
10
10
  zone = proxy.instance_eval { @instance }
11
11
  Spree::Country.all.map do |c|
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: solidus_core
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.6.2
4
+ version: 2.6.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Solidus Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-12-07 00:00:00.000000000 Z
11
+ date: 2019-02-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: actionmailer