slack-ruby-client 0.15.1 → 0.16.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (149) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +1 -1
  3. data/.rubocop_todo.yml +0 -14
  4. data/.travis.yml +1 -4
  5. data/CHANGELOG.md +8 -0
  6. data/CONTRIBUTING.md +3 -10
  7. data/README.md +9 -27
  8. data/UPGRADING.md +14 -2
  9. data/bin/commands.rb +7 -0
  10. data/bin/commands/admin_analytics.rb +15 -0
  11. data/bin/commands/admin_apps.rb +15 -2
  12. data/bin/commands/admin_barriers.rb +47 -0
  13. data/bin/commands/admin_conversations.rb +154 -2
  14. data/bin/commands/admin_conversations_ekm.rb +17 -0
  15. data/bin/commands/admin_conversations_restrictAccess.rb +4 -4
  16. data/bin/commands/admin_conversations_whitelist.rb +1 -1
  17. data/bin/commands/admin_emoji.rb +1 -1
  18. data/bin/commands/admin_usergroups.rb +2 -2
  19. data/bin/commands/admin_users.rb +2 -2
  20. data/bin/commands/admin_users_session.rb +22 -0
  21. data/bin/commands/api.rb +0 -1
  22. data/bin/commands/apps_connections.rb +13 -0
  23. data/bin/commands/apps_event_authorizations.rb +16 -0
  24. data/bin/commands/auth_teams.rb +16 -0
  25. data/bin/commands/bots.rb +1 -0
  26. data/bin/commands/channels.rb +6 -3
  27. data/bin/commands/chat.rb +4 -4
  28. data/bin/commands/chat_scheduledMessages.rb +1 -0
  29. data/bin/commands/conversations.rb +14 -2
  30. data/bin/commands/dnd.rb +1 -1
  31. data/bin/commands/files.rb +6 -5
  32. data/bin/commands/files_remote.rb +2 -2
  33. data/bin/commands/groups.rb +5 -3
  34. data/bin/commands/im.rb +1 -1
  35. data/bin/commands/migration.rb +1 -0
  36. data/bin/commands/mpim.rb +3 -3
  37. data/bin/commands/pins.rb +0 -2
  38. data/bin/commands/reactions.rb +1 -0
  39. data/bin/commands/search.rb +4 -1
  40. data/bin/commands/team.rb +3 -0
  41. data/bin/commands/usergroups.rb +6 -1
  42. data/bin/commands/usergroups_users.rb +2 -0
  43. data/bin/commands/users.rb +5 -3
  44. data/bin/commands/users_profile.rb +5 -5
  45. data/bin/commands/views.rb +1 -1
  46. data/bin/commands/workflows.rb +38 -0
  47. data/lib/slack-ruby-client.rb +2 -0
  48. data/lib/slack/events/request.rb +5 -1
  49. data/lib/slack/real_time/client.rb +0 -1
  50. data/lib/slack/real_time/concurrency.rb +0 -2
  51. data/lib/slack/real_time/config.rb +5 -4
  52. data/lib/slack/version.rb +1 -1
  53. data/lib/slack/web/api/endpoints.rb +14 -0
  54. data/lib/slack/web/api/endpoints/admin_analytics.rb +26 -0
  55. data/lib/slack/web/api/endpoints/admin_apps.rb +22 -2
  56. data/lib/slack/web/api/endpoints/admin_barriers.rb +82 -0
  57. data/lib/slack/web/api/endpoints/admin_conversations.rb +231 -1
  58. data/lib/slack/web/api/endpoints/admin_conversations_ekm.rb +35 -0
  59. data/lib/slack/web/api/endpoints/admin_conversations_restrictAccess.rb +3 -3
  60. data/lib/slack/web/api/endpoints/admin_conversations_whitelist.rb +3 -3
  61. data/lib/slack/web/api/endpoints/admin_emoji.rb +1 -1
  62. data/lib/slack/web/api/endpoints/admin_usergroups.rb +1 -1
  63. data/lib/slack/web/api/endpoints/admin_users.rb +4 -6
  64. data/lib/slack/web/api/endpoints/admin_users_session.rb +38 -0
  65. data/lib/slack/web/api/endpoints/api.rb +0 -2
  66. data/lib/slack/web/api/endpoints/apps_connections.rb +21 -0
  67. data/lib/slack/web/api/endpoints/apps_event_authorizations.rb +34 -0
  68. data/lib/slack/web/api/endpoints/auth_teams.rb +33 -0
  69. data/lib/slack/web/api/endpoints/bots.rb +2 -0
  70. data/lib/slack/web/api/endpoints/channels.rb +9 -3
  71. data/lib/slack/web/api/endpoints/chat.rb +3 -3
  72. data/lib/slack/web/api/endpoints/chat_scheduledMessages.rb +2 -0
  73. data/lib/slack/web/api/endpoints/conversations.rb +21 -1
  74. data/lib/slack/web/api/endpoints/files.rb +4 -2
  75. data/lib/slack/web/api/endpoints/files_remote.rb +2 -2
  76. data/lib/slack/web/api/endpoints/groups.rb +7 -3
  77. data/lib/slack/web/api/endpoints/im.rb +1 -1
  78. data/lib/slack/web/api/endpoints/migration.rb +2 -0
  79. data/lib/slack/web/api/endpoints/mpim.rb +3 -3
  80. data/lib/slack/web/api/endpoints/pins.rb +0 -5
  81. data/lib/slack/web/api/endpoints/reactions.rb +2 -0
  82. data/lib/slack/web/api/endpoints/search.rb +6 -0
  83. data/lib/slack/web/api/endpoints/team.rb +6 -0
  84. data/lib/slack/web/api/endpoints/usergroups.rb +10 -0
  85. data/lib/slack/web/api/endpoints/usergroups_users.rb +4 -0
  86. data/lib/slack/web/api/endpoints/users.rb +7 -5
  87. data/lib/slack/web/api/endpoints/users_profile.rb +3 -3
  88. data/lib/slack/web/api/endpoints/views.rb +1 -1
  89. data/lib/slack/web/api/endpoints/workflows.rb +61 -0
  90. data/lib/slack/web/api/errors.rb +194 -0
  91. data/lib/slack/web/api/errors/internal_error.rb +14 -0
  92. data/lib/slack/web/api/templates/endpoints.erb +1 -0
  93. data/lib/slack/web/api/templates/method_spec.erb +1 -1
  94. data/lib/slack/web/faraday/connection.rb +1 -1
  95. data/lib/slack/web/faraday/response/raise_error.rb +16 -1
  96. data/lib/slack/web/faraday/response/wrap_error.rb +18 -0
  97. data/lib/tasks/web.rake +7 -3
  98. data/spec/slack/events/request_spec.rb +7 -3
  99. data/spec/slack/real_time/client_spec.rb +1 -1
  100. data/spec/slack/web/api/endpoints/admin_analytics_spec.rb +13 -0
  101. data/spec/slack/web/api/endpoints/admin_apps_spec.rb +5 -0
  102. data/spec/slack/web/api/endpoints/admin_barriers_spec.rb +38 -0
  103. data/spec/slack/web/api/endpoints/admin_conversations_ekm_spec.rb +8 -0
  104. data/spec/slack/web/api/endpoints/admin_conversations_restrictAccess_spec.rb +5 -5
  105. data/spec/slack/web/api/endpoints/admin_conversations_spec.rb +85 -0
  106. data/spec/slack/web/api/endpoints/admin_conversations_whitelist_spec.rb +5 -5
  107. data/spec/slack/web/api/endpoints/admin_emoji_spec.rb +6 -6
  108. data/spec/slack/web/api/endpoints/admin_teams_settings_spec.rb +10 -10
  109. data/spec/slack/web/api/endpoints/admin_teams_spec.rb +2 -2
  110. data/spec/slack/web/api/endpoints/admin_usergroups_spec.rb +6 -6
  111. data/spec/slack/web/api/endpoints/admin_users_session_spec.rb +8 -0
  112. data/spec/slack/web/api/endpoints/admin_users_spec.rb +15 -23
  113. data/spec/slack/web/api/endpoints/apps_connections_spec.rb +8 -0
  114. data/spec/slack/web/api/endpoints/apps_event_authorizations_spec.rb +13 -0
  115. data/spec/slack/web/api/endpoints/apps_permissions_spec.rb +2 -2
  116. data/spec/slack/web/api/endpoints/apps_permissions_users_spec.rb +3 -3
  117. data/spec/slack/web/api/endpoints/apps_spec.rb +2 -2
  118. data/spec/slack/web/api/endpoints/auth_teams_spec.rb +8 -0
  119. data/spec/slack/web/api/endpoints/calls_participants_spec.rb +4 -4
  120. data/spec/slack/web/api/endpoints/calls_spec.rb +2 -2
  121. data/spec/slack/web/api/endpoints/conversations_spec.rb +20 -12
  122. data/spec/slack/web/api/endpoints/files_comments_spec.rb +2 -2
  123. data/spec/slack/web/api/endpoints/files_remote_spec.rb +3 -3
  124. data/spec/slack/web/api/endpoints/files_spec.rb +4 -4
  125. data/spec/slack/web/api/endpoints/im_spec.rb +4 -4
  126. data/spec/slack/web/api/endpoints/mpim_spec.rb +4 -4
  127. data/spec/slack/web/api/endpoints/oauth_spec.rb +3 -3
  128. data/spec/slack/web/api/endpoints/pins_spec.rb +1 -4
  129. data/spec/slack/web/api/endpoints/reactions_spec.rb +3 -3
  130. data/spec/slack/web/api/endpoints/reminders_spec.rb +2 -2
  131. data/spec/slack/web/api/endpoints/usergroups_users_spec.rb +2 -2
  132. data/spec/slack/web/api/endpoints/workflows_spec.rb +26 -0
  133. data/spec/slack/web/client_spec.rb +56 -0
  134. data/spec/slack/web/faraday/response/raise_error_spec.rb +7 -6
  135. metadata +32 -19
  136. data/examples/hi_real_time/Gemfile +0 -6
  137. data/examples/hi_real_time/hi.gif +0 -0
  138. data/examples/hi_real_time/hi.rb +0 -41
  139. data/examples/hi_real_time_async_celluloid/Gemfile +0 -7
  140. data/examples/hi_real_time_async_celluloid/Procfile +0 -2
  141. data/examples/hi_real_time_async_celluloid/hi.rb +0 -39
  142. data/examples/hi_real_time_async_eventmachine/Gemfile +0 -7
  143. data/examples/hi_real_time_async_eventmachine/Procfile +0 -2
  144. data/examples/hi_real_time_async_eventmachine/hi.rb +0 -39
  145. data/lib/slack/real_time/concurrency/celluloid.rb +0 -142
  146. data/lib/slack/real_time/concurrency/eventmachine.rb +0 -85
  147. data/spec/slack/real_time/concurrency/celluloid_spec.rb +0 -116
  148. data/spec/slack/real_time/concurrency/eventmachine_spec.rb +0 -57
  149. data/spec/slack/web/api/errors/service_unavailable_spec.rb +0 -17
@@ -7,10 +7,10 @@ RSpec.describe Slack::Web::Api::Endpoints::AdminTeams do
7
7
  let(:client) { Slack::Web::Client.new }
8
8
  context 'admin.teams_create' do
9
9
  it 'requires team_domain' do
10
- expect { client.admin_teams_create(team_name: '') }.to raise_error ArgumentError, /Required arguments :team_domain missing/
10
+ expect { client.admin_teams_create(team_name: %q[]) }.to raise_error ArgumentError, /Required arguments :team_domain missing/
11
11
  end
12
12
  it 'requires team_name' do
13
- expect { client.admin_teams_create(team_domain: '') }.to raise_error ArgumentError, /Required arguments :team_name missing/
13
+ expect { client.admin_teams_create(team_domain: %q[]) }.to raise_error ArgumentError, /Required arguments :team_name missing/
14
14
  end
15
15
  end
16
16
  end
@@ -7,18 +7,18 @@ RSpec.describe Slack::Web::Api::Endpoints::AdminUsergroups do
7
7
  let(:client) { Slack::Web::Client.new }
8
8
  context 'admin.usergroups_addChannels' do
9
9
  it 'requires channel_ids' do
10
- expect { client.admin_usergroups_addChannels(usergroup_id: 'S00000000') }.to raise_error ArgumentError, /Required arguments :channel_ids missing/
10
+ expect { client.admin_usergroups_addChannels(usergroup_id: %q[S00000000]) }.to raise_error ArgumentError, /Required arguments :channel_ids missing/
11
11
  end
12
12
  it 'requires usergroup_id' do
13
- expect { client.admin_usergroups_addChannels(channel_ids: 'C00000000,C00000001') }.to raise_error ArgumentError, /Required arguments :usergroup_id missing/
13
+ expect { client.admin_usergroups_addChannels(channel_ids: %q[C00000000,C00000001]) }.to raise_error ArgumentError, /Required arguments :usergroup_id missing/
14
14
  end
15
15
  end
16
16
  context 'admin.usergroups_addTeams' do
17
17
  it 'requires team_ids' do
18
- expect { client.admin_usergroups_addTeams(usergroup_id: 'S12345678') }.to raise_error ArgumentError, /Required arguments :team_ids missing/
18
+ expect { client.admin_usergroups_addTeams(usergroup_id: %q[S12345678]) }.to raise_error ArgumentError, /Required arguments :team_ids missing/
19
19
  end
20
20
  it 'requires usergroup_id' do
21
- expect { client.admin_usergroups_addTeams(team_ids: 'T12345678,T98765432') }.to raise_error ArgumentError, /Required arguments :usergroup_id missing/
21
+ expect { client.admin_usergroups_addTeams(team_ids: %q[T12345678,T98765432]) }.to raise_error ArgumentError, /Required arguments :usergroup_id missing/
22
22
  end
23
23
  end
24
24
  context 'admin.usergroups_listChannels' do
@@ -28,10 +28,10 @@ RSpec.describe Slack::Web::Api::Endpoints::AdminUsergroups do
28
28
  end
29
29
  context 'admin.usergroups_removeChannels' do
30
30
  it 'requires channel_ids' do
31
- expect { client.admin_usergroups_removeChannels(usergroup_id: 'S00000000') }.to raise_error ArgumentError, /Required arguments :channel_ids missing/
31
+ expect { client.admin_usergroups_removeChannels(usergroup_id: %q[S00000000]) }.to raise_error ArgumentError, /Required arguments :channel_ids missing/
32
32
  end
33
33
  it 'requires usergroup_id' do
34
- expect { client.admin_usergroups_removeChannels(channel_ids: 'C00000000,C00000001') }.to raise_error ArgumentError, /Required arguments :usergroup_id missing/
34
+ expect { client.admin_usergroups_removeChannels(channel_ids: %q[C00000000,C00000001]) }.to raise_error ArgumentError, /Required arguments :usergroup_id missing/
35
35
  end
36
36
  end
37
37
  end
@@ -5,6 +5,14 @@ require 'spec_helper'
5
5
 
6
6
  RSpec.describe Slack::Web::Api::Endpoints::AdminUsersSession do
7
7
  let(:client) { Slack::Web::Client.new }
8
+ context 'admin.users.session_invalidate' do
9
+ it 'requires session_id' do
10
+ expect { client.admin_users_session_invalidate(team_id: %q[T1234]) }.to raise_error ArgumentError, /Required arguments :session_id missing/
11
+ end
12
+ it 'requires team_id' do
13
+ expect { client.admin_users_session_invalidate(session_id: %q[12345]) }.to raise_error ArgumentError, /Required arguments :team_id missing/
14
+ end
15
+ end
8
16
  context 'admin.users.session_reset' do
9
17
  it 'requires user_id' do
10
18
  expect { client.admin_users_session_reset }.to raise_error ArgumentError, /Required arguments :user_id missing/
@@ -7,69 +7,61 @@ RSpec.describe Slack::Web::Api::Endpoints::AdminUsers do
7
7
  let(:client) { Slack::Web::Client.new }
8
8
  context 'admin.users_assign' do
9
9
  it 'requires team_id' do
10
- expect { client.admin_users_assign(user_id: '') }.to raise_error ArgumentError, /Required arguments :team_id missing/
10
+ expect { client.admin_users_assign(user_id: %q[]) }.to raise_error ArgumentError, /Required arguments :team_id missing/
11
11
  end
12
12
  it 'requires user_id' do
13
- expect { client.admin_users_assign(team_id: '') }.to raise_error ArgumentError, /Required arguments :user_id missing/
13
+ expect { client.admin_users_assign(team_id: %q[]) }.to raise_error ArgumentError, /Required arguments :user_id missing/
14
14
  end
15
15
  end
16
16
  context 'admin.users_invite' do
17
17
  it 'requires channel_ids' do
18
- expect { client.admin_users_invite(email: 'joe@email.com', team_id: '') }.to raise_error ArgumentError, /Required arguments :channel_ids missing/
18
+ expect { client.admin_users_invite(email: %q[joe@email.com], team_id: %q[]) }.to raise_error ArgumentError, /Required arguments :channel_ids missing/
19
19
  end
20
20
  it 'requires email' do
21
- expect { client.admin_users_invite(channel_ids: 'C1A2B3C4D,C26Z25Y24', team_id: '') }.to raise_error ArgumentError, /Required arguments :email missing/
21
+ expect { client.admin_users_invite(channel_ids: %q[C1A2B3C4D,C26Z25Y24], team_id: %q[]) }.to raise_error ArgumentError, /Required arguments :email missing/
22
22
  end
23
23
  it 'requires team_id' do
24
- expect { client.admin_users_invite(channel_ids: 'C1A2B3C4D,C26Z25Y24', email: 'joe@email.com') }.to raise_error ArgumentError, /Required arguments :team_id missing/
25
- end
26
- end
27
- context 'admin.users_list' do
28
- it 'requires team_id' do
29
- expect { client.admin_users_list }.to raise_error ArgumentError, /Required arguments :team_id missing/
24
+ expect { client.admin_users_invite(channel_ids: %q[C1A2B3C4D,C26Z25Y24], email: %q[joe@email.com]) }.to raise_error ArgumentError, /Required arguments :team_id missing/
30
25
  end
31
26
  end
32
27
  context 'admin.users_remove' do
33
28
  it 'requires team_id' do
34
- expect { client.admin_users_remove(user_id: 'W12345678') }.to raise_error ArgumentError, /Required arguments :team_id missing/
29
+ expect { client.admin_users_remove(user_id: %q[W12345678]) }.to raise_error ArgumentError, /Required arguments :team_id missing/
35
30
  end
36
31
  it 'requires user_id' do
37
- expect { client.admin_users_remove(team_id: '') }.to raise_error ArgumentError, /Required arguments :user_id missing/
32
+ expect { client.admin_users_remove(team_id: %q[]) }.to raise_error ArgumentError, /Required arguments :user_id missing/
38
33
  end
39
34
  end
40
35
  context 'admin.users_setAdmin' do
41
36
  it 'requires team_id' do
42
- expect { client.admin_users_setAdmin(user_id: 'W12345678') }.to raise_error ArgumentError, /Required arguments :team_id missing/
37
+ expect { client.admin_users_setAdmin(user_id: %q[W12345678]) }.to raise_error ArgumentError, /Required arguments :team_id missing/
43
38
  end
44
39
  it 'requires user_id' do
45
- expect { client.admin_users_setAdmin(team_id: '') }.to raise_error ArgumentError, /Required arguments :user_id missing/
40
+ expect { client.admin_users_setAdmin(team_id: %q[]) }.to raise_error ArgumentError, /Required arguments :user_id missing/
46
41
  end
47
42
  end
48
43
  context 'admin.users_setExpiration' do
49
44
  it 'requires expiration_ts' do
50
- expect { client.admin_users_setExpiration(team_id: '', user_id: 'W12345678') }.to raise_error ArgumentError, /Required arguments :expiration_ts missing/
51
- end
52
- it 'requires team_id' do
53
- expect { client.admin_users_setExpiration(expiration_ts: '1234567890', user_id: 'W12345678') }.to raise_error ArgumentError, /Required arguments :team_id missing/
45
+ expect { client.admin_users_setExpiration(user_id: %q[W12345678]) }.to raise_error ArgumentError, /Required arguments :expiration_ts missing/
54
46
  end
55
47
  it 'requires user_id' do
56
- expect { client.admin_users_setExpiration(expiration_ts: '1234567890', team_id: '') }.to raise_error ArgumentError, /Required arguments :user_id missing/
48
+ expect { client.admin_users_setExpiration(expiration_ts: %q[1234567890]) }.to raise_error ArgumentError, /Required arguments :user_id missing/
57
49
  end
58
50
  end
59
51
  context 'admin.users_setOwner' do
60
52
  it 'requires team_id' do
61
- expect { client.admin_users_setOwner(user_id: '') }.to raise_error ArgumentError, /Required arguments :team_id missing/
53
+ expect { client.admin_users_setOwner(user_id: %q[]) }.to raise_error ArgumentError, /Required arguments :team_id missing/
62
54
  end
63
55
  it 'requires user_id' do
64
- expect { client.admin_users_setOwner(team_id: '') }.to raise_error ArgumentError, /Required arguments :user_id missing/
56
+ expect { client.admin_users_setOwner(team_id: %q[]) }.to raise_error ArgumentError, /Required arguments :user_id missing/
65
57
  end
66
58
  end
67
59
  context 'admin.users_setRegular' do
68
60
  it 'requires team_id' do
69
- expect { client.admin_users_setRegular(user_id: 'W12345678') }.to raise_error ArgumentError, /Required arguments :team_id missing/
61
+ expect { client.admin_users_setRegular(user_id: %q[W12345678]) }.to raise_error ArgumentError, /Required arguments :team_id missing/
70
62
  end
71
63
  it 'requires user_id' do
72
- expect { client.admin_users_setRegular(team_id: '') }.to raise_error ArgumentError, /Required arguments :user_id missing/
64
+ expect { client.admin_users_setRegular(team_id: %q[]) }.to raise_error ArgumentError, /Required arguments :user_id missing/
73
65
  end
74
66
  end
75
67
  end
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+ # This file was auto-generated by lib/tasks/web.rake
3
+
4
+ require 'spec_helper'
5
+
6
+ RSpec.describe Slack::Web::Api::Endpoints::AppsConnections do
7
+ let(:client) { Slack::Web::Client.new }
8
+ end
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+ # This file was auto-generated by lib/tasks/web.rake
3
+
4
+ require 'spec_helper'
5
+
6
+ RSpec.describe Slack::Web::Api::Endpoints::AppsEventAuthorizations do
7
+ let(:client) { Slack::Web::Client.new }
8
+ context 'apps.event.authorizations_list' do
9
+ it 'requires event_context' do
10
+ expect { client.apps_event_authorizations_list }.to raise_error ArgumentError, /Required arguments :event_context missing/
11
+ end
12
+ end
13
+ end
@@ -7,10 +7,10 @@ RSpec.describe Slack::Web::Api::Endpoints::AppsPermissions do
7
7
  let(:client) { Slack::Web::Client.new }
8
8
  context 'apps.permissions_request' do
9
9
  it 'requires scopes' do
10
- expect { client.apps_permissions_request(trigger_id: '') }.to raise_error ArgumentError, /Required arguments :scopes missing/
10
+ expect { client.apps_permissions_request(trigger_id: %q[]) }.to raise_error ArgumentError, /Required arguments :scopes missing/
11
11
  end
12
12
  it 'requires trigger_id' do
13
- expect { client.apps_permissions_request(scopes: '') }.to raise_error ArgumentError, /Required arguments :trigger_id missing/
13
+ expect { client.apps_permissions_request(scopes: %q[]) }.to raise_error ArgumentError, /Required arguments :trigger_id missing/
14
14
  end
15
15
  end
16
16
  end
@@ -7,13 +7,13 @@ RSpec.describe Slack::Web::Api::Endpoints::AppsPermissionsUsers do
7
7
  let(:client) { Slack::Web::Client.new }
8
8
  context 'apps.permissions.users_request' do
9
9
  it 'requires scopes' do
10
- expect { client.apps_permissions_users_request(trigger_id: '', user: '') }.to raise_error ArgumentError, /Required arguments :scopes missing/
10
+ expect { client.apps_permissions_users_request(trigger_id: %q[], user: %q[]) }.to raise_error ArgumentError, /Required arguments :scopes missing/
11
11
  end
12
12
  it 'requires trigger_id' do
13
- expect { client.apps_permissions_users_request(scopes: '', user: '') }.to raise_error ArgumentError, /Required arguments :trigger_id missing/
13
+ expect { client.apps_permissions_users_request(scopes: %q[], user: %q[]) }.to raise_error ArgumentError, /Required arguments :trigger_id missing/
14
14
  end
15
15
  it 'requires user' do
16
- expect { client.apps_permissions_users_request(scopes: '', trigger_id: '') }.to raise_error ArgumentError, /Required arguments :user missing/
16
+ expect { client.apps_permissions_users_request(scopes: %q[], trigger_id: %q[]) }.to raise_error ArgumentError, /Required arguments :user missing/
17
17
  end
18
18
  end
19
19
  end
@@ -7,10 +7,10 @@ RSpec.describe Slack::Web::Api::Endpoints::Apps do
7
7
  let(:client) { Slack::Web::Client.new }
8
8
  context 'apps_uninstall' do
9
9
  it 'requires client_id' do
10
- expect { client.apps_uninstall(client_secret: 'f25b5ceaf8a3c2a2c4f52bb4f0b0499e') }.to raise_error ArgumentError, /Required arguments :client_id missing/
10
+ expect { client.apps_uninstall(client_secret: %q[f25b5ceaf8a3c2a2c4f52bb4f0b0499e]) }.to raise_error ArgumentError, /Required arguments :client_id missing/
11
11
  end
12
12
  it 'requires client_secret' do
13
- expect { client.apps_uninstall(client_id: '56579136444.26251006572') }.to raise_error ArgumentError, /Required arguments :client_secret missing/
13
+ expect { client.apps_uninstall(client_id: %q[56579136444.26251006572]) }.to raise_error ArgumentError, /Required arguments :client_secret missing/
14
14
  end
15
15
  end
16
16
  end
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+ # This file was auto-generated by lib/tasks/web.rake
3
+
4
+ require 'spec_helper'
5
+
6
+ RSpec.describe Slack::Web::Api::Endpoints::AuthTeams do
7
+ let(:client) { Slack::Web::Client.new }
8
+ end
@@ -7,18 +7,18 @@ RSpec.describe Slack::Web::Api::Endpoints::CallsParticipants do
7
7
  let(:client) { Slack::Web::Client.new }
8
8
  context 'calls.participants_add' do
9
9
  it 'requires id' do
10
- expect { client.calls_participants_add(users: '[{"slack_id": "U1H77"}, {"external_id": "54321678", "display_name": "External User", "avatar_url": "https://example.com/users/avatar1234.jpg"}]') }.to raise_error ArgumentError, /Required arguments :id missing/
10
+ expect { client.calls_participants_add(users: %q[[{"slack_id": "U1H77"}, {"external_id": "54321678", "display_name": "External User", "avatar_url": "https://example.com/users/avatar1234.jpg"}]]) }.to raise_error ArgumentError, /Required arguments :id missing/
11
11
  end
12
12
  it 'requires users' do
13
- expect { client.calls_participants_add(id: 'R0E69JAIF') }.to raise_error ArgumentError, /Required arguments :users missing/
13
+ expect { client.calls_participants_add(id: %q[R0E69JAIF]) }.to raise_error ArgumentError, /Required arguments :users missing/
14
14
  end
15
15
  end
16
16
  context 'calls.participants_remove' do
17
17
  it 'requires id' do
18
- expect { client.calls_participants_remove(users: '[{"slack_id": "U1H77"}, {"external_id": "54321678", "display_name": "External User", "avatar_url": "https://example.com/users/avatar1234.jpg"}]') }.to raise_error ArgumentError, /Required arguments :id missing/
18
+ expect { client.calls_participants_remove(users: %q[[{"slack_id": "U1H77"}, {"external_id": "54321678", "display_name": "External User", "avatar_url": "https://example.com/users/avatar1234.jpg"}]]) }.to raise_error ArgumentError, /Required arguments :id missing/
19
19
  end
20
20
  it 'requires users' do
21
- expect { client.calls_participants_remove(id: 'R0E69JAIF') }.to raise_error ArgumentError, /Required arguments :users missing/
21
+ expect { client.calls_participants_remove(id: %q[R0E69JAIF]) }.to raise_error ArgumentError, /Required arguments :users missing/
22
22
  end
23
23
  end
24
24
  end
@@ -7,10 +7,10 @@ RSpec.describe Slack::Web::Api::Endpoints::Calls do
7
7
  let(:client) { Slack::Web::Client.new }
8
8
  context 'calls_add' do
9
9
  it 'requires external_unique_id' do
10
- expect { client.calls_add(join_url: 'https://example.com/calls/1234567890') }.to raise_error ArgumentError, /Required arguments :external_unique_id missing/
10
+ expect { client.calls_add(join_url: %q[https://example.com/calls/1234567890]) }.to raise_error ArgumentError, /Required arguments :external_unique_id missing/
11
11
  end
12
12
  it 'requires join_url' do
13
- expect { client.calls_add(external_unique_id: '025169F6-E37A-4E62-BB54-7F93A0FC4C1F') }.to raise_error ArgumentError, /Required arguments :join_url missing/
13
+ expect { client.calls_add(external_unique_id: %q[025169F6-E37A-4E62-BB54-7F93A0FC4C1F]) }.to raise_error ArgumentError, /Required arguments :join_url missing/
14
14
  end
15
15
  end
16
16
  context 'calls_end' do
@@ -32,10 +32,10 @@ RSpec.describe Slack::Web::Api::Endpoints::Conversations do
32
32
  end
33
33
  context 'conversations_invite' do
34
34
  it 'requires channel' do
35
- expect { client.conversations_invite(users: 'W1234567890,U2345678901,U3456789012') }.to raise_error ArgumentError, /Required arguments :channel missing/
35
+ expect { client.conversations_invite(users: %q[W1234567890,U2345678901,U3456789012]) }.to raise_error ArgumentError, /Required arguments :channel missing/
36
36
  end
37
37
  it 'requires users' do
38
- expect { client.conversations_invite(channel: 'C1234567890') }.to raise_error ArgumentError, /Required arguments :users missing/
38
+ expect { client.conversations_invite(channel: %q[C1234567890]) }.to raise_error ArgumentError, /Required arguments :users missing/
39
39
  end
40
40
  end
41
41
  context 'conversations_join' do
@@ -45,10 +45,10 @@ RSpec.describe Slack::Web::Api::Endpoints::Conversations do
45
45
  end
46
46
  context 'conversations_kick' do
47
47
  it 'requires channel' do
48
- expect { client.conversations_kick(user: 'W1234567890') }.to raise_error ArgumentError, /Required arguments :channel missing/
48
+ expect { client.conversations_kick(user: %q[W1234567890]) }.to raise_error ArgumentError, /Required arguments :channel missing/
49
49
  end
50
50
  it 'requires user' do
51
- expect { client.conversations_kick(channel: 'C1234567890') }.to raise_error ArgumentError, /Required arguments :user missing/
51
+ expect { client.conversations_kick(channel: %q[C1234567890]) }.to raise_error ArgumentError, /Required arguments :user missing/
52
52
  end
53
53
  end
54
54
  context 'conversations_leave' do
@@ -56,6 +56,14 @@ RSpec.describe Slack::Web::Api::Endpoints::Conversations do
56
56
  expect { client.conversations_leave }.to raise_error ArgumentError, /Required arguments :channel missing/
57
57
  end
58
58
  end
59
+ context 'conversations_mark' do
60
+ it 'requires channel' do
61
+ expect { client.conversations_mark(ts: %q[1593473566.000200]) }.to raise_error ArgumentError, /Required arguments :channel missing/
62
+ end
63
+ it 'requires ts' do
64
+ expect { client.conversations_mark(channel: %q[C012345678]) }.to raise_error ArgumentError, /Required arguments :ts missing/
65
+ end
66
+ end
59
67
  context 'conversations_members' do
60
68
  it 'requires channel' do
61
69
  expect { client.conversations_members }.to raise_error ArgumentError, /Required arguments :channel missing/
@@ -63,34 +71,34 @@ RSpec.describe Slack::Web::Api::Endpoints::Conversations do
63
71
  end
64
72
  context 'conversations_rename' do
65
73
  it 'requires channel' do
66
- expect { client.conversations_rename(name: '') }.to raise_error ArgumentError, /Required arguments :channel missing/
74
+ expect { client.conversations_rename(name: %q[]) }.to raise_error ArgumentError, /Required arguments :channel missing/
67
75
  end
68
76
  it 'requires name' do
69
- expect { client.conversations_rename(channel: 'C1234567890') }.to raise_error ArgumentError, /Required arguments :name missing/
77
+ expect { client.conversations_rename(channel: %q[C1234567890]) }.to raise_error ArgumentError, /Required arguments :name missing/
70
78
  end
71
79
  end
72
80
  context 'conversations_replies' do
73
81
  it 'requires channel' do
74
- expect { client.conversations_replies(ts: '1234567890.123456') }.to raise_error ArgumentError, /Required arguments :channel missing/
82
+ expect { client.conversations_replies(ts: %q[1234567890.123456]) }.to raise_error ArgumentError, /Required arguments :channel missing/
75
83
  end
76
84
  it 'requires ts' do
77
- expect { client.conversations_replies(channel: 'C1234567890') }.to raise_error ArgumentError, /Required arguments :ts missing/
85
+ expect { client.conversations_replies(channel: %q[C1234567890]) }.to raise_error ArgumentError, /Required arguments :ts missing/
78
86
  end
79
87
  end
80
88
  context 'conversations_setPurpose' do
81
89
  it 'requires channel' do
82
- expect { client.conversations_setPurpose(purpose: 'My More Special Purpose') }.to raise_error ArgumentError, /Required arguments :channel missing/
90
+ expect { client.conversations_setPurpose(purpose: %q[My More Special Purpose]) }.to raise_error ArgumentError, /Required arguments :channel missing/
83
91
  end
84
92
  it 'requires purpose' do
85
- expect { client.conversations_setPurpose(channel: 'C1234567890') }.to raise_error ArgumentError, /Required arguments :purpose missing/
93
+ expect { client.conversations_setPurpose(channel: %q[C1234567890]) }.to raise_error ArgumentError, /Required arguments :purpose missing/
86
94
  end
87
95
  end
88
96
  context 'conversations_setTopic' do
89
97
  it 'requires channel' do
90
- expect { client.conversations_setTopic(topic: 'Apply topically for best effects') }.to raise_error ArgumentError, /Required arguments :channel missing/
98
+ expect { client.conversations_setTopic(topic: %q[Apply topically for best effects]) }.to raise_error ArgumentError, /Required arguments :channel missing/
91
99
  end
92
100
  it 'requires topic' do
93
- expect { client.conversations_setTopic(channel: 'C1234567890') }.to raise_error ArgumentError, /Required arguments :topic missing/
101
+ expect { client.conversations_setTopic(channel: %q[C1234567890]) }.to raise_error ArgumentError, /Required arguments :topic missing/
94
102
  end
95
103
  end
96
104
  context 'conversations_unarchive' do
@@ -7,10 +7,10 @@ RSpec.describe Slack::Web::Api::Endpoints::FilesComments do
7
7
  let(:client) { Slack::Web::Client.new }
8
8
  context 'files.comments_delete' do
9
9
  it 'requires file' do
10
- expect { client.files_comments_delete(id: 'Fc1234567890') }.to raise_error ArgumentError, /Required arguments :file missing/
10
+ expect { client.files_comments_delete(id: %q[Fc1234567890]) }.to raise_error ArgumentError, /Required arguments :file missing/
11
11
  end
12
12
  it 'requires id' do
13
- expect { client.files_comments_delete(file: 'F1234567890') }.to raise_error ArgumentError, /Required arguments :id missing/
13
+ expect { client.files_comments_delete(file: %q[F1234567890]) }.to raise_error ArgumentError, /Required arguments :id missing/
14
14
  end
15
15
  end
16
16
  end
@@ -7,13 +7,13 @@ RSpec.describe Slack::Web::Api::Endpoints::FilesRemote do
7
7
  let(:client) { Slack::Web::Client.new }
8
8
  context 'files.remote_add' do
9
9
  it 'requires external_id' do
10
- expect { client.files_remote_add(external_url: 'http://example.com/my_cloud_service_file/abc123', title: 'Danger, High Voltage!') }.to raise_error ArgumentError, /Required arguments :external_id missing/
10
+ expect { client.files_remote_add(external_url: %q[http://example.com/my_cloud_service_file/abc123], title: %q[Danger, High Voltage!]) }.to raise_error ArgumentError, /Required arguments :external_id missing/
11
11
  end
12
12
  it 'requires external_url' do
13
- expect { client.files_remote_add(external_id: '123456', title: 'Danger, High Voltage!') }.to raise_error ArgumentError, /Required arguments :external_url missing/
13
+ expect { client.files_remote_add(external_id: %q[123456], title: %q[Danger, High Voltage!]) }.to raise_error ArgumentError, /Required arguments :external_url missing/
14
14
  end
15
15
  it 'requires title' do
16
- expect { client.files_remote_add(external_id: '123456', external_url: 'http://example.com/my_cloud_service_file/abc123') }.to raise_error ArgumentError, /Required arguments :title missing/
16
+ expect { client.files_remote_add(external_id: %q[123456], external_url: %q[http://example.com/my_cloud_service_file/abc123]) }.to raise_error ArgumentError, /Required arguments :title missing/
17
17
  end
18
18
  end
19
19
  context 'files.remote_share' do
@@ -12,10 +12,10 @@ RSpec.describe Slack::Web::Api::Endpoints::Files do
12
12
  end
13
13
  context 'files_edit' do
14
14
  it 'requires file' do
15
- expect { client.files_edit(title: 'Brand new title') }.to raise_error ArgumentError, /Required arguments :file missing/
15
+ expect { client.files_edit(title: %q[Brand new title]) }.to raise_error ArgumentError, /Required arguments :file missing/
16
16
  end
17
17
  it 'requires title' do
18
- expect { client.files_edit(file: 'F2147483862') }.to raise_error ArgumentError, /Required arguments :title missing/
18
+ expect { client.files_edit(file: %q[F2147483862]) }.to raise_error ArgumentError, /Required arguments :title missing/
19
19
  end
20
20
  end
21
21
  context 'files_info' do
@@ -30,10 +30,10 @@ RSpec.describe Slack::Web::Api::Endpoints::Files do
30
30
  end
31
31
  context 'files_share' do
32
32
  it 'requires file' do
33
- expect { client.files_share(channel: 'C1234567890') }.to raise_error ArgumentError, /Required arguments :file missing/
33
+ expect { client.files_share(channel: %q[C1234567890]) }.to raise_error ArgumentError, /Required arguments :file missing/
34
34
  end
35
35
  it 'requires channel' do
36
- expect { client.files_share(file: 'F2147483862') }.to raise_error ArgumentError, /Required arguments :channel missing/
36
+ expect { client.files_share(file: %q[F2147483862]) }.to raise_error ArgumentError, /Required arguments :channel missing/
37
37
  end
38
38
  end
39
39
  context 'files_sharedPublicURL' do
@@ -17,10 +17,10 @@ RSpec.describe Slack::Web::Api::Endpoints::Im do
17
17
  end
18
18
  context 'im_mark' do
19
19
  it 'requires channel' do
20
- expect { client.im_mark(ts: '1234567890.123456') }.to raise_error ArgumentError, /Required arguments :channel missing/
20
+ expect { client.im_mark(ts: %q[1234567890.123456]) }.to raise_error ArgumentError, /Required arguments :channel missing/
21
21
  end
22
22
  it 'requires ts' do
23
- expect { client.im_mark(channel: 'D1234567890') }.to raise_error ArgumentError, /Required arguments :ts missing/
23
+ expect { client.im_mark(channel: %q[D1234567890]) }.to raise_error ArgumentError, /Required arguments :ts missing/
24
24
  end
25
25
  end
26
26
  context 'im_open' do
@@ -30,10 +30,10 @@ RSpec.describe Slack::Web::Api::Endpoints::Im do
30
30
  end
31
31
  context 'im_replies' do
32
32
  it 'requires channel' do
33
- expect { client.im_replies(thread_ts: '1234567890.123456') }.to raise_error ArgumentError, /Required arguments :channel missing/
33
+ expect { client.im_replies(thread_ts: %q[1234567890.123456]) }.to raise_error ArgumentError, /Required arguments :channel missing/
34
34
  end
35
35
  it 'requires thread_ts' do
36
- expect { client.im_replies(channel: 'C1234567890') }.to raise_error ArgumentError, /Required arguments :thread_ts missing/
36
+ expect { client.im_replies(channel: %q[C1234567890]) }.to raise_error ArgumentError, /Required arguments :thread_ts missing/
37
37
  end
38
38
  end
39
39
  end
@@ -17,10 +17,10 @@ RSpec.describe Slack::Web::Api::Endpoints::Mpim do
17
17
  end
18
18
  context 'mpim_mark' do
19
19
  it 'requires channel' do
20
- expect { client.mpim_mark(ts: '1234567890.123456') }.to raise_error ArgumentError, /Required arguments :channel missing/
20
+ expect { client.mpim_mark(ts: %q[1593473566.000200]) }.to raise_error ArgumentError, /Required arguments :channel missing/
21
21
  end
22
22
  it 'requires ts' do
23
- expect { client.mpim_mark(channel: 'G1234567890') }.to raise_error ArgumentError, /Required arguments :ts missing/
23
+ expect { client.mpim_mark(channel: %q[C012345678]) }.to raise_error ArgumentError, /Required arguments :ts missing/
24
24
  end
25
25
  end
26
26
  context 'mpim_open' do
@@ -30,10 +30,10 @@ RSpec.describe Slack::Web::Api::Endpoints::Mpim do
30
30
  end
31
31
  context 'mpim_replies' do
32
32
  it 'requires channel' do
33
- expect { client.mpim_replies(thread_ts: '1234567890.123456') }.to raise_error ArgumentError, /Required arguments :channel missing/
33
+ expect { client.mpim_replies(thread_ts: %q[1234567890.123456]) }.to raise_error ArgumentError, /Required arguments :channel missing/
34
34
  end
35
35
  it 'requires thread_ts' do
36
- expect { client.mpim_replies(channel: 'C1234567890') }.to raise_error ArgumentError, /Required arguments :thread_ts missing/
36
+ expect { client.mpim_replies(channel: %q[C1234567890]) }.to raise_error ArgumentError, /Required arguments :thread_ts missing/
37
37
  end
38
38
  end
39
39
  end