slack-ruby-client 0.13.1 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/FUNDING.yml +1 -0
- data/.github/workflows/integration_test.yml +26 -0
- data/.github/workflows/lint.yml +14 -0
- data/.github/workflows/pr_lint.yml +21 -0
- data/.github/workflows/test.yml +36 -0
- data/.gitignore +5 -3
- data/.rubocop.yml +34 -5
- data/.rubocop_todo.yml +180 -46
- data/.ruby-version +1 -0
- data/CHANGELOG.md +119 -2
- data/CONTRIBUTING.md +23 -11
- data/Dangerfile +2 -0
- data/Gemfile +22 -5
- data/Gemfile.danger +6 -0
- data/LICENSE.md +1 -1
- data/README.md +236 -101
- data/RELEASING.md +2 -2
- data/Rakefile +2 -1
- data/UPGRADING.md +100 -2
- data/bin/commands/admin_analytics.rb +16 -0
- data/bin/commands/admin_apps.rb +51 -0
- data/bin/commands/admin_apps_approved.rb +17 -0
- data/bin/commands/admin_apps_requests.rb +28 -0
- data/bin/commands/admin_apps_restricted.rb +17 -0
- data/bin/commands/admin_audit_anomaly_allow.rb +23 -0
- data/bin/commands/admin_auth_policy.rb +39 -0
- data/bin/commands/admin_barriers.rb +47 -0
- data/bin/commands/admin_conversations.rb +171 -0
- data/bin/commands/admin_conversations_ekm.rb +17 -0
- data/bin/commands/admin_conversations_restrictAccess.rb +37 -0
- data/bin/commands/admin_emoji.rb +54 -0
- data/bin/commands/admin_inviteRequests.rb +36 -0
- data/bin/commands/admin_inviteRequests_approved.rb +16 -0
- data/bin/commands/admin_inviteRequests_denied.rb +16 -0
- data/bin/commands/admin_teams.rb +27 -0
- data/bin/commands/admin_teams_admins.rb +16 -0
- data/bin/commands/admin_teams_owners.rb +16 -0
- data/bin/commands/admin_teams_settings.rb +64 -0
- data/bin/commands/admin_usergroups.rb +48 -0
- data/bin/commands/admin_users.rb +98 -0
- data/bin/commands/admin_users_session.rb +78 -0
- data/bin/commands/admin_users_unsupportedVersions.rb +15 -0
- data/bin/commands/api.rb +1 -1
- data/bin/commands/apps.rb +15 -0
- data/bin/commands/apps_connections.rb +13 -0
- data/bin/commands/apps_event_authorizations.rb +16 -0
- data/bin/commands/apps_manifest.rb +52 -0
- data/bin/commands/auth.rb +1 -0
- data/bin/commands/auth_teams.rb +16 -0
- data/bin/commands/bookmarks.rb +53 -0
- data/bin/commands/bots.rb +2 -0
- data/bin/commands/calls.rb +52 -0
- data/bin/commands/calls_participants.rb +25 -0
- data/bin/commands/chat.rb +61 -14
- data/bin/commands/chat_scheduledMessages.rb +19 -0
- data/bin/commands/conversations.rb +82 -10
- data/bin/commands/dialog.rb +1 -0
- data/bin/commands/dnd.rb +6 -3
- data/bin/commands/emoji.rb +1 -0
- data/bin/commands/files.rb +34 -18
- data/bin/commands/files_comments.rb +1 -21
- data/bin/commands/files_remote.rb +78 -0
- data/bin/commands/migration.rb +2 -0
- data/bin/commands/oauth.rb +2 -14
- data/bin/commands/oauth_v2.rb +29 -0
- data/bin/commands/openid_connect.rb +27 -0
- data/bin/commands/pins.rb +3 -6
- data/bin/commands/reactions.rb +3 -3
- data/bin/commands/reminders.rb +7 -0
- data/bin/commands/rtm.rb +1 -15
- data/bin/commands/search.rb +6 -1
- data/bin/commands/stars.rb +8 -6
- data/bin/commands/team.rb +6 -0
- data/bin/commands/team_billing.rb +13 -0
- data/bin/commands/team_preferences.rb +13 -0
- data/bin/commands/team_profile.rb +1 -0
- data/bin/commands/tooling_tokens.rb +14 -0
- data/bin/commands/usergroups.rb +7 -1
- data/bin/commands/usergroups_users.rb +3 -0
- data/bin/commands/users.rb +6 -4
- data/bin/commands/users_admin.rb +1 -0
- data/bin/commands/users_prefs.rb +1 -0
- data/bin/commands/users_profile.rb +6 -5
- data/bin/commands/views.rb +50 -0
- data/bin/commands/workflows.rb +38 -0
- data/bin/commands.rb +41 -8
- data/bin/slack +3 -4
- data/examples/hi_real_time_and_web/Gemfile +1 -0
- data/examples/hi_real_time_and_web/hi.rb +7 -3
- data/examples/hi_real_time_async_async/Gemfile +1 -0
- data/examples/hi_real_time_async_async/hi.rb +6 -2
- data/examples/hi_web/Gemfile +1 -0
- data/examples/hi_web/hi.rb +1 -0
- data/examples/new_ticket/Gemfile +1 -0
- data/examples/new_ticket/new_ticket.rb +1 -0
- data/lib/slack/config.rb +2 -2
- data/lib/slack/events/config.rb +32 -0
- data/lib/slack/events/request.rb +72 -0
- data/lib/slack/logger.rb +6 -5
- data/lib/slack/messages/formatting.rb +1 -0
- data/lib/slack/messages/message.rb +1 -4
- data/lib/slack/real_time/api/message.rb +6 -3
- data/lib/slack/real_time/api/message_id.rb +1 -0
- data/lib/slack/real_time/api/ping.rb +5 -2
- data/lib/slack/real_time/api/templates/event_handler.erb +5 -1
- data/lib/slack/real_time/api/typing.rb +5 -2
- data/lib/slack/real_time/client.rb +105 -54
- data/lib/slack/real_time/concurrency/async.rb +77 -6
- data/lib/slack/real_time/concurrency.rb +1 -2
- data/lib/slack/real_time/config.rb +9 -13
- data/lib/slack/real_time/models/base.rb +1 -4
- data/lib/slack/real_time/models/bot.rb +1 -0
- data/lib/slack/real_time/models/channel.rb +5 -0
- data/lib/slack/real_time/models/im.rb +1 -0
- data/lib/slack/real_time/models/{group.rb → mpim.rb} +2 -1
- data/lib/slack/real_time/models/team.rb +1 -0
- data/lib/slack/real_time/models/user.rb +1 -0
- data/lib/slack/real_time/models.rb +3 -1
- data/lib/slack/real_time/socket.rb +45 -17
- data/lib/slack/real_time/stores/base.rb +28 -14
- data/lib/slack/real_time/stores/starter.rb +325 -297
- data/lib/slack/real_time/stores/store.rb +271 -196
- data/lib/slack/real_time/stores.rb +2 -7
- data/lib/slack/version.rb +2 -1
- data/lib/slack/web/api/endpoints/admin_analytics.rb +28 -0
- data/lib/slack/web/api/endpoints/admin_apps.rb +78 -0
- data/lib/slack/web/api/endpoints/admin_apps_approved.rb +35 -0
- data/lib/slack/web/api/endpoints/admin_apps_requests.rb +51 -0
- data/lib/slack/web/api/endpoints/admin_apps_restricted.rb +35 -0
- data/lib/slack/web/api/endpoints/admin_audit_anomaly_allow.rb +34 -0
- data/lib/slack/web/api/endpoints/admin_auth_policy.rb +72 -0
- data/lib/slack/web/api/endpoints/admin_barriers.rb +82 -0
- data/lib/slack/web/api/endpoints/admin_conversations.rb +264 -0
- data/lib/slack/web/api/endpoints/admin_conversations_ekm.rb +35 -0
- data/lib/slack/web/api/endpoints/admin_conversations_restrictAccess.rb +61 -0
- data/lib/slack/web/api/endpoints/admin_emoji.rb +88 -0
- data/lib/slack/web/api/endpoints/admin_inviteRequests.rb +61 -0
- data/lib/slack/web/api/endpoints/admin_inviteRequests_approved.rb +33 -0
- data/lib/slack/web/api/endpoints/admin_inviteRequests_denied.rb +33 -0
- data/lib/slack/web/api/endpoints/admin_teams.rb +50 -0
- data/lib/slack/web/api/endpoints/admin_teams_admins.rb +34 -0
- data/lib/slack/web/api/endpoints/admin_teams_owners.rb +34 -0
- data/lib/slack/web/api/endpoints/admin_teams_settings.rb +99 -0
- data/lib/slack/web/api/endpoints/admin_usergroups.rb +77 -0
- data/lib/slack/web/api/endpoints/admin_users.rb +163 -0
- data/lib/slack/web/api/endpoints/admin_users_session.rb +122 -0
- data/lib/slack/web/api/endpoints/admin_users_unsupportedVersions.rb +25 -0
- data/lib/slack/web/api/endpoints/api.rb +2 -3
- data/lib/slack/web/api/endpoints/apps.rb +27 -0
- data/lib/slack/web/api/endpoints/apps_connections.rb +21 -0
- data/lib/slack/web/api/endpoints/apps_event_authorizations.rb +34 -0
- data/lib/slack/web/api/endpoints/apps_manifest.rb +77 -0
- data/lib/slack/web/api/endpoints/auth.rb +2 -1
- data/lib/slack/web/api/endpoints/auth_teams.rb +33 -0
- data/lib/slack/web/api/endpoints/bookmarks.rb +88 -0
- data/lib/slack/web/api/endpoints/bots.rb +4 -1
- data/lib/slack/web/api/endpoints/calls.rb +83 -0
- data/lib/slack/web/api/endpoints/calls_participants.rb +42 -0
- data/lib/slack/web/api/endpoints/chat.rb +168 -65
- data/lib/slack/web/api/endpoints/chat_scheduledMessages.rb +40 -0
- data/lib/slack/web/api/endpoints/conversations.rb +182 -67
- data/lib/slack/web/api/endpoints/dialog.rb +5 -4
- data/lib/slack/web/api/endpoints/dnd.rb +9 -4
- data/lib/slack/web/api/endpoints/emoji.rb +1 -0
- data/lib/slack/web/api/endpoints/files.rb +69 -37
- data/lib/slack/web/api/endpoints/files_comments.rb +4 -36
- data/lib/slack/web/api/endpoints/files_remote.rb +127 -0
- data/lib/slack/web/api/endpoints/migration.rb +6 -3
- data/lib/slack/web/api/endpoints/oauth.rb +7 -31
- data/lib/slack/web/api/endpoints/oauth_v2.rb +48 -0
- data/lib/slack/web/api/endpoints/openid_connect.rb +42 -0
- data/lib/slack/web/api/endpoints/pins.rb +11 -18
- data/lib/slack/web/api/endpoints/reactions.rb +22 -21
- data/lib/slack/web/api/endpoints/reminders.rb +23 -10
- data/lib/slack/web/api/endpoints/rtm.rb +3 -25
- data/lib/slack/web/api/endpoints/search.rb +31 -16
- data/lib/slack/web/api/endpoints/stars.rb +14 -11
- data/lib/slack/web/api/endpoints/team.rb +15 -4
- 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 +2 -1
- data/lib/slack/web/api/endpoints/tooling_tokens.rb +24 -0
- data/lib/slack/web/api/endpoints/usergroups.rb +31 -20
- data/lib/slack/web/api/endpoints/usergroups_users.rb +13 -8
- data/lib/slack/web/api/endpoints/users.rb +24 -23
- data/lib/slack/web/api/endpoints/users_admin.rb +3 -2
- data/lib/slack/web/api/endpoints/users_prefs.rb +1 -0
- data/lib/slack/web/api/endpoints/users_profile.rb +8 -7
- data/lib/slack/web/api/endpoints/views.rb +102 -0
- data/lib/slack/web/api/endpoints/workflows.rb +61 -0
- data/lib/slack/web/api/endpoints.rb +82 -18
- data/lib/slack/web/api/error.rb +1 -0
- data/lib/slack/web/api/errors/server_error.rb +37 -0
- data/lib/slack/web/api/errors/slack_error.rb +14 -1
- data/lib/slack/web/api/errors/too_many_requests_error.rb +2 -4
- data/lib/slack/web/api/errors.rb +1116 -0
- data/lib/slack/web/api/mixins/{channels.id.rb → conversations.id.rb} +5 -6
- data/lib/slack/web/api/mixins/ids.id.rb +3 -2
- data/lib/slack/web/api/mixins/users.id.rb +3 -4
- data/lib/slack/web/api/mixins/users.search.rb +3 -1
- data/lib/slack/web/api/mixins.rb +2 -2
- data/lib/slack/web/api/patches/chat.attachments-blocks.patch +69 -0
- data/lib/slack/web/api/patches/{dialog.1.open-json-support.patch → dialog.encoded-json.patch} +4 -4
- data/lib/slack/web/api/patches/views.view-json.patch +55 -0
- data/lib/slack/web/api/templates/command.erb +1 -0
- data/lib/slack/web/api/templates/commands.erb +1 -0
- data/lib/slack/web/api/templates/endpoints.erb +2 -2
- data/lib/slack/web/api/templates/errors.erb +20 -0
- data/lib/slack/web/api/templates/method.erb +6 -2
- data/lib/slack/web/api/templates/method_spec.erb +2 -1
- data/lib/slack/web/client.rb +2 -1
- data/lib/slack/web/config.rb +5 -2
- data/lib/slack/web/faraday/connection.rb +24 -20
- data/lib/slack/web/faraday/request.rb +5 -1
- data/lib/slack/web/faraday/response/raise_error.rb +14 -7
- data/lib/slack/web/faraday/response/wrap_error.rb +24 -0
- data/lib/slack/web/pagination/cursor.rb +7 -7
- data/lib/slack-ruby-client.rb +12 -5
- data/lib/slack.rb +1 -0
- data/lib/slack_ruby_client.rb +1 -0
- data/lib/tasks/git.rake +1 -0
- data/lib/tasks/real_time.rake +51 -21
- data/lib/tasks/update.rake +1 -0
- data/lib/tasks/web.rake +48 -12
- data/screenshots/create-app.png +0 -0
- data/slack-ruby-client.gemspec +7 -12
- 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 +84 -0
- data/spec/fixtures/slack/web/conversations_setTopic_one_page.yml +172 -0
- data/spec/fixtures/slack/web/conversations_setTopic_paginated.yml +253 -0
- data/spec/fixtures/slack/web/paginated_users_list.yml +501 -69
- data/spec/fixtures/slack/web/rtm_connect.yml +347 -26
- 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 +83 -0
- data/spec/integration/integration_spec.rb +115 -47
- data/spec/slack/config_spec.rb +2 -0
- data/spec/slack/events/config_spec.rb +35 -0
- data/spec/slack/events/request_spec.rb +188 -0
- data/spec/slack/messages/formatting_spec.rb +35 -13
- data/spec/slack/real_time/api/message_spec.rb +7 -2
- data/spec/slack/real_time/api/ping_spec.rb +3 -1
- data/spec/slack/real_time/api/typing_spec.rb +6 -2
- data/spec/slack/real_time/client_spec.rb +300 -142
- data/spec/slack/real_time/concurrency/it_behaves_like_a_realtime_socket.rb +2 -0
- 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 +20 -17
- data/spec/slack/real_time/event_handlers/event_handlers_spec.rb +3 -2
- data/spec/slack/real_time/event_handlers/im_spec.rb +31 -27
- data/spec/slack/real_time/event_handlers/{group_spec.rb → private_channel_spec.rb} +36 -27
- data/spec/slack/real_time/event_handlers/{channel_spec.rb → public_channel_spec.rb} +31 -24
- data/spec/slack/real_time/event_handlers/team_spec.rb +8 -7
- data/spec/slack/real_time/event_handlers/user_spec.rb +7 -5
- data/spec/slack/real_time/rtm_connect_spec.rb +2 -1
- data/spec/slack/real_time/stores/store_spec.rb +50 -0
- data/spec/slack/slack_spec.rb +41 -6
- data/spec/slack/version_spec.rb +2 -1
- data/spec/slack/web/api/endpoints/admin_analytics_spec.rb +13 -0
- data/spec/slack/web/api/endpoints/admin_apps_approved_spec.rb +8 -0
- data/spec/slack/web/api/endpoints/admin_apps_requests_spec.rb +13 -0
- data/spec/slack/web/api/endpoints/admin_apps_restricted_spec.rb +8 -0
- data/spec/slack/web/api/endpoints/admin_apps_spec.rb +18 -0
- data/spec/slack/web/api/endpoints/admin_audit_anomaly_allow_spec.rb +8 -0
- data/spec/slack/web/api/endpoints/admin_auth_policy_spec.rb +35 -0
- data/spec/slack/web/api/endpoints/admin_barriers_spec.rb +38 -0
- data/spec/slack/web/api/endpoints/admin_conversations_ekm_spec.rb +8 -0
- data/spec/slack/web/api/endpoints/admin_conversations_restrictAccess_spec.rb +32 -0
- data/spec/slack/web/api/endpoints/admin_conversations_spec.rb +98 -0
- data/spec/slack/web/api/endpoints/admin_emoji_spec.rb +37 -0
- data/spec/slack/web/api/endpoints/admin_inviteRequests_approved_spec.rb +8 -0
- data/spec/slack/web/api/endpoints/admin_inviteRequests_denied_spec.rb +8 -0
- data/spec/slack/web/api/endpoints/admin_inviteRequests_spec.rb +18 -0
- data/spec/slack/web/api/endpoints/admin_teams_admins_spec.rb +13 -0
- data/spec/slack/web/api/endpoints/admin_teams_owners_spec.rb +13 -0
- data/spec/slack/web/api/endpoints/admin_teams_settings_spec.rb +53 -0
- data/spec/slack/web/api/endpoints/admin_teams_spec.rb +16 -0
- data/spec/slack/web/api/endpoints/admin_usergroups_spec.rb +37 -0
- data/spec/slack/web/api/endpoints/admin_users_session_spec.rb +41 -0
- data/spec/slack/web/api/endpoints/admin_users_spec.rb +67 -0
- data/spec/slack/web/api/endpoints/admin_users_unsupportedVersions_spec.rb +8 -0
- data/spec/slack/web/api/endpoints/api_spec.rb +1 -0
- data/spec/slack/web/api/endpoints/apps_connections_spec.rb +8 -0
- data/spec/slack/web/api/endpoints/apps_event_authorizations_spec.rb +13 -0
- data/spec/slack/web/api/endpoints/apps_manifest_spec.rb +36 -0
- data/spec/slack/web/api/endpoints/apps_spec.rb +16 -0
- data/spec/slack/web/api/endpoints/{apps_permissions_resources_spec.rb → auth_teams_spec.rb} +2 -1
- data/spec/slack/web/api/endpoints/bookmarks_spec.rb +40 -0
- data/spec/slack/web/api/endpoints/bots_spec.rb +1 -0
- data/spec/slack/web/api/endpoints/calls_participants_spec.rb +24 -0
- data/spec/slack/web/api/endpoints/calls_spec.rb +31 -0
- data/spec/slack/web/api/endpoints/chat_scheduledMessages_spec.rb +8 -0
- data/spec/slack/web/api/endpoints/custom_specs/auth_spec.rb +9 -7
- data/spec/slack/web/api/endpoints/custom_specs/chat_spec.rb +144 -40
- data/spec/slack/web/api/endpoints/custom_specs/conversations_spec.rb +13 -0
- data/spec/slack/web/api/endpoints/custom_specs/dialog_spec.rb +18 -6
- data/spec/slack/web/api/endpoints/custom_specs/users_spec.rb +8 -3
- data/spec/slack/web/api/endpoints/custom_specs/views_spec.rb +112 -0
- data/spec/slack/web/api/endpoints/dnd_spec.rb +4 -3
- data/spec/slack/web/api/endpoints/emoji_spec.rb +1 -0
- data/spec/slack/web/api/endpoints/files_comments_spec.rb +3 -21
- data/spec/slack/web/api/endpoints/files_remote_spec.rb +24 -0
- data/spec/slack/web/api/endpoints/files_spec.rb +18 -4
- data/spec/slack/web/api/endpoints/migration_spec.rb +1 -0
- data/spec/slack/web/api/endpoints/oauth_spec.rb +1 -22
- data/spec/slack/web/api/endpoints/oauth_v2_spec.rb +16 -0
- data/spec/slack/web/api/endpoints/openid_connect_spec.rb +8 -0
- data/spec/slack/web/api/endpoints/pins_spec.rb +1 -0
- data/spec/slack/web/api/endpoints/reactions_spec.rb +8 -1
- data/spec/slack/web/api/endpoints/reminders_spec.rb +3 -2
- data/spec/slack/web/api/endpoints/rtm_spec.rb +1 -0
- data/spec/slack/web/api/endpoints/search_spec.rb +1 -0
- data/spec/slack/web/api/endpoints/stars_spec.rb +1 -0
- data/spec/slack/web/api/endpoints/{apps_permissions_scopes_spec.rb → team_billing_spec.rb} +2 -1
- data/spec/slack/web/api/endpoints/team_preferences_spec.rb +8 -0
- data/spec/slack/web/api/endpoints/team_profile_spec.rb +1 -0
- data/spec/slack/web/api/endpoints/team_spec.rb +1 -0
- data/spec/slack/web/api/endpoints/tooling_tokens_spec.rb +13 -0
- data/spec/slack/web/api/endpoints/usergroups_spec.rb +1 -0
- data/spec/slack/web/api/endpoints/usergroups_users_spec.rb +3 -2
- data/spec/slack/web/api/endpoints/users_admin_spec.rb +1 -0
- data/spec/slack/web/api/endpoints/users_prefs_spec.rb +1 -0
- data/spec/slack/web/api/endpoints/users_profile_spec.rb +1 -0
- data/spec/slack/web/api/endpoints/workflows_spec.rb +26 -0
- data/spec/slack/web/api/error_spec.rb +7 -7
- data/spec/slack/web/api/errors/slack_error_spec.rb +26 -7
- data/spec/slack/web/api/mixins/conversations_list_spec.rb +21 -0
- data/spec/slack/web/api/mixins/conversations_spec.rb +45 -0
- data/spec/slack/web/api/mixins/users_spec.rb +19 -8
- data/spec/slack/web/api/pagination/cursor_spec.rb +47 -15
- data/spec/slack/web/client_spec.rb +199 -22
- data/spec/slack/web/faraday/request_spec.rb +80 -0
- data/spec/slack/web/faraday/response/raise_error_spec.rb +48 -12
- data/spec/spec_helper.rb +9 -2
- data/spec/support/queue_with_timeout.rb +5 -4
- data/spec/support/real_time/concurrency/mock.rb +1 -0
- data/spec/support/real_time/connected_client.rb +6 -6
- data/spec/support/real_time/event.rb +1 -0
- data/spec/support/real_time/loaded_client.rb +120 -0
- data/spec/support/token.rb +1 -0
- data/spec/support/vcr.rb +37 -1
- metadata +174 -262
- data/.travis.yml +0 -32
- data/bin/commands/apps_permissions.rb +0 -22
- data/bin/commands/apps_permissions_resources.rb +0 -14
- data/bin/commands/apps_permissions_scopes.rb +0 -12
- data/bin/commands/apps_permissions_users.rb +0 -25
- data/bin/commands/channels.rb +0 -175
- data/bin/commands/groups.rb +0 -174
- data/bin/commands/im.rb +0 -67
- data/bin/commands/mpim.rb +0 -65
- data/examples/hi_real_time/Gemfile +0 -5
- data/examples/hi_real_time/hi.gif +0 -0
- data/examples/hi_real_time/hi.rb +0 -37
- data/examples/hi_real_time_async_celluloid/Gemfile +0 -6
- data/examples/hi_real_time_async_celluloid/Procfile +0 -2
- data/examples/hi_real_time_async_celluloid/hi.rb +0 -35
- data/examples/hi_real_time_async_eventmachine/Gemfile +0 -6
- data/examples/hi_real_time_async_eventmachine/Procfile +0 -2
- data/examples/hi_real_time_async_eventmachine/hi.rb +0 -35
- data/lib/slack/real_time/concurrency/celluloid.rb +0 -118
- data/lib/slack/real_time/concurrency/eventmachine.rb +0 -66
- data/lib/slack/web/api/endpoints/apps_permissions.rb +0 -35
- data/lib/slack/web/api/endpoints/apps_permissions_resources.rb +0 -30
- data/lib/slack/web/api/endpoints/apps_permissions_scopes.rb +0 -20
- data/lib/slack/web/api/endpoints/apps_permissions_users.rb +0 -49
- data/lib/slack/web/api/endpoints/channels.rb +0 -266
- data/lib/slack/web/api/endpoints/groups.rb +0 -265
- data/lib/slack/web/api/endpoints/im.rb +0 -113
- data/lib/slack/web/api/endpoints/mpim.rb +0 -108
- data/lib/slack/web/api/endpoints/presence.rb +0 -23
- data/lib/slack/web/api/mixins/channels.id.json +0 -20
- data/lib/slack/web/api/mixins/groups.id.json +0 -20
- data/lib/slack/web/api/mixins/groups.id.rb +0 -26
- data/lib/slack/web/api/patches/chat.1.text-attachments-required.patch +0 -13
- data/lib/slack/web/api/patches/chat.2.attachments-json.patch +0 -17
- data/lib/slack/web/api/patches/chat.3.update-attachments-support.patch +0 -21
- data/lib/slack/web/api/patches/chat.4.postEphemeral-attachments-support.patch +0 -17
- data/lib/slack/web/api/patches/chat.5.postEphemeral-text-or-attachments.patch +0 -13
- data/screenshots/register-bot.png +0 -0
- data/spec/fixtures/slack/web/503_error.yml +0 -14
- data/spec/fixtures/slack/web/channels_info.yml +0 -46
- data/spec/fixtures/slack/web/groups_info.yml +0 -43
- data/spec/fixtures/slack/web/rtm_start.yml +0 -104
- data/spec/slack/real_time/concurrency/celluloid_spec.rb +0 -106
- data/spec/slack/real_time/concurrency/eventmachine_spec.rb +0 -47
- data/spec/slack/real_time/rtm_start_spec.rb +0 -13
- data/spec/slack/real_time/store_spec.rb +0 -11
- data/spec/slack/web/api/endpoints/apps_permissions_spec.rb +0 -15
- data/spec/slack/web/api/endpoints/apps_permissions_users_spec.rb +0 -18
- data/spec/slack/web/api/endpoints/conversations_spec.rb +0 -100
- data/spec/slack/web/api/endpoints/custom_specs/channels_spec.rb +0 -11
- data/spec/slack/web/api/endpoints/custom_specs/groups_spec.rb +0 -11
- data/spec/slack/web/api/endpoints/im_spec.rb +0 -38
- data/spec/slack/web/api/endpoints/mpim_spec.rb +0 -38
- data/spec/slack/web/api/errors/service_unavailable_spec.rb +0 -14
- data/spec/slack/web/api/mixins/channels_spec.rb +0 -33
- data/spec/slack/web/api/mixins/groups_spec.rb +0 -33
@@ -1,13 +0,0 @@
|
|
1
|
-
diff --git a/slack-ruby-client/lib/slack/web/api/endpoints/chat.rb b/slack-ruby-client-original/lib/slack/web/api/endpoints/chat.rb
|
2
|
-
index 194419e..2ef5c65 100644
|
3
|
-
--- a/lib/slack/web/api/endpoints/chat.rb
|
4
|
-
+++ b/lib/slack/web/api/endpoints/chat.rb
|
5
|
-
@@ -93,7 +93,7 @@ module Slack
|
6
|
-
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/chat/chat.postEphemeral.json
|
7
|
-
def chat_postEphemeral(options = {})
|
8
|
-
throw ArgumentError.new('Required arguments :channel missing') if options[:channel].nil?
|
9
|
-
- throw ArgumentError.new('Required arguments :text missing') if options[:text].nil?
|
10
|
-
+ throw ArgumentError.new('Required arguments :text or :attachments missing') if options[:text].nil? && options[:attachments].nil?
|
11
|
-
throw ArgumentError.new('Required arguments :user missing') if options[:user].nil?
|
12
|
-
options = options.merge(user: users_id(options)['user']['id']) if options[:user]
|
13
|
-
# attachments must be passed as an encoded JSON string
|
Binary file
|
@@ -1,14 +0,0 @@
|
|
1
|
-
---
|
2
|
-
http_interactions:
|
3
|
-
- request:
|
4
|
-
method: post
|
5
|
-
uri: https://slack.com/api/auth.test
|
6
|
-
response:
|
7
|
-
status:
|
8
|
-
code: 503
|
9
|
-
message: Service Unavailable
|
10
|
-
body:
|
11
|
-
encoding: US-ASCII
|
12
|
-
string: ''
|
13
|
-
http_version:
|
14
|
-
recorded_at: Thu, 30 Nov 2017 14:36:26 GMT
|
@@ -1,46 +0,0 @@
|
|
1
|
-
---
|
2
|
-
http_interactions:
|
3
|
-
- request:
|
4
|
-
method: post
|
5
|
-
uri: https://slack.com/api/channels.list
|
6
|
-
body:
|
7
|
-
encoding: UTF-8
|
8
|
-
string: token=token
|
9
|
-
response:
|
10
|
-
status:
|
11
|
-
code: 200
|
12
|
-
message: OK
|
13
|
-
headers:
|
14
|
-
Content-Type:
|
15
|
-
- application/json; charset=utf-8
|
16
|
-
body:
|
17
|
-
encoding: UTF-8
|
18
|
-
string: '{"ok":true,"channels":[{"id":"C04KB5X4D","name":"general","is_channel":true,"created":1430222230,"creator":"U04KB5WQR","is_archived":false,"is_general":true,"is_member":true,"last_read":"1435863302.000026","latest":{"type":"message","user":"U0HPMN0GY","text":"```\n{\"ok\":true,\"args\":{\"token\":\"xoxb-17803748576-H794PZkqOo4DkjYddb438F2J\"}}```","ts":"1452025068.000045"},"unread_count":321,"unread_count_display":283,"members":["U04JPQ0JS","U04JZBDQQ","U04KB5WQR"],"topic":{"value":"","creator":"","last_set":0},"purpose":{"value":"This
|
19
|
-
channel is for team-wide communication and announcements. All team members
|
20
|
-
are in this channel.","creator":"","last_set":0}}]}'
|
21
|
-
http_version:
|
22
|
-
recorded_at: Fri, 22 Jan 2016 19:01:46 GMT
|
23
|
-
- request:
|
24
|
-
method: post
|
25
|
-
uri: https://slack.com/api/channels.info
|
26
|
-
body:
|
27
|
-
encoding: UTF-8
|
28
|
-
string: channel=C04KB5X4D&token=token
|
29
|
-
headers:
|
30
|
-
Content-Type:
|
31
|
-
- application/x-www-form-urlencoded
|
32
|
-
response:
|
33
|
-
status:
|
34
|
-
code: 200
|
35
|
-
message: OK
|
36
|
-
headers:
|
37
|
-
Content-Type:
|
38
|
-
- application/json; charset=utf-8
|
39
|
-
body:
|
40
|
-
encoding: UTF-8
|
41
|
-
string: '{"ok":true,"channel":{"id":"C04KB5X4D","name":"general","is_channel":true,"created":1430222230,"creator":"U04KB5WQR","is_archived":false,"is_general":true,"is_member":true,"last_read":"1435863302.000026","latest":{"type":"message","user":"U0HPMN0GY","text":"```\n{\"ok\":true,\"args\":{\"token\":\"xoxb-17803748576-H794PZkqOo4DkjYddb438F2J\"}}```","ts":"1452025068.000045"},"unread_count":321,"unread_count_display":283,"members":["U04JPQ0JS","U04JZBDQQ","U04KB5WQR","U06JGTU5V","U07518DTL","U07KECJ77","U092BDCLV","U092V4E9L","U0EA7TZJN","U0H701CJZ","U0HLFUZLJ","U0HPMN0GY"],"topic":{"value":"","creator":"","last_set":0},"purpose":{"value":"This
|
42
|
-
channel is for team-wide communication and announcements. All team members
|
43
|
-
are in this channel.","creator":"","last_set":0}}}'
|
44
|
-
http_version:
|
45
|
-
recorded_at: Fri, 22 Jan 2016 19:01:46 GMT
|
46
|
-
recorded_with: VCR 3.0.1
|
@@ -1,43 +0,0 @@
|
|
1
|
-
---
|
2
|
-
http_interactions:
|
3
|
-
- request:
|
4
|
-
method: post
|
5
|
-
uri: https://slack.com/api/groups.list
|
6
|
-
body:
|
7
|
-
encoding: UTF-8
|
8
|
-
string: token=token
|
9
|
-
response:
|
10
|
-
status:
|
11
|
-
code: 200
|
12
|
-
message: OK
|
13
|
-
headers:
|
14
|
-
Content-Type:
|
15
|
-
- application/json; charset=utf-8
|
16
|
-
body:
|
17
|
-
encoding: ASCII-8BIT
|
18
|
-
string: '{"ok":true,"groups":[{"id":"G0K7EV5A7","name":"mpdm-dblock--rubybot--player1-1","is_group":true,"created":1453561861,"creator":"U04KB5WQR","is_archived":false,"is_mpim":true,"members":["U04KB5WQR","U0HLFUZLJ","U07518DTL"],"topic":{"value":"Group
|
19
|
-
messaging","creator":"U04KB5WQR","last_set":1453561861},"purpose":{"value":"Group
|
20
|
-
messaging with: @dblock @rubybot @player1","creator":"U04KB5WQR","last_set":1453561861}}]}'
|
21
|
-
http_version:
|
22
|
-
recorded_at: Sat, 23 Jan 2016 15:19:10 GMT
|
23
|
-
- request:
|
24
|
-
method: post
|
25
|
-
uri: https://slack.com/api/groups.info
|
26
|
-
body:
|
27
|
-
encoding: UTF-8
|
28
|
-
string: channel=G0K7EV5A7&token=token
|
29
|
-
response:
|
30
|
-
status:
|
31
|
-
code: 200
|
32
|
-
message: OK
|
33
|
-
headers:
|
34
|
-
Content-Type:
|
35
|
-
- application/json; charset=utf-8
|
36
|
-
body:
|
37
|
-
encoding: ASCII-8BIT
|
38
|
-
string: '{"ok":true,"group":{"id":"G0K7EV5A7","name":"mpdm-dblock--rubybot--player1-1","is_group":true,"created":1453561861,"creator":"U04KB5WQR","is_archived":false,"is_mpim":true,"is_open":false,"last_read":"0000000000.000000","latest":null,"unread_count":0,"unread_count_display":0,"members":["U04KB5WQR","U0HLFUZLJ","U07518DTL"],"topic":{"value":"Group
|
39
|
-
messaging","creator":"U04KB5WQR","last_set":1453561861},"purpose":{"value":"Group
|
40
|
-
messaging with: @dblock @rubybot @player1","creator":"U04KB5WQR","last_set":1453561861}}}'
|
41
|
-
http_version:
|
42
|
-
recorded_at: Sat, 23 Jan 2016 15:19:46 GMT
|
43
|
-
recorded_with: VCR 3.0.0
|
@@ -1,104 +0,0 @@
|
|
1
|
-
---
|
2
|
-
http_interactions:
|
3
|
-
- request:
|
4
|
-
method: post
|
5
|
-
uri: https://slack.com/api/rtm.start
|
6
|
-
body:
|
7
|
-
encoding: UTF-8
|
8
|
-
string: token=token
|
9
|
-
headers:
|
10
|
-
Accept:
|
11
|
-
- application/json; charset=utf-8
|
12
|
-
User-Agent:
|
13
|
-
- Slack Ruby Client/0.5.5
|
14
|
-
Content-Type:
|
15
|
-
- application/x-www-form-urlencoded
|
16
|
-
Accept-Encoding:
|
17
|
-
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
18
|
-
response:
|
19
|
-
status:
|
20
|
-
code: 200
|
21
|
-
message: OK
|
22
|
-
headers:
|
23
|
-
Access-Control-Allow-Origin:
|
24
|
-
- "*"
|
25
|
-
Cache-Control:
|
26
|
-
- private, no-cache, no-store, must-revalidate
|
27
|
-
Content-Security-Policy:
|
28
|
-
- referrer no-referrer;
|
29
|
-
Content-Type:
|
30
|
-
- application/json; charset=utf-8
|
31
|
-
Date:
|
32
|
-
- Sun, 31 Jan 2016 22:42:56 GMT
|
33
|
-
Expires:
|
34
|
-
- Mon, 26 Jul 1997 05:00:00 GMT
|
35
|
-
Pragma:
|
36
|
-
- no-cache
|
37
|
-
Server:
|
38
|
-
- Apache
|
39
|
-
Strict-Transport-Security:
|
40
|
-
- max-age=31536000; includeSubDomains; preload
|
41
|
-
Vary:
|
42
|
-
- Accept-Encoding
|
43
|
-
X-Accepted-Oauth-Scopes:
|
44
|
-
- rtm:stream,client
|
45
|
-
X-Content-Type-Options:
|
46
|
-
- nosniff
|
47
|
-
X-Oauth-Scopes:
|
48
|
-
- identify,read,post,client
|
49
|
-
X-Xss-Protection:
|
50
|
-
- '0'
|
51
|
-
Content-Length:
|
52
|
-
- '7152'
|
53
|
-
Connection:
|
54
|
-
- keep-alive
|
55
|
-
body:
|
56
|
-
encoding: ASCII-8BIT
|
57
|
-
string: '{"ok":true,"self":{"id":"U07518DTL","name":"rubybot","prefs":{"highlight_words":"","user_colors":"","color_names_in_list":true,"growls_enabled":true,"tz":null,"push_dm_alert":true,"push_mention_alert":true,"msg_replies":"{
|
58
|
-
\"flexpane\":false }","push_everything":true,"push_idle_wait":2,"push_sound":"b2.mp3","push_loud_channels":"","push_mention_channels":"","push_loud_channels_set":"","email_alerts":"instant","email_alerts_sleep_until":0,"email_misc":true,"email_weekly":true,"welcome_message_hidden":false,"all_channels_loud":true,"loud_channels":"","never_channels":"","loud_channels_set":"","show_member_presence":true,"search_sort":"timestamp","expand_inline_imgs":true,"expand_internal_inline_imgs":true,"expand_snippets":false,"posts_formatting_guide":true,"seen_live_support_popup":false,"seen_welcome_2":false,"seen_ssb_prompt":false,"seen_spaces_new_xp_tooltip":false,"spaces_new_xp_banner_dismissed":false,"search_only_my_channels":false,"emoji_mode":"default","emoji_use":"","has_invited":false,"has_uploaded":false,"has_created_channel":false,"search_exclude_channels":"","messages_theme":"default","webapp_spellcheck":true,"no_joined_overlays":false,"no_created_overlays":false,"dropbox_enabled":false,"seen_domain_invite_reminder":false,"seen_member_invite_reminder":false,"mute_sounds":false,"arrow_history":false,"tab_ui_return_selects":true,"obey_inline_img_limit":true,"new_msg_snd":"knock_brush.mp3","collapsible":false,"collapsible_by_click":true,"require_at":false,"ssb_space_window":"","mac_ssb_bounce":"","mac_ssb_bullet":true,"expand_non_media_attachments":true,"show_typing":true,"pagekeys_handled":true,"last_snippet_type":"","display_real_names_override":0,"time24":false,"enter_is_special_in_tbt":false,"graphic_emoticons":false,"convert_emoticons":true,"autoplay_chat_sounds":true,"ss_emojis":true,"sidebar_behavior":"","seen_onboarding_start":false,"onboarding_cancelled":false,"seen_onboarding_slackbot_conversation":false,"seen_onboarding_channels":false,"seen_onboarding_direct_messages":false,"seen_onboarding_invites":false,"seen_onboarding_search":false,"seen_onboarding_recent_mentions":false,"seen_onboarding_starred_items":false,"seen_onboarding_private_groups":false,"onboarding_slackbot_conversation_step":0,"dnd_enabled":false,"dnd_start_hour":"22:00","dnd_end_hour":"08:00","mark_msgs_read_immediately":true,"start_scroll_at_oldest":true,"snippet_editor_wrap_long_lines":false,"ls_disabled":false,"sidebar_theme":"default","sidebar_theme_custom_values":"","f_key_search":false,"k_key_omnibox":true,"speak_growls":false,"mac_speak_voice":"com.apple.speech.synthesis.voice.Alex","mac_speak_speed":250,"comma_key_prefs":false,"at_channel_suppressed_channels":"","push_at_channel_suppressed_channels":"","prompted_for_email_disabling":false,"full_text_extracts":false,"no_text_in_notifications":false,"muted_channels":"","no_macssb1_banner":false,"no_winssb1_banner":false,"no_omnibox_in_channels":false,"k_key_omnibox_auto_hide_count":0,"hide_user_group_info_pane":false,"mentions_exclude_at_user_groups":false,"privacy_policy_seen":true,"search_exclude_bots":false,"fuzzy_matching":false,"load_lato_2":false,"fuller_timestamps":false,"last_seen_at_channel_warning":0,"flex_resize_window":false,"msg_preview":false,"msg_preview_displaces":true,"msg_preview_persistent":true,"emoji_autocomplete_big":false,"winssb_run_from_tray":true,"winssb_window_flash_behavior":"idle","two_factor_auth_enabled":false,"two_factor_type":null,"two_factor_backup_type":null,"mentions_exclude_at_channels":true,"confirm_clear_all_unreads":true,"confirm_user_marked_away":true,"box_enabled":false,"seen_single_emoji_msg":false,"confirm_sh_call_start":true,"preferred_skin_tone":"","show_all_skin_tones":false,"separate_private_channels":false,"whats_new_read":0,"hotness":false,"frecency_jumper":"","jumbomoji":false},"created":1435864712,"manual_presence":"active"},"team":{"id":"T04KB5WQH","name":"dblock","email_domain":"dblock.org","domain":"dblockdotorg","msg_edit_window_mins":-1,"prefs":{"default_channels":["C04KB5X4D","C04KB5X4Z"],"posts_migrating":0,"msg_edit_window_mins":-1,"allow_message_deletion":true,"hide_referers":true,"display_real_names":false,"disable_file_uploads":"allow_all","who_can_at_everyone":"regular","who_can_at_channel":"ra","warn_before_at_channel":"always","who_can_create_channels":"regular","who_can_create_shared_channels":"admin","who_can_archive_channels":"regular","who_can_create_groups":"ra","who_can_post_general":"ra","who_can_kick_channels":"admin","who_can_kick_groups":"regular","dnd_enabled":true,"dnd_start_hour":"22:00","dnd_end_hour":"08:00","allow_shared_channels":false,"who_has_team_visibility":"ra","who_can_create_delete_user_groups":"admin","who_can_edit_user_groups":"admin","who_can_change_team_profile":"admin","retention_type":0,"retention_duration":0,"group_retention_type":0,"group_retention_duration":0,"dm_retention_type":0,"dm_retention_duration":0,"file_retention_type":0,"file_retention_duration":0,"allow_retention_override":true,"require_at_for_mention":0,"compliance_export_start":0,"invites_only_admins":true,"auth_mode":"normal","who_can_manage_integrations":{"type":["regular"]}},"icon":{"image_34":"https:\/\/s3-us-west-2.amazonaws.com\/slack-files2\/avatars\/2015-04-28\/4657218807_d480d2ee610d2e8aacfe_34.jpg","image_44":"https:\/\/s3-us-west-2.amazonaws.com\/slack-files2\/avatars\/2015-04-28\/4657218807_d480d2ee610d2e8aacfe_44.jpg","image_68":"https:\/\/s3-us-west-2.amazonaws.com\/slack-files2\/avatars\/2015-04-28\/4657218807_d480d2ee610d2e8aacfe_68.jpg","image_88":"https:\/\/s3-us-west-2.amazonaws.com\/slack-files2\/avatars\/2015-04-28\/4657218807_d480d2ee610d2e8aacfe_88.jpg","image_102":"https:\/\/s3-us-west-2.amazonaws.com\/slack-files2\/avatars\/2015-04-28\/4657218807_d480d2ee610d2e8aacfe_102.jpg","image_132":"https:\/\/s3-us-west-2.amazonaws.com\/slack-files2\/avatars\/2015-04-28\/4657218807_d480d2ee610d2e8aacfe_132.jpg","image_original":"https:\/\/s3-us-west-2.amazonaws.com\/slack-files2\/avatars\/2015-04-28\/4657218807_d480d2ee610d2e8aacfe_original.jpg"},"over_storage_limit":false,"plan":"","over_integrations_limit":true},"latest_event_ts":"1454279576.000000","channels":[{"id":"C09C5GYHF","name":"a1","is_channel":true,"created":1440078580,"creator":"U04KB5WQR","is_archived":true,"is_general":false,"has_pins":false,"is_member":false},{"id":"C09C598QL","name":"a2","is_channel":true,"created":1440078625,"creator":"U04KB5WQR","is_archived":true,"is_general":false,"has_pins":false,"is_member":false},{"id":"C0ALZCCSC","name":"a3","is_channel":true,"created":1442284272,"creator":"U04KB5WQR","is_archived":true,"is_general":false,"has_pins":false,"is_member":false},{"id":"C09C5DS65","name":"aliases","is_channel":true,"created":1440078448,"creator":"U04KB5WQR","is_archived":true,"is_general":false,"has_pins":false,"is_member":false},{"id":"C092CEUTY","name":"art","is_channel":true,"created":1439479078,"creator":"U04KB5WQR","is_archived":true,"is_general":false,"has_pins":false,"is_member":false},{"id":"C0HLE6UMV","name":"botaliases","is_channel":true,"created":1451914370,"creator":"U04KB5WQR","is_archived":true,"is_general":false,"has_pins":false,"is_member":false},{"id":"C092FEFQU","name":"cab","is_channel":true,"created":1439481937,"creator":"U04KB5WQR","is_archived":true,"is_general":false,"has_pins":false,"is_member":false},{"id":"C0HNTD0CW","name":"chess","is_channel":true,"created":1452005790,"creator":"U04KB5WQR","is_archived":false,"is_general":false,"has_pins":false,"is_member":false},{"id":"C0HCU3R2S","name":"chess1","is_channel":true,"created":1451249172,"creator":"U04KB5WQR","is_archived":true,"is_general":false,"has_pins":false,"is_member":false},{"id":"C06JKEMJ8","name":"demo","is_channel":true,"created":1434735992,"creator":"U04KB5WQR","is_archived":false,"is_general":false,"has_pins":false,"is_member":false},{"id":"C06JKF1QQ","name":"example","is_channel":true,"created":1434736136,"creator":"U04KB5WQR","is_archived":true,"is_general":false,"has_pins":false,"is_member":false},{"id":"C0HU1L26L","name":"fs","is_channel":true,"created":1452177776,"creator":"U04KB5WQR","is_archived":false,"is_general":false,"has_pins":false,"is_member":false},{"id":"C04KB5X4D","name":"general","is_channel":true,"created":1430222230,"creator":"U04KB5WQR","is_archived":false,"is_general":true,"has_pins":false,"is_member":true,"last_read":"1435863302.000026","latest":{"type":"message","user":"U07518DTL","text":"Hello
|
59
|
-
World","ts":"1453587706.000054"},"unread_count":320,"unread_count_display":281,"members":["U04JPQ0JS","U04JZBDQQ","U04KB5WQR","U06JGTU5V","U07518DTL","U07KECJ77","U092BDCLV","U092V4E9L","U0EA7TZJN","U0H701CJZ","U0HLFUZLJ","U0HPMN0GY"],"topic":{"value":"","creator":"","last_set":0},"purpose":{"value":"This
|
60
|
-
channel is for team-wide communication and announcements. All team members
|
61
|
-
are in this channel.","creator":"","last_set":0}},{"id":"C0HLE0BBL","name":"gifs","is_channel":true,"created":1451913914,"creator":"U04KB5WQR","is_archived":true,"is_general":false,"has_pins":false,"is_member":false},{"id":"C092Y488H","name":"hack1","is_channel":true,"created":1439498209,"creator":"U092V4E9L","is_archived":false,"is_general":false,"has_pins":false,"is_member":false},{"id":"C0HE7877F","name":"kasparov","is_channel":true,"created":1451342301,"creator":"U04KB5WQR","is_archived":true,"is_general":false,"has_pins":false,"is_member":false},{"id":"C06JH25U4","name":"math","is_channel":true,"created":1434733062,"creator":"U04KB5WQR","is_archived":false,"is_general":false,"has_pins":false,"is_member":false},{"id":"C04M42N6Z","name":"mattz","is_channel":true,"created":1430514740,"creator":"U04KB5WQR","is_archived":false,"is_general":false,"has_pins":false,"is_member":false},{"id":"C0HLFUZD5","name":"playplay","is_channel":true,"created":1451916478,"creator":"U0HLFUZLJ","is_archived":true,"is_general":false,"has_pins":false,"is_member":false},{"id":"C0HNSS6H5","name":"pong","is_channel":true,"created":1452005545,"creator":"U04KB5WQR","is_archived":false,"is_general":false,"has_pins":false,"is_member":false},{"id":"C0HNQ6KEF","name":"pool","is_channel":true,"created":1452005604,"creator":"U04KB5WQR","is_archived":false,"is_general":false,"has_pins":false,"is_member":false},{"id":"C04KB5X4Z","name":"random","is_channel":true,"created":1430222230,"creator":"U04KB5WQR","is_archived":false,"is_general":false,"has_pins":false,"is_member":false},{"id":"C0751A9HC","name":"rubybot-demo","is_channel":true,"created":1435864859,"creator":"U04KB5WQR","is_archived":true,"is_general":false,"has_pins":false,"is_member":false},{"id":"C0JHNAB5H","name":"rubybot-test","is_channel":true,"created":1452870939,"creator":"U04KB5WQR","is_archived":false,"is_general":false,"has_pins":false,"is_member":true,"last_read":"1452870938.000002","latest":{"type":"message","user":"U07518DTL","text":"```\n{\n \"ok\":
|
62
|
-
true,\n \"args\": {\n \"token\": \"token\"\n }\n}```","ts":"1452871397.000067"},"unread_count":47,"unread_count_display":24,"members":["U04KB5WQR","U07518DTL"],"topic":{"value":"","creator":"","last_set":0},"purpose":{"value":"","creator":"","last_set":0}},{"id":"C0HTYU35K","name":"sh","is_channel":true,"created":1452178941,"creator":"U04KB5WQR","is_archived":false,"is_general":false,"has_pins":false,"is_member":true,"last_read":"1452178941.000002","latest":{"type":"message","user":"U07518DTL","text":"```\/test.txt```","ts":"1452296877.000020"},"unread_count":97,"unread_count_display":58,"members":["U04KB5WQR","U07518DTL"],"topic":{"value":"","creator":"","last_set":0},"purpose":{"value":"","creator":"","last_set":0}},{"id":"C0HPJ6XK2","name":"slackslack","is_channel":true,"created":1452022382,"creator":"U04KB5WQR","is_archived":true,"is_general":false,"has_pins":false,"is_member":false},{"id":"C0HPLJHU1","name":"slakslak","is_channel":true,"created":1452024884,"creator":"U04KB5WQR","is_archived":false,"is_general":false,"has_pins":false,"is_member":false},{"id":"C085YQLD8","name":"t1","is_channel":true,"created":1437855306,"creator":"U04KB5WQR","is_archived":true,"is_general":false,"has_pins":false,"is_member":false},{"id":"C085Z22NB","name":"t2","is_channel":true,"created":1437856697,"creator":"U04KB5WQR","is_archived":true,"is_general":false,"has_pins":false,"is_member":false},{"id":"C0860L4UU","name":"t3","is_channel":true,"created":1437863185,"creator":"U04KB5WQR","is_archived":true,"is_general":false,"has_pins":false,"is_member":false},{"id":"C0GPSJKJ8","name":"t4","is_channel":true,"created":1450273967,"creator":"U04KB5WQR","is_archived":true,"is_general":false,"has_pins":false,"is_member":false},{"id":"C0GPU3P53","name":"t5","is_channel":true,"created":1450274014,"creator":"U04KB5WQR","is_archived":true,"is_general":false,"has_pins":false,"is_member":false},{"id":"C0HPNR78C","name":"t6","is_channel":true,"created":1452030336,"creator":"U04KB5WQR","is_archived":true,"is_general":false,"has_pins":false,"is_member":false},{"id":"C0FEXLXGE","name":"tattletale","is_channel":true,"created":1448754718,"creator":"U04KB5WQR","is_archived":true,"is_general":false,"has_pins":false,"is_member":false},{"id":"C0HNTKC8G","name":"tictac","is_channel":true,"created":1452005621,"creator":"U04KB5WQR","is_archived":false,"is_general":false,"has_pins":false,"is_member":false},{"id":"C07S5SGGN","name":"weather","is_channel":true,"created":1437323916,"creator":"U04KB5WQR","is_archived":true,"is_general":false,"has_pins":false,"is_member":false},{"id":"C092V2M63","name":"whois","is_channel":true,"created":1439495329,"creator":"U092V4E9L","is_archived":false,"is_general":false,"has_pins":false,"is_member":false}],"groups":[{"id":"G0K7EV5A7","name":"mpdm-dblock--rubybot--player1-1","is_group":true,"created":1453561861,"creator":"U04KB5WQR","is_archived":false,"is_mpim":true,"has_pins":false,"is_open":false,"last_read":"0000000000.000000","latest":null,"unread_count":0,"unread_count_display":0,"members":["U04KB5WQR","U0HLFUZLJ","U07518DTL"],"topic":{"value":"Group
|
63
|
-
messaging","creator":"U04KB5WQR","last_set":1453561861},"purpose":{"value":"Group
|
64
|
-
messaging with: @dblock @rubybot @player1","creator":"U04KB5WQR","last_set":1453561861}}],"ims":[{"id":"D07519J57","is_im":true,"user":"USLACKBOT","created":1435864712,"has_pins":false,"last_read":"0000000000.000000","latest":{"text":"4576f752ce2734db8803d1689b896787","username":"bot","type":"message","subtype":"bot_message","ts":"1453474448.000004"},"unread_count":98,"unread_count_display":93,"is_open":true},{"id":"D0751GYBD","is_im":true,"user":"U04KB5WQR","created":1435864712,"has_pins":false,"last_read":"0000000000.000000","latest":{"type":"message","user":"U07518DTL","text":"Sorry
|
65
|
-
<@U04KB5WQR>, I don''t understand that command!\n<http:\/\/media1.giphy.com\/media\/nbaeOn3Ici544\/giphy.gif>","attachments":[{"fallback":"267x281px
|
66
|
-
image","image_url":"http:\/\/media1.giphy.com\/media\/nbaeOn3Ici544\/giphy.gif","image_width":267,"image_height":281,"image_bytes":848273,"from_url":"http:\/\/media1.giphy.com\/media\/nbaeOn3Ici544\/giphy.gif","id":1}],"ts":"1454103796.000015"},"unread_count":1000,"unread_count_display":1000,"is_open":true}],"cache_ts":1454280176,"subteams":{"self":[],"all":[]},"dnd":{"dnd_enabled":false,"next_dnd_start_ts":1,"next_dnd_end_ts":1,"snooze_enabled":false},"users":[{"id":"U092BDCLV","team_id":"T04KB5WQH","name":"artsy","deleted":true,"profile":{"bot_id":"B092B5DDG","image_24":"https:\/\/avatars.slack-edge.com\/2015-08-13\/9080316676_7bbab49314a0429c7f7d_24.jpg","image_32":"https:\/\/avatars.slack-edge.com\/2015-08-13\/9080316676_7bbab49314a0429c7f7d_32.jpg","image_48":"https:\/\/avatars.slack-edge.com\/2015-08-13\/9080316676_7bbab49314a0429c7f7d_48.jpg","image_72":"https:\/\/avatars.slack-edge.com\/2015-08-13\/9080316676_7bbab49314a0429c7f7d_48.jpg","image_192":"https:\/\/avatars.slack-edge.com\/2015-08-13\/9080316676_7bbab49314a0429c7f7d_48.jpg","image_512":"https:\/\/avatars.slack-edge.com\/2015-08-13\/9080316676_7bbab49314a0429c7f7d_48.jpg","image_1024":"https:\/\/avatars.slack-edge.com\/2015-08-13\/9080316676_7bbab49314a0429c7f7d_48.jpg","image_original":"https:\/\/avatars.slack-edge.com\/2015-08-13\/9080316676_7bbab49314a0429c7f7d_original.jpg","first_name":"Artsy","last_name":"Bot","title":"Searches
|
67
|
-
Artsy.","real_name":"Artsy Bot","real_name_normalized":"Artsy Bot","fields":null},"is_bot":true,"presence":"away"},{"id":"U07KECJ77","team_id":"T04KB5WQH","name":"aws","deleted":true,"profile":{"bot_id":"B07KECJ6R","image_24":"https:\/\/avatars.slack-edge.com\/2015-07-14\/7660472085_4755a86e204c9706c84f_24.jpg","image_32":"https:\/\/avatars.slack-edge.com\/2015-07-14\/7660472085_4755a86e204c9706c84f_32.jpg","image_48":"https:\/\/avatars.slack-edge.com\/2015-07-14\/7660472085_4755a86e204c9706c84f_48.jpg","image_72":"https:\/\/avatars.slack-edge.com\/2015-07-14\/7660472085_4755a86e204c9706c84f_48.jpg","image_192":"https:\/\/avatars.slack-edge.com\/2015-07-14\/7660472085_4755a86e204c9706c84f_48.jpg","image_original":"https:\/\/avatars.slack-edge.com\/2015-07-14\/7660472085_4755a86e204c9706c84f_original.jpg","first_name":"AWS","last_name":"Cloud","real_name":"AWS
|
68
|
-
Cloud","real_name_normalized":"AWS Cloud","fields":null},"is_bot":true,"presence":"away"},{"id":"U0EA7TZJN","team_id":"T04KB5WQH","name":"bar","deleted":true,"profile":{"bot_id":"B0EA31LQM","image_24":"https:\/\/avatars.slack-edge.com\/2015-11-11\/14346833313_f359ba59a1211d17912b_24.jpg","image_32":"https:\/\/avatars.slack-edge.com\/2015-11-11\/14346833313_f359ba59a1211d17912b_32.jpg","image_48":"https:\/\/avatars.slack-edge.com\/2015-11-11\/14346833313_f359ba59a1211d17912b_48.jpg","image_72":"https:\/\/avatars.slack-edge.com\/2015-11-11\/14346833313_f359ba59a1211d17912b_72.jpg","image_192":"https:\/\/avatars.slack-edge.com\/2015-11-11\/14346833313_f359ba59a1211d17912b_192.jpg","image_512":"https:\/\/avatars.slack-edge.com\/2015-11-11\/14346833313_f359ba59a1211d17912b_512.jpg","image_1024":"https:\/\/avatars.slack-edge.com\/2015-11-11\/14346833313_f359ba59a1211d17912b_512.jpg","image_original":"https:\/\/avatars.slack-edge.com\/2015-11-11\/14346833313_f359ba59a1211d17912b_original.jpg","real_name":"","real_name_normalized":"","fields":null},"is_bot":true,"presence":"away"},{"id":"U092V4E9L","team_id":"T04KB5WQH","name":"broskoski","deleted":true,"profile":{"first_name":"Cab","real_name":"Cab","real_name_normalized":"Cab","email":"cab@artsymail.com","image_24":"https:\/\/secure.gravatar.com\/avatar\/99621cbca6ea94706a8f5dcdc5e8af4a.jpg?s=24&d=https%3A%2F%2Fslack.global.ssl.fastly.net%2F0180%2Fimg%2Favatars%2Fava_0017-24.png","image_32":"https:\/\/secure.gravatar.com\/avatar\/99621cbca6ea94706a8f5dcdc5e8af4a.jpg?s=32&d=https%3A%2F%2Fslack.global.ssl.fastly.net%2F66f9%2Fimg%2Favatars%2Fava_0017-32.png","image_48":"https:\/\/secure.gravatar.com\/avatar\/99621cbca6ea94706a8f5dcdc5e8af4a.jpg?s=48&d=https%3A%2F%2Fslack.global.ssl.fastly.net%2F66f9%2Fimg%2Favatars%2Fava_0017-48.png","image_72":"https:\/\/secure.gravatar.com\/avatar\/99621cbca6ea94706a8f5dcdc5e8af4a.jpg?s=72&d=https%3A%2F%2Fslack.global.ssl.fastly.net%2F66f9%2Fimg%2Favatars%2Fava_0017-72.png","image_192":"https:\/\/secure.gravatar.com\/avatar\/99621cbca6ea94706a8f5dcdc5e8af4a.jpg?s=192&d=https%3A%2F%2Fslack.global.ssl.fastly.net%2F7fa9%2Fimg%2Favatars%2Fava_0017-192.png","image_512":"https:\/\/secure.gravatar.com\/avatar\/99621cbca6ea94706a8f5dcdc5e8af4a.jpg?s=512&d=https%3A%2F%2Fslack.global.ssl.fastly.net%2F7fa9%2Fimg%2Favatars%2Fava_0017-512.png","fields":null},"presence":"away"},{"id":"U0H701CJZ","team_id":"T04KB5WQH","name":"chessbot","deleted":false,"status":null,"color":"df3dc0","real_name":"PlayPlay.io
|
69
|
-
- Chess for Slack","tz":null,"tz_label":"Pacific Standard Time","tz_offset":-28800,"profile":{"first_name":"PlayPlay.io
|
70
|
-
- Chess for Slack","bot_id":"B0H74MK3J","api_app_id":"A0H70N5C3","avatar_hash":"5bb4aaddb73b","image_24":"https:\/\/avatars.slack-edge.com\/2015-12-25\/17392306678_5bb4aaddb73b7f2a86c3_24.png","image_32":"https:\/\/avatars.slack-edge.com\/2015-12-25\/17392306678_5bb4aaddb73b7f2a86c3_32.png","image_48":"https:\/\/avatars.slack-edge.com\/2015-12-25\/17392306678_5bb4aaddb73b7f2a86c3_48.png","image_72":"https:\/\/avatars.slack-edge.com\/2015-12-25\/17392306678_5bb4aaddb73b7f2a86c3_72.png","image_192":"https:\/\/avatars.slack-edge.com\/2015-12-25\/17392306678_5bb4aaddb73b7f2a86c3_192.png","image_512":"https:\/\/avatars.slack-edge.com\/2015-12-25\/17392306678_5bb4aaddb73b7f2a86c3_512.png","image_1024":"https:\/\/avatars.slack-edge.com\/2015-12-25\/17392306678_5bb4aaddb73b7f2a86c3_512.png","image_original":"https:\/\/avatars.slack-edge.com\/2015-12-25\/17392306678_5bb4aaddb73b7f2a86c3_original.png","real_name":"PlayPlay.io
|
71
|
-
- Chess for Slack","real_name_normalized":"PlayPlay.io - Chess for Slack","fields":null},"is_admin":false,"is_owner":false,"is_primary_owner":false,"is_restricted":false,"is_ultra_restricted":false,"is_bot":true,"presence":"active"},{"id":"U04KB5WQR","team_id":"T04KB5WQH","name":"dblock","deleted":false,"status":null,"color":"9f69e7","real_name":"Dan","tz":"America\/Indiana\/Indianapolis","tz_label":"Eastern
|
72
|
-
Standard Time","tz_offset":-18000,"profile":{"fields":[],"first_name":"Dan","last_name":"","title":"","phone":"","skype":"","real_name":"Dan","real_name_normalized":"Dan","email":"dblock@dblock.org","image_24":"https:\/\/secure.gravatar.com\/avatar\/3d925b45ac07ec0ae5bd04888f6c5b61.jpg?s=24&d=https%3A%2F%2Fslack.global.ssl.fastly.net%2F66f9%2Fimg%2Favatars%2Fava_0015-24.png","image_32":"https:\/\/secure.gravatar.com\/avatar\/3d925b45ac07ec0ae5bd04888f6c5b61.jpg?s=32&d=https%3A%2F%2Fslack.global.ssl.fastly.net%2F66f9%2Fimg%2Favatars%2Fava_0015-32.png","image_48":"https:\/\/secure.gravatar.com\/avatar\/3d925b45ac07ec0ae5bd04888f6c5b61.jpg?s=48&d=https%3A%2F%2Fslack.global.ssl.fastly.net%2F66f9%2Fimg%2Favatars%2Fava_0015-48.png","image_72":"https:\/\/secure.gravatar.com\/avatar\/3d925b45ac07ec0ae5bd04888f6c5b61.jpg?s=72&d=https%3A%2F%2Fslack.global.ssl.fastly.net%2F66f9%2Fimg%2Favatars%2Fava_0015-72.png","image_192":"https:\/\/secure.gravatar.com\/avatar\/3d925b45ac07ec0ae5bd04888f6c5b61.jpg?s=192&d=https%3A%2F%2Fslack.global.ssl.fastly.net%2F7fa9%2Fimg%2Favatars%2Fava_0015-192.png","image_512":"https:\/\/secure.gravatar.com\/avatar\/3d925b45ac07ec0ae5bd04888f6c5b61.jpg?s=512&d=https%3A%2F%2Fslack.global.ssl.fastly.net%2F7fa9%2Fimg%2Favatars%2Fava_0015-512.png"},"is_admin":true,"is_owner":true,"is_primary_owner":true,"is_restricted":false,"is_ultra_restricted":false,"is_bot":false,"presence":"active"},{"id":"U04JZBDQQ","team_id":"T04KB5WQH","name":"foo","deleted":true,"profile":{"bot_id":"B04JZBDQC","image_24":"https:\/\/avatars.slack-edge.com\/2015-04-28\/4645387956_44604ca32e800d947f22_24.jpg","image_32":"https:\/\/avatars.slack-edge.com\/2015-04-28\/4645387956_44604ca32e800d947f22_32.jpg","image_48":"https:\/\/avatars.slack-edge.com\/2015-04-28\/4645387956_44604ca32e800d947f22_48.jpg","image_72":"https:\/\/avatars.slack-edge.com\/2015-04-28\/4645387956_44604ca32e800d947f22_72.jpg","image_192":"https:\/\/avatars.slack-edge.com\/2015-04-28\/4645387956_44604ca32e800d947f22_192.jpg","image_original":"https:\/\/avatars.slack-edge.com\/2015-04-28\/4645387956_44604ca32e800d947f22_original.jpg","real_name":"","real_name_normalized":"","fields":null},"is_bot":true,"presence":"away"},{"id":"U04JPQ0JS","team_id":"T04KB5WQH","name":"gamebot","deleted":true,"profile":{"bot_id":"B04JPQ0JE","image_24":"https:\/\/avatars.slack-edge.com\/2015-04-28\/4635825662_28d3661bf00dc6013442_24.jpg","image_32":"https:\/\/avatars.slack-edge.com\/2015-04-28\/4635825662_28d3661bf00dc6013442_32.jpg","image_48":"https:\/\/avatars.slack-edge.com\/2015-04-28\/4635825662_28d3661bf00dc6013442_48.jpg","image_72":"https:\/\/avatars.slack-edge.com\/2015-04-28\/4635825662_28d3661bf00dc6013442_48.jpg","image_192":"https:\/\/avatars.slack-edge.com\/2015-04-28\/4635825662_28d3661bf00dc6013442_48.jpg","image_original":"https:\/\/avatars.slack-edge.com\/2015-04-28\/4635825662_28d3661bf00dc6013442_original.jpg","first_name":"Game","last_name":"Bot","title":"Game
|
73
|
-
ons.","real_name":"Game Bot","real_name_normalized":"Game Bot","fields":null},"is_bot":true,"presence":"away"},{"id":"U06JGTU5V","team_id":"T04KB5WQH","name":"mathbot","deleted":true,"profile":{"bot_id":"B06JH1N93","image_24":"https:\/\/avatars.slack-edge.com\/2015-06-19\/6629501812_c507c80d735dfc75bbc8_24.jpg","image_32":"https:\/\/avatars.slack-edge.com\/2015-06-19\/6629501812_c507c80d735dfc75bbc8_32.jpg","image_48":"https:\/\/avatars.slack-edge.com\/2015-06-19\/6629501812_c507c80d735dfc75bbc8_48.jpg","image_72":"https:\/\/avatars.slack-edge.com\/2015-06-19\/6629501812_c507c80d735dfc75bbc8_48.jpg","image_192":"https:\/\/avatars.slack-edge.com\/2015-06-19\/6629501812_c507c80d735dfc75bbc8_48.jpg","image_original":"https:\/\/avatars.slack-edge.com\/2015-06-19\/6629501812_c507c80d735dfc75bbc8_original.jpg","first_name":"Math","last_name":"Bot","real_name":"Math
|
74
|
-
Bot","real_name_normalized":"Math Bot","fields":null},"is_bot":true,"presence":"away"},{"id":"U0HLFUZLJ","team_id":"T04KB5WQH","name":"player1","deleted":false,"status":null,"color":"d58247","real_name":"Player
|
75
|
-
1","tz":"America\/Indiana\/Indianapolis","tz_label":"Eastern Standard Time","tz_offset":-18000,"profile":{"first_name":"Player","last_name":"1","avatar_hash":"gcde4e113736","real_name":"Player
|
76
|
-
1","real_name_normalized":"Player 1","email":"dblock+player1@dblock.org","image_24":"https:\/\/secure.gravatar.com\/avatar\/cde4e1137364cf971f15160113b04e86.jpg?s=24&d=https%3A%2F%2Fslack.global.ssl.fastly.net%2F66f9%2Fimg%2Favatars%2Fava_0009-24.png","image_32":"https:\/\/secure.gravatar.com\/avatar\/cde4e1137364cf971f15160113b04e86.jpg?s=32&d=https%3A%2F%2Fslack.global.ssl.fastly.net%2F66f9%2Fimg%2Favatars%2Fava_0009-32.png","image_48":"https:\/\/secure.gravatar.com\/avatar\/cde4e1137364cf971f15160113b04e86.jpg?s=48&d=https%3A%2F%2Fslack.global.ssl.fastly.net%2F66f9%2Fimg%2Favatars%2Fava_0009-48.png","image_72":"https:\/\/secure.gravatar.com\/avatar\/cde4e1137364cf971f15160113b04e86.jpg?s=72&d=https%3A%2F%2Fslack.global.ssl.fastly.net%2F66f9%2Fimg%2Favatars%2Fava_0009-72.png","image_192":"https:\/\/secure.gravatar.com\/avatar\/cde4e1137364cf971f15160113b04e86.jpg?s=192&d=https%3A%2F%2Fslack.global.ssl.fastly.net%2F7fa9%2Fimg%2Favatars%2Fava_0009-192.png","image_512":"https:\/\/secure.gravatar.com\/avatar\/cde4e1137364cf971f15160113b04e86.jpg?s=512&d=https%3A%2F%2Fslack.global.ssl.fastly.net%2F7fa9%2Fimg%2Favatars%2Fava_0009-512.png","fields":null},"is_admin":false,"is_owner":false,"is_primary_owner":false,"is_restricted":false,"is_ultra_restricted":false,"is_bot":false,"presence":"away"},{"id":"U0H15MV1R","team_id":"T04KB5WQH","name":"pongbot","deleted":false,"status":null,"color":"99a949","real_name":"PlayPlay.io
|
77
|
-
- Ping-Pong for Slack","tz":null,"tz_label":"Pacific Standard Time","tz_offset":-28800,"profile":{"first_name":"PlayPlay.io
|
78
|
-
- Ping-Pong for Slack","bot_id":"B0H184MLZ","api_app_id":"A0H0ZJHP0","avatar_hash":"7deb687e1284","image_24":"https:\/\/avatars.slack-edge.com\/2016-01-11\/18253837687_7deb687e1284211067e9_24.png","image_32":"https:\/\/avatars.slack-edge.com\/2016-01-11\/18253837687_7deb687e1284211067e9_32.png","image_48":"https:\/\/avatars.slack-edge.com\/2016-01-11\/18253837687_7deb687e1284211067e9_48.png","image_72":"https:\/\/avatars.slack-edge.com\/2016-01-11\/18253837687_7deb687e1284211067e9_72.png","image_192":"https:\/\/avatars.slack-edge.com\/2016-01-11\/18253837687_7deb687e1284211067e9_192.png","image_512":"https:\/\/avatars.slack-edge.com\/2016-01-11\/18253837687_7deb687e1284211067e9_512.png","image_1024":"https:\/\/avatars.slack-edge.com\/2016-01-11\/18253837687_7deb687e1284211067e9_512.png","image_original":"https:\/\/avatars.slack-edge.com\/2016-01-11\/18253837687_7deb687e1284211067e9_original.png","real_name":"PlayPlay.io
|
79
|
-
- Ping-Pong for Slack","real_name_normalized":"PlayPlay.io - Ping-Pong for
|
80
|
-
Slack","fields":null},"is_admin":false,"is_owner":false,"is_primary_owner":false,"is_restricted":false,"is_ultra_restricted":false,"is_bot":true,"presence":"active"},{"id":"U0HC7MSEA","team_id":"T04KB5WQH","name":"poolbot","deleted":false,"status":null,"color":"4cc091","real_name":"PlayPlay.io
|
81
|
-
- Billiards for Slack","tz":null,"tz_label":"Pacific Standard Time","tz_offset":-28800,"profile":{"first_name":"PlayPlay.io
|
82
|
-
- Billiards for Slack","bot_id":"B0HC7D1SN","api_app_id":"A0HC74EET","avatar_hash":"834b5aefa301","image_24":"https:\/\/avatars.slack-edge.com\/2015-12-26\/17415480311_834b5aefa3013ce926b2_24.png","image_32":"https:\/\/avatars.slack-edge.com\/2015-12-26\/17415480311_834b5aefa3013ce926b2_32.png","image_48":"https:\/\/avatars.slack-edge.com\/2015-12-26\/17415480311_834b5aefa3013ce926b2_48.png","image_72":"https:\/\/avatars.slack-edge.com\/2015-12-26\/17415480311_834b5aefa3013ce926b2_72.png","image_192":"https:\/\/avatars.slack-edge.com\/2015-12-26\/17415480311_834b5aefa3013ce926b2_192.png","image_512":"https:\/\/avatars.slack-edge.com\/2015-12-26\/17415480311_834b5aefa3013ce926b2_512.png","image_1024":"https:\/\/avatars.slack-edge.com\/2015-12-26\/17415480311_834b5aefa3013ce926b2_512.png","image_original":"https:\/\/avatars.slack-edge.com\/2015-12-26\/17415480311_834b5aefa3013ce926b2_original.png","real_name":"PlayPlay.io
|
83
|
-
- Billiards for Slack","real_name_normalized":"PlayPlay.io - Billiards for
|
84
|
-
Slack","fields":null},"is_admin":false,"is_owner":false,"is_primary_owner":false,"is_restricted":false,"is_ultra_restricted":false,"is_bot":true,"presence":"active"},{"id":"U07518DTL","team_id":"T04KB5WQH","name":"rubybot","deleted":false,"status":null,"color":"674b1b","real_name":"","tz":null,"tz_label":"Pacific
|
85
|
-
Standard Time","tz_offset":-28800,"profile":{"bot_id":"B0751JU2H","image_24":"https:\/\/avatars.slack-edge.com\/2015-07-02\/7171641589_359bf095c1fe0841e582_24.jpg","image_32":"https:\/\/avatars.slack-edge.com\/2015-07-02\/7171641589_359bf095c1fe0841e582_32.jpg","image_48":"https:\/\/avatars.slack-edge.com\/2015-07-02\/7171641589_359bf095c1fe0841e582_48.jpg","image_72":"https:\/\/avatars.slack-edge.com\/2015-07-02\/7171641589_359bf095c1fe0841e582_48.jpg","image_192":"https:\/\/avatars.slack-edge.com\/2015-07-02\/7171641589_359bf095c1fe0841e582_48.jpg","image_original":"https:\/\/avatars.slack-edge.com\/2015-07-02\/7171641589_359bf095c1fe0841e582_original.jpg","title":"Also
|
86
|
-
used in Travis-CI for slack-ruby-client.","real_name":"","real_name_normalized":"","fields":null},"is_admin":false,"is_owner":false,"is_primary_owner":false,"is_restricted":false,"is_ultra_restricted":false,"is_bot":true,"presence":"away"},{"id":"U0GPR6KDJ","team_id":"T04KB5WQH","name":"slackbotserver","deleted":false,"status":null,"color":"2b6836","real_name":"slack-bot-server","tz":null,"tz_label":"Pacific
|
87
|
-
Standard Time","tz_offset":-28800,"profile":{"first_name":"slack-bot-server","bot_id":"B0GPWQWHY","api_app_id":"A0GPRTG9Z","avatar_hash":"g36f3834829d","real_name":"slack-bot-server","real_name_normalized":"slack-bot-server","image_24":"https:\/\/secure.gravatar.com\/avatar\/36f3834829d1ec429f7d6acebccc7641.jpg?s=24&d=https%3A%2F%2Fslack.global.ssl.fastly.net%2F66f9%2Fimg%2Favatars%2Fava_0008-24.png","image_32":"https:\/\/secure.gravatar.com\/avatar\/36f3834829d1ec429f7d6acebccc7641.jpg?s=32&d=https%3A%2F%2Fslack.global.ssl.fastly.net%2F66f9%2Fimg%2Favatars%2Fava_0008-32.png","image_48":"https:\/\/secure.gravatar.com\/avatar\/36f3834829d1ec429f7d6acebccc7641.jpg?s=48&d=https%3A%2F%2Fslack.global.ssl.fastly.net%2F66f9%2Fimg%2Favatars%2Fava_0008-48.png","image_72":"https:\/\/secure.gravatar.com\/avatar\/36f3834829d1ec429f7d6acebccc7641.jpg?s=72&d=https%3A%2F%2Fslack.global.ssl.fastly.net%2F66f9%2Fimg%2Favatars%2Fava_0008-72.png","image_192":"https:\/\/secure.gravatar.com\/avatar\/36f3834829d1ec429f7d6acebccc7641.jpg?s=192&d=https%3A%2F%2Fslack.global.ssl.fastly.net%2F7fa9%2Fimg%2Favatars%2Fava_0008-192.png","image_512":"https:\/\/secure.gravatar.com\/avatar\/36f3834829d1ec429f7d6acebccc7641.jpg?s=512&d=https%3A%2F%2Fslack.global.ssl.fastly.net%2F7fa9%2Fimg%2Favatars%2Fava_0008-512.png","fields":null},"is_admin":false,"is_owner":false,"is_primary_owner":false,"is_restricted":false,"is_ultra_restricted":false,"is_bot":true,"presence":"away"},{"id":"U0HPMN0GY","team_id":"T04KB5WQH","name":"slak","deleted":true,"profile":{"first_name":"API
|
88
|
-
Explorer","bot_id":"B0HPLG4M7","api_app_id":"A0HP7340N","avatar_hash":"36be3c0d4513","image_24":"https:\/\/avatars.slack-edge.com\/2016-01-21\/19073458786_36be3c0d451350c9f03b_24.png","image_32":"https:\/\/avatars.slack-edge.com\/2016-01-21\/19073458786_36be3c0d451350c9f03b_32.png","image_48":"https:\/\/avatars.slack-edge.com\/2016-01-21\/19073458786_36be3c0d451350c9f03b_48.png","image_72":"https:\/\/avatars.slack-edge.com\/2016-01-21\/19073458786_36be3c0d451350c9f03b_72.png","image_192":"https:\/\/avatars.slack-edge.com\/2016-01-21\/19073458786_36be3c0d451350c9f03b_192.png","image_512":"https:\/\/avatars.slack-edge.com\/2016-01-21\/19073458786_36be3c0d451350c9f03b_512.png","image_1024":"https:\/\/avatars.slack-edge.com\/2016-01-21\/19073458786_36be3c0d451350c9f03b_512.png","image_original":"https:\/\/avatars.slack-edge.com\/2016-01-21\/19073458786_36be3c0d451350c9f03b_original.png","real_name":"API
|
89
|
-
Explorer","real_name_normalized":"API Explorer","fields":null},"is_bot":true,"presence":"away"},{"id":"U0HF43KT7","team_id":"T04KB5WQH","name":"tictactoe","deleted":false,"status":null,"color":"9b3b45","real_name":"PlayPlay.io
|
90
|
-
- Tic-Tac-Toe for Slack","tz":null,"tz_label":"Pacific Standard Time","tz_offset":-28800,"profile":{"first_name":"PlayPlay.io
|
91
|
-
- Tic-Tac-Toe for Slack","bot_id":"B0HF56491","api_app_id":"A0HF3E0AH","avatar_hash":"0b97b85448da","image_24":"https:\/\/avatars.slack-edge.com\/2015-12-29\/17536998294_0b97b85448da1dc95c83_24.png","image_32":"https:\/\/avatars.slack-edge.com\/2015-12-29\/17536998294_0b97b85448da1dc95c83_32.png","image_48":"https:\/\/avatars.slack-edge.com\/2015-12-29\/17536998294_0b97b85448da1dc95c83_48.png","image_72":"https:\/\/avatars.slack-edge.com\/2015-12-29\/17536998294_0b97b85448da1dc95c83_72.png","image_192":"https:\/\/avatars.slack-edge.com\/2015-12-29\/17536998294_0b97b85448da1dc95c83_192.png","image_512":"https:\/\/avatars.slack-edge.com\/2015-12-29\/17536998294_0b97b85448da1dc95c83_512.png","image_1024":"https:\/\/avatars.slack-edge.com\/2015-12-29\/17536998294_0b97b85448da1dc95c83_512.png","image_original":"https:\/\/avatars.slack-edge.com\/2015-12-29\/17536998294_0b97b85448da1dc95c83_original.png","real_name":"PlayPlay.io
|
92
|
-
- Tic-Tac-Toe for Slack","real_name_normalized":"PlayPlay.io - Tic-Tac-Toe
|
93
|
-
for Slack","fields":null},"is_admin":false,"is_owner":false,"is_primary_owner":false,"is_restricted":false,"is_ultra_restricted":false,"is_bot":true,"presence":"active"},{"id":"U0J1GAHN1","team_id":"T04KB5WQH","name":"travis-ci","deleted":false,"status":null,"color":"5a4592","real_name":"","tz":null,"tz_label":"Pacific
|
94
|
-
Standard Time","tz_offset":-28800,"profile":{"bot_id":"B0J1L75DY","api_app_id":"","avatar_hash":"dd0191970c25","image_24":"https:\/\/avatars.slack-edge.com\/2016-01-08\/18054871664_dd0191970c25e54ef23f_24.png","image_32":"https:\/\/avatars.slack-edge.com\/2016-01-08\/18054871664_dd0191970c25e54ef23f_32.png","image_48":"https:\/\/avatars.slack-edge.com\/2016-01-08\/18054871664_dd0191970c25e54ef23f_48.png","image_72":"https:\/\/avatars.slack-edge.com\/2016-01-08\/18054871664_dd0191970c25e54ef23f_72.png","image_192":"https:\/\/avatars.slack-edge.com\/2016-01-08\/18054871664_dd0191970c25e54ef23f_192.png","image_512":"https:\/\/avatars.slack-edge.com\/2016-01-08\/18054871664_dd0191970c25e54ef23f_512.png","image_1024":"https:\/\/avatars.slack-edge.com\/2016-01-08\/18054871664_dd0191970c25e54ef23f_512.png","image_original":"https:\/\/avatars.slack-edge.com\/2016-01-08\/18054871664_dd0191970c25e54ef23f_original.png","title":"Used
|
95
|
-
for Travis-CI integration tests on https:\/\/github.com\/dblock\/slack-ruby-client.","real_name":"","real_name_normalized":"","fields":null},"is_admin":false,"is_owner":false,"is_primary_owner":false,"is_restricted":false,"is_ultra_restricted":false,"is_bot":true,"presence":"away"},{"id":"USLACKBOT","team_id":"T04KB5WQH","name":"slackbot","deleted":false,"status":null,"color":"757575","real_name":"slackbot","tz":null,"tz_label":"Pacific
|
96
|
-
Standard Time","tz_offset":-28800,"profile":{"first_name":"slackbot","last_name":"","image_24":"https:\/\/slack.global.ssl.fastly.net\/0180\/img\/slackbot_24.png","image_32":"https:\/\/slack.global.ssl.fastly.net\/66f9\/img\/slackbot_32.png","image_48":"https:\/\/slack.global.ssl.fastly.net\/66f9\/img\/slackbot_48.png","image_72":"https:\/\/slack.global.ssl.fastly.net\/0180\/img\/slackbot_72.png","image_192":"https:\/\/slack.global.ssl.fastly.net\/66f9\/img\/slackbot_192.png","image_512":"https:\/\/slack.global.ssl.fastly.net\/7fa9\/img\/slackbot_512.png","avatar_hash":"sv1444671949","real_name":"slackbot","real_name_normalized":"slackbot","email":null,"fields":null},"is_admin":false,"is_owner":false,"is_primary_owner":false,"is_restricted":false,"is_ultra_restricted":false,"is_bot":false,"presence":"active"}],"cache_version":"v12-rats","cache_ts_version":"v1-cat","bots":[{"id":"B0751JU2H","deleted":false,"name":"bot","icons":{"image_36":"https:\/\/slack.global.ssl.fastly.net\/12b5a\/plugins\/bot\/assets\/service_36.png","image_48":"https:\/\/slack.global.ssl.fastly.net\/12b5a\/plugins\/bot\/assets\/service_48.png","image_72":"https:\/\/slack.global.ssl.fastly.net\/12b5a\/plugins\/bot\/assets\/service_72.png"}},{"id":"B0AFSEC0Z","deleted":false,"name":"slash-commands","icons":{"image_36":"https:\/\/slack.global.ssl.fastly.net\/12b5a\/plugins\/slash_commands\/assets\/service_36.png","image_48":"https:\/\/slack.global.ssl.fastly.net\/12b5a\/plugins\/slash_commands\/assets\/service_48.png","image_72":"https:\/\/slack.global.ssl.fastly.net\/12b5a\/plugins\/slash_commands\/assets\/service_72.png"}},{"id":"B0GPWQWHY","deleted":false,"name":"slack-bot-server","icons":{"image_36":"https:\/\/slack.global.ssl.fastly.net\/12b5a\/plugins\/app\/assets\/service_36.png","image_48":"https:\/\/slack.global.ssl.fastly.net\/12b5a\/plugins\/app\/assets\/service_48.png","image_72":"https:\/\/slack.global.ssl.fastly.net\/12b5a\/plugins\/app\/assets\/service_72.png"}},{"id":"B0H184MLZ","deleted":false,"name":"PlayPlay.io
|
97
|
-
- Ping-Pong for Slack","icons":{"image_36":"https:\/\/s3-us-west-2.amazonaws.com\/slack-files2\/avatars\/2015-12-19\/17068126628_26197be640f5b341e017_36.png","image_48":"https:\/\/s3-us-west-2.amazonaws.com\/slack-files2\/avatars\/2015-12-19\/17068126628_26197be640f5b341e017_48.png","image_72":"https:\/\/s3-us-west-2.amazonaws.com\/slack-files2\/avatars\/2015-12-19\/17068126628_26197be640f5b341e017_72.png"}},{"id":"B0H74MK3J","deleted":false,"name":"PlayPlay.io
|
98
|
-
- Chess for Slack","icons":{"image_36":"https:\/\/s3-us-west-2.amazonaws.com\/slack-files2\/avatars\/2015-12-22\/17242566018_86a79b66c6884f7b41b4_36.png","image_48":"https:\/\/s3-us-west-2.amazonaws.com\/slack-files2\/avatars\/2015-12-22\/17242566018_86a79b66c6884f7b41b4_48.png","image_72":"https:\/\/s3-us-west-2.amazonaws.com\/slack-files2\/avatars\/2015-12-22\/17242566018_86a79b66c6884f7b41b4_72.png"}},{"id":"B0HC7D1SN","deleted":false,"name":"PlayPlay.io
|
99
|
-
- Billiards for Slack","icons":{"image_36":"https:\/\/s3-us-west-2.amazonaws.com\/slack-files2\/avatars\/2015-12-26\/17414662001_31808d5c91a3ec3d1352_36.png","image_48":"https:\/\/s3-us-west-2.amazonaws.com\/slack-files2\/avatars\/2015-12-26\/17414662001_31808d5c91a3ec3d1352_48.png","image_72":"https:\/\/s3-us-west-2.amazonaws.com\/slack-files2\/avatars\/2015-12-26\/17414662001_31808d5c91a3ec3d1352_72.png"}},{"id":"B0HF56491","deleted":false,"name":"PlayPlay.io
|
100
|
-
- Tic-Tac-Toe for Slack","icons":{"image_36":"https:\/\/s3-us-west-2.amazonaws.com\/slack-files2\/avatars\/2015-12-29\/17517672695_9aa1fb32ea85b923e2ca_36.png","image_48":"https:\/\/s3-us-west-2.amazonaws.com\/slack-files2\/avatars\/2015-12-29\/17517672695_9aa1fb32ea85b923e2ca_48.png","image_72":"https:\/\/s3-us-west-2.amazonaws.com\/slack-files2\/avatars\/2015-12-29\/17517672695_9aa1fb32ea85b923e2ca_72.png"}},{"id":"B0J1L75DY","deleted":false,"name":"bot","icons":{"image_36":"https:\/\/slack.global.ssl.fastly.net\/12b5a\/plugins\/bot\/assets\/service_36.png","image_48":"https:\/\/slack.global.ssl.fastly.net\/12b5a\/plugins\/bot\/assets\/service_48.png","image_72":"https:\/\/slack.global.ssl.fastly.net\/12b5a\/plugins\/bot\/assets\/service_72.png"}},{"id":"B04JZBDQC","deleted":true,"name":"bot","icons":{"image_36":"https:\/\/slack.global.ssl.fastly.net\/12b5a\/plugins\/bot\/assets\/service_36.png","image_48":"https:\/\/slack.global.ssl.fastly.net\/12b5a\/plugins\/bot\/assets\/service_48.png","image_72":"https:\/\/slack.global.ssl.fastly.net\/12b5a\/plugins\/bot\/assets\/service_72.png"}},{"id":"B07KECJ6R","deleted":true,"name":"bot","icons":{"image_36":"https:\/\/slack.global.ssl.fastly.net\/12b5a\/plugins\/bot\/assets\/service_36.png","image_48":"https:\/\/slack.global.ssl.fastly.net\/12b5a\/plugins\/bot\/assets\/service_48.png","image_72":"https:\/\/slack.global.ssl.fastly.net\/12b5a\/plugins\/bot\/assets\/service_72.png"}},{"id":"B0EA31LQM","deleted":true,"name":"bot","icons":{"image_36":"https:\/\/slack.global.ssl.fastly.net\/12b5a\/plugins\/bot\/assets\/service_36.png","image_48":"https:\/\/slack.global.ssl.fastly.net\/12b5a\/plugins\/bot\/assets\/service_48.png","image_72":"https:\/\/slack.global.ssl.fastly.net\/12b5a\/plugins\/bot\/assets\/service_72.png"}},{"id":"B06JH1N93","deleted":true,"name":"bot","icons":{"image_36":"https:\/\/slack.global.ssl.fastly.net\/12b5a\/plugins\/bot\/assets\/service_36.png","image_48":"https:\/\/slack.global.ssl.fastly.net\/12b5a\/plugins\/bot\/assets\/service_48.png","image_72":"https:\/\/slack.global.ssl.fastly.net\/12b5a\/plugins\/bot\/assets\/service_72.png"}},{"id":"B04JPNS2Y","deleted":true,"name":"gdrive"},{"id":"B092B5DDG","deleted":true,"name":"bot","icons":{"image_36":"https:\/\/slack.global.ssl.fastly.net\/12b5a\/plugins\/bot\/assets\/service_36.png","image_48":"https:\/\/slack.global.ssl.fastly.net\/12b5a\/plugins\/bot\/assets\/service_48.png","image_72":"https:\/\/slack.global.ssl.fastly.net\/12b5a\/plugins\/bot\/assets\/service_72.png"}},{"id":"B04JPQ0JE","deleted":true,"name":"bot","icons":{"image_36":"https:\/\/slack.global.ssl.fastly.net\/12b5a\/plugins\/bot\/assets\/service_36.png","image_48":"https:\/\/slack.global.ssl.fastly.net\/12b5a\/plugins\/bot\/assets\/service_48.png","image_72":"https:\/\/slack.global.ssl.fastly.net\/12b5a\/plugins\/bot\/assets\/service_72.png"}},{"id":"B0HPLG4M7","deleted":true,"name":"API
|
101
|
-
Explorer","icons":{"image_36":"https:\/\/s3-us-west-2.amazonaws.com\/slack-files2\/avatars\/2016-01-21\/19073538231_edf8d896148b6bfef790_36.png","image_48":"https:\/\/s3-us-west-2.amazonaws.com\/slack-files2\/avatars\/2016-01-21\/19073538231_edf8d896148b6bfef790_48.png","image_72":"https:\/\/s3-us-west-2.amazonaws.com\/slack-files2\/avatars\/2016-01-21\/19073538231_edf8d896148b6bfef790_72.png"}}],"url":"wss:\/\/ms173.slack-msgs.com\/websocket\/lqcUiAvrKTP-uuid="}'
|
102
|
-
http_version:
|
103
|
-
recorded_at: Sun, 31 Jan 2016 22:42:57 GMT
|
104
|
-
recorded_with: VCR 3.0.3
|
@@ -1,106 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
require_relative './it_behaves_like_a_realtime_socket'
|
3
|
-
|
4
|
-
begin
|
5
|
-
RSpec.describe Slack::RealTime::Concurrency::Celluloid::Socket do
|
6
|
-
it_behaves_like 'a realtime socket'
|
7
|
-
|
8
|
-
let(:url) { 'wss://echo.websocket.org/websocket/xyz' }
|
9
|
-
let(:logger) { ::Logger.new(STDOUT) }
|
10
|
-
|
11
|
-
let(:driver) { WebSocket::Driver::Client }
|
12
|
-
let(:ws) { double(driver) }
|
13
|
-
subject { socket }
|
14
|
-
|
15
|
-
['', nil].each do |data|
|
16
|
-
context "finishing run_loop with #{data ? 'empty' : 'nil'} read" do
|
17
|
-
let(:ssl_socket) do
|
18
|
-
Class.new(Celluloid::IO::SSLSocket) do
|
19
|
-
def initialize(data)
|
20
|
-
@data = data
|
21
|
-
end
|
22
|
-
|
23
|
-
def connect; end
|
24
|
-
|
25
|
-
def readpartial(_size)
|
26
|
-
@data
|
27
|
-
end
|
28
|
-
end
|
29
|
-
end
|
30
|
-
|
31
|
-
let(:test_socket) do
|
32
|
-
Class.new(described_class) do
|
33
|
-
def build_socket
|
34
|
-
options[:ssl_socket].new(options[:data])
|
35
|
-
end
|
36
|
-
end
|
37
|
-
end
|
38
|
-
|
39
|
-
let(:socket) do
|
40
|
-
test_socket.new(url, logger: logger, data: data, ssl_socket: ssl_socket)
|
41
|
-
end
|
42
|
-
|
43
|
-
context 'with a driver' do
|
44
|
-
before do
|
45
|
-
socket.instance_variable_set('@driver', ws)
|
46
|
-
end
|
47
|
-
|
48
|
-
context 'consumes data' do
|
49
|
-
it 'runs' do
|
50
|
-
expect(ws).to receive(:emit)
|
51
|
-
expect(ws).to receive(:start)
|
52
|
-
expect(logger).to receive(:debug).with("#{test_socket}#run_loop")
|
53
|
-
socket.run_loop
|
54
|
-
end
|
55
|
-
end
|
56
|
-
end
|
57
|
-
end
|
58
|
-
end
|
59
|
-
|
60
|
-
[EOFError, Errno::ECONNRESET, Errno::EPIPE].each do |err|
|
61
|
-
context "finishing run_loop with #{err}" do
|
62
|
-
let(:test_socket) do
|
63
|
-
Class.new(described_class) do
|
64
|
-
def read
|
65
|
-
raise options[:err]
|
66
|
-
end
|
67
|
-
end
|
68
|
-
end
|
69
|
-
|
70
|
-
let(:socket) do
|
71
|
-
test_socket.new(url, logger: logger, err: err)
|
72
|
-
end
|
73
|
-
|
74
|
-
context 'with a driver' do
|
75
|
-
before do
|
76
|
-
socket.instance_variable_set('@driver', ws)
|
77
|
-
end
|
78
|
-
|
79
|
-
describe '#disconnect!' do
|
80
|
-
it 'closes and nils the websocket' do
|
81
|
-
expect(ws).to receive(:close)
|
82
|
-
socket.disconnect!
|
83
|
-
end
|
84
|
-
end
|
85
|
-
|
86
|
-
context 'consumes data' do
|
87
|
-
it 'runs' do
|
88
|
-
expect(ws).to receive(:emit)
|
89
|
-
expect(ws).to receive(:start)
|
90
|
-
expect(logger).to receive(:debug).with("#{test_socket}#run_loop")
|
91
|
-
socket.run_loop
|
92
|
-
end
|
93
|
-
end
|
94
|
-
end
|
95
|
-
end
|
96
|
-
end
|
97
|
-
|
98
|
-
describe '#connect!' do
|
99
|
-
pending 'connects'
|
100
|
-
pending 'pings every 30s'
|
101
|
-
end
|
102
|
-
|
103
|
-
pending 'send_data'
|
104
|
-
end
|
105
|
-
rescue LoadError
|
106
|
-
end
|
@@ -1,47 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
require_relative './it_behaves_like_a_realtime_socket'
|
3
|
-
|
4
|
-
begin
|
5
|
-
RSpec.describe Slack::RealTime::Concurrency::Eventmachine::Socket do
|
6
|
-
it_behaves_like 'a realtime socket'
|
7
|
-
context 'with url' do
|
8
|
-
let(:url) { 'wss://ms174.slack-msgs.com/websocket/xyz' }
|
9
|
-
let(:logger) { ::Logger.new($stdout) }
|
10
|
-
let(:socket) { described_class.new(url, ping: 42, logger: logger) }
|
11
|
-
let(:ws) { double(Faye::WebSocket::Client) }
|
12
|
-
describe '#connect!' do
|
13
|
-
before do
|
14
|
-
allow(ws).to receive(:on).with(:close)
|
15
|
-
end
|
16
|
-
it 'connects' do
|
17
|
-
allow(Faye::WebSocket::Client).to receive(:new).and_return(ws)
|
18
|
-
socket.connect!
|
19
|
-
expect(socket.instance_variable_get('@driver')).to eq ws
|
20
|
-
end
|
21
|
-
it 'pings every 30s' do
|
22
|
-
expect(Faye::WebSocket::Client).to receive(:new).with(url, nil, ping: 42, logger: logger).and_return(ws)
|
23
|
-
socket.connect!
|
24
|
-
end
|
25
|
-
end
|
26
|
-
describe '#disconnect!' do
|
27
|
-
it 'closes and nils the websocket' do
|
28
|
-
socket.instance_variable_set('@driver', ws)
|
29
|
-
expect(ws).to receive(:close)
|
30
|
-
socket.disconnect!
|
31
|
-
end
|
32
|
-
end
|
33
|
-
describe 'send_data' do
|
34
|
-
before do
|
35
|
-
allow(Faye::WebSocket::Client).to receive(:new).and_return(ws)
|
36
|
-
allow(ws).to receive(:on)
|
37
|
-
socket.connect!
|
38
|
-
end
|
39
|
-
it 'sends data' do
|
40
|
-
expect(ws).to receive(:send).with('data')
|
41
|
-
socket.send_data('data')
|
42
|
-
end
|
43
|
-
end
|
44
|
-
end
|
45
|
-
end
|
46
|
-
rescue LoadError
|
47
|
-
end
|
@@ -1,13 +0,0 @@
|
|
1
|
-
# require 'spec_helper'
|
2
|
-
|
3
|
-
#
|
4
|
-
# to re-record a rtm_start fixture run with
|
5
|
-
# SLACK_API_TOKEN=... CONCURRENCY=faye-websocket rspec spec/slack/real_time/rtm_start_spec.rb
|
6
|
-
# edit rtm_start.yml and remove the token, fix wss:// path (run specs, fix failures)
|
7
|
-
#
|
8
|
-
|
9
|
-
# RSpec.describe Slack::RealTime::Client, vcr: { cassette_name: 'web/rtm_start' } do
|
10
|
-
# it 'connects' do
|
11
|
-
# Slack::Web::Client.new.rtm_start(mpim_aware: true)
|
12
|
-
# end
|
13
|
-
# end
|
@@ -1,11 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
|
3
|
-
RSpec.describe Slack::RealTime::Store do
|
4
|
-
it 'can be initialized with an empty hash' do
|
5
|
-
store = Slack::RealTime::Store.new(Hashie::Mash.new)
|
6
|
-
expect(store.self).to be nil
|
7
|
-
expect(store.groups.count).to eq 0
|
8
|
-
expect(store.team).to be nil
|
9
|
-
expect(store.teams.count).to eq 0
|
10
|
-
end
|
11
|
-
end
|
@@ -1,15 +0,0 @@
|
|
1
|
-
# This file was auto-generated by lib/tasks/web.rake
|
2
|
-
|
3
|
-
require 'spec_helper'
|
4
|
-
|
5
|
-
RSpec.describe Slack::Web::Api::Endpoints::AppsPermissions do
|
6
|
-
let(:client) { Slack::Web::Client.new }
|
7
|
-
context 'apps.permissions_request' do
|
8
|
-
it 'requires scopes' do
|
9
|
-
expect { client.apps_permissions_request(trigger_id: ' ') }.to raise_error ArgumentError, /Required arguments :scopes missing/
|
10
|
-
end
|
11
|
-
it 'requires trigger_id' do
|
12
|
-
expect { client.apps_permissions_request(scopes: ' ') }.to raise_error ArgumentError, /Required arguments :trigger_id missing/
|
13
|
-
end
|
14
|
-
end
|
15
|
-
end
|
@@ -1,18 +0,0 @@
|
|
1
|
-
# This file was auto-generated by lib/tasks/web.rake
|
2
|
-
|
3
|
-
require 'spec_helper'
|
4
|
-
|
5
|
-
RSpec.describe Slack::Web::Api::Endpoints::AppsPermissionsUsers do
|
6
|
-
let(:client) { Slack::Web::Client.new }
|
7
|
-
context 'apps.permissions.users_request' do
|
8
|
-
it 'requires scopes' do
|
9
|
-
expect { client.apps_permissions_users_request(trigger_id: ' ', user: ' ') }.to raise_error ArgumentError, /Required arguments :scopes missing/
|
10
|
-
end
|
11
|
-
it 'requires trigger_id' do
|
12
|
-
expect { client.apps_permissions_users_request(scopes: ' ', user: ' ') }.to raise_error ArgumentError, /Required arguments :trigger_id missing/
|
13
|
-
end
|
14
|
-
it 'requires user' do
|
15
|
-
expect { client.apps_permissions_users_request(scopes: ' ', trigger_id: ' ') }.to raise_error ArgumentError, /Required arguments :user missing/
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|