slack-ruby-client 0.7.9 → 0.16.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (358) hide show
  1. checksums.yaml +5 -5
  2. data/.github/FUNDING.yml +1 -0
  3. data/.gitignore +2 -0
  4. data/.rubocop.yml +32 -1
  5. data/.rubocop_todo.yml +98 -49
  6. data/.travis.yml +10 -14
  7. data/CHANGELOG.md +172 -24
  8. data/CONTRIBUTING.md +17 -6
  9. data/Dangerfile +2 -0
  10. data/Gemfile +10 -4
  11. data/LICENSE.md +1 -1
  12. data/README.md +276 -54
  13. data/RELEASING.md +19 -11
  14. data/Rakefile +2 -1
  15. data/UPGRADING.md +84 -2
  16. data/bin/commands.rb +43 -1
  17. data/bin/commands/admin_analytics.rb +15 -0
  18. data/bin/commands/admin_apps.rb +40 -0
  19. data/bin/commands/admin_apps_approved.rb +17 -0
  20. data/bin/commands/admin_apps_requests.rb +16 -0
  21. data/bin/commands/admin_apps_restricted.rb +17 -0
  22. data/bin/commands/admin_barriers.rb +47 -0
  23. data/bin/commands/admin_conversations.rb +169 -0
  24. data/bin/commands/admin_conversations_ekm.rb +17 -0
  25. data/bin/commands/admin_conversations_restrictAccess.rb +37 -0
  26. data/bin/commands/admin_conversations_whitelist.rb +37 -0
  27. data/bin/commands/admin_emoji.rb +54 -0
  28. data/bin/commands/admin_inviteRequests.rb +36 -0
  29. data/bin/commands/admin_inviteRequests_approved.rb +16 -0
  30. data/bin/commands/admin_inviteRequests_denied.rb +16 -0
  31. data/bin/commands/admin_teams.rb +27 -0
  32. data/bin/commands/admin_teams_admins.rb +16 -0
  33. data/bin/commands/admin_teams_owners.rb +16 -0
  34. data/bin/commands/admin_teams_settings.rb +64 -0
  35. data/bin/commands/admin_usergroups.rb +48 -0
  36. data/bin/commands/admin_users.rb +97 -0
  37. data/bin/commands/admin_users_session.rb +38 -0
  38. data/bin/commands/api.rb +3 -3
  39. data/bin/commands/apps.rb +15 -0
  40. data/bin/commands/apps_connections.rb +13 -0
  41. data/bin/commands/apps_event_authorizations.rb +16 -0
  42. data/bin/commands/apps_permissions.rb +23 -0
  43. data/bin/commands/apps_permissions_resources.rb +15 -0
  44. data/bin/commands/apps_permissions_scopes.rb +13 -0
  45. data/bin/commands/apps_permissions_users.rb +26 -0
  46. data/bin/commands/auth.rb +5 -4
  47. data/bin/commands/auth_teams.rb +16 -0
  48. data/bin/commands/bots.rb +4 -2
  49. data/bin/commands/calls.rb +52 -0
  50. data/bin/commands/calls_participants.rb +25 -0
  51. data/bin/commands/channels.rb +64 -43
  52. data/bin/commands/chat.rb +114 -24
  53. data/bin/commands/chat_scheduledMessages.rb +19 -0
  54. data/bin/commands/conversations.rb +196 -0
  55. data/bin/commands/dialog.rb +15 -0
  56. data/bin/commands/dnd.rb +9 -8
  57. data/bin/commands/emoji.rb +3 -2
  58. data/bin/commands/files.rb +45 -30
  59. data/bin/commands/files_comments.rb +3 -24
  60. data/bin/commands/files_remote.rb +78 -0
  61. data/bin/commands/groups.rb +53 -53
  62. data/bin/commands/im.rb +17 -13
  63. data/bin/commands/migration.rb +16 -0
  64. data/bin/commands/mpim.rb +16 -13
  65. data/bin/commands/oauth.rb +17 -2
  66. data/bin/commands/oauth_v2.rb +17 -0
  67. data/bin/commands/pins.rb +7 -10
  68. data/bin/commands/reactions.rb +17 -15
  69. data/bin/commands/reminders.rb +11 -10
  70. data/bin/commands/rtm.rb +19 -4
  71. data/bin/commands/search.rb +15 -11
  72. data/bin/commands/stars.rb +11 -8
  73. data/bin/commands/team.rb +15 -10
  74. data/bin/commands/team_profile.rb +3 -2
  75. data/bin/commands/usergroups.rb +22 -16
  76. data/bin/commands/usergroups_users.rb +7 -4
  77. data/bin/commands/users.rb +65 -37
  78. data/bin/commands/users_admin.rb +29 -0
  79. data/bin/commands/users_prefs.rb +13 -0
  80. data/bin/commands/users_profile.rb +8 -7
  81. data/bin/commands/views.rb +48 -0
  82. data/bin/commands/workflows.rb +38 -0
  83. data/bin/slack +3 -4
  84. data/examples/hi_real_time_and_web/Gemfile +1 -0
  85. data/examples/hi_real_time_and_web/hi.rb +8 -4
  86. data/examples/{hi_real_time_async_eventmachine → hi_real_time_async_async}/Gemfile +2 -1
  87. data/examples/{hi_real_time_async_celluloid → hi_real_time_async_async}/Procfile +0 -0
  88. data/examples/{hi_real_time_async_celluloid → hi_real_time_async_async}/hi.rb +13 -8
  89. data/examples/hi_web/Gemfile +1 -0
  90. data/examples/hi_web/hi.rb +2 -1
  91. data/examples/new_ticket/Gemfile +1 -0
  92. data/examples/new_ticket/new_ticket.rb +2 -1
  93. data/lib/slack-ruby-client.rb +40 -26
  94. data/lib/slack.rb +1 -0
  95. data/lib/slack/config.rb +1 -0
  96. data/lib/slack/events/config.rb +32 -0
  97. data/lib/slack/events/request.rb +70 -0
  98. data/lib/slack/logger.rb +6 -5
  99. data/lib/slack/messages/formatting.rb +4 -4
  100. data/lib/slack/messages/message.rb +2 -6
  101. data/lib/slack/real_time/api/message.rb +3 -1
  102. data/lib/slack/real_time/api/message_id.rb +1 -0
  103. data/lib/slack/real_time/api/ping.rb +5 -2
  104. data/lib/slack/real_time/api/templates/event_handler.erb +1 -1
  105. data/lib/slack/real_time/api/typing.rb +3 -1
  106. data/lib/slack/real_time/client.rb +113 -32
  107. data/lib/slack/real_time/concurrency.rb +2 -2
  108. data/lib/slack/real_time/concurrency/async.rb +140 -0
  109. data/lib/slack/real_time/config.rb +20 -12
  110. data/lib/slack/real_time/models.rb +8 -7
  111. data/lib/slack/real_time/models/base.rb +2 -6
  112. data/lib/slack/real_time/models/bot.rb +1 -0
  113. data/lib/slack/real_time/models/channel.rb +1 -0
  114. data/lib/slack/real_time/models/group.rb +1 -0
  115. data/lib/slack/real_time/models/im.rb +1 -0
  116. data/lib/slack/real_time/models/team.rb +1 -0
  117. data/lib/slack/real_time/models/user.rb +1 -0
  118. data/lib/slack/real_time/socket.rb +46 -17
  119. data/lib/slack/real_time/stores.rb +4 -3
  120. data/lib/slack/real_time/stores/base.rb +5 -3
  121. data/lib/slack/real_time/stores/starter.rb +113 -72
  122. data/lib/slack/real_time/stores/store.rb +131 -88
  123. data/lib/slack/version.rb +2 -1
  124. data/lib/slack/web/api/endpoints.rb +110 -26
  125. data/lib/slack/web/api/endpoints/admin_analytics.rb +26 -0
  126. data/lib/slack/web/api/endpoints/admin_apps.rb +62 -0
  127. data/lib/slack/web/api/endpoints/admin_apps_approved.rb +35 -0
  128. data/lib/slack/web/api/endpoints/admin_apps_requests.rb +33 -0
  129. data/lib/slack/web/api/endpoints/admin_apps_restricted.rb +35 -0
  130. data/lib/slack/web/api/endpoints/admin_barriers.rb +82 -0
  131. data/lib/slack/web/api/endpoints/admin_conversations.rb +260 -0
  132. data/lib/slack/web/api/endpoints/admin_conversations_ekm.rb +35 -0
  133. data/lib/slack/web/api/endpoints/admin_conversations_restrictAccess.rb +61 -0
  134. data/lib/slack/web/api/endpoints/admin_conversations_whitelist.rb +64 -0
  135. data/lib/slack/web/api/endpoints/admin_emoji.rb +88 -0
  136. data/lib/slack/web/api/endpoints/admin_inviteRequests.rb +61 -0
  137. data/lib/slack/web/api/endpoints/admin_inviteRequests_approved.rb +33 -0
  138. data/lib/slack/web/api/endpoints/admin_inviteRequests_denied.rb +33 -0
  139. data/lib/slack/web/api/endpoints/admin_teams.rb +50 -0
  140. data/lib/slack/web/api/endpoints/admin_teams_admins.rb +34 -0
  141. data/lib/slack/web/api/endpoints/admin_teams_owners.rb +34 -0
  142. data/lib/slack/web/api/endpoints/admin_teams_settings.rb +99 -0
  143. data/lib/slack/web/api/endpoints/admin_usergroups.rb +77 -0
  144. data/lib/slack/web/api/endpoints/admin_users.rb +161 -0
  145. data/lib/slack/web/api/endpoints/admin_users_session.rb +66 -0
  146. data/lib/slack/web/api/endpoints/api.rb +3 -4
  147. data/lib/slack/web/api/endpoints/apps.rb +27 -0
  148. data/lib/slack/web/api/endpoints/apps_connections.rb +21 -0
  149. data/lib/slack/web/api/endpoints/apps_event_authorizations.rb +34 -0
  150. data/lib/slack/web/api/endpoints/apps_permissions.rb +36 -0
  151. data/lib/slack/web/api/endpoints/apps_permissions_resources.rb +31 -0
  152. data/lib/slack/web/api/endpoints/apps_permissions_scopes.rb +21 -0
  153. data/lib/slack/web/api/endpoints/apps_permissions_users.rb +50 -0
  154. data/lib/slack/web/api/endpoints/auth.rb +5 -4
  155. data/lib/slack/web/api/endpoints/auth_teams.rb +33 -0
  156. data/lib/slack/web/api/endpoints/bots.rb +5 -2
  157. data/lib/slack/web/api/endpoints/calls.rb +83 -0
  158. data/lib/slack/web/api/endpoints/calls_participants.rb +42 -0
  159. data/lib/slack/web/api/endpoints/channels.rb +105 -49
  160. data/lib/slack/web/api/endpoints/chat.rb +221 -40
  161. data/lib/slack/web/api/endpoints/chat_scheduledMessages.rb +40 -0
  162. data/lib/slack/web/api/endpoints/conversations.rb +332 -0
  163. data/lib/slack/web/api/endpoints/dialog.rb +33 -0
  164. data/lib/slack/web/api/endpoints/dnd.rb +11 -9
  165. data/lib/slack/web/api/endpoints/emoji.rb +3 -2
  166. data/lib/slack/web/api/endpoints/files.rb +75 -38
  167. data/lib/slack/web/api/endpoints/files_comments.rb +3 -38
  168. data/lib/slack/web/api/endpoints/files_remote.rb +127 -0
  169. data/lib/slack/web/api/endpoints/groups.rb +76 -53
  170. data/lib/slack/web/api/endpoints/im.rb +38 -21
  171. data/lib/slack/web/api/endpoints/migration.rb +28 -0
  172. data/lib/slack/web/api/endpoints/mpim.rb +37 -22
  173. data/lib/slack/web/api/endpoints/oauth.rb +25 -4
  174. data/lib/slack/web/api/endpoints/oauth_v2.rb +30 -0
  175. data/lib/slack/web/api/endpoints/pins.rb +10 -19
  176. data/lib/slack/web/api/endpoints/presence.rb +1 -1
  177. data/lib/slack/web/api/endpoints/reactions.rb +37 -28
  178. data/lib/slack/web/api/endpoints/reminders.rb +11 -10
  179. data/lib/slack/web/api/endpoints/rtm.rb +28 -7
  180. data/lib/slack/web/api/endpoints/search.rb +21 -14
  181. data/lib/slack/web/api/endpoints/stars.rb +24 -15
  182. data/lib/slack/web/api/endpoints/team.rb +21 -13
  183. data/lib/slack/web/api/endpoints/team_profile.rb +3 -2
  184. data/lib/slack/web/api/endpoints/usergroups.rb +33 -22
  185. data/lib/slack/web/api/endpoints/usergroups_users.rb +9 -4
  186. data/lib/slack/web/api/endpoints/users.rb +78 -29
  187. data/lib/slack/web/api/endpoints/users_admin.rb +49 -0
  188. data/lib/slack/web/api/endpoints/users_prefs.rb +21 -0
  189. data/lib/slack/web/api/endpoints/users_profile.rb +11 -10
  190. data/lib/slack/web/api/endpoints/views.rb +97 -0
  191. data/lib/slack/web/api/endpoints/workflows.rb +61 -0
  192. data/lib/slack/web/api/error.rb +2 -8
  193. data/lib/slack/web/api/errors.rb +850 -0
  194. data/lib/slack/web/api/errors/internal_error.rb +14 -0
  195. data/lib/slack/web/api/errors/slack_error.rb +29 -0
  196. data/lib/slack/web/api/errors/too_many_requests_error.rb +24 -0
  197. data/lib/slack/web/api/mixins.rb +6 -4
  198. data/lib/slack/web/api/mixins/channels.id.rb +6 -7
  199. data/lib/slack/web/api/mixins/conversations.id.rb +25 -0
  200. data/lib/slack/web/api/mixins/groups.id.rb +6 -7
  201. data/lib/slack/web/api/mixins/ids.id.rb +24 -0
  202. data/lib/slack/web/api/mixins/users.id.rb +6 -7
  203. data/lib/slack/web/api/mixins/users.search.rb +39 -36
  204. data/lib/slack/web/api/patches/chat.1.patch +72 -0
  205. data/lib/slack/web/api/patches/dialog.1.open-json-support.patch +17 -0
  206. data/lib/slack/web/api/patches/views.1.view-json.patch +40 -0
  207. data/lib/slack/web/api/patches/views.1.views-published.patch +16 -0
  208. data/lib/slack/web/api/templates/command.erb +5 -3
  209. data/lib/slack/web/api/templates/commands.erb +2 -1
  210. data/lib/slack/web/api/templates/endpoints.erb +5 -3
  211. data/lib/slack/web/api/templates/errors.erb +20 -0
  212. data/lib/slack/web/api/templates/method.erb +26 -4
  213. data/lib/slack/web/api/templates/method_spec.erb +3 -2
  214. data/lib/slack/web/client.rb +2 -1
  215. data/lib/slack/web/config.rb +21 -10
  216. data/lib/slack/web/faraday/connection.rb +25 -16
  217. data/lib/slack/web/faraday/request.rb +2 -0
  218. data/lib/slack/web/faraday/response/raise_error.rb +23 -1
  219. data/lib/slack/web/faraday/response/wrap_error.rb +18 -0
  220. data/lib/slack/web/pagination/cursor.rb +52 -0
  221. data/lib/slack_ruby_client.rb +1 -0
  222. data/lib/tasks/git.rake +2 -1
  223. data/lib/tasks/real_time.rake +16 -6
  224. data/lib/tasks/update.rake +1 -0
  225. data/lib/tasks/web.rake +38 -10
  226. data/screenshots/create-app.png +0 -0
  227. data/slack-ruby-client.gemspec +9 -6
  228. data/spec/fixtures/slack/web/429_error.yml +2 -0
  229. data/spec/fixtures/slack/web/503_error.yml +14 -0
  230. data/spec/fixtures/slack/web/channels_info.yml +108 -15
  231. data/spec/fixtures/slack/web/conversations_setTopic.yml +69 -0
  232. data/spec/fixtures/slack/web/conversations_setTopic_one_page.yml +142 -0
  233. data/spec/fixtures/slack/web/conversations_setTopic_paginated.yml +208 -0
  234. data/spec/fixtures/slack/web/paginated_users_list.yml +181 -0
  235. data/spec/fixtures/slack/web/rtm_connect.yml +70 -0
  236. data/spec/fixtures/slack/web/rtm_start.yml +1 -1
  237. data/spec/fixtures/slack/web/views_open_error.yml +76 -0
  238. data/spec/integration/integration_spec.rb +116 -48
  239. data/spec/slack/config_spec.rb +2 -0
  240. data/spec/slack/events/config_spec.rb +33 -0
  241. data/spec/slack/events/request_spec.rb +183 -0
  242. data/spec/slack/messages/formatting_spec.rb +25 -14
  243. data/spec/slack/real_time/api/message_spec.rb +6 -1
  244. data/spec/slack/real_time/api/ping_spec.rb +2 -0
  245. data/spec/slack/real_time/api/typing_spec.rb +5 -1
  246. data/spec/slack/real_time/client_spec.rb +462 -134
  247. data/spec/slack/real_time/concurrency/it_behaves_like_a_realtime_socket.rb +3 -1
  248. data/spec/slack/real_time/event_handlers/bot_spec.rb +6 -3
  249. data/spec/slack/real_time/event_handlers/channel_spec.rb +9 -6
  250. data/spec/slack/real_time/event_handlers/event_handlers_spec.rb +3 -2
  251. data/spec/slack/real_time/event_handlers/group_spec.rb +5 -4
  252. data/spec/slack/real_time/event_handlers/im_spec.rb +4 -3
  253. data/spec/slack/real_time/event_handlers/team_spec.rb +8 -4
  254. data/spec/slack/real_time/event_handlers/user_spec.rb +5 -2
  255. data/spec/slack/real_time/rtm_connect_spec.rb +14 -0
  256. data/spec/slack/real_time/rtm_start_spec.rb +1 -0
  257. data/spec/slack/real_time/store_spec.rb +2 -1
  258. data/spec/slack/slack_spec.rb +39 -7
  259. data/spec/slack/version_spec.rb +2 -1
  260. data/spec/slack/web/api/endpoints/admin_analytics_spec.rb +13 -0
  261. data/spec/slack/web/api/endpoints/admin_apps_approved_spec.rb +8 -0
  262. data/spec/slack/web/api/endpoints/admin_apps_requests_spec.rb +8 -0
  263. data/spec/slack/web/api/endpoints/admin_apps_restricted_spec.rb +8 -0
  264. data/spec/slack/web/api/endpoints/admin_apps_spec.rb +13 -0
  265. data/spec/slack/web/api/endpoints/admin_barriers_spec.rb +38 -0
  266. data/spec/slack/web/api/endpoints/admin_conversations_ekm_spec.rb +8 -0
  267. data/spec/slack/web/api/endpoints/admin_conversations_restrictAccess_spec.rb +32 -0
  268. data/spec/slack/web/api/endpoints/admin_conversations_spec.rb +98 -0
  269. data/spec/slack/web/api/endpoints/admin_conversations_whitelist_spec.rb +32 -0
  270. data/spec/slack/web/api/endpoints/admin_emoji_spec.rb +37 -0
  271. data/spec/slack/web/api/endpoints/admin_inviteRequests_approved_spec.rb +8 -0
  272. data/spec/slack/web/api/endpoints/admin_inviteRequests_denied_spec.rb +8 -0
  273. data/spec/slack/web/api/endpoints/admin_inviteRequests_spec.rb +18 -0
  274. data/spec/slack/web/api/endpoints/admin_teams_admins_spec.rb +13 -0
  275. data/spec/slack/web/api/endpoints/admin_teams_owners_spec.rb +13 -0
  276. data/spec/slack/web/api/endpoints/admin_teams_settings_spec.rb +53 -0
  277. data/spec/slack/web/api/endpoints/admin_teams_spec.rb +16 -0
  278. data/spec/slack/web/api/endpoints/admin_usergroups_spec.rb +37 -0
  279. data/spec/slack/web/api/endpoints/admin_users_session_spec.rb +21 -0
  280. data/spec/slack/web/api/endpoints/admin_users_spec.rb +67 -0
  281. data/spec/slack/web/api/endpoints/api_spec.rb +1 -0
  282. data/spec/slack/web/api/endpoints/apps_connections_spec.rb +8 -0
  283. data/spec/slack/web/api/endpoints/apps_event_authorizations_spec.rb +13 -0
  284. data/spec/slack/web/api/endpoints/apps_permissions_resources_spec.rb +8 -0
  285. data/spec/slack/web/api/endpoints/apps_permissions_scopes_spec.rb +8 -0
  286. data/spec/slack/web/api/endpoints/apps_permissions_spec.rb +16 -0
  287. data/spec/slack/web/api/endpoints/apps_permissions_users_spec.rb +19 -0
  288. data/spec/slack/web/api/endpoints/apps_spec.rb +16 -0
  289. data/spec/slack/web/api/endpoints/auth_teams_spec.rb +8 -0
  290. data/spec/slack/web/api/endpoints/bots_spec.rb +1 -0
  291. data/spec/slack/web/api/endpoints/calls_participants_spec.rb +24 -0
  292. data/spec/slack/web/api/endpoints/calls_spec.rb +31 -0
  293. data/spec/slack/web/api/endpoints/chat_scheduledMessages_spec.rb +8 -0
  294. data/spec/slack/web/api/endpoints/conversations_spec.rb +109 -0
  295. data/spec/slack/web/api/endpoints/custom_specs/auth_spec.rb +13 -4
  296. data/spec/slack/web/api/endpoints/custom_specs/channels_spec.rb +5 -3
  297. data/spec/slack/web/api/endpoints/custom_specs/chat_spec.rb +140 -24
  298. data/spec/slack/web/api/endpoints/custom_specs/dialog_spec.rb +36 -0
  299. data/spec/slack/web/api/endpoints/custom_specs/groups_spec.rb +2 -0
  300. data/spec/slack/web/api/endpoints/custom_specs/users_spec.rb +21 -6
  301. data/spec/slack/web/api/endpoints/custom_specs/views_spec.rb +95 -0
  302. data/spec/slack/web/api/endpoints/dnd_spec.rb +6 -0
  303. data/spec/slack/web/api/endpoints/emoji_spec.rb +1 -0
  304. data/spec/slack/web/api/endpoints/files_comments_spec.rb +3 -21
  305. data/spec/slack/web/api/endpoints/files_remote_spec.rb +24 -0
  306. data/spec/slack/web/api/endpoints/files_spec.rb +17 -5
  307. data/spec/slack/web/api/endpoints/im_spec.rb +5 -4
  308. data/spec/slack/web/api/endpoints/migration_spec.rb +13 -0
  309. data/spec/slack/web/api/endpoints/mpim_spec.rb +5 -4
  310. data/spec/slack/web/api/endpoints/oauth_spec.rb +5 -4
  311. data/spec/slack/web/api/endpoints/oauth_v2_spec.rb +13 -0
  312. data/spec/slack/web/api/endpoints/pins_spec.rb +1 -0
  313. data/spec/slack/web/api/endpoints/reactions_spec.rb +8 -1
  314. data/spec/slack/web/api/endpoints/reminders_spec.rb +3 -2
  315. data/spec/slack/web/api/endpoints/rtm_spec.rb +1 -0
  316. data/spec/slack/web/api/endpoints/search_spec.rb +1 -0
  317. data/spec/slack/web/api/endpoints/stars_spec.rb +1 -0
  318. data/spec/slack/web/api/endpoints/team_profile_spec.rb +1 -0
  319. data/spec/slack/web/api/endpoints/team_spec.rb +1 -0
  320. data/spec/slack/web/api/endpoints/usergroups_spec.rb +1 -0
  321. data/spec/slack/web/api/endpoints/usergroups_users_spec.rb +3 -2
  322. data/spec/slack/web/api/endpoints/users_admin_spec.rb +18 -0
  323. data/spec/slack/web/api/endpoints/users_prefs_spec.rb +8 -0
  324. data/spec/slack/web/api/endpoints/users_profile_spec.rb +1 -0
  325. data/spec/slack/web/api/endpoints/views_spec.rb +29 -0
  326. data/spec/slack/web/api/endpoints/workflows_spec.rb +26 -0
  327. data/spec/slack/web/api/error_spec.rb +5 -3
  328. data/spec/slack/web/api/errors/slack_error_spec.rb +38 -0
  329. data/spec/slack/web/api/mixins/channels_spec.rb +24 -12
  330. data/spec/slack/web/api/mixins/conversations_list_spec.rb +21 -0
  331. data/spec/slack/web/api/mixins/conversations_spec.rb +43 -0
  332. data/spec/slack/web/api/mixins/groups_spec.rb +24 -12
  333. data/spec/slack/web/api/mixins/users_spec.rb +30 -17
  334. data/spec/slack/web/api/pagination/cursor_spec.rb +100 -0
  335. data/spec/slack/web/client_spec.rb +215 -14
  336. data/spec/slack/web/faraday/response/raise_error_spec.rb +85 -0
  337. data/spec/spec_helper.rb +8 -1
  338. data/spec/support/queue_with_timeout.rb +6 -5
  339. data/spec/support/real_time/concurrency/mock.rb +2 -2
  340. data/spec/support/real_time/connected_client.rb +13 -2
  341. data/spec/support/real_time/event.rb +1 -0
  342. data/spec/support/token.rb +1 -0
  343. data/spec/support/vcr.rb +6 -1
  344. metadata +280 -55
  345. data/examples/hi_real_time/Gemfile +0 -5
  346. data/examples/hi_real_time/hi.gif +0 -0
  347. data/examples/hi_real_time/hi.rb +0 -37
  348. data/examples/hi_real_time_async_celluloid/Gemfile +0 -6
  349. data/examples/hi_real_time_async_eventmachine/Procfile +0 -2
  350. data/examples/hi_real_time_async_eventmachine/hi.rb +0 -36
  351. data/lib/slack/real_time/concurrency/celluloid.rb +0 -113
  352. data/lib/slack/real_time/concurrency/eventmachine.rb +0 -60
  353. data/lib/slack/web/api/patches/chat.1.text-attachments-required.patch +0 -13
  354. data/lib/slack/web/api/patches/chat.2.attachments-json.patch +0 -17
  355. data/lib/slack/web/api/patches/chat.3.update-attachments-support.patch +0 -20
  356. data/screenshots/register-bot.png +0 -0
  357. data/spec/slack/real_time/concurrency/celluloid_spec.rb +0 -31
  358. data/spec/slack/real_time/concurrency/eventmachine_spec.rb +0 -47
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: ad6bf56a73816447c713f921c5bee06d94bf7d95
4
- data.tar.gz: aff21372999f08aafa6b544d9ae098b4ebebeb2e
2
+ SHA256:
3
+ metadata.gz: 46bfdecfe74d4f64a551519516ce706fbd50d7e8f512df2f10cf991f4c3d153a
4
+ data.tar.gz: 8f8330671c68f4937026b7bf211eb623a5a4f03ac704fb2465c5ad70833ce610
5
5
  SHA512:
6
- metadata.gz: c216963c1c8fcf6868d7270cde48e36d8cd197d2e9e416ab7817f34929561d5c1c615f9498f3732fb4aefab4dcf9c6d02fd3ba82a6dfe34cceeb315c6cb700a4
7
- data.tar.gz: 8eb35d81456afb96689bc3ef28912a0cd1438c0782a275179959819fcbebc2ecdd6ccce6cb537e3ce90009802070127fb2cdc5a8e6d11524e7b5649d5a8919ac
6
+ metadata.gz: b4eca0d30990e29c93ec5e2063cdfb7c9cbc9e0f4c23fe566b64af1c23dd2bc3dc2690937b43f9fb771035425fde4d023c29180592b01513a2d8a3ac4731511b
7
+ data.tar.gz: ca8c4a73812d77fe3b8bef823b2b7b1fa890c8efdab14a0bfa9094b5c171632f0ce33fb79493fc8444a21605397b63a38f4e890b1736afd74cfd14117a4dddcb
@@ -0,0 +1 @@
1
+ github: [dblock]
data/.gitignore CHANGED
@@ -3,3 +3,5 @@ pkg
3
3
  Gemfile.lock
4
4
  .DS_Store
5
5
  .bundle
6
+ .idea
7
+ .rspec_status
data/.rubocop.yml CHANGED
@@ -1,6 +1,37 @@
1
+ inherit_from: .rubocop_todo.yml
2
+
3
+ require:
4
+ - rubocop-performance
5
+ - rubocop-rspec
6
+
1
7
  AllCops:
8
+ DisplayCopNames: true
2
9
  Exclude:
10
+ - bin/**/*
3
11
  - vendor/**/*
4
12
  - lib/slack/web/api/slack-api-ref/**/*
13
+ - lib/slack/web/api/endpoints/* # Auto-generated
14
+ - lib/slack/web/api/errors.rb # Auto-generated
15
+ - spec/slack/web/api/endpoints/* # Auto-generated
5
16
 
6
- inherit_from: .rubocop_todo.yml
17
+ Layout/EmptyLineAfterMagicComment:
18
+ Enabled: false
19
+
20
+ Metrics/BlockLength:
21
+ Enabled: false
22
+
23
+ Metrics/ClassLength:
24
+ Max: 250
25
+
26
+ Layout/LineLength:
27
+ Max: 128
28
+
29
+ Style/Documentation:
30
+ Enabled: false
31
+
32
+ Style/ModuleFunction:
33
+ Enabled: false
34
+
35
+ Naming/FileName:
36
+ Exclude:
37
+ - lib/slack-ruby-client.rb # Required to match gemspec name
data/.rubocop_todo.yml CHANGED
@@ -1,83 +1,132 @@
1
1
  # This configuration was generated by
2
2
  # `rubocop --auto-gen-config`
3
- # on 2016-05-03 16:35:06 -0400 using RuboCop version 0.35.0.
3
+ # on 2020-08-24 10:08:11 -0400 using RuboCop version 0.82.0.
4
4
  # The point is for the user to remove these configuration records
5
5
  # one by one as the offenses are removed from the code base.
6
6
  # Note that changes in the inspected code, or installation of new
7
7
  # versions of RuboCop, may require this file to be generated again.
8
8
 
9
- # Offense count: 4
10
- Lint/HandleExceptions:
9
+ # Offense count: 1
10
+ # Cop supports --auto-correct.
11
+ Lint/NonDeterministicRequireOrder:
11
12
  Exclude:
12
- - 'lib/slack-ruby-client.rb'
13
- - 'lib/slack/real_time/concurrency/celluloid.rb'
14
- - 'spec/slack/real_time/concurrency/celluloid_spec.rb'
15
- - 'spec/slack/real_time/concurrency/eventmachine_spec.rb'
13
+ - 'spec/spec_helper.rb'
16
14
 
17
- # Offense count: 1
15
+ # Offense count: 2
18
16
  # Cop supports --auto-correct.
19
- # Configuration parameters: IgnoreEmptyBlocks.
20
- Lint/UnusedBlockArgument:
17
+ Lint/RedundantCopDisableDirective:
21
18
  Exclude:
22
- - 'lib/slack/messages/formatting.rb'
19
+ - 'lib/slack-ruby-client.rb'
23
20
 
24
- # Offense count: 15
21
+ # Offense count: 11
22
+ # Configuration parameters: IgnoredMethods.
25
23
  Metrics/AbcSize:
26
- Max: 44
27
-
28
- # Offense count: 2
29
- # Configuration parameters: CountComments.
30
- Metrics/ClassLength:
31
- Max: 156
24
+ Max: 39
32
25
 
33
26
  # Offense count: 2
27
+ # Configuration parameters: IgnoredMethods.
34
28
  Metrics/CyclomaticComplexity:
35
29
  Max: 9
36
30
 
37
- # Offense count: 595
38
- # Configuration parameters: AllowURI, URISchemes.
39
- Metrics/LineLength:
40
- Max: 288
41
-
42
- # Offense count: 7
43
- # Configuration parameters: CountComments.
31
+ # Offense count: 14
32
+ # Configuration parameters: CountComments, ExcludedMethods.
44
33
  Metrics/MethodLength:
45
34
  Max: 32
46
35
 
47
- # Offense count: 2
36
+ # Offense count: 1
37
+ # Configuration parameters: CountKeywordArgs.
38
+ Metrics/ParameterLists:
39
+ Max: 6
40
+
41
+ # Offense count: 1
42
+ # Configuration parameters: IgnoredMethods.
48
43
  Metrics/PerceivedComplexity:
49
- Max: 11
44
+ Max: 9
50
45
 
51
- # Offense count: 55
52
- # Configuration parameters: Exclude.
53
- Style/Documentation:
54
- Enabled: false
46
+ # Offense count: 2
47
+ # Cop supports --auto-correct.
48
+ Performance/RegexpMatch:
49
+ Exclude:
50
+ - 'lib/tasks/web.rake'
55
51
 
56
- # Offense count: 1
57
- # Configuration parameters: Exclude.
58
- Style/FileName:
52
+ # Offense count: 5
53
+ # Cop supports --auto-correct.
54
+ RSpec/ContextMethod:
59
55
  Exclude:
60
- - 'lib/slack-ruby-client.rb'
56
+ - 'spec/slack/messages/formatting_spec.rb'
57
+ - 'spec/slack/web/api/mixins/channels_spec.rb'
58
+ - 'spec/slack/web/api/mixins/groups_spec.rb'
59
+ - 'spec/slack/web/api/mixins/users_spec.rb'
60
+
61
+ # Offense count: 72
62
+ # Configuration parameters: Prefixes.
63
+ # Prefixes: when, with, without
64
+ RSpec/ContextWording:
65
+ Enabled: false
61
66
 
62
- # Offense count: 100
63
- # Configuration parameters: AllowedVariables.
64
- Style/GlobalVars:
67
+ # Offense count: 131
68
+ # Cop supports --auto-correct.
69
+ # Configuration parameters: AllowConsecutiveOneLiners.
70
+ RSpec/EmptyLineAfterExample:
71
+ Enabled: false
72
+
73
+ # Offense count: 66
74
+ # Configuration parameters: Max.
75
+ RSpec/ExampleLength:
65
76
  Enabled: false
66
77
 
67
- # Offense count: 17
68
- # Configuration parameters: EnforcedStyle, SupportedStyles.
69
- Style/MethodName:
78
+ # Offense count: 18
79
+ # Configuration parameters: CustomTransform, IgnoreMethods.
80
+ RSpec/FilePath:
70
81
  Enabled: false
71
82
 
72
- # Offense count: 3
73
- Style/ModuleFunction:
83
+ # Offense count: 14
84
+ # Configuration parameters: AssignmentOnly.
85
+ RSpec/InstanceVariable:
74
86
  Exclude:
75
- - 'lib/slack/config.rb'
76
- - 'lib/slack/real_time/config.rb'
77
- - 'lib/slack/web/config.rb'
87
+ - 'spec/integration/integration_spec.rb'
88
+ - 'spec/slack/real_time/client_spec.rb'
89
+ - 'spec/slack/slack_spec.rb'
90
+
91
+ # Offense count: 77
92
+ # Configuration parameters: .
93
+ # SupportedStyles: have_received, receive
94
+ RSpec/MessageSpies:
95
+ EnforcedStyle: receive
96
+
97
+ # Offense count: 95
98
+ RSpec/MultipleExpectations:
99
+ Max: 5
78
100
 
79
101
  # Offense count: 2
80
- # Cop supports --auto-correct.
81
- Style/SpecialGlobalVars:
102
+ # Configuration parameters: IgnoreSharedExamples.
103
+ RSpec/NamedSubject:
104
+ Exclude:
105
+ - 'spec/slack/web/api/mixins/conversations_list_spec.rb'
106
+
107
+ # Offense count: 37
108
+ RSpec/NestedGroups:
109
+ Max: 6
110
+
111
+ # Offense count: 4
112
+ RSpec/SubjectStub:
82
113
  Exclude:
83
- - 'lib/slack/messages/formatting.rb'
114
+ - 'spec/slack/web/api/mixins/channels_spec.rb'
115
+ - 'spec/slack/web/api/mixins/conversations_spec.rb'
116
+ - 'spec/slack/web/api/mixins/groups_spec.rb'
117
+ - 'spec/slack/web/api/mixins/users_spec.rb'
118
+
119
+ # Offense count: 16
120
+ # Configuration parameters: IgnoreNameless, IgnoreSymbolicNames.
121
+ RSpec/VerifiedDoubles:
122
+ Exclude:
123
+ - 'spec/slack/events/request_spec.rb'
124
+ - 'spec/slack/real_time/client_spec.rb'
125
+ - 'spec/slack/web/faraday/response/raise_error_spec.rb'
126
+ - 'spec/support/real_time/connected_client.rb'
127
+
128
+ # Offense count: 4
129
+ # Configuration parameters: .
130
+ # SupportedStyles: annotated, template, unannotated
131
+ Style/FormatStringToken:
132
+ EnforcedStyle: unannotated
data/.travis.yml CHANGED
@@ -2,27 +2,23 @@ language: ruby
2
2
 
3
3
  cache: bundler
4
4
 
5
+ rvm:
6
+ - 2.5.3
7
+ - 2.6.0
8
+ - 2.7.1
9
+ - ruby-head
10
+ - jruby-head
11
+
5
12
  matrix:
6
13
  include:
7
- - rvm: 2.3.1
14
+ - rvm: 2.4.1
8
15
  script:
9
16
  - bundle exec danger
10
- - rvm: 2.3.1
11
- env: CONCURRENCY=celluloid-io
12
- - rvm: 2.3.1
13
- env: CONCURRENCY=faye-websocket
14
- - rvm: 2.2
15
- - rvm: 2.1
16
- - rvm: 2.0
17
- - rvm: rbx-2
18
- - rvm: jruby-19mode
19
- - rvm: ruby-head
20
- - rvm: jruby-head
17
+ - rvm: 2.5.3
18
+ env: CONCURRENCY=async-websocket
21
19
  allow_failures:
22
20
  - rvm: ruby-head
23
21
  - rvm: jruby-head
24
- - rvm: jruby-19mode
25
- - rvm: rbx-2
26
22
 
27
23
  git:
28
24
  submodules: false
data/CHANGELOG.md CHANGED
@@ -1,8 +1,156 @@
1
- ### 0.7.9 (2/9/2017)
1
+ ### 0.16.0 (2021/01/24)
2
+
3
+ * [#350](https://github.com/slack-ruby/slack-ruby-client/pull/350): Handle server errors such as timouts & non-json responses (see [Upgrading to 0.16.0](UPGRADING.md#upgrading-to--0160)) - [@ojab](https://github.com/ojab).
4
+ * [#354](https://github.com/slack-ruby/slack-ruby-client/pull/354): Rewind body after checking request signature - [@sunny](https://github.com/sunny).
5
+ * [#355](https://github.com/slack-ruby/slack-ruby-client/pull/355), [#357](https://github.com/slack-ruby/slack-ruby-client/pull/357): Removed celluloid and faye-websocket support - [@wasabigeek](https://github.com/wasabigeek).
6
+ * [#356](https://github.com/slack-ruby/slack-ruby-client/pull/356): Added `admin_apps_clearResolution`, `admin_conversations_getCustomRetention`, `admin_conversations_removeCustomRetention`, `admin_conversations_setCustomRetention` and `admin_users_session_list` endpoints - [@dblock](https://github.com/dblock).
7
+ * [#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).
8
+
9
+ ### 0.15.1 (2020/9/3)
10
+
11
+ * [#336](https://github.com/slack-ruby/slack-ruby-client/pull/336): Fix: handle nil events - [@pyama86](https://github.com/pyama86).
12
+ * [#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).
13
+ * [#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).
14
+
15
+ ### 0.15.0 (2020/7/26)
16
+
17
+ * [#322](https://github.com/slack-ruby/slack-ruby-client/pull/322): Cache `Faraday::Connection` for persistent adapters - [@drbrain](https://github.com/drbrain).
18
+ * [#324](https://github.com/slack-ruby/slack-ruby-client/pull/324): Require Faraday >= 1.0 - [@dblock](https://github.com/dblock).
19
+ * [#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).
20
+ * [#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).
21
+ * [#329](https://github.com/slack-ruby/slack-ruby-client/pull/329): Log when methods are deprecated - [@wasabigeek](https://github.com/wasabigeek).
22
+ * [#325](https://github.com/slack-ruby/slack-ruby-client/pull/325): Remove activesupport dependency - [@ianks](https://github.com/ianks).
23
+ * [#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).
24
+
25
+ ### 0.14.6 (2020/3/28)
26
+
27
+ * [#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).
28
+ * [#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).
29
+ * [#312](https://github.com/slack-ruby/slack-ruby-client/pull/312): Added specific error classes for Web API - [@jmanian](https://github.com/jmanian).
30
+ * [#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).
31
+
32
+ ### 0.14.5 (2019/12/23)
33
+
34
+ * [#293](https://github.com/slack-ruby/slack-ruby-client/pull/293): Rubocop auto-correct and comprehensive todo - [@jcraigk](https://github.com/jcraigk).
35
+ * [#297](https://github.com/slack-ruby/slack-ruby-client/pull/297): Various Rubocop fixes - [@jcraigk](https://github.com/jcraigk).
36
+ * [#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).
37
+ * [#303](https://github.com/slack-ruby/slack-ruby-client/pull/303): Added `oauth_v2_access` and `views_publish` endpoints - [@jwright](https://github.com/jwright).
38
+ * [#309](https://github.com/slack-ruby/slack-ruby-client/pull/309): Stop ping on `inactive_account` and `invalid_auth` - [@dblock](https://github.com/dblock).
39
+
40
+ ### 0.14.4 (2019/7/28)
41
+
42
+ * [#289](https://github.com/slack-ruby/slack-ruby-client/pull/289): Fix reconnects when ping timers under/overshoot - [@georgyangelov](https://github.com/georgyangelov).
43
+ * [#290](https://github.com/slack-ruby/slack-ruby-client/pull/290): Expose Slack::RealTime::Client.logger accessor publicly - [@jcraigk](https://github.com/jcraigk).
44
+
45
+ ### 0.14.3 (2019/7/23)
46
+
47
+ * [#279](https://github.com/slack-ruby/slack-ruby-client/pull/279): Prevent ping worker from dying on unexpected errors - [@dblock](https://github.com/dblock).
48
+ * [#281](https://github.com/slack-ruby/slack-ruby-client/pull/281): Added `admin_users_session_reset` to Web API - [@dblock](https://github.com/dblock).
49
+ * [#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).
50
+ * [#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).
51
+
52
+ ### 0.14.2 (2019/4/12)
53
+
54
+ * [#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).
55
+ * [#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).
56
+ * [#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).
57
+ * [#264](https://github.com/slack-ruby/slack-ruby-client/pull/264): Removed `files_comments_add` and `files_comments_edit` - [@dblock](https://github.com/dblock).
58
+
59
+ ### 0.14.1 (2019/2/26)
60
+
61
+ * [#254](https://github.com/slack-ruby/slack-ruby-client/issues/254): Fix: celluloid infinite reconnect loop - [@dblock](https://github.com/dblock).
62
+
63
+ ### 0.14.0 (2019/2/25)
64
+
65
+ * [#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).
66
+ * [#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).
67
+ * [#242](https://github.com/slack-ruby/slack-ruby-client/pull/242): Added `thread_ts` option to `chat_postEphemeral` - [@dblock](https://github.com/dblock).
68
+ * [#242](https://github.com/slack-ruby/slack-ruby-client/pull/242): Added `apps_uninstall` to Web API - [@dblock](https://github.com/dblock).
69
+ * [#244](https://github.com/slack-ruby/slack-ruby-client/pull/244): Implementing #restart for the celluloid socket class - [@RodneyU215](https://github.com/RodneyU215).
70
+ * [#246](https://github.com/slack-ruby/slack-ruby-client/pull/246): Added TOC to README and danger-toc - [@dblock](https://github.com/dblock).
71
+ * [#253](https://github.com/slack-ruby/slack-ruby-client/pull/253): Support for Block Kit - [@JrmKrb](https://github.com/JrmKrb).
72
+
73
+ ### 0.13.1 (2018/9/30)
74
+
75
+ * [#228](https://github.com/slack-ruby/slack-ruby-client/pull/228): Replace `Thread` with `Actor` in Celluloid async support - [@dblock](https://github.com/dblock).
76
+
77
+ ### 0.13.0 (2018/9/8)
78
+
79
+ * [#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).
80
+ * [#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).
81
+ * [#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).
82
+
83
+ ### 0.12.0 (2018/8/20)
84
+
85
+ * [#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).
86
+ * [#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).
87
+ * [#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).
88
+ * [#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).
89
+ * [#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).
90
+ * [#207](https://github.com/slack-ruby/slack-ruby-client/pull/207): Added `users_conversations` - [@jmanian](https://github.com/jmanian).
91
+ * [#206](https://github.com/slack-ruby/slack-ruby-client/pull/206): Fix 100% cpu usage in async examples - [@felixbuenemann](https://github.com/felixbuenemann).
92
+ * [#217](https://github.com/slack-ruby/slack-ruby-client/pull/217): Upgraded RuboCop to 0.58.2 - [@dblock](https://github.com/dblock).
93
+ * [#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).
94
+
95
+ ### 0.11.1 (2018/1/23)
96
+
97
+ * [#187](https://github.com/slack-ruby/slack-ruby-client/pull/187): Concatenate error message when multiple errors present - [@chrislopresto](https://github.com/chrislopresto).
98
+ * [#188](https://github.com/slack-ruby/slack-ruby-client/pull/188): Fixed `NoMethodError` when Slack is unavailable - [@sonicdoe](https://github.com/sonicdoe).
99
+ * [#196](https://github.com/slack-ruby/slack-ruby-client/pull/196): Added `users_lookupByEmail` - [@manuelmeurer](https://github.com/manuelmeurer).
100
+ * [#185](https://github.com/slack-ruby/slack-ruby-client/pull/185): Calling undocumented endpoints will now produce a warning - [@aviflombaum](https://github.com/aviflombaum).
101
+
102
+ ### 0.11.0 (2017/11/25)
103
+
104
+ * [#173](https://github.com/slack-ruby/slack-ruby-client/issues/173): Added dialog support - [@alexagranov](https://github.com/alexagranov).
105
+ * [#176](https://github.com/slack-ruby/slack-ruby-client/issues/176): Drop dependency on `json` gem - [@seuros](https://github.com/seuros).
106
+ * [#177](https://github.com/slack-ruby/slack-ruby-client/pull/177): Fix api ref repo - [@manuelmeurer](https://github.com/manuelmeurer).
107
+ * [#180](https://github.com/slack-ruby/slack-ruby-client/pull/180): Upgraded RuboCop 0.51.0 - [@dblock](https://github.com/dblock).
108
+ * [#181](https://github.com/slack-ruby/slack-ruby-client/pull/181): Added `chat_getPermalink`, `migration_exchange` - [@dblock](https://github.com/dblock).
109
+ * [#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).
110
+
111
+ ### 0.10.0 (2017/9/19)
112
+
113
+ * [#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).
114
+ * [#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).
115
+ * [#169](https://github.com/slack-ruby/slack-ruby-client/pull/169): Removed `groups_close` - [@jmanian](https://github.com/jmanian).
116
+ * [#167](https://github.com/slack-ruby/slack-ruby-client/pull/167): Added support for pausing between paginated requests that can cause Slack rate limiting - [@jmanian](https://github.com/jmanian).
117
+ * [#163](https://github.com/slack-ruby/slack-ruby-client/pull/164): Use `OpenSSL::X509::DEFAULT_CERT_DIR` and `OpenSSL::X509::DEFAULT_CERT_FILE` for default ca_cert and ca_file - [@leifcr](https://github.com/leifcr).
118
+ * [#161](https://github.com/slack-ruby/slack-ruby-client/pull/161): Added support for cursor pagination - [@dblock](https://github.com/dblock).
119
+ * [#162](https://github.com/slack-ruby/slack-ruby-client/pull/162): Gracefully close websocket on `Errno::EPIPE` - [@johanoskarsson](https://github.com/johanoskarsson).
120
+ * [#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).
121
+
122
+ ### 0.9.1 (2017/8/24)
123
+
124
+ * [#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).
125
+
126
+ ### 0.9.0 (2017/8/6)
127
+
128
+ * [#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).
129
+ * [#145](https://github.com/slack-ruby/slack-ruby-client/pull/145): Automatically select `rtm_connect` vs. `rtm_start` - [@dblock](https://github.com/dblock).
130
+ * [#154](https://github.com/slack-ruby/slack-ruby-client/pull/154): Raise a dedicated error class with 429 responses - [@greggroth](https://github.com/greggroth).
131
+ * [#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).
132
+
133
+ ### 0.8.1 (2017/4/28)
134
+
135
+ * Added `exclude_members` option to `channels_list` Web API - [@dblock](https://github.com/dblock).
136
+ * Added `chat_unfurl` to Web API - [@dblock](https://github.com/dblock).
137
+ * Added `rtm_connect` to RTM API - [@dblock](https://github.com/dblock).
138
+ * Added `no_latest` support to `rm_start` RTM API - [@dblock](https://github.com/dblock).
139
+
140
+ ### 0.8.0 (2017/3/12)
141
+
142
+ * [#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).
143
+ * [#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).
144
+ * [#136](https://github.com/slack-ruby/slack-ruby-client/pull/136): Pass request options in web client calls - [@dblock](https://github.com/dblock).
145
+ * [#121](https://github.com/slack-ruby/slack-ruby-client/pull/121): Fix: check that the current Celluloid actor is running before calling `terminate` - [@newdark](https://github.com/newdark).
146
+ * [#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).
147
+ * [#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).
148
+
149
+ ### 0.7.9 (2017/2/9)
2
150
 
3
151
  * [#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).
4
152
 
5
- ### 0.7.8 (1/23/2017)
153
+ ### 0.7.8 (2017/1/23)
6
154
 
7
155
  * [#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).
8
156
  * [#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).
@@ -14,18 +162,18 @@
14
162
  * [#81](https://github.com/slack-ruby/slack-ruby-client/pull/81): Require faraday 0.9.0 or newer - [@leppert](https://github.com/leppert).
15
163
  * [#123](https://github.com/slack-ruby/slack-ruby-client/pull/123): Fix a warning about duplicate definitions - [@michaelherold](https://github.com/michaelherold).
16
164
 
17
- ### 0.7.7 (8/29/2016)
165
+ ### 0.7.7 (2016/8/29)
18
166
 
19
167
  * [#103](https://github.com/slack-ruby/slack-ruby-client/pull/103): Added Danger, PR linting - [@dblock](https://github.com/dblock).
20
168
  * [#101](https://github.com/slack-ruby/slack-ruby-client/issues/101): Fix: protected method `close` called with EventMachine - [@dblock](https://github.com/dblock).
21
169
  * [#104](https://github.com/slack-ruby/slack-ruby-client/issues/104): Fix: thread leak in `start_async` with Celluloid - [@dblock](https://github.com/dblock).
22
170
 
23
- ### 0.7.6 (8/7/2016)
171
+ ### 0.7.6 (2016/8/7)
24
172
 
25
173
  * Added `url_verification`, `message.mpim`, `message.im`, `message.groups` and `message.channels` RealTime events - [@dblock](https://github.com/dblock).
26
174
  * The `im_open` method accepts `return_im` - [@dblock](https://github.com/dblock).
27
175
 
28
- ### 0.7.5 (6/27/2016)
176
+ ### 0.7.5 (2016/6/27)
29
177
 
30
178
  * Added `bots_info` to Web API - [@dblock](https://github.com/dblock).
31
179
  * Added `team_profile_get` and `team_billableInfo` to Web API - [@dblock](https://github.com/dblock).
@@ -33,30 +181,30 @@
33
181
  * Added `users_profile_get` and `users_profile_set` to Web API - [@dblock](https://github.com/dblock).
34
182
  * The `stars_list` method no longer takes a user - [@dblock](https://github.com/dblock).
35
183
 
36
- ### 0.7.4 (5/28/2016)
184
+ ### 0.7.4 (2016/5/28)
37
185
 
38
186
  * [#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).
39
187
  * Added `auth_revoke` and `users_identity` to Web API - [@dblock](https://github.com/dblock).
40
188
  * Added `channel` parameter to `files_comments_add` Web API - [@dblock](https://github.com/dblock).
41
189
 
42
- ### 0.7.3 (5/14/2016)
190
+ ### 0.7.3 (2016/5/14)
43
191
 
44
192
  * [#90](https://github.com/slack-ruby/slack-ruby-client/issues/90): Fix: Celluloid concurrency handles server-side connection closing - [@dblock](https://github.com/dblock).
45
193
 
46
- ### 0.7.2 (5/5/2016)
194
+ ### 0.7.2 (2016/5/5)
47
195
 
48
196
  * [#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).
49
197
 
50
- ### 0.7.1 (5/2/2016)
198
+ ### 0.7.1 (2016/5/2)
51
199
 
52
200
  * [#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).
53
- * [#73](https://github.com/slack-ruby/slack-ruby-client/issues/73): Add a `closed` event - [@rkadyb](https://github.com/rkadyb).
54
- * [#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).
201
+ * [#73](https://github.com/slack-ruby/slack-ruby-client/issues/73): Added a `closed` event - [@rkadyb](https://github.com/rkadyb).
202
+ * [#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).
55
203
  * [#85](https://github.com/slack-ruby/slack-ruby-client/issues/85): Compatibility with WebMock 2.0 - [@dblock](https://github.com/dblock).
56
204
  * Added `as_user` to `chat_delete` Web API - [@dblock](https://github.com/dblock).
57
205
  * Added `reminders_add`, `reminders_complete`, `reminders_delete`, `reminders_info` and `reminders_list` to Web API - [@dblock](https://github.com/dblock).
58
206
 
59
- ### 0.7.0 (3/6/2016)
207
+ ### 0.7.0 (2016/3/6)
60
208
 
61
209
  * [#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).
62
210
  * [#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).
@@ -64,35 +212,35 @@
64
212
  * Added `files_revokePublicURL` and `files_sharedPublicURL` to Web API - [@dblock](https://github.com/dblock).
65
213
  * [#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).
66
214
 
67
- ### 0.6.0 (2/4/2016)
215
+ ### 0.6.0 (2016/2/4)
68
216
 
69
217
  * [#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).
70
218
  * [#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).
71
219
  * [#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).
72
220
  * [#52](https://github.com/slack-ruby/slack-ruby-client/issues/52): Added `users_search` - [@dblock](https://github.com/dblock).
73
221
 
74
- ### 0.5.4 (1/23/2016)
222
+ ### 0.5.4 (2016/1/23)
75
223
 
76
224
  * [#45](https://github.com/slack-ruby/slack-ruby-client/issues/45): Added `channels_id`, `groups_id` and `users_id` - [@dblock](https://github.com/dblock).
77
225
  * [#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).
78
226
  * [#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).
79
227
 
80
- ### 0.5.3 (1/11/2016)
228
+ ### 0.5.3 (2016/1/11)
81
229
 
82
230
  * [#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).
83
231
  * Fixed JRuby file encoding regression - [@dblock](https://github.com/dblock).
84
232
 
85
- ### 0.5.2 (1/8/2016)
233
+ ### 0.5.2 (2016/1/8)
86
234
 
87
235
  * [#41](https://github.com/slack-ruby/slack-ruby-client/issues/41): Added `Slack::Messages::Formatting#unescape` - [@dblock](https://github.com/dblock).
88
236
  * Added `files_comments` to Web API - [@dblock](https://github.com/dblock).
89
237
 
90
- ### 0.5.1 (1/4/2016)
238
+ ### 0.5.1 (2016/1/4)
91
239
 
92
240
  * Added `dnd_teamInfo`, `dnd_setSnooze`, `dnd_info`, `dnd_endSnooze` and `dnd_endDnd` to Web API - [@dblock](https://github.com/dblock).
93
241
  * The `files_upload` method now requires both `file` and `filename` to Web API - [@dblock](https://github.com/dblock).
94
242
 
95
- ### 0.5.0 (12/7/2015)
243
+ ### 0.5.0 (2015/12/7)
96
244
 
97
245
  * Added `usergroups_create`, `usergroups_disable`, `usergroups_enable`, `usergroups_list`, `usergroups_update` and `usergroups_users` to Web API - [@dblock](https://github.com/dblock).
98
246
  * Added command-line `slack` client - [@dblock](https://github.com/dblock).
@@ -103,7 +251,7 @@
103
251
  * [#22](https://github.com/slack-ruby/slack-ruby-client/issues/22): Added `Slack::Web::Api::Error#response` - [@dblock](https://github.com/dblock).
104
252
  * Added `logger` to `Slack::Web::Client` configuration that logs HTTP requests - [@dblock](https://github.com/dblock).
105
253
 
106
- ### 0.4.0 (11/8/2015)
254
+ ### 0.4.0 (2015/11/8)
107
255
 
108
256
  * Added `team_integrationLogs` to Web API - [@dblock](https://github.com/dblock).
109
257
  * [#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).
@@ -113,12 +261,12 @@
113
261
  * Added `unreads` to `channels_history`, `groups_history` and `im_history` to Web API - [@dblock](https://github.com/dblock).
114
262
  * Added `stars_add` and `stars_remove` to Web API - [@dblock](https://github.com/dblock).
115
263
 
116
- ### 0.3.1 (10/16/2015)
264
+ ### 0.3.1 (2015/10/16)
117
265
 
118
266
  * Added `stars_list`, `stars_add` and `stars_remove` to Web API - [@dblock](https://github.com/dblock).
119
267
  * Added `attachments`, `parse` and `link_names` to `chat_update` in Web API - [@dblock](https://github.com/dblock).
120
268
 
121
- ### 0.3.0 (9/1/2015)
269
+ ### 0.3.0 (2015/9/1)
122
270
 
123
271
  * Added `team.info` and `accessLogs` to Web API - [@dblock](https://github.com/dblock).
124
272
  * Removed obsolete `presence` Web API - [@dblock](https://github.com/dblock).
@@ -131,12 +279,12 @@
131
279
  * Use API reference schema from [github.com/dblock/slack-api-ref](https://github.com/dblock/slack-api-ref) - [@dblock](https://github.com/dblock).
132
280
  * Added `reactions_add`, `reactions_list`, `reactions_get` and `reactions_remove` to Web API - [@jakedahn](https://github.com/jakedahn).
133
281
 
134
- ### 0.2.1 (8/2/2015)
282
+ ### 0.2.1 (2015/8/2)
135
283
 
136
284
  * Set Slack API token via `Slack::RealTime::Client.new(token: 'token')` and `Slack::Web::Client.new(token: 'token')` - [@dblock](https://github.com/dblock).
137
285
  * Set Slack API token via `Slack::RealTime::Client.configure` and `Slack::Web::Client.configure` - [@dblock](https://github.com/dblock).
138
286
 
139
- ### 0.2.0 (7/31/2015)
287
+ ### 0.2.0 (2015/7/31)
140
288
 
141
289
  * [#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).
142
290
  * [#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).
@@ -146,6 +294,6 @@
146
294
  * Default user-agent for `Slack::Web::Client` now includes a slash, eg. _Slack Ruby Client/0.1.1_ - [@dblock](https://github.com/dblock).
147
295
  * Fix: set `Slack::Web::Client` connection options for `ca_path`, `ca_file`, and `proxy` - [@dblock](https://github.com/dblock).
148
296
 
149
- ### 0.1.0 (7/25/2015)
297
+ ### 0.1.0 (2015/7/25)
150
298
 
151
299
  * Initial public release with Web and RealTime Messaging API support - [@dblock](https://github.com/dblock).