slack-ruby-client 0.11.1 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (392) hide show
  1. checksums.yaml +4 -4
  2. data/.github/FUNDING.yml +1 -0
  3. data/.github/workflows/danger.yml +19 -0
  4. data/.github/workflows/integtest.yml +25 -0
  5. data/.github/workflows/rubocop.yml +13 -0
  6. data/.github/workflows/test.yml +34 -0
  7. data/.gitignore +6 -3
  8. data/.rubocop.yml +36 -2
  9. data/.rubocop_todo.yml +186 -54
  10. data/CHANGELOG.md +156 -31
  11. data/CONTRIBUTING.md +20 -9
  12. data/Dangerfile +2 -0
  13. data/Gemfile +27 -6
  14. data/Gemfile.danger +6 -0
  15. data/LICENSE.md +1 -1
  16. data/README.md +199 -52
  17. data/RELEASING.md +2 -2
  18. data/Rakefile +2 -1
  19. data/UPGRADING.md +89 -3
  20. data/bin/commands/admin_analytics.rb +16 -0
  21. data/bin/commands/admin_apps.rb +51 -0
  22. data/bin/commands/admin_apps_approved.rb +17 -0
  23. data/bin/commands/admin_apps_requests.rb +28 -0
  24. data/bin/commands/admin_apps_restricted.rb +17 -0
  25. data/bin/commands/admin_auth_policy.rb +39 -0
  26. data/bin/commands/admin_barriers.rb +47 -0
  27. data/bin/commands/admin_conversations.rb +170 -0
  28. data/bin/commands/admin_conversations_ekm.rb +17 -0
  29. data/bin/commands/admin_conversations_restrictAccess.rb +37 -0
  30. data/bin/commands/admin_conversations_whitelist.rb +37 -0
  31. data/bin/commands/admin_emoji.rb +54 -0
  32. data/bin/commands/admin_inviteRequests.rb +36 -0
  33. data/bin/commands/admin_inviteRequests_approved.rb +16 -0
  34. data/bin/commands/admin_inviteRequests_denied.rb +16 -0
  35. data/bin/commands/admin_teams.rb +27 -0
  36. data/bin/commands/admin_teams_admins.rb +16 -0
  37. data/bin/commands/admin_teams_owners.rb +16 -0
  38. data/bin/commands/admin_teams_settings.rb +64 -0
  39. data/bin/commands/admin_usergroups.rb +48 -0
  40. data/bin/commands/admin_users.rb +98 -0
  41. data/bin/commands/admin_users_session.rb +78 -0
  42. data/bin/commands/admin_users_unsupportedVersions.rb +15 -0
  43. data/bin/commands/api.rb +1 -1
  44. data/bin/commands/apps.rb +15 -0
  45. data/bin/commands/apps_connections.rb +13 -0
  46. data/bin/commands/apps_event_authorizations.rb +16 -0
  47. data/bin/commands/apps_manifest.rb +52 -0
  48. data/bin/commands/apps_permissions.rb +1 -0
  49. data/bin/commands/apps_permissions_resources.rb +15 -0
  50. data/bin/commands/apps_permissions_scopes.rb +13 -0
  51. data/bin/commands/apps_permissions_users.rb +26 -0
  52. data/bin/commands/auth.rb +1 -0
  53. data/bin/commands/auth_teams.rb +16 -0
  54. data/bin/commands/bookmarks.rb +52 -0
  55. data/bin/commands/bots.rb +2 -0
  56. data/bin/commands/calls.rb +52 -0
  57. data/bin/commands/calls_participants.rb +25 -0
  58. data/bin/commands/channels.rb +1 -153
  59. data/bin/commands/chat.rb +57 -12
  60. data/bin/commands/chat_scheduledMessages.rb +19 -0
  61. data/bin/commands/conversations.rb +75 -4
  62. data/bin/commands/dialog.rb +1 -0
  63. data/bin/commands/dnd.rb +6 -3
  64. data/bin/commands/emoji.rb +1 -0
  65. data/bin/commands/files.rb +14 -19
  66. data/bin/commands/files_comments.rb +1 -21
  67. data/bin/commands/files_remote.rb +78 -0
  68. data/bin/commands/groups.rb +1 -159
  69. data/bin/commands/im.rb +1 -62
  70. data/bin/commands/migration.rb +2 -0
  71. data/bin/commands/mpim.rb +1 -58
  72. data/bin/commands/oauth.rb +4 -15
  73. data/bin/commands/oauth_v2.rb +29 -0
  74. data/bin/commands/openid_connect.rb +27 -0
  75. data/bin/commands/pins.rb +3 -6
  76. data/bin/commands/reactions.rb +5 -3
  77. data/bin/commands/reminders.rb +7 -0
  78. data/bin/commands/rtm.rb +7 -4
  79. data/bin/commands/search.rb +8 -3
  80. data/bin/commands/stars.rb +10 -6
  81. data/bin/commands/team.rb +6 -0
  82. data/bin/commands/team_billing.rb +13 -0
  83. data/bin/commands/team_preferences.rb +13 -0
  84. data/bin/commands/team_profile.rb +1 -0
  85. data/bin/commands/tooling_tokens.rb +14 -0
  86. data/bin/commands/usergroups.rb +7 -1
  87. data/bin/commands/usergroups_users.rb +3 -0
  88. data/bin/commands/users.rb +21 -6
  89. data/bin/commands/users_admin.rb +1 -0
  90. data/bin/commands/users_prefs.rb +1 -0
  91. data/bin/commands/users_profile.rb +7 -6
  92. data/bin/commands/views.rb +48 -0
  93. data/bin/commands/workflows.rb +38 -0
  94. data/bin/commands.rb +40 -5
  95. data/bin/slack +2 -3
  96. data/examples/hi_real_time_and_web/Gemfile +1 -0
  97. data/examples/hi_real_time_and_web/hi.rb +7 -3
  98. data/examples/{hi_real_time_async_eventmachine → hi_real_time_async_async}/Gemfile +2 -1
  99. data/examples/{hi_real_time_async_celluloid → hi_real_time_async_async}/Procfile +0 -0
  100. data/examples/{hi_real_time_async_celluloid → hi_real_time_async_async}/hi.rb +12 -7
  101. data/examples/hi_web/Gemfile +1 -0
  102. data/examples/hi_web/hi.rb +1 -0
  103. data/examples/new_ticket/Gemfile +1 -0
  104. data/examples/new_ticket/new_ticket.rb +1 -0
  105. data/lib/slack/config.rb +2 -2
  106. data/lib/slack/events/config.rb +32 -0
  107. data/lib/slack/events/request.rb +72 -0
  108. data/lib/slack/logger.rb +6 -5
  109. data/lib/slack/messages/formatting.rb +1 -1
  110. data/lib/slack/messages/message.rb +1 -4
  111. data/lib/slack/real_time/api/message.rb +3 -1
  112. data/lib/slack/real_time/api/message_id.rb +1 -0
  113. data/lib/slack/real_time/api/ping.rb +5 -2
  114. data/lib/slack/real_time/api/typing.rb +3 -1
  115. data/lib/slack/real_time/client.rb +103 -34
  116. data/lib/slack/real_time/concurrency/async.rb +138 -0
  117. data/lib/slack/real_time/concurrency.rb +2 -2
  118. data/lib/slack/real_time/config.rb +6 -10
  119. data/lib/slack/real_time/models/base.rb +1 -4
  120. data/lib/slack/real_time/models/bot.rb +1 -0
  121. data/lib/slack/real_time/models/channel.rb +1 -0
  122. data/lib/slack/real_time/models/group.rb +1 -0
  123. data/lib/slack/real_time/models/im.rb +1 -0
  124. data/lib/slack/real_time/models/team.rb +1 -0
  125. data/lib/slack/real_time/models/user.rb +1 -0
  126. data/lib/slack/real_time/models.rb +1 -0
  127. data/lib/slack/real_time/socket.rb +45 -17
  128. data/lib/slack/real_time/stores/base.rb +5 -7
  129. data/lib/slack/real_time/stores/starter.rb +27 -3
  130. data/lib/slack/real_time/stores/store.rb +43 -25
  131. data/lib/slack/real_time/stores.rb +1 -0
  132. data/lib/slack/version.rb +2 -1
  133. data/lib/slack/web/api/endpoints/admin_analytics.rb +28 -0
  134. data/lib/slack/web/api/endpoints/admin_apps.rb +78 -0
  135. data/lib/slack/web/api/endpoints/admin_apps_approved.rb +35 -0
  136. data/lib/slack/web/api/endpoints/admin_apps_requests.rb +51 -0
  137. data/lib/slack/web/api/endpoints/admin_apps_restricted.rb +35 -0
  138. data/lib/slack/web/api/endpoints/admin_auth_policy.rb +72 -0
  139. data/lib/slack/web/api/endpoints/admin_barriers.rb +82 -0
  140. data/lib/slack/web/api/endpoints/admin_conversations.rb +262 -0
  141. data/lib/slack/web/api/endpoints/admin_conversations_ekm.rb +35 -0
  142. data/lib/slack/web/api/endpoints/admin_conversations_restrictAccess.rb +61 -0
  143. data/lib/slack/web/api/endpoints/admin_conversations_whitelist.rb +64 -0
  144. data/lib/slack/web/api/endpoints/admin_emoji.rb +88 -0
  145. data/lib/slack/web/api/endpoints/admin_inviteRequests.rb +61 -0
  146. data/lib/slack/web/api/endpoints/admin_inviteRequests_approved.rb +33 -0
  147. data/lib/slack/web/api/endpoints/admin_inviteRequests_denied.rb +33 -0
  148. data/lib/slack/web/api/endpoints/admin_teams.rb +50 -0
  149. data/lib/slack/web/api/endpoints/admin_teams_admins.rb +34 -0
  150. data/lib/slack/web/api/endpoints/admin_teams_owners.rb +34 -0
  151. data/lib/slack/web/api/endpoints/admin_teams_settings.rb +99 -0
  152. data/lib/slack/web/api/endpoints/admin_usergroups.rb +77 -0
  153. data/lib/slack/web/api/endpoints/admin_users.rb +163 -0
  154. data/lib/slack/web/api/endpoints/admin_users_session.rb +122 -0
  155. data/lib/slack/web/api/endpoints/admin_users_unsupportedVersions.rb +25 -0
  156. data/lib/slack/web/api/endpoints/api.rb +2 -3
  157. data/lib/slack/web/api/endpoints/apps.rb +27 -0
  158. data/lib/slack/web/api/endpoints/apps_connections.rb +21 -0
  159. data/lib/slack/web/api/endpoints/apps_event_authorizations.rb +34 -0
  160. data/lib/slack/web/api/endpoints/apps_manifest.rb +77 -0
  161. data/lib/slack/web/api/endpoints/apps_permissions.rb +1 -0
  162. data/lib/slack/web/api/endpoints/apps_permissions_resources.rb +31 -0
  163. data/lib/slack/web/api/endpoints/apps_permissions_scopes.rb +21 -0
  164. data/lib/slack/web/api/endpoints/apps_permissions_users.rb +50 -0
  165. data/lib/slack/web/api/endpoints/auth.rb +2 -1
  166. data/lib/slack/web/api/endpoints/auth_teams.rb +33 -0
  167. data/lib/slack/web/api/endpoints/bookmarks.rb +86 -0
  168. data/lib/slack/web/api/endpoints/bots.rb +4 -1
  169. data/lib/slack/web/api/endpoints/calls.rb +83 -0
  170. data/lib/slack/web/api/endpoints/calls_participants.rb +42 -0
  171. data/lib/slack/web/api/endpoints/channels.rb +2 -243
  172. data/lib/slack/web/api/endpoints/chat.rb +145 -46
  173. data/lib/slack/web/api/endpoints/chat_scheduledMessages.rb +40 -0
  174. data/lib/slack/web/api/endpoints/conversations.rb +152 -39
  175. data/lib/slack/web/api/endpoints/dialog.rb +3 -2
  176. data/lib/slack/web/api/endpoints/dnd.rb +9 -4
  177. data/lib/slack/web/api/endpoints/emoji.rb +1 -0
  178. data/lib/slack/web/api/endpoints/files.rb +35 -28
  179. data/lib/slack/web/api/endpoints/files_comments.rb +2 -34
  180. data/lib/slack/web/api/endpoints/files_remote.rb +127 -0
  181. data/lib/slack/web/api/endpoints/groups.rb +1 -243
  182. data/lib/slack/web/api/endpoints/im.rb +1 -101
  183. data/lib/slack/web/api/endpoints/migration.rb +5 -2
  184. data/lib/slack/web/api/endpoints/mpim.rb +1 -86
  185. data/lib/slack/web/api/endpoints/oauth.rb +8 -30
  186. data/lib/slack/web/api/endpoints/oauth_v2.rb +48 -0
  187. data/lib/slack/web/api/endpoints/openid_connect.rb +42 -0
  188. data/lib/slack/web/api/endpoints/pins.rb +8 -15
  189. data/lib/slack/web/api/endpoints/reactions.rb +29 -18
  190. data/lib/slack/web/api/endpoints/reminders.rb +18 -5
  191. data/lib/slack/web/api/endpoints/rtm.rb +14 -9
  192. data/lib/slack/web/api/endpoints/search.rb +30 -15
  193. data/lib/slack/web/api/endpoints/stars.rb +23 -10
  194. data/lib/slack/web/api/endpoints/team.rb +15 -4
  195. data/lib/slack/web/api/endpoints/team_billing.rb +21 -0
  196. data/lib/slack/web/api/endpoints/team_preferences.rb +21 -0
  197. data/lib/slack/web/api/endpoints/team_profile.rb +2 -1
  198. data/lib/slack/web/api/endpoints/tooling_tokens.rb +24 -0
  199. data/lib/slack/web/api/endpoints/usergroups.rb +27 -16
  200. data/lib/slack/web/api/endpoints/usergroups_users.rb +10 -5
  201. data/lib/slack/web/api/endpoints/users.rb +44 -17
  202. data/lib/slack/web/api/endpoints/users_admin.rb +1 -0
  203. data/lib/slack/web/api/endpoints/users_prefs.rb +1 -0
  204. data/lib/slack/web/api/endpoints/users_profile.rb +9 -8
  205. data/lib/slack/web/api/endpoints/views.rb +97 -0
  206. data/lib/slack/web/api/endpoints/workflows.rb +61 -0
  207. data/lib/slack/web/api/endpoints.rb +80 -12
  208. data/lib/slack/web/api/error.rb +1 -0
  209. data/lib/slack/web/api/errors/server_error.rb +37 -0
  210. data/lib/slack/web/api/errors/slack_error.rb +14 -1
  211. data/lib/slack/web/api/errors/too_many_requests_error.rb +2 -4
  212. data/lib/slack/web/api/errors.rb +1066 -0
  213. data/lib/slack/web/api/mixins/{channels.id.rb → conversations.id.rb} +4 -5
  214. data/lib/slack/web/api/mixins/ids.id.rb +3 -2
  215. data/lib/slack/web/api/mixins/users.id.rb +2 -3
  216. data/lib/slack/web/api/mixins/users.search.rb +1 -0
  217. data/lib/slack/web/api/mixins.rb +2 -2
  218. data/lib/slack/web/api/patches/chat.1.patch +70 -0
  219. data/lib/slack/web/api/patches/views.1.view-json.patch +40 -0
  220. data/lib/slack/web/api/patches/views.1.views-published.patch +16 -0
  221. data/lib/slack/web/api/templates/command.erb +1 -0
  222. data/lib/slack/web/api/templates/commands.erb +1 -0
  223. data/lib/slack/web/api/templates/endpoints.erb +2 -2
  224. data/lib/slack/web/api/templates/errors.erb +20 -0
  225. data/lib/slack/web/api/templates/method.erb +5 -1
  226. data/lib/slack/web/api/templates/method_spec.erb +2 -1
  227. data/lib/slack/web/client.rb +2 -1
  228. data/lib/slack/web/config.rb +3 -0
  229. data/lib/slack/web/faraday/connection.rb +24 -20
  230. data/lib/slack/web/faraday/request.rb +5 -1
  231. data/lib/slack/web/faraday/response/raise_error.rb +14 -7
  232. data/lib/slack/web/faraday/response/wrap_error.rb +24 -0
  233. data/lib/slack/web/pagination/cursor.rb +7 -7
  234. data/lib/slack-ruby-client.rb +12 -5
  235. data/lib/slack.rb +1 -0
  236. data/lib/slack_ruby_client.rb +1 -0
  237. data/lib/tasks/git.rake +1 -0
  238. data/lib/tasks/real_time.rake +16 -8
  239. data/lib/tasks/update.rake +1 -0
  240. data/lib/tasks/web.rake +39 -10
  241. data/screenshots/create-app.png +0 -0
  242. data/slack-ruby-client.gemspec +7 -12
  243. data/spec/fixtures/slack/web/429_error.yml +50 -54
  244. data/spec/fixtures/slack/web/auth_test_error.yml +51 -18
  245. data/spec/fixtures/slack/web/auth_test_success.yml +50 -26
  246. data/spec/fixtures/slack/web/conversations_info.yml +167 -0
  247. data/spec/fixtures/slack/web/conversations_setTopic.yml +84 -0
  248. data/spec/fixtures/slack/web/conversations_setTopic_one_page.yml +172 -0
  249. data/spec/fixtures/slack/web/conversations_setTopic_paginated.yml +253 -0
  250. data/spec/fixtures/slack/web/paginated_users_list.yml +501 -69
  251. data/spec/fixtures/slack/web/rtm_connect.yml +267 -30
  252. data/spec/fixtures/slack/web/rtm_start.yml +771 -60
  253. data/spec/fixtures/slack/web/users_info.yml +153 -69
  254. data/spec/fixtures/slack/web/users_list.yml +102 -41
  255. data/spec/fixtures/slack/web/views_open_error.yml +83 -0
  256. data/spec/integration/integration_spec.rb +116 -48
  257. data/spec/slack/config_spec.rb +2 -0
  258. data/spec/slack/events/config_spec.rb +33 -0
  259. data/spec/slack/events/request_spec.rb +184 -0
  260. data/spec/slack/messages/formatting_spec.rb +25 -14
  261. data/spec/slack/real_time/api/message_spec.rb +6 -1
  262. data/spec/slack/real_time/api/ping_spec.rb +2 -0
  263. data/spec/slack/real_time/api/typing_spec.rb +5 -1
  264. data/spec/slack/real_time/client_spec.rb +258 -62
  265. data/spec/slack/real_time/concurrency/it_behaves_like_a_realtime_socket.rb +2 -0
  266. data/spec/slack/real_time/concurrency/with_concurrency_spec.rb +10 -0
  267. data/spec/slack/real_time/concurrency/without_concurrency_spec.rb +10 -0
  268. data/spec/slack/real_time/event_handlers/bot_spec.rb +3 -2
  269. data/spec/slack/real_time/event_handlers/channel_spec.rb +14 -11
  270. data/spec/slack/real_time/event_handlers/event_handlers_spec.rb +2 -1
  271. data/spec/slack/real_time/event_handlers/group_spec.rb +6 -5
  272. data/spec/slack/real_time/event_handlers/im_spec.rb +10 -9
  273. data/spec/slack/real_time/event_handlers/team_spec.rb +3 -1
  274. data/spec/slack/real_time/event_handlers/user_spec.rb +3 -2
  275. data/spec/slack/real_time/rtm_connect_spec.rb +2 -1
  276. data/spec/slack/real_time/rtm_start_spec.rb +2 -1
  277. data/spec/slack/real_time/store_spec.rb +4 -3
  278. data/spec/slack/slack_spec.rb +42 -8
  279. data/spec/slack/version_spec.rb +2 -1
  280. data/spec/slack/web/api/endpoints/admin_analytics_spec.rb +13 -0
  281. data/spec/slack/web/api/endpoints/admin_apps_approved_spec.rb +8 -0
  282. data/spec/slack/web/api/endpoints/admin_apps_requests_spec.rb +13 -0
  283. data/spec/slack/web/api/endpoints/admin_apps_restricted_spec.rb +8 -0
  284. data/spec/slack/web/api/endpoints/admin_apps_spec.rb +18 -0
  285. data/spec/slack/web/api/endpoints/admin_auth_policy_spec.rb +35 -0
  286. data/spec/slack/web/api/endpoints/admin_barriers_spec.rb +38 -0
  287. data/spec/slack/web/api/endpoints/admin_conversations_ekm_spec.rb +8 -0
  288. data/spec/slack/web/api/endpoints/admin_conversations_restrictAccess_spec.rb +32 -0
  289. data/spec/slack/web/api/endpoints/admin_conversations_spec.rb +98 -0
  290. data/spec/slack/web/api/endpoints/admin_emoji_spec.rb +37 -0
  291. data/spec/slack/web/api/endpoints/admin_inviteRequests_approved_spec.rb +8 -0
  292. data/spec/slack/web/api/endpoints/admin_inviteRequests_denied_spec.rb +8 -0
  293. data/spec/slack/web/api/endpoints/admin_inviteRequests_spec.rb +18 -0
  294. data/spec/slack/web/api/endpoints/admin_teams_admins_spec.rb +13 -0
  295. data/spec/slack/web/api/endpoints/admin_teams_owners_spec.rb +13 -0
  296. data/spec/slack/web/api/endpoints/admin_teams_settings_spec.rb +53 -0
  297. data/spec/slack/web/api/endpoints/admin_teams_spec.rb +16 -0
  298. data/spec/slack/web/api/endpoints/admin_usergroups_spec.rb +37 -0
  299. data/spec/slack/web/api/endpoints/admin_users_session_spec.rb +41 -0
  300. data/spec/slack/web/api/endpoints/admin_users_spec.rb +67 -0
  301. data/spec/slack/web/api/endpoints/admin_users_unsupportedVersions_spec.rb +8 -0
  302. data/spec/slack/web/api/endpoints/api_spec.rb +1 -0
  303. data/spec/slack/web/api/endpoints/apps_connections_spec.rb +8 -0
  304. data/spec/slack/web/api/endpoints/apps_event_authorizations_spec.rb +13 -0
  305. data/spec/slack/web/api/endpoints/apps_manifest_spec.rb +36 -0
  306. data/spec/slack/web/api/endpoints/apps_spec.rb +16 -0
  307. data/spec/slack/web/api/endpoints/auth_teams_spec.rb +8 -0
  308. data/spec/slack/web/api/endpoints/bookmarks_spec.rb +40 -0
  309. data/spec/slack/web/api/endpoints/bots_spec.rb +1 -0
  310. data/spec/slack/web/api/endpoints/calls_participants_spec.rb +24 -0
  311. data/spec/slack/web/api/endpoints/calls_spec.rb +31 -0
  312. data/spec/slack/web/api/endpoints/chat_scheduledMessages_spec.rb +8 -0
  313. data/spec/slack/web/api/endpoints/custom_specs/auth_spec.rb +9 -7
  314. data/spec/slack/web/api/endpoints/custom_specs/chat_spec.rb +131 -39
  315. data/spec/slack/web/api/endpoints/custom_specs/conversations_spec.rb +13 -0
  316. data/spec/slack/web/api/endpoints/custom_specs/dialog_spec.rb +16 -6
  317. data/spec/slack/web/api/endpoints/custom_specs/users_spec.rb +8 -3
  318. data/spec/slack/web/api/endpoints/custom_specs/views_spec.rb +103 -0
  319. data/spec/slack/web/api/endpoints/dnd_spec.rb +4 -3
  320. data/spec/slack/web/api/endpoints/emoji_spec.rb +1 -0
  321. data/spec/slack/web/api/endpoints/files_comments_spec.rb +3 -21
  322. data/spec/slack/web/api/endpoints/files_remote_spec.rb +24 -0
  323. data/spec/slack/web/api/endpoints/files_spec.rb +5 -4
  324. data/spec/slack/web/api/endpoints/migration_spec.rb +1 -0
  325. data/spec/slack/web/api/endpoints/oauth_spec.rb +1 -22
  326. data/spec/slack/web/api/endpoints/oauth_v2_spec.rb +16 -0
  327. data/spec/slack/web/api/endpoints/openid_connect_spec.rb +8 -0
  328. data/spec/slack/web/api/endpoints/pins_spec.rb +1 -0
  329. data/spec/slack/web/api/endpoints/reactions_spec.rb +8 -1
  330. data/spec/slack/web/api/endpoints/reminders_spec.rb +3 -2
  331. data/spec/slack/web/api/endpoints/rtm_spec.rb +1 -0
  332. data/spec/slack/web/api/endpoints/search_spec.rb +1 -0
  333. data/spec/slack/web/api/endpoints/stars_spec.rb +1 -0
  334. data/spec/slack/web/api/endpoints/team_billing_spec.rb +8 -0
  335. data/spec/slack/web/api/endpoints/team_preferences_spec.rb +8 -0
  336. data/spec/slack/web/api/endpoints/team_profile_spec.rb +1 -0
  337. data/spec/slack/web/api/endpoints/team_spec.rb +1 -0
  338. data/spec/slack/web/api/endpoints/tooling_tokens_spec.rb +13 -0
  339. data/spec/slack/web/api/endpoints/usergroups_spec.rb +1 -0
  340. data/spec/slack/web/api/endpoints/usergroups_users_spec.rb +3 -2
  341. data/spec/slack/web/api/endpoints/users_admin_spec.rb +1 -0
  342. data/spec/slack/web/api/endpoints/users_prefs_spec.rb +1 -0
  343. data/spec/slack/web/api/endpoints/users_profile_spec.rb +1 -0
  344. data/spec/slack/web/api/endpoints/workflows_spec.rb +26 -0
  345. data/spec/slack/web/api/error_spec.rb +7 -7
  346. data/spec/slack/web/api/errors/slack_error_spec.rb +26 -7
  347. data/spec/slack/web/api/mixins/conversations_list_spec.rb +21 -0
  348. data/spec/slack/web/api/mixins/conversations_spec.rb +43 -0
  349. data/spec/slack/web/api/mixins/users_spec.rb +25 -14
  350. data/spec/slack/web/api/pagination/cursor_spec.rb +43 -15
  351. data/spec/slack/web/client_spec.rb +186 -19
  352. data/spec/slack/web/faraday/request_spec.rb +80 -0
  353. data/spec/slack/web/faraday/response/raise_error_spec.rb +48 -12
  354. data/spec/spec_helper.rb +9 -2
  355. data/spec/support/queue_with_timeout.rb +5 -4
  356. data/spec/support/real_time/concurrency/mock.rb +1 -0
  357. data/spec/support/real_time/connected_client.rb +6 -6
  358. data/spec/support/real_time/event.rb +1 -0
  359. data/spec/support/token.rb +1 -0
  360. data/spec/support/vcr.rb +37 -1
  361. metadata +177 -231
  362. data/.travis.yml +0 -30
  363. data/examples/hi_real_time/Gemfile +0 -5
  364. data/examples/hi_real_time/hi.gif +0 -0
  365. data/examples/hi_real_time/hi.rb +0 -37
  366. data/examples/hi_real_time_async_celluloid/Gemfile +0 -6
  367. data/examples/hi_real_time_async_eventmachine/Procfile +0 -2
  368. data/examples/hi_real_time_async_eventmachine/hi.rb +0 -36
  369. data/lib/slack/real_time/concurrency/celluloid.rb +0 -117
  370. data/lib/slack/real_time/concurrency/eventmachine.rb +0 -60
  371. data/lib/slack/web/api/mixins/channels.id.json +0 -20
  372. data/lib/slack/web/api/mixins/groups.id.json +0 -20
  373. data/lib/slack/web/api/mixins/groups.id.rb +0 -26
  374. data/lib/slack/web/api/patches/chat.1.text-attachments-required.patch +0 -13
  375. data/lib/slack/web/api/patches/chat.2.attachments-json.patch +0 -17
  376. data/lib/slack/web/api/patches/chat.3.update-attachments-support.patch +0 -21
  377. data/lib/slack/web/api/patches/chat.4.postEphemeral-attachments-support.patch +0 -17
  378. data/screenshots/register-bot.png +0 -0
  379. data/spec/fixtures/slack/web/503_error.yml +0 -14
  380. data/spec/fixtures/slack/web/channels_info.yml +0 -46
  381. data/spec/fixtures/slack/web/groups_info.yml +0 -43
  382. data/spec/slack/real_time/concurrency/celluloid_spec.rb +0 -62
  383. data/spec/slack/real_time/concurrency/eventmachine_spec.rb +0 -47
  384. data/spec/slack/web/api/endpoints/apps_permissions_spec.rb +0 -15
  385. data/spec/slack/web/api/endpoints/conversations_spec.rb +0 -100
  386. data/spec/slack/web/api/endpoints/custom_specs/channels_spec.rb +0 -11
  387. data/spec/slack/web/api/endpoints/custom_specs/groups_spec.rb +0 -11
  388. data/spec/slack/web/api/endpoints/im_spec.rb +0 -38
  389. data/spec/slack/web/api/endpoints/mpim_spec.rb +0 -38
  390. data/spec/slack/web/api/errors/service_unavailable_spec.rb +0 -14
  391. data/spec/slack/web/api/mixins/channels_spec.rb +0 -31
  392. data/spec/slack/web/api/mixins/groups_spec.rb +0 -31
