solidus_bling 2.0.1 → 2.0.2

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: 2bcd2be4e908655cc3e344207e95426a1080bd7ce085c7681afc04c8e42f1669
4
- data.tar.gz: d45a21cb6418615949b88cb148e12f713945bab1b69dcd8ce5339c8bae6de271
3
+ metadata.gz: cb30252c0e9c0cc28db34354c406558e6bd5c0287814985022f831d1e843a763
4
+ data.tar.gz: 4dffc04c53547441ea2100979aaba16a212a5dca7abbeae89939e99bd591bbd4
5
5
  SHA512:
6
- metadata.gz: f2e1c07f30c56963647a28896f834be013489509c69331dc2806745b20ec6c8205b754b32ff9e7721ce492fee2191f33b92d4a46e2f9ee41fd61ad76ffe7e641
7
- data.tar.gz: 3a8170ad8a641d67c132c95ce36ba0a5967f779141657872edbdda5208e35f25b5677dd756a7b3601cbc18ee1f8159d8b14f32901cf672ba946f20b6122a8076
6
+ metadata.gz: 54da612e78e3aaffadf4fd10a128cc1618cf07239a7f98a40709cc5643c7f33a2f59d432e36305874d91a4f79519f54862f836851f0eeae182d0334e117fe160
7
+ data.tar.gz: e9c62701428a91238bd1d9789d00e6190f6fe42385d63c8fd7fd8e1653b1a6948431c7d6e380322ca3f1f387d8645293830b9748dfbbbcc776df04ebc27fcd22
@@ -10,8 +10,8 @@ module Spree
10
10
 
11
11
  def new
12
12
  @bling_account = SolidusBling::Account.new
13
- @payment_methods = Spree::PaymentMethod.all.pluck(:name, :id)
14
- @shipping_methods = Spree::ShippingMethod.all.pluck(:name, :id)
13
+ @payment_methods = ::Spree::PaymentMethod.all.pluck(:name, :id)
14
+ @shipping_methods = ::Spree::ShippingMethod.all.pluck(:name, :id)
15
15
  @bling_account.payment_methods.build
16
16
  @bling_account.shipping_methods.build
17
17
  @bling_account.sellers.build
@@ -24,8 +24,8 @@ module Spree
24
24
 
25
25
  def edit
26
26
  @bling_account = SolidusBling::Account.find(params[:id])
27
- @payment_methods = Spree::PaymentMethod.all.pluck(:name, :id)
28
- @shipping_methods = Spree::ShippingMethod.all.pluck(:name, :id)
27
+ @payment_methods = ::Spree::PaymentMethod.all.pluck(:name, :id)
28
+ @shipping_methods = ::Spree::ShippingMethod.all.pluck(:name, :id)
29
29
  end
30
30
 
31
31
  def update
@@ -39,7 +39,7 @@ module SolidusBling
39
39
  ensure
40
40
  json = JSON.parse(req.body)
41
41
  response_has_error?(json)
42
- Spree::Bus.publish :bling_contact_created, args: {order: order, contato: json}
42
+ ::Spree::Bus.publish :bling_contact_created, args: {order: order, contato: json}
43
43
  return json.dig("data", "id")
44
44
  end
45
45
  end
@@ -4,7 +4,7 @@ module SolidusBling
4
4
 
5
5
  def self.update bling_account
6
6
  bling_api = SolidusBling::Api.new(bling_account)
7
- skus = Spree::Variant.pluck(:sku)
7
+ skus = ::Spree::Variant.pluck(:sku)
8
8
  hash_products = {}
9
9
  products = skus.map do |sku|
10
10
  begin
@@ -29,7 +29,7 @@ module SolidusBling
29
29
  end
30
30
  end.compact.uniq
31
31
  SolidusBling::Product.upsert_all(products, unique_by: :sku)
32
- Spree::Bus.publish :bling_products_updated, products: hash_products
32
+ ::Spree::Bus.publish :bling_products_updated, products: hash_products
33
33
  end
34
34
 
35
35
  end
@@ -1,5 +1,5 @@
1
1
  class AddBlingOrderIdToSpreeOrders < ActiveRecord::Migration[7.0]
2
2
  def change
3
- add_column :spree_orders, :bling_order_id, :string, default: nil
3
+ add_column :spree_orders, :bling_order_id, :string, default: nil, if_not_exists: true
4
4
  end
5
5
  end
@@ -19,7 +19,7 @@ module SolidusBling
19
19
  [:bling_account],
20
20
  'exclamation',
21
21
  url: :admin_accounts_path,
22
- condition: -> { can?(:manage, Spree::Store) }
22
+ condition: -> { can?(:manage, ::Spree::Store) }
23
23
  )
24
24
  end
25
25
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SolidusBling
4
- VERSION = '2.0.1'
4
+ VERSION = '2.0.2'
5
5
  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.1
4
+ version: 2.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - ulysses-bull