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.
Files changed (203) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +2 -2
  3. data/.yardopts +0 -2
  4. data/Gemfile +4 -30
  5. data/Gemfile.lock +38 -80
  6. data/Rakefile +0 -5
  7. data/lib/zendesk_api/actions.rb +3 -2
  8. data/lib/zendesk_api/client.rb +4 -1
  9. data/lib/zendesk_api/collection.rb +4 -0
  10. data/lib/zendesk_api/configuration.rb +2 -0
  11. data/lib/zendesk_api/middleware/request/upload.rb +1 -1
  12. data/lib/zendesk_api/middleware/request/url_based_access_token.rb +26 -0
  13. data/lib/zendesk_api/resources.rb +25 -1
  14. data/lib/zendesk_api/version.rb +1 -1
  15. data/spec/core/client_spec.rb +1 -0
  16. data/spec/core/middleware/request/upload_spec.rb +26 -27
  17. data/spec/core/spec_helper.rb +27 -1
  18. data/spec/live/user_spec.rb +4 -2
  19. data/spec/live/user_view_spec.rb +16 -0
  20. data/spec/live/voice/phone_number_spec.rb +2 -0
  21. data/zendesk_api.gemspec +1 -4
  22. metadata +9 -191
  23. data/Procfile +0 -1
  24. data/bin/zendesk +0 -27
  25. data/config.ru +0 -6
  26. data/config/mongoid.yml +0 -81
  27. data/config/newrelic.yml +0 -255
  28. data/lib/zendesk_api/console/base.rb +0 -12
  29. data/lib/zendesk_api/console/console.rb +0 -144
  30. data/lib/zendesk_api/console/extensions.rb +0 -202
  31. data/lib/zendesk_api/console/options.rb +0 -41
  32. data/lib/zendesk_api/server/base.rb +0 -123
  33. data/lib/zendesk_api/server/docs/account_settings.md +0 -191
  34. data/lib/zendesk_api/server/docs/activity_stream.md +0 -121
  35. data/lib/zendesk_api/server/docs/attachments.md +0 -142
  36. data/lib/zendesk_api/server/docs/autocomplete.md +0 -29
  37. data/lib/zendesk_api/server/docs/automations.md +0 -256
  38. data/lib/zendesk_api/server/docs/categories.md +0 -193
  39. data/lib/zendesk_api/server/docs/changes_roadmap.md +0 -286
  40. data/lib/zendesk_api/server/docs/custom_roles.md +0 -88
  41. data/lib/zendesk_api/server/docs/forum_subscriptions.md +0 -139
  42. data/lib/zendesk_api/server/docs/forums.md +0 -229
  43. data/lib/zendesk_api/server/docs/group_memberships.md +0 -229
  44. data/lib/zendesk_api/server/docs/groups.md +0 -212
  45. data/lib/zendesk_api/server/docs/introduction.md +0 -165
  46. data/lib/zendesk_api/server/docs/job_statuses.md +0 -86
  47. data/lib/zendesk_api/server/docs/locales.md +0 -124
  48. data/lib/zendesk_api/server/docs/macros.md +0 -289
  49. data/lib/zendesk_api/server/docs/organizations.md +0 -271
  50. data/lib/zendesk_api/server/docs/problems.md +0 -117
  51. data/lib/zendesk_api/server/docs/requests.md +0 -274
  52. data/lib/zendesk_api/server/docs/satisfaction_ratings.md +0 -172
  53. data/lib/zendesk_api/server/docs/search.md +0 -106
  54. data/lib/zendesk_api/server/docs/sharing_agreements.md +0 -57
  55. data/lib/zendesk_api/server/docs/side_loading.md +0 -125
  56. data/lib/zendesk_api/server/docs/suspended_tickets.md +0 -184
  57. data/lib/zendesk_api/server/docs/tags.md +0 -145
  58. data/lib/zendesk_api/server/docs/ticket_audits.md +0 -688
  59. data/lib/zendesk_api/server/docs/ticket_export.md +0 -121
  60. data/lib/zendesk_api/server/docs/ticket_fields.md +0 -277
  61. data/lib/zendesk_api/server/docs/ticket_import.md +0 -65
  62. data/lib/zendesk_api/server/docs/ticket_metrics.md +0 -125
  63. data/lib/zendesk_api/server/docs/tickets.md +0 -696
  64. data/lib/zendesk_api/server/docs/topic_comments.md +0 -221
  65. data/lib/zendesk_api/server/docs/topic_subscriptions.md +0 -140
  66. data/lib/zendesk_api/server/docs/topic_votes.md +0 -153
  67. data/lib/zendesk_api/server/docs/topics.md +0 -335
  68. data/lib/zendesk_api/server/docs/triggers.md +0 -264
  69. data/lib/zendesk_api/server/docs/user_identities.md +0 -279
  70. data/lib/zendesk_api/server/docs/users.md +0 -455
  71. data/lib/zendesk_api/server/docs/views.md +0 -644
  72. data/lib/zendesk_api/server/helper.rb +0 -110
  73. data/lib/zendesk_api/server/html_renderer.rb +0 -98
  74. data/lib/zendesk_api/server/models/user_request.rb +0 -16
  75. data/lib/zendesk_api/server/models/zlib_json.rb +0 -13
  76. data/lib/zendesk_api/server/public/config.rb +0 -26
  77. data/lib/zendesk_api/server/public/doc/ZendeskAPI.html +0 -131
  78. data/lib/zendesk_api/server/public/doc/ZendeskAPI/Ability.html +0 -592
  79. data/lib/zendesk_api/server/public/doc/ZendeskAPI/Activity.html +0 -979
  80. data/lib/zendesk_api/server/public/doc/ZendeskAPI/Attachment.html +0 -658
  81. data/lib/zendesk_api/server/public/doc/ZendeskAPI/Automation.html +0 -805
  82. data/lib/zendesk_api/server/public/doc/ZendeskAPI/Bookmark.html +0 -606
  83. data/lib/zendesk_api/server/public/doc/ZendeskAPI/CRMData.html +0 -592
  84. data/lib/zendesk_api/server/public/doc/ZendeskAPI/CRMDataStatus.html +0 -592
  85. data/lib/zendesk_api/server/public/doc/ZendeskAPI/Category.html +0 -825
  86. data/lib/zendesk_api/server/public/doc/ZendeskAPI/Client.html +0 -1226
  87. data/lib/zendesk_api/server/public/doc/ZendeskAPI/Collection.html +0 -2606
  88. data/lib/zendesk_api/server/public/doc/ZendeskAPI/Configuration.html +0 -1302
  89. data/lib/zendesk_api/server/public/doc/ZendeskAPI/Create.html +0 -392
  90. data/lib/zendesk_api/server/public/doc/ZendeskAPI/Create/ClassMethods.html +0 -283
  91. data/lib/zendesk_api/server/public/doc/ZendeskAPI/CreateResource.html +0 -878
  92. data/lib/zendesk_api/server/public/doc/ZendeskAPI/CustomRole.html +0 -592
  93. data/lib/zendesk_api/server/public/doc/ZendeskAPI/Data.html +0 -1406
  94. data/lib/zendesk_api/server/public/doc/ZendeskAPI/DataResource.html +0 -823
  95. data/lib/zendesk_api/server/public/doc/ZendeskAPI/DeleteResource.html +0 -815
  96. data/lib/zendesk_api/server/public/doc/ZendeskAPI/Destroy.html +0 -357
  97. data/lib/zendesk_api/server/public/doc/ZendeskAPI/Destroy/ClassMethod.html +0 -295
  98. data/lib/zendesk_api/server/public/doc/ZendeskAPI/Error.html +0 -115
  99. data/lib/zendesk_api/server/public/doc/ZendeskAPI/Error/ClientError.html +0 -127
  100. data/lib/zendesk_api/server/public/doc/ZendeskAPI/Error/NetworkError.html +0 -127
  101. data/lib/zendesk_api/server/public/doc/ZendeskAPI/Error/RecordInvalid.html +0 -371
  102. data/lib/zendesk_api/server/public/doc/ZendeskAPI/Error/RecordNotFound.html +0 -127
  103. data/lib/zendesk_api/server/public/doc/ZendeskAPI/Forum.html +0 -1559
  104. data/lib/zendesk_api/server/public/doc/ZendeskAPI/ForumSubscription.html +0 -979
  105. data/lib/zendesk_api/server/public/doc/ZendeskAPI/Group.html +0 -606
  106. data/lib/zendesk_api/server/public/doc/ZendeskAPI/GroupMembership.html +0 -979
  107. data/lib/zendesk_api/server/public/doc/ZendeskAPI/JobStatus.html +0 -598
  108. data/lib/zendesk_api/server/public/doc/ZendeskAPI/Locale.html +0 -598
  109. data/lib/zendesk_api/server/public/doc/ZendeskAPI/Macro.html +0 -805
  110. data/lib/zendesk_api/server/public/doc/ZendeskAPI/MobileDevice.html +0 -724
  111. data/lib/zendesk_api/server/public/doc/ZendeskAPI/OAuthClient.html +0 -606
  112. data/lib/zendesk_api/server/public/doc/ZendeskAPI/OAuthToken.html +0 -810
  113. data/lib/zendesk_api/server/public/doc/ZendeskAPI/Organization.html +0 -1379
  114. data/lib/zendesk_api/server/public/doc/ZendeskAPI/OrganizationField.html +0 -606
  115. data/lib/zendesk_api/server/public/doc/ZendeskAPI/Read.html +0 -341
  116. data/lib/zendesk_api/server/public/doc/ZendeskAPI/ReadResource.html +0 -797
  117. data/lib/zendesk_api/server/public/doc/ZendeskAPI/Request.html +0 -1189
  118. data/lib/zendesk_api/server/public/doc/ZendeskAPI/Request/Comment.html +0 -993
  119. data/lib/zendesk_api/server/public/doc/ZendeskAPI/Resource.html +0 -1263
  120. data/lib/zendesk_api/server/public/doc/ZendeskAPI/Role.html +0 -592
  121. data/lib/zendesk_api/server/public/doc/ZendeskAPI/Rule.html +0 -610
  122. data/lib/zendesk_api/server/public/doc/ZendeskAPI/RuleExecution.html +0 -679
  123. data/lib/zendesk_api/server/public/doc/ZendeskAPI/SatisfactionRating.html +0 -1327
  124. data/lib/zendesk_api/server/public/doc/ZendeskAPI/Save.html +0 -494
  125. data/lib/zendesk_api/server/public/doc/ZendeskAPI/Search.html +0 -411
  126. data/lib/zendesk_api/server/public/doc/ZendeskAPI/Search/Result.html +0 -462
  127. data/lib/zendesk_api/server/public/doc/ZendeskAPI/Setting.html +0 -742
  128. data/lib/zendesk_api/server/public/doc/ZendeskAPI/SharingAgreement.html +0 -598
  129. data/lib/zendesk_api/server/public/doc/ZendeskAPI/SingularResource.html +0 -610
  130. data/lib/zendesk_api/server/public/doc/ZendeskAPI/SuspendedTicket.html +0 -911
  131. data/lib/zendesk_api/server/public/doc/ZendeskAPI/Ticket.html +0 -3094
  132. data/lib/zendesk_api/server/public/doc/ZendeskAPI/Ticket/Audit.html +0 -787
  133. data/lib/zendesk_api/server/public/doc/ZendeskAPI/Ticket/Comment.html +0 -1039
  134. data/lib/zendesk_api/server/public/doc/ZendeskAPI/Ticket/Tag.html +0 -606
  135. data/lib/zendesk_api/server/public/doc/ZendeskAPI/TicketField.html +0 -606
  136. data/lib/zendesk_api/server/public/doc/ZendeskAPI/TicketMetric.html +0 -782
  137. data/lib/zendesk_api/server/public/doc/ZendeskAPI/Topic.html +0 -1449
  138. data/lib/zendesk_api/server/public/doc/ZendeskAPI/Topic/TopicComment.html +0 -1122
  139. data/lib/zendesk_api/server/public/doc/ZendeskAPI/Topic/TopicVote.html +0 -983
  140. data/lib/zendesk_api/server/public/doc/ZendeskAPI/TopicComment.html +0 -1039
  141. data/lib/zendesk_api/server/public/doc/ZendeskAPI/TopicSubscription.html +0 -979
  142. data/lib/zendesk_api/server/public/doc/ZendeskAPI/Trigger.html +0 -805
  143. data/lib/zendesk_api/server/public/doc/ZendeskAPI/Update.html +0 -392
  144. data/lib/zendesk_api/server/public/doc/ZendeskAPI/Update/ClassMethod.html +0 -287
  145. data/lib/zendesk_api/server/public/doc/ZendeskAPI/UpdateResource.html +0 -878
  146. data/lib/zendesk_api/server/public/doc/ZendeskAPI/Upload.html +0 -1176
  147. data/lib/zendesk_api/server/public/doc/ZendeskAPI/User.html +0 -3974
  148. data/lib/zendesk_api/server/public/doc/ZendeskAPI/User/Identity.html +0 -926
  149. data/lib/zendesk_api/server/public/doc/ZendeskAPI/User/TopicComment.html +0 -656
  150. data/lib/zendesk_api/server/public/doc/ZendeskAPI/UserField.html +0 -606
  151. data/lib/zendesk_api/server/public/doc/ZendeskAPI/Verbs.html +0 -332
  152. data/lib/zendesk_api/server/public/doc/ZendeskAPI/View.html +0 -1650
  153. data/lib/zendesk_api/server/public/doc/ZendeskAPI/ViewCount.html +0 -592
  154. data/lib/zendesk_api/server/public/doc/ZendeskAPI/ViewRow.html +0 -1744
  155. data/lib/zendesk_api/server/public/doc/_index.html +0 -799
  156. data/lib/zendesk_api/server/public/doc/class_list.html +0 -53
  157. data/lib/zendesk_api/server/public/doc/css/common.css +0 -1
  158. data/lib/zendesk_api/server/public/doc/css/full_list.css +0 -57
  159. data/lib/zendesk_api/server/public/doc/css/style.css +0 -338
  160. data/lib/zendesk_api/server/public/doc/file.Readme.html +0 -137
  161. data/lib/zendesk_api/server/public/doc/file_list.html +0 -55
  162. data/lib/zendesk_api/server/public/doc/frames.html +0 -28
  163. data/lib/zendesk_api/server/public/doc/index.html +0 -137
  164. data/lib/zendesk_api/server/public/doc/js/app.js +0 -214
  165. data/lib/zendesk_api/server/public/doc/js/full_list.js +0 -173
  166. data/lib/zendesk_api/server/public/doc/js/jquery.js +0 -4
  167. data/lib/zendesk_api/server/public/doc/method_list.html +0 -2332
  168. data/lib/zendesk_api/server/public/doc/top-level-namespace.html +0 -112
  169. data/lib/zendesk_api/server/public/favicon.ico +0 -0
  170. data/lib/zendesk_api/server/public/images/glyphicons-halflings-white.png +0 -0
  171. data/lib/zendesk_api/server/public/images/glyphicons-halflings.png +0 -0
  172. data/lib/zendesk_api/server/public/images/spinner.gif +0 -0
  173. data/lib/zendesk_api/server/public/images/zendesk_developers_bg.png +0 -0
  174. data/lib/zendesk_api/server/public/images/zendesk_developers_header.png +0 -0
  175. data/lib/zendesk_api/server/public/javascripts/application.js +0 -186
  176. data/lib/zendesk_api/server/public/javascripts/bootstrap-alert.js +0 -90
  177. data/lib/zendesk_api/server/public/javascripts/bootstrap-button.js +0 -96
  178. data/lib/zendesk_api/server/public/javascripts/bootstrap-carousel.js +0 -169
  179. data/lib/zendesk_api/server/public/javascripts/bootstrap-collapse.js +0 -157
  180. data/lib/zendesk_api/server/public/javascripts/bootstrap-dropdown.js +0 -100
  181. data/lib/zendesk_api/server/public/javascripts/bootstrap-modal.js +0 -218
  182. data/lib/zendesk_api/server/public/javascripts/bootstrap-popover.js +0 -98
  183. data/lib/zendesk_api/server/public/javascripts/bootstrap-scrollspy.js +0 -151
  184. data/lib/zendesk_api/server/public/javascripts/bootstrap-tab.js +0 -135
  185. data/lib/zendesk_api/server/public/javascripts/bootstrap-tooltip.js +0 -275
  186. data/lib/zendesk_api/server/public/javascripts/bootstrap-transition.js +0 -61
  187. data/lib/zendesk_api/server/public/javascripts/bootstrap-typeahead.js +0 -285
  188. data/lib/zendesk_api/server/public/sass/screen.scss +0 -102
  189. data/lib/zendesk_api/server/public/sass/styles.scss +0 -5
  190. data/lib/zendesk_api/server/public/stylesheets/developer.screen.css +0 -836
  191. data/lib/zendesk_api/server/public/stylesheets/screen.css +0 -129
  192. data/lib/zendesk_api/server/public/stylesheets/styles.css +0 -6208
  193. data/lib/zendesk_api/server/templates/footer.haml +0 -13
  194. data/lib/zendesk_api/server/templates/header.haml +0 -20
  195. data/lib/zendesk_api/server/templates/index.haml +0 -68
  196. data/lib/zendesk_api/server/templates/layout.haml +0 -44
  197. data/lib/zendesk_api/server/templates/param.haml +0 -4
  198. data/lib/zendesk_api/server/templates/search.haml +0 -23
  199. data/lib/zendesk_api/server/templates/sidebar.haml +0 -7
  200. data/spec/server/app_spec.rb +0 -140
  201. data/spec/server/helper_spec.rb +0 -97
  202. data/spec/server/html_renderer_spec.rb +0 -130
  203. data/spec/server/spec_helper.rb +0 -43