data/CHANGELOG.md CHANGED
@@ -1,11 +1,136 @@
1
- ### 0.11.1 (1/23/2017)
1
+ ### 1.1.0 (2022/06/05)
2
+
3
+ * [#400](https://github.com/slack-ruby/slack-ruby-client/pull/400): Replace Travis-CI with GitHub Actions - [@dblock](https://github.com/dblock).
4
+ * [#401](https://github.com/slack-ruby/slack-ruby-client/pull/401): Upgraded RuboCop to 1.26.0 - [@dblock](https://github.com/dblock).
5
+ * [#401](https://github.com/slack-ruby/slack-ruby-client/pull/401): Added support for Ruby 3.1.1 - [@dblock](https://github.com/dblock).
6
+ * [#405](https://github.com/slack-ruby/slack-ruby-client/pull/405): Added `admin_apps_requests_cancel`, `admin_users_unsupportedVersions_export`, `bookmarks_add`, `bookmarks_edit`, `bookmarks_list`, `bookmarks_remove` - [@dblock](https://github.com/dblock).
7
+ * [#404](https://github.com/slack-ruby/slack-ruby-client/pull/404): Update `chat_update` method not to raise error with parameter which contains only `reply_broadcast` - [@colorbox](https://github.com/colorbox).
8
+ * [#406](https://github.com/slack-ruby/slack-ruby-client/pull/406): Update Faraday to `>= 2.0` - [@schinery](https://github.com/slack-ruby/slack-ruby-client/pull/406).
9
+ * [#406](https://github.com/slack-ruby/slack-ruby-client/pull/406): Removed support for Ruby 2.5 and 2.6 - [@schinery](https://github.com/slack-ruby/slack-ruby-client/pull/406).
10
+ * [#406](https://github.com/slack-ruby/slack-ruby-client/pull/406): Test against latest Ruby 2.7, 3.0 and 3.1 - [@schinery](https://github.com/slack-ruby/slack-ruby-client/pull/406).
11
+ * [#406](https://github.com/slack-ruby/slack-ruby-client/pull/406): Upgraded RuboCop to 1.26.1 and lock to version - [@schinery](https://github.com/slack-ruby/slack-ruby-client/pull/406).
12
+ * [#406](https://github.com/slack-ruby/slack-ruby-client/pull/406): Updated Danger PR Linter GitHub action to use separate `Gemfile` - [@schinery](https://github.com/slack-ruby/slack-ruby-client/pull/406).
13
+
14
+ ### 1.0.0 (2021/12/21)
15
+
16
+ * [#394](https://github.com/slack-ruby/slack-ruby-client/pull/394): Added support for Ruby 3.0 - [@dblock](https://github.com/dblock).
17
+ * [#394](https://github.com/slack-ruby/slack-ruby-client/pull/394): Upgraded to RuboCop 0.93.1 - [@dblock](https://github.com/dblock).
18
+ * [#393](https://github.com/slack-ruby/slack-ruby-client/pull/393): Removed deprecated `oauth_token`, and leftover traces of `channels` and `groups` APIs - [@dblock](https://github.com/dblock).
19
+ * [#393](https://github.com/slack-ruby/slack-ruby-client/pull/393): Added `admin_auth_policy_assignEntities`, `admin_auth_policy_getEntities` and `admin_auth_policy_removeEntities` `admin_conversations_disconnectShared`, `admin_users_session_clearSettings`, `admin_users_session_getSettings`, `admin_users_session_resetBulk`, `admin_users_session_setSettings`, `apps_manifest_create`, `apps_manifest_delete`, `apps_manifest_export`, `apps_manifest_update`, `apps_manifest_validate`, `conversations_acceptSharedInvite`, `conversations_approveSharedInvite`, `conversations_declineSharedInvite`, `conversations_inviteShared`, `conversations_listConnectInvites`, `oauth_v2_exchange`, `openid_connect_token`, `openid_connect_userInfo`, `team_billing_info`, `team_preferences_list`, `tooling_tokens_rotate` - [@dblock](https://github.com/dblock).
20
+ * [#386](https://github.com/slack-ruby/slack-ruby-client/pull/386): Gemspec: drop unused `test_files` directive - [@olleolleolle](https://github.com/olleolleolle).
21
+ * [#380](https://github.com/slack-ruby/slack-ruby-client/pull/380): Updates to server error classes and hierarchy - [@jmanian](https://github.com/jmanian).
22
+ * [#387](https://github.com/slack-ruby/slack-ruby-client/pull/387): Send token in Authorization header - [@chrisbloom7](https://github.com/chrisbloom7).
23
+
24
+ ### 0.17.0 (2021/03/07)
25
+
26
+ * [#370](https://github.com/slack-ruby/slack-ruby-client/pull/370): Removed deprecated `im_`, `mpim_`, `channels_`, and `groups_` methods - [@dblock](https://github.com/dblock).
27
+ * [#368](https://github.com/slack-ruby/slack-ruby-client/pull/368): Removed `admin_conversations_whitelist` and `admin_conversations_disconnectShared` - [@dblock](https://github.com/dblock).
28
+ * [#359](https://github.com/slack-ruby/slack-ruby-client/pull/359): Handle non-JSON 500 errors - [@agrobbin](https://github.com/agrobbin).
29
+ * [#360](https://github.com/slack-ruby/slack-ruby-client/pull/360): Remove faye-websocket from the concurrency detection error message - [@dblock](https://github.com/dblock).
30
+ * [#369](https://github.com/slack-ruby/slack-ruby-client/pull/369): Support rack requests in `Slack::Events::Request` - [@wedgex](https://github.com/wedgex).
31
+
32
+ ### 0.16.0 (2021/01/24)
33
+
34
+ * [#350](https://github.com/slack-ruby/slack-ruby-client/pull/350): Handle server errors such as timeouts & non-JSON responses - [@ojab](https://github.com/ojab).
35
+ * [#354](https://github.com/slack-ruby/slack-ruby-client/pull/354): Rewind body after checking request signature - [@sunny](https://github.com/sunny).
36
+ * [#355](https://github.com/slack-ruby/slack-ruby-client/pull/355), [#357](https://github.com/slack-ruby/slack-ruby-client/pull/357): Removed `celluloid-io` and `faye-websocket` support - [@wasabigeek](https://github.com/wasabigeek).
37
+ * [#356](https://github.com/slack-ruby/slack-ruby-client/pull/356): Added `admin_apps_clearResolution`, `admin_conversations_getCustomRetention`, `admin_conversations_removeCustomRetention`, `admin_conversations_setCustomRetention`, `admin_users_session_list` and `auth_teams_list` endpoints - [@dblock](https://github.com/dblock).
38
+ * [#348](https://github.com/slack-ruby/slack-ruby-client/pull/348): Added `admin_conversations_archive`, `admin_conversations_convertToPrivate`, `admin_conversations_create`, `admin_conversations_delete`, `admin_conversations_disconnectShared`, `admin_conversations_getConversationPrefs`, `admin_conversations_getTeams`, `admin_conversations_invite`, `admin_conversations_rename`, `admin_conversations_search`, `admin_conversations_setConversationPrefs`, `admin_conversations_unarchive`, `admin_conversations_ekm_listOriginalConnectedChannelInfo`, `admin_users_session_invalidate`, `apps_event_authorizations_list`, `conversations_mark`, `workflows_stepCompleted`, `workflows_stepFailed` and `workflows_updateStep` endpoints - [@wasabigeek](https://github.com/wasabigeek).
39
+
40
+ ### 0.15.1 (2020/9/3)
41
+
42
+ * [#336](https://github.com/slack-ruby/slack-ruby-client/pull/336): Fix: handle nil events - [@pyama86](https://github.com/pyama86).
43
+ * [#339](https://github.com/slack-ruby/slack-ruby-client/pull/339): Fix: `channel_not_found` resolving channel IDs with 100+ channels - [@dblock](https://github.com/dblock).
44
+ * [#340](https://github.com/slack-ruby/slack-ruby-client/pull/340): Added `adapter` configuration setting to change the `Faraday` HTTP adapter - [@watsonjon](https://github.com/watsonjon).
45
+
46
+ ### 0.15.0 (2020/7/26)
47
+
48
+ * [#322](https://github.com/slack-ruby/slack-ruby-client/pull/322): Cache `Faraday::Connection` for persistent adapters - [@drbrain](https://github.com/drbrain).
49
+ * [#324](https://github.com/slack-ruby/slack-ruby-client/pull/324): Require Faraday >= 1.0 - [@dblock](https://github.com/dblock).
50
+ * [#324](https://github.com/slack-ruby/slack-ruby-client/pull/324): Upgrade slack-ruby-danger, rubocop, rubocop-rspec and rubocop-performance - [@dblock](https://github.com/dblock).
51
+ * [#327](https://github.com/slack-ruby/slack-ruby-client/pull/327), [#326](https://github.com/slack-ruby/slack-ruby-client/pull/326): Added `admin_conversations_whitelist`, `admin_usergroups`, `calls` and `calls_participants` endpoints - [@wasabigeek](https://github.com/wasabigeek).
52
+ * [#329](https://github.com/slack-ruby/slack-ruby-client/pull/329): Log when methods are deprecated - [@wasabigeek](https://github.com/wasabigeek).
53
+ * [#325](https://github.com/slack-ruby/slack-ruby-client/pull/325): Remove activesupport dependency - [@ianks](https://github.com/ianks).
54
+ * [#331](https://github.com/slack-ruby/slack-ruby-client/pull/331): Use `conversations_list` instead of deprecated `channels_list`. Added `admin_conversations_restrictAccess_addGroup`, `admin_conversations_restrictAccess_listGroups` and `admin_conversations_restrictAccess_removeGroup` endpoints - [@wasabigeek](https://github.com/wasabigeek).
55
+
56
+ ### 0.14.6 (2020/3/28)
57
+
58
+ * [#305](https://github.com/slack-ruby/slack-ruby-client/pull/305): Added `admin_inviteRequests_approve`, `admin_inviteRequests_deny`, `admin_inviteRequests_list`, `admin_inviteRequests_approved_list`, `admin_inviteRequests_denied_list`, `admin_teams_create`, `admin_teams_list`, `admin_teams_admins_list`, `admin_teams_owners_list`, `admin_teams_settings`, `admin_teams_settings_setIcon`, `admin_teams_settings_setName`, `admin_teams_settings_setDescription`, `admin_users_assign`, `admin_users_invite`, `admin_users_remove`, `admin_users_setAdmin`, `admin_users_setOwner` and `admin_users_setRegular` endpoints - [@manuelmeurer](https://github.com/manuelmeurer).
59
+ * [#311](https://github.com/slack-ruby/slack-ruby-client/pull/311): Made Web API `response_metadata` more accessible in errors - [@jmanian](https://github.com/jmanian).
60
+ * [#312](https://github.com/slack-ruby/slack-ruby-client/pull/312): Added specific error classes for Web API - [@jmanian](https://github.com/jmanian).
61
+ * [#313](https://github.com/slack-ruby/slack-ruby-client/pull/313): Added `admin_teams_settings_info`, `admin_users_list`, `admin_users_setExpiration`, `admin_apps_approved_list`, `admin_apps_restricted_list`, `admin_conversations_setTeams`, `admin_emoji_add`, `admin_emoji_addAlias`, `admin_emoji_list`, `admin_emoji_remove` and `admin_emoji_rename` endpoints - [@dblock](https://github.com/dblock).
62
+
63
+ ### 0.14.5 (2019/12/23)
64
+
65
+ * [#293](https://github.com/slack-ruby/slack-ruby-client/pull/293): Rubocop auto-correct and comprehensive todo - [@jcraigk](https://github.com/jcraigk).
66
+ * [#297](https://github.com/slack-ruby/slack-ruby-client/pull/297): Various Rubocop fixes - [@jcraigk](https://github.com/jcraigk).
67
+ * [#298](https://github.com/slack-ruby/slack-ruby-client/pull/298): Added `admin_apps`, `admin_app_requests` and `views` endpoints - [@jmanian](https://github.com/jmanian).
68
+ * [#303](https://github.com/slack-ruby/slack-ruby-client/pull/303): Added `oauth_v2_access` and `views_publish` endpoints - [@jwright](https://github.com/jwright).
69
+ * [#309](https://github.com/slack-ruby/slack-ruby-client/pull/309): Stop ping on `inactive_account` and `invalid_auth` - [@dblock](https://github.com/dblock).
70
+
71
+ ### 0.14.4 (2019/7/28)
72
+
73
+ * [#289](https://github.com/slack-ruby/slack-ruby-client/pull/289): Fix reconnects when ping timers under/overshoot - [@georgyangelov](https://github.com/georgyangelov).
74
+ * [#290](https://github.com/slack-ruby/slack-ruby-client/pull/290): Expose Slack::RealTime::Client.logger accessor publicly - [@jcraigk](https://github.com/jcraigk).
75
+
76
+ ### 0.14.3 (2019/7/23)
77
+
78
+ * [#279](https://github.com/slack-ruby/slack-ruby-client/pull/279): Prevent ping worker from dying on unexpected errors - [@dblock](https://github.com/dblock).
79
+ * [#281](https://github.com/slack-ruby/slack-ruby-client/pull/281): Added `admin_users_session_reset` to Web API - [@dblock](https://github.com/dblock).
80
+ * [#283](https://github.com/slack-ruby/slack-ruby-client/pull/283): Fail when used with incompatible async-websocket > 0.8.0 - [@dblock](https://github.com/dblock).
81
+ * [#284](https://github.com/slack-ruby/slack-ruby-client/pull/284): Include team id, name and domain in log output - [@dblock](https://github.com/dblock).
82
+
83
+ ### 0.14.2 (2019/4/12)
84
+
85
+ * [#256](https://github.com/slack-ruby/slack-ruby-client/pull/256): Added support for specifying signing secrets on a per-request basis via optional parameters to the `Slack::Events::Request` constructor - [@gabrielmdeal](https://github.com/gabrielmdeal).
86
+ * [#257](https://github.com/slack-ruby/slack-ruby-client/pull/257), [#262](https://github.com/slack-ruby/slack-ruby-client/pull/262): Fixed occasional failures to reconnect - [@ioquatix](https://github.com/ioquatix), [@dblock](https://github.com/dblock).
87
+ * [#264](https://github.com/slack-ruby/slack-ruby-client/pull/264): Added `chat_scheduleMessage`, `chat_deleteScheduledMessage` and `chat_scheduledMessages_list` - [@dblock](https://github.com/dblock).
88
+ * [#264](https://github.com/slack-ruby/slack-ruby-client/pull/264): Removed `files_comments_add` and `files_comments_edit` - [@dblock](https://github.com/dblock).
89
+
90
+ ### 0.14.1 (2019/2/26)
91
+
92
+ * [#254](https://github.com/slack-ruby/slack-ruby-client/issues/254): Fix: celluloid infinite reconnect loop - [@dblock](https://github.com/dblock).
93
+
94
+ ### 0.14.0 (2019/2/25)
95
+
96
+ * [#238](https://github.com/slack-ruby/slack-ruby-client/issues/238): Added `Slack::Events::Request#verify!` to check whether an event request is coming from Slack - [@dblock](https://github.com/dblock).
97
+ * [#226](https://github.com/slack-ruby/slack-ruby-client/pull/226), [#232](https://github.com/slack-ruby/slack-ruby-client/pull/232), [#236](https://github.com/slack-ruby/slack-ruby-client/pull/236), [#234](https://github.com/slack-ruby/slack-ruby-client/pull/234): Added periodic ping that reconnects on failure - [@RodneyU215](https://github.com/RodneyU215), [@dblock](https://github.com/dblock), [@ioquatix](https://github.com/ioquatix).
98
+ * [#242](https://github.com/slack-ruby/slack-ruby-client/pull/242): Added `thread_ts` option to `chat_postEphemeral` - [@dblock](https://github.com/dblock).
99
+ * [#242](https://github.com/slack-ruby/slack-ruby-client/pull/242): Added `apps_uninstall` to Web API - [@dblock](https://github.com/dblock).
100
+ * [#244](https://github.com/slack-ruby/slack-ruby-client/pull/244): Implementing #restart for the celluloid socket class - [@RodneyU215](https://github.com/RodneyU215).
101
+ * [#246](https://github.com/slack-ruby/slack-ruby-client/pull/246): Added TOC to README and danger-toc - [@dblock](https://github.com/dblock).
102
+ * [#253](https://github.com/slack-ruby/slack-ruby-client/pull/253): Support for Block Kit - [@JrmKrb](https://github.com/JrmKrb).
103
+
104
+ ### 0.13.1 (2018/9/30)
105
+
106
+ * [#228](https://github.com/slack-ruby/slack-ruby-client/pull/228): Replace `Thread` with `Actor` in Celluloid async support - [@dblock](https://github.com/dblock).
107
+
108
+ ### 0.13.0 (2018/9/8)
109
+
110
+ * [#219](https://github.com/slack-ruby/slack-ruby-client/pull/219): Added support for `async-websocket` - [@dblock](https://github.com/dblock), [@ioquatix](https://github.com/ioquatix).
111
+ * [#224](https://github.com/slack-ruby/slack-ruby-client/pull/224): Celluloid async support now uses a thread per client - [@dblock](https://github.com/dblock).
112
+ * [#224](https://github.com/slack-ruby/slack-ruby-client/pull/224): Attempt to shutdown EventMachine if a reactor wasn't already running on start - [@dblock](https://github.com/dblock).
113
+
114
+ ### 0.12.0 (2018/8/20)
115
+
116
+ * [#216](https://github.com/slack-ruby/slack-ruby-client/pull/216): Handle `Errno::ECONNRESET` and empty buffer reads with celluloid-io - [@dblock](https://github.com/dblock).
117
+ * [#215](https://github.com/slack-ruby/slack-ruby-client/pull/215): Web API `groups_list`, `files_info`, `mpim_list`, `reactions_list` and `stars_list` now support cursor pagination - [@hotwatermorning](https://github.com/hotwatermorning).
118
+ * [#215](https://github.com/slack-ruby/slack-ruby-client/pull/215): Added `apps_permissions_users_list` and `apps_permissions_users_request` - [@hotwatermorning](https://github.com/hotwatermorning).
119
+ * [#209](https://github.com/slack-ruby/slack-ruby-client/pull/209): Changed `chat_postEphemeral`to check for existence of either `text` or `attachments` - [@peterzhu2118](https://github.com/peterzhu2118).
120
+ * [#207](https://github.com/slack-ruby/slack-ruby-client/pull/207): Added `apps_permissions_resources_list` and `apps_permissions_scopes_list` - [@jmanian](https://github.com/jmanian).
121
+ * [#207](https://github.com/slack-ruby/slack-ruby-client/pull/207): Added `users_conversations` - [@jmanian](https://github.com/jmanian).
122
+ * [#206](https://github.com/slack-ruby/slack-ruby-client/pull/206): Fix 100% cpu usage in async examples - [@felixbuenemann](https://github.com/felixbuenemann).
123
+ * [#217](https://github.com/slack-ruby/slack-ruby-client/pull/217): Upgraded RuboCop to 0.58.2 - [@dblock](https://github.com/dblock).
124
+ * [#217](https://github.com/slack-ruby/slack-ruby-client/pull/217): No longer tested with Ruby 2.1, added 2.5 - [@dblock](https://github.com/dblock).
125
+
126
+ ### 0.11.1 (2018/1/23)
2
127
 
3
128
  * [#187](https://github.com/slack-ruby/slack-ruby-client/pull/187): Concatenate error message when multiple errors present - [@chrislopresto](https://github.com/chrislopresto).
4
129
  * [#188](https://github.com/slack-ruby/slack-ruby-client/pull/188): Fixed `NoMethodError` when Slack is unavailable - [@sonicdoe](https://github.com/sonicdoe).
5
130
  * [#196](https://github.com/slack-ruby/slack-ruby-client/pull/196): Added `users_lookupByEmail` - [@manuelmeurer](https://github.com/manuelmeurer).
6
131
  * [#185](https://github.com/slack-ruby/slack-ruby-client/pull/185): Calling undocumented endpoints will now produce a warning - [@aviflombaum](https://github.com/aviflombaum).
7
132
 
8
- ### 0.11.0 (11/25/2017)
133
+ ### 0.11.0 (2017/11/25)
9
134
 
10
135
  * [#173](https://github.com/slack-ruby/slack-ruby-client/issues/173): Added dialog support - [@alexagranov](https://github.com/alexagranov).
11
136
  * [#176](https://github.com/slack-ruby/slack-ruby-client/issues/176): Drop dependency on `json` gem - [@seuros](https://github.com/seuros).
@@ -14,7 +139,7 @@
14
139
  * [#181](https://github.com/slack-ruby/slack-ruby-client/pull/181): Added `chat_getPermalink`, `migration_exchange` - [@dblock](https://github.com/dblock).
15
140
  * [#182](https://github.com/slack-ruby/slack-ruby-client/pull/182): Added undocumented methods support with `channels_delete`, `chat_command`, `files_edit`, `files_share`, `users_admin_invite`, `users_admin_setInactive` and `users_prefs_get` - [@dblock](https://github.com/dblock).
16
141
 
17
- ### 0.10.0 (9/19/2017)
142
+ ### 0.10.0 (2017/9/19)
18
143
 
19
144
  * [#169](https://github.com/slack-ruby/slack-ruby-client/pull/169): Added [Conversations API](https://api.slack.com/docs/conversations-api) - [@jmanian](https://github.com/jmanian).
20
145
  * [#169](https://github.com/slack-ruby/slack-ruby-client/pull/169): Added `include_locale` parameter to several methods (`channels_info`, `groups_info`, `im_open`, `rtm_start`, `users_info`, `users_list`) - [@jmanian](https://github.com/jmanian).
@@ -25,25 +150,25 @@
25
150
  * [#162](https://github.com/slack-ruby/slack-ruby-client/pull/162): Gracefully close websocket on `Errno::EPIPE` - [@johanoskarsson](https://github.com/johanoskarsson).
26
151
  * [#172](https://github.com/slack-ruby/slack-ruby-client/pull/172): Use `rtm.start` when store is a subclass of `Slack::RealTime::Stores::Store` (default) - [@kstole](https://github.com/kstole).
27
152
 
28
- ### 0.9.1 (8/24/2017)
153
+ ### 0.9.1 (2017/8/24)
29
154
 
30
155
  * [#158](https://github.com/slack-ruby/slack-ruby-client/issues/158): Updated to latest slack-api-ref; Updated chat.3.update patch to reflect argument reordering; Added chat.4.postEphemeral patch to apply the attachments JSON fix (whitespace last line of diff matters! ;-) - [@alexagranov](https://github.com/alexagranov).
31
156
 
32
- ### 0.9.0 (8/6/2017)
157
+ ### 0.9.0 (2017/8/6)
33
158
 
34
159
  * [#146](https://github.com/slack-ruby/slack-ruby-client/issues/146): Fix: `undefined method running?` and `ThreadError: Target thread must not be current thread` with `Celluloid::IO` - [@dblock](https://github.com/dblock).
35
160
  * [#145](https://github.com/slack-ruby/slack-ruby-client/pull/145): Automatically select `rtm_connect` vs. `rtm_start` - [@dblock](https://github.com/dblock).
36
161
  * [#154](https://github.com/slack-ruby/slack-ruby-client/pull/154): Raise a dedicated error class with 429 responses - [@greggroth](https://github.com/greggroth).
37
162
  * [#154](https://github.com/slack-ruby/slack-ruby-client/pull/154): Namespace error classes under `Slack::Web::Api::Errors` module - [@greggroth](https://github.com/greggroth).
38
163
 
39
- ### 0.8.1 (4/28/2017)
164
+ ### 0.8.1 (2017/4/28)
40
165
 
41
166
  * Added `exclude_members` option to `channels_list` Web API - [@dblock](https://github.com/dblock).
42
167
  * Added `chat_unfurl` to Web API - [@dblock](https://github.com/dblock).
43
168
  * Added `rtm_connect` to RTM API - [@dblock](https://github.com/dblock).
44
169
  * Added `no_latest` support to `rm_start` RTM API - [@dblock](https://github.com/dblock).
45
170
 
46
- ### 0.8.0 (3/12/2017)
171
+ ### 0.8.0 (2017/3/12)
47
172
 
48
173
  * [#135](https://github.com/slack-ruby/slack-ruby-client/issues/135): Added `timeout` and `open_timeout` options to Web API - [@dblock](https://github.com/dblock).
49
174
  * [#134](https://github.com/slack-ruby/slack-ruby-client/issues/134): Set `start_options[:request][:timeout]`, used with `rtm.start` in `Slack::RealTime::Client`, to 180 seconds - [@dblock](https://github.com/dblock).
@@ -52,11 +177,11 @@
52
177
  * [#138](https://github.com/slack-ruby/slack-ruby-client/pull/138): Added `validate` option to `channels_create`, `channels_join`, `channels_rename`, `groups_create` and `groups_rename` Web APIs - [@dblock](https://github.com/dblock).
53
178
  * [#138](https://github.com/slack-ruby/slack-ruby-client/pull/138): Removed `channel` option from `files_comments_add` Web API - [@dblock](https://github.com/dblock).
54
179
 
55
- ### 0.7.9 (2/9/2017)
180
+ ### 0.7.9 (2017/2/9)
56
181
 
57
182
  * [#132](https://github.com/slack-ruby/slack-ruby-client/issues/132): Fix: you are setting a key that conflicts with a built-in method Slack::Messages::Message#presence - [@dblock](https://github.com/dblock).
58
183
 
59
- ### 0.7.8 (1/23/2017)
184
+ ### 0.7.8 (2017/1/23)
60
185
 
61
186
  * [#127](https://github.com/slack-ruby/slack-ruby-client/pull/127): Added `thread_ts` and `reply_broadcast` options to `chat_postMessage` in Web API - [@dblock](https://github.com/dblock).
62
187
  * [#127](https://github.com/slack-ruby/slack-ruby-client/pull/127): Added `channels_replies`, `groups_replies` and `im_replies` to Web API - [@dblock](https://github.com/dblock).
@@ -68,18 +193,18 @@
68
193
  * [#81](https://github.com/slack-ruby/slack-ruby-client/pull/81): Require faraday 0.9.0 or newer - [@leppert](https://github.com/leppert).
69
194
  * [#123](https://github.com/slack-ruby/slack-ruby-client/pull/123): Fix a warning about duplicate definitions - [@michaelherold](https://github.com/michaelherold).
70
195
 
71
- ### 0.7.7 (8/29/2016)
196
+ ### 0.7.7 (2016/8/29)
72
197
 
73
198
  * [#103](https://github.com/slack-ruby/slack-ruby-client/pull/103): Added Danger, PR linting - [@dblock](https://github.com/dblock).
74
199
  * [#101](https://github.com/slack-ruby/slack-ruby-client/issues/101): Fix: protected method `close` called with EventMachine - [@dblock](https://github.com/dblock).
75
200
  * [#104](https://github.com/slack-ruby/slack-ruby-client/issues/104): Fix: thread leak in `start_async` with Celluloid - [@dblock](https://github.com/dblock).
76
201
 
77
- ### 0.7.6 (8/7/2016)
202
+ ### 0.7.6 (2016/8/7)
78
203
 
79
204
  * Added `url_verification`, `message.mpim`, `message.im`, `message.groups` and `message.channels` RealTime events - [@dblock](https://github.com/dblock).
80
205
  * The `im_open` method accepts `return_im` - [@dblock](https://github.com/dblock).
81
206
 
82
- ### 0.7.5 (6/27/2016)
207
+ ### 0.7.5 (2016/6/27)
83
208
 
84
209
  * Added `bots_info` to Web API - [@dblock](https://github.com/dblock).
85
210
  * Added `team_profile_get` and `team_billableInfo` to Web API - [@dblock](https://github.com/dblock).
@@ -87,30 +212,30 @@
87
212
  * Added `users_profile_get` and `users_profile_set` to Web API - [@dblock](https://github.com/dblock).
88
213
  * The `stars_list` method no longer takes a user - [@dblock](https://github.com/dblock).
89
214
 
90
- ### 0.7.4 (5/28/2016)
215
+ ### 0.7.4 (2016/5/28)
91
216
 
92
217
  * [#93](https://github.com/slack-ruby/slack-ruby-client/pull/93): Fix: When using Celluloid concurrency, handle input from the TCP socket asynchronously from reading more - [@benzrf](https://github.com/benzrf).
93
218
  * Added `auth_revoke` and `users_identity` to Web API - [@dblock](https://github.com/dblock).
94
219
  * Added `channel` parameter to `files_comments_add` Web API - [@dblock](https://github.com/dblock).
95
220
 
96
- ### 0.7.3 (5/14/2016)
221
+ ### 0.7.3 (2016/5/14)
97
222
 
98
223
  * [#90](https://github.com/slack-ruby/slack-ruby-client/issues/90): Fix: Celluloid concurrency handles server-side connection closing - [@dblock](https://github.com/dblock).
99
224
 
100
- ### 0.7.2 (5/5/2016)
225
+ ### 0.7.2 (2016/5/5)
101
226
 
102
227
  * [#84](https://github.com/slack-ruby/slack-ruby-client/issues/84): Fix: Celluloid concurrency doesn't parallelize the connection setup - [@dblock](https://github.com/dblock).
103
228
 
104
- ### 0.7.1 (5/2/2016)
229
+ ### 0.7.1 (2016/5/2)
105
230
 
106
231
  * [#82](https://github.com/slack-ruby/slack-ruby-client/pull/82): Fix `usergroups.users.{list,update}` and `files.comments.{add,edit,delete}` APIs - [@masatomo](https://github.com/masatomo).
107
- * [#73](https://github.com/slack-ruby/slack-ruby-client/issues/73): Add a `closed` event - [@rkadyb](https://github.com/rkadyb).
108
- * [#69](https://github.com/slack-ruby/slack-ruby-client/issues/69): Add attachments support for `Slack::Web::Api::Endpoints::Chat.chat_update` - [@nicka](https://github.com/nicka).
232
+ * [#73](https://github.com/slack-ruby/slack-ruby-client/issues/73): Added a `closed` event - [@rkadyb](https://github.com/rkadyb).
233
+ * [#69](https://github.com/slack-ruby/slack-ruby-client/issues/69): Added attachments support for `Slack::Web::Api::Endpoints::Chat.chat_update` - [@nicka](https://github.com/nicka).
109
234
  * [#85](https://github.com/slack-ruby/slack-ruby-client/issues/85): Compatibility with WebMock 2.0 - [@dblock](https://github.com/dblock).
110
235
  * Added `as_user` to `chat_delete` Web API - [@dblock](https://github.com/dblock).
111
236
  * Added `reminders_add`, `reminders_complete`, `reminders_delete`, `reminders_info` and `reminders_list` to Web API - [@dblock](https://github.com/dblock).
112
237
 
113
- ### 0.7.0 (3/6/2016)
238
+ ### 0.7.0 (2016/3/6)
114
239
 
115
240
  * [#68](https://github.com/slack-ruby/slack-ruby-client/issues/68): The `Slack::RealTime::Config#store_class` is now globally configurable - [@dblock](https://github.com/dblock).
116
241
  * [#67](https://github.com/slack-ruby/slack-ruby-client/pull/67): Make `logger` configurable and log HTTP requests and responses as well as RealTime events and socket data - [@mikz](https://github.com/mikz), [@dblock](https://github.com/dblock).
@@ -118,35 +243,35 @@
118
243
  * Added `files_revokePublicURL` and `files_sharedPublicURL` to Web API - [@dblock](https://github.com/dblock).
119
244
  * [#60](https://github.com/slack-ruby/slack-ruby-client/issues/60): Exceptions in event handlers and commands are no longer fatal - [@dblock](https://github.com/dblock).
120
245
 
121
- ### 0.6.0 (2/4/2016)
246
+ ### 0.6.0 (2016/2/4)
122
247
 
123
248
  * [#54](https://github.com/slack-ruby/slack-ruby-client/issues/54): RealTime client maintains a local store of team data for `client.self`, `team`, `users`, `channels`, `groups`, `ims` and `bots` data - [@dblock](https://github.com/dblock).
124
249
  * [#56](https://github.com/slack-ruby/slack-ruby-client/issues/56): API responses in both Web and RealTime clients are now instances of [Slack::Messages::Message](lib/slack/messages/message), which provides method access to properties - [@dblock](https://github.com/dblock).
125
250
  * [#57](https://github.com/slack-ruby/slack-ruby-client/issues/57): Configure arguments to pass to `rtm.start` via `config.start_options` - [@dblock](https://github.com/dblock).
126
251
  * [#52](https://github.com/slack-ruby/slack-ruby-client/issues/52): Added `users_search` - [@dblock](https://github.com/dblock).
127
252
 
128
- ### 0.5.4 (1/23/2016)
253
+ ### 0.5.4 (2016/1/23)
129
254
 
130
255
  * [#45](https://github.com/slack-ruby/slack-ruby-client/issues/45): Added `channels_id`, `groups_id` and `users_id` - [@dblock](https://github.com/dblock).
131
256
  * [#45](https://github.com/slack-ruby/slack-ruby-client/issues/45): Automatically lookup channel, group and user ID in Web API methods when Slack API doesn't accept #channel or @user names - [@dblock](https://github.com/dblock).
132
257
  * [#49](https://github.com/slack-ruby/slack-ruby-client/pull/49): Fix: Celluloid `#connected?` method - [@mikz](https://github.com/mikz), [@kandadaboggu](https://github.com/kandadaboggu).
133
258
 
134
- ### 0.5.3 (1/11/2016)
259
+ ### 0.5.3 (2016/1/11)
135
260
 
136
261
  * [#47](https://github.com/slack-ruby/slack-ruby-client/pull/47): Fix: default to Celluloid newer API - [@jlyonsmith](https://github.com/jlyonsmith), [@dblock](https://github.com/dblock).
137
262
  * Fixed JRuby file encoding regression - [@dblock](https://github.com/dblock).
138
263
 
139
- ### 0.5.2 (1/8/2016)
264
+ ### 0.5.2 (2016/1/8)
140
265
 
141
266
  * [#41](https://github.com/slack-ruby/slack-ruby-client/issues/41): Added `Slack::Messages::Formatting#unescape` - [@dblock](https://github.com/dblock).
142
267
  * Added `files_comments` to Web API - [@dblock](https://github.com/dblock).
143
268
 
144
- ### 0.5.1 (1/4/2016)
269
+ ### 0.5.1 (2016/1/4)
145
270
 
146
271
  * Added `dnd_teamInfo`, `dnd_setSnooze`, `dnd_info`, `dnd_endSnooze` and `dnd_endDnd` to Web API - [@dblock](https://github.com/dblock).
147
272
  * The `files_upload` method now requires both `file` and `filename` to Web API - [@dblock](https://github.com/dblock).
148
273
 
149
- ### 0.5.0 (12/7/2015)
274
+ ### 0.5.0 (2015/12/7)
150
275
 
151
276
  * Added `usergroups_create`, `usergroups_disable`, `usergroups_enable`, `usergroups_list`, `usergroups_update` and `usergroups_users` to Web API - [@dblock](https://github.com/dblock).
152
277
  * Added command-line `slack` client - [@dblock](https://github.com/dblock).
@@ -157,7 +282,7 @@
157
282
  * [#22](https://github.com/slack-ruby/slack-ruby-client/issues/22): Added `Slack::Web::Api::Error#response` - [@dblock](https://github.com/dblock).
158
283
  * Added `logger` to `Slack::Web::Client` configuration that logs HTTP requests - [@dblock](https://github.com/dblock).
159
284
 
160
- ### 0.4.0 (11/8/2015)
285
+ ### 0.4.0 (2015/11/8)
161
286
 
162
287
  * Added `team_integrationLogs` to Web API - [@dblock](https://github.com/dblock).
163
288
  * [#11](https://github.com/slack-ruby/slack-ruby-client/pull/11): Web API `chat_postMessage` errors only if both `attachments` and `text` are missing - [@dblock](https://github.com/dblock).
@@ -167,12 +292,12 @@
167
292
  * Added `unreads` to `channels_history`, `groups_history` and `im_history` to Web API - [@dblock](https://github.com/dblock).
168
293
  * Added `stars_add` and `stars_remove` to Web API - [@dblock](https://github.com/dblock).
169
294
 
170
- ### 0.3.1 (10/16/2015)
295
+ ### 0.3.1 (2015/10/16)
171
296
 
172
297
  * Added `stars_list`, `stars_add` and `stars_remove` to Web API - [@dblock](https://github.com/dblock).
173
298
  * Added `attachments`, `parse` and `link_names` to `chat_update` in Web API - [@dblock](https://github.com/dblock).
174
299
 
175
- ### 0.3.0 (9/1/2015)
300
+ ### 0.3.0 (2015/9/1)
176
301
 
177
302
  * Added `team.info` and `accessLogs` to Web API - [@dblock](https://github.com/dblock).
178
303
  * Removed obsolete `presence` Web API - [@dblock](https://github.com/dblock).
@@ -185,12 +310,12 @@
185
310
  * Use API reference schema from [github.com/dblock/slack-api-ref](https://github.com/dblock/slack-api-ref) - [@dblock](https://github.com/dblock).
186
311
  * Added `reactions_add`, `reactions_list`, `reactions_get` and `reactions_remove` to Web API - [@jakedahn](https://github.com/jakedahn).
187
312
 
188
- ### 0.2.1 (8/2/2015)
313
+ ### 0.2.1 (2015/8/2)
189
314
 
190
315
  * Set Slack API token via `Slack::RealTime::Client.new(token: 'token')` and `Slack::Web::Client.new(token: 'token')` - [@dblock](https://github.com/dblock).
191
316
  * Set Slack API token via `Slack::RealTime::Client.configure` and `Slack::Web::Client.configure` - [@dblock](https://github.com/dblock).
192
317
 
193
- ### 0.2.0 (7/31/2015)
318
+ ### 0.2.0 (2015/7/31)
194
319
 
195
320
  * [#2](https://github.com/slack-ruby/slack-ruby-client/pull/2): `Slack::RealTime::Socket` now pings frames every 30s, as recommended by Slack - [@samdoiron](https://github.com/samdoiron).
196
321
  * [#3](https://github.com/slack-ruby/slack-ruby-client/issues/3): RealTime client WebSocket frame ping frequency is now configurable with `Slack::RealTime::Client.websocket_ping` - [@dblock](https://github.com/dblock).
@@ -200,6 +325,6 @@
200
325
  * Default user-agent for `Slack::Web::Client` now includes a slash, eg. _Slack Ruby Client/0.1.1_ - [@dblock](https://github.com/dblock).
201
326
  * Fix: set `Slack::Web::Client` connection options for `ca_path`, `ca_file`, and `proxy` - [@dblock](https://github.com/dblock).
202
327
 
203
- ### 0.1.0 (7/25/2015)
328
+ ### 0.1.0 (2015/7/25)
204
329
 
205
330
  * Initial public release with Web and RealTime Messaging API support - [@dblock](https://github.com/dblock).
data/CONTRIBUTING.md CHANGED
@@ -29,9 +29,9 @@ bundle exec rake
29
29
 
30
30
  Sign up for Slack, create a private slack group for yourself.
31
31
 
32
- Create a new Bot Integration under [services/new/bot](http://slack.com/services/new/bot).
32
+ Create a new App under [https://api.slack.com/apps](https://api.slack.com/apps).
33
33
 
34
- ![](screenshots/register-bot.png)
34
+ ![](screenshots/create-app.png)
35
35
 
36
36
  On the next screen, note the API token.
37
37
 
@@ -68,20 +68,31 @@ Make sure that `bundle exec rake` completes without errors.
68
68
  Slack Web API is updated from https://github.com/slack-ruby/slack-api-ref, a maintained, machine-readable version of Slack API Docs, generated by scraping [api.slack.com](https://api.slack.com). To update the Web API from the latest definition run the following Rake task.
69
69
 
70
70
  ```
71
- rake slack:api:update
71
+ bundle exec rake slack:api:update
72
72
  ```
73
73
 
74
74
  #### Patching Slack Web API
75
75
 
76
76
  Sometimes it's necessary to patch auto-generated Slack Web API methods. For example, we want to help clients with calling `to_json` on the `attachments` parameter sent to `chat_postMessage`. See [#20](https://github.com/slack-ruby/slack-ruby-client/issues/20).
77
77
 
78
- Make a change to a generated file, for example `lib/slack/web/api/endpoints/chat.rb` and generate a patch.
78
+ The broad steps are:
79
+ 1. Run `rake slack:api:update` to check that existing patches are still valid.
80
+ - If you run into a `failed to apply patch` error, the auto-generated methods likely drifted from the last patch. Follow the steps [below](#resolving-patch-errors).
81
+ - This may add new methods if the API has updated, please split them up into multiple PRs if so.
82
+ 2. Make a change to a generated file, for example `lib/slack/web/api/endpoints/chat.rb`.
83
+ 3. Generate a patch:
84
+ ```
85
+ git diff --no-color HEAD lib/slack/web/api/endpoints/chat.rb > lib/slack/web/api/patches/chat.1.patch
86
+ ```
87
+ 4. Run `rake slack:api:update` to ensure that the patch is cleanly applied. Implement a test for the added or modified functionality and commit the patch file.
79
88
 
80
- ```
81
- git diff --no-color HEAD lib/slack/web/api/endpoints/chat.rb > lib/slack/web/api/patches/chat.1.patch
82
- ```
89
+ ##### Resolving Patch Errors
90
+
91
+ The auto-generated method files may drift overtime e.g. new arguments may be added or descriptions changed. Since previous patches were based on the older auto-generated files, git may be unable to apply them to the new files. Resolving them requires some good ol' splicing:
92
+ 1. Run `rake slack:api:update SKIP_PATCH=true` to create the raw auto-generated files. Commit the files that you are updating, so we can run `git diff` later.
93
+ 2. Go through the old patches for the files (e.g. in `lib/slack/web/api/patches/chat.1.patch`), copying code into the new files.
94
+ 3. Continue with Step 2 [above](#patching-slack-web-api).
83
95
 
84
- Run `rake slack:api:update` to ensure that the patch is cleanly applied. Implement a test for the added or modified functionality and commit the patch file.
85
96
 
86
97
  ### Write Documentation
87
98
 
@@ -146,7 +157,7 @@ git push origin my-feature-branch -f
146
157
 
147
158
  ### Check on Your Pull Request
148
159
 
149
- Go back to your pull request after a few minutes and see whether it passed muster with Travis-CI. Everything should look green, otherwise fix issues and amend your commit as described above.
160
+ Go back to your pull request after a few minutes and see whether it passed muster with CI. Everything should look green, otherwise fix issues and amend your commit as described above.
150
161
 
151
162
  ### Be Patient
152
163
 
data/Dangerfile CHANGED
@@ -1 +1,3 @@
1
+ # frozen_string_literal: true
2
+
1
3
  danger.import_dangerfile(gem: 'slack-ruby-danger')
data/Gemfile CHANGED
@@ -1,13 +1,34 @@
1
+ # frozen_string_literal: true
1
2
  source 'http://rubygems.org'
2
3
 
3
4
  gemspec
4
5
 
5
- gem ENV['CONCURRENCY'], require: false if ENV.key?('CONCURRENCY')
6
- # rubocop:enable Bundler/OrderedGems
7
-
8
- gem 'activesupport', '~> 4.0'
9
- gem 'picky' unless RUBY_PLATFORM == 'java'
6
+ if ENV.key?('CONCURRENCY')
7
+ case ENV['CONCURRENCY']
8
+ when 'async-websocket'
9
+ gem 'async-websocket', '~> 0.8.0', require: false
10
+ else
11
+ gem ENV['CONCURRENCY'], require: false
12
+ end
13
+ end
10
14
 
11
15
  group :test do
12
- gem 'slack-ruby-danger', '~> 0.1.0', require: false
16
+ gem 'activesupport'
17
+ gem 'erubis'
18
+ gem 'faraday-typhoeus'
19
+ gem 'json-schema'
20
+ gem 'rake', '~> 13'
21
+ gem 'rspec'
22
+ gem 'rubocop', '1.26.1' # Lock to specific version to avoid breaking cops/changes
23
+ gem 'rubocop-performance'
24
+ gem 'rubocop-rake'
25
+ gem 'rubocop-rspec'
26
+ gem 'timecop'
27
+ if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('3.0.0')
28
+ # https://github.com/vcr/vcr/pull/907
29
+ gem 'vcr', github: 'vcr/vcr', ref: '7ac8292c'
30
+ else
31
+ gem 'vcr'
32
+ end
33
+ gem 'webmock'
13
34
  end
data/Gemfile.danger ADDED
@@ -0,0 +1,6 @@
1
+ source 'https://rubygems.org'
2
+
3
+ group :test do
4
+ gem 'danger-toc', '~> 0.2.0', require: false
5
+ gem 'slack-ruby-danger', '~> 0.2.0', require: false
6
+ end
data/LICENSE.md CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2015-2016 Daniel Doubrovkine, Artsy and Contributors
3
+ Copyright (c) 2015-2021 Daniel Doubrovkine, Artsy and Contributors
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining
6
6
  a copy of this software and associated documentation files (the