Skip to content

Commit 005fef1

Browse files
chore: bump dependency version and update sorbet types
1 parent e686c41 commit 005fef1

File tree

6 files changed

+64
-48
lines changed

6 files changed

+64
-48
lines changed

Gemfile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@ group :development do
1111
gem "sorbet"
1212
gem "steep"
1313
gem "syntax_tree"
14-
# TODO: using a fork for now, the prettier below has a bug
15-
gem "syntax_tree-rbs", github: "stainless-api/syntax_tree-rbs", branch: "main"
14+
gem "syntax_tree-rbs", github: "ruby-syntax-tree/syntax_tree-rbs", branch: "main"
1615
gem "tapioca"
1716
end
1817

Gemfile.lock

Lines changed: 41 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
GIT
2-
remote: https://github.com/stainless-api/syntax_tree-rbs.git
3-
revision: c30b50219918be7cfe3ef803a00b59d1e77fcada
2+
remote: https://github.com/ruby-syntax-tree/syntax_tree-rbs.git
3+
revision: f94bc3060682ffbd126e4d5086ffedc89073d626
44
branch: main
55
specs:
66
syntax_tree-rbs (1.0.0)
@@ -17,14 +17,14 @@ PATH
1717
GEM
1818
remote: https://rubygems.org/
1919
specs:
20-
activesupport (8.0.2.1)
20+
activesupport (8.1.1)
2121
base64
22-
benchmark (>= 0.3)
2322
bigdecimal
2423
concurrent-ruby (~> 1.0, >= 1.3.1)
2524
connection_pool (>= 2.2.5)
2625
drb
2726
i18n (>= 1.6, < 2)
27+
json
2828
logger (>= 1.4.2)
2929
minitest (>= 5.1)
3030
securerandom (>= 0.3)
@@ -33,22 +33,22 @@ GEM
3333
addressable (2.8.7)
3434
public_suffix (>= 2.0.2, < 7.0)
3535
ast (2.4.3)
36-
async (2.27.3)
36+
async (2.34.0)
3737
console (~> 1.29)
3838
fiber-annotation
3939
io-event (~> 1.11)
4040
metrics (~> 0.12)
41-
traces (~> 0.15)
41+
traces (~> 0.18)
4242
base64 (0.3.0)
43-
benchmark (0.4.1)
44-
bigdecimal (3.2.2)
43+
benchmark (0.5.0)
44+
bigdecimal (3.3.1)
4545
concurrent-ruby (1.3.5)
46-
connection_pool (2.5.3)
47-
console (1.33.0)
46+
connection_pool (2.5.4)
47+
console (1.34.2)
4848
fiber-annotation
4949
fiber-local (~> 1.1)
5050
json
51-
crack (1.0.0)
51+
crack (1.0.1)
5252
bigdecimal
5353
rexml
5454
csv (3.3.5)
@@ -64,20 +64,20 @@ GEM
6464
fiber-local (1.1.0)
6565
fiber-storage
6666
fiber-storage (1.0.1)
67-
fileutils (1.7.3)
68-
hashdiff (1.2.0)
67+
fileutils (1.8.0)
68+
hashdiff (1.2.1)
6969
i18n (1.14.7)
7070
concurrent-ruby (~> 1.0)
7171
io-event (1.11.2)
72-
json (2.13.2)
72+
json (2.15.2)
7373
language_server-protocol (3.17.0.5)
7474
lint_roller (1.1.0)
7575
listen (3.9.0)
7676
rb-fsevent (~> 0.10, >= 0.10.3)
7777
rb-inotify (~> 0.9, >= 0.9.10)
7878
logger (1.7.0)
79-
metrics (0.13.0)
80-
minitest (5.25.5)
79+
metrics (0.15.0)
80+
minitest (5.26.0)
8181
minitest-focus (1.4.0)
8282
minitest (>= 4, < 6)
8383
minitest-hooks (1.5.2)
@@ -89,51 +89,51 @@ GEM
8989
mutex_m (0.3.0)
9090
netrc (0.11.0)
9191
parallel (1.27.0)
92-
parser (3.3.9.0)
92+
parser (3.3.10.0)
9393
ast (~> 2.4.1)
9494
racc
9595
prettier_print (1.2.1)
96-
prism (1.4.0)
96+
prism (1.6.0)
9797
public_suffix (6.0.2)
9898
racc (1.8.1)
9999
rainbow (3.1.1)
100-
rake (13.3.0)
100+
rake (13.3.1)
101101
rb-fsevent (0.11.2)
102102
rb-inotify (0.11.1)
103103
ffi (~> 1.0)
104-
rbi (0.3.6)
104+
rbi (0.3.7)
105105
prism (~> 1.0)
106106
rbs (>= 3.4.4)
107-
rbs (3.9.4)
107+
rbs (3.9.5)
108108
logger
109109
redcarpet (3.6.1)
110-
regexp_parser (2.11.2)
111-
rexml (3.4.1)
112-
rubocop (1.79.2)
110+
regexp_parser (2.11.3)
111+
rexml (3.4.4)
112+
rubocop (1.81.7)
113113
json (~> 2.3)
114114
language_server-protocol (~> 3.17.0.2)
115115
lint_roller (~> 1.1.0)
116116
parallel (~> 1.10)
117117
parser (>= 3.3.0.2)
118118
rainbow (>= 2.2.2, < 4.0)
119119
regexp_parser (>= 2.9.3, < 3.0)
120-
rubocop-ast (>= 1.46.0, < 2.0)
120+
rubocop-ast (>= 1.47.1, < 2.0)
121121
ruby-progressbar (~> 1.7)
122122
unicode-display_width (>= 2.4.0, < 4.0)
123-
rubocop-ast (1.46.0)
123+
rubocop-ast (1.47.1)
124124
parser (>= 3.3.7.2)
125125
prism (~> 1.4)
126126
ruby-progressbar (1.13.0)
127127
securerandom (0.4.1)
128-
sorbet (0.5.12424)
129-
sorbet-static (= 0.5.12424)
130-
sorbet-runtime (0.5.12424)
131-
sorbet-static (0.5.12424-aarch64-linux)
132-
sorbet-static (0.5.12424-universal-darwin)
133-
sorbet-static (0.5.12424-x86_64-linux)
134-
sorbet-static-and-runtime (0.5.12424)
135-
sorbet (= 0.5.12424)
136-
sorbet-runtime (= 0.5.12424)
128+
sorbet (0.6.12690)
129+
sorbet-static (= 0.6.12690)
130+
sorbet-runtime (0.6.12690)
131+
sorbet-static (0.6.12690-aarch64-linux)
132+
sorbet-static (0.6.12690-universal-darwin)
133+
sorbet-static (0.6.12690-x86_64-linux)
134+
sorbet-static-and-runtime (0.6.12690)
135+
sorbet (= 0.6.12690)
136+
sorbet-runtime (= 0.6.12690)
137137
spoom (1.6.3)
138138
erubi (>= 1.10.0)
139139
prism (>= 0.28.0)
@@ -174,14 +174,14 @@ GEM
174174
terminal-table (4.0.0)
175175
unicode-display_width (>= 1.1.1, < 4)
176176
thor (1.4.0)
177-
traces (0.17.0)
177+
traces (0.18.2)
178178
tzinfo (2.0.6)
179179
concurrent-ruby (~> 1.0)
180-
unicode-display_width (3.1.5)
181-
unicode-emoji (~> 4.0, >= 4.0.4)
182-
unicode-emoji (4.0.4)
183-
uri (1.0.3)
184-
webmock (3.25.1)
180+
unicode-display_width (3.2.0)
181+
unicode-emoji (~> 4.1)
182+
unicode-emoji (4.1.0)
183+
uri (1.1.0)
184+
webmock (3.26.1)
185185
addressable (>= 2.8.0)
186186
crack (>= 0.3.2)
187187
hashdiff (>= 0.4.0, < 2.0.0)