@@ -15,6 +15,10 @@ require 'logger'
15
15
  require 'stringio'
16
16
  require 'multi_json'
17
17
 
18
+ class String
19
+ def encoding_aware?; false; end
20
+ end
21
+
18
22
  require File.join(File.dirname(__FILE__), '..', 'macros', 'resource_macros')
19
23
  require File.join(File.dirname(__FILE__), '..', 'fixtures', 'zendesk')
20
24
  require File.join(File.dirname(__FILE__), '..', 'fixtures', 'test_resources')
@@ -27,7 +31,29 @@ def client
27
31
  if File.exist?(credentials)
28
32
  data = YAML.load(File.read(credentials))
29
33
  config.username = data["username"]
30
- config.password = data["password"]
34
+
35
+ if data["token"]
36
+ config.access_token = data["token"]
37
+ config.url_based_access_token = true
38
+ else
39
+ config.password = data["password"]
40
+ end
41
+
42
+ if data["auth"]
43
+ config.extend(Module.new do
44
+ attr_accessor :authorization
45
+
46
+ def options
47
+ super.tap do |options|
48
+ options[:headers].merge!(
49
+ :authorization => "Basic #{Base64.urlsafe_encode64(authorization)}"
50
+ )
51
+ end
52
+ end
53
+ end)
54
+ config.authorization = data["auth"]
55
+ end
56
+
31
57
  config.url = data["url"]
