zendesk_apps_tools 2.9.4 → 2.9.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/lib/zendesk_apps_tools/command.rb +4 -2
- data/lib/zendesk_apps_tools/deploy.rb +10 -0
- data/lib/zendesk_apps_tools/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 434d24f23b9e07f418808149ea0c86c4241645be15a613dbddd86145c6789fd0
|
4
|
+
data.tar.gz: aad40dbfb893f8ab4e200fba2b056a669c2e7fb0cb3d96bbf72a97c59c1f21bc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6092e39e119c703cc6d70eb1071c91d3d26440ae2c2f0dd41f0ec863e20331a01995d793b6a017f8fa7b370e019e115f41848182757535acdfe3abb00a7663fb
|
7
|
+
data.tar.gz: d5b5a41c243fb84199b3a80c23b5c53982c65b49b8477c0a6e30d3a9a7474ce922481af4fc2b36592c32f3cd19acce0f18443c2ea4a0f1fefe3f1c7e07a32044
|
@@ -191,10 +191,12 @@ module ZendeskAppsTools
|
|
191
191
|
@command = 'Update'
|
192
192
|
|
193
193
|
app_id = cache.fetch('app_id') || find_app_id
|
194
|
-
|
194
|
+
app_url = "/api/v2/apps/#{app_id}.json"
|
195
|
+
unless /\d+/ =~ app_id.to_s && app_exists?(app_id)
|
195
196
|
say_error_and_exit "App id not found\nPlease try running command with --clean or check your internet connection"
|
196
197
|
end
|
197
|
-
|
198
|
+
|
199
|
+
deploy_app(:put, app_url, {})
|
198
200
|
end
|
199
201
|
|
200
202
|
desc 'migrate', 'Helps with the migration of a v1 app to v2'
|
@@ -17,6 +17,16 @@ module ZendeskAppsTools
|
|
17
17
|
say_error_and_exit e.message
|
18
18
|
end
|
19
19
|
|
20
|
+
def app_exists?(app_id)
|
21
|
+
url = "/api/v2/apps/#{app_id}.json"
|
22
|
+
connection = get_connection
|
23
|
+
response = connection.send(:get) do |req|
|
24
|
+
req.url url
|
25
|
+
end
|
26
|
+
|
27
|
+
%w(200 201 202).include? response.status.to_s
|
28
|
+
end
|
29
|
+
|
20
30
|
def install_app(poll_job, product_name, installation)
|
21
31
|
connection = get_connection
|
22
32
|
response = connection.post do |req|
|
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.
|
4
|
+
version: 2.9.5
|
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-06-
|
14
|
+
date: 2018-06-22 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: thor
|
@@ -321,7 +321,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
321
321
|
version: 1.3.6
|
322
322
|
requirements: []
|
323
323
|
rubyforge_project:
|
324
|
-
rubygems_version: 2.
|
324
|
+
rubygems_version: 2.7.3
|
325
325
|
signing_key:
|
326
326
|
specification_version: 4
|
327
327
|
summary: Tools to help you develop Zendesk Apps.
|