solidus_brazilian_adaptations 1.1.10 → 1.3.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: 392d0ff386e5c45317017c0c4c1aa2001f95641a04ffb35cc23be74fc60ae5d6
4
- data.tar.gz: 3ab8e39838fa8d3c504d5b6a0ac84b75d758ce45ba098130a9abd5fba39d98a2
3
+ metadata.gz: 453e94718e7a94f84e40cb4829161fb5530085802007838a2d39a3cdb2e78c47
4
+ data.tar.gz: e03636724d9ebfa1d22a55d9da7fc7c50b7258638d134b764553c80b57dcc12b
5
5
  SHA512:
6
- metadata.gz: f229bd56cd99a562f31e32ab540544fe42ecf1a210c40e2bb39dac9b4e31f67c7517d8ec6ad83e74da46593f8109b3cd6ecf718f130d993f8e08681d9465f450
7
- data.tar.gz: 472309ddfca7a56b2734cf37eb016d193e9c37d90e404793a2f48ad10dbff070966fa2f7a586bcf7eec2fd521a1fdf2efbd363e8e63bb7d4b1fcd40153013f0b
6
+ metadata.gz: 4c2d5eb85fbb3ed3ac7ff71484f9e7fc576adc6ceaff3850385041ed9753b1de7ac3764ba2bd1a2b09f194ab3c93f3b8291cca2535259d246c97cb1f57a118b9
7
+ data.tar.gz: 585ad2edd189988609c217cc03da62e3239e8816ab56bb14846157aeec65d994973dff9d263b8c81546d643d2955144a1e2983d5ee8f697efe9b45d14bd929a6
@@ -0,0 +1,6 @@
1
+ class ChangeTypeMinAndMaxDeliveryTime < ActiveRecord::Migration[7.1]
2
+ def change
3
+ change_column :spree_shipping_rates, :min_delivery_time, :datetime
4
+ change_column :spree_shipping_rates, :max_delivery_time, :datetime
5
+ end
6
+ end
@@ -0,0 +1,6 @@
1
+ class AddExpiresInAndEstimateProseToRates < ActiveRecord::Migration[7.1]
2
+ def change
3
+ add_column :spree_shipping_rates, :estimate_prose, :text
4
+ add_column :spree_shipping_rates, :expires_in, :datetime
5
+ end
6
+ end
data/db/seeds.rb CHANGED
@@ -2,8 +2,6 @@ require "thor"
2
2
  shell = Thor::Base.shell.new
3
3
 
