-
-
Notifications
You must be signed in to change notification settings - Fork 215
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update Faraday to >= 2.0 #406
Changes from all commits
b056e0e
719117a
8a3efdd
9297ca4
b051c48
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,19 @@ | ||
name: PR Linter | ||
on: [pull_request] | ||
jobs: | ||
lint: | ||
danger: | ||
runs-on: ubuntu-latest | ||
env: | ||
BUNDLE_GEMFILE: ${{ github.workspace }}/Gemfile.danger | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: 2.6.5 | ||
ruby-version: 2.6 | ||
bundler-cache: true | ||
- run: | | ||
# the personal token is public, this is ok, base64 encode to avoid tripping Github | ||
TOKEN=$(echo -n NWY1ZmM5MzEyMzNlYWY4OTZiOGU3MmI3MWQ3Mzk0MzgxMWE4OGVmYwo= | base64 --decode) | ||
DANGER_GITHUB_API_TOKEN=$TOKEN bundle exec danger --verbose | ||
DANGER_GITHUB_API_TOKEN=$TOKEN bundle exec danger --verbose |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
name: Rubocop | ||
on: [push, pull_request] | ||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Ruby | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: 2.7 | ||
bundler-cache: true | ||
- run: bundle exec rubocop |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
.env | ||
pkg | ||
Gemfile.lock | ||
.DS_Store | ||
.bundle | ||
.byebug_history | ||
.env | ||
.idea | ||
.rspec_status | ||
.ruby-version | ||
Gemfile.lock | ||
pkg |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,15 @@ | ||
### 1.0.1 (Next) | ||
### 1.1.0 (Next) | ||
|
||
* [#400](https://github.com/slack-ruby/slack-ruby-client/pull/400): Replace Travis-CI with GitHub Actions - [@dblock](https://github.com/dblock). | ||
* [#401](https://github.com/slack-ruby/slack-ruby-client/pull/401): Upgraded RuboCop to 1.26.0 - [@dblock](https://github.com/dblock). | ||
* [#401](https://github.com/slack-ruby/slack-ruby-client/pull/401): Added support for Ruby 3.1.1 - [@dblock](https://github.com/dblock). | ||
* [#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). | ||
* [#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). | ||
* [#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). | ||
* [#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). | ||
* [#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). | ||
* [#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). | ||
* [#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). | ||
* Your contribution here. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Put this one back. |
||
|
||
### 1.0.0 (2021/12/21) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,13 +15,14 @@ end | |
group :test do | ||
gem 'activesupport' | ||
gem 'erubis' | ||
gem 'faraday-typhoeus' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this becoming a gem dependency? Does it belong in .gemspec? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This was added as testing dependency because it was required for the 'non default adapter' spec in |
||
gem 'json-schema' | ||
gem 'rake', '~> 13' | ||
gem 'rspec' | ||
gem 'rubocop', '~> 1.26.0' | ||
gem 'rubocop', '1.26.1' # Lock to specific version to avoid breaking cops/changes | ||
gem 'rubocop-performance' | ||
gem 'rubocop-rake' | ||
gem 'rubocop-rspec' | ||
gem 'slack-ruby-danger', '~> 0.2.0', require: false | ||
gem 'timecop' | ||
if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('3.0.0') | ||
# https://github.com/vcr/vcr/pull/907 | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
source 'https://rubygems.org' | ||
|
||
group :test do | ||
gem 'danger-toc', '~> 0.2.0', require: false | ||
gem 'slack-ruby-danger', '~> 0.2.0', require: false | ||
end |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# frozen_string_literal: true | ||
module Slack | ||
VERSION = '1.0.1' | ||
VERSION = '1.1.0' | ||
end |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,11 +22,11 @@ def connection | |
options[:request] = request_options if request_options.any? | ||
|
||
::Faraday::Connection.new(endpoint, options) do |connection| | ||
connection.use ::Faraday::Request::Multipart | ||
connection.use ::Faraday::Request::UrlEncoded | ||
connection.request :multipart | ||
connection.request :url_encoded | ||
connection.use ::Slack::Web::Faraday::Response::RaiseError | ||
connection.use ::FaradayMiddleware::Mashify, mash_class: Slack::Messages::Message | ||
connection.use ::FaradayMiddleware::ParseJson | ||
connection.response :mashify, mash_class: Slack::Messages::Message | ||
connection.response :json, content_type: /\b*$/ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So this is any content type, isn't it? Do any specs fail if you remove Remove comment and TODO above. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
If we remove this I guess there are two options:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Removed 👍🏻 |
||
connection.use ::Slack::Web::Faraday::Response::WrapError | ||
connection.response :logger, logger if logger | ||
connection.adapter adapter | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's bump the version to 1.1 (version.rb, etc.)