amritk-scalar-test 0.3.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/LICENSE +1 -1
- data/README.md +5 -5
- data/SKILL.md +5 -5
- data/lib/amritk-scalar-test/client.rb +3 -3
- data/lib/amritk-scalar-test/models/{ping_ping_params.rb → ping_list_params.rb} +2 -2
- data/lib/amritk-scalar-test/models/{ping_ping_response.rb → ping_list_response.rb} +2 -2
- data/lib/amritk-scalar-test/models.rb +1 -1
- data/lib/amritk-scalar-test/resources/ping.rb +5 -5
- data/lib/amritk-scalar-test/version.rb +1 -1
- data/lib/amritk-scalar-test.rb +2 -2
- data/rbi/amritk-scalar-test/client.rbi +2 -2
- data/rbi/amritk-scalar-test/models/{ping_ping_params.rbi → ping_list_params.rbi} +2 -2
- data/rbi/amritk-scalar-test/models/{ping_ping_response.rbi → ping_list_response.rbi} +2 -2
- data/rbi/amritk-scalar-test/models.rbi +1 -1
- data/rbi/amritk-scalar-test/resources/ping.rbi +2 -2
- data/sig/amritk-scalar-test/models/{ping_ping_params.rbs → ping_list_params.rbs} +2 -2
- data/sig/amritk-scalar-test/models/{ping_ping_response.rbs → ping_list_response.rbs} +2 -2
- data/sig/amritk-scalar-test/models.rbs +1 -1
- data/sig/amritk-scalar-test/resources/ping.rbs +2 -2
- metadata +9 -10
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e374a3caa78ace1f9fcb951064f42d46b03d840f39a960a60616dfb67fa5b365
|
|
4
|
+
data.tar.gz: 45c0b1c49651a0da23cdb7b584f9d828fff52167eced57384f4e42feebd3f15d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8b92a580a9a2725ac71ae59be587d053875a6702fb18350eb49d962e94e5d66fdeb54297104b62192bdfef90ea65870a3170b720073ba2802d22d3ddc55798ce
|
|
7
|
+
data.tar.gz: b2426c2dd5630d86179e600024bf4f56cce6cc5d3b46c10bf1f505b337ea22503b38c5fde4f426b9b6d32f8fefd3025f428b0fd424ba186562fafd953dc8618b
|
data/LICENSE
CHANGED
|
@@ -186,7 +186,7 @@
|
|
|
186
186
|
same "printed page" as the copyright notice for easier
|
|
187
187
|
identification within third-party archives.
|
|
188
188
|
|
|
189
|
-
Copyright 2026
|
|
189
|
+
Copyright 2026 Scalar Ruby Test
|
|
190
190
|
|
|
191
191
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
192
|
you may not use this file except in compliance with the License.
|
data/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Scalar Ruby Test
|
|
2
2
|
|
|
3
|
-
This library provides convenient access to the
|
|
3
|
+
This library provides convenient access to the Scalar Ruby Test REST API from Ruby.
|
|
4
4
|
|
|
5
5
|
The full API of this library can be found in [api.md](./api.md).
|
|
6
6
|
|
|
@@ -26,7 +26,7 @@ The full API of this library can be found in [api.md](./api.md).
|
|
|
26
26
|
Add the gem to your application's `Gemfile`:
|
|
27
27
|
|
|
28
28
|
```ruby
|
|
29
|
-
gem "amritk-scalar-test", "~> 0.
|
|
29
|
+
gem "amritk-scalar-test", "~> 0.5.0" # x-release-please-version
|
|
30
30
|
```
|
|
31
31
|
|
|
32
32
|
Or install it directly:
|
|
@@ -44,7 +44,7 @@ require "amritk-scalar-test"
|
|
|
44
44
|
|
|
45
45
|
client = AmritkScalarTest::Client.new
|
|
46
46
|
|
|
47
|
-
response = client.ping.
|
|
47
|
+
response = client.ping.list
|
|
48
48
|
|
|
49
49
|
puts response.inspect
|
|
50
50
|
```
|
|
@@ -67,7 +67,7 @@ Non-success responses throw generated API errors. Error objects expose status, h
|
|
|
67
67
|
|
|
68
68
|
```ruby
|
|
69
69
|
begin
|
|
70
|
-
response = client.ping.
|
|
70
|
+
response = client.ping.list
|
|
71
71
|
|
|
72
72
|
puts response.inspect
|
|
73
73
|
rescue AmritkScalarTest::Errors::APIError => error
|
data/SKILL.md
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: scalar-ruby-test-ruby-sdk
|
|
3
|
-
description: "Ruby SDK for
|
|
3
|
+
description: "Ruby SDK for Scalar Ruby Test API. Use when writing Ruby code that calls Scalar Ruby Test API with the amritk-scalar-test package: installing it, constructing and authenticating the client, and calling API operations."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
#
|
|
6
|
+
# Scalar Ruby Test Ruby SDK
|
|
7
7
|
|
|
8
|
-
Generated Ruby client for
|
|
8
|
+
Generated Ruby client for Scalar Ruby Test API, published as `amritk-scalar-test`. Use the generated client instead of hand-writing HTTP requests.
|
|
9
9
|
|
|
10
10
|
## Install
|
|
11
11
|
|
|
@@ -28,7 +28,7 @@ require "amritk-scalar-test"
|
|
|
28
28
|
|
|
29
29
|
client = AmritkScalarTest::Client.new
|
|
30
30
|
|
|
31
|
-
response = client.ping.
|
|
31
|
+
response = client.ping.list
|
|
32
32
|
|
|
33
33
|
puts response.inspect
|
|
34
34
|
```
|
|
@@ -41,7 +41,7 @@ Non-success responses throw generated API errors. Error objects expose status, h
|
|
|
41
41
|
|
|
42
42
|
```ruby
|
|
43
43
|
begin
|
|
44
|
-
response = client.ping.
|
|
44
|
+
response = client.ping.list
|
|
45
45
|
|
|
46
46
|
puts response.inspect
|
|
47
47
|
rescue AmritkScalarTest::Errors::APIError => error
|
|
@@ -21,7 +21,7 @@ module AmritkScalarTest
|
|
|
21
21
|
# Creates and returns a new client for interacting with the API.
|
|
22
22
|
#
|
|
23
23
|
# @param base_url [String, nil] Override the default base URL for the API, e.g.,
|
|
24
|
-
# `"https://api.example.com/v2/"`. Defaults to `ENV["
|
|
24
|
+
# `"https://api.example.com/v2/"`. Defaults to `ENV["SCALAR_BW0_GP_BASE_URL"]`
|
|
25
25
|
#
|
|
26
26
|
# @param max_retries [Integer] Max number of retries to attempt after a failed retryable request.
|
|
27
27
|
#
|
|
@@ -31,7 +31,7 @@ module AmritkScalarTest
|
|
|
31
31
|
#
|
|
32
32
|
# @param max_retry_delay [Float]
|
|
33
33
|
def initialize(
|
|
34
|
-
base_url: ENV["
|
|
34
|
+
base_url: ENV["SCALAR_BW0_GP_BASE_URL"],
|
|
35
35
|
max_retries: self.class::DEFAULT_MAX_RETRIES,
|
|
36
36
|
timeout: self.class::DEFAULT_TIMEOUT_IN_SECONDS,
|
|
37
37
|
initial_retry_delay: self.class::DEFAULT_INITIAL_RETRY_DELAY,
|
|
@@ -40,7 +40,7 @@ module AmritkScalarTest
|
|
|
40
40
|
base_url ||= "https://api.example.com"
|
|
41
41
|
|
|
42
42
|
headers = {}
|
|
43
|
-
custom_headers_env = ENV["
|
|
43
|
+
custom_headers_env = ENV["SCALAR_BW0_GP_CUSTOM_HEADERS"]
|
|
44
44
|
unless custom_headers_env.nil?
|
|
45
45
|
parsed = {}
|
|
46
46
|
custom_headers_env.split("\n").each do |line|
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
module AmritkScalarTest
|
|
4
4
|
module Models
|
|
5
|
-
# @see AmritkScalarTest::Resources::Ping#
|
|
6
|
-
class
|
|
5
|
+
# @see AmritkScalarTest::Resources::Ping#list
|
|
6
|
+
class PingListParams < AmritkScalarTest::Internal::Type::BaseModel
|
|
7
7
|
extend AmritkScalarTest::Internal::Type::RequestParameters::Converter
|
|
8
8
|
include AmritkScalarTest::Internal::Type::RequestParameters
|
|
9
9
|
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
module AmritkScalarTest
|
|
4
4
|
module Models
|
|
5
|
-
# @see AmritkScalarTest::Resources::Ping#
|
|
6
|
-
class
|
|
5
|
+
# @see AmritkScalarTest::Resources::Ping#list
|
|
6
|
+
class PingListResponse < AmritkScalarTest::Internal::Type::BaseModel
|
|
7
7
|
# @!attribute message
|
|
8
8
|
#
|
|
9
9
|
# @return [String, nil]
|
|
@@ -5,18 +5,18 @@ module AmritkScalarTest
|
|
|
5
5
|
class Ping
|
|
6
6
|
# Ping the API
|
|
7
7
|
#
|
|
8
|
-
# @overload
|
|
8
|
+
# @overload list(request_options: {})
|
|
9
9
|
#
|
|
10
10
|
# @param request_options [AmritkScalarTest::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
11
11
|
#
|
|
12
|
-
# @return [AmritkScalarTest::Models::
|
|
12
|
+
# @return [AmritkScalarTest::Models::PingListResponse]
|
|
13
13
|
#
|
|
14
|
-
# @see AmritkScalarTest::Models::
|
|
15
|
-
def
|
|
14
|
+
# @see AmritkScalarTest::Models::PingListParams
|
|
15
|
+
def list(params = {})
|
|
16
16
|
@client.request(
|
|
17
17
|
method: :get,
|
|
18
18
|
path: "ping",
|
|
19
|
-
model: AmritkScalarTest::Models::
|
|
19
|
+
model: AmritkScalarTest::Models::PingListResponse,
|
|
20
20
|
options: params[:request_options]
|
|
21
21
|
)
|
|
22
22
|
end
|
data/lib/amritk-scalar-test.rb
CHANGED
|
@@ -51,7 +51,7 @@ require_relative "amritk-scalar-test/errors"
|
|
|
51
51
|
require_relative "amritk-scalar-test/internal/transport/base_client"
|
|
52
52
|
require_relative "amritk-scalar-test/internal/transport/pooled_net_requester"
|
|
53
53
|
require_relative "amritk-scalar-test/client"
|
|
54
|
-
require_relative "amritk-scalar-test/models/
|
|
55
|
-
require_relative "amritk-scalar-test/models/
|
|
54
|
+
require_relative "amritk-scalar-test/models/ping_list_params"
|
|
55
|
+
require_relative "amritk-scalar-test/models/ping_list_response"
|
|
56
56
|
require_relative "amritk-scalar-test/models"
|
|
57
57
|
require_relative "amritk-scalar-test/resources/ping"
|
|
@@ -25,8 +25,8 @@ module AmritkScalarTest
|
|
|
25
25
|
end
|
|
26
26
|
def self.new(
|
|
27
27
|
# Override the default base URL for the API, e.g.,
|
|
28
|
-
# `"https://api.example.com/v2/"`. Defaults to `ENV["
|
|
29
|
-
base_url: ENV["
|
|
28
|
+
# `"https://api.example.com/v2/"`. Defaults to `ENV["SCALAR_BW0_GP_BASE_URL"]`
|
|
29
|
+
base_url: ENV["SCALAR_BW0_GP_BASE_URL"],
|
|
30
30
|
# Max number of retries to attempt after a failed retryable request.
|
|
31
31
|
max_retries: AmritkScalarTest::Client::DEFAULT_MAX_RETRIES,
|
|
32
32
|
timeout: AmritkScalarTest::Client::DEFAULT_TIMEOUT_IN_SECONDS,
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
module AmritkScalarTest
|
|
4
4
|
module Models
|
|
5
|
-
class
|
|
5
|
+
class PingListParams < AmritkScalarTest::Internal::Type::BaseModel
|
|
6
6
|
extend AmritkScalarTest::Internal::Type::RequestParameters::Converter
|
|
7
7
|
include AmritkScalarTest::Internal::Type::RequestParameters
|
|
8
8
|
|
|
9
9
|
OrHash =
|
|
10
10
|
T.type_alias do
|
|
11
11
|
T.any(
|
|
12
|
-
AmritkScalarTest::
|
|
12
|
+
AmritkScalarTest::PingListParams,
|
|
13
13
|
AmritkScalarTest::Internal::AnyHash
|
|
14
14
|
)
|
|
15
15
|
end
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
module AmritkScalarTest
|
|
4
4
|
module Models
|
|
5
|
-
class
|
|
5
|
+
class PingListResponse < AmritkScalarTest::Internal::Type::BaseModel
|
|
6
6
|
OrHash =
|
|
7
7
|
T.type_alias do
|
|
8
8
|
T.any(
|
|
9
|
-
AmritkScalarTest::Models::
|
|
9
|
+
AmritkScalarTest::Models::PingListResponse,
|
|
10
10
|
AmritkScalarTest::Internal::AnyHash
|
|
11
11
|
)
|
|
12
12
|
end
|
|
@@ -7,9 +7,9 @@ module AmritkScalarTest
|
|
|
7
7
|
sig do
|
|
8
8
|
params(
|
|
9
9
|
request_options: AmritkScalarTest::RequestOptions::OrHash
|
|
10
|
-
).returns(AmritkScalarTest::Models::
|
|
10
|
+
).returns(AmritkScalarTest::Models::PingListResponse)
|
|
11
11
|
end
|
|
12
|
-
def
|
|
12
|
+
def list(request_options: {})
|
|
13
13
|
end
|
|
14
14
|
|
|
15
15
|
# @api private
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
module AmritkScalarTest
|
|
2
2
|
module Models
|
|
3
|
-
type
|
|
3
|
+
type ping_list_params =
|
|
4
4
|
{ } & AmritkScalarTest::Internal::Type::request_parameters
|
|
5
5
|
|
|
6
|
-
class
|
|
6
|
+
class PingListParams < AmritkScalarTest::Internal::Type::BaseModel
|
|
7
7
|
extend AmritkScalarTest::Internal::Type::RequestParameters::Converter
|
|
8
8
|
include AmritkScalarTest::Internal::Type::RequestParameters
|
|
9
9
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
module AmritkScalarTest
|
|
2
2
|
module Models
|
|
3
|
-
type
|
|
3
|
+
type ping_list_response = { message: String }
|
|
4
4
|
|
|
5
|
-
class
|
|
5
|
+
class PingListResponse < AmritkScalarTest::Internal::Type::BaseModel
|
|
6
6
|
attr_reader message: String?
|
|
7
7
|
|
|
8
8
|
def message=: (String) -> String
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
module AmritkScalarTest
|
|
2
2
|
module Resources
|
|
3
3
|
class Ping
|
|
4
|
-
def
|
|
4
|
+
def list: (
|
|
5
5
|
?request_options: AmritkScalarTest::request_opts
|
|
6
|
-
) -> AmritkScalarTest::Models::
|
|
6
|
+
) -> AmritkScalarTest::Models::PingListResponse
|
|
7
7
|
|
|
8
8
|
def initialize: (client: AmritkScalarTest::Client) -> void
|
|
9
9
|
end
|
metadata
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: amritk-scalar-test
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.5.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
|
-
-
|
|
7
|
+
- Scalar Ruby Test
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
@@ -69,8 +69,8 @@ files:
|
|
|
69
69
|
- lib/amritk-scalar-test/internal/type/unknown.rb
|
|
70
70
|
- lib/amritk-scalar-test/internal/util.rb
|
|
71
71
|
- lib/amritk-scalar-test/models.rb
|
|
72
|
-
- lib/amritk-scalar-test/models/
|
|
73
|
-
- lib/amritk-scalar-test/models/
|
|
72
|
+
- lib/amritk-scalar-test/models/ping_list_params.rb
|
|
73
|
+
- lib/amritk-scalar-test/models/ping_list_response.rb
|
|
74
74
|
- lib/amritk-scalar-test/request_options.rb
|
|
75
75
|
- lib/amritk-scalar-test/resources/ping.rb
|
|
76
76
|
- lib/amritk-scalar-test/version.rb
|
|
@@ -93,8 +93,8 @@ files:
|
|
|
93
93
|
- rbi/amritk-scalar-test/internal/type/unknown.rbi
|
|
94
94
|
- rbi/amritk-scalar-test/internal/util.rbi
|
|
95
95
|
- rbi/amritk-scalar-test/models.rbi
|
|
96
|
-
- rbi/amritk-scalar-test/models/
|
|
97
|
-
- rbi/amritk-scalar-test/models/
|
|
96
|
+
- rbi/amritk-scalar-test/models/ping_list_params.rbi
|
|
97
|
+
- rbi/amritk-scalar-test/models/ping_list_response.rbi
|
|
98
98
|
- rbi/amritk-scalar-test/request_options.rbi
|
|
99
99
|
- rbi/amritk-scalar-test/resources/ping.rbi
|
|
100
100
|
- rbi/amritk-scalar-test/version.rbi
|
|
@@ -117,8 +117,8 @@ files:
|
|
|
117
117
|
- sig/amritk-scalar-test/internal/type/unknown.rbs
|
|
118
118
|
- sig/amritk-scalar-test/internal/util.rbs
|
|
119
119
|
- sig/amritk-scalar-test/models.rbs
|
|
120
|
-
- sig/amritk-scalar-test/models/
|
|
121
|
-
- sig/amritk-scalar-test/models/
|
|
120
|
+
- sig/amritk-scalar-test/models/ping_list_params.rbs
|
|
121
|
+
- sig/amritk-scalar-test/models/ping_list_response.rbs
|
|
122
122
|
- sig/amritk-scalar-test/request_options.rbs
|
|
123
123
|
- sig/amritk-scalar-test/resources/ping.rbs
|
|
124
124
|
- sig/amritk-scalar-test/version.rbs
|
|
@@ -128,7 +128,6 @@ licenses:
|
|
|
128
128
|
- Apache-2.0
|
|
129
129
|
metadata:
|
|
130
130
|
source_code_uri: https://github.com/amritk/scalar-ruby
|
|
131
|
-
documentation_uri: https://github.com/amritk/scalar-ruby
|
|
132
131
|
post_install_message:
|
|
133
132
|
rdoc_options: []
|
|
134
133
|
require_paths:
|
|
@@ -147,5 +146,5 @@ requirements: []
|
|
|
147
146
|
rubygems_version: 3.4.19
|
|
148
147
|
signing_key:
|
|
149
148
|
specification_version: 4
|
|
150
|
-
summary: Ruby library to access the
|
|
149
|
+
summary: Ruby library to access the Scalar Ruby Test API
|
|
151
150
|
test_files: []
|