32
58
 
33
59
  if data["url"].start_with?("http://")
@@ -18,12 +18,14 @@ describe ZendeskAPI::User, :delete_after do
18
18
  end
19
19
 
20
20
  context "passwords", :vcr do
21
+ let(:password) { client.config.password || ENV['PASSWORD'] }
22
+
21
23
  it "sets the password" do
22
- agent.set_password!(:password => client.config.password)
24
+ agent.set_password!(:password => password)
23
25
  end
24
26
 
25
27
  it "changes the password" do
26
- current_user.change_password!(:previous_password => client.config.password, :password => client.config.password)
28
+ current_user.change_password!(:previous_password => password, :password => password)
27
29
  end
28
30
  end
29
31
 
@@ -0,0 +1,16 @@
1
+ require 'core/spec_helper'
2
+
3
+ describe ZendeskAPI::UserView, :delete_after do
4
+ def valid_attributes
5
+ {
6
+ :title => "Overseas gold member",
7
+ :all => [
8
+ { field: "name", operator: "is", value: "abcd" },
9
+ ]
10
+ }
11
+ end
12
+
13
+ it_should_be_readable :user_views
14
+ it_should_be_creatable
15
+ it_should_be_deletable
16
+ end
@@ -1,3 +1,5 @@
1
+ require 'core/spec_helper'
2
+
1
3
  describe ZendeskAPI::Voice::PhoneNumber, :delete_after do
