disco_app 0.13.2 → 0.13.3

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: 8529c4fa6909d2c51dec7f9a99d07cce038c135dc03e082340d0ea2ff436c38a
4
- data.tar.gz: 6ff98fa390f065b31f107954486f32129d2d0acdc4b6a7fa0d0c1985579390b8
3
+ metadata.gz: 588d8ea318ba16bf4dff4610ac9ba3797e20b13833b55001175024b22f147428
4
+ data.tar.gz: a2b553ef70d4a296d594da3d0b907492fb0171a1ce01e536a9b5a9674c612ba7
5
5
  SHA512:
6
- metadata.gz: 11bc8de7b938af8b6703af177a4b37fd66031ae1f2a4b4dae3a53c692ba90c0f0fa071cae8db19e5d557c2032443bb67540643e244ec257a3df1150ea74bea97
7
- data.tar.gz: e6b4e92ada41d8d5abbf0835584343cd86aace3b70eb801a5bd7bda1c334c0a882e7593b583b24a23fd94a4afdced824fd7207048888e09355e63fb3966a2367
6
+ metadata.gz: 73cfa3f2d3dc98e0a312f1ff4827f849af6752bce0ca4b176a6ac87c2d01a67551d59a701bd0d7cb1cbb78493a03eb804fc46aba6e5cf5b4c49a05001a019363
7
+ data.tar.gz: d7cadbbe26e7f65e1ce9dc980ad794689adc1c5ca19ff6b9ff31927c9f64d212c5b2707892089ff3ea735a0283820786841c00cf379956254143a8a9987ea25f
@@ -14,7 +14,7 @@ module DiscoApp::Concerns::AppInstalledJob
14
14
  # - Perform initial update of shop information.
15
15
  # - Subscribe to default plan, if any exists.
16
16
  #
17
- def perform(shop, plan_code = nil, source = nil)
17
+ def perform(_shop, plan_code = nil, source = nil)
18
18
  DiscoApp::SynchroniseWebhooksJob.perform_now(@shop)
19
19
  DiscoApp::SynchroniseCarrierServiceJob.perform_now(@shop)
20
20
  DiscoApp::ShopUpdateJob.perform_now(@shop)
@@ -12,7 +12,7 @@ module DiscoApp::Concerns::AppUninstalledJob
12
12
  # - Mark any recurring application charges as cancelled.
13
13
  # - Remove any stored sessions for the shop.
14
14
  #
15
- def perform(shop, shop_data)
15
+ def perform(_shop, shop_data)
16
16
  DiscoApp::ChargesService.cancel_recurring_charges(@shop)
17
17
  DiscoApp::SendSubscriptionJob.perform_later(@shop)
18
18
  @shop.sessions.delete_all
@@ -1,7 +1,7 @@
1
1
  module DiscoApp::Concerns::RenderAssetGroupJob
2
2
  extend ActiveSupport::Concern
3
3
 
4
- def perform(shop, instance, asset_group)
4
+ def perform(_shop, instance, asset_group)
5
5
  instance.render_asset_group(asset_group.to_sym)
6
6
  end
7
7
 
@@ -2,7 +2,7 @@ module DiscoApp::Concerns::ShopUpdateJob
2
2
  extend ActiveSupport::Concern
3
3
 
4
4
  # Perform an update of the current shop's information.
5
- def perform(shop, shop_data = nil)
5
+ def perform(_shop, shop_data = nil)
6
6
  # If we weren't provided with shop data (eg from a webhook), fetch it.
7
7
  shop_data ||= ActiveSupport::JSON::decode(ShopifyAPI::Shop.current.to_json)
8
8
 
@@ -1,7 +1,7 @@
1
1
  module DiscoApp::Concerns::SubscriptionChangedJob
2
2
  extend ActiveSupport::Concern
3
3
 
4
- def perform(shop, subscription)
4
+ def perform(_shop, subscription)
5
5
  DiscoApp::SendSubscriptionJob.perform_later(@shop)
6
6
  end
7
7
 
