Skip to content

Commit 3be57b9

Browse files
committed
drop support for ruby 3.0
1 parent 13bbb05 commit 3be57b9

File tree

13 files changed

+50
-49
lines changed

13 files changed

+50
-49
lines changed

.github/workflows/main.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ jobs:
1616
fail-fast: false
1717
matrix:
1818
ruby:
19-
- "3.0"
2019
- "3.1"
2120
- "3.2"
2221
- "3.3"
@@ -50,7 +49,6 @@ jobs:
5049
uses: ruby/setup-ruby@v1
5150
with:
5251
bundler-cache: true
53-
ruby-version: 3.4
5452
- name: spec:live
5553
run: |
5654
bundle exec rake clean_live set_ci_credentials spec:live ||

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,5 @@ spec/fixtures/cassettes
44
spec/fixtures/credentials.yml
55
coverage/**
66
.yardoc/**
7-
.ruby-version
87
vendor/bundle/**
98
pkg/**

.rubocop.yml

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

33
AllCops:
4-
TargetRubyVersion: 3.0
4+
TargetRubyVersion: 3.1
55
DisplayCopNames: true
66
SuggestExtensions: false
77
NewCops: enable

.rubocop_todo.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This configuration was generated by
22
# `rubocop --auto-gen-config`
3-
# on 2025-08-12 15:34:13 UTC using RuboCop version 1.79.2.
3+
# on 2025-08-12 17:05:00 UTC using RuboCop version 1.79.2.
44
# The point is for the user to remove these configuration records
55
# one by one as the offenses are removed from the code base.
66
# Note that changes in the inspected code, or installation of new
@@ -170,14 +170,12 @@ Lint/UnusedBlockArgument:
170170
- 'lib/zendesk_api/track_changes.rb'
171171
- 'spec/core/collection_spec.rb'
172172

173-
# Offense count: 3
173+
# Offense count: 1
174174
# This cop supports safe autocorrection (--autocorrect).
175175
# Configuration parameters: AutoCorrect, AllowUnusedKeywordArguments, IgnoreEmptyMethods, IgnoreNotImplementedMethods, NotImplementedExceptions.
176176
# NotImplementedExceptions: NotImplementedError
177177
Lint/UnusedMethodArgument:
178178
Exclude:
179-
- 'lib/zendesk_api/client.rb'
180-
- 'lib/zendesk_api/collection.rb'
181179
- 'spec/fixtures/test_resources.rb'
182180

183181
# Offense count: 1
@@ -222,6 +220,12 @@ Style/Alias:
222220
- 'lib/zendesk_api/resources.rb'
223221
- 'lib/zendesk_api/track_changes.rb'
224222

223+
# Offense count: 1
224+
# This cop supports unsafe autocorrection (--autocorrect-all).
225+
Style/ArrayIntersect:
226+
Exclude:
227+
- 'lib/zendesk_api/search.rb'
228+
225229
# Offense count: 1
226230
# This cop supports safe autocorrection (--autocorrect).
227231
Style/BlockComments:

.ruby-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.7.6
1+
3.1.7

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## Unreleased
44

5-
Drops support for Ruby 2.7.
5+
Drops support for Ruby 2.7 and 3.0.
66

77
## v3.1.1
88

Gemfile.lock

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,35 +12,35 @@ PATH
1212
GEM
1313
remote: https://rubygems.org/
1414
specs:
15-
actionpack (7.1.5.1)
16-
actionview (= 7.1.5.1)
17-
activesupport (= 7.1.5.1)
15+
actionpack (7.2.2.1)
16+
actionview (= 7.2.2.1)
17+
activesupport (= 7.2.2.1)
1818
nokogiri (>= 1.8.5)
1919
racc
20-
rack (>= 2.2.4)
20+
rack (>= 2.2.4, < 3.2)
2121
rack-session (>= 1.0.1)
2222
rack-test (>= 0.6.3)
2323
rails-dom-testing (~> 2.2)
2424
rails-html-sanitizer (~> 1.6)
25-
actionview (7.1.5.1)
26-
activesupport (= 7.1.5.1)
25+
useragent (~> 0.16)
26+
actionview (7.2.2.1)
27+
activesupport (= 7.2.2.1)
2728
builder (~> 3.1)
2829
erubi (~> 1.11)
2930
rails-dom-testing (~> 2.2)
3031
rails-html-sanitizer (~> 1.6)
31-
activesupport (7.1.5.1)
32+
activesupport (7.2.2.1)
3233
base64
3334
benchmark (>= 0.3)
3435
bigdecimal
35-
concurrent-ruby (~> 1.0, >= 1.0.2)
36+
concurrent-ruby (~> 1.0, >= 1.3.1)
3637
connection_pool (>= 2.2.5)
3738
drb
3839
i18n (>= 1.6, < 2)
3940
logger (>= 1.4.2)
4041
minitest (>= 5.1)
41-
mutex_m
4242
securerandom (>= 0.3)
43-
tzinfo (~> 2.0)
43+
tzinfo (~> 2.0, >= 2.0.5)
4444
addressable (2.8.7)
4545
public_suffix (>= 2.0.2, < 7.0)
4646
ast (2.4.3)
@@ -85,7 +85,6 @@ GEM
8585
mini_portile2 (2.8.9)
8686
minitest (5.25.5)
8787
multipart-post (2.4.1)
88-
mutex_m (0.3.0)
8988
net-http (0.6.0)
9089
uri
9190
nokogiri (1.18.9)
@@ -101,7 +100,7 @@ GEM
101100
public_suffix (6.0.2)
102101
racc (1.8.1)
103102
racc (1.8.1-java)
104-
rack (3.2.0)
103+
rack (3.1.16)
105104
rack-session (2.1.1)
106105
base64 (>= 0.1.0)
107106
rack (>= 3.0.0)
@@ -147,13 +146,14 @@ GEM
147146
prism (~> 1.4)
148147
ruby-progressbar (1.13.0)
149148
scrub_rb (1.0.1)
150-
securerandom (0.3.2)
149+
securerandom (0.4.1)
151150
tzinfo (2.0.6)
152151
concurrent-ruby (~> 1.0)
153152
unicode-display_width (3.1.4)
154153
unicode-emoji (~> 4.0, >= 4.0.4)
155154
unicode-emoji (4.0.4)
156155
uri (1.0.3)
156+
useragent (0.16.11)
157157
vcr (6.3.1)
158158
base64
159159
webmock (3.25.1)

lib/zendesk_api/actions.rb

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ def save!(options = {})
4343
end
4444

4545
# Saves, returning false if it fails and attaching the errors
46-
def save(options = {}, &block)
47-
save!(options, &block)
46+
def save(options = {}, &)
47+
save!(options, &)
4848
rescue ZendeskAPI::Error::RecordInvalid => e
4949
@errors = e.errors
5050
false
@@ -127,8 +127,8 @@ def find!(client, options = {})
127127
# Finds, returning nil if it fails
128128
# @param [Client] client The {Client} object to be used
129129
# @param [Hash] options Any additional GET parameters to be added
130-
def find(client, options = {}, &block)
131-
find!(client, options, &block)
130+
def find(client, options = {}, &)
131+
find!(client, options, &)
132132
rescue ZendeskAPI::Error::ClientError
133133
nil
134134
end
@@ -157,8 +157,8 @@ def create!(client, attributes = {}, &block)
157157
# Creates, returning nil if it fails
158158
# @param [Client] client The {Client} object to be used
159159
# @param [Hash] options Any additional GET parameters to be added
160-
def create(client, attributes = {}, &block)
161-
create!(client, attributes, &block)
160+
def create(client, attributes = {}, &)
161+
create!(client, attributes, &)
162162
rescue ZendeskAPI::Error::ClientError
163163
nil
164164
end
@@ -239,8 +239,8 @@ def destroy!
239239
end
240240

241241
# Destroys, returning false on error.
242-
def destroy(&block)
243-
destroy!(&block)
242+
def destroy(&)
243+
destroy!(&)
244244
rescue ZendeskAPI::Error::ClientError
245245
false
246246
end
@@ -249,15 +249,15 @@ module ClassMethod
249249
# Deletes a resource given the id passed in.
250250
# @param [Client] client The {Client} object to be used
251251
# @param [Hash] opts The optional parameters to pass. Defaults to {}
252-
def destroy!(client, opts = {}, &block)
253-
new(client, opts).destroy!(&block)
252+
def destroy!(client, opts = {}, &)
253+
new(client, opts).destroy!(&)
254254

255255
true
256256
end
257257

258258
# Destroys, returning false on error.
259-
def destroy(client, attributes = {}, &block)
260-
destroy!(client, attributes, &block)
259+
def destroy(client, attributes = {}, &)
260+
destroy!(client, attributes, &)
261261
rescue ZendeskAPI::Error::ClientError
262262
false
263263
end
@@ -289,20 +289,20 @@ def self.included(klass)
289289

290290
module ClassMethod
291291
# Updates, returning false on error.
292-
def update(client, attributes = {}, &block)
293-
update!(client, attributes, &block)
292+
def update(client, attributes = {}, &)
293+
update!(client, attributes, &)
294294
rescue ZendeskAPI::Error::ClientError
295295
false
296296
end
297297

298298
# Updates a resource given the id passed in.
299299
# @param [Client] client The {Client} object to be used
300300
# @param [Hash] attributes The attributes to update. Default to {
301-
def update!(client, attributes = {}, &block)
301+
def update!(client, attributes = {}, &)
302302
ZendeskAPI::Client.check_deprecated_namespace_usage attributes, singular_resource_name
303303
resource = new(client, :id => attributes.delete(:id), :global => attributes.delete(:global), :association => attributes.delete(:association))
304304
resource.attributes.merge!(attributes)
305-
resource.save!(:force_update => resource.is_a?(SingularResource), &block)
305+
resource.save!(:force_update => resource.is_a?(SingularResource), &)
306306
resource
307307
end
308308
end

lib/zendesk_api/client.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class Client
3434
# Handles resources such as 'tickets'. Any options are passed to the underlying collection, except reload which disregards
3535
# memoization and creates a new Collection instance.
3636
# @return [Collection] Collection instance for resource
37-
def method_missing(method, *args, &block)
37+
def method_missing(method, *args, &)
3838
method = method.to_s
3939
options = args.last.is_a?(Hash) ? args.pop : {}
4040
unless config.use_resource_cache

lib/zendesk_api/collection.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -188,14 +188,14 @@ def to_a!
188188

189189
# Calls #each on every page with the passed in block
190190
# @param [Block] block Passed to #each
191-
def all!(start_page = @options["page"], &block)
192-
_all(start_page, :bang, &block)
191+
def all!(start_page = @options["page"], &)
192+
_all(start_page, :bang, &)
193193
end
194194

195195
# Calls #each on every page with the passed in block
196196
# @param [Block] block Passed to #each
197-
def all(start_page = @options["page"], &block)
198-
_all(start_page, &block)
197+
def all(start_page = @options["page"], &)
198+
_all(start_page, &)
199199
end
200200

201201
def each_page!(...)
@@ -462,7 +462,7 @@ def array_method(name, ...)
462462
end
463463

464464
# If you call client.tickets.foo - and foo is not an attribute nor an association, it ends up here, as a new collection
465-
def next_collection(name, *args, &block)
465+
def next_collection(name, *args, &)
466466
opts = args.last.is_a?(Hash) ? args.last : {}
467467
opts.merge!(collection_path: [*@collection_path, name], page: nil)
468468
# Why `page: nil`?

0 commit comments

Comments
 (0)