2
4
  def valid_attributes
3
5
  {:number => "+14434064759", :country_code => "US", :toll_free => "false"}
data/zendesk_api.gemspec CHANGED
@@ -22,12 +22,9 @@ Gem::Specification.new do |s|
22
22
  s.add_development_dependency "rake"
23
23
  s.add_development_dependency "rspec"
24
24
  s.add_development_dependency "vcr"
25
- s.add_development_dependency "webmock", "~> 1.9.0"
25
+ s.add_development_dependency "webmock"
26
26
  s.add_development_dependency "yard"
27
27
 
28
- # Optional. Only used for uploads testing.
29
- # s.add_development_dependency "actionpack"
30
-
31
28
  s.add_runtime_dependency "faraday", "~> 0.9"
32
29
  s.add_runtime_dependency "hashie", ">= 1.2"
33
30
  s.add_runtime_dependency "inflection"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zendesk_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.5
4
+ version: 1.3.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Steven Davidovitz
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-04-07 00:00:00.000000000 Z
12
+ date: 2014-05-20 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bump
@@ -71,16 +71,16 @@ dependencies:
71
71
  name: webmock
72
72
  requirement: !ruby/object:Gem::Requirement
73
73
  requirements:
74
- - - "~>"
74
+ - - ">="
75
75
  - !ruby/object:Gem::Version
