jsonrpc-middleware 0.2.0 → 0.4.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.
@@ -11,5 +11,5 @@ module JSONRPC
11
11
  #
12
12
  # @return [String] The current version number
13
13
  #
14
- VERSION = '0.2.0'
14
+ VERSION = '0.4.0'
15
15
  end
data/lib/jsonrpc.rb CHANGED
@@ -68,10 +68,13 @@ loader = Zeitwerk::Loader.for_gem
68
68
  loader.log! if ENV['DEBUG_ZEITWERK'] == 'true'
69
69
  loader.enable_reloading
70
70
  loader.collapse("#{__dir__}/jsonrpc/errors")
71
- loader.ignore("#{__dir__}/jsonrpc/railtie.rb")
71
+ loader.collapse("#{__dir__}/jsonrpc/railtie")
72
+
73
+ unless defined?(Rails)
74
+ loader.ignore("#{__dir__}/jsonrpc/railtie.rb")
75
+ loader.ignore("#{__dir__}/jsonrpc/railtie/method_constraint.rb")
76
+ end
77
+
72
78
  loader.inflector.inflect('jsonrpc' => 'JSONRPC')
73
79
  loader.setup
74
80
  loader.eager_load
75
-
76
- # Only load Rails integration if Rails is available
77
- require_relative 'jsonrpc/railtie' if defined?(Rails)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jsonrpc-middleware
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Wilson Silva
@@ -37,8 +37,8 @@ dependencies:
37
37
  - - "~>"
38
38
  - !ruby/object:Gem::Version
39
39
  version: '2.7'
40
- description: Implements the JSON-RPC 2.0 protocol, enabling standardized remote procedure
41
- calls encoded in JSON.
40
+ description: A Rack middleware implementing the JSON-RPC 2.0 protocol that integrates
41
+ easily with all Rack-based applications (Rails, Sinatra, Hanami, etc).
42
42
  email:
43
43
  - wilson.dsigns@gmail.com
44
44
  executables: []
@@ -47,6 +47,7 @@ extra_rdoc_files: []
47
47
  files:
48
48
  - ".aiexclude"
49
49
  - ".claude/commands/document.md"
50
+ - ".claude/commands/test.md"
50
51
  - ".claude/docs/yard.md"
51
52
  - ".claude/settings.local.json"
52
53
  - ".editorconfig"
@@ -79,9 +80,11 @@ files:
79
80
  - examples/rack/README.md
80
81
  - examples/rack/app.rb
81
82
  - examples/rack/config.ru
83
+ - examples/rails-single-file-routing/README.md
84
+ - examples/rails-single-file-routing/config.ru
85
+ - examples/rails-single-file/README.md
82
86
  - examples/rails-single-file/config.ru
83
87
  - examples/rails/.gitignore
84
- - examples/rails/.ruby-version
85
88
  - examples/rails/Gemfile
86
89
  - examples/rails/Gemfile.lock
87
90
  - examples/rails/README.md
@@ -133,6 +136,7 @@ files:
133
136
  - lib/jsonrpc/notification.rb
134
137
  - lib/jsonrpc/parser.rb
135
138
  - lib/jsonrpc/railtie.rb
139
+ - lib/jsonrpc/railtie/method_constraint.rb
136
140
  - lib/jsonrpc/request.rb
137
141
  - lib/jsonrpc/response.rb
138
142
  - lib/jsonrpc/validator.rb
@@ -162,7 +166,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
162
166
  - !ruby/object:Gem::Version
163
167
  version: '0'
164
168
  requirements: []
165
- rubygems_version: 3.6.9
169
+ rubygems_version: 3.7.0
166
170
  specification_version: 4
167
- summary: Implementation of the JSON-RPC protocol.
171
+ summary: Rack middleware implementing the JSON-RPC 2.0 protocol.
168
172
  test_files: []
@@ -1 +0,0 @@
1
- ruby-3.4.4