claude-ruby 0.4.0 → 0.4.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: 04c0cdb7e7e035455287513cac3b7576c5a303ded39a41c1fd11b3153d96c318
4
- data.tar.gz: 501fab83c266f518ddeb9d5851daab241eb4a2fc8474e432d1853f19fc66d21e
3
+ metadata.gz: 1db10c7678a3ad525e393257769dab1e3df7883912a1011abbb0c2541c1d81bc
4
+ data.tar.gz: 3730a5a8bb2179c649febf370e991ea8fb62a1827343c1a0211c04ae2fad74eb
5
5
  SHA512:
6
- metadata.gz: 141041c2b8d7c724bb0ff1e8679ff2c26d9f1a3eb3b9df6224f2b4f6e02e106a4a42ba7a1f26b806597643aab7b575d53dbe6bc60da2aca3fc5f493433132932
7
- data.tar.gz: 6317870de2bbea4a224015ee7c2e0555bcb8fc6f2c4c8be173643fac99cef55170795192cddc6add65f65c052af0ba7d3e1758bb5a257e65f0eb82c1fa0d835b
6
+ metadata.gz: 67d84bd37b049f1426e54440fc3af1abb937252f2660c406e92cd42e45ed324bdb6c22a5fc4731df0bb9019db5ceb8aa9d7c59cafebbf9b7acfce92c76588daa
7
+ data.tar.gz: c754edcecf8e7179e20dbf4f69e2ccd982275fd9293719397c4e446dbb5eee4a8ebd115f7da6cc8d82394aa2885ff124014b879efcff086c36b87a0a443e366f
data/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ ## [0.4.2] - 2026-01-19
2
+ - Added deprecation warning
3
+
4
+ ## [0.4.1] - 2024-11-06
5
+ - Added the latest Claude models
6
+
1
7
  ## [0.4.0] - 2024-07-09
2
8
  - Refactored model constants into a separate Model module
3
9
  - Support custom endpoints
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- claude-ruby (0.3.1)
4
+ claude-ruby (0.4.2)
5
5
  httparty
6
6
 
7
7
  GEM
@@ -51,6 +51,7 @@ GEM
51
51
  PLATFORMS
52
52
  arm64-darwin-22
53
53
  ruby
54
+ x86_64-linux
54
55
 
55
56
  DEPENDENCIES
56
57
  claude-ruby!
data/README.md CHANGED
@@ -1,6 +1,15 @@
1
1
  # Claude Ruby
2
2
 