76
- version: 1.9.0
76
+ version: '0'
77
77
  type: :development
78
78
  prerelease: false
79
79
  version_requirements: !ruby/object:Gem::Requirement
80
80
  requirements:
81
- - - "~>"
81
+ - - ">="
82
82
  - !ruby/object:Gem::Version
83
- version: 1.9.0
83
+ version: '0'
84
84
  - !ruby/object:Gem::Dependency
85
85
  name: yard
86
86
  requirement: !ruby/object:Gem::Requirement
@@ -194,13 +194,8 @@ files:
194
194
  - Gemfile
195
195
  - Gemfile.lock
196
196
  - LICENSE
197
- - Procfile
198
197
  - README.md
199
198
  - Rakefile
200
- - bin/zendesk
201
- - config.ru
202
- - config/mongoid.yml
203
- - config/newrelic.yml
204
199
  - lib/zendesk_api.rb
205
200
  - lib/zendesk_api/actions.rb
206
201
  - lib/zendesk_api/association.rb
@@ -208,10 +203,6 @@ files:
208
203
  - lib/zendesk_api/client.rb
209
204
  - lib/zendesk_api/collection.rb
210
205
  - lib/zendesk_api/configuration.rb
211
- - lib/zendesk_api/console/base.rb
212
- - lib/zendesk_api/console/console.rb
213
- - lib/zendesk_api/console/extensions.rb
214
- - lib/zendesk_api/console/options.rb
215
206
  - lib/zendesk_api/core_ext/inflection.rb
216
207
  - lib/zendesk_api/delegator.rb
217
208
  - lib/zendesk_api/error.rb
@@ -221,6 +212,7 @@ files:
221
212
  - lib/zendesk_api/middleware/request/etag_cache.rb
222
213
  - lib/zendesk_api/middleware/request/retry.rb
223
214
  - lib/zendesk_api/middleware/request/upload.rb
215
+ - lib/zendesk_api/middleware/request/url_based_access_token.rb
224
216
  - lib/zendesk_api/middleware/response/callback.rb
225
217
  - lib/zendesk_api/middleware/response/deflate.rb
226
218
  - lib/zendesk_api/middleware/response/gzip.rb
@@ -230,174 +222,6 @@ files:
230
222
  - lib/zendesk_api/middleware/response/raise_error.rb
231
223
  - lib/zendesk_api/resource.rb
232
224
  - lib/zendesk_api/resources.rb
