zendesk_api 1.3.5 → 1.3.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +2 -2
- data/.yardopts +0 -2
- data/Gemfile +4 -30
- data/Gemfile.lock +38 -80
- data/Rakefile +0 -5
- data/lib/zendesk_api/actions.rb +3 -2
- data/lib/zendesk_api/client.rb +4 -1
- data/lib/zendesk_api/collection.rb +4 -0
- data/lib/zendesk_api/configuration.rb +2 -0
- data/lib/zendesk_api/middleware/request/upload.rb +1 -1
- data/lib/zendesk_api/middleware/request/url_based_access_token.rb +26 -0
- data/lib/zendesk_api/resources.rb +25 -1
- data/lib/zendesk_api/version.rb +1 -1
- data/spec/core/client_spec.rb +1 -0
- data/spec/core/middleware/request/upload_spec.rb +26 -27
- data/spec/core/spec_helper.rb +27 -1
- data/spec/live/user_spec.rb +4 -2
- data/spec/live/user_view_spec.rb +16 -0
- data/spec/live/voice/phone_number_spec.rb +2 -0
- data/zendesk_api.gemspec +1 -4
- metadata +9 -191
- data/Procfile +0 -1
- data/bin/zendesk +0 -27
- data/config.ru +0 -6
- data/config/mongoid.yml +0 -81
- data/config/newrelic.yml +0 -255
- data/lib/zendesk_api/console/base.rb +0 -12
- data/lib/zendesk_api/console/console.rb +0 -144
- data/lib/zendesk_api/console/extensions.rb +0 -202
- data/lib/zendesk_api/console/options.rb +0 -41
- data/lib/zendesk_api/server/base.rb +0 -123
- data/lib/zendesk_api/server/docs/account_settings.md +0 -191
- data/lib/zendesk_api/server/docs/activity_stream.md +0 -121
- data/lib/zendesk_api/server/docs/attachments.md +0 -142
- data/lib/zendesk_api/server/docs/autocomplete.md +0 -29
- data/lib/zendesk_api/server/docs/automations.md +0 -256
- data/lib/zendesk_api/server/docs/categories.md +0 -193
- data/lib/zendesk_api/server/docs/changes_roadmap.md +0 -286
- data/lib/zendesk_api/server/docs/custom_roles.md +0 -88
- data/lib/zendesk_api/server/docs/forum_subscriptions.md +0 -139
- data/lib/zendesk_api/server/docs/forums.md +0 -229
- data/lib/zendesk_api/server/docs/group_memberships.md +0 -229
- data/lib/zendesk_api/server/docs/groups.md +0 -212
- data/lib/zendesk_api/server/docs/introduction.md +0 -165
- data/lib/zendesk_api/server/docs/job_statuses.md +0 -86
- data/lib/zendesk_api/server/docs/locales.md +0 -124
- data/lib/zendesk_api/server/docs/macros.md +0 -289
- data/lib/zendesk_api/server/docs/organizations.md +0 -271
- data/lib/zendesk_api/server/docs/problems.md +0 -117
- data/lib/zendesk_api/server/docs/requests.md +0 -274
- data/lib/zendesk_api/server/docs/satisfaction_ratings.md +0 -172
- data/lib/zendesk_api/server/docs/search.md +0 -106
- data/lib/zendesk_api/server/docs/sharing_agreements.md +0 -57
- data/lib/zendesk_api/server/docs/side_loading.md +0 -125
- data/lib/zendesk_api/server/docs/suspended_tickets.md +0 -184
- data/lib/zendesk_api/server/docs/tags.md +0 -145
- data/lib/zendesk_api/server/docs/ticket_audits.md +0 -688
- data/lib/zendesk_api/server/docs/ticket_export.md +0 -121
- data/lib/zendesk_api/server/docs/ticket_fields.md +0 -277
- data/lib/zendesk_api/server/docs/ticket_import.md +0 -65
- data/lib/zendesk_api/server/docs/ticket_metrics.md +0 -125
- data/lib/zendesk_api/server/docs/tickets.md +0 -696
- data/lib/zendesk_api/server/docs/topic_comments.md +0 -221
- data/lib/zendesk_api/server/docs/topic_subscriptions.md +0 -140
- data/lib/zendesk_api/server/docs/topic_votes.md +0 -153
- data/lib/zendesk_api/server/docs/topics.md +0 -335
- data/lib/zendesk_api/server/docs/triggers.md +0 -264
- data/lib/zendesk_api/server/docs/user_identities.md +0 -279
- data/lib/zendesk_api/server/docs/users.md +0 -455
- data/lib/zendesk_api/server/docs/views.md +0 -644
- data/lib/zendesk_api/server/helper.rb +0 -110
- data/lib/zendesk_api/server/html_renderer.rb +0 -98
- data/lib/zendesk_api/server/models/user_request.rb +0 -16
- data/lib/zendesk_api/server/models/zlib_json.rb +0 -13
- data/lib/zendesk_api/server/public/config.rb +0 -26
- data/lib/zendesk_api/server/public/doc/ZendeskAPI.html +0 -131
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Ability.html +0 -592
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Activity.html +0 -979
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Attachment.html +0 -658
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Automation.html +0 -805
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Bookmark.html +0 -606
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/CRMData.html +0 -592
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/CRMDataStatus.html +0 -592
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Category.html +0 -825
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Client.html +0 -1226
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Collection.html +0 -2606
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Configuration.html +0 -1302
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Create.html +0 -392
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Create/ClassMethods.html +0 -283
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/CreateResource.html +0 -878
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/CustomRole.html +0 -592
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Data.html +0 -1406
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/DataResource.html +0 -823
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/DeleteResource.html +0 -815
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Destroy.html +0 -357
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Destroy/ClassMethod.html +0 -295
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Error.html +0 -115
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Error/ClientError.html +0 -127
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Error/NetworkError.html +0 -127
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Error/RecordInvalid.html +0 -371
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Error/RecordNotFound.html +0 -127
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Forum.html +0 -1559
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/ForumSubscription.html +0 -979
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Group.html +0 -606
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/GroupMembership.html +0 -979
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/JobStatus.html +0 -598
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Locale.html +0 -598
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Macro.html +0 -805
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/MobileDevice.html +0 -724
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/OAuthClient.html +0 -606
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/OAuthToken.html +0 -810
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Organization.html +0 -1379
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/OrganizationField.html +0 -606
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Read.html +0 -341
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/ReadResource.html +0 -797
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Request.html +0 -1189
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Request/Comment.html +0 -993
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Resource.html +0 -1263
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Role.html +0 -592
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Rule.html +0 -610
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/RuleExecution.html +0 -679
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/SatisfactionRating.html +0 -1327
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Save.html +0 -494
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Search.html +0 -411
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Search/Result.html +0 -462
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Setting.html +0 -742
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/SharingAgreement.html +0 -598
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/SingularResource.html +0 -610
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/SuspendedTicket.html +0 -911
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Ticket.html +0 -3094
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Ticket/Audit.html +0 -787
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Ticket/Comment.html +0 -1039
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Ticket/Tag.html +0 -606
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/TicketField.html +0 -606
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/TicketMetric.html +0 -782
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Topic.html +0 -1449
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Topic/TopicComment.html +0 -1122
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Topic/TopicVote.html +0 -983
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/TopicComment.html +0 -1039
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/TopicSubscription.html +0 -979
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Trigger.html +0 -805
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Update.html +0 -392
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Update/ClassMethod.html +0 -287
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/UpdateResource.html +0 -878
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Upload.html +0 -1176
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/User.html +0 -3974
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/User/Identity.html +0 -926
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/User/TopicComment.html +0 -656
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/UserField.html +0 -606
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/Verbs.html +0 -332
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/View.html +0 -1650
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/ViewCount.html +0 -592
- data/lib/zendesk_api/server/public/doc/ZendeskAPI/ViewRow.html +0 -1744
- data/lib/zendesk_api/server/public/doc/_index.html +0 -799
- data/lib/zendesk_api/server/public/doc/class_list.html +0 -53
- data/lib/zendesk_api/server/public/doc/css/common.css +0 -1
- data/lib/zendesk_api/server/public/doc/css/full_list.css +0 -57
- data/lib/zendesk_api/server/public/doc/css/style.css +0 -338
- data/lib/zendesk_api/server/public/doc/file.Readme.html +0 -137
- data/lib/zendesk_api/server/public/doc/file_list.html +0 -55
- data/lib/zendesk_api/server/public/doc/frames.html +0 -28
- data/lib/zendesk_api/server/public/doc/index.html +0 -137
- data/lib/zendesk_api/server/public/doc/js/app.js +0 -214
- data/lib/zendesk_api/server/public/doc/js/full_list.js +0 -173
- data/lib/zendesk_api/server/public/doc/js/jquery.js +0 -4
- data/lib/zendesk_api/server/public/doc/method_list.html +0 -2332
- data/lib/zendesk_api/server/public/doc/top-level-namespace.html +0 -112
- data/lib/zendesk_api/server/public/favicon.ico +0 -0
- data/lib/zendesk_api/server/public/images/glyphicons-halflings-white.png +0 -0
- data/lib/zendesk_api/server/public/images/glyphicons-halflings.png +0 -0
- data/lib/zendesk_api/server/public/images/spinner.gif +0 -0
- data/lib/zendesk_api/server/public/images/zendesk_developers_bg.png +0 -0
- data/lib/zendesk_api/server/public/images/zendesk_developers_header.png +0 -0
- data/lib/zendesk_api/server/public/javascripts/application.js +0 -186
- data/lib/zendesk_api/server/public/javascripts/bootstrap-alert.js +0 -90
- data/lib/zendesk_api/server/public/javascripts/bootstrap-button.js +0 -96
- data/lib/zendesk_api/server/public/javascripts/bootstrap-carousel.js +0 -169
- data/lib/zendesk_api/server/public/javascripts/bootstrap-collapse.js +0 -157
- data/lib/zendesk_api/server/public/javascripts/bootstrap-dropdown.js +0 -100
- data/lib/zendesk_api/server/public/javascripts/bootstrap-modal.js +0 -218
- data/lib/zendesk_api/server/public/javascripts/bootstrap-popover.js +0 -98
- data/lib/zendesk_api/server/public/javascripts/bootstrap-scrollspy.js +0 -151
- data/lib/zendesk_api/server/public/javascripts/bootstrap-tab.js +0 -135
- data/lib/zendesk_api/server/public/javascripts/bootstrap-tooltip.js +0 -275
- data/lib/zendesk_api/server/public/javascripts/bootstrap-transition.js +0 -61
- data/lib/zendesk_api/server/public/javascripts/bootstrap-typeahead.js +0 -285
- data/lib/zendesk_api/server/public/sass/screen.scss +0 -102
- data/lib/zendesk_api/server/public/sass/styles.scss +0 -5
- data/lib/zendesk_api/server/public/stylesheets/developer.screen.css +0 -836
- data/lib/zendesk_api/server/public/stylesheets/screen.css +0 -129
- data/lib/zendesk_api/server/public/stylesheets/styles.css +0 -6208
- data/lib/zendesk_api/server/templates/footer.haml +0 -13
- data/lib/zendesk_api/server/templates/header.haml +0 -20
- data/lib/zendesk_api/server/templates/index.haml +0 -68
- data/lib/zendesk_api/server/templates/layout.haml +0 -44
- data/lib/zendesk_api/server/templates/param.haml +0 -4
- data/lib/zendesk_api/server/templates/search.haml +0 -23
- data/lib/zendesk_api/server/templates/sidebar.haml +0 -7
- data/spec/server/app_spec.rb +0 -140
- data/spec/server/helper_spec.rb +0 -97
- data/spec/server/html_renderer_spec.rb +0 -130
- data/spec/server/spec_helper.rb +0 -43
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a8b73e0b2eea3b49827b9c51e491844b3b1c8aaa
|
4
|
+
data.tar.gz: 2fc0ef98f91e5e7b72233f60cd486975b099f830
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7914bfee9601f839db64cd49a025f27f693ba0ffee305db7e259494da1664f8837c56e1434738b2be972283ebdf381b9dc11bd227d334faaa32d4d8cff18c89a
|
7
|
+
data.tar.gz: 6a847c4d6996077966632fd9d07cf2568c93180246d2561707b61b617dca9161e0833d8baf402eaa82b8c62bedcd8359f4cd2b6c0bbc57f7b6019c69442c9d4f
|
data/.travis.yml
CHANGED
data/.yardopts
CHANGED
data/Gemfile
CHANGED
@@ -1,39 +1,13 @@
|
|
1
1
|
source 'https://rubygems.org'
|
2
2
|
|
3
|
-
# gem "bundler", "~> 1.2.0"
|
4
|
-
# ruby "1.9.3"
|
5
|
-
|
6
3
|
gem "simplecov", :platforms => :ruby_19, :group => :test
|
7
4
|
gem "jruby-openssl", :platforms => :jruby
|
8
5
|
|
9
|
-
group :
|
10
|
-
gem "
|
11
|
-
|
12
|
-
gem "rack-ssl-enforcer"
|
13
|
-
|
14
|
-
gem "sinatra"
|
15
|
-
gem "sinatra-contrib"
|
16
|
-
|
17
|
-
gem "haml"
|
18
|
-
|
19
|
-
gem "compass"
|
20
|
-
gem "bootstrap-sass"
|
21
|
-
|
22
|
-
gem "coderay"
|
23
|
-
gem "coderay_bash"
|
6
|
+
group :test do
|
7
|
+
gem "json", :platform => :ruby_18
|
24
8
|
|
25
|
-
|
26
|
-
|
27
|
-
gem "mongoid"
|
28
|
-
gem "database_cleaner"
|
29
|
-
|
30
|
-
gem "newrelic_rpm"
|
9
|
+
# only used for uploads testing
|
10
|
+
gem "actionpack", "~> 3.2"
|
31
11
|
end
|
32
12
|
|
33
|
-
group :console do
|
34
|
-
gem "ripl"
|
35
|
-
end
|
36
|
-
|
37
|
-
gem "json", :group => :test, :platform => :ruby_18
|
38
|
-
|
39
13
|
gemspec
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
zendesk_api (1.3.
|
4
|
+
zendesk_api (1.3.7)
|
5
5
|
faraday (~> 0.9)
|
6
6
|
hashie (>= 1.2)
|
7
7
|
inflection
|
@@ -12,127 +12,85 @@ PATH
|
|
12
12
|
GEM
|
13
13
|
remote: https://rubygems.org/
|
14
14
|
specs:
|
15
|
-
|
16
|
-
|
15
|
+
actionpack (3.2.18)
|
16
|
+
activemodel (= 3.2.18)
|
17
|
+
activesupport (= 3.2.18)
|
17
18
|
builder (~> 3.0.0)
|
18
|
-
|
19
|
+
erubis (~> 2.7.0)
|
20
|
+
journey (~> 1.0.4)
|
21
|
+
rack (~> 1.4.5)
|
22
|
+
rack-cache (~> 1.2)
|
23
|
+
rack-test (~> 0.6.1)
|
24
|
+
sprockets (~> 2.2.1)
|
25
|
+
activemodel (3.2.18)
|
26
|
+
activesupport (= 3.2.18)
|
27
|
+
builder (~> 3.0.0)
|
28
|
+
activesupport (3.2.18)
|
19
29
|
i18n (~> 0.6, >= 0.6.4)
|
20
30
|
multi_json (~> 1.0)
|
21
|
-
addressable (2.3.
|
22
|
-
backports (3.5.0)
|
23
|
-
bond (0.4.3)
|
24
|
-
bootstrap-sass (3.1.0.2)
|
25
|
-
sass (~> 3.2)
|
31
|
+
addressable (2.3.6)
|
26
32
|
builder (3.0.4)
|
27
33
|
bump (0.5.0)
|
28
|
-
chunky_png (1.3.0)
|
29
|
-
coderay (1.1.0)
|
30
|
-
coderay_bash (1.0.5)
|
31
|
-
coderay (>= 1.0)
|
32
|
-
compass (0.12.2)
|
33
|
-
chunky_png (~> 1.2)
|
34
|
-
fssm (>= 0.2.7)
|
35
|
-
sass (~> 3.1)
|
36
34
|
crack (0.4.2)
|
37
35
|
safe_yaml (~> 1.0.0)
|
38
|
-
daemons (1.1.9)
|
39
|
-
database_cleaner (1.2.0)
|
40
36
|
diff-lcs (1.2.5)
|
41
37
|
docile (1.1.3)
|
42
|
-
|
38
|
+
erubis (2.7.0)
|
43
39
|
faraday (0.9.0)
|
44
40
|
multipart-post (>= 1.2, < 3)
|
45
|
-
|
46
|
-
|
47
|
-
tilt
|
48
|
-
hashie (2.1.0)
|
41
|
+
hashie (2.1.1)
|
42
|
+
hike (1.2.3)
|
49
43
|
i18n (0.6.9)
|
50
44
|
inflection (1.0.0)
|
45
|
+
journey (1.0.4)
|
51
46
|
json (1.8.1)
|
52
47
|
mime-types (1.25.1)
|
53
|
-
|
54
|
-
activemodel (~> 3.2)
|
55
|
-
moped (~> 1.4)
|
56
|
-
origin (~> 1.0)
|
57
|
-
tzinfo (~> 0.3.29)
|
58
|
-
moped (1.5.2)
|
59
|
-
multi_json (1.8.4)
|
48
|
+
multi_json (1.10.0)
|
60
49
|
multipart-post (2.0.0)
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
rack-protection (1.5.2)
|
65
|
-
rack
|
66
|
-
rack-ssl-enforcer (0.2.6)
|
50
|
+
rack (1.4.5)
|
51
|
+
rack-cache (1.2)
|
52
|
+
rack (>= 0.4)
|
67
53
|
rack-test (0.6.2)
|
68
54
|
rack (>= 1.0)
|
69
|
-
rake (10.
|
70
|
-
redcarpet (3.0.0)
|
71
|
-
ripl (0.7.0)
|
72
|
-
bond (~> 0.4.2)
|
55
|
+
rake (10.3.2)
|
73
56
|
rspec (2.14.1)
|
74
57
|
rspec-core (~> 2.14.0)
|
75
58
|
rspec-expectations (~> 2.14.0)
|
76
59
|
rspec-mocks (~> 2.14.0)
|
77
|
-
rspec-core (2.14.
|
60
|
+
rspec-core (2.14.8)
|
78
61
|
rspec-expectations (2.14.5)
|
79
62
|
diff-lcs (>= 1.1.3, < 2.0)
|
80
|
-
rspec-mocks (2.14.
|
81
|
-
safe_yaml (1.0.
|
82
|
-
sass (3.2.14)
|
63
|
+
rspec-mocks (2.14.6)
|
64
|
+
safe_yaml (1.0.3)
|
83
65
|
simplecov (0.8.2)
|
84
66
|
docile (~> 1.1.0)
|
85
67
|
multi_json
|
86
68
|
simplecov-html (~> 0.8.0)
|
87
69
|
simplecov-html (0.8.0)
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
backports (>= 2.0)
|
94
|
-
multi_json
|
95
|
-
rack-protection
|
96
|
-
rack-test
|
97
|
-
sinatra (~> 1.4.0)
|
98
|
-
tilt (~> 1.3)
|
99
|
-
thin (1.6.1)
|
100
|
-
daemons (>= 1.0.9)
|
101
|
-
eventmachine (>= 1.0.0)
|
102
|
-
rack (>= 1.0.0)
|
70
|
+
sprockets (2.2.2)
|
71
|
+
hike (~> 1.2)
|
72
|
+
multi_json (~> 1.0)
|
73
|
+
rack (~> 1.0)
|
74
|
+
tilt (~> 1.1, != 1.3.0)
|
103
75
|
tilt (1.4.1)
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
addressable (>= 2.2.7)
|
76
|
+
vcr (2.9.0)
|
77
|
+
webmock (1.18.0)
|
78
|
+
addressable (>= 2.3.6)
|
108
79
|
crack (>= 0.3.2)
|
109
|
-
yard (0.8.7.
|
80
|
+
yard (0.8.7.4)
|
110
81
|
|
111
82
|
PLATFORMS
|
112
83
|
ruby
|
113
84
|
|
114
85
|
DEPENDENCIES
|
115
|
-
|
86
|
+
actionpack (~> 3.2)
|
116
87
|
bump
|
117
|
-
coderay
|
118
|
-
coderay_bash
|
119
|
-
compass
|
120
|
-
database_cleaner
|
121
|
-
haml
|
122
88
|
jruby-openssl
|
123
89
|
json
|
124
|
-
mongoid
|
125
|
-
newrelic_rpm
|
126
|
-
rack-ssl-enforcer
|
127
90
|
rake
|
128
|
-
redcarpet
|
129
|
-
ripl
|
130
91
|
rspec
|
131
92
|
simplecov
|
132
|
-
sinatra
|
133
|
-
sinatra-contrib
|
134
|
-
thin
|
135
93
|
vcr
|
136
|
-
webmock
|
94
|
+
webmock
|
137
95
|
yard
|
138
96
|
zendesk_api!
|
data/Rakefile
CHANGED
@@ -13,11 +13,6 @@ if defined?(RSpec)
|
|
13
13
|
t.pattern = "spec/core/**/*_spec.rb"
|
14
14
|
end
|
15
15
|
|
16
|
-
desc "Run server specs"
|
17
|
-
RSpec::Core::RakeTask.new("spec:server") do |t|
|
18
|
-
t.pattern = "spec/server/**/*_spec.rb"
|
19
|
-
end
|
20
|
-
|
21
16
|
desc "Run live specs"
|
22
17
|
RSpec::Core::RakeTask.new("spec:live") do |t|
|
23
18
|
t.pattern = "spec/live/**/*_spec.rb"
|
data/lib/zendesk_api/actions.rb
CHANGED
@@ -55,6 +55,7 @@ module ZendeskAPI
|
|
55
55
|
def save_associations
|
56
56
|
self.class.associations.each do |association_data|
|
57
57
|
association_name = association_data[:name]
|
58
|
+
|
58
59
|
next unless send("#{association_name}_used?") && association = send(association_name)
|
59
60
|
|
60
61
|
inline_creation = association_data[:inline] == :create && new_record?
|
@@ -64,8 +65,8 @@ module ZendeskAPI
|
|
64
65
|
self.send("#{association_name}=", association) # set id/ids columns
|
65
66
|
end
|
66
67
|
|
67
|
-
if (association_data[:inline] == true || inline_creation) &&
|
68
|
-
attributes[association_name] =
|
68
|
+
if (association_data[:inline] == true || inline_creation) && changed
|
69
|
+
attributes[association_name] = association.to_param
|
69
70
|
end
|
70
71
|
end
|
71
72
|
end
|
data/lib/zendesk_api/client.rb
CHANGED
@@ -9,6 +9,7 @@ require 'zendesk_api/middleware/request/etag_cache'
|
|
9
9
|
require 'zendesk_api/middleware/request/retry'
|
10
10
|
require 'zendesk_api/middleware/request/upload'
|
11
11
|
require 'zendesk_api/middleware/request/encode_json'
|
12
|
+
require 'zendesk_api/middleware/request/url_based_access_token'
|
12
13
|
require 'zendesk_api/middleware/response/callback'
|
13
14
|
require 'zendesk_api/middleware/response/deflate'
|
14
15
|
require 'zendesk_api/middleware/response/gzip'
|
@@ -145,8 +146,10 @@ module ZendeskAPI
|
|
145
146
|
end
|
146
147
|
|
147
148
|
# request
|
148
|
-
if config.access_token
|
149
|
+
if config.access_token && !config.url_based_access_token
|
149
150
|
builder.authorization("Bearer", config.access_token)
|
151
|
+
elsif config.access_token
|
152
|
+
builder.use ZendeskAPI::Middleware::Request::UrlBasedAccessToken, config.access_token
|
150
153
|
else
|
151
154
|
builder.use Faraday::Request::BasicAuthentication, config.username, config.password
|
152
155
|
end
|
@@ -31,6 +31,8 @@ module ZendeskAPI
|
|
31
31
|
# @return [String] OAuth2 access_token
|
32
32
|
attr_accessor :access_token
|
33
33
|
|
34
|
+
attr_accessor :url_based_access_token
|
35
|
+
|
34
36
|
# Use this cache instead of default ZendeskAPI::LRUCache.new
|
35
37
|
# - must respond to read/write/fetch e.g. ActiveSupport::Cache::MemoryStore.new)
|
36
38
|
# - pass false to disable caching
|
@@ -0,0 +1,26 @@
|
|
1
|
+
module ZendeskAPI
|
2
|
+
# @private
|
3
|
+
module Middleware
|
4
|
+
# @private
|
5
|
+
module Request
|
6
|
+
class UrlBasedAccessToken < Faraday::Middleware
|
7
|
+
def initialize(app, token)
|
8
|
+
super(app)
|
9
|
+
@token = token
|
10
|
+
end
|
11
|
+
|
12
|
+
def call(env)
|
13
|
+
if env[:url].query
|
14
|
+
env[:url].query += '&'
|
15
|
+
else
|
16
|
+
env[:url].query = ''
|
17
|
+
end
|
18
|
+
|
19
|
+
env[:url].query += "access_token=#{@token}"
|
20
|
+
|
21
|
+
@app.call(env)
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
@@ -289,6 +289,7 @@ module ZendeskAPI
|
|
289
289
|
has_many Comment
|
290
290
|
|
291
291
|
has Organization
|
292
|
+
has Group
|
292
293
|
has :requester, :class => User
|
293
294
|
end
|
294
295
|
|
@@ -334,7 +335,13 @@ module ZendeskAPI
|
|
334
335
|
has :requester, :class => User, :inline => :create
|
335
336
|
has :submitter, :class => User
|
336
337
|
has :assignee, :class => User
|
337
|
-
|
338
|
+
|
339
|
+
has_many :collaborators, :class => User, :inline => true, :extend => (Module.new do
|
340
|
+
def to_param
|
341
|
+
map(&:id)
|
342
|
+
end
|
343
|
+
end)
|
344
|
+
|
338
345
|
has_many Audit
|
339
346
|
has :metrics, :class => TicketMetric
|
340
347
|
has Group
|
@@ -388,6 +395,13 @@ module ZendeskAPI
|
|
388
395
|
put :recover
|
389
396
|
end
|
390
397
|
|
398
|
+
class UserViewRow < DataResource
|
399
|
+
has User
|
400
|
+
def self.model_key
|
401
|
+
"rows"
|
402
|
+
end
|
403
|
+
end
|
404
|
+
|
391
405
|
class ViewRow < DataResource
|
392
406
|
has Ticket
|
393
407
|
|
@@ -466,6 +480,12 @@ module ZendeskAPI
|
|
466
480
|
end
|
467
481
|
end
|
468
482
|
|
483
|
+
class UserView < Rule
|
484
|
+
def self.preview(client, options = {})
|
485
|
+
Collection.new(client, UserViewRow, options.merge!(:path => "user_views/preview", :verb => :post))
|
486
|
+
end
|
487
|
+
end
|
488
|
+
|
469
489
|
class GroupMembership < Resource
|
470
490
|
has User
|
471
491
|
has Group
|
@@ -578,6 +598,10 @@ module ZendeskAPI
|
|
578
598
|
namespace "channels/voice"
|
579
599
|
end
|
580
600
|
|
601
|
+
class CertificationAddress < Resource
|
602
|
+
namespace "channels/voice"
|
603
|
+
end
|
604
|
+
|
581
605
|
class Greeting < Resource
|
582
606
|
namespace "channels/voice"
|
583
607
|
end
|
data/lib/zendesk_api/version.rb
CHANGED
data/spec/core/client_spec.rb
CHANGED
@@ -240,6 +240,7 @@ describe ZendeskAPI::Client do
|
|
240
240
|
end
|
241
241
|
|
242
242
|
it "manages namespace correctly" do
|
243
|
+
client.certification_addresses.path.should match(/channels\/voice\/certification_addresses/)
|
243
244
|
client.phone_numbers.path.should match(/channels\/voice\/phone_numbers/)
|
244
245
|
client.greetings.path.should match(/channels\/voice\/greetings/)
|
245
246
|
client.greeting_categories.path.should match(/channels\/voice\/greeting_categories/)
|
@@ -1,5 +1,6 @@
|
|
1
1
|
require 'core/spec_helper'
|
2
2
|
require 'tempfile'
|
3
|
+
require 'action_dispatch'
|
3
4
|
|
4
5
|
describe ZendeskAPI::Middleware::Request::Upload do
|
5
6
|
subject { ZendeskAPI::Middleware::Request::Upload.new(lambda {|env| env}) }
|
@@ -45,41 +46,39 @@ describe ZendeskAPI::Middleware::Request::Upload do
|
|
45
46
|
end
|
46
47
|
end
|
47
48
|
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
49
|
+
context "with an ActionDispatch::Http::UploadedFile" do
|
50
|
+
before(:each) do
|
51
|
+
@upload = ActionDispatch::Http::UploadedFile.new(:filename => "hello.jpg", :tempfile => Tempfile.new(['hello', '.jpg']))
|
52
|
+
@env = subject.call(:body => { :file => @upload })
|
53
|
+
end
|
53
54
|
|
54
|
-
|
55
|
-
|
56
|
-
def encoding_aware?; false; end
|
55
|
+
it "should convert file string to UploadIO" do
|
56
|
+
@env[:body][:uploaded_data].should be_instance_of(Faraday::UploadIO)
|
57
57
|
end
|
58
58
|
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
@env = subject.call(:body => { :file => @upload })
|
63
|
-
end
|
59
|
+
it "should remove file string" do
|
60
|
+
@env[:body][:file].should be_nil
|
61
|
+
end
|
64
62
|
|
65
|
-
|
66
|
-
|
67
|
-
|
63
|
+
it "should add filename if none exist" do
|
64
|
+
@env[:body][:filename].should == "hello.jpg"
|
65
|
+
end
|
68
66
|
|
69
|
-
|
70
|
-
|
71
|
-
|
67
|
+
it "should use the content type of the tempfile" do
|
68
|
+
@env[:body][:uploaded_data].content_type.should == "image/jpeg"
|
69
|
+
end
|
72
70
|
|
73
|
-
|
74
|
-
|
71
|
+
context "when path does not resolve a mime_type" do
|
72
|
+
it "should pass correct filename to Faraday::UploadIO" do
|
73
|
+
@env[:body][:filename].should == "hello.jpg"
|
74
|
+
@env[:body][:uploaded_data].original_filename.should == @env[:body][:filename]
|
75
75
|
end
|
76
76
|
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
end
|
77
|
+
it "should use the content_type of ActionDispatch::Http::UploadedFile " do
|
78
|
+
@upload.content_type = 'application/random'
|
79
|
+
|
80
|
+
env = subject.call(:body => { :file => @upload })
|
81
|
+
env[:body][:uploaded_data].content_type.should == 'application/random'
|
83
82
|
end
|
84
83
|
end
|
85
84
|
end
|