opencode_client 1.0.0 → 1.0.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 37a405ab37e64310086a5198bd54364ba64acdc511368506b2f9473a4c6dc1dc
4
- data.tar.gz: 6025c92e3c65c490726777e0b46897d300ccb5482685993e1c763d8eac71c38e
3
+ metadata.gz: 17349082cdaddc549a1a20e756378e198aa9a845d34d3771875be4c45b9a6f12
4
+ data.tar.gz: 7771568418a5cf0b053652fc80fef604fae52be5e1807e5aca3cb33552520033
5
5
  SHA512:
6
- metadata.gz: bab4f3a1d77ab52576448dffac10f7661e9351b151696843059aa0ba3d04c3a64deb6adfdad286dadba67965efe48102a563332849c96daedb0f0689c2970fcf
7
- data.tar.gz: df8e395de17eb6f4154247ce7db5a00d4500d89654af4ea6caf9dc85ff6b2e37cc9f976c1bfc1aa99bd073cd5bb77bde131ba5605c8db3540f300930c669b4d0
6
+ metadata.gz: 1cc8aa4ead9563bb4eefdc66071792569ae42bf4b40a1f3c418d18dec6d5d3fbddd64a094c38ece18b5ccd1e608b271198bafdb558d62bd70e5359e64bcd42dd
7
+ data.tar.gz: f131a4795f9114940c108be07809668bea7fad4fa6b3517c4012da0fbe6f7f9133b11dfd4be27f371730f312e5b81cb5b41a8a2e8053453b1c9818f7c8c9aa46
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- opencode_client (1.0.0)
4
+ opencode_client (1.0.2)
5
5
  httpx (~> 1.0, >= 1.0.0)
6
6
 
7
7
  GEM
@@ -79,7 +79,7 @@ CHECKSUMS
79
79
  httpx (1.7.0) sha256=e219689555951f9c13c40862da120cdd2535e1454189bed589f04d7059557154
80
80
  jaro_winkler (1.5.6) sha256=007db7805527ada1cc12f2547676181d63b0a504ec4dd7a9a2eb2424521ccd81
81
81
  method_source (1.1.0) sha256=181301c9c45b731b4769bc81e8860e72f9161ad7d66dd99103c9ab84f560f5c5
82
- opencode_client (1.0.0)
82
+ opencode_client (1.0.2)
83
83
  parallel (1.27.0) sha256=4ac151e1806b755fb4e2dc2332cbf0e54f2e24ba821ff2d3dcf86bf6dc4ae130
84
84
  parser (3.3.10.0) sha256=ce3587fa5cc55a88c4ba5b2b37621b3329aadf5728f9eafa36bbd121462aabd6
85
85
  pry (0.15.2) sha256=12d54b8640d3fa29c9211dd4ffb08f3fd8bf7a4fd9b5a73ce5b59c8709385b6b
data/README.md CHANGED
@@ -6,8 +6,8 @@ opencode api
6
6
 
7
7
  This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
8
8
 
9
- - API version: 1.0.0
10
- - Package version: 1.0.0
9
+ - API version: 1.0.2
10
+ - Package version: 1.0.2
11
11
  - Generator version: 7.18.0
12
12
  - Build package: org.openapitools.codegen.languages.RubyClientCodegen
13
13
 
@@ -24,7 +24,7 @@ gem build opencode_client.gemspec
24
24
  Then either install the gem locally:
25
25
 
26
26
  ```shell
27
- gem install ./opencode_client-1.0.0.gem
27
+ gem install ./opencode_client-1.0.2.gem
28
28
  ```
29
29
 
30
30
  (for development, run `gem install --dev ./opencode_client-1.0.0.gem` to install the development dependencies)
@@ -33,7 +33,7 @@ or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.or
33
33
 
34
34
  Finally add this to the Gemfile:
35
35
 
36
- gem 'opencode_client', '~> 1.0.0'
36
+ gem 'opencode_client', '~> 1.0.2'
37
37
 
38
38
  ### Install from Git
39
39
 
data/example_usage.rb ADDED
@@ -0,0 +1,37 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ # frozen_string_literal: true
4
+
5
+ $LOAD_PATH.unshift(File.expand_path("lib", __dir__))
6
+ require "opencode_client"
7
+
8
+ # Example usage of the opencode_client Ruby SDK
9
+
10
+ # Initialize the API client & Set base URL (default: http://localhost:4096)
11
+ api_client = OpencodeClient::ApiClient.new
12
+ api_client.config.scheme = "http"
13
+ api_client.config.host = "localhost:4096"
14
+
15
+ # Initialize the Default API
16
+ client = OpencodeClient::DefaultApi.new(api_client)
17
+
18
+ # Health check example
19
+ begin
20
+ puts "Checking health..."
21
+ health_response = client.global_health
22
+ puts "Server healthy: #{health_response.healthy}"
23
+ puts "Server version: #{health_response.version}"
24
+ rescue OpencodeClient::ApiError => e
25
+ puts "Error checking health: #{e.message}"
26
+ end
27
+
28
+ # Get global events (SSE stream), need do some action.
29
+ begin
30
+ puts "Getting global events..."
31
+ events_response = client.global_event
32
+ puts "Events response: #{events_response}"
33
+ rescue OpencodeClient::ApiError => e
34
+ puts "Error getting events: #{e.message}"
35
+ end
36
+
37
+ puts "\nExample completed!"
@@ -137,7 +137,7 @@ module OpencodeClient
137
137
  warn '[DEPRECATED] the `valid?` method is obsolete'