4
4
  %w[
5
- stores
6
- store_credit
7
5
  countries
8
6
  return_reasons
9
7
  states
@@ -1,4 +1,7 @@
1
- Spree::PaymentMethod::Check.create!(
2
- name: "Boleto",
3
- available_to_users: true
4
- )
1
+ if Rails.env.development?
2
+ Spree::PaymentMethod::Check.create!(
3
+ name: "TecPay",
4
+ available_to_users: true,
5
+ stores: [Spree::Store.default]
6
+ )
7
+ end
@@ -1,3 +1,3 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- Spree::RefundReason.find_or_create_by!(name: "Return processing", mutable: false)
3
+ Spree::RefundReason.find_or_create_by!(name: "Devolução em processo", mutable: false)
@@ -1,11 +1,11 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- Spree::ReturnReason.find_or_create_by(name: "Better price available")
4
- Spree::ReturnReason.find_or_create_by(name: "Missed estimated delivery date")
5
- Spree::ReturnReason.find_or_create_by(name: "Missing parts or accessories")
6
- Spree::ReturnReason.find_or_create_by(name: "Damaged/Defective")
7
- Spree::ReturnReason.find_or_create_by(name: "Different from what was ordered")
8
- Spree::ReturnReason.find_or_create_by(name: "Different from description")
9
- Spree::ReturnReason.find_or_create_by(name: "No longer needed/wanted")
10
- Spree::ReturnReason.find_or_create_by(name: "Accidental order")
11
- Spree::ReturnReason.find_or_create_by(name: "Unauthorized purchase")
3
+ Spree::ReturnReason.find_or_create_by(name: "Melhor preço disponível")
4
+ Spree::ReturnReason.find_or_create_by(name: "Atraso na entrega")
5
+ Spree::ReturnReason.find_or_create_by(name: "Faltando partes/peças")
6
+ Spree::ReturnReason.find_or_create_by(name: "Danificado/Com defeito")
7
+ Spree::ReturnReason.find_or_create_by(name: "Diferente do que foi comprado")
8
+ Spree::ReturnReason.find_or_create_by(name: "Diferente da descrição")
9
+ Spree::ReturnReason.find_or_create_by(name: "Não mais interesse")
10
+ Spree::ReturnReason.find_or_create_by(name: "Compra acidental")
11
+ Spree::ReturnReason.find_or_create_by(name: "Compra sem autorização")
@@ -1,17 +1,20 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- category = Spree::ShippingCategory.find_or_create_by(name: "Default")
3
+ category = Spree::ShippingCategory.find_or_create_by(name: "Padrão")
4
4
  todo_brasil = Spree::Zone.find_or_create_by!(name: "todo_brasil", description: "Todo Brasil")
5
5
  todo_brasil.zone_members.find_or_create_by!(zoneable: Spree::Country.find_by!(iso: "BR"))
6
6
 
7
- Spree::ShippingMethod.create!(
8
- name: "Coruja",
9
- available_to_all: true,
10
- code: "CRJ",
11
- shipping_categories: [category],
12
- calculator: Spree::Calculator::Shipping::FlatRate.create!(
13
- preferred_amount: 20.0,
14
- preferred_currency: "BRL"
15
- ),
16
- zones: [todo_brasil]
17
- )
7
+ if Rails.env.development?
8
+ Spree::ShippingMethod.create!(
9
+ name: "Coruja",
10
+ available_to_all: true,
11
+ code: "CRJ",
12
+ shipping_categories: [category],
13
+ calculator: Spree::Calculator::Shipping::FlatRate.create!(
14
+ preferred_amount: 20.0,
15
+ preferred_currency: "BRL"
16
+ ),
17
+ zones: [todo_brasil],
18
+ stores: [Spree::Store.default]
19
+ )
20
+ end
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  Spree::StockLocation.create_with(backorderable_default: false)
4
- .find_or_create_by!(name: "default")
4
+ .find_or_create_by!(name: "Padrão")
@@ -1,5 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ # Removemos do array do seeds por enquanto
3
4
  Spree::PaymentMethod.create_with(
4
5
  name: "Store Credit",
5
6
  description: "Store credit",
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SolidusBrazilianAdaptations
4
- VERSION = "1.1.10"
4
+ VERSION = "1.3.0"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: solidus_brazilian_adaptations
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.10
4
+ version: 1.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - ulysses-bull
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-06-12 00:00:00.000000000 Z
11
+ date: 2024-10-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: solidus_core
@@ -160,6 +160,8 @@ files:
160
160
  - db/migrate/20230911133000_add_tax_id_to_spree_orders.rb
161
161
  - db/migrate/20230911133157_add_number_district_to_addresses.rb
162
162
  - db/migrate/20231107142354_add_delivery_time_to_spree_shipping_rate.rb
163
+ - db/migrate/20241010184807_change_type_min_and_max_delivery_time.rb
164
+ - db/migrate/20241010185247_add_expires_in_and_estimate_prose_to_rates.rb
163
165
  - db/seeds.rb
164
166
  - db/spree_br/countries.rb
165
167
  - db/spree_br/payment.rb
@@ -170,7 +172,6 @@ files:
170
172
  - db/spree_br/states.rb
171
173
  - db/spree_br/stock_locations.rb
172
174
  - db/spree_br/store_credit.rb
173
- - db/spree_br/stores.rb
174
175
  - lib/generators/solidus_brazilian_adaptations/install/install_generator.rb
175
176
  - lib/generators/solidus_brazilian_adaptations/install/templates/config/locales/pt-BR.yml
176
177
  - lib/generators/solidus_brazilian_adaptations/install/templates/initializer.rb
@@ -205,7 +206,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
205
206
  - !ruby/object:Gem::Version
206
207
  version: '0'
207
208
  requirements: []
208
- rubygems_version: 3.5.10
209
+ rubygems_version: 3.5.11
209
210
  signing_key:
210
211
  specification_version: 4
211
212
  summary: ''
@@ -1,10 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- unless Spree::Store.where(code: "sample-store").exists?
4
- Spree::Store.create!(
5
- name: "Sample Store",
6
- code: "sample-store",
7
- url: "example.com",
8
- mail_from_address: "store@example.com"
9
- )
10
- end