zendesk_apps_tools 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +4 -98
- data/features/new.feature +0 -1
- data/lib/zendesk_apps_tools/command.rb +1 -1
- data/template/templates/layout.hdbs +0 -1
- metadata +2 -2
data/README.md
CHANGED
@@ -4,109 +4,15 @@ These tools make it easy to develop [Zendesk Apps](http://developer.zendesk.com/
|
|
4
4
|
|
5
5
|
# How to use
|
6
6
|
|
7
|
-
|
8
|
-
|
9
|
-
$ gem install zendesk_apps_tools
|
10
|
-
|
11
|
-
**STEP 2**: Create a new app using 'zat'. Here's an example:
|
12
|
-
|
13
|
-
$ zat new
|
14
|
-
Enter this app author's name:
|
15
|
-
John Smith
|
16
|
-
Enter this app author's email:
|
17
|
-
john@example.com
|
18
|
-
Enter a name for this new app:
|
19
|
-
Test App
|
20
|
-
Enter a directory name to save the new app (will create the dir if it dose not exist, default to current dir):
|
21
|
-
/tmp/test-app
|
22
|
-
create /tmp/test-app
|
23
|
-
create /tmp/test-app/app.css
|
24
|
-
create /tmp/test-app/app.js
|
25
|
-
create /tmp/test-app/assets/logo-small.png
|
26
|
-
create /tmp/test-app/assets/logo.png
|
27
|
-
create /tmp/test-app/manifest.json
|
28
|
-
create /tmp/test-app/templates/layout.hdbs
|
29
|
-
create /tmp/test-app/translations/en.json
|
30
|
-
|
31
|
-
**STEP 3**: Work on the new app by editing/adding the files in /tmp/test-app folder.
|
32
|
-
|
33
|
-
**STEP 4**: Validate the app.
|
34
|
-
|
35
|
-
$ zat validate --path /tmp/test-app
|
36
|
-
|
37
|
-
**STEP 5**: Preview the app.
|
38
|
-
|
39
|
-
To preview a local app, follow these steps:
|
40
|
-
|
41
|
-
1) Start zat server
|
42
|
-
|
43
|
-
$ zat server --path /tmp/test-app
|
44
|
-
|
45
|
-
[2013-01-10 16:54:48] INFO WEBrick 1.3.1
|
46
|
-
[2013-01-10 16:54:48] INFO ruby 1.9.3 (2012-04-20) [x86_64-darwin12.0.0]
|
47
|
-
== Sinatra/1.3.3 has taken the stage on 4567 for development with backup from WEBrick
|
48
|
-
[2013-01-10 16:54:48] INFO WEBrick::HTTPServer#start: pid=76568 port=4567
|
49
|
-
|
50
|
-
2) In your favorite browser, navigate to a ticket in New Zendesk. The URL should be something like https://subdomain.zendesk.com/agent/#/tickets/1
|
51
|
-
|
52
|
-
3) Edit the URL in the address bar to include a 'zat' parameter `?zat=http://localhost:4567/app.js`, then reload the page.
|
53
|
-
|
54
|
-
The full url should look something like this: https://subdomain.zendesk.com/agent/?zat=http://localhost:4567/app.js#/tickets/1
|
55
|
-
|
56
|
-
The value of 'zat' is the web address to serve the app locally. The port number should match the 'zat server' port number from previous step.
|
57
|
-
|
58
|
-
4) Reload the apps by clicking the 'Reload Apps' link. The local app will appear in the app panel.
|
59
|
-
(Note: if you are using Chrome, and you see a 'Shield' icon in the address bar, click that icon, and it says 'This page has insecure content', then click 'Load Anyway'. This is because the page is using https, but we are loading the local app using http.)
|
60
|
-
|
61
|
-
**STEP 6**: Package the app.
|
62
|
-
|
63
|
-
$ zat package --path /tmp/test-app
|
64
|
-
Enter a zendesk URL that you'd like to install the app (for example: 'http://abc.zendesk.com', default to 'http://support.zendesk.com'):
|
65
|
-
|
66
|
-
validate OK
|
67
|
-
package adding app.css
|
68
|
-
package adding app.js
|
69
|
-
package adding assets/logo-small.png
|
70
|
-
package adding assets/logo.png
|
71
|
-
package adding manifest.json
|
72
|
-
package adding templates/layout.hdbs
|
73
|
-
package adding translations/en.json
|
74
|
-
package created at /tmp/test-app/tmp/app-20130110164906.zip
|
75
|
-
|
76
|
-
Now you can [upload the created zip](http://developer.zendesk.com/documentation/apps/uploading.html).
|
7
|
+
Please refer to [our guide](http://developer.zendesk.com/documentation/apps/reference/tools.html).
|
77
8
|
|
78
9
|
# Features
|
79
10
|
|
80
|
-
|
81
|
-
Create a template for a Zendesk App.
|
82
|
-
|
83
|
-
$ zat new
|
84
|
-
|
85
|
-
### Validate an App
|
86
|
-
Run a suite of validations against your App:
|
87
|
-
|
88
|
-
$ zat validate
|
89
|
-
|
90
|
-
This will run the same validations that run when an App is uploaded to the Zendesk App Market.
|
91
|
-
|
92
|
-
### Preview the App
|
93
|
-
Run a http server to serve the App locally.
|
94
|
-
|
95
|
-
$ zat server
|
96
|
-
|
97
|
-
### Package the app
|
98
|
-
Create a zip file that you can [upload](http://developer.zendesk.com/documentation/apps/uploading.html).
|
99
|
-
|
100
|
-
$ zat package
|
101
|
-
|
102
|
-
### Clean tmp folder inside an App
|
103
|
-
Remove zip files in the tmp folder.
|
104
|
-
|
105
|
-
$ zat clean
|
11
|
+
Please refer to [our guide](http://developer.zendesk.com/documentation/apps/reference/tools.html).
|
106
12
|
|
107
13
|
# Supported Ruby Versions
|
108
14
|
|
109
|
-
Tested with Ruby 1.8.7 and 1.9.3
|
15
|
+
Tested with Ruby 1.8.7 and 1.9.3.
|
110
16
|
|
111
17
|
# Contribution
|
112
18
|
|
@@ -114,4 +20,4 @@ Improvements are always welcome. To contribute, please submit detailed Pull Requ
|
|
114
20
|
|
115
21
|
# Issues
|
116
22
|
|
117
|
-
Please
|
23
|
+
Please <a href="https://support.zendesk.com/requests/new">submit bug reports to Zendesk</a>.
|
data/features/new.feature
CHANGED
@@ -27,7 +27,7 @@ module ZendeskAppsTools
|
|
27
27
|
puts "Enter a name for this new app:"
|
28
28
|
@app_name = get_value_from_stdin(/^\w.*$/, "Invalid app name, try again:")
|
29
29
|
|
30
|
-
puts "Enter a directory name to save the new app (will create the dir if it
|
30
|
+
puts "Enter a directory name to save the new app (will create the dir if it does not exist, default to current dir):"
|
31
31
|
while @app_dir = $stdin.readline.chomp.strip do
|
32
32
|
@app_dir = './' and break if @app_dir.empty?
|
33
33
|
if !File.exists?(@app_dir)
|
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: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -12,7 +12,7 @@ authors:
|
|
12
12
|
autorequire:
|
13
13
|
bindir: bin
|
14
14
|
cert_chain: []
|
15
|
-
date: 2013-01-
|
15
|
+
date: 2013-01-30 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: thor
|