233
- - lib/zendesk_api/server/base.rb
234
- - lib/zendesk_api/server/docs/account_settings.md
235
- - lib/zendesk_api/server/docs/activity_stream.md
236
- - lib/zendesk_api/server/docs/attachments.md
237
- - lib/zendesk_api/server/docs/autocomplete.md
238
- - lib/zendesk_api/server/docs/automations.md
239
- - lib/zendesk_api/server/docs/categories.md
240
- - lib/zendesk_api/server/docs/changes_roadmap.md
241
- - lib/zendesk_api/server/docs/custom_roles.md
242
- - lib/zendesk_api/server/docs/forum_subscriptions.md
243
- - lib/zendesk_api/server/docs/forums.md
244
- - lib/zendesk_api/server/docs/group_memberships.md
245
- - lib/zendesk_api/server/docs/groups.md
246
- - lib/zendesk_api/server/docs/introduction.md
247
- - lib/zendesk_api/server/docs/job_statuses.md
248
- - lib/zendesk_api/server/docs/locales.md
249
- - lib/zendesk_api/server/docs/macros.md
250
- - lib/zendesk_api/server/docs/organizations.md
251
- - lib/zendesk_api/server/docs/problems.md
252
- - lib/zendesk_api/server/docs/requests.md
253
- - lib/zendesk_api/server/docs/satisfaction_ratings.md
254
- - lib/zendesk_api/server/docs/search.md
255
- - lib/zendesk_api/server/docs/sharing_agreements.md
256
- - lib/zendesk_api/server/docs/side_loading.md
257
- - lib/zendesk_api/server/docs/suspended_tickets.md
258
- - lib/zendesk_api/server/docs/tags.md
259
- - lib/zendesk_api/server/docs/ticket_audits.md
260
- - lib/zendesk_api/server/docs/ticket_export.md
261
- - lib/zendesk_api/server/docs/ticket_fields.md
262
- - lib/zendesk_api/server/docs/ticket_import.md
263
- - lib/zendesk_api/server/docs/ticket_metrics.md
264
- - lib/zendesk_api/server/docs/tickets.md
265
- - lib/zendesk_api/server/docs/topic_comments.md
266
- - lib/zendesk_api/server/docs/topic_subscriptions.md
267
- - lib/zendesk_api/server/docs/topic_votes.md
268
- - lib/zendesk_api/server/docs/topics.md
269
- - lib/zendesk_api/server/docs/triggers.md
270
- - lib/zendesk_api/server/docs/user_identities.md
271
- - lib/zendesk_api/server/docs/users.md
272
- - lib/zendesk_api/server/docs/views.md
273
- - lib/zendesk_api/server/helper.rb
274
- - lib/zendesk_api/server/html_renderer.rb
275
- - lib/zendesk_api/server/models/user_request.rb
276
- - lib/zendesk_api/server/models/zlib_json.rb
277
- - lib/zendesk_api/server/public/config.rb
278
- - lib/zendesk_api/server/public/doc/ZendeskAPI.html
279
- - lib/zendesk_api/server/public/doc/ZendeskAPI/Ability.html
280
- - lib/zendesk_api/server/public/doc/ZendeskAPI/Activity.html
281
- - lib/zendesk_api/server/public/doc/ZendeskAPI/Attachment.html
282
- - lib/zendesk_api/server/public/doc/ZendeskAPI/Automation.html
283
- - lib/zendesk_api/server/public/doc/ZendeskAPI/Bookmark.html
284
- - lib/zendesk_api/server/public/doc/ZendeskAPI/CRMData.html
285
- - lib/zendesk_api/server/public/doc/ZendeskAPI/CRMDataStatus.html
286
- - lib/zendesk_api/server/public/doc/ZendeskAPI/Category.html
287
- - lib/zendesk_api/server/public/doc/ZendeskAPI/Client.html
288
- - lib/zendesk_api/server/public/doc/ZendeskAPI/Collection.html
289
- - lib/zendesk_api/server/public/doc/ZendeskAPI/Configuration.html
290
- - lib/zendesk_api/server/public/doc/ZendeskAPI/Create.html
291
- - lib/zendesk_api/server/public/doc/ZendeskAPI/Create/ClassMethods.html
292
- - lib/zendesk_api/server/public/doc/ZendeskAPI/CreateResource.html
293
- - lib/zendesk_api/server/public/doc/ZendeskAPI/CustomRole.html
294
- - lib/zendesk_api/server/public/doc/ZendeskAPI/Data.html
295
- - lib/zendesk_api/server/public/doc/ZendeskAPI/DataResource.html
296
- - lib/zendesk_api/server/public/doc/ZendeskAPI/DeleteResource.html
297
- - lib/zendesk_api/server/public/doc/ZendeskAPI/Destroy.html
298
- - lib/zendesk_api/server/public/doc/ZendeskAPI/Destroy/ClassMethod.html
299
- - lib/zendesk_api/server/public/doc/ZendeskAPI/Error.html
300
- - lib/zendesk_api/server/public/doc/ZendeskAPI/Error/ClientError.html
301
- - lib/zendesk_api/server/public/doc/ZendeskAPI/Error/NetworkError.html
302
- - lib/zendesk_api/server/public/doc/ZendeskAPI/Error/RecordInvalid.html
303
- - lib/zendesk_api/server/public/doc/ZendeskAPI/Error/RecordNotFound.html
304
- - lib/zendesk_api/server/public/doc/ZendeskAPI/Forum.html
305
- - lib/zendesk_api/server/public/doc/ZendeskAPI/ForumSubscription.html
306
- - lib/zendesk_api/server/public/doc/ZendeskAPI/Group.html
307
- - lib/zendesk_api/server/public/doc/ZendeskAPI/GroupMembership.html
308
- - lib/zendesk_api/server/public/doc/ZendeskAPI/JobStatus.html
309
- - lib/zendesk_api/server/public/doc/ZendeskAPI/Locale.html
310
- - lib/zendesk_api/server/public/doc/ZendeskAPI/Macro.html
311
- - lib/zendesk_api/server/public/doc/ZendeskAPI/MobileDevice.html
312
- - lib/zendesk_api/server/public/doc/ZendeskAPI/OAuthClient.html
313
- - lib/zendesk_api/server/public/doc/ZendeskAPI/OAuthToken.html
314
- - lib/zendesk_api/server/public/doc/ZendeskAPI/Organization.html
315
- - lib/zendesk_api/server/public/doc/ZendeskAPI/OrganizationField.html
316
- - lib/zendesk_api/server/public/doc/ZendeskAPI/Read.html
317
- - lib/zendesk_api/server/public/doc/ZendeskAPI/ReadResource.html
318
- - lib/zendesk_api/server/public/doc/ZendeskAPI/Request.html
319
- - lib/zendesk_api/server/public/doc/ZendeskAPI/Request/Comment.html
320
- - lib/zendesk_api/server/public/doc/ZendeskAPI/Resource.html
321
- - lib/zendesk_api/server/public/doc/ZendeskAPI/Role.html
322
- - lib/zendesk_api/server/public/doc/ZendeskAPI/Rule.html
323
- - lib/zendesk_api/server/public/doc/ZendeskAPI/RuleExecution.html
324
- - lib/zendesk_api/server/public/doc/ZendeskAPI/SatisfactionRating.html
325
- - lib/zendesk_api/server/public/doc/ZendeskAPI/Save.html
326
- - lib/zendesk_api/server/public/doc/ZendeskAPI/Search.html
327
- - lib/zendesk_api/server/public/doc/ZendeskAPI/Search/Result.html
328
- - lib/zendesk_api/server/public/doc/ZendeskAPI/Setting.html
329
- - lib/zendesk_api/server/public/doc/ZendeskAPI/SharingAgreement.html
330
- - lib/zendesk_api/server/public/doc/ZendeskAPI/SingularResource.html
331
- - lib/zendesk_api/server/public/doc/ZendeskAPI/SuspendedTicket.html
332
- - lib/zendesk_api/server/public/doc/ZendeskAPI/Ticket.html
333
- - lib/zendesk_api/server/public/doc/ZendeskAPI/Ticket/Audit.html
334
- - lib/zendesk_api/server/public/doc/ZendeskAPI/Ticket/Comment.html
335
- - lib/zendesk_api/server/public/doc/ZendeskAPI/Ticket/Tag.html
336
- - lib/zendesk_api/server/public/doc/ZendeskAPI/TicketField.html
337
- - lib/zendesk_api/server/public/doc/ZendeskAPI/TicketMetric.html
338
- - lib/zendesk_api/server/public/doc/ZendeskAPI/Topic.html
339
- - lib/zendesk_api/server/public/doc/ZendeskAPI/Topic/TopicComment.html
340
- - lib/zendesk_api/server/public/doc/ZendeskAPI/Topic/TopicVote.html
341
- - lib/zendesk_api/server/public/doc/ZendeskAPI/TopicComment.html
342
- - lib/zendesk_api/server/public/doc/ZendeskAPI/TopicSubscription.html
343
- - lib/zendesk_api/server/public/doc/ZendeskAPI/Trigger.html
344
- - lib/zendesk_api/server/public/doc/ZendeskAPI/Update.html
345
- - lib/zendesk_api/server/public/doc/ZendeskAPI/Update/ClassMethod.html
346
- - lib/zendesk_api/server/public/doc/ZendeskAPI/UpdateResource.html
347
- - lib/zendesk_api/server/public/doc/ZendeskAPI/Upload.html
348
- - lib/zendesk_api/server/public/doc/ZendeskAPI/User.html
349
- - lib/zendesk_api/server/public/doc/ZendeskAPI/User/Identity.html
350
- - lib/zendesk_api/server/public/doc/ZendeskAPI/User/TopicComment.html
351
- - lib/zendesk_api/server/public/doc/ZendeskAPI/UserField.html
352
- - lib/zendesk_api/server/public/doc/ZendeskAPI/Verbs.html
353
- - lib/zendesk_api/server/public/doc/ZendeskAPI/View.html
354
- - lib/zendesk_api/server/public/doc/ZendeskAPI/ViewCount.html
355
- - lib/zendesk_api/server/public/doc/ZendeskAPI/ViewRow.html
356
- - lib/zendesk_api/server/public/doc/_index.html
357
- - lib/zendesk_api/server/public/doc/class_list.html
358
- - lib/zendesk_api/server/public/doc/css/common.css
359
- - lib/zendesk_api/server/public/doc/css/full_list.css
360
- - lib/zendesk_api/server/public/doc/css/style.css
361
- - lib/zendesk_api/server/public/doc/file.Readme.html
362
- - lib/zendesk_api/server/public/doc/file_list.html
363
- - lib/zendesk_api/server/public/doc/frames.html
364
- - lib/zendesk_api/server/public/doc/index.html
365
- - lib/zendesk_api/server/public/doc/js/app.js
366
- - lib/zendesk_api/server/public/doc/js/full_list.js
367
- - lib/zendesk_api/server/public/doc/js/jquery.js
368
- - lib/zendesk_api/server/public/doc/method_list.html
369
- - lib/zendesk_api/server/public/doc/top-level-namespace.html
370
- - lib/zendesk_api/server/public/favicon.ico
371
- - lib/zendesk_api/server/public/images/glyphicons-halflings-white.png
372
- - lib/zendesk_api/server/public/images/glyphicons-halflings.png
373
- - lib/zendesk_api/server/public/images/spinner.gif
374
- - lib/zendesk_api/server/public/images/zendesk_developers_bg.png
375
- - lib/zendesk_api/server/public/images/zendesk_developers_header.png
376
- - lib/zendesk_api/server/public/javascripts/application.js
377
- - lib/zendesk_api/server/public/javascripts/bootstrap-alert.js
378
- - lib/zendesk_api/server/public/javascripts/bootstrap-button.js
379
- - lib/zendesk_api/server/public/javascripts/bootstrap-carousel.js
380
- - lib/zendesk_api/server/public/javascripts/bootstrap-collapse.js
381
- - lib/zendesk_api/server/public/javascripts/bootstrap-dropdown.js
382
- - lib/zendesk_api/server/public/javascripts/bootstrap-modal.js
383
- - lib/zendesk_api/server/public/javascripts/bootstrap-popover.js
384
- - lib/zendesk_api/server/public/javascripts/bootstrap-scrollspy.js
385
- - lib/zendesk_api/server/public/javascripts/bootstrap-tab.js
386
- - lib/zendesk_api/server/public/javascripts/bootstrap-tooltip.js
387
- - lib/zendesk_api/server/public/javascripts/bootstrap-transition.js
388
- - lib/zendesk_api/server/public/javascripts/bootstrap-typeahead.js
389
- - lib/zendesk_api/server/public/sass/screen.scss
390
- - lib/zendesk_api/server/public/sass/styles.scss
391
- - lib/zendesk_api/server/public/stylesheets/developer.screen.css
392
- - lib/zendesk_api/server/public/stylesheets/screen.css
393
- - lib/zendesk_api/server/public/stylesheets/styles.css
394
- - lib/zendesk_api/server/templates/footer.haml
395
- - lib/zendesk_api/server/templates/header.haml
396
- - lib/zendesk_api/server/templates/index.haml
397
- - lib/zendesk_api/server/templates/layout.haml
398
- - lib/zendesk_api/server/templates/param.haml
399
- - lib/zendesk_api/server/templates/search.haml
400
- - lib/zendesk_api/server/templates/sidebar.haml
401
225
  - lib/zendesk_api/sideloading.rb
