raix-openai-eight 1.0.1

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: 3b17c4f6ec3e82f069f7ab8fed6b0cfb86db94af304efbe0ad1536be4c4aa1dc
4
+ data.tar.gz: 1220321e8bed71f9b2151ae43c0dc34603ce2e3da5ba6ee849a68124ac5a1493
5
+ SHA512:
6
+ metadata.gz: 8462c3697f785bd58aeb8d9c05382311517e95f1bec0f4fc5e14ccc72b8a7dccc57ff1b431824ae615cc63fedbaa76cdc38421019d9ad36df1f8088e7f662cee
7
+ data.tar.gz: 5b07fcde8c6f35ac230cc821f6cb3b258464d61e2ab0409d1a42340598b86b54566e36455de40190be6f336198daf095c888f13a4e886b85b59e6364663382ae
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --format documentation
2
+ --color
3
+ --require spec_helper
data/.rubocop.yml ADDED
@@ -0,0 +1,53 @@
1
+ AllCops:
2
+ NewCops: enable
3
+ SuggestExtensions: false
4
+ TargetRubyVersion: 3.2.1
5
+
6
+ Gemspec/RequireMFA:
7
+ Enabled: false
8
+
9
+ Style/OpenStructUse:
10
+ Enabled: false
11
+
12
+ Style/StringLiterals:
13
+ Enabled: true
14
+ EnforcedStyle: double_quotes
15
+
16
+ Style/StringLiteralsInInterpolation:
17
+ Enabled: true
18
+ EnforcedStyle: double_quotes
19
+
20
+ Style/IfUnlessModifier:
21
+ Enabled: false
22
+ Layout/LineLength:
23
+ Enabled: false
24
+
25
+ Metrics/BlockLength:
26
+ Enabled: false
27
+
28
+ Metrics/MethodLength:
29
+ Enabled: false
30
+
31
+ Metrics/ModuleLength:
32
+ Enabled: false
33
+
34
+ Metrics/AbcSize:
35
+ Enabled: false
36
+
37
+ Metrics/CyclomaticComplexity:
38
+ Enabled: false
39
+
40
+ Metrics/PerceivedComplexity:
41
+ Enabled: false
42
+
43
+ Metrics/ParameterLists:
44
+ Enabled: false
45
+
46
+ Metrics/ClassLength:
47
+ Enabled: false
48
+
49
+ Style/FrozenStringLiteralComment:
50
+ Enabled: false
51
+
52
+ Style/MultilineBlockChain:
53
+ Enabled: false
data/.ruby-version ADDED
@@ -0,0 +1 @@
1
+ 3.4.2
data/CHANGELOG.md ADDED
@@ -0,0 +1,168 @@
1
+ ## [1.0.1] - 2025-06-04
2
+ ### Fixed
3
+ - Fixed PromptDeclarations module namespace - now properly namespaced under Raix
4
+ - Removed Rails.logger dependencies from PromptDeclarations for non-Rails environments
5
+ - Fixed documentation example showing incorrect `openai: true` usage (should be model string)
6
+ - Added comprehensive tests for PromptDeclarations module
7
+
8
+ ### Changed
9
+ - Improved error handling in PromptDeclarations to catch StandardError instead of generic rescue
10
+
11
+ ## [1.0.0] - 2025-06-04
12
+ ### Breaking Changes
13
+ - **Deprecated `loop` parameter in ChatCompletion** - The system now automatically continues conversations after tool calls until the AI provides a text response. The `loop` parameter shows a deprecation warning but still works for backwards compatibility.
14
+ - **Tool-based completions now return strings instead of arrays** - When functions are called, the final response is a string containing the AI's text response, not an array of function results.
15
+ - **`stop_looping!` renamed to `stop_tool_calls_and_respond!`** - Better reflects the new automatic continuation behavior.
16
+
17
+ ### Added
18
+ - **Automatic conversation continuation** - Chat completions automatically continue after tool execution without needing the `loop` parameter.
19
+ - **`max_tool_calls` parameter** - Controls the maximum number of tool invocations to prevent infinite loops (default: 25).
20
+ - **Configuration for `max_tool_calls`** - Added `max_tool_calls` to the Configuration class with sensible defaults.
21
+
22
+ ### Changed
23
+ - ChatCompletion handles continuation after tool function calls automatically.
24
+ - Improved CI/CD workflow to use `bundle exec rake ci` for consistent testing.
25
+
26
+ ### Fixed
27
+ - Resolved conflict between `loop` attribute and Ruby's `Kernel.loop` method (fixes #11).
28
+ - Fixed various RuboCop warnings using keyword argument forwarding.
29
+ - Improved error handling with proper warning messages instead of puts.
30
+
31
+ ## [0.9.2] - 2025-06-03
32
+ ### Fixed
33
+ - Fixed OpenAI chat completion compatibility
34
+ - Fixed SHA256 hexdigest generation for MCP tool names
35
+ - Added ostruct as explicit dependency to prevent warnings
36
+ - Fixed rubocop lint error for alphabetized gemspec dependencies
37
+ - Updated default OpenRouter model
38
+
39
+ ## [0.9.1] - 2025-05-30
40
+ ### Added
41
+ - **MCP Type Coercion** - Automatic type conversion for MCP tool arguments based on JSON schema
42
+ - Supports integer, number, boolean, array, and object types
43
+ - Handles nested objects and arrays of objects with proper coercion
44
+ - Gracefully handles invalid JSON and type mismatches
45
+ - **MCP Image Support** - MCP tools can now return image content as structured JSON
46
+
47
+ ### Fixed
48
+ - Fixed handling of nil values in MCP argument coercion
49
+
50
+ ## [0.9.0] - 2025-05-30
51
+ ### Added
52
+ - **MCP (Model Context Protocol) Support**
53
+ - New `stdio_mcp` method for stdio-based MCP servers
54
+ - Refactored existing MCP code into `SseClient` and `StdioClient`
55
+ - Split top-level `mcp` method into `sse_mcp` and `stdio_mcp`
56
+ - Added authentication support for MCP servers
57
+ - **Class-Level Configuration**
58
+ - Moved configuration to separate `Configuration` class
59
+ - Added fallback mechanism for configuration options
60
+ - Cleaner metaprogramming implementation
61
+
62
+ ### Fixed
63
+ - Fixed method signature of functions added via MCP
64
+
65
+ ## [0.8.6] - 2025-05-19
66
+ - add `required` and `optional` flags for parameters in `function` declarations
67
+
68
+ ## [0.8.5] - 2025-05-08
69
+ - renamed `tools` argument to `chat_completion` to `available_tools` to prevent shadowing the existing tool attribute (potentially breaking change to enhancement introduced in 0.8.1)
70
+
71
+ ## [0.8.4] - 2025-05-07
72
+ - Calls strip instead of squish on response of chat_completion in order to not clobber linebreaks
73
+
74
+ ## [0.8.3] - 2025-04-30
75
+ - Adds optional ActiveSupport Cache parameter to `dispatch_tool_function` for caching tool calls
76
+
77
+ ## [0.8.2] - 2025-04-29
78
+ - Extracts function call dispatch into a public `dispatch_tool_function` that can be overridden in subclasses
79
+ - Uses `public_send` instead of `send` for better security and explicitness
80
+
81
+ ## [0.8.1] - 2025-04-24
82
+ Added ability to filter tool functions (or disable completely) when calling `chat_completion`. Thanks to @parruda for the contribution.
83
+
84
+ ## [0.8.0] - 2025-04-23
85
+ ### Added
86
+ * **MCP integration (Experimental)** — new `Raix::MCP` concern and `mcp` DSL for declaring remote MCP servers.
87
+ * Automatically fetches `tools/list`, registers remote tools as OpenAI‑compatible function schemas, and defines proxy methods that forward `tools/call`.
88
+ * `ChatCompletion#tools` now returns remote MCP tools alongside local `function` declarations.
89
+
90
+ ### Changed
91
+ * `lib/raix.rb` now requires `raix/mcp` so the concern is auto‑loaded.
92
+
93
+ ### Fixed
94
+ * Internal transcript handling spec expectations updated.
95
+
96
+ ### Specs
97
+ * Added `spec/raix/mcp_spec.rb` with comprehensive stubs for tools discovery & call flow.
98
+
99
+ ## [0.7.3] - 2025-04-23
100
+ - commit function call and result to transcript in one operation for thread safety
101
+
102
+ ## [0.7.2] - 2025-04-19
103
+ - adds support for `messages` parameter in `chat_completion` to override the transcript
104
+ - fixes potential race conditions in parallel chat completion calls by duplicating transcript
105
+
106
+ ## [0.7.1] - 2025-04-10
107
+ - adds support for JSON response format with automatic parsing
108
+ - improves error handling for JSON parsing failures
109
+
110
+ ## [0.7] - 2025-04-02
111
+ - adds support for `until` condition in `PromptDeclarations` to control prompt looping
112
+ - adds support for `if` and `unless` conditions in `PromptDeclarations` to control prompt execution
113
+ - adds support for `success` callback in `PromptDeclarations` to handle prompt responses
114
+ - adds support for `stream` handler in `PromptDeclarations` to control response streaming
115
+ - adds support for `params` in `PromptDeclarations` to customize API parameters per prompt
116
+ - adds support for `system` directive in `PromptDeclarations` to set per-prompt system messages
117
+ - adds support for `call` in `PromptDeclarations` to delegate to callable prompt objects
118
+ - adds support for `text` in `PromptDeclarations` to specify prompt content via lambda, string, or symbol
119
+ - adds support for `raw` parameter in `PromptDeclarations` to return raw API responses
120
+ - adds support for `openai` parameter in `PromptDeclarations` to use OpenAI directly
121
+ - adds support for `prompt` parameter in `PromptDeclarations` to specify initial prompt
122
+ - adds support for `last_response` in `PromptDeclarations` to access previous prompt responses
123
+ - adds support for `current_prompt` in `PromptDeclarations` to access current prompt context
124
+ - adds support for `MAX_LOOP_COUNT` in `PromptDeclarations` to prevent infinite loops
125
+ - adds support for `execute_ai_request` in `PromptDeclarations` to handle API calls
126
+ - adds support for `chat_completion_from_superclass` in `PromptDeclarations` to handle superclass calls
127
+ - adds support for `model`, `temperature`, and `max_tokens` in `PromptDeclarations` to access prompt parameters
128
+ - Make automatic JSON parsing available to non-OpenAI providers that don't support the response_format parameter by scanning for json XML tags
129
+
130
+ ## [0.6.0] - 2024-11-12
131
+ - adds `save_response` option to `chat_completion` to control transcript updates
132
+ - fixes potential race conditions in transcript handling
133
+
134
+ ## [0.4.8] - 2024-11-12
135
+ - adds documentation for `Predicate` maybe handler
136
+ - logs to stdout when a response is unhandled by `Predicate`
137
+
138
+ ## [0.4.7] - 2024-11-12
139
+ - adds missing requires `raix/predicate` so that it can be used in a Rails app automatically
140
+ - adds missing openai support for `Predicate`
141
+
142
+ ## [0.4.5] - 2024-11-11
143
+ - adds support for `ResponseFormat`
144
+ - added some missing requires to support String#squish
145
+
146
+ ## [0.4.4] - 2024-11-11
147
+ - adds support for multiple tool calls in a single response
148
+
149
+ ## [0.4.3] - 2024-11-11
150
+ - adds support for `Predicate` module
151
+
152
+ ## [0.4.2] - 2024-11-05
153
+ - adds support for [Predicted Outputs](https://platform.openai.com/docs/guides/latency-optimization#use-predicted-outputs) with the `prediction` option for OpenAI
154
+
155
+ ## [0.4.0] - 2024-10-18
156
+ - adds support for Anthropic-style prompt caching
157
+ - defaults to `max_completion_tokens` when using OpenAI directly
158
+
159
+ ## [0.3.2] - 2024-06-29
160
+ - adds support for streaming
161
+
162
+ ## [0.2.0] - tbd
163
+ - adds `ChatCompletion` module
164
+ - adds `PromptDeclarations` module
165
+ - adds `FunctionDispatch` module
166
+
167
+ ## [0.1.0] - 2024-04-03
168
+ - Initial release, placeholder gem
data/CLAUDE.md ADDED
@@ -0,0 +1,13 @@
1
+ This is a Ruby gem called Raix. Its purpose is to facilitate chat completion style AI text generation using LLMs provided by OpenAI and OpenRouter.
2
+
3
+ - When running all tests just do `bundle exec rake` since it automatically runs the linter with autocorrect
4
+ - Documentation: Include method/class documentation with examples when appropriate
5
+ - Add runtime dependencies to `raix.gemspec`.
6
+ - Add development dependencies to `Gemfile`.
7
+ - Don't ever test private methods directly. Specs should test behavior, not implementation.
8
+ - Never add test-specific code embedded in production code
9
+ - **Do not use require_relative**
10
+ - Require statements should always be in alphabetical order
11
+ - Always leave a blank line after module includes and before the rest of the class
12
+ - Do not decide unilaterally to leave code for the sake of "backwards compatibility"... always run those decisions by me first.
13
+ - Don't ever commit and push changes unless directly told to do so
@@ -0,0 +1,84 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
6
+
7
+ We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
8
+
9
+ ## Our Standards
10
+
11
+ Examples of behavior that contributes to a positive environment for our community include:
12
+
13
+ * Demonstrating empathy and kindness toward other people
14
+ * Being respectful of differing opinions, viewpoints, and experiences
15
+ * Giving and gracefully accepting constructive feedback
16
+ * Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
17
+ * Focusing on what is best not just for us as individuals, but for the overall community
18
+
19
+ Examples of unacceptable behavior include:
20
+
21
+ * The use of sexualized language or imagery, and sexual attention or
22
+ advances of any kind
23
+ * Trolling, insulting or derogatory comments, and personal or political attacks
24
+ * Public or private harassment
25
+ * Publishing others' private information, such as a physical or email
26
+ address, without their explicit permission
27
+ * Other conduct which could reasonably be considered inappropriate in a
28
+ professional setting
29
+
30
+ ## Enforcement Responsibilities
31
+
32
+ Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
33
+
34
+ Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.
35
+
36
+ ## Scope
37
+
38
+ This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
39
+
40
+ ## Enforcement
41
+
42
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at obiefernandez@gmail.com. All complaints will be reviewed and investigated promptly and fairly.
43
+
44
+ All community leaders are obligated to respect the privacy and security of the reporter of any incident.
45
+
46
+ ## Enforcement Guidelines
47
+
48
+ Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
49
+
50
+ ### 1. Correction
51
+
52
+ **Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
53
+
54
+ **Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
55
+
56
+ ### 2. Warning
57
+
58
+ **Community Impact**: A violation through a single incident or series of actions.
59
+
60
+ **Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
61
+
62
+ ### 3. Temporary Ban
63
+
64
+ **Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.
65
+
66
+ **Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
67
+
68
+ ### 4. Permanent Ban
69
+
70
+ **Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
71
+
72
+ **Consequence**: A permanent ban from any sort of public interaction within the community.
73
+
74
+ ## Attribution
75
+
76
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0,
77
+ available at https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
78
+
79
+ Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity).
80
+
81
+ [homepage]: https://www.contributor-covenant.org
82
+
83
+ For answers to common questions about this code of conduct, see the FAQ at
84
+ https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations.
data/Gemfile ADDED
@@ -0,0 +1,24 @@
1
+ # frozen_string_literal: true
2
+
3
+ source "https://rubygems.org"
4
+
5
+ # Specify your gem's dependencies in raix-rails.gemspec
6
+ gemspec
7
+
8
+ group :development do
9
+ gem "dotenv", ">= 2"
10
+ gem "guard"
11
+ gem "guard-rspec"
12
+ gem "pry", ">= 0.14"
13
+ gem "rake", "~> 13.0"
14
+ gem "rspec", "~> 3.0"
15
+ gem "rubocop", "~> 1.21"
16
+ gem "solargraph-rails", "~> 0.2.0.pre"
17
+ gem "sorbet"
18
+ gem "tapioca", require: false
19
+ end
20
+
21
+ group :test do
22
+ gem "vcr"
23
+ gem "webmock"
24
+ end
data/Gemfile.lock ADDED
@@ -0,0 +1,240 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ raix-openai-eight (1.0.1)
5
+ activesupport (>= 6.0)
6
+ faraday-retry (~> 2.0)
7
+ open_router (~> 0.2)
8
+ ostruct
9
+ ruby-openai (~> 8.1)
10
+
11
+ GEM
12
+ remote: https://rubygems.org/
13
+ specs:
14
+ activesupport (7.1.3.4)
15
+ base64
16
+ bigdecimal
17
+ concurrent-ruby (~> 1.0, >= 1.0.2)
18
+ connection_pool (>= 2.2.5)
19
+ drb
20
+ i18n (>= 1.6, < 2)
21
+ minitest (>= 5.1)
22
+ mutex_m
23
+ tzinfo (~> 2.0)
24
+ addressable (2.8.6)
25
+ public_suffix (>= 2.0.2, < 6.0)
26
+ ast (2.4.2)
27
+ backport (1.2.0)
28
+ base64 (0.2.0)
29
+ benchmark (0.3.0)
30
+ bigdecimal (3.1.8)
31
+ coderay (1.1.3)
32
+ concurrent-ruby (1.3.3)
33
+ connection_pool (2.4.1)
34
+ crack (0.4.5)
35
+ rexml
36
+ diff-lcs (1.5.1)
37
+ dotenv (3.1.2)
38
+ drb (2.2.1)
39
+ e2mmap (0.1.0)
40
+ erubi (1.13.0)
41
+ event_stream_parser (1.0.0)
42
+ faraday (2.13.2)
43
+ faraday-net_http (>= 2.0, < 3.5)
44
+ json
45
+ logger
46
+ faraday-multipart (1.1.1)
47
+ multipart-post (~> 2.0)
48
+ faraday-net_http (3.4.1)
49
+ net-http (>= 0.5.0)
50
+ faraday-retry (2.3.2)
51
+ faraday (~> 2.0)
52
+ ffi (1.17.2-arm64-darwin)
53
+ ffi (1.17.2-x86_64-linux-gnu)
54
+ formatador (1.1.0)
55
+ guard (2.18.1)
56
+ formatador (>= 0.2.4)
57
+ listen (>= 2.7, < 4.0)
58
+ lumberjack (>= 1.0.12, < 2.0)
59
+ nenv (~> 0.1)
60
+ notiffany (~> 0.0)
61
+ pry (>= 0.13.0)
62
+ shellany (~> 0.0)
63
+ thor (>= 0.18.1)
64
+ guard-compat (1.2.1)
65
+ guard-rspec (4.7.3)
66
+ guard (~> 2.1)
67
+ guard-compat (~> 1.1)
68
+ rspec (>= 2.99.0, < 4.0)
69
+ hashdiff (1.0.1)
70
+ i18n (1.14.5)
71
+ concurrent-ruby (~> 1.0)
72
+ jaro_winkler (1.6.0)
73
+ json (2.7.1)
74
+ kramdown (2.4.0)
75
+ rexml
76
+ kramdown-parser-gfm (1.1.0)
77
+ kramdown (~> 2.0)
78
+ language_server-protocol (3.17.0.3)
79
+ listen (3.9.0)
80
+ rb-fsevent (~> 0.10, >= 0.10.3)
81
+ rb-inotify (~> 0.9, >= 0.9.10)
82
+ logger (1.7.0)
83
+ lumberjack (1.2.10)
84
+ method_source (1.1.0)
85
+ minitest (5.24.0)
86
+ multipart-post (2.4.1)
87
+ mutex_m (0.2.0)
88
+ nenv (0.3.0)
89
+ net-http (0.6.0)
90
+ uri
91
+ netrc (0.11.0)
92
+ nokogiri (1.18.8-arm64-darwin)
93
+ racc (~> 1.4)
94
+ nokogiri (1.18.8-x86_64-linux-gnu)
95
+ racc (~> 1.4)
96
+ notiffany (0.1.3)
97
+ nenv (~> 0.1)
98
+ shellany (~> 0.0)
99
+ open_router (0.3.3)
100
+ activesupport (>= 6.0)
101
+ dotenv (>= 2)
102
+ faraday (>= 1)
103
+ faraday-multipart (>= 1)
104
+ ostruct (0.6.2)
105
+ parallel (1.24.0)
106
+ parser (3.3.0.5)
107
+ ast (~> 2.4.1)
108
+ racc
109
+ prism (0.30.0)
110
+ pry (0.14.2)
111
+ coderay (~> 1.1)
112
+ method_source (~> 1.0)
113
+ public_suffix (5.0.5)
114
+ racc (1.7.3)
115
+ rainbow (3.1.1)
116
+ rake (13.2.0)
117
+ rb-fsevent (0.11.2)
118
+ rb-inotify (0.11.1)
119
+ ffi (~> 1.0)
120
+ rbi (0.1.13)
121
+ prism (>= 0.18.0, < 1.0.0)
122
+ sorbet-runtime (>= 0.5.9204)
123
+ rbs (2.8.4)
124
+ regexp_parser (2.9.0)
125
+ reverse_markdown (2.1.1)
126
+ nokogiri
127
+ rexml (3.2.6)
128
+ rspec (3.13.0)
129
+ rspec-core (~> 3.13.0)
130
+ rspec-expectations (~> 3.13.0)
131
+ rspec-mocks (~> 3.13.0)
132
+ rspec-core (3.13.0)
133
+ rspec-support (~> 3.13.0)
134
+ rspec-expectations (3.13.0)
135
+ diff-lcs (>= 1.2.0, < 2.0)
136
+ rspec-support (~> 3.13.0)
137
+ rspec-mocks (3.13.0)
138
+ diff-lcs (>= 1.2.0, < 2.0)
139
+ rspec-support (~> 3.13.0)
140
+ rspec-support (3.13.1)
141
+ rubocop (1.62.1)
142
+ json (~> 2.3)
143
+ language_server-protocol (>= 3.17.0)
144
+ parallel (~> 1.10)
145
+ parser (>= 3.3.0.2)
146
+ rainbow (>= 2.2.2, < 4.0)
147
+ regexp_parser (>= 1.8, < 3.0)
148
+ rexml (>= 3.2.5, < 4.0)
149
+ rubocop-ast (>= 1.31.1, < 2.0)
150
+ ruby-progressbar (~> 1.7)
151
+ unicode-display_width (>= 2.4.0, < 3.0)
152
+ rubocop-ast (1.31.2)
153
+ parser (>= 3.3.0.4)
154
+ ruby-openai (8.1.0)
155
+ event_stream_parser (>= 0.3.0, < 2.0.0)
156
+ faraday (>= 1)
157
+ faraday-multipart (>= 1)
158
+ ruby-progressbar (1.13.0)
159
+ shellany (0.0.1)
160
+ solargraph (0.50.0)
161
+ backport (~> 1.2)
162
+ benchmark
163
+ bundler (~> 2.0)
164
+ diff-lcs (~> 1.4)
165
+ e2mmap
166
+ jaro_winkler (~> 1.5)
167
+ kramdown (~> 2.3)
168
+ kramdown-parser-gfm (~> 1.1)
169
+ parser (~> 3.0)
170
+ rbs (~> 2.0)
171
+ reverse_markdown (~> 2.0)
172
+ rubocop (~> 1.38)
173
+ thor (~> 1.0)
174
+ tilt (~> 2.0)
175
+ yard (~> 0.9, >= 0.9.24)
176
+ solargraph-rails (0.2.2.pre.4)
177
+ activesupport
178
+ solargraph (>= 0.41.1)
179
+ sorbet (0.5.11447)
180
+ sorbet-static (= 0.5.11447)
181
+ sorbet-runtime (0.5.11447)
182
+ sorbet-static (0.5.11447-universal-darwin)
183
+ sorbet-static (0.5.11447-x86_64-linux)
184
+ sorbet-static-and-runtime (0.5.11447)
185
+ sorbet (= 0.5.11447)
186
+ sorbet-runtime (= 0.5.11447)
187
+ spoom (1.3.2)
188
+ erubi (>= 1.10.0)
189
+ prism (>= 0.19.0)
190
+ sorbet-static-and-runtime (>= 0.5.10187)
191
+ thor (>= 0.19.2)
192
+ tapioca (0.14.4)
193
+ bundler (>= 2.2.25)
194
+ netrc (>= 0.11.0)
195
+ parallel (>= 1.21.0)
196
+ rbi (>= 0.1.4, < 0.2)
197
+ sorbet-static-and-runtime (>= 0.5.11087)
198
+ spoom (>= 1.2.0)
199
+ thor (>= 1.2.0)
200
+ yard-sorbet
201
+ thor (1.3.1)
202
+ tilt (2.3.0)
203
+ tzinfo (2.0.6)
204
+ concurrent-ruby (~> 1.0)
205
+ unicode-display_width (2.5.0)
206
+ uri (1.0.3)
207
+ vcr (6.2.0)
208
+ webmock (3.18.1)
209
+ addressable (>= 2.8.0)
210
+ crack (>= 0.3.2)
211
+ hashdiff (>= 0.4.0, < 2.0.0)
212
+ yard (0.9.36)
213
+ yard-sorbet (0.8.1)
214
+ sorbet-runtime (>= 0.5)
215
+ yard (>= 0.9)
216
+
217
+ PLATFORMS
218
+ arm64-darwin-21
219
+ arm64-darwin-22
220
+ arm64-darwin-23
221
+ arm64-darwin-24
222
+ x86_64-linux
223
+
224
+ DEPENDENCIES
225
+ dotenv (>= 2)
226
+ guard
227
+ guard-rspec
228
+ pry (>= 0.14)
229
+ raix-openai-eight!
230
+ rake (~> 13.0)
231
+ rspec (~> 3.0)
232
+ rubocop (~> 1.21)
233
+ solargraph-rails (~> 0.2.0.pre)
234
+ sorbet
235
+ tapioca
236
+ vcr
237
+ webmock
238
+
239
+ BUNDLED WITH
240
+ 2.4.12
data/Guardfile ADDED
@@ -0,0 +1,72 @@
1
+ # frozen_string_literal: true
2
+
3
+ # A sample Guardfile
4
+ # More info at https://github.com/guard/guard#readme
5
+
6
+ ## Uncomment and set this to only include directories you want to watch
7
+ # directories %w(app lib config test spec features) \
8
+ # .select{|d| Dir.exist?(d) ? d : UI.warning("Directory #{d} does not exist")}
9
+
10
+ ## Note: if you are using the `directories` clause above and you are not
11
+ ## watching the project directory ('.'), then you will want to move
12
+ ## the Guardfile to a watched dir and symlink it back, e.g.
13
+ #
14
+ # $ mkdir config
15
+ # $ mv Guardfile config/
16
+ # $ ln -s config/Guardfile .
17
+ #
18
+ # and, you'll have to watch "config/Guardfile" instead of "Guardfile"
19
+
20
+ # NOTE: The cmd option is now required due to the increasing number of ways
21
+ # rspec may be run, below are examples of the most common uses.
22
+ # * bundler: 'bundle exec rspec'
23
+ # * bundler binstubs: 'bin/rspec'
24
+ # * spring: 'bin/rspec' (This will use spring if running and you have
25
+ # installed the spring binstubs per the docs)
26
+ # * zeus: 'zeus rspec' (requires the server to be started separately)
27
+ # * 'just' rspec: 'rspec'
28
+
29
+ guard :rspec, cmd: "bundle exec rspec" do
30
+ require "guard/rspec/dsl"
31
+ dsl = Guard::RSpec::Dsl.new(self)
32
+
33
+ # Feel free to open issues for suggestions and improvements
34
+
35
+ # RSpec files
36
+ rspec = dsl.rspec
37
+ watch(rspec.spec_helper) { rspec.spec_dir }
38
+ watch(rspec.spec_support) { rspec.spec_dir }
39
+ watch(rspec.spec_files)
40
+
41
+ # Ruby files
42
+ ruby = dsl.ruby
43
+ dsl.watch_spec_files_for(ruby.lib_files)
44
+
45
+ # Rails files
46
+ rails = dsl.rails(view_extensions: %w[erb haml slim])
47
+ dsl.watch_spec_files_for(rails.app_files)
48
+ dsl.watch_spec_files_for(rails.views)
49
+
50
+ watch(rails.controllers) do |m|
51
+ [
52
+ rspec.spec.call("routing/#{m[1]}_routing"),
53
+ rspec.spec.call("controllers/#{m[1]}_controller"),
54
+ rspec.spec.call("acceptance/#{m[1]}")
55
+ ]
56
+ end
57
+
58
+ # Rails config changes
59
+ watch(rails.spec_helper) { rspec.spec_dir }
60
+ watch(rails.routes) { "#{rspec.spec_dir}/routing" }
61
+ watch(rails.app_controller) { "#{rspec.spec_dir}/controllers" }
62
+
63
+ # Capybara features specs
64
+ watch(rails.view_dirs) { |m| rspec.spec.call("features/#{m[1]}") }
65
+ watch(rails.layouts) { |m| rspec.spec.call("features/#{m[1]}") }
66
+
67
+ # Turnip features and steps
68
+ watch(%r{^spec/acceptance/(.+)\.feature$})
69
+ watch(%r{^spec/acceptance/steps/(.+)_steps\.rb$}) do |m|
70
+ Dir[File.join("**/#{m[1]}.feature")][0] || "spec/acceptance"
71
+ end
72
+ end