solidus_bling 2.0.0 → 2.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/decorators/models/solidus_bling/spree/payment_method_decorator.rb +13 -0
- data/app/decorators/models/solidus_bling/spree/shipping_method_decorator.rb +13 -0
- data/app/models/solidus_bling/order.rb +1 -1
- data/app/models/solidus_bling/payment_method.rb +1 -0
- data/app/models/solidus_bling/shipping_method.rb +1 -0
- data/lib/generators/solidus_bling/install/install_generator.rb +4 -0
- data/lib/solidus_bling/engine.rb +6 -4
- data/lib/solidus_bling/version.rb +1 -1
- data/solidus_bling.gemspec +0 -5
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2bcd2be4e908655cc3e344207e95426a1080bd7ce085c7681afc04c8e42f1669
|
4
|
+
data.tar.gz: d45a21cb6418615949b88cb148e12f713945bab1b69dcd8ce5339c8bae6de271
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f2e1c07f30c56963647a28896f834be013489509c69331dc2806745b20ec6c8205b754b32ff9e7721ce492fee2191f33b92d4a46e2f9ee41fd61ad76ffe7e641
|
7
|
+
data.tar.gz: 3a8170ad8a641d67c132c95ce36ba0a5967f779141657872edbdda5208e35f25b5677dd756a7b3601cbc18ee1f8159d8b14f32901cf672ba946f20b6122a8076
|
@@ -0,0 +1,13 @@
|
|
1
|
+
module SolidusBling
|
2
|
+
module Spree
|
3
|
+
module PaymentMethodDecorator
|
4
|
+
def self.prepended(base)
|
5
|
+
base.class_eval do
|
6
|
+
has_many :solidus_bling_payment_methods, class_name: "SolidusBling::PaymentMethod", foreign_key: "spree_payment_method_id"
|
7
|
+
end
|
8
|
+
end
|
9
|
+
|
10
|
+
::Spree::PaymentMethod.prepend self
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
module SolidusBling
|
2
|
+
module Spree
|
3
|
+
module ShippingMethodDecorator
|
4
|
+
def self.prepended(base)
|
5
|
+
base.class_eval do
|
6
|
+
has_many :solidus_bling_shipping_methods, class_name: "SolidusBling::ShippingMethod", foreign_key: "spree_shipping_method_id"
|
7
|
+
end
|
8
|
+
end
|
9
|
+
|
10
|
+
::Spree::ShippingMethod.prepend self
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
@@ -108,7 +108,7 @@ module SolidusBling
|
|
108
108
|
},
|
109
109
|
"volumes": [
|
110
110
|
{
|
111
|
-
"servico": order.shipments.last.
|
111
|
+
"servico": @account.shipping_methods.find_by(spree_shipping_method_id: order.shipments.last.shipping_method.id).alias,
|
112
112
|
"codigoRastreamento": ""
|
113
113
|
}
|
114
114
|
]
|
@@ -36,6 +36,10 @@ module SolidusBling
|
|
36
36
|
puts 'Skipping bin/rails db:migrate, don\'t forget to run it!' # rubocop:disable Rails/Output
|
37
37
|
end
|
38
38
|
end
|
39
|
+
|
40
|
+
def install_dependencies
|
41
|
+
puts "\nTo complete the installation, please run:\nbin/rails generate solidus_brazilian_adaptations:install"
|
42
|
+
end
|
39
43
|
end
|
40
44
|
end
|
41
45
|
end
|
data/lib/solidus_bling/engine.rb
CHANGED
@@ -29,10 +29,12 @@ module SolidusBling
|
|
29
29
|
g.test_framework :rspec
|
30
30
|
end
|
31
31
|
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
32
|
+
initializer "solidus_bling.pub_sub", after: "spree.core.pub_sub" do |app|
|
33
|
+
app.reloader.to_prepare do
|
34
|
+
::Spree::Bus.register(:bling_products_updated)
|
35
|
+
::Spree::Bus.register(:bling_contact_created)
|
36
|
+
SolidusBling::Subscriber.new.subscribe_to(::Spree::Bus)
|
37
|
+
end
|
36
38
|
end
|
37
39
|
|
38
40
|
end
|
data/solidus_bling.gemspec
CHANGED
@@ -35,9 +35,4 @@ Gem::Specification.new do |spec|
|
|
35
35
|
|
36
36
|
spec.add_development_dependency 'solidus_dev_support', '~> 2.7'
|
37
37
|
|
38
|
-
spec.post_install_message = <<-MESSAGE
|
39
|
-
To complete the installation, please run:
|
40
|
-
bin/rails g solidus_brazilian_adaptations:install
|
41
|
-
MESSAGE
|
42
|
-
|
43
38
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: solidus_bling
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ulysses-bull
|
@@ -109,6 +109,8 @@ files:
|
|
109
109
|
- app/assets/stylesheets/spree/backend/solidus_bling.css
|
110
110
|
- app/assets/stylesheets/spree/frontend/solidus_bling.css
|
111
111
|
- app/controllers/spree/admin/accounts_controller.rb
|
112
|
+
- app/decorators/models/solidus_bling/spree/payment_method_decorator.rb
|
113
|
+
- app/decorators/models/solidus_bling/spree/shipping_method_decorator.rb
|
112
114
|
- app/helpers/solidus_bling/accounts_helper.rb
|
113
115
|
- app/jobs/solidus_bling/application_job.rb
|
114
116
|
- app/jobs/solidus_bling/contact_job.rb
|
@@ -172,9 +174,7 @@ metadata:
|
|
172
174
|
homepage_uri: https://github.com/ulysses-bull/solidus_bling#readme
|
173
175
|
source_code_uri: https://github.com/ulysses-bull/solidus_bling
|
174
176
|
changelog_uri: https://github.com/ulysses-bull/solidus_bling/blob/master/CHANGELOG.md
|
175
|
-
post_install_message:
|
176
|
-
To complete the installation, please run:
|
177
|
-
bin/rails g solidus_brazilian_adaptations:install
|
177
|
+
post_install_message:
|
178
178
|
rdoc_options: []
|
179
179
|
require_paths:
|
180
180
|
- lib
|