138
138
  return false if @errors.nil?
139
139
  return false if @success.nil?
140
- success_validator = EnumAttributeValidator.new('Boolean', ["false"])
140
+ success_validator = EnumAttributeValidator.new('Boolean', ["false", false])
141
141
  return false unless success_validator.valid?(@success)
142
142
  true
143
143
  end
@@ -155,7 +155,7 @@ module OpencodeClient
155
155
  # Custom attribute writer method checking allowed values (enum).
156
156
  # @param [Object] success Object to be assigned
157
157
  def success=(success)
158
- validator = EnumAttributeValidator.new('Boolean', ["false"])
158
+ validator = EnumAttributeValidator.new('Boolean', ["false", false])
159
159
  unless validator.valid?(success)
160
160
  fail ArgumentError, "invalid value for \"success\", must be one of #{validator.allowable_values}."
161
161
  end
@@ -109,7 +109,7 @@ module OpencodeClient
109
109
  def valid?
110
110
  warn '[DEPRECATED] the `valid?` method is obsolete'
111
111
  return false if @disabled.nil?
112
- disabled_validator = EnumAttributeValidator.new('Boolean', ["true"])
112
+ disabled_validator = EnumAttributeValidator.new('Boolean', ["true", true])
113
113
  return false unless disabled_validator.valid?(@disabled)
114
114
  true
115
115
  end
@@ -117,7 +117,7 @@ module OpencodeClient
117
117
  # Custom attribute writer method checking allowed values (enum).
118
118
  # @param [Object] disabled Object to be assigned
119
119
  def disabled=(disabled)
120
- validator = EnumAttributeValidator.new('Boolean', ["true"])
120
+ validator = EnumAttributeValidator.new('Boolean', ["true", true])
121
121
  unless validator.valid?(disabled)
122
122
  fail ArgumentError, "invalid value for \"disabled\", must be one of #{validator.allowable_values}."
123
123
  end
@@ -123,7 +123,7 @@ module OpencodeClient
123
123
  def valid?
124
124
  warn '[DEPRECATED] the `valid?` method is obsolete'
125
125
  return false if @healthy.nil?
126
- healthy_validator = EnumAttributeValidator.new('Boolean', ["true"])
126
+ healthy_validator = EnumAttributeValidator.new('Boolean', ["true", true])
127
127
  return false unless healthy_validator.valid?(@healthy)
128
128
  return false if @version.nil?
129
129
  true
@@ -132,7 +132,7 @@ module OpencodeClient
132
132
  # Custom attribute writer method checking allowed values (enum).
133
133
  # @param [Object] healthy Object to be assigned
134
134
  def healthy=(healthy)
135
- validator = EnumAttributeValidator.new('Boolean', ["true"])
135
+ validator = EnumAttributeValidator.new('Boolean', ["true", true])
136
136
  unless validator.valid?(healthy)
137
137
  fail ArgumentError, "invalid value for \"healthy\", must be one of #{validator.allowable_values}."
138
138
  end
@@ -109,7 +109,7 @@ module OpencodeClient
109
109
  def valid?
110
110
  warn '[DEPRECATED] the `valid?` method is obsolete'
111
111
  return false if @success.nil?
112
- success_validator = EnumAttributeValidator.new('Boolean', ["true"])
112
+ success_validator = EnumAttributeValidator.new('Boolean', ["true", true])
113
113
  return false unless success_validator.valid?(@success)
114
114
  true
115
115
  end
@@ -117,7 +117,7 @@ module OpencodeClient
117
117
  # Custom attribute writer method checking allowed values (enum).
118
118
  # @param [Object] success Object to be assigned
119
119
  def success=(success)
120
- validator = EnumAttributeValidator.new('Boolean', ["true"])
120
+ validator = EnumAttributeValidator.new('Boolean', ["true", true])
121
121
  unless validator.valid?(success)
122
122
  fail ArgumentError, "invalid value for \"success\", must be one of #{validator.allowable_values}."
123
123
  end
@@ -11,5 +11,5 @@ Generator version: 7.18.0
11
11
  =end
12
12
 
13
13
  module OpencodeClient
14
- VERSION = '1.0.0'
14
+ VERSION = '1.0.2'
15
15
  end
@@ -5,7 +5,7 @@
5
5
 
6
6
  #opencode api
7
7
 
8
- The version of the OpenAPI document: 1.0.0
8
+ The version of the OpenAPI document: 1.0.2
9
9
 
10
10
  Generated by: https://openapi-generator.tech
