shopify_app 7.0.6 → 7.0.7
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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 86f36bb491fcde24d3029e21f8b3703d4deda7cf
|
4
|
+
data.tar.gz: 0a63f037bd6f475f90afcef273d8886f97505735
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 22915463f2c8b88b2dee98a3fca27c81e473d011f62f3ae59941a583eb80d6ce92ac65eef86543ed1b156493ffd2fa9bb75432b9dd9ad4793da5ab52018049b3
|
7
|
+
data.tar.gz: e8e7714ab150dbf953665dd53771055e8c4767fd99145a5988c820269615b99456daf1ef1491f91627c5298735faeeaab72aca5702eec38e7d17f7d8fc6897fd
|
@@ -4,10 +4,13 @@ module ShopifyApp
|
|
4
4
|
module Generators
|
5
5
|
class AddWebhookGenerator < Rails::Generators::Base
|
6
6
|
source_root File.expand_path('../templates', __FILE__)
|
7
|
-
|
8
7
|
class_option :topic, type: :string, aliases: "-t", required: true
|
9
8
|
class_option :address, type: :string, aliases: "-a", required: true
|
10
9
|
|
10
|
+
hook_for :test_framework, as: :job, in: :rails do |instance, generator|
|
11
|
+
instance.invoke generator, [ instance.send(:job_file_name) ]
|
12
|
+
end
|
13
|
+
|
11
14
|
def init_webhook_config
|
12
15
|
initializer = load_initializer
|
13
16
|
return if initializer.include?("config.webhooks")
|
@@ -34,13 +37,17 @@ module ShopifyApp
|
|
34
37
|
end
|
35
38
|
|
36
39
|
def add_webhook_job
|
37
|
-
@job_file_name =
|
40
|
+
@job_file_name = job_file_name + '_job'
|
38
41
|
@job_class_name = @job_file_name.classify
|
39
42
|
template 'webhook_job.rb', "app/jobs/#{@job_file_name}.rb"
|
40
43
|
end
|
41
44
|
|
42
45
|
private
|
43
46
|
|
47
|
+
def job_file_name
|
48
|
+
address.split('/').last
|
49
|
+
end
|
50
|
+
|
44
51
|
def load_initializer
|
45
52
|
File.read(File.join(destination_root, 'config/initializers/shopify_app.rb'))
|
46
53
|
end
|
data/lib/shopify_app/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: shopify_app
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 7.0.
|
4
|
+
version: 7.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shopify
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-06-
|
11
|
+
date: 2016-06-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|