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
data/config/newrelic.yml DELETED
@@ -1,255 +0,0 @@
1
- # Here are the settings that are common to all environments
2
- common: &default_settings
3
- # ============================== LICENSE KEY ===============================
4
-
5
- # You must specify the license key associated with your New Relic
6
- # account. This key binds your Agent's data to your account in the
7
- # New Relic service.
8
- license_key: '<%= ENV["NEW_RELIC_LICENSE_KEY"] %>'
9
-
10
- # Agent Enabled (Rails Only)
11
- # Use this setting to force the agent to run or not run.
12
- # Default is 'auto' which means the agent will install and run only
13
- # if a valid dispatcher such as Mongrel is running. This prevents
14
- # it from running with Rake or the console. Set to false to
15
- # completely turn the agent off regardless of the other settings.
16
- # Valid values are true, false and auto.
17
- #
18
- # agent_enabled: auto
19
-
20
- # Application Name Set this to be the name of your application as
21
- # you'd like it show up in New Relic. The service will then auto-map
22
- # instances of your application into an "application" on your
23
- # dashboard page. If you want to map this instance into multiple
24
- # apps, like "AJAX Requests" and "All UI" then specify a semicolon
25
- # separated list of up to three distinct names, or a yaml list.
26
- # Defaults to the capitalized RAILS_ENV or RACK_ENV (i.e.,
27
- # Production, Staging, etc)
28
- #
29
- # Example:
30
- #
31
- # app_name:
32
- # - Ajax Service
33
- # - All Services
34
- #
35
- app_name: <%= ENV["NEW_RELIC_APP_NAME"] %>
36
-
37
- # When "true", the agent collects performance data about your
38
- # application and reports this data to the New Relic service at
39
- # newrelic.com. This global switch is normally overridden for each
40
- # environment below. (formerly called 'enabled')
41
- monitor_mode: true
42
-
43
- # Developer mode should be off in every environment but
44
- # development as it has very high overhead in memory.
45
- developer_mode: false
46
-
47
- # The newrelic agent generates its own log file to keep its logging
48
- # information separate from that of your application. Specify its
49
- # log level here.
50
- log_level: info
51
-
52
- # Optionally set the path to the log file This is expanded from the
53
- # root directory (may be relative or absolute, e.g. 'log/' or
54
- # '/var/log/') The agent will attempt to create this directory if it
55
- # does not exist.
56
- # log_file_path: 'log'
57
-
58
- # Optionally set the name of the log file, defaults to 'newrelic_agent.log'
59
- # log_file_name: 'newrelic_agent.log'
60
-
61
- # The newrelic agent communicates with the service via http by
62
- # default. If you want to communicate via https to increase
63
- # security, then turn on SSL by setting this value to true. Note,
64
- # this will result in increased CPU overhead to perform the
65
- # encryption involved in SSL communication, but this work is done
66
- # asynchronously to the threads that process your application code,
67
- # so it should not impact response times.
68
- ssl: false
69
-
70
- # EXPERIMENTAL: enable verification of the SSL certificate sent by
71
- # the server. This setting has no effect unless SSL is enabled
72
- # above. This may block your application. Only enable it if the data
73
- # you send us needs end-to-end verified certificates.
74
- #
75
- # This means we cannot cache the DNS lookup, so each request to the
76
- # service will perform a lookup. It also means that we cannot
77
- # use a non-blocking lookup, so in a worst case, if you have DNS
78
- # problems, your app may block indefinitely.
79
- # verify_certificate: true
80
-
81
- # Set your application's Apdex threshold value with the 'apdex_t'
82
- # setting, in seconds. The apdex_t value determines the buckets used
83
- # to compute your overall Apdex score.
84
- # Requests that take less than apdex_t seconds to process will be
85
- # classified as Satisfying transactions; more than apdex_t seconds
86
- # as Tolerating transactions; and more than four times the apdex_t
87
- # value as Frustrating transactions.
88
- # For more about the Apdex standard, see
89
- # http://newrelic.com/docs/general/apdex
90
-
91
- apdex_t: 0.5
92
-
93
- #============================== Browser Monitoring ===============================
94
- # New Relic Real User Monitoring gives you insight into the performance real users are
95
- # experiencing with your website. This is accomplished by measuring the time it takes for
96
- # your users' browsers to download and render your web pages by injecting a small amount
97
- # of JavaScript code into the header and footer of each page.
98
- browser_monitoring:
99
- # By default the agent automatically injects the monitoring JavaScript
100
- # into web pages. Set this attribute to false to turn off this behavior.
101
- auto_instrument: true
102
-
103
- # Proxy settings for connecting to the service.
104
- #
105
- # If a proxy is used, the host setting is required. Other settings
106
- # are optional. Default port is 8080.
107
- #
108
- # proxy_host: hostname
109
- # proxy_port: 8080
110
- # proxy_user:
111
- # proxy_pass:
112
-
113
-
114
- # Tells transaction tracer and error collector (when enabled)
115
- # whether or not to capture HTTP params. When true, frameworks can
116
- # exclude HTTP parameters from being captured.
117
- # Rails: the RoR filter_parameter_logging excludes parameters
118
- # Java: create a config setting called "ignored_params" and set it to
119
- # a comma separated list of HTTP parameter names.
120
- # ex: ignored_params: credit_card, ssn, password
121
- capture_params: false
122
-
123
-
124
- # Transaction tracer captures deep information about slow
125
- # transactions and sends this to the service once a
126
- # minute. Included in the transaction is the exact call sequence of
127
- # the transactions including any SQL statements issued.
128
- transaction_tracer:
129
-
130
- # Transaction tracer is enabled by default. Set this to false to
131
- # turn it off. This feature is only available at the Professional
132
- # and above product levels.
133
- enabled: true
134
-
135
- # Threshold in seconds for when to collect a transaction
136
- # trace. When the response time of a controller action exceeds
137
- # this threshold, a transaction trace will be recorded and sent to
138
- # the service. Valid values are any float value, or (default)
139
- # "apdex_f", which will use the threshold for an dissatisfying
140
- # Apdex controller action - four times the Apdex T value.
141
- transaction_threshold: apdex_f
142
-
143
- # When transaction tracer is on, SQL statements can optionally be
144
- # recorded. The recorder has three modes, "off" which sends no
145
- # SQL, "raw" which sends the SQL statement in its original form,
146
- # and "obfuscated", which strips out numeric and string literals
147
- record_sql: obfuscated
148
-
149
- # Threshold in seconds for when to collect stack trace for a SQL
150
- # call. In other words, when SQL statements exceed this threshold,
151
- # then capture and send the current stack trace. This is
152
- # helpful for pinpointing where long SQL calls originate from
153
- stack_trace_threshold: 0.500
154
-
155
- # Determines whether the agent will capture query plans for slow
156
- # SQL queries. Only supported in mysql and postgres. Should be
157
- # set to false when using other adapters.
158
- # explain_enabled: true
159
-
160
- # Threshold for query execution time below which query plans will not
161
- # not be captured. Relevant only when `explain_enabled` is true.
162
- # explain_threshold: 0.5
163
-
164
- # Error collector captures information about uncaught exceptions and
165
- # sends them to the service for viewing
166
- error_collector:
167
-
168
- # Error collector is enabled by default. Set this to false to turn
169
- # it off. This feature is only available at the Professional and above
170
- # product levels
171
- enabled: true
172
-
173
- # Rails Only - tells error collector whether or not to capture a
174
- # source snippet around the place of the error when errors are View
175
- # related.
176
- capture_source: true
177
-
178
- # To stop specific errors from reporting to New Relic, set this property
179
- # to comma separated values. Default is to ignore routing errors
180
- # which are how 404's get triggered.
181
- #
182
- ignore_errors: ActionController::RoutingError
183
-
184
- # (Advanced) Uncomment this to ensure the cpu and memory samplers
185
- # won't run. Useful when you are using the agent to monitor an
186
- # external resource
187
- # disable_samplers: true
188
-
189
- # If you aren't interested in visibility in these areas, you can
190
- # disable the instrumentation to reduce overhead.
191
- #
192
- # disable_view_instrumentation: true
193
- # disable_activerecord_instrumentation: true
194
- # disable_memcache_instrumentation: true
195
- # disable_dj: true
196
-
197
- # If you're interested in capturing memcache keys as though they
198
- # were SQL uncomment this flag. Note that this does increase
199
- # overhead slightly on every memcached call, and can have security
200
- # implications if your memcached keys are sensitive
201
- # capture_memcache_keys: true
202
-
203
- # Certain types of instrumentation such as GC stats will not work if
204
- # you are running multi-threaded. Please let us know.
205
- # multi_threaded = false
206
-
207
- # Application Environments
208
- # ------------------------------------------
209
- # Environment specific settings are in this section.
210
- # For Rails applications, RAILS_ENV is used to determine the environment
211
- # For Java applications, pass -Dnewrelic.environment <environment> to set
212
- # the environment
213
-
214
- # NOTE if your application has other named environments, you should
215
- # provide newrelic configuration settings for these environments here.
216
-
217
- development:
218
- <<: *default_settings
219
- # Turn off communication to New Relic service in development mode (also
220
- # 'enabled').
221
- # NOTE: for initial evaluation purposes, you may want to temporarily
222
- # turn the agent on in development mode.
223
- monitor_mode: false
224
-
225
- # Rails Only - when running in Developer Mode, the New Relic Agent will
226
- # present performance information on the last 100 transactions you have
227
- # executed since starting the mongrel.
228
- # NOTE: There is substantial overhead when running in developer mode.
229
- # Do not use for production or load testing.
230
- developer_mode: true
231
-
232
- # Enable textmate links
233
- # textmate: true
234
-
235
- test:
236
- <<: *default_settings
237
- # It almost never makes sense to turn on the agent when running
238
- # unit, functional or integration tests or the like.
239
- monitor_mode: false
240
-
241
- # Turn on the agent in production for 24x7 monitoring. NewRelic
242
- # testing shows an average performance impact of < 5 ms per
243
- # transaction, you you can leave this on all the time without
244
- # incurring any user-visible performance degradation.
245
- production:
246
- <<: *default_settings
247
- monitor_mode: true
248
-
249
- # Many applications have a staging environment which behaves
250
- # identically to production. Support for that environment is provided
251
- # here. By default, the staging environment has the agent turned on.
252
- staging:
253
- <<: *default_settings
254
- monitor_mode: true
255
- app_name: <%= ENV["NEW_RELIC_APP_NAME"] %> (Staging)
@@ -1,12 +0,0 @@
1
- require 'zendesk_api/console/extensions'
2
- require 'zendesk_api/console/console'
3
-
4
- extend ZendeskAPI::Console
5
-
6
- require 'zendesk_api/console/options'
7
- require 'ripl'
8
-
9
- ARGV.clear
10
- Ripl.shell.prompt = lambda { "#{cwd.respond_to?(:path) ? '/' + cwd.path : cwd} > " }
11
- Ripl.shell.extend ZendeskAPI::Console::Eval
12
- Ripl.start
@@ -1,144 +0,0 @@
1
- module ZendeskAPI::Console
2
- ZD_DIRUP = Object.new.tap do |dir|
3
- dir.instance_eval do
4
- def /(stuff = nil)
5
- puts stuff
6
- end
7
- end
8
- end
9
-
10
- module Eval
11
- def loop_eval(str)
12
- split = str.split(/\s*\/\s*/)
13
- split[1..-1] = split[1..-1].map do |s|
14
- s =~ /\d+/ ? s : "\"#{s}\""
15
- end
16
- split = split.join('/')
17
- split += '/' if str[-1] == '/'
18
- # puts ZendeskAPI::Console::ZD_DIRUP
19
- split.gsub!(/\.\./, "ZendeskAPI::Console::ZD_DIRUP")
20
- super(split)
21
- end
22
- end
23
-
24
- def client(&blk)
25
- return @client if @client && blk.nil?
26
-
27
- @client = ZendeskAPI::Client.new do |cfg|
28
- config.each do |k,v|
29
- cfg.send("#{k}=", v)
30
- end if config.keys.any?
31
- blk.call(cfg) unless blk.nil?
32
- end
33
- end
34
-
35
- def help
36
- <<-END
37
- This is help.
38
- END
39
- end
40
-
41
- def username(username)
42
- client.config.username = username
43
- end
44
-
45
- def password(password)
46
- client.config.password = password
47
- end
48
-
49
- def basic_auth(username, password)
50
- username(username)
51
- password(password)
52
- true
53
- end
54
-
55
- def url(url)
56
- client.config.url = url
57
- end
58
-
59
- %w(get post put delete).each do |verb|
60
- define_method verb do |*args|
61
- client.connection.send(verb, *args)
62
- end
63
- end
64
-
65
- def cd(new_path = nil)
66
- if new_path.class.to_s =~ /^Zendesk/
67
- @path = new_path
68
- elsif new_path.is_a?(Fixnum) && @path
69
- @path /= new_path
70
- else
71
- @path = nil
72
- end
73
-
74
- @path
75
- end
76
-
77
- def cwd
78
- begin
79
- path
80
- rescue ArgumentError
81
- "unconfigured"
82
- end
83
- end
84
-
85
- def ls(*args)
86
- if args.any?
87
- args.inject(path) do |obj, arg|
88
- obj.send(:/, arg)
89
- end
90
- elsif path.respond_to?(:to_a)
91
- format = to_a.map do |elem|
92
- if elem.method(:format).arity == 1
93
- elem.format(client)
94
- else
95
- elem.format
96
- end
97
- end
98
-
99
- lengths = format.inject([]) do |lengths, object|
100
- object.each_with_index do |field, i|
101
- lengths[i] = [field.to_s.length, lengths[i] || 0].max
102
- end
103
-
104
- lengths
105
- end
106
-
107
- format_headers.each_with_index do |header, i|
108
- printf("%-#{lengths[i] + 2}s", header)
109
- end
110
-
111
- puts
112
- puts "---"
113
-
114
- format.each do |object|
115
- object.each_with_index do |field, i|
116
- printf("%-#{lengths[i] + 2}s", field)
117
- end
118
-
119
- puts
120
- end
121
-
122
- nil
123
- else
124
- methods = path.public_methods.reject do |method|
125
- method =~ /^orig_/ || method.to_sym == :method_missing ||
126
- Object.public_methods.include?(method)
127
- end
128
- end
129
- end
130
-
131
- def method_missing(*args)
132
- path.send(*args)
133
- end
134
-
135
- def config
136
- @options ||= {}
137
- end
138
-
139
- private
140
-
141
- def path
142
- @path || client
143
- end
144
- end
@@ -1,202 +0,0 @@
1
- class ZendeskAPI::FormatError < ArgumentError; end
2
-
3
- module Console
4
- def self.included(klass)
5
- klass.instance_eval { alias :orig_log_error :log_error }
6
- end
7
-
8
- def /(id)
9
- if id == ZendeskAPI::Console::ZD_DIRUP
10
- if @collection_path.length == 1
11
- @client
12
- else
13
- @collection_path.shift
14
- self
15
- end
16
- elsif id.is_a?(Fixnum)
17
- if loaded?
18
- detect {|obj| obj.id == id}
19
- else
20
- find(:id => id)
21
- end
22
- elsif !id.is_a?(ZendeskAPI::Collection)
23
- send(id)
24
- end
25
- end
26
-
27
- def log_error(e, _)
28
- raise e
29
- end
30
-
31
- def loaded?
32
- @resources && @resources.any?
33
- end
34
-
35
- def to_s
36
- path
37
- end
38
-
39
- def format_headers
40
- @resource_class.format_headers
41
- end
42
- end
43
-
44
- ZendeskAPI::Collection.send(:include, Console)
45
-
46
- module Subclasses
47
- def self.included(klass)
48
- klass.extend ClassMethods
49
- end
50
-
51
- GET_SUBCLASSES = lambda do |ary|
52
- ary.map! do |klass|
53
- if klass.name =~ /Resource$/
54
- GET_SUBCLASSES.call(klass.subclasses)
55
- else
56
- klass
57
- end
58
- end
59
-
60
- ary.tap(&:flatten!)
61
- end
62
-
63
- def to_s
64
- "/"
65
- end
66
-
67
- def to_a
68
- self.class.resources
69
- end
70
-
71
- def format_headers
72
- ["resource name"]
73
- end
74
-
75
- module ClassMethods
76
- def resources
77
- @resources ||= begin
78
- subclasses = GET_SUBCLASSES.call(ZendeskAPI::Data.subclasses)
79
- subclasses.delete_if do |resource|
80
- resource.name =~ /ZendeskAPI(::.*){2,}/
81
- end
82
- subclasses.sort_by(&:resource_name)
83
- end
84
- end
85
- end
86
- end
87
-
88
- ZendeskAPI::Client.send(:include, Subclasses)
89
-
90
- module Path
91
- def /(method)
92
- if method == ZendeskAPI::Console::ZD_DIRUP
93
- if association.options.parent
94
- association.options.parent
95
- elsif (res = @client.send(self.class.resource_name)).loaded?
96
- res
97
- else
98
- ZendeskAPI::Collection.new(@client, self.class)
99
- end
100
- else
101
- send(method)
102
- end
103
- end
104
- end
105
-
106
- module Format
107
- def self.extended(klass)
108
- class << klass
109
- attr_accessor :format_headers
110
- end
111
- end
112
-
113
- def format(client = nil, &block)
114
- if block_given?
115
- class_eval do
116
- define_method :format do
117
- instance_eval &block
118
- end
119
- end
120
- elsif client && client.send(resource_name).loaded?
121
- ["@#{resource_name}"]
122
- else
123
- [resource_name]
124
- end
125
- end
126
- end
127
-
128
- ZendeskAPI::Data.send(:include, Path)
129
- ZendeskAPI::Data.extend Format
130
-
131
- ZendeskAPI::DataResource.instance_eval do
132
- format_headers = %w{id created_at}
133
-
134
- format do
135
- if self.format_headers
136
- self.format_headers.map {|attr| send(attr.to_s.downcase)}
137
- else
138
- raise ZendeskAPI::FormatError.new("#{self.class.name} hasn't defined an ouput format")
139
- end
140
- end
141
- end
142
-
143
- module ZendeskAPI
144
- ForumSubscription.format_headers = %w{id forum_id user_id created_at}
145
- GroupMembership.format_headers = %w{id group_id user_id created_at}
146
- TopicSubscription.format_headers = %w{id topic_id user_id created_at}
147
- Locale.format_headers = %w{Id Locale Name}
148
- TicketField.format_headers = %w{Id Type Title Description}
149
- Macro.format_headers = %w{Id Title}
150
-
151
- Forum.format_headers = %w{Id Name Description Created Updated}
152
- Forum.format do
153
- [id, name, description, created_at, updated_at]
154
- end
155
-
156
- Category.format_headers = %w{Id Name Description Position Created Updated}
157
- Category.format do
158
- [id, name, description, position, created_at, updated_at]
159
- end
160
-
161
- Topic.format_headers = %w{Id Title Type}
162
- Topic.format do
163
- [id, title, topic_type]
164
- end
165
-
166
- # Topic::*, MobileDevice, TicketMetric, SuspendedTicket, customRole, CrmData...
167
-
168
- Activity.format_headers = %w{Id Title User Actor Ticket}
169
- Activity.format do
170
- [id, title, user.name, actor.name, target.ticket.subject]
171
- end
172
-
173
- SatisfactionRating.format_headers = %w{Id Ticket Score Comment}
174
- SatisfactionRating.format do
175
- [id, ticket_id, score, comment]
176
- end
177
-
178
- Bookmark.format_headers = %w{Id Ticket Created}
179
- Bookmark.format do
180
- [id, ticket.id, created_at]
181
- end
182
-
183
- User.format_headers = %w{Id Name Email Created Updated}
184
- User.format do
185
- [id, name, email, created_at, updated_at]
186
- end
187
-
188
- Ticket.format_headers = %w{Id Type Subject Description Status Created Updated}
189
- Ticket.format do
190
- [id, type, subject, description, status, created_at, updated_at]
191
- end
192
-
193
- Organization.format_headers = %w{Id Name Created Updated}
194
- Organization.format do
195
- [id, name, created_at, updated_at]
196
- end
197
-
198
- View.format_headers = %w{Id Title Created Updated}
199
- View.format do
200
- [id, title, created_at, updated_at]
201
- end
202
- end