rails-mcp-server 1.1.3 → 1.1.4

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: 02c77d8a0a509c668fbac9499082d11ab59e3acc3e8e06f9dcb932c37344efdb
4
- data.tar.gz: 50ee750a4af047013fa27db79a82007c59668593f9b5efbb67fa2e5024df37e8
3
+ metadata.gz: 4499d9e7363d1b0dcdb3716a6afbbbbab88248d2a75d96e776b072b1cdbe62e0
4
+ data.tar.gz: '08f1f6d034cddcfe1cf52c727371670473845b50e0448171fffc1ba3e417318e'
5
5
  SHA512:
6
- metadata.gz: 83d380f54c9ad929e20a14f755d641687bced98349b6c7f1b8931077b55fab5a4f63992163ff017d836eb3ae67368573af88957c571fb13e1f8da2fdd9670451
7
- data.tar.gz: 0aba6aa7ba7c0bb3e6e8439b60326a64bcbee080d81d981771857d12323ae522483464d1daae0a87f38d8abd115516a21f28c4880205a08316ccec596d17453f
6
+ metadata.gz: 38ee4905ebe9ede861234ffa3e10ccdc4ce1beebd74d1bb2d76edc0cb3f507a5626717b7d22bad73ed6a92d06e2721a16f4f0753d963b859b6634146921493c9
7
+ data.tar.gz: adfca87c862c5e30d24b2807bb850b7cfc3a987de28f0fae8f8f7c3f8352ba325f4b267e2dd867a766fdd1d4612b125dbef9039edc4fc456ab9a0ef8818299ab
data/exe/rails-mcp-server CHANGED
@@ -1,6 +1,9 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
- require "bundler/setup"
3
+ if defined?(Bundler) && !defined?(Bundler::ORIGINAL_ENV)
4
+ require "bundler/setup"
5
+ Bundler::ORIGINAL_ENV = ENV.to_h
6
+ end
4
7
 
5
8
  require "fast_mcp"
6
9
  require "rack"
@@ -79,7 +82,9 @@ when "http"
79
82
  puts "MCP endpoints:"
80
83
  puts " - http://localhost:#{port}/mcp/sse (SSE endpoint)"
81
84
  puts " - http://localhost:#{port}/mcp/messages (JSON-RPC endpoint)"
82
- puts "Press Ctrl+C to stop"
85
+ puts ""
86
+ puts "Version #{RailsMcpServer::VERSION}"
87
+ puts ""
83
88
 
84
89
  rack_app = ->(env) {
85
90
  [200, {"Content-Type" => "text/plain"}, ["Rails MCP Server #{RailsMcpServer::VERSION}"]]
@@ -22,7 +22,7 @@ module RailsMcpServer
22
22
  # Execute the Rails schema command for a specific table
23
23
  schema_output = RailsMcpServer::RunProcess.execute_rails_command(
24
24
  active_project_path,
25
- "bin/rails runner \"require 'active_record'; puts ActiveRecord::Base.connection.columns('#{table_name}').map{|c| [c.name, c.type, c.null, c.default].inspect}.join('\n')\""
25
+ "bin/rails runner \"require 'active_record'; puts ActiveRecord::Base.connection.columns('#{table_name}').map{|c| [c.name, c.type, c.null, c.default].inspect}.join('\\n')\""
26
26
  )
27
27
 
28
28
  if schema_output.strip.empty?
@@ -33,7 +33,7 @@ module RailsMcpServer
33
33
  end
34
34
 
35
35
  # Parse the column information
36
- columns = schema_output.strip.split("\n").map do |column_info|
36
+ columns = schema_output.strip.split("\\n").map do |column_info|
37
37
  eval(column_info) # This is safe because we're generating the string ourselves # rubocop:disable Security/Eval
38
38
  end
39
39
 
@@ -1,3 +1,5 @@
1
+ require "bundler"
2
+
1
3
  module RailsMcpServer
2
4
  class RunProcess
3
5
  def self.execute_rails_command(project_path, command)
@@ -1,3 +1,3 @@
1
1
  module RailsMcpServer
2
- VERSION = "1.1.3"
2
+ VERSION = "1.1.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails-mcp-server
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.3
4
+ version: 1.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mario Alberto Chávez Cárdenas