zendesk_apps_tools 2.0.4 → 2.0.5
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 +4 -4
- data/app_template_iframe/translations/en.json +4 -13
- data/features/fixtures/quote_character_translation.json +3 -2
- data/features/new.feature +0 -73
- data/features/package.feature +0 -12
- data/lib/zendesk_apps_tools/command.rb +20 -16
- data/lib/zendesk_apps_tools/version.rb +1 -1
- metadata +3 -12
- data/app_template/README.md +0 -14
- data/app_template/app.css +0 -0
- data/app_template/app.js +0 -12
- data/app_template/assets/logo-small.png +0 -0
- data/app_template/assets/logo.png +0 -0
- data/app_template/assets/logo.svg +0 -10
- data/app_template/manifest.json.tt +0 -13
- data/app_template/templates/layout.hdbs +0 -10
- data/app_template/translations/en.json +0 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4d8f580eb9d40e157571b7340cd6c8293cb710d5
|
4
|
+
data.tar.gz: 8f2dac8f3c3fafc16de94349b0b85ca439640fd8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7bb1297c754608cee26d0dfc17c55232ff298878ec08893279ab22f3164067daa82ecc12a356094cc7854ccde2a3ee93e3fb7673e8157ad9259704dbc3c35c58
|
7
|
+
data.tar.gz: eff9068eb5f589721875bae8b4e228b5a3b2c16f4b4a83a46732b1529190cfd5f895d4d2be5f35881615ed5d57fc39c320ec4050438653b7fe9e8220d2d5610d
|
@@ -1,16 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"app": {
|
3
|
-
"
|
4
|
-
"
|
5
|
-
|
6
|
-
|
7
|
-
"fetch": {
|
8
|
-
"done": "Good",
|
9
|
-
"fail": "failed to fetch information from the server"
|
10
|
-
},
|
11
|
-
"id": "ID",
|
12
|
-
"email": "Email",
|
13
|
-
"name": "Name",
|
14
|
-
"role": "Role",
|
15
|
-
"groups": "Groups"
|
3
|
+
"short_description": "Play the famous zen tunes in your help desk.",
|
4
|
+
"long_description": "Play the famous zen tunes in your help desk and \n listen to the beats it has to offer.",
|
5
|
+
"installation_instructions": "Simply click install."
|
6
|
+
}
|
16
7
|
}
|
@@ -1,6 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"app": {
|
3
|
-
"
|
4
|
-
"
|
3
|
+
"short_description": "Play the famous zen tunes in your help desk.",
|
4
|
+
"long_description": "Play the famous zen tunes in your help desk and \n listen to the beats it has to offer.",
|
5
|
+
"installation_instructions": "Simply click install."
|
5
6
|
}
|
6
7
|
}
|
data/features/new.feature
CHANGED
@@ -14,79 +14,6 @@ Feature: create a template for a new zendesk app
|
|
14
14
|
Then the app file "manifest.json" is created
|
15
15
|
And I reset the working directory
|
16
16
|
|
17
|
-
Scenario: create a template for a new zendesk app by running 'zat new --v1' command
|
18
|
-
Given an app directory "tmp/aruba" exists
|
19
|
-
When I run "zat new --v1" command with the following details:
|
20
|
-
| author name | John Citizen |
|
21
|
-
| author email | john@example.com |
|
22
|
-
| author url | http://myapp.com |
|
23
|
-
| app name | John Test App |
|
24
|
-
| app dir | tmp/aruba |
|
25
|
-
|
26
|
-
Then the app file "tmp/aruba/manifest.json" is created with:
|
27
|
-
"""
|
28
|
-
{
|
29
|
-
"name": "John Test App",
|
30
|
-
"author": {
|
31
|
-
"name": "John Citizen",
|
32
|
-
"email": "john@example.com",
|
33
|
-
"url": "http://myapp.com"
|
34
|
-
},
|
35
|
-
"defaultLocale": "en",
|
36
|
-
"private": true,
|
37
|
-
"location":["ticket_sidebar"],
|
38
|
-
"version": "1.0",
|
39
|
-
"frameworkVersion": "1.0"
|
40
|
-
}
|
41
|
-
"""
|
42
|
-
And the app file "tmp/aruba/app.js" is created with:
|
43
|
-
"""
|
44
|
-
(function() {
|
45
|
-
|
46
|
-
return {
|
47
|
-
events: {
|
48
|
-
'app.activated':'doSomething'
|
49
|
-
},
|
50
|
-
|
51
|
-
doSomething: function() {
|
52
|
-
}
|
53
|
-
};
|
54
|
-
|
55
|
-
}());
|
56
|
-
"""
|
57
|
-
And the app file "tmp/aruba/templates/layout.hdbs" is created with:
|
58
|
-
"""
|
59
|
-
<header>
|
60
|
-
<span class="logo"></span>
|
61
|
-
<h3>{{setting "name"}}</h3>
|
62
|
-
</header>
|
63
|
-
<section data-main></section>
|
64
|
-
<footer>
|
65
|
-
<a href="mailto:{{author.email}}">
|
66
|
-
{{author.name}}
|
67
|
-
</a>
|
68
|
-
</footer>
|
69
|
-
"""
|
70
|
-
And the app file "tmp/aruba/translations/en.json" is created with:
|
71
|
-
"""
|
72
|
-
{
|
73
|
-
"app": {
|
74
|
-
"description": "Play the famous zen tunes in your help desk.",
|
75
|
-
"name": "Buddha Machine"
|
76
|
-
},
|
77
|
-
"loading": "Welcome to this Sample App",
|
78
|
-
"fetch": {
|
79
|
-
"done": "Good",
|
80
|
-
"fail": "failed to fetch information from the server"
|
81
|
-
},
|
82
|
-
"id": "ID",
|
83
|
-
"email": "Email",
|
84
|
-
"name": "Name",
|
85
|
-
"role": "Role",
|
86
|
-
"groups": "Groups"
|
87
|
-
}
|
88
|
-
"""
|
89
|
-
|
90
17
|
Scenario: create a template for a new iframe only app by running 'zat new' command
|
91
18
|
Given an app directory "tmp/aruba" exists
|
92
19
|
And I move to the app directory
|
data/features/package.feature
CHANGED
@@ -14,18 +14,6 @@ Feature: package a zendesk app into a zip file
|
|
14
14
|
And the command output should contain "created"
|
15
15
|
And the zip file should exist in directory "tmp/aruba/tmp"
|
16
16
|
|
17
|
-
Scenario: package a v1 zendesk app by running 'zat package' command
|
18
|
-
Given a v1 app is created in directory "tmp/aruba"
|
19
|
-
When I run the command "zat package --path tmp/aruba" to package the app
|
20
|
-
And the command output should contain "adding app.js"
|
21
|
-
And the command output should contain "adding templates/layout.hdbs"
|
22
|
-
And the command output should contain "adding assets/logo-small.png"
|
23
|
-
And the command output should contain "adding assets/logo.png"
|
24
|
-
And the command output should contain "adding manifest.json"
|
25
|
-
And the command output should contain "adding translations/en.json"
|
26
|
-
And the command output should contain "created"
|
27
|
-
And the zip file should exist in directory "tmp/aruba/tmp"
|
28
|
-
|
29
17
|
Scenario: package a zendesk app by running 'zat package' command
|
30
18
|
Given an app is created in directory "tmp/aruba"
|
31
19
|
When I create a symlink from "./templates/translation.erb.tt" to "tmp/aruba/assets/translation.erb.tt"
|
@@ -27,7 +27,8 @@ module ZendeskAppsTools
|
|
27
27
|
aliases: ['--v2']
|
28
28
|
method_option :v1, type: :boolean, default: false, desc: 'Create a version 1 app template'
|
29
29
|
def new
|
30
|
-
|
30
|
+
deprecated_message('error', '1.0') if options[:v1]
|
31
|
+
|
31
32
|
enter = ->(variable) { "Enter this app author's #{variable}:\n" }
|
32
33
|
invalid = ->(variable) { "Invalid #{variable}, try again:" }
|
33
34
|
@author_name = get_value_from_stdin(enter.call('name'),
|
@@ -52,10 +53,8 @@ module ZendeskAppsTools
|
|
52
53
|
|
53
54
|
prompt_new_app_dir
|
54
55
|
|
55
|
-
|
56
|
-
|
57
|
-
directory_options = is_custom_iframe ? { exclude_pattern: /iframe.html/ } : {}
|
58
|
-
directory(skeleton, @app_dir, directory_options)
|
56
|
+
directory_options = @iframe_location != 'assets/iframe.html' ? { exclude_pattern: /iframe.html/ } : {}
|
57
|
+
directory('app_template_iframe', @app_dir, directory_options)
|
59
58
|
end
|
60
59
|
|
61
60
|
desc 'validate', 'Validate your app'
|
@@ -77,6 +76,7 @@ module ZendeskAppsTools
|
|
77
76
|
|
78
77
|
if valid
|
79
78
|
app_package.warnings.each { |w| say w.to_s, :yellow }
|
79
|
+
deprecated_message
|
80
80
|
say_status 'validate', 'OK'
|
81
81
|
else
|
82
82
|
errors.each do |e|
|
@@ -191,17 +191,6 @@ module ZendeskAppsTools
|
|
191
191
|
|
192
192
|
protected
|
193
193
|
|
194
|
-
def check_new_options
|
195
|
-
if options[:'iframe-only']
|
196
|
-
if options[:v1]
|
197
|
-
say_error_and_exit "Apps can't be created with both --v1 and --v2 (or --iframe-only)."
|
198
|
-
else
|
199
|
-
warning = 'v2 is the default for new apps, the --v2 and --iframe-only options have no effect.'
|
200
|
-
say_status 'warning', warning, :yellow
|
201
|
-
end
|
202
|
-
end
|
203
|
-
end
|
204
|
-
|
205
194
|
def setup_path(path)
|
206
195
|
@destination_stack << relative_to_original_destination_root(path) unless @destination_stack.last == path
|
207
196
|
end
|
@@ -217,5 +206,20 @@ module ZendeskAppsTools
|
|
217
206
|
ZendeskAppsTools::Settings.new(self)
|
218
207
|
end
|
219
208
|
end
|
209
|
+
|
210
|
+
def deprecated_message(type = 'warning', target_version = manifest.framework_version)
|
211
|
+
require 'zendesk_apps_support/app_version'
|
212
|
+
zas = ZendeskAppsSupport::AppVersion.new(target_version)
|
213
|
+
|
214
|
+
version_status = zas.sunsetting? ? 'being sunset' : 'deprecated'
|
215
|
+
deprecated_message = zas.sunsetting? ? "No new v#{target_version} app framework submissions will be accepted from August 1st, 2017" : "No new v#{target_version} app framework submissions or updates will be accepted"
|
216
|
+
message = "You are targeting the v#{target_version} app framework, which is #{version_status}. #{deprecated_message}. Consider migrating to the v#{zas.current} framework. For more information: http://goto.zendesk.com/zaf-sunset"
|
217
|
+
|
218
|
+
if zas.deprecated? || type == 'error'
|
219
|
+
say_error_and_exit message
|
220
|
+
elsif zas.sunsetting?
|
221
|
+
say_status 'warning', message, :yellow
|
222
|
+
end
|
223
|
+
end
|
220
224
|
end
|
221
225
|
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.0.
|
4
|
+
version: 2.0.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: 2017-06-
|
14
|
+
date: 2017-06-27 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: thor
|
@@ -191,15 +191,6 @@ extra_rdoc_files: []
|
|
191
191
|
files:
|
192
192
|
- LICENSE
|
193
193
|
- README.md
|
194
|
-
- app_template/README.md
|
195
|
-
- app_template/app.css
|
196
|
-
- app_template/app.js
|
197
|
-
- app_template/assets/logo-small.png
|
198
|
-
- app_template/assets/logo.png
|
199
|
-
- app_template/assets/logo.svg
|
200
|
-
- app_template/manifest.json.tt
|
201
|
-
- app_template/templates/layout.hdbs
|
202
|
-
- app_template/translations/en.json
|
203
194
|
- app_template_iframe/README.md
|
204
195
|
- app_template_iframe/assets/iframe.html
|
205
196
|
- app_template_iframe/assets/logo-small.png
|
@@ -256,7 +247,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
256
247
|
version: 1.3.6
|
257
248
|
requirements: []
|
258
249
|
rubyforge_project:
|
259
|
-
rubygems_version: 2.5.1
|
250
|
+
rubygems_version: 2.4.5.1
|
260
251
|
signing_key:
|
261
252
|
specification_version: 4
|
262
253
|
summary: Tools to help you develop Zendesk Apps.
|
data/app_template/README.md
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
# App name
|
2
|
-
|
3
|
-
[brief description of the app]
|
4
|
-
|
5
|
-
### The following information is displayed:
|
6
|
-
|
7
|
-
* info1
|
8
|
-
* info2
|
9
|
-
* info3
|
10
|
-
|
11
|
-
Please submit bug reports to [Insert Link](). Pull requests are welcome.
|
12
|
-
|
13
|
-
### Screenshot(s):
|
14
|
-
[put your screenshots down here.]
|
data/app_template/app.css
DELETED
File without changes
|
data/app_template/app.js
DELETED
Binary file
|
Binary file
|
@@ -1,10 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="utf-8"?>
|
2
|
-
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
3
|
-
viewBox="0 0 18 18" style="enable-background:new 0 0 18 18;" xml:space="preserve">
|
4
|
-
<path id="Fill-3" d="M1.5,6.1C1.3,5.9,1,6,1,6.4l0,7c0,0.3,0.2,0.7,0.5,0.9l6,3.6C7.8,18.1,8,18,8,17.6l0-7.1c0-0.3-0.2-0.7-0.5-0.9
|
5
|
-
L1.5,6.1z"/>
|
6
|
-
<path id="Fill-5" d="M10.5,17.9c-0.3,0.2-0.5,0-0.5-0.3l0-7c0-0.3,0.2-0.7,0.5-0.9l6-3.6C16.8,5.9,17,6,17,6.4l0,7.1
|
7
|
-
c0,0.3-0.2,0.7-0.5,0.9L10.5,17.9z"/>
|
8
|
-
<path id="Fill-1" d="M2.2,3.7c-0.3,0.2-0.3,0.4,0,0.6l6.2,3.6C8.7,8,9.2,8,9.4,7.9l6.3-3.6c0.3-0.2,0.3-0.4,0-0.6L9.5,0.1
|
9
|
-
C9.2,0,8.8,0,8.5,0.1L2.2,3.7z"/>
|
10
|
-
</svg>
|
@@ -1,13 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"name": "<%= @app_name %>",
|
3
|
-
"author": {
|
4
|
-
"name": "<%= @author_name %>",
|
5
|
-
"email": "<%= @author_email %>",
|
6
|
-
"url": "<%= @author_url %>"
|
7
|
-
},
|
8
|
-
"defaultLocale": "en",
|
9
|
-
"private": true,
|
10
|
-
"location": ["ticket_sidebar"],
|
11
|
-
"version": "1.0",
|
12
|
-
"frameworkVersion": "1.0"
|
13
|
-
}
|
@@ -1,16 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"app": {
|
3
|
-
"description": "Play the famous zen tunes in your help desk.",
|
4
|
-
"name": "Buddha Machine"
|
5
|
-
},
|
6
|
-
"loading": "Welcome to this Sample App",
|
7
|
-
"fetch": {
|
8
|
-
"done": "Good",
|
9
|
-
"fail": "failed to fetch information from the server"
|
10
|
-
},
|
11
|
-
"id": "ID",
|
12
|
-
"email": "Email",
|
13
|
-
"name": "Name",
|
14
|
-
"role": "Role",
|
15
|
-
"groups": "Groups"
|
16
|
-
}
|