3
- [![Gem Version](https://badge.fury.io/rb/claude-ruby.svg)](https://badge.fury.io/rb/claude-ruby) [![License](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) [![Maintainability](https://api.codeclimate.com/v1/badges/08c7e7b58e9fbe7156eb/maintainability)](https://codeclimate.com/github/webventures/claude-ruby/maintainability) [![CI](https://github.com/webventures/claude-ruby/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/webventures/claude-ruby/actions/workflows/ci.yml)
3
+ > [!CAUTION]
4
+ > **This gem is deprecated and no longer maintained.**
5
+ >
6
+ > Anthropic now provides an official Ruby SDK: **[anthropic-sdk-ruby](https://github.com/anthropics/anthropic-sdk-ruby)** (gem: [`anthropic-sdk-ruby`](https://rubygems.org/gems/anthropic-sdk-ruby))
7
+ >
8
+ > Please migrate to the official gem for the latest features, models, and ongoing support.
9
+
10
+ ---
11
+
12
+ [![Gem Version](https://badge.fury.io/rb/claude-ruby.svg)](https://badge.fury.io/rb/claude-ruby) [![License](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) [![CI](https://github.com/webventures/claude-ruby/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/webventures/claude-ruby/actions/workflows/ci.yml)
4
13
 
5
14
  `claude-ruby` gem is an unofficial ruby SDK for interacting with the Anthropic API, for generating and streaming messages through Claude
6
15
 
@@ -215,7 +224,7 @@ By default claude-ruby will use the latest official Anthropic API endpoint at th
215
224
  You can optionally optionally override this - e.g. for testing, or for using a beta endpoint.
216
225
 
217
226
  ```ruby
218
- claude_client = Claude::Client.new(api_key, endpoint: 'you-custom-endpoint')
227
+ claude_client = Claude::Client.new(api_key, endpoint: 'your-custom-endpoint')
219
228
  ```
220
229
 
221
230
  ## Vision
@@ -0,0 +1,42 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "lib/claude/ruby/version"
4
+
5
+ Gem::Specification.new do |spec|
6
+ spec.name = "claude-ruby"
7
+ spec.version = Claude::Ruby::VERSION
8
+ spec.authors = ["Web Ventures Ltd"]
9
+ spec.email = ["gems@dev.webven.nz"]
10
+
11
+ spec.summary = 'A Ruby SDK for the Anthropic Claude API'
12
+ spec.description = 'Ruby SDK for interacting with the Anthropic API, for generating and streaming messages through Claude AI.'
13
+ spec.homepage = "https://github.com/webventures/claude-ruby.git"
14
+ spec.license = "MIT"
15
+ spec.required_ruby_version = ">= 3.0.0"
16
+
17
+ spec.metadata["homepage_uri"] = spec.homepage
18
+ spec.metadata["source_code_uri"] = "https://github.com/webventures/claude-ruby.git"
19
+ spec.metadata["changelog_uri"] = "https://github.com/webventures/claude-ruby/blob/main/CHANGELOG.md"
20
+
21
+ spec.post_install_message = <<~MSG
22
+ ======================================================================
23
+ DEPRECATION NOTICE: The 'claude-ruby' gem is deprecated.
24
+
25
+ Anthropic now provides an official Ruby SDK. Please migrate to:
26
+ gem install anthropic-sdk-ruby
27
+
28
+ More info: https://github.com/anthropics/anthropic-sdk-ruby
29
+ ======================================================================
30
+ MSG
31
+
32
+ spec.files = Dir.chdir(__dir__) do
33
+ `git ls-files -z`.split("\x0").reject do |f|
34
+ (f == __FILE__) || f.match(%r{\A(?:(?:bin|test|spec|features)/|\.(?:git|travis|circleci)|appveyor)})
35
+ end
36
+ end
37
+ spec.bindir = "exe"
38
+ spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
39
+ spec.require_paths = ["lib"]
40
+
41
+ spec.add_dependency 'httparty'
42
+ end
data/lib/claude/client.rb CHANGED
@@ -1,25 +1,33 @@
1
1
  require 'httparty'
2
2
  require 'json'
3
3
 
4
+ warn <<~DEPRECATION
5
+ [DEPRECATION WARNING] The 'claude-ruby' gem is deprecated and no longer maintained.
6
+ Please switch to the official Anthropic Ruby SDK: gem install anthropic-sdk-ruby
7
+ More info: https://github.com/anthropics/anthropic-sdk-ruby
8
+ DEPRECATION
9
+
4
10
  module Claude
5
11
  module Model
6
12
  CLAUDE_3_OPUS_20240229 = 'claude-3-opus-20240229'
7
13
 
8
- CLAUDE_3_SONNET_20240229 = 'claude-3-sonnet-20240229'
14
+ CLAUDE_3_5_SONNET_20241022 = 'claude-3-5-sonnet-20241022'
9
15
  CLAUDE_3_5_SONNET_20240620 = 'claude-3-5-sonnet-20240620'
16
+ CLAUDE_3_SONNET_20240229 = 'claude-3-sonnet-20240229'
10
17
 
18
+ CLAUDE_3_5_HAIKU_20241022 = 'claude-3-5-haiku-20241022'
11
19
  CLAUDE_3_HAIKU_20240307 = 'claude-3-haiku-20240307'
12
20
 
13
21
  CLAUDE_OPUS_LATEST = CLAUDE_3_OPUS_20240229
14
- CLAUDE_SONNET_LATEST = CLAUDE_3_5_SONNET_20240620
15
- CLAUDE_HAIKU_LATEST = CLAUDE_3_HAIKU_20240307
22
+ CLAUDE_SONNET_LATEST = CLAUDE_3_5_SONNET_20241022
23
+ CLAUDE_HAIKU_LATEST = CLAUDE_3_5_HAIKU_20241022
16
24
 
17
25
  CLAUDE_FASTEST = CLAUDE_HAIKU_LATEST
18
- CLAUDE_CHEAPEST = CLAUDE_HAIKU_LATEST
26
+ CLAUDE_CHEAPEST = CLAUDE_3_HAIKU_20240307
19
27
  CLAUDE_BALANCED = CLAUDE_SONNET_LATEST
20
- CLAUDE_SMARTEST = CLAUDE_3_5_SONNET_20240620
28
+ CLAUDE_SMARTEST = CLAUDE_3_5_SONNET_20241022
21
29
 
22
- CLAUDE_DEFAULT = CLAUDE_SONNET_LATEST
30
+ CLAUDE_DEFAULT = CLAUDE_BALANCED
23
31
  end
24
32
 
25
33
  class Client
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Claude
4
4
  module Ruby
5
- VERSION = "0.4.0"
5
+ VERSION = "0.4.2"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: claude-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Web Ventures Ltd
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-07-09 00:00:00.000000000 Z
11
+ date: 2026-01-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty
@@ -27,7 +27,7 @@ dependencies:
27
27
  description: Ruby SDK for interacting with the Anthropic API, for generating and streaming
28
28
  messages through Claude AI.
29
29
  email:
30
- - webven@mailgab.com
30
+ - gems@dev.webven.nz
31
31
  executables: []
32
32
  extensions: []
33
33
  extra_rdoc_files: []
@@ -38,6 +38,7 @@ files:
38
38
  - LICENSE.txt
39
39
  - README.md
40
40
  - Rakefile
41
+ - claude-ruby.gemspec
41
42
  - lib/claude/client.rb
42
43
  - lib/claude/ruby.rb
43
44
  - lib/claude/ruby/version.rb
@@ -50,7 +51,15 @@ metadata:
50
51
  homepage_uri: https://github.com/webventures/claude-ruby.git
51
52
  source_code_uri: https://github.com/webventures/claude-ruby.git
52
53
  changelog_uri: https://github.com/webventures/claude-ruby/blob/main/CHANGELOG.md
53
- post_install_message:
54
+ post_install_message: |
55
+ ======================================================================
56
+ DEPRECATION NOTICE: The 'claude-ruby' gem is deprecated.
57
+
58
+ Anthropic now provides an official Ruby SDK. Please migrate to:
59
+ gem install anthropic-sdk-ruby
60
+
61
+ More info: https://github.com/anthropics/anthropic-sdk-ruby
62
+ ======================================================================
54
63
  rdoc_options: []
55
64
  require_paths:
56
65
  - lib