shopify_app 7.0.6 → 7.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 473d388c8167b2732271bdb9ab34429f91f7c94c
4
- data.tar.gz: b73c5f910f930bd48c82f5198306e34f5c8d2df7
3
+ metadata.gz: 86f36bb491fcde24d3029e21f8b3703d4deda7cf
4
+ data.tar.gz: 0a63f037bd6f475f90afcef273d8886f97505735
5
5
  SHA512:
6
- metadata.gz: 5d69104315672a708a5e061584893ab91e023b5eaf5be58f2edf2cb8047803028cdce6ef8005fdecfeebf7345978f501c0f2bf94947a840522072e683985fe3e
7
- data.tar.gz: 8c6a593a86c52089ec29beab5baebf7738b7f05100c83ae0f6909a88fb6e05e5c758ec1e582803bdefbc38f5cdadce1c4a28acbd6230dc64199e33286078c48a
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 = address.split('/').last + '_job'
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
@@ -1,3 +1,3 @@
1
1
  module ShopifyApp
2
- VERSION = '7.0.6'
2
+ VERSION = '7.0.7'
3
3
  end
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.6
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-15 00:00:00.000000000 Z
11
+ date: 2016-06-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails