Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: slack-ruby/slack-ruby-client
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.14.2
Choose a base ref
...
head repository: slack-ruby/slack-ruby-client
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v0.14.3
Choose a head ref
  • 12 commits
  • 34 files changed
  • 2 contributors

Commits on Apr 12, 2019

  1. Copy the full SHA
    1a0029d View commit details

Commits on May 9, 2019

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    8edf1ef View commit details
  2. Merge pull request #268 from ioquatix/patch-1

    Pin `async-websocket` to stable version.
    dblock authored May 9, 2019

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    e6a3276 View commit details

Commits on Jul 20, 2019

  1. Copy the full SHA
    9934f02 View commit details
  2. Merge pull request #279 from dblock/fix-277

    Handle unexpected errors in ping worker.
    dblock authored Jul 20, 2019

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    30450bc View commit details
  3. Copy the full SHA
    824539f View commit details
  4. Merge pull request #281 from dblock/api-update

    Added admin_users_session_reset to Web API.
    dblock authored Jul 20, 2019

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    532c020 View commit details
  5. Copy the full SHA
    bdbf48f View commit details
  6. Merge pull request #283 from dblock/async-0.8

    Fail when used with incompatible async-websocket > 0.8.0
    dblock authored Jul 20, 2019

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    304eedc View commit details

Commits on Jul 21, 2019

  1. Copy the full SHA
    c99043b View commit details
  2. Copy the full SHA
    b7fde15 View commit details

Commits on Jul 23, 2019

  1. Preparing for release, 0.14.3.

    dblock committed Jul 23, 2019
    Copy the full SHA
    9baf6cd View commit details
7 changes: 4 additions & 3 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This configuration was generated by
# `rubocop --auto-gen-config`
# on 2019-04-09 22:16:03 -0500 using RuboCop version 0.61.1.
# on 2019-07-21 18:39:19 -0400 using RuboCop version 0.61.1.
# The point is for the user to remove these configuration records
# one by one as the offenses are removed from the code base.
# Note that changes in the inspected code, or installation of new
@@ -13,10 +13,11 @@ Lint/AssignmentInCondition:
- 'lib/slack/real_time/concurrency/async.rb'
- 'lib/slack/real_time/socket.rb'

# Offense count: 4
# Offense count: 5
Lint/HandleExceptions:
Exclude:
- 'lib/slack-ruby-client.rb'
- 'lib/slack/real_time/concurrency/async.rb'
- 'spec/slack/real_time/concurrency/celluloid_spec.rb'
- 'spec/slack/real_time/concurrency/eventmachine_spec.rb'

@@ -50,7 +51,7 @@ Style/AccessModifierDeclarations:
- 'lib/slack/real_time/concurrency/eventmachine.rb'
- 'lib/slack/real_time/socket.rb'

# Offense count: 154
# Offense count: 155
# Configuration parameters: AllowedVariables.
Style/GlobalVars:
Enabled: false
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
### 0.14.3 (2019/7/23)

* [#279](https://github.com/slack-ruby/slack-ruby-client/pull/279): Prevent ping worker from dying on unexpected errors - [@dblock](https://github.com/dblock).
* [#281](https://github.com/slack-ruby/slack-ruby-client/pull/281): Added `admin_users_session_reset` to Web API - [@dblock](https://github.com/dblock).
* [#283](https://github.com/slack-ruby/slack-ruby-client/pull/283): Fail when used with incompatible async-websocket > 0.8.0 - [@dblock](https://github.com/dblock).
* [#284](https://github.com/slack-ruby/slack-ruby-client/pull/284): Include team id, name and domain in log output - [@dblock](https://github.com/dblock).

### 0.14.2 (2019/4/12)

* [#256](https://github.com/slack-ruby/slack-ruby-client/pull/256): Added support for specifying signing secrets on a per-request basis via optional parameters to the `Slack::Events::Request` constructor - [@gabrielmdeal](https://github.com/gabrielmdeal).
9 changes: 8 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -2,7 +2,14 @@ source 'http://rubygems.org'

gemspec

gem ENV['CONCURRENCY'], require: false if ENV.key?('CONCURRENCY')
if ENV.key?('CONCURRENCY')
case ENV['CONCURRENCY']
when 'async-websocket'
gem 'async-websocket', '~> 0.8.0', require: false
else
gem ENV['CONCURRENCY'], require: false
end
end

group :test do
gem 'danger-toc', '~> 0.1.3', require: false
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -66,7 +66,7 @@ A Ruby client for the Slack [Web](https://api.slack.com/web), [RealTime Messagin

## Stable Release

You're reading the documentation for the **stable** release of slack-ruby-client, 0.14.2. See [UPGRADING](UPGRADING.md) when upgrading from an older version.
You're reading the documentation for the **stable** release of slack-ruby-client, 0.14.3. See [UPGRADING](UPGRADING.md) when upgrading from an older version.

## Installation

@@ -79,7 +79,7 @@ gem 'slack-ruby-client'
If you're going to be using the RealTime client, add either `async-websocket`, `eventmachine` and `faye-websocket` or `celluloid-io`. See below for more information about concurrency. We recommend you use `async-websocket`.

```
gem 'async-websocket'
gem 'async-websocket', '~> 0.8.0'
```

Run `bundle install`.
10 changes: 10 additions & 0 deletions UPGRADING.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
Upgrading Slack-Ruby-Client
===========================

### Upgrading to >= 0.14.0

If you are using async-websocket, lock down its version to 0.8.0 as newer versions are currently incompatible.

```
gem 'async-websocket', '~> 0.8.0'
```

See [#282](https://github.com/slack-ruby/slack-ruby-client/issues/282) for more information.

### Upgrading to >= 0.13.0

#### Recommended Async Library
1 change: 1 addition & 0 deletions bin/commands.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# This file was auto-generated by lib/tasks/web.rake

require 'commands/admin_users_session'
require 'commands/api'
require 'commands/apps'
require 'commands/apps_permissions'
15 changes: 15 additions & 0 deletions bin/commands/admin_users_session.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# This file was auto-generated by lib/tasks/web.rake

desc 'AdminUsersSession methods.'
command 'admin_users_session' do |g|
g.desc "This method wipes a user session, leaving the user unauthenticated. The user's Slack client will reset its local cache."
g.long_desc %( This method wipes a user session, leaving the user unauthenticated. The user's Slack client will reset its local cache. )
g.command 'reset' do |c|
c.flag 'user_id', desc: 'The ID of the user to wipe sessions for.'
c.flag 'mobile_only', desc: 'Only expire mobile sessions (default: false).'
c.flag 'web_only', desc: 'Only expire web sessions (default: false).'
c.action do |_global_options, options, _args|
puts JSON.dump($client.admin_users_session_reset(options))
end
end
end
4 changes: 2 additions & 2 deletions bin/commands/apps.rb
Original file line number Diff line number Diff line change
@@ -2,8 +2,8 @@

desc 'Apps methods.'
command 'apps' do |g|
g.desc 'This method uninstalls a workspace app. Unlike auth.revoke, which revokes a single token, this method revokes all tokens associated with a single installation of a workspace app.'
g.long_desc %( This method uninstalls a workspace app. Unlike auth.revoke, which revokes a single token, this method revokes all tokens associated with a single installation of a workspace app. )
g.desc 'This method uninstalls an app. Unlike auth.revoke, which revokes a single token, this method revokes all tokens associated with a single installation of an app.'
g.long_desc %( This method uninstalls an app. Unlike auth.revoke, which revokes a single token, this method revokes all tokens associated with a single installation of an app. )
g.command 'uninstall' do |c|
c.flag 'client_id', desc: 'Issued when you created your application.'
c.flag 'client_secret', desc: 'Issued when you created your application.'
5 changes: 4 additions & 1 deletion bin/commands/chat.rb
Original file line number Diff line number Diff line change
@@ -58,15 +58,18 @@
g.desc 'This method posts an ephemeral message, which is visible only to the assigned user in a specific public channel, private channel, or private conversation.'
g.long_desc %( This method posts an ephemeral message, which is visible only to the assigned user in a specific public channel, private channel, or private conversation. )
g.command 'postEphemeral' do |c|
c.flag 'attachments', desc: 'A JSON-based array of structured attachments, presented as a URL-encoded string.'
c.flag 'channel', desc: 'Channel, private group, or IM channel to send message to. Can be an encoded ID, or a name.'
c.flag 'text', desc: "Text of the message to send. See below for an explanation of formatting. This field is usually required, unless you're providing only attachments instead."
c.flag 'user', desc: 'id of the user who will receive the ephemeral message. The user should be in the channel specified by the channel argument.'
c.flag 'as_user', desc: 'Pass true to post the message as the authed user. Defaults to true if the chat:write:bot scope is not included. Otherwise, defaults to false.'
c.flag 'attachments', desc: 'A JSON-based array of structured attachments, presented as a URL-encoded string.'
c.flag 'blocks', desc: 'A JSON-based array of structured blocks, presented as a URL-encoded string.'
c.flag 'icon_emoji', desc: 'Emoji to use as the icon for this message. Overrides icon_url. Must be used in conjunction with as_user set to false, otherwise ignored. See authorship below.'
c.flag 'icon_url', desc: 'URL to an image to use as the icon for this message. Must be used in conjunction with as_user set to false, otherwise ignored. See authorship below.'
c.flag 'link_names', desc: 'Find and link channel names and usernames.'
c.flag 'parse', desc: 'Change how messages are treated. Defaults to none. See below.'
c.flag 'thread_ts', desc: "Provide another message's ts value to post this message in a thread. Avoid using a reply's ts value; use its parent's value instead. Ephemeral messages in threads are only shown if there is already an active thread."
c.flag 'username', desc: "Set your bot's user name. Must be used in conjunction with as_user set to false, otherwise ignored. See authorship below."
c.action do |_global_options, options, _args|
puts JSON.dump($client.chat_postEphemeral(options))
end
Loading