Skip to content

Commit 61d708b

Browse files
feat!: bump min supported ruby version to 3.1 (oldest non-EOL) (#105)
1 parent 59abb7e commit 61d708b

9 files changed

Lines changed: 7 additions & 71 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Finch Ruby API library
22

3-
The Finch Ruby library provides convenient access to the Finch REST API from any Ruby 3.0.0+ application.
3+
The Finch Ruby library provides convenient access to the Finch REST API from any Ruby 3.1.0+ application.
44

55
It is generated with [Stainless](https://www.stainless.com/).
66

@@ -158,4 +158,4 @@ This package considers improvements to the (non-runtime) `*.rbi` and `*.rbs` typ
158158

159159
## Requirements
160160

161-
Ruby 3.0.0 or higher.
161+
Ruby 3.1.0 or higher.

lib/finch_api/internal/individuals_page.rb

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,6 @@ module Internal
1111
# individuals_page.auto_paging_each do |directory|
1212
# puts(directory)
1313
# end
14-
#
15-
# @example
16-
# directories =
17-
# individuals_page
18-
# .to_enum
19-
# .lazy
20-
# .select { _1.object_id.even? }
21-
# .map(&:itself)
22-
# .take(2)
23-
# .to_a
24-
#
25-
# directories => Array
2614
class IndividualsPage
2715
include FinchAPI::Internal::Type::BasePage
2816

lib/finch_api/internal/page.rb

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,6 @@ module Internal
1111
# page.auto_paging_each do |item|
1212
# puts(item)
1313
# end
14-
#
15-
# @example
16-
# items =
17-
# page
18-
# .to_enum
19-
# .lazy
20-
# .select { _1.object_id.even? }
21-
# .map(&:itself)
22-
# .take(2)
23-
# .to_a
24-
#
25-
# items => Array
2614
class Page
2715
include FinchAPI::Internal::Type::BasePage
2816

lib/finch_api/internal/responses_page.rb

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,6 @@ module Internal
1111
# responses_page.auto_paging_each do |individual|
1212
# puts(individual)
1313
# end
14-
#
15-
# @example
16-
# individuals =
17-
# responses_page
18-
# .to_enum
19-
# .lazy
20-
# .select { _1.object_id.even? }
21-
# .map(&:itself)
22-
# .take(2)
23-
# .to_a
24-
#
25-
# individuals => Array
2614
class ResponsesPage
2715
include FinchAPI::Internal::Type::BasePage
2816

lib/finch_api/internal/single_page.rb

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,6 @@ module Internal
1111
# single_page.auto_paging_each do |payment|
1212
# puts(payment)
1313
# end
14-
#
15-
# @example
16-
# payments =
17-
# single_page
18-
# .to_enum
19-
# .lazy
20-
# .select { _1.object_id.even? }
21-
# .map(&:itself)
22-
# .take(2)
23-
# .to_a
24-
#
25-
# payments => Array
2614
class SinglePage < ::Array
2715
include FinchAPI::Internal::Type::BasePage
2816

lib/finch_api/internal/type/base_page.rb

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -3,27 +3,7 @@
33
module FinchAPI
44
module Internal
55
module Type
6-
# @example
7-
# if page.has_next?
8-
# page = page.next_page
9-
# end
10-
#
11-
# @example
12-
# page.auto_paging_each do |access_token|
13-
# puts(access_token)
14-
# end
15-
#
16-
# @example
17-
# access_tokens =
18-
# page
19-
# .to_enum
20-
# .lazy
21-
# .select { _1.object_id.even? }
22-
# .map(&:itself)
23-
# .take(2)
24-
# .to_a
25-
#
26-
# access_tokens => Array
6+
# This module provides a base implementation for paginated responses in the SDK.
277
module BasePage
288
# rubocop:disable Lint/UnusedMethodArgument
299

rbi/lib/finch_api/internal.rbi

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,7 @@ module FinchAPI
66
# Due to the current WIP status of Shapes support in Sorbet, types referencing
77
# this alias might be refined in the future.
88
AnyHash = T.type_alias { T::Hash[Symbol, T.anything] }
9+
10+
OMIT = T.let(T.anything, T.anything)
911
end
1012
end

rbi/lib/finch_api/internal/type/base_page.rbi

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
module FinchAPI
44
module Internal
55
module Type
6+
# This module provides a base implementation for paginated responses in the SDK.
67
module BasePage
78
Elem = type_member(:out)
89

sig/finch_api/internal.rbs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
module FinchAPI
22
module Internal
3+
OMIT: top
34
end
45
end

0 commit comments

Comments
 (0)