Skip to content

Commit d5e368c

Browse files
authored
Merge pull request #523 from zendesk/RED-1558-update-supports
v1.38.0.rc2 Drop support for Ruby 2.6
2 parents 2e3cc67 + 127bf0a commit d5e368c

File tree

14 files changed

+113
-98
lines changed

14 files changed

+113
-98
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @zendesk/redback

.github/workflows/main.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,11 @@ jobs:
1515
strategy:
1616
matrix:
1717
ruby:
18-
- "2.6"
1918
- "2.7"
2019
- "3.0"
2120
- "3.1"
2221
- "3.2"
23-
- "jruby-9.3"
22+
- "jruby-9.4"
2423
steps:
2524
- name: Checkout code
2625
uses: zendesk/checkout@v2

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,6 @@ spec/fixtures/credentials.yml
44
coverage/**
55
.yardoc/**
66
Gemfile.lock
7+
.ruby-version
78
vendor/bundle/**
89
pkg/**

.rubocop.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
inherit_from: .rubocop_todo.yml
22

33
AllCops:
4-
TargetRubyVersion: 2.6
4+
TargetRubyVersion: 2.7
55
DisplayCopNames: true
66
Exclude:
77
- .git/**/*
@@ -13,11 +13,11 @@ Layout/EndAlignment:
1313
EnforcedStyleAlignWith: variable
1414

1515
# Align the elements of a hash literal if they span more than one line.
16-
Layout/AlignHash:
16+
Layout/HashAlignment:
1717
EnforcedLastArgumentHashStyle: ignore_implicit
1818

1919
# Align the parameters of a method call if they span more than one line.
20-
Layout/AlignParameters:
20+
Layout/ParameterAlignment:
2121
EnforcedStyle: with_fixed_indentation
2222

2323
# Checks the indentation of hanging closing parentheses.

.rubocop_todo.yml

Lines changed: 6 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,13 @@ Gemspec/OrderedDependencies:
2828
# SupportedHashRocketStyles: key, separator, table
2929
# SupportedColonStyles: key, separator, table
3030
# SupportedLastArgumentHashStyles: always_inspect, always_ignore, ignore_implicit, ignore_explicit
31-
Layout/AlignHash:
31+
Layout/HashAlignment:
3232
Exclude:
3333
- 'spec/live/user_view_spec.rb'
3434

35+
Layout/LineLength:
36+
Max: 160
37+
3538
# Offense count: 17
3639
# Cop supports --auto-correct.
3740
# Configuration parameters: EnforcedStyle.
@@ -106,7 +109,7 @@ Lint/DuplicateMethods:
106109
- 'lib/zendesk_api/resource.rb'
107110

108111
# Offense count: 3
109-
Lint/HandleExceptions:
112+
Lint/SuppressedException:
110113
Exclude:
111114
- 'Rakefile'
112115
- 'spec/core/collection_spec.rb'
@@ -138,7 +141,7 @@ Lint/ShadowingOuterLocalVariable:
138141

139142
# Offense count: 10
140143
# Cop supports --auto-correct.
141-
Lint/StringConversionInInterpolation:
144+
Lint/RedundantStringCoercion:
142145
Exclude:
143146
- 'lib/zendesk_api/middleware/response/logger.rb'
144147
- 'spec/live/macro_spec.rb'
@@ -192,26 +195,6 @@ Naming/PredicateName:
192195
- 'spec/**/*'
193196
- 'lib/zendesk_api/associations.rb'
194197

195-
# Offense count: 1
196-
Performance/Caller:
197-
Exclude:
198-
- 'lib/zendesk_api/resource.rb'
199-
200-
# Offense count: 1
201-
# Cop supports --auto-correct.
202-
Performance/RedundantBlockCall:
203-
Exclude:
204-
- 'lib/zendesk_api/collection.rb'
205-
206-
# Offense count: 10
207-
# Cop supports --auto-correct.
208-
# Configuration parameters: MaxKeyValuePairs.
209-
Performance/RedundantMerge:
210-
Exclude:
211-
- 'lib/zendesk_api/associations.rb'
212-
- 'lib/zendesk_api/collection.rb'
213-
- 'spec/macros/resource_macros.rb'
214-
215198
# Offense count: 1
216199
# Cop supports --auto-correct.
217200
Security/YAMLLoad:

.ruby-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2.7.6

CHANGELOG.md

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,26 @@
22

33
## Unreleased
44

5-
## v1.38.0 (rc2)
5+
- Upcoming changes
6+
7+
## v1.38.0 (rc2 - BREAKING!)
68

7-
- Add `Label` resource for Articles
89
- Add support for Faraday 2.0
9-
- Drop support for Faraday 1 (BREAKING)
10-
- Add JRuby 9.3 to CI
10+
- Add `Label` resource for Articles
1111
- Add Ruby 3.2 to CI
12-
- Drop support for JRuby 9.1, see https://github.com/zendesk/zendesk_api_client_rb/runs/8110095881
13-
- Drop support for JRuby 9.2, see https://github.com/zendesk/zendesk_api_client_rb/runs/8110151024
14-
- Drop support for 2.6, not supported by Faraday 2.0
12+
- Add JRuby 9.4 to CI
13+
- Drop support for Faraday 1
14+
- Remove 2.6 from CI
15+
- Remove JRuby 9.1 from CI, see https://github.com/zendesk/zendesk_api_client_rb/runs/8110095881
16+
- Remove JRuby 9.2 from CI, see https://github.com/zendesk/zendesk_api_client_rb/runs/8110151024
17+
18+
**Note:**
19+
20+
It is possible that the SDK will work okay in Ruby 2.6, but we do not guarantee it, and also support will not be provided on any issues.
21+
22+
We will continue to support Ruby 2.7 owing to the large set of developers still on Ruby 2. The support will end by Jan 2024.
23+
24+
We strongly recommend everyone to consider moving to Ruby 3 at the earliest.
1525

1626
## v1.37.0
1727

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ gem "yard"
88
gem "json", ">= 2.3.0", platforms: :ruby
99
gem "scrub_rb"
1010

11-
gem "rubocop", "~> 0.64.0", require: false
11+
gem "rubocop", "~> 0.79.0", require: false # Handling of Ruby 2.7 syntax
1212

1313
group :test do
1414
gem "webmock"

lib/zendesk_api/client.rb

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,12 @@ def build_connection
170170
builder.use ZendeskAPI::Middleware::Request::EncodeJson
171171

172172
# Should always be first in the stack
173-
builder.use ZendeskAPI::Middleware::Request::Retry, :logger => config.logger, :retry_codes => config.retry_codes, :retry_on_exception => config.retry_on_exception if config.retry
173+
if config.retry
174+
builder.use ZendeskAPI::Middleware::Request::Retry,
175+
:logger => config.logger,
176+
:retry_codes => config.retry_codes,
177+
:retry_on_exception => config.retry_on_exception
178+
end
174179
if config.raise_error_when_rate_limited
175180
builder.use ZendeskAPI::Middleware::Request::RaiseRateLimited, :logger => config.logger
176181
end

spec/core/bulk_actions_spec.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333

3434
it 'calls the create_many endpoint' do
3535
assert_requested(:post, %r{bulk_test_resources/create_many},
36-
:body => json(:bulk_test_resources => attributes)
36+
:body => json(:bulk_test_resources => attributes)
3737
)
3838
end
3939

@@ -57,7 +57,7 @@
5757

5858
it 'calls the update_many endpoint' do
5959
assert_requested(:put, %r{bulk_test_resources/update_many\?ids=1,2,3$},
60-
:body => json(:bulk_test_resource => attributes)
60+
:body => json(:bulk_test_resource => attributes)
6161
)
6262
end
6363

@@ -77,7 +77,7 @@
7777

7878
it 'calls the update_many endpoint' do
7979
assert_requested(:put, %r{bulk_test_resources/update_many$},
80-
:body => json(:bulk_test_resources => attributes)
80+
:body => json(:bulk_test_resources => attributes)
8181
)
8282
end
8383

@@ -107,7 +107,7 @@
107107
subject
108108

109109
assert_requested(:post, %r{bulk_test_resources/create_or_update_many$},
110-
:body => json(:bulk_test_resources => attributes)
110+
:body => json(:bulk_test_resources => attributes)
111111
)
112112
end
113113

0 commit comments

Comments
 (0)