slack-ruby-client 0.16.0 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/danger.yml +19 -0
- data/.github/workflows/integtest.yml +25 -0
- data/.github/workflows/rubocop.yml +13 -0
- data/.github/workflows/test.yml +34 -0
- data/.gitignore +5 -3
- data/.rubocop.yml +6 -0
- data/.rubocop_todo.yml +137 -43
- data/CHANGELOG.md +34 -3
- data/CONTRIBUTING.md +4 -4
- data/Gemfile +18 -1
- data/Gemfile.danger +6 -0
- data/LICENSE.md +1 -1
- data/README.md +13 -12
- data/RELEASING.md +1 -1
- data/UPGRADING.md +42 -0
- data/bin/commands/admin_analytics.rb +2 -1
- data/bin/commands/admin_apps.rb +11 -0
- data/bin/commands/admin_apps_requests.rb +12 -0
- data/bin/commands/admin_auth_policy.rb +39 -0
- data/bin/commands/admin_conversations.rb +2 -1
- data/bin/commands/admin_conversations_restrictAccess.rb +1 -1
- data/bin/commands/admin_emoji.rb +2 -2
- data/bin/commands/admin_teams.rb +1 -1
- data/bin/commands/admin_users.rb +1 -0
- data/bin/commands/admin_users_session.rb +40 -0
- data/bin/commands/admin_users_unsupportedVersions.rb +15 -0
- data/bin/commands/apps_manifest.rb +52 -0
- data/bin/commands/bookmarks.rb +52 -0
- data/bin/commands/channels.rb +0 -157
- data/bin/commands/chat.rb +14 -9
- data/bin/commands/conversations.rb +61 -4
- data/bin/commands/dnd.rb +3 -1
- data/bin/commands/files.rb +2 -1
- data/bin/commands/groups.rb +0 -163
- data/bin/commands/im.rb +0 -62
- data/bin/commands/mpim.rb +0 -60
- data/bin/commands/oauth.rb +0 -13
- data/bin/commands/oauth_v2.rb +13 -1
- data/bin/commands/openid_connect.rb +27 -0
- data/bin/commands/pins.rb +2 -2
- data/bin/commands/reminders.rb +6 -0
- data/bin/commands/rtm.rb +2 -2
- data/bin/commands/search.rb +2 -1
- data/bin/commands/stars.rb +7 -6
- data/bin/commands/team.rb +1 -0
- data/bin/commands/team_billing.rb +13 -0
- data/bin/commands/team_preferences.rb +13 -0
- data/bin/commands/tooling_tokens.rb +14 -0
- data/bin/commands/usergroups.rb +1 -1
- data/bin/commands/users.rb +1 -1
- data/bin/commands/views.rb +1 -1
- data/bin/commands.rb +8 -9
- data/lib/slack/config.rb +1 -2
- data/lib/slack/events/request.rb +5 -3
- data/lib/slack/real_time/client.rb +6 -7
- data/lib/slack/real_time/concurrency/async.rb +6 -8
- data/lib/slack/real_time/config.rb +3 -13
- data/lib/slack/real_time/socket.rb +1 -2
- data/lib/slack/real_time/stores/base.rb +1 -6
- data/lib/slack/real_time/stores/starter.rb +6 -3
- data/lib/slack/real_time/stores/store.rb +5 -0
- data/lib/slack/version.rb +1 -1
- data/lib/slack/web/api/endpoints/admin_analytics.rb +5 -3
- data/lib/slack/web/api/endpoints/admin_apps.rb +21 -5
- data/lib/slack/web/api/endpoints/admin_apps_approved.rb +2 -2
- data/lib/slack/web/api/endpoints/admin_apps_requests.rb +20 -2
- data/lib/slack/web/api/endpoints/admin_apps_restricted.rb +2 -2
- data/lib/slack/web/api/endpoints/admin_auth_policy.rb +72 -0
- data/lib/slack/web/api/endpoints/admin_barriers.rb +6 -6
- data/lib/slack/web/api/endpoints/admin_conversations.rb +28 -26
- data/lib/slack/web/api/endpoints/admin_conversations_ekm.rb +4 -4
- data/lib/slack/web/api/endpoints/admin_emoji.rb +11 -11
- data/lib/slack/web/api/endpoints/admin_inviteRequests.rb +7 -7
- data/lib/slack/web/api/endpoints/admin_inviteRequests_approved.rb +3 -3
- data/lib/slack/web/api/endpoints/admin_inviteRequests_denied.rb +2 -2
- data/lib/slack/web/api/endpoints/admin_teams.rb +7 -7
- data/lib/slack/web/api/endpoints/admin_teams_admins.rb +2 -2
- data/lib/slack/web/api/endpoints/admin_teams_owners.rb +2 -2
- data/lib/slack/web/api/endpoints/admin_teams_settings.rb +5 -5
- data/lib/slack/web/api/endpoints/admin_usergroups.rb +10 -10
- data/lib/slack/web/api/endpoints/admin_users.rb +20 -18
- data/lib/slack/web/api/endpoints/admin_users_session.rb +65 -9
- data/lib/slack/web/api/endpoints/admin_users_unsupportedVersions.rb +25 -0
- data/lib/slack/web/api/endpoints/api.rb +1 -1
- data/lib/slack/web/api/endpoints/apps.rb +2 -2
- data/lib/slack/web/api/endpoints/apps_event_authorizations.rb +3 -3
- data/lib/slack/web/api/endpoints/apps_manifest.rb +77 -0
- data/lib/slack/web/api/endpoints/auth.rb +1 -1
- data/lib/slack/web/api/endpoints/auth_teams.rb +3 -3
- data/lib/slack/web/api/endpoints/bookmarks.rb +86 -0
- data/lib/slack/web/api/endpoints/bots.rb +2 -2
- data/lib/slack/web/api/endpoints/calls.rb +15 -15
- data/lib/slack/web/api/endpoints/calls_participants.rb +4 -4
- data/lib/slack/web/api/endpoints/channels.rb +0 -265
- data/lib/slack/web/api/endpoints/chat.rb +67 -57
- data/lib/slack/web/api/endpoints/chat_scheduledMessages.rb +3 -3
- data/lib/slack/web/api/endpoints/conversations.rb +117 -27
- data/lib/slack/web/api/endpoints/dialog.rb +2 -2
- data/lib/slack/web/api/endpoints/dnd.rb +6 -3
- data/lib/slack/web/api/endpoints/files.rb +16 -14
- data/lib/slack/web/api/endpoints/files_comments.rb +1 -1
- data/lib/slack/web/api/endpoints/files_remote.rb +20 -20
- data/lib/slack/web/api/endpoints/groups.rb +0 -273
- data/lib/slack/web/api/endpoints/im.rb +0 -107
- data/lib/slack/web/api/endpoints/migration.rb +3 -3
- data/lib/slack/web/api/endpoints/mpim.rb +0 -102
- data/lib/slack/web/api/endpoints/oauth.rb +5 -27
- data/lib/slack/web/api/endpoints/oauth_v2.rb +24 -6
- data/lib/slack/web/api/endpoints/openid_connect.rb +42 -0
- data/lib/slack/web/api/endpoints/pins.rb +4 -4
- data/lib/slack/web/api/endpoints/reactions.rb +12 -12
- data/lib/slack/web/api/endpoints/reminders.rb +17 -5
- data/lib/slack/web/api/endpoints/rtm.rb +10 -10
- data/lib/slack/web/api/endpoints/search.rb +24 -16
- data/lib/slack/web/api/endpoints/stars.rb +11 -9
- data/lib/slack/web/api/endpoints/team.rb +10 -8
- data/lib/slack/web/api/endpoints/team_billing.rb +21 -0
- data/lib/slack/web/api/endpoints/team_preferences.rb +21 -0
- data/lib/slack/web/api/endpoints/team_profile.rb +1 -1
- data/lib/slack/web/api/endpoints/tooling_tokens.rb +24 -0
- data/lib/slack/web/api/endpoints/usergroups.rb +19 -19
- data/lib/slack/web/api/endpoints/usergroups_users.rb +7 -7
- data/lib/slack/web/api/endpoints/users.rb +16 -16
- data/lib/slack/web/api/endpoints/users_profile.rb +4 -4
- data/lib/slack/web/api/endpoints/views.rb +12 -12
- data/lib/slack/web/api/endpoints/workflows.rb +9 -9
- data/lib/slack/web/api/endpoints.rb +16 -20
- data/lib/slack/web/api/errors/server_error.rb +37 -0
- data/lib/slack/web/api/errors/too_many_requests_error.rb +1 -4
- data/lib/slack/web/api/errors.rb +232 -16
- data/lib/slack/web/api/mixins.rb +0 -2
- data/lib/slack/web/api/patches/chat.1.patch +7 -9
- data/lib/slack/web/api/templates/endpoints.erb +0 -2
- data/lib/slack/web/faraday/connection.rb +5 -5
- data/lib/slack/web/faraday/request.rb +4 -1
- data/lib/slack/web/faraday/response/raise_error.rb +2 -14
- data/lib/slack/web/faraday/response/wrap_error.rb +11 -5
- data/lib/slack/web/pagination/cursor.rb +1 -5
- data/lib/slack-ruby-client.rb +3 -2
- data/lib/tasks/real_time.rake +1 -3
- data/lib/tasks/web.rake +4 -0
- data/slack-ruby-client.gemspec +5 -14
- data/spec/fixtures/slack/web/429_error.yml +50 -54
- data/spec/fixtures/slack/web/auth_test_error.yml +51 -18
- data/spec/fixtures/slack/web/auth_test_success.yml +50 -26
- data/spec/fixtures/slack/web/conversations_info.yml +167 -0
- data/spec/fixtures/slack/web/conversations_setTopic.yml +42 -27
- data/spec/fixtures/slack/web/conversations_setTopic_one_page.yml +89 -59
- data/spec/fixtures/slack/web/conversations_setTopic_paginated.yml +131 -86
- data/spec/fixtures/slack/web/paginated_users_list.yml +501 -69
- data/spec/fixtures/slack/web/rtm_connect.yml +267 -30
- data/spec/fixtures/slack/web/rtm_start.yml +771 -60
- data/spec/fixtures/slack/web/users_info.yml +153 -69
- data/spec/fixtures/slack/web/users_list.yml +102 -41
- data/spec/fixtures/slack/web/views_open_error.yml +49 -42
- data/spec/integration/integration_spec.rb +1 -1
- data/spec/slack/events/request_spec.rb +7 -6
- data/spec/slack/real_time/client_spec.rb +37 -39
- data/spec/slack/real_time/concurrency/with_concurrency_spec.rb +10 -0
- data/spec/slack/real_time/concurrency/without_concurrency_spec.rb +10 -0
- data/spec/slack/real_time/event_handlers/bot_spec.rb +1 -1
- data/spec/slack/real_time/event_handlers/channel_spec.rb +9 -9
- data/spec/slack/real_time/event_handlers/group_spec.rb +2 -2
- data/spec/slack/real_time/event_handlers/im_spec.rb +7 -7
- data/spec/slack/real_time/event_handlers/user_spec.rb +2 -2
- data/spec/slack/real_time/rtm_connect_spec.rb +1 -1
- data/spec/slack/real_time/rtm_start_spec.rb +1 -1
- data/spec/slack/real_time/store_spec.rb +2 -2
- data/spec/slack/slack_spec.rb +7 -5
- data/spec/slack/version_spec.rb +1 -1
- data/spec/slack/web/api/endpoints/admin_apps_requests_spec.rb +5 -0
- data/spec/slack/web/api/endpoints/admin_apps_spec.rb +5 -0
- data/spec/slack/web/api/endpoints/admin_auth_policy_spec.rb +35 -0
- data/spec/slack/web/api/endpoints/admin_conversations_spec.rb +9 -9
- data/spec/slack/web/api/endpoints/admin_teams_settings_spec.rb +1 -1
- data/spec/slack/web/api/endpoints/admin_usergroups_spec.rb +6 -6
- data/spec/slack/web/api/endpoints/admin_users_session_spec.rb +22 -2
- data/spec/slack/web/api/endpoints/admin_users_spec.rb +8 -8
- data/spec/slack/web/api/endpoints/admin_users_unsupportedVersions_spec.rb +8 -0
- data/spec/slack/web/api/endpoints/apps_manifest_spec.rb +36 -0
- data/spec/slack/web/api/endpoints/apps_spec.rb +2 -2
- data/spec/slack/web/api/endpoints/bookmarks_spec.rb +40 -0
- data/spec/slack/web/api/endpoints/calls_participants_spec.rb +4 -4
- data/spec/slack/web/api/endpoints/calls_spec.rb +2 -2
- data/spec/slack/web/api/endpoints/custom_specs/auth_spec.rb +4 -6
- data/spec/slack/web/api/endpoints/custom_specs/chat_spec.rb +28 -16
- data/spec/slack/web/api/endpoints/custom_specs/conversations_spec.rb +13 -0
- data/spec/slack/web/api/endpoints/custom_specs/dialog_spec.rb +4 -2
- data/spec/slack/web/api/endpoints/custom_specs/users_spec.rb +2 -2
- data/spec/slack/web/api/endpoints/custom_specs/views_spec.rb +22 -14
- data/spec/slack/web/api/endpoints/dnd_spec.rb +0 -5
- data/spec/slack/web/api/endpoints/files_comments_spec.rb +2 -2
- data/spec/slack/web/api/endpoints/files_remote_spec.rb +3 -3
- data/spec/slack/web/api/endpoints/oauth_spec.rb +0 -11
- data/spec/slack/web/api/endpoints/oauth_v2_spec.rb +6 -3
- data/spec/slack/web/api/endpoints/{apps_permissions_scopes_spec.rb → openid_connect_spec.rb} +1 -1
- data/spec/slack/web/api/endpoints/reactions_spec.rb +3 -3
- data/spec/slack/web/api/endpoints/reminders_spec.rb +2 -2
- data/spec/slack/web/api/endpoints/{apps_permissions_resources_spec.rb → team_billing_spec.rb} +1 -1
- data/spec/slack/web/api/endpoints/team_preferences_spec.rb +8 -0
- data/spec/slack/web/api/endpoints/tooling_tokens_spec.rb +13 -0
- data/spec/slack/web/api/endpoints/usergroups_users_spec.rb +2 -2
- data/spec/slack/web/api/error_spec.rb +5 -7
- data/spec/slack/web/api/errors/slack_error_spec.rb +21 -26
- data/spec/slack/web/api/mixins/conversations_list_spec.rb +1 -1
- data/spec/slack/web/api/pagination/cursor_spec.rb +8 -10
- data/spec/slack/web/client_spec.rb +46 -32
- data/spec/slack/web/faraday/request_spec.rb +80 -0
- data/spec/slack/web/faraday/response/raise_error_spec.rb +2 -1
- data/spec/spec_helper.rb +1 -1
- data/spec/support/real_time/connected_client.rb +2 -8
- data/spec/support/vcr.rb +33 -2
- metadata +50 -297
- data/.travis.yml +0 -28
- data/lib/slack/web/api/errors/internal_error.rb +0 -14
- data/lib/slack/web/api/mixins/channels.id.json +0 -20
- data/lib/slack/web/api/mixins/channels.id.rb +0 -25
- data/lib/slack/web/api/mixins/groups.id.json +0 -20
- data/lib/slack/web/api/mixins/groups.id.rb +0 -25
- data/spec/fixtures/slack/web/503_error.yml +0 -14
- data/spec/fixtures/slack/web/channels_info.yml +0 -139
- data/spec/fixtures/slack/web/groups_info.yml +0 -43
- data/spec/slack/web/api/endpoints/admin_conversations_whitelist_spec.rb +0 -32
- data/spec/slack/web/api/endpoints/apps_permissions_spec.rb +0 -16
- data/spec/slack/web/api/endpoints/apps_permissions_users_spec.rb +0 -19
- data/spec/slack/web/api/endpoints/conversations_spec.rb +0 -109
- data/spec/slack/web/api/endpoints/custom_specs/channels_spec.rb +0 -13
- data/spec/slack/web/api/endpoints/custom_specs/groups_spec.rb +0 -13
- data/spec/slack/web/api/endpoints/im_spec.rb +0 -39
- data/spec/slack/web/api/endpoints/mpim_spec.rb +0 -39
- data/spec/slack/web/api/endpoints/views_spec.rb +0 -29
- data/spec/slack/web/api/mixins/channels_spec.rb +0 -43
- data/spec/slack/web/api/mixins/groups_spec.rb +0 -43
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 243d21fccb29fbddcaac69727c60a1a947e5b7e3a53136f96953099539141ae6
|
|
4
|
+
data.tar.gz: dcfeabe229a37247b94e4e030a5abf675792835b061a7917afdfcbd9827f4228
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5891098e3cb0bb938241157c779c0a8cdac0e18edac21d0251dd80949c5d70f21cc3429773138fc0092e29937f4f525d51f9975a4aa0f059a7cfbcb78a3c3723
|
|
7
|
+
data.tar.gz: 05a88513dad67cf2dc50dd2580a50588d99413801498fc959c495234955c419b5a861c86b8c98bef49ea50dfabb346aa26356c406a521f084555cece9249d364
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
name: PR Linter
|
|
2
|
+
on: [pull_request]
|
|
3
|
+
jobs:
|
|
4
|
+
danger:
|
|
5
|
+
runs-on: ubuntu-latest
|
|
6
|
+
env:
|
|
7
|
+
BUNDLE_GEMFILE: ${{ github.workspace }}/Gemfile.danger
|
|
8
|
+
steps:
|
|
9
|
+
- uses: actions/checkout@v2
|
|
10
|
+
with:
|
|
11
|
+
fetch-depth: 0
|
|
12
|
+
- uses: ruby/setup-ruby@v1
|
|
13
|
+
with:
|
|
14
|
+
ruby-version: 2.6
|
|
15
|
+
bundler-cache: true
|
|
16
|
+
- run: |
|
|
17
|
+
# the personal token is public, this is ok, base64 encode to avoid tripping Github
|
|
18
|
+
TOKEN=$(echo -n NWY1ZmM5MzEyMzNlYWY4OTZiOGU3MmI3MWQ3Mzk0MzgxMWE4OGVmYwo= | base64 --decode)
|
|
19
|
+
DANGER_GITHUB_API_TOKEN=$TOKEN bundle exec danger --verbose
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
name: Integration Tests
|
|
2
|
+
on: [push]
|
|
3
|
+
jobs:
|
|
4
|
+
test:
|
|
5
|
+
runs-on: ubuntu-latest
|
|
6
|
+
strategy:
|
|
7
|
+
matrix:
|
|
8
|
+
entry:
|
|
9
|
+
- { ruby: 2.7.1, concurrency: async-websocket }
|
|
10
|
+
name: test (ruby=${{ matrix.entry.ruby }}, concurrency=${{ matrix.entry.concurrency || 'none' }})
|
|
11
|
+
steps:
|
|
12
|
+
- uses: actions/checkout@v2
|
|
13
|
+
- name: Install Ruby
|
|
14
|
+
uses: ruby/setup-ruby@v1
|
|
15
|
+
with:
|
|
16
|
+
ruby-version: ${{ matrix.entry.ruby }}
|
|
17
|
+
- name: Run Tests
|
|
18
|
+
env:
|
|
19
|
+
CONCURRENCY: ${{ matrix.entry.concurrency }}
|
|
20
|
+
SLACK_API_TOKEN: ${{ secrets.SLACK_API_TOKEN }}
|
|
21
|
+
RACK_ENV: test
|
|
22
|
+
run: |
|
|
23
|
+
bundle install
|
|
24
|
+
bundle exec rake
|
|
25
|
+
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
name: Tests
|
|
2
|
+
on: [push, pull_request]
|
|
3
|
+
jobs:
|
|
4
|
+
test:
|
|
5
|
+
runs-on: ubuntu-latest
|
|
6
|
+
strategy:
|
|
7
|
+
matrix:
|
|
8
|
+
entry:
|
|
9
|
+
- { ruby: "2.7" }
|
|
10
|
+
- { ruby: "2.7", concurrency: async-websocket }
|
|
11
|
+
- { ruby: "3.0" }
|
|
12
|
+
- { ruby: "3.1" }
|
|
13
|
+
- { ruby: ruby-head, ignore: true }
|
|
14
|
+
- { ruby: jruby-head, ignore: true }
|
|
15
|
+
name: test (ruby=${{ matrix.entry.ruby }}, concurrency=${{ matrix.entry.concurrency || 'none' }})
|
|
16
|
+
steps:
|
|
17
|
+
- uses: actions/checkout@v2
|
|
18
|
+
- name: Install Ruby
|
|
19
|
+
uses: ruby/setup-ruby@v1
|
|
20
|
+
with:
|
|
21
|
+
ruby-version: ${{ matrix.entry.ruby }}
|
|
22
|
+
- name: Set Concurrency
|
|
23
|
+
run: |
|
|
24
|
+
if [[ ! -z "${{ matrix.entry.concurrency }}" ]]; then
|
|
25
|
+
echo "Setting concurrency to ${{ matrix.entry.concurrency }}."
|
|
26
|
+
echo "CONCURRENCY=${{ matrix.entry.concurrency }}" >> $GITHUB_ENV
|
|
27
|
+
fi
|
|
28
|
+
- name: Run Tests
|
|
29
|
+
continue-on-error: ${{ matrix.entry.ignore || false }}
|
|
30
|
+
env:
|
|
31
|
+
RACK_ENV: test
|
|
32
|
+
run: |
|
|
33
|
+
bundle install
|
|
34
|
+
bundle exec rake
|
data/.gitignore
CHANGED
data/.rubocop.yml
CHANGED
|
@@ -2,9 +2,12 @@ inherit_from: .rubocop_todo.yml
|
|
|
2
2
|
|
|
3
3
|
require:
|
|
4
4
|
- rubocop-performance
|
|
5
|
+
- rubocop-rake
|
|
5
6
|
- rubocop-rspec
|
|
6
7
|
|
|
7
8
|
AllCops:
|
|
9
|
+
TargetRubyVersion: 2.7
|
|
10
|
+
NewCops: enable
|
|
8
11
|
DisplayCopNames: true
|
|
9
12
|
Exclude:
|
|
10
13
|
- bin/**/*
|
|
@@ -32,6 +35,9 @@ Style/Documentation:
|
|
|
32
35
|
Style/ModuleFunction:
|
|
33
36
|
Enabled: false
|
|
34
37
|
|
|
38
|
+
RSpec/InstanceVariable:
|
|
39
|
+
Enabled: false
|
|
40
|
+
|
|
35
41
|
Naming/FileName:
|
|
36
42
|
Exclude:
|
|
37
43
|
- lib/slack-ruby-client.rb # Required to match gemspec name
|
data/.rubocop_todo.yml
CHANGED
|
@@ -1,122 +1,168 @@
|
|
|
1
1
|
# This configuration was generated by
|
|
2
2
|
# `rubocop --auto-gen-config`
|
|
3
|
-
# on
|
|
3
|
+
# on 2022-05-04 06:11:49 UTC using RuboCop version 1.26.1.
|
|
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
9
|
# Offense count: 1
|
|
10
|
-
#
|
|
10
|
+
# Configuration parameters: AllowedMethods.
|
|
11
|
+
# AllowedMethods: enums
|
|
12
|
+
Lint/ConstantDefinitionInBlock:
|
|
13
|
+
Exclude:
|
|
14
|
+
- 'lib/tasks/real_time.rake'
|
|
15
|
+
|
|
16
|
+
# Offense count: 1
|
|
17
|
+
# Configuration parameters: AllowComments, AllowEmptyLambdas.
|
|
18
|
+
Lint/EmptyBlock:
|
|
19
|
+
Exclude:
|
|
20
|
+
- 'spec/support/real_time/concurrency/mock.rb'
|
|
21
|
+
|
|
22
|
+
# Offense count: 1
|
|
23
|
+
# Configuration parameters: AllowComments.
|
|
24
|
+
Lint/EmptyClass:
|
|
25
|
+
Exclude:
|
|
26
|
+
- 'spec/support/real_time/concurrency/mock.rb'
|
|
27
|
+
|
|
28
|
+
# Offense count: 2
|
|
29
|
+
Lint/MissingSuper:
|
|
30
|
+
Exclude:
|
|
31
|
+
- 'lib/slack/real_time/stores/starter.rb'
|
|
32
|
+
- 'lib/slack/real_time/stores/store.rb'
|
|
33
|
+
|
|
34
|
+
# Offense count: 1
|
|
35
|
+
# This cop supports unsafe auto-correction (--auto-correct-all).
|
|
11
36
|
Lint/NonDeterministicRequireOrder:
|
|
12
37
|
Exclude:
|
|
13
38
|
- 'spec/spec_helper.rb'
|
|
14
39
|
|
|
15
40
|
# Offense count: 2
|
|
16
|
-
#
|
|
41
|
+
# This cop supports safe auto-correction (--auto-correct).
|
|
17
42
|
Lint/RedundantCopDisableDirective:
|
|
18
43
|
Exclude:
|
|
19
44
|
- 'lib/slack-ruby-client.rb'
|
|
20
45
|
|
|
21
|
-
# Offense count:
|
|
22
|
-
# Configuration parameters: IgnoredMethods.
|
|
46
|
+
# Offense count: 12
|
|
47
|
+
# Configuration parameters: IgnoredMethods, CountRepeatedAttributes.
|
|
23
48
|
Metrics/AbcSize:
|
|
24
|
-
Max:
|
|
49
|
+
Max: 48
|
|
25
50
|
|
|
26
|
-
# Offense count:
|
|
51
|
+
# Offense count: 4
|
|
27
52
|
# Configuration parameters: IgnoredMethods.
|
|
28
53
|
Metrics/CyclomaticComplexity:
|
|
29
|
-
Max:
|
|
54
|
+
Max: 14
|
|
30
55
|
|
|
31
|
-
# Offense count:
|
|
32
|
-
# Configuration parameters: CountComments, ExcludedMethods.
|
|
56
|
+
# Offense count: 12
|
|
57
|
+
# Configuration parameters: CountComments, CountAsOne, ExcludedMethods, IgnoredMethods.
|
|
33
58
|
Metrics/MethodLength:
|
|
34
59
|
Max: 32
|
|
35
60
|
|
|
36
61
|
# Offense count: 1
|
|
37
|
-
# Configuration parameters: CountKeywordArgs.
|
|
62
|
+
# Configuration parameters: CountKeywordArgs, MaxOptionalParameters.
|
|
38
63
|
Metrics/ParameterLists:
|
|
39
64
|
Max: 6
|
|
40
65
|
|
|
41
|
-
# Offense count:
|
|
66
|
+
# Offense count: 2
|
|
42
67
|
# Configuration parameters: IgnoredMethods.
|
|
43
68
|
Metrics/PerceivedComplexity:
|
|
44
|
-
Max:
|
|
69
|
+
Max: 16
|
|
70
|
+
|
|
71
|
+
# Offense count: 1
|
|
72
|
+
# Configuration parameters: MinSize.
|
|
73
|
+
Performance/CollectionLiteralInLoop:
|
|
74
|
+
Exclude:
|
|
75
|
+
- 'lib/tasks/real_time.rake'
|
|
45
76
|
|
|
46
77
|
# Offense count: 2
|
|
47
|
-
#
|
|
78
|
+
# This cop supports safe auto-correction (--auto-correct).
|
|
48
79
|
Performance/RegexpMatch:
|
|
49
80
|
Exclude:
|
|
50
81
|
- 'lib/tasks/web.rake'
|
|
51
82
|
|
|
52
|
-
# Offense count:
|
|
53
|
-
#
|
|
83
|
+
# Offense count: 3
|
|
84
|
+
# This cop supports safe auto-correction (--auto-correct).
|
|
85
|
+
Performance/StringInclude:
|
|
86
|
+
Exclude:
|
|
87
|
+
- 'lib/tasks/web.rake'
|
|
88
|
+
|
|
89
|
+
# Offense count: 3
|
|
90
|
+
# This cop supports safe auto-correction (--auto-correct).
|
|
54
91
|
RSpec/ContextMethod:
|
|
55
92
|
Exclude:
|
|
56
93
|
- '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
94
|
- 'spec/slack/web/api/mixins/users_spec.rb'
|
|
60
95
|
|
|
61
|
-
# Offense count:
|
|
96
|
+
# Offense count: 77
|
|
62
97
|
# Configuration parameters: Prefixes.
|
|
63
98
|
# Prefixes: when, with, without
|
|
64
99
|
RSpec/ContextWording:
|
|
65
100
|
Enabled: false
|
|
66
101
|
|
|
67
|
-
# Offense count:
|
|
68
|
-
#
|
|
102
|
+
# Offense count: 127
|
|
103
|
+
# This cop supports safe auto-correction (--auto-correct).
|
|
69
104
|
# Configuration parameters: AllowConsecutiveOneLiners.
|
|
70
105
|
RSpec/EmptyLineAfterExample:
|
|
71
106
|
Enabled: false
|
|
72
107
|
|
|
73
|
-
# Offense count:
|
|
74
|
-
# Configuration parameters:
|
|
108
|
+
# Offense count: 64
|
|
109
|
+
# Configuration parameters: CountAsOne.
|
|
75
110
|
RSpec/ExampleLength:
|
|
76
|
-
|
|
111
|
+
Max: 18
|
|
77
112
|
|
|
78
|
-
# Offense count:
|
|
79
|
-
# Configuration parameters: CustomTransform, IgnoreMethods.
|
|
113
|
+
# Offense count: 17
|
|
114
|
+
# Configuration parameters: Include, CustomTransform, IgnoreMethods, SpecSuffixOnly.
|
|
115
|
+
# Include: **/*_spec*rb*, **/spec/**/*
|
|
80
116
|
RSpec/FilePath:
|
|
81
117
|
Enabled: false
|
|
82
118
|
|
|
83
|
-
# Offense count:
|
|
84
|
-
# Configuration parameters: AssignmentOnly.
|
|
85
|
-
RSpec/InstanceVariable:
|
|
86
|
-
Exclude:
|
|
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
|
|
119
|
+
# Offense count: 65
|
|
92
120
|
# Configuration parameters: .
|
|
93
121
|
# SupportedStyles: have_received, receive
|
|
94
122
|
RSpec/MessageSpies:
|
|
95
123
|
EnforcedStyle: receive
|
|
96
124
|
|
|
97
|
-
# Offense count:
|
|
125
|
+
# Offense count: 96
|
|
98
126
|
RSpec/MultipleExpectations:
|
|
99
127
|
Max: 5
|
|
100
128
|
|
|
101
|
-
# Offense count:
|
|
129
|
+
# Offense count: 5
|
|
130
|
+
# Configuration parameters: AllowSubject.
|
|
131
|
+
RSpec/MultipleMemoizedHelpers:
|
|
132
|
+
Max: 9
|
|
133
|
+
|
|
134
|
+
# Offense count: 3
|
|
102
135
|
# Configuration parameters: IgnoreSharedExamples.
|
|
103
136
|
RSpec/NamedSubject:
|
|
104
137
|
Exclude:
|
|
105
138
|
- 'spec/slack/web/api/mixins/conversations_list_spec.rb'
|
|
106
139
|
|
|
107
|
-
# Offense count:
|
|
140
|
+
# Offense count: 50
|
|
108
141
|
RSpec/NestedGroups:
|
|
109
142
|
Max: 6
|
|
110
143
|
|
|
111
|
-
# Offense count:
|
|
144
|
+
# Offense count: 6
|
|
145
|
+
RSpec/StubbedMock:
|
|
146
|
+
Exclude:
|
|
147
|
+
- 'spec/slack/real_time/client_spec.rb'
|
|
148
|
+
- 'spec/slack/real_time/event_handlers/event_handlers_spec.rb'
|
|
149
|
+
- 'spec/slack/web/api/pagination/cursor_spec.rb'
|
|
150
|
+
- 'spec/slack/web/client_spec.rb'
|
|
151
|
+
|
|
152
|
+
# Offense count: 2
|
|
112
153
|
RSpec/SubjectStub:
|
|
113
154
|
Exclude:
|
|
114
|
-
- 'spec/slack/web/api/mixins/channels_spec.rb'
|
|
115
155
|
- 'spec/slack/web/api/mixins/conversations_spec.rb'
|
|
116
|
-
- 'spec/slack/web/api/mixins/groups_spec.rb'
|
|
117
156
|
- 'spec/slack/web/api/mixins/users_spec.rb'
|
|
118
157
|
|
|
119
|
-
# Offense count:
|
|
158
|
+
# Offense count: 4
|
|
159
|
+
# This cop supports safe auto-correction (--auto-correct).
|
|
160
|
+
# Configuration parameters: .
|
|
161
|
+
# SupportedStyles: constant, string
|
|
162
|
+
RSpec/VerifiedDoubleReference:
|
|
163
|
+
EnforcedStyle: string
|
|
164
|
+
|
|
165
|
+
# Offense count: 12
|
|
120
166
|
# Configuration parameters: IgnoreNameless, IgnoreSymbolicNames.
|
|
121
167
|
RSpec/VerifiedDoubles:
|
|
122
168
|
Exclude:
|
|
@@ -125,8 +171,56 @@ RSpec/VerifiedDoubles:
|
|
|
125
171
|
- 'spec/slack/web/faraday/response/raise_error_spec.rb'
|
|
126
172
|
- 'spec/support/real_time/connected_client.rb'
|
|
127
173
|
|
|
174
|
+
# Offense count: 1
|
|
175
|
+
# This cop supports safe auto-correction (--auto-correct).
|
|
176
|
+
Rake/Desc:
|
|
177
|
+
Exclude:
|
|
178
|
+
- 'lib/tasks/git.rake'
|
|
179
|
+
|
|
128
180
|
# Offense count: 4
|
|
129
|
-
# Configuration parameters: .
|
|
181
|
+
# Configuration parameters: MaxUnannotatedPlaceholdersAllowed, IgnoredMethods.
|
|
130
182
|
# SupportedStyles: annotated, template, unannotated
|
|
131
183
|
Style/FormatStringToken:
|
|
132
184
|
EnforcedStyle: unannotated
|
|
185
|
+
|
|
186
|
+
# Offense count: 6
|
|
187
|
+
# This cop supports safe auto-correction (--auto-correct).
|
|
188
|
+
Style/GlobalStdStream:
|
|
189
|
+
Exclude:
|
|
190
|
+
- 'lib/slack/logger.rb'
|
|
191
|
+
- 'lib/tasks/real_time.rake'
|
|
192
|
+
- 'spec/integration/integration_spec.rb'
|
|
193
|
+
- 'spec/slack/web/client_spec.rb'
|
|
194
|
+
|
|
195
|
+
# Offense count: 1
|
|
196
|
+
# This cop supports safe auto-correction (--auto-correct).
|
|
197
|
+
Style/MultilineTernaryOperator:
|
|
198
|
+
Exclude:
|
|
199
|
+
- 'spec/support/vcr.rb'
|
|
200
|
+
|
|
201
|
+
# Offense count: 3
|
|
202
|
+
Style/OpenStructUse:
|
|
203
|
+
Exclude:
|
|
204
|
+
- 'spec/slack/web/api/endpoints/custom_specs/chat_spec.rb'
|
|
205
|
+
- 'spec/slack/web/api/pagination/cursor_spec.rb'
|
|
206
|
+
- 'spec/slack/web/faraday/response/raise_error_spec.rb'
|
|
207
|
+
|
|
208
|
+
# Offense count: 1
|
|
209
|
+
# Configuration parameters: AllowedMethods.
|
|
210
|
+
# AllowedMethods: respond_to_missing?
|
|
211
|
+
Style/OptionalBooleanParameter:
|
|
212
|
+
Exclude:
|
|
213
|
+
- 'spec/support/queue_with_timeout.rb'
|
|
214
|
+
|
|
215
|
+
# Offense count: 1
|
|
216
|
+
# This cop supports unsafe auto-correction (--auto-correct-all).
|
|
217
|
+
Style/SlicingWithRange:
|
|
218
|
+
Exclude:
|
|
219
|
+
- 'lib/slack/web/api/mixins/ids.id.rb'
|
|
220
|
+
|
|
221
|
+
# Offense count: 1
|
|
222
|
+
# This cop supports unsafe auto-correction (--auto-correct-all).
|
|
223
|
+
# Configuration parameters: Mode.
|
|
224
|
+
Style/StringConcatenation:
|
|
225
|
+
Exclude:
|
|
226
|
+
- 'lib/tasks/real_time.rake'
|
data/CHANGELOG.md
CHANGED
|
@@ -1,9 +1,40 @@
|
|
|
1
|
+
### 1.1.0 (2022/06/05)
|
|
2
|
+
|
|
3
|
+
* [#400](https://github.com/slack-ruby/slack-ruby-client/pull/400): Replace Travis-CI with GitHub Actions - [@dblock](https://github.com/dblock).
|
|
4
|
+
* [#401](https://github.com/slack-ruby/slack-ruby-client/pull/401): Upgraded RuboCop to 1.26.0 - [@dblock](https://github.com/dblock).
|
|
5
|
+
* [#401](https://github.com/slack-ruby/slack-ruby-client/pull/401): Added support for Ruby 3.1.1 - [@dblock](https://github.com/dblock).
|
|
6
|
+
* [#405](https://github.com/slack-ruby/slack-ruby-client/pull/405): Added `admin_apps_requests_cancel`, `admin_users_unsupportedVersions_export`, `bookmarks_add`, `bookmarks_edit`, `bookmarks_list`, `bookmarks_remove` - [@dblock](https://github.com/dblock).
|
|
7
|
+
* [#404](https://github.com/slack-ruby/slack-ruby-client/pull/404): Update `chat_update` method not to raise error with parameter which contains only `reply_broadcast` - [@colorbox](https://github.com/colorbox).
|
|
8
|
+
* [#406](https://github.com/slack-ruby/slack-ruby-client/pull/406): Update Faraday to `>= 2.0` - [@schinery](https://github.com/slack-ruby/slack-ruby-client/pull/406).
|
|
9
|
+
* [#406](https://github.com/slack-ruby/slack-ruby-client/pull/406): Removed support for Ruby 2.5 and 2.6 - [@schinery](https://github.com/slack-ruby/slack-ruby-client/pull/406).
|
|
10
|
+
* [#406](https://github.com/slack-ruby/slack-ruby-client/pull/406): Test against latest Ruby 2.7, 3.0 and 3.1 - [@schinery](https://github.com/slack-ruby/slack-ruby-client/pull/406).
|
|
11
|
+
* [#406](https://github.com/slack-ruby/slack-ruby-client/pull/406): Upgraded RuboCop to 1.26.1 and lock to version - [@schinery](https://github.com/slack-ruby/slack-ruby-client/pull/406).
|
|
12
|
+
* [#406](https://github.com/slack-ruby/slack-ruby-client/pull/406): Updated Danger PR Linter GitHub action to use separate `Gemfile` - [@schinery](https://github.com/slack-ruby/slack-ruby-client/pull/406).
|
|
13
|
+
|
|
14
|
+
### 1.0.0 (2021/12/21)
|
|
15
|
+
|
|
16
|
+
* [#394](https://github.com/slack-ruby/slack-ruby-client/pull/394): Added support for Ruby 3.0 - [@dblock](https://github.com/dblock).
|
|
17
|
+
* [#394](https://github.com/slack-ruby/slack-ruby-client/pull/394): Upgraded to RuboCop 0.93.1 - [@dblock](https://github.com/dblock).
|
|
18
|
+
* [#393](https://github.com/slack-ruby/slack-ruby-client/pull/393): Removed deprecated `oauth_token`, and leftover traces of `channels` and `groups` APIs - [@dblock](https://github.com/dblock).
|
|
19
|
+
* [#393](https://github.com/slack-ruby/slack-ruby-client/pull/393): Added `admin_auth_policy_assignEntities`, `admin_auth_policy_getEntities` and `admin_auth_policy_removeEntities` `admin_conversations_disconnectShared`, `admin_users_session_clearSettings`, `admin_users_session_getSettings`, `admin_users_session_resetBulk`, `admin_users_session_setSettings`, `apps_manifest_create`, `apps_manifest_delete`, `apps_manifest_export`, `apps_manifest_update`, `apps_manifest_validate`, `conversations_acceptSharedInvite`, `conversations_approveSharedInvite`, `conversations_declineSharedInvite`, `conversations_inviteShared`, `conversations_listConnectInvites`, `oauth_v2_exchange`, `openid_connect_token`, `openid_connect_userInfo`, `team_billing_info`, `team_preferences_list`, `tooling_tokens_rotate` - [@dblock](https://github.com/dblock).
|
|
20
|
+
* [#386](https://github.com/slack-ruby/slack-ruby-client/pull/386): Gemspec: drop unused `test_files` directive - [@olleolleolle](https://github.com/olleolleolle).
|
|
21
|
+
* [#380](https://github.com/slack-ruby/slack-ruby-client/pull/380): Updates to server error classes and hierarchy - [@jmanian](https://github.com/jmanian).
|
|
22
|
+
* [#387](https://github.com/slack-ruby/slack-ruby-client/pull/387): Send token in Authorization header - [@chrisbloom7](https://github.com/chrisbloom7).
|
|
23
|
+
|
|
24
|
+
### 0.17.0 (2021/03/07)
|
|
25
|
+
|
|
26
|
+
* [#370](https://github.com/slack-ruby/slack-ruby-client/pull/370): Removed deprecated `im_`, `mpim_`, `channels_`, and `groups_` methods - [@dblock](https://github.com/dblock).
|
|
27
|
+
* [#368](https://github.com/slack-ruby/slack-ruby-client/pull/368): Removed `admin_conversations_whitelist` and `admin_conversations_disconnectShared` - [@dblock](https://github.com/dblock).
|
|
28
|
+
* [#359](https://github.com/slack-ruby/slack-ruby-client/pull/359): Handle non-JSON 500 errors - [@agrobbin](https://github.com/agrobbin).
|
|
29
|
+
* [#360](https://github.com/slack-ruby/slack-ruby-client/pull/360): Remove faye-websocket from the concurrency detection error message - [@dblock](https://github.com/dblock).
|
|
30
|
+
* [#369](https://github.com/slack-ruby/slack-ruby-client/pull/369): Support rack requests in `Slack::Events::Request` - [@wedgex](https://github.com/wedgex).
|
|
31
|
+
|
|
1
32
|
### 0.16.0 (2021/01/24)
|
|
2
33
|
|
|
3
|
-
* [#350](https://github.com/slack-ruby/slack-ruby-client/pull/350): Handle server errors such as
|
|
34
|
+
* [#350](https://github.com/slack-ruby/slack-ruby-client/pull/350): Handle server errors such as timeouts & non-JSON responses - [@ojab](https://github.com/ojab).
|
|
4
35
|
* [#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 `
|
|
36
|
+
* [#355](https://github.com/slack-ruby/slack-ruby-client/pull/355), [#357](https://github.com/slack-ruby/slack-ruby-client/pull/357): Removed `celluloid-io` and `faye-websocket` support - [@wasabigeek](https://github.com/wasabigeek).
|
|
37
|
+
* [#356](https://github.com/slack-ruby/slack-ruby-client/pull/356): Added `admin_apps_clearResolution`, `admin_conversations_getCustomRetention`, `admin_conversations_removeCustomRetention`, `admin_conversations_setCustomRetention`, `admin_users_session_list` and `auth_teams_list` endpoints - [@dblock](https://github.com/dblock).
|
|
7
38
|
* [#348](https://github.com/slack-ruby/slack-ruby-client/pull/348): Added `admin_conversations_archive`, `admin_conversations_convertToPrivate`, `admin_conversations_create`, `admin_conversations_delete`, `admin_conversations_disconnectShared`, `admin_conversations_getConversationPrefs`, `admin_conversations_getTeams`, `admin_conversations_invite`, `admin_conversations_rename`, `admin_conversations_search`, `admin_conversations_setConversationPrefs`, `admin_conversations_unarchive`, `admin_conversations_ekm_listOriginalConnectedChannelInfo`, `admin_users_session_invalidate`, `apps_event_authorizations_list`, `conversations_mark`, `workflows_stepCompleted`, `workflows_stepFailed` and `workflows_updateStep` endpoints - [@wasabigeek](https://github.com/wasabigeek).
|
|
8
39
|
|
|
9
40
|
### 0.15.1 (2020/9/3)
|
data/CONTRIBUTING.md
CHANGED
|
@@ -29,9 +29,9 @@ bundle exec rake
|
|
|
29
29
|
|
|
30
30
|
Sign up for Slack, create a private slack group for yourself.
|
|
31
31
|
|
|
32
|
-
Create a new
|
|
32
|
+
Create a new App under [https://api.slack.com/apps](https://api.slack.com/apps).
|
|
33
33
|
|
|
34
|
-

|
|
35
35
|
|
|
36
36
|
On the next screen, note the API token.
|
|
37
37
|
|
|
@@ -68,7 +68,7 @@ Make sure that `bundle exec rake` completes without errors.
|
|
|
68
68
|
Slack Web API is updated from https://github.com/slack-ruby/slack-api-ref, a maintained, machine-readable version of Slack API Docs, generated by scraping [api.slack.com](https://api.slack.com). To update the Web API from the latest definition run the following Rake task.
|
|
69
69
|
|
|
70
70
|
```
|
|
71
|
-
rake slack:api:update
|
|
71
|
+
bundle exec rake slack:api:update
|
|
72
72
|
```
|
|
73
73
|
|
|
74
74
|
#### Patching Slack Web API
|
|
@@ -157,7 +157,7 @@ git push origin my-feature-branch -f
|
|
|
157
157
|
|
|
158
158
|
### Check on Your Pull Request
|
|
159
159
|
|
|
160
|
-
Go back to your pull request after a few minutes and see whether it passed muster with
|
|
160
|
+
Go back to your pull request after a few minutes and see whether it passed muster with CI. Everything should look green, otherwise fix issues and amend your commit as described above.
|
|
161
161
|
|
|
162
162
|
### Be Patient
|
|
163
163
|
|
data/Gemfile
CHANGED
|
@@ -13,5 +13,22 @@ if ENV.key?('CONCURRENCY')
|
|
|
13
13
|
end
|
|
14
14
|
|
|
15
15
|
group :test do
|
|
16
|
-
gem '
|
|
16
|
+
gem 'activesupport'
|
|
17
|
+
gem 'erubis'
|
|
18
|
+
gem 'faraday-typhoeus'
|
|
19
|
+
gem 'json-schema'
|
|
20
|
+
gem 'rake', '~> 13'
|
|
21
|
+
gem 'rspec'
|
|
22
|
+
gem 'rubocop', '1.26.1' # Lock to specific version to avoid breaking cops/changes
|
|
23
|
+
gem 'rubocop-performance'
|
|
24
|
+
gem 'rubocop-rake'
|
|
25
|
+
gem 'rubocop-rspec'
|
|
26
|
+
gem 'timecop'
|
|
27
|
+
if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('3.0.0')
|
|
28
|
+
# https://github.com/vcr/vcr/pull/907
|
|
29
|
+
gem 'vcr', github: 'vcr/vcr', ref: '7ac8292c'
|
|
30
|
+
else
|
|
31
|
+
gem 'vcr'
|
|
32
|
+
end
|
|
33
|
+
gem 'webmock'
|
|
17
34
|
end
|
data/Gemfile.danger
ADDED
data/LICENSE.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
MIT License
|
|
2
2
|
|
|
3
|
-
Copyright (c) 2015-
|
|
3
|
+
Copyright (c) 2015-2021 Daniel Doubrovkine, Artsy and Contributors
|
|
4
4
|
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining
|
|
6
6
|
a copy of this software and associated documentation files (the
|
data/README.md
CHANGED
|
@@ -2,14 +2,15 @@ Slack Ruby Client
|
|
|
2
2
|
=================
|
|
3
3
|
|
|
4
4
|
[](http://badge.fury.io/rb/slack-ruby-client)
|
|
5
|
-
[](https://github.com/slack-ruby/slack-ruby-client/actions/workflows/integtest.yml)
|
|
6
|
+
[](https://github.com/slack-ruby/slack-ruby-client/actions/workflows/test.yml)
|
|
6
7
|
[](https://codeclimate.com/github/slack-ruby/slack-ruby-client)
|
|
7
8
|
|
|
8
9
|
A Ruby client for the Slack [Web](https://api.slack.com/web), [RealTime Messaging](https://api.slack.com/rtm) and [Events](https://api.slack.com/events-api) APIs. Comes with a handy command-line client, too. If you are not familiar with these concepts, you might want to watch [this video](http://code.dblock.org/2016/03/11/your-first-slack-bot-service-video.html).
|
|
9
10
|
|
|
10
11
|

|
|
11
12
|
|
|
12
|
-
|
|
13
|
+
# Table of Contents
|
|
13
14
|
|
|
14
15
|
- [Useful to Me?](#useful-to-me)
|
|
15
16
|
- [Stable Release](#stable-release)
|
|
@@ -70,7 +71,7 @@ A Ruby client for the Slack [Web](https://api.slack.com/web), [RealTime Messagin
|
|
|
70
71
|
|
|
71
72
|
## Stable Release
|
|
72
73
|
|
|
73
|
-
You're reading the documentation for the **stable** release of slack-ruby-client,
|
|
74
|
+
You're reading the documentation for the **stable** release of slack-ruby-client, 1.1.0. See [UPGRADING](UPGRADING.md) when upgrading from an older version.
|
|
74
75
|
|
|
75
76
|
## Installation
|
|
76
77
|
|
|
@@ -150,10 +151,10 @@ See a fully working example in [examples/hi_web](examples/hi_web/hi.rb).
|
|
|
150
151
|
|
|
151
152
|
##### List Channels
|
|
152
153
|
|
|
153
|
-
List channels with [
|
|
154
|
+
List channels with [conversations_list](https://api.slack.com/methods/conversations.list).
|
|
154
155
|
|
|
155
156
|
```ruby
|
|
156
|
-
channels = client.
|
|
157
|
+
channels = client.conversations_list.channels
|
|
157
158
|
|
|
158
159
|
general_channel = channels.detect { |c| c.name == 'general' }
|
|
159
160
|
```
|
|
@@ -175,14 +176,14 @@ client.files_upload(
|
|
|
175
176
|
|
|
176
177
|
##### Get Channel Info
|
|
177
178
|
|
|
178
|
-
You can use a channel ID or name (prefixed with `#`) in all functions that take a `:channel` argument. Lookup by name is not supported by the Slack API and the `channels_id` method called invokes `
|
|
179
|
+
You can use a channel ID or name (prefixed with `#`) in all functions that take a `:channel` argument. Lookup by name is not supported by the Slack API and the `channels_id` method called invokes `conversations_list` in order to locate the channel ID.
|
|
179
180
|
|
|
180
181
|
```ruby
|
|
181
|
-
client.
|
|
182
|
+
client.conversations_info(channel: 'C04KB5X4D') # calls conversations_info
|
|
182
183
|
```
|
|
183
184
|
|
|
184
185
|
```ruby
|
|
185
|
-
client.
|
|
186
|
+
client.conversations_info(channel: '#general') # calls conversations_list followed by conversations_info
|
|
186
187
|
```
|
|
187
188
|
|
|
188
189
|
##### Get User Info
|
|
@@ -243,7 +244,7 @@ adapter | Optional HTTP adapter to use, defaults to `Faraday.default
|
|
|
243
244
|
You can also pass request options, including `timeout` and `open_timeout` into individual calls.
|
|
244
245
|
|
|
245
246
|
```ruby
|
|
246
|
-
client.
|
|
247
|
+
client.conversations_list(request: { timeout: 180 })
|
|
247
248
|
```
|
|
248
249
|
|
|
249
250
|
You can also control what proxy options are used by modifying the `http_proxy` environment variable per [Net::HTTP's documentation](https://docs.ruby-lang.org/en/2.0.0/Net/HTTP.html#class-Net::HTTP-label-Proxies).
|
|
@@ -324,9 +325,9 @@ If you exceed [Slack’s rate limits](https://api.slack.com/docs/rate-limits), a
|
|
|
324
325
|
|
|
325
326
|
##### Other Errors
|
|
326
327
|
|
|
327
|
-
|
|
328
|
+
When Slack is temporarily unavailable a subclass of `Slack::Web::Api::Errors::ServerError` will be raised and the original `Faraday::Error` will be accesible via `exception.cause`. (Starting with 0.18.0 this is no longer a subclass of `Slack::Web::Api::Errors::SlackError`.)
|
|
328
329
|
|
|
329
|
-
Specifically `Slack::Web::Api::Errors::ParsingError` will be raised on non-json response (i.
|
|
330
|
+
Specifically `Slack::Web::Api::Errors::ParsingError` will be raised on non-json response (i.e. 200 OK with `Slack unavailable` HTML page) and `Slack::Web::Api::Errors::HttpRequestError` subclasses for connection failures (`Slack::Web::Api::Errors::TimeoutError` for read/open timeouts & `Slack::Web::Api::Errors::UnavailableError` for 5xx HTTP responses).
|
|
330
331
|
|
|
331
332
|
In any other case, a `Faraday::ClientError` will be raised.
|
|
332
333
|
|
|
@@ -646,6 +647,6 @@ See [CONTRIBUTING](CONTRIBUTING.md).
|
|
|
646
647
|
|
|
647
648
|
## Copyright and License
|
|
648
649
|
|
|
649
|
-
Copyright (c) 2015-
|
|
650
|
+
Copyright (c) 2015-2021, [Daniel Doubrovkine](https://twitter.com/dblockdotorg), [Artsy](https://www.artsy.net) and [Contributors](CHANGELOG.md).
|
|
650
651
|
|
|
651
652
|
This project is licensed under the [MIT License](LICENSE.md).
|
data/RELEASING.md
CHANGED
|
@@ -11,7 +11,7 @@ bundle install
|
|
|
11
11
|
rake
|
|
12
12
|
```
|
|
13
13
|
|
|
14
|
-
Check that the last build succeeded in [
|
|
14
|
+
Check that the last build succeeded in [GitHub Actions](https://github.com/slack-ruby/slack-ruby-client/actions) for all supported platforms.
|
|
15
15
|
|
|
16
16
|
Change "Next" in [CHANGELOG.md](CHANGELOG.md) to the current date.
|
|
17
17
|
|