hatchet-sdk 0.0.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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 04cba5845adc6fdaa4fe8211dcf3326ff8e029d458ea80db7c9aa8018092a466
4
+ data.tar.gz: 54e7411d0da2caba1198049225642b1242fe25838d62d1b70560fefdd9bc30f5
5
+ SHA512:
6
+ metadata.gz: cd5c9791787389f7a844f2cb61f9394b31ee8212a8fde4a06701be212683536de20cf78fa5db8c55a8ab03fcab09c190101ef6dd084720a92b66f739d0f2016d
7
+ data.tar.gz: 86d51a2da75ccd5cdae6c9fd01fb6e18e8956227661f34cd892ad26b517e51ce4add58b93fd212eec92da7621a7c4aa729746ebe39804d79dd8d5ed278f0c62c
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --format documentation
2
+ --color
3
+ --require spec_helper
data/.rubocop.yml ADDED
@@ -0,0 +1,8 @@
1
+ AllCops:
2
+ TargetRubyVersion: 3.1
3
+
4
+ Style/StringLiterals:
5
+ EnforcedStyle: double_quotes
6
+
7
+ Style/StringLiteralsInInterpolation:
8
+ EnforcedStyle: double_quotes
data/CHANGELOG.md ADDED
@@ -0,0 +1,5 @@
1
+ ## [Unreleased]
2
+
3
+ ## [0.1.0] - 2025-08-04
4
+
5
+ - Initial release
data/CLAUDE.md ADDED
@@ -0,0 +1,42 @@
1
+ # CLAUDE.md
2
+
3
+ This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
4
+
5
+ ## Project Overview
6
+
7
+ This is the Ruby SDK for Hatchet (gem name: hatchet-sdk), currently in early development (version 0.0.0). The project follows standard Ruby gem conventions with a simple structure containing a main `Hatchet` module with a `Client` class for API key authentication.
8
+
9
+ ## Common Commands
10
+
11
+ **Testing:**
12
+ - `rake spec` or `bundle exec rspec` - Run all tests
13
+ - `rspec spec/hatchet_spec.rb` - Run specific test file
14
+
15
+ **Linting:**
16
+ - `rubocop` - Run Ruby linter
17
+ - `rubocop --safe-auto-correct` - Auto-fix safe lint issues
18
+
19
+ **Development:**
20
+ - `bin/setup` - Install dependencies after checkout
21
+ - `bin/console` - Start interactive console with gem loaded
22
+ - `bundle exec rake install` - Install gem locally
23
+ - `rake` - Run default task (spec + rubocop)
24
+
25
+ **Gem Management:**
26
+ - `bundle exec rake release` - Release new version (updates version, creates git tag, pushes to rubygems)
27
+
28
+ ## Architecture
29
+
30
+ **Core Structure:**
31
+ - `lib/hatchet-sdk.rb` - Main entry point, defines `Hatchet` module with `Error` and `Client` classes
32
+ - `lib/hatchet/version.rb` - Version constant
33
+ - `spec/` - RSpec tests with monkey patching disabled
34
+ - `sig/hatchet-sdk.rbs` - Ruby type signatures
35
+
36
+ **Key Classes:**
37
+ - `Hatchet::Client` - Main client class that accepts an API key for authentication
38
+ - `Hatchet::Error` - Base error class for gem-specific exceptions
39
+
40
+ The codebase uses frozen string literals and follows Ruby 3.1+ requirements.
41
+
42
+ Keep the CLAUDE.md instructions up to date as the project continues to develop.
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2025 gabriel ruttner
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,74 @@
1
+ # Hatchet Ruby SDK
2
+
3
+ <div align="center">
4
+
5
+ [![Gem Version](https://badge.fury.io/rb/hatchet.svg)](https://badge.fury.io/rb/hatchet)
6
+ [![Documentation](https://img.shields.io/badge/docs-hatchet.run-blue)](https://docs.hatchet.run)
7
+ [![License: MIT](https://img.shields.io/badge/License-MIT-purple.svg)](https://opensource.org/licenses/MIT)
8
+
9
+ </div>
10
+
11
+ This is the official Ruby SDK for [Hatchet](https://hatchet.run), a distributed, fault-tolerant task queue. The SDK allows you to easily integrate Hatchet's task scheduling and workflow orchestration capabilities into your Ruby applications.
12
+
13
+ ## Installation
14
+
15
+ Add this line to your application's Gemfile:
16
+
17
+ ```ruby
18
+ gem 'hatchet'
19
+ ```
20
+
21
+ And then execute:
22
+
23
+ ```bash
24
+ bundle install
25
+ ```
26
+
27
+ Or install it yourself as:
28
+
29
+ ```bash
30
+ gem install hatchet
31
+ ```
32
+
33
+ ## Quick Start
34
+
35
+ For examples of how to use the Hatchet Ruby SDK, including worker setup and task execution, please see our [official documentation](https://docs.hatchet.run/home/setup).
36
+
37
+ ## Features
38
+
39
+ - 🔄 **Workflow Orchestration**: Define complex workflows with dependencies and parallel execution
40
+ - 🔁 **Automatic Retries**: Configure retry policies for handling transient failures
41
+ - 📊 **Observability**: Track workflow progress and monitor execution metrics
42
+ - ⏰ **Scheduling**: Schedule workflows to run at specific times or on a recurring basis
43
+ - 🔄 **Event-Driven**: Trigger workflows based on events in your system
44
+
45
+ ## Documentation
46
+
47
+ For detailed documentation, examples, and best practices, visit:
48
+ - [Hatchet Documentation](https://docs.hatchet.run)
49
+ - [Examples](https://github.com/hatchet-dev/hatchet/tree/main/sdks/ruby/examples)
50
+
51
+ ## Development
52
+
53
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
54
+
55
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
56
+
57
+ Run tests with `bundle exec rspec spec`.
58
+
59
+ This project uses `gem-release` to help with versioning.
60
+
61
+ ```
62
+ $ gem bum # bumps to the next patch version
63
+ $ gem bump --version minor # bumps to the next minor version
64
+ $ gem bump --version major # bumps to the next major version
65
+ $ gem bump --version 1.1.1 # bumps to the specified version
66
+ ```
67
+
68
+ ## Contributing
69
+
70
+ We welcome contributions! Please check out our [contributing guidelines](https://docs.hatchet.run/contributing) and join our [Discord community](https://hatchet.run/discord) for discussions and support.
71
+
72
+ ## License
73
+
74
+ This SDK is released under the MIT License. See [LICENSE](https://github.com/hatchet-dev/hatchet/blob/main/LICENSE) for details.
data/Rakefile ADDED
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "bundler/gem_tasks"
4
+ require "rspec/core/rake_task"
5
+
6
+ RSpec::Core::RakeTask.new(:spec)
7
+
8
+ require "rubocop/rake_task"
9
+
10
+ RuboCop::RakeTask.new
11
+
12
+ task default: %i[spec rubocop]
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Hatchet
4
+ VERSION = "0.0.0"
5
+ end
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "hatchet/version"
4
+
5
+ module Hatchet
6
+ class Error < StandardError; end
7
+
8
+ class Client
9
+ attr_reader :api_key
10
+
11
+ def initialize(api_key)
12
+ @api_key = api_key
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,4 @@
1
+ module Hatchet
2
+ VERSION: String
3
+ # See the writing guide of rbs: https://github.com/ruby/rbs#guides
4
+ end
metadata ADDED
@@ -0,0 +1,84 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: hatchet-sdk
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.0
5
+ platform: ruby
6
+ authors:
7
+ - gabriel ruttner
8
+ bindir: exe
9
+ cert_chain: []
10
+ date: 1980-01-02 00:00:00.000000000 Z
11
+ dependencies:
12
+ - !ruby/object:Gem::Dependency
13
+ name: gem-release
14
+ requirement: !ruby/object:Gem::Requirement
15
+ requirements:
16
+ - - "~>"
17
+ - !ruby/object:Gem::Version
18
+ version: '2.2'
19
+ type: :development
20
+ prerelease: false
21
+ version_requirements: !ruby/object:Gem::Requirement
22
+ requirements:
23
+ - - "~>"
24
+ - !ruby/object:Gem::Version
25
+ version: '2.2'
26
+ - !ruby/object:Gem::Dependency
27
+ name: rspec
28
+ requirement: !ruby/object:Gem::Requirement
29
+ requirements:
30
+ - - "~>"
31
+ - !ruby/object:Gem::Version
32
+ version: '3.0'
33
+ type: :development
34
+ prerelease: false
35
+ version_requirements: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - "~>"
38
+ - !ruby/object:Gem::Version
39
+ version: '3.0'
40
+ description: The official Ruby SDK for Hatchet, a distributed, fault-tolerant task
41
+ orchestration engine. Easily integrate Hatchet's task scheduling and workflow orchestration
42
+ capabilities into your Ruby applications.
43
+ email:
44
+ - gabe@hatchet.run
45
+ executables: []
46
+ extensions: []
47
+ extra_rdoc_files: []
48
+ files:
49
+ - ".rspec"
50
+ - ".rubocop.yml"
51
+ - CHANGELOG.md
52
+ - CLAUDE.md
53
+ - LICENSE.txt
54
+ - README.md
55
+ - Rakefile
56
+ - lib/hatchet-sdk.rb
57
+ - lib/hatchet/version.rb
58
+ - sig/hatchet-sdk.rbs
59
+ homepage: https://hatchet.run
60
+ licenses:
61
+ - MIT
62
+ metadata:
63
+ allowed_push_host: https://rubygems.org
64
+ homepage_uri: https://hatchet.run
65
+ source_code_uri: https://github.com/hatchet-dev/hatchet/tree/main/sdks/ruby
66
+ changelog_uri: https://github.com/hatchet-dev/hatchet/blob/main/sdks/ruby/src/CHANGELOG.md
67
+ rdoc_options: []
68
+ require_paths:
69
+ - lib
70
+ required_ruby_version: !ruby/object:Gem::Requirement
71
+ requirements:
72
+ - - ">="
73
+ - !ruby/object:Gem::Version
74
+ version: 3.1.0
75
+ required_rubygems_version: !ruby/object:Gem::Requirement
76
+ requirements:
77
+ - - ">="
78
+ - !ruby/object:Gem::Version
79
+ version: '0'
80
+ requirements: []
81
+ rubygems_version: 3.6.9
82
+ specification_version: 4
83
+ summary: Ruby SDK for Hatchet, a distributed, fault-tolerant task orchestration engine
84
+ test_files: []