rack-rpc 0.0.4 → 0.0.5
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.
- data/VERSION +1 -1
- data/lib/rack/rpc/endpoint/jsonrpc.rb +1 -0
- data/lib/rack/rpc/endpoint/xmlrpc.rb +2 -0
- data/lib/rack/rpc/server.rb +3 -0
- data/lib/rack/rpc/version.rb +1 -1
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.5
|
@@ -22,6 +22,7 @@ class Rack::RPC::Endpoint
|
|
22
22
|
# @param [Rack::Request] request
|
23
23
|
# @return [Rack::Response]
|
24
24
|
def execute(request)
|
25
|
+
@server.request = request # Store the request so it can be accessed from the server methods
|
25
26
|
request_body = request.body.read
|
26
27
|
request_body.force_encoding(Encoding::UTF_8) if request_body.respond_to?(:force_encoding) # Ruby 1.9+
|
27
28
|
Rack::Response.new([process(request_body)], 200, {
|
@@ -18,6 +18,7 @@ class Rack::RPC::Endpoint
|
|
18
18
|
# @param [Rack::RPC::Server] server
|
19
19
|
# @param [Hash{Symbol => Object}] options
|
20
20
|
def initialize(server, options = {})
|
21
|
+
@server = server
|
21
22
|
super()
|
22
23
|
add_multicall unless options[:multicall] == false
|
23
24
|
add_introspection unless options[:introspection] == false
|
@@ -31,6 +32,7 @@ class Rack::RPC::Endpoint
|
|
31
32
|
# @param [Rack::Request] request
|
32
33
|
# @return [Rack::Response]
|
33
34
|
def execute(request)
|
35
|
+
@server.request = request # Store the request so it can be accessed from the server methods
|
34
36
|
request_body = request.body.read
|
35
37
|
request_body.force_encoding(Encoding::UTF_8) if request_body.respond_to?(:force_encoding) # Ruby 1.9+
|
36
38
|
Rack::Response.new([process(request_body)], 200, {
|
data/lib/rack/rpc/server.rb
CHANGED
data/lib/rack/rpc/version.rb
CHANGED
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
version: 0.0.
|
8
|
+
- 5
|
9
|
+
version: 0.0.5
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Datagraph
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2011-01-
|
17
|
+
date: 2011-01-16 00:00:00 +01:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|