zendesk_apps_tools 2.9.3 → 2.9.4

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
- SHA256:
3
- metadata.gz: 86efb23e4c111ad24b679dbdb87a73b332d8f2190ac8c9ea4401c13b61610461
4
- data.tar.gz: b7f68e67af789087c984048d3944942c3848fe22433d3fc94498698738ee251e
2
+ SHA1:
3
+ metadata.gz: a8c2f458d08f9dede5b4775ccdc17ff072e3a50b
4
+ data.tar.gz: 20c51fcb1cc8847ced610aa663c84b3dd4b1ea3d
5
5
  SHA512:
6
- metadata.gz: 01e446ac25bee1e28b320f25f15fb3e56008f35eb2cca3784a9461803911ad2b35c35c2ecf1a16c1fea5647dc3703dae09ee570a19bea9b4b8d07016be2b5da5
7
- data.tar.gz: 4e3b68d95b0308f6b7e811390a0de9a92adc1aca88f899d1578840ab6e6be5997469e4ca110240c7646ae064736689e953c96608f8330b2373f013fc52b527d2
6
+ metadata.gz: 5565db5aa8066339cb2dd9340d268af409bd5d9c40a62428d3645f5a1d3ca865386d4391a34acc5bd4307590f031cb655078bd9503a556092adeb8b8f9185875
7
+ data.tar.gz: b2d6e14881700ea6dad32c8040c78bcae350d83cd343f2e252b6d0d0de42ce2cf88b6f23e7ca0584db6a0cb6e69dfaa0052ddf06eb90ae914f1660a4ac1eb67f
@@ -8,7 +8,7 @@ unless defined?(Cucumber)
8
8
  WebMock::API.stub_request(:post, 'https://app-account.zendesk.com/api/v2/apps/uploads.json').to_return(body: JSON.dump(id: '123'))
9
9
  WebMock::API.stub_request(:post, 'https://app-account.zendesk.com/api/apps.json').with(body: JSON.dump(name: 'John Test App', upload_id: '123')).to_return(body: JSON.dump(job_id: '987'))
10
10
  WebMock::API.stub_request(:get, 'https://app-account.zendesk.com/api/v2/apps/job_statuses/987').to_return(body: JSON.dump(status: 'working')).then.to_return(body: JSON.dump(status: 'completed', app_id: '55'))
11
- WebMock::API.stub_request(:get, 'https://rubygems.org/api/v1/gems/zendesk_apps_tools.json').to_return(body: JSON.dump(status: 'working')).then.to_return(body: JSON.dump(name: 'zendesk_apps_tools', version: '2.1.1'))
11
+ WebMock::API.stub_request(:get, 'https://rubygems.org/api/v1/gems/zendesk_apps_tools.json').to_return(body: JSON.dump(status: 'working', version: '1.2.3')).then.to_return(body: JSON.dump(name: 'zendesk_apps_tools', version: '2.1.1'))
12
12
 
13
13
  WebMock.enable!
14
14
  WebMock.disable_net_connect!
@@ -88,10 +88,11 @@ module ZendeskAppsTools
88
88
 
89
89
  def generate_payload
90
90
  payload = {}
91
- templates = Dir.glob(theme_package_path('templates', '*.hbs'))
91
+ templates = Dir.glob(theme_package_path('templates/*.hbs')) + Dir.glob(theme_package_path('templates/*/*.hbs'))
92
92
  templates_payload = {}
93
93
  templates.each do |template|
94
- templates_payload[File.basename(template, '.hbs')] = File.read(template)
94
+ identifier = template.match(/(?<=templates\/).*(?=\.hbs)/).to_s
95
+ templates_payload[identifier] = File.read(template)
95
96
  end
96
97
  payload['templates'] = templates_payload
97
98
  payload['templates']['document_head'] = inject_external_tags(payload['templates']['document_head'])
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module ZendeskAppsTools
3
- VERSION = '2.9.3'
3
+ VERSION = '2.9.4'
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zendesk_apps_tools
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.9.3
4
+ version: 2.9.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - James A. Rosen
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2018-04-18 00:00:00.000000000 Z
14
+ date: 2018-06-18 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: thor
@@ -321,18 +321,18 @@ required_rubygems_version: !ruby/object:Gem::Requirement
321
321
  version: 1.3.6
322
322
  requirements: []
323
323
  rubyforge_project:
324
- rubygems_version: 2.7.6
324
+ rubygems_version: 2.5.2
325
325
  signing_key:
326
326
  specification_version: 4
327
327
  summary: Tools to help you develop Zendesk Apps.
328
328
  test_files:
329
- - features/clean.feature
330
329
  - features/create.feature
331
- - features/fixtures/quote_character_translation.json
330
+ - features/validate.feature
332
331
  - features/new.feature
333
- - features/package.feature
334
- - features/step_definitions/app_steps.rb
335
- - features/support/env.rb
332
+ - features/clean.feature
336
333
  - features/support/helpers.rb
337
334
  - features/support/webmock.rb
338
- - features/validate.feature
335
+ - features/support/env.rb
336
+ - features/step_definitions/app_steps.rb
337
+ - features/fixtures/quote_character_translation.json
338
+ - features/package.feature