Skip to content

Commit f574a6d

Browse files
authored
Merge pull request #32 from patvice/changing-zeitwerk-setup
Changing Zeitwerk setup
2 parents bd32a97 + 538d981 commit f574a6d

File tree

3 files changed

+11
-9
lines changed

3 files changed

+11
-9
lines changed

lib/ruby_llm/chat.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# frozen_string_literal: true
22

3-
# This is an override of the RubyLLM::Chat class to convient methods for easy MCP support
3+
# This is an override of the RubyLLM::Chat class to add convenient methods to more
4+
# easily work with the MCP clients.
45
module RubyLLM
56
class Chat
67
def with_resources(*resources, **args)

lib/ruby_llm/mcp.rb

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,6 @@
44
require "zeitwerk"
55
require_relative "chat"
66

7-
loader = Zeitwerk::Loader.for_gem_extension(RubyLLM)
8-
loader.inflector.inflect("mcp" => "MCP")
9-
loader.inflector.inflect("sse" => "SSE")
10-
loader.inflector.inflect("openai" => "OpenAI")
11-
loader.inflector.inflect("streamable_http" => "StreamableHTTP")
12-
loader.setup
13-
147
module RubyLLM
158
module MCP
169
module_function
@@ -41,3 +34,11 @@ def logger
4134
end
4235
end
4336
end
37+
38+
loader = Zeitwerk::Loader.for_gem_extension(RubyLLM)
39+
loader.inflector.inflect("mcp" => "MCP")
40+
loader.inflector.inflect("sse" => "SSE")
41+
loader.inflector.inflect("openai" => "OpenAI")
42+
loader.inflector.inflect("streamable_http" => "StreamableHTTP")
43+
44+
loader.setup

ruby_llm-mcp.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Gem::Specification.new do |spec|
3333

3434
# Specify which files should be added to the gem when it is released.
3535
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
36-
spec.files = Dir.glob("lib/**/*") + ["README.md", "LICENSE"]
36+
spec.files = Dir.glob("lib/ruby_llm/**/*") + ["README.md", "LICENSE"]
3737
spec.require_paths = ["lib"]
3838

3939
spec.add_dependency "httpx", "~> 1.4"

0 commit comments

Comments
 (0)