11
11
  Generator version: 7.18.0
@@ -20,9 +20,9 @@ Gem::Specification.new do |s|
20
20
  s.version = OpencodeClient::VERSION
21
21
  s.platform = Gem::Platform::RUBY
22
22
  s.authors = ["OpenCode AI"]
23
- s.email = [""]
24
- s.homepage = "https://opencode.ai"
25
- s.summary = "opencode Ruby Gem"
23
+ s.email = ["eric.guocz@gmail.com"]
24
+ s.homepage = 'https://github.com/Eric-Guo/opencode_client_ruby'
25
+ s.summary = "OpenCode Ruby Client Gem"
26
26
  s.description = "Ruby client for the OpenCode API"
27
27
  s.license = "MIT"
28
28
  s.required_ruby_version = ">= 2.7"
Binary file
@@ -42,7 +42,7 @@ describe OpencodeClient::BadRequestError do
42
42
  describe 'test attribute "success"' do
43
43
  it 'should work' do
44
44
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
45
- # validator = Petstore::EnumTest::EnumAttributeValidator.new('Boolean', ["false"])
45
+ # validator = Petstore::EnumTest::EnumAttributeValidator.new('Boolean', ["false", false])
46
46
  # validator.allowable_values.each do |value|
47
47
  # expect { instance.success = value }.not_to raise_error
48
48
  # end
@@ -30,7 +30,7 @@ describe OpencodeClient::ConfigLspAnyOfValueAnyOf do
30
30
  describe 'test attribute "disabled"' do
31
31
  it 'should work' do
32
32
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
33
- # validator = Petstore::EnumTest::EnumAttributeValidator.new('Boolean', ["true"])
33
+ # validator = Petstore::EnumTest::EnumAttributeValidator.new('Boolean', ["true", true])
34
34
  # validator.allowable_values.each do |value|
35
35
  # expect { instance.disabled = value }.not_to raise_error
36
36
  # end
@@ -30,7 +30,7 @@ describe OpencodeClient::GlobalHealth200Response do
30
30
  describe 'test attribute "healthy"' do
31
31
  it 'should work' do
32
32
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
33
- # validator = Petstore::EnumTest::EnumAttributeValidator.new('Boolean', ["true"])
33
+ # validator = Petstore::EnumTest::EnumAttributeValidator.new('Boolean', ["true", true])
34
34
  # validator.allowable_values.each do |value|
35
35
  # expect { instance.healthy = value }.not_to raise_error
36
36
  # end
@@ -30,7 +30,7 @@ describe OpencodeClient::McpAuthRemove200Response do
30
30
  describe 'test attribute "success"' do
31
31
  it 'should work' do
32
32
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
33
- # validator = Petstore::EnumTest::EnumAttributeValidator.new('Boolean', ["true"])
33
+ # validator = Petstore::EnumTest::EnumAttributeValidator.new('Boolean', ["true", true])
34
34
  # validator.allowable_values.each do |value|
35
35
  # expect { instance.success = value }.not_to raise_error
36
36
  # end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: opencode_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - OpenCode AI
@@ -51,7 +51,7 @@ dependencies:
51
51
  version: 3.6.0
52
52
  description: Ruby client for the OpenCode API
53
53
  email:
54
- - ''
54
+ - eric.guocz@gmail.com
55
55
  executables: []
56
56
  extensions: []
57
57
  extra_rdoc_files: []
@@ -311,6 +311,7 @@ files:
311
311
  - docs/UserMessageTime.md
312
312
  - docs/VcsInfo.md
313
313
  - docs/WellKnownAuth.md
314
+ - example_usage.rb
314
315
  - git_push.sh
315
316
  - lib/opencode_client.rb
316
317
  - lib/opencode_client/api/default_api.rb
@@ -570,7 +571,7 @@ files:
570
571
  - lib/opencode_client/models/well_known_auth.rb
571
572
  - lib/opencode_client/version.rb
572
573
  - opencode_client.gemspec
573
- - pkg/opencode_client-1.0.0.gem
574
+ - pkg/opencode_client-1.0.1.gem
574
575
  - spec/api/default_api_spec.rb
575
576
  - spec/api/session_api_spec.rb
576
577
  - spec/models/agent_config_permission_bash_spec.rb
@@ -823,7 +824,7 @@ files:
823
824
  - spec/models/vcs_info_spec.rb
824
825
  - spec/models/well_known_auth_spec.rb
825
826
  - spec/spec_helper.rb
826
- homepage: https://opencode.ai
827
+ homepage: https://github.com/Eric-Guo/opencode_client_ruby
827
828
  licenses:
828
829
  - MIT
829
830
  metadata: {}
@@ -843,7 +844,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
843
844
  requirements: []
844
845
  rubygems_version: 4.0.3
845
846
  specification_version: 4
846
- summary: opencode Ruby Gem
847
+ summary: OpenCode Ruby Client Gem
847
848
  test_files:
848
849
  - spec/api/default_api_spec.rb
849
850
  - spec/api/session_api_spec.rb
Binary file