lib/openlayer/internal/transport/base_client.rb

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,8 @@ def initialize(
201201
self.class::PLATFORM_HEADERS,
202202
{
203203
"accept" => "application/json",
204-
"content-type" => "application/json"
204+
"content-type" => "application/json",
205+
"user-agent" => user_agent
205206
},
206207
headers
207208
)
@@ -219,6 +220,11 @@ def initialize(
219220
# @return [Hash{String=>String}]
220221
private def auth_headers = {}
221222

223+
# @api private
224+
#
225+
# @return [String]
226+
private def user_agent = "#{self.class.name}/Ruby #{Openlayer::VERSION}"
227+
222228
# @api private
223229
#
224230
# @return [String]

rbi/openlayer/internal/transport/base_client.rbi

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,11 @@ module Openlayer
176176
private def auth_headers
177177
end
178178

179+
# @api private
180+
sig { returns(String) }
181+
private def user_agent
182+
end
183+
179184
# @api private
180185
sig { returns(String) }
181186
private def generate_idempotency_key

rbi/openlayer/internal/type/base_model.rbi

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ module Openlayer
3131
#
3232
# Assumes superclass fields are totally defined before fields are accessed /
3333
# defined on subclasses.
34-
sig { params(child: T.self_type).void }
34+
sig { params(child: Openlayer::Internal::Type::BaseModel).void }
3535
def inherited(child)
3636
end
3737

@@ -276,9 +276,13 @@ module Openlayer
276276

277277
# Create a new instance of a model.
278278
sig do
279-
params(data: T.any(T::Hash[Symbol, T.anything], T.self_type)).returns(
280-
T.attached_class
281-
)
279+
params(
280+
data:
281+
T.any(
282+
T::Hash[Symbol, T.anything],
283+
Openlayer::Internal::Type::BaseModel
284+
)
285+
).returns(T.attached_class)
282286
end
283287
def self.new(data = {})
284288
end

sig/openlayer/internal/transport/base_client.rbs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,8 @@ module Openlayer
8787

8888
private def auth_headers: -> ::Hash[String, String]
8989

90+
private def user_agent: -> String
91+
9092
private def generate_idempotency_key: -> String
9193

9294
private def build_request: (

0 commit comments

Comments
 (0)