@@ -2,7 +2,7 @@ module DiscoApp::Concerns::SynchroniseCarrierServiceJob
2
2
  extend ActiveSupport::Concern
3
3
 
4
4
  # Ensure that any carrier service required by our app is registered.
5
- def perform(shop)
5
+ def perform(_shop)
6
6
  # Don't proceed unless we have a name and callback url.
7
7
  return unless carrier_service_name and callback_url
8
8
 
@@ -1,7 +1,7 @@
1
1
  module DiscoApp::Concerns::SynchroniseResourcesJob
2
2
  extend ActiveSupport::Concern
3
3
 
4
- def perform(shop, class_name, params)
4
+ def perform(_shop, class_name, params)
5
5
  klass = class_name.constantize
6
6
 
7
7
  klass::SHOPIFY_API_CLASS.find(:all, params: params).map do |shopify_resource|
@@ -3,7 +3,7 @@ module DiscoApp::Concerns::SynchroniseWebhooksJob
3
3
 
4
4
  # Ensure the webhooks registered with our shop are the same as those listed
5
5
  # in our application configuration.
6
- def perform(shop)
6
+ def perform(_shop)
7
7
  # Get the full list of expected webhook topics.
8
8
  expected_topics = [:'app/uninstalled', :'shop/update'] + (DiscoApp.configuration.webhook_topics || [])
9
9
 
@@ -1,6 +1,6 @@
1
1
  class DiscoApp::SendSubscriptionJob < DiscoApp::ShopJob
2
2
 
3
- def perform(shop)
3
+ def perform(_shop)
4
4
  @shop.disco_api_client.create_app_subscription
5
5
  end
6
6
 
@@ -1,3 +1,3 @@
1
1
  module DiscoApp
2
- VERSION = '0.13.2'
2
+ VERSION = '0.13.3'
3
3
  end
@@ -9,7 +9,7 @@ class DiscoAppGenerator < Rails::Generators::Base
9
9
  # - Default simple Procfile for Heroku.
10
10
  #
11
11
  def copy_root_files
12
- %w(.env .env.local .gitignore Procfile CHECKS).each do |file|
12
+ %w(.env .env.local .gitignore .rubocop.yml .codeclimate.yml Procfile CHECKS).each do |file|
13
13
  copy_file "root/#{file}", file
14
14
  end
15
15
  end
@@ -1,6 +1,6 @@
1
1
  class CartsUpdateJob < DiscoApp::ShopJob
2
2
 
3
- def perform(shop, cart_data)
3
+ def perform(_shop, cart_data)
4
4
  Cart.synchronise(@shop, cart_data)
5
5
  end
6
6
 
@@ -3,8 +3,8 @@ class DiscoApp::AppUninstalledJob < DiscoApp::ShopJob
3
3
 
4
4
  # Extend the perform method to change the country name of the shop to
5
5
  # 'Nowhere' on uninstallation.
6
- def perform(domain, shop_data)
7
- super(domain, shop_data)
6
+ def perform(_shop, shop_data)
7
+ super
8
8
  @shop.update(data: @shop.data.merge(country_name: 'Nowhere'))
9
9
  end
10
10
 
@@ -1,6 +1,6 @@
1
1
  class ProductsCreateJob < DiscoApp::ShopJob
2
2
 
3
- def perform(shop, product_data)
3
+ def perform(_shop, product_data)
4
4
  Product.synchronise(@shop, product_data)
5
5
  end
6
6
 
@@ -1,6 +1,6 @@
1
1
  class ProductsDeleteJob < DiscoApp::ShopJob
2
2
 
3
- def perform(shop, product_data)
3
+ def perform(_shop, product_data)
4
4
  Product.synchronise_deletion(@shop, product_data)
5
5
  end
6
6
 
@@ -1,6 +1,6 @@
1
1
  class ProductsUpdateJob < DiscoApp::ShopJob
2
2
 
3
- def perform(shop, product_data)
3
+ def perform(_shop, product_data)
4
4
  Product.synchronise(@shop, product_data)
5
5
  end
6
6
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: disco_app
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.13.2
4
+ version: 0.13.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gavin Ballard