402
226
  - lib/zendesk_api/track_changes.rb
403
227
  - lib/zendesk_api/trackie.rb
@@ -481,13 +305,10 @@ files:
481
305
  - spec/live/upload_spec.rb
482
306
  - spec/live/user_field_spec.rb
483
307
  - spec/live/user_spec.rb
308
+ - spec/live/user_view_spec.rb
484
309
  - spec/live/view_spec.rb
485
310
  - spec/live/voice/phone_number_spec.rb
486
311
  - spec/macros/resource_macros.rb
487
- - spec/server/app_spec.rb
488
- - spec/server/helper_spec.rb
489
- - spec/server/html_renderer_spec.rb
490
- - spec/server/spec_helper.rb
491
312
  - util/resource_handler.rb
492
313
  - util/verb_handler.rb
493
314
  - zendesk_api.gemspec
@@ -594,11 +415,8 @@ test_files:
594
415
  - spec/live/upload_spec.rb
595
416
  - spec/live/user_field_spec.rb
596
417
  - spec/live/user_spec.rb
418
+ - spec/live/user_view_spec.rb
597
419
  - spec/live/view_spec.rb
598
420
  - spec/live/voice/phone_number_spec.rb
599
421
  - spec/macros/resource_macros.rb
600
- - spec/server/app_spec.rb
601
- - spec/server/helper_spec.rb
602
- - spec/server/html_renderer_spec.rb
603
- - spec/server/spec_helper.rb
604
422
  has_rdoc:
data/Procfile DELETED
@@ -1 +0,0 @@
1
- web: bundle exec rackup config.ru -p $PORT
data/bin/zendesk DELETED
@@ -1,27 +0,0 @@
1
- #!/usr/bin/env ruby
2
- require 'bundler'
3
-
4
- ARGV[0] ||= "console"
5
-
6
- if %w(s server).include?(ARGV[0])
7
- Bundler.setup(:default, :server)
8
-
9
- require 'optparse'
10
- require 'zendesk_api'
11
- require 'zendesk_api/server/base'
12
-
13
- OptionParser.new do |op|
14
- op.banner = "Usage: zendesk s[erver] [options]"
15
-
16
- op.on('-e env', 'Set the environment') {|val| ZendeskAPI::Server::App.set(:environment, val.to_sym)}
17
- op.on('-p port', 'Bind to a port') {|val| ZendeskAPI::Server::App.set(:port, val.to_i)}
18
- op.on('-o addr', 'Bind to a location') {|val| ZendeskAPI::Server::App.set(:bind, val)}
19
- end.parse!(ARGV.dup)
20
-
21
- ZendeskAPI::Server::App.run!
22
- else
23
- Bundler.setup(:default, :console)
24
-
25
- require 'zendesk_api'
26
- require 'zendesk_api/console/base'
27
- end
data/config.ru DELETED
@@ -1,6 +0,0 @@
1
- require 'rack/ssl-enforcer'
2
- require 'zendesk_api'
3
- require 'zendesk_api/server/base'
4
-
5
- use Rack::SslEnforcer if ZendeskAPI::Server::App.production?
6
- run ZendeskAPI::Server::App
data/config/mongoid.yml DELETED
@@ -1,81 +0,0 @@
1
- development: &defaults
2
- # Configure available database sessions. (required)
3
- sessions:
4
- # Defines the default session. (required)
5
- default: &default_session
6
- # Defines the name of the default database that Mongoid can connect to.
7
- # (required).
8
- database: zendesk_api_development
9
- # Provides the hosts the default session can connect to. Must be an array
10
- # of host:port pairs. (required)
11
- hosts:
12
- - localhost:27017
13
- options:
14
- # Change whether the session persists in safe mode by default.
15
- # (default: false)
16
- # safe: false
17
-
18
- # Change the default consistency model to :eventual or :strong.
19
- # :eventual will send reads to secondaries, :strong sends everything
20
- # to master. (default: :eventual)
21
- # consistency: :strong
22
- # Configure Mongoid specific options. (optional)
23
- options:
24
- # Configuration for whether or not to allow access to fields that do
25
- # not have a field definition on the model. (default: true)
26
- # allow_dynamic_fields: true
27
-
28
- # Enable the identity map, needed for eager loading. (default: false)
29
- # identity_map_enabled: false
30
-
31
- # Includes the root model name in json serialization. (default: false)
32
- # include_root_in_json: false
33
-
34
- # Include the _type field in serializaion. (default: false)
35
- # include_type_for_serialization: false
36
-
37
- # Preload all models in development, needed when models use
38
- # inheritance. (default: false)
39
- preload_models: true
40
-
41
- # Protect id and type from mass assignment. (default: true)
42
- # protect_sensitive_fields: true
43
-
44
- # Raise an error when performing a #find and the document is not found.
45
- # (default: true)
46
- raise_not_found_error: false
47
-
48
- # Raise an error when defining a scope with the same name as an
49
- # existing method. (default: false)
50
- # scope_overwrite_exception: false
51
-
52
- # Skip the database version check, used when connecting to a db without
53
- # admin access. (default: false)
54
- # skip_version_check: false
55
-
56
- # User Active Support's time zone in conversions. (default: true)
57
- # use_activesupport_time_zone: true
58
-
59
- # Ensure all times are UTC in the app side. (default: false)
60
- # use_utc: false
61
-
62
- test:
63
- <<: *defaults
64
- sessions:
65
- default:
66
- <<: *default_session
67
- database: zendesk_api_test
68
-
69
- <% if ENV['MONGOLAB_URI'] %>
70
- <% uri = URI.parse(ENV['MONGOLAB_URI']) %>
71
- production:
72
- <<: *defaults
73
- sessions:
74
- default:
75
- <<: *default_session
76
- database: <%= uri.path.sub('/','') %>
77
- username: <%= uri.user %>
78
- password: <%= uri.password %>
79
- hosts:
80
- - <%= uri.host %>:<%= uri.port %>
81
- <% end %>