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 +4 -4
- data/app/jobs/disco_app/concerns/app_installed_job.rb +1 -1
- data/app/jobs/disco_app/concerns/app_uninstalled_job.rb +1 -1
- data/app/jobs/disco_app/concerns/render_asset_group_job.rb +1 -1
- data/app/jobs/disco_app/concerns/shop_update_job.rb +1 -1
- data/app/jobs/disco_app/concerns/subscription_changed_job.rb +1 -1
- data/app/jobs/disco_app/concerns/synchronise_carrier_service_job.rb +1 -1
- data/app/jobs/disco_app/concerns/synchronise_resources_job.rb +1 -1
- data/app/jobs/disco_app/concerns/synchronise_webhooks_job.rb +1 -1
- data/app/jobs/disco_app/send_subscription_job.rb +1 -1
- data/lib/disco_app/version.rb +1 -1
- data/lib/generators/disco_app/disco_app_generator.rb +1 -1
- data/test/dummy/app/jobs/carts_update_job.rb +1 -1
- data/test/dummy/app/jobs/disco_app/app_uninstalled_job.rb +2 -2
- data/test/dummy/app/jobs/products_create_job.rb +1 -1
- data/test/dummy/app/jobs/products_delete_job.rb +1 -1
- data/test/dummy/app/jobs/products_update_job.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 588d8ea318ba16bf4dff4610ac9ba3797e20b13833b55001175024b22f147428
|
4
|
+
data.tar.gz: a2b553ef70d4a296d594da3d0b907492fb0171a1ce01e536a9b5a9674c612ba7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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(
|
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(
|
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
|
@@ -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(
|
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
|
|
@@ -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(
|
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(
|
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(
|
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
|
|
data/lib/disco_app/version.rb
CHANGED
@@ -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
|
@@ -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(
|
7
|
-
super
|
6
|
+
def perform(_shop, shop_data)
|
7
|
+
super
|
8
8
|
@shop.update(data: @shop.data.merge(country_name: 'Nowhere'))
|
9
9
|
end
|
10
10
|
|