jsonrpc-client 0.1.2 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 13f7bfecc99547ed45b2cb80971a59a14c7550a9
4
- data.tar.gz: ba2aab9ab33d533a269eddf6a0645eed6150f800
2
+ SHA256:
3
+ metadata.gz: 9809b5bd50882f40cd6f24fcdf7c3d750d896b708efdae4b9f40f32af61f8c23
4
+ data.tar.gz: 8a47545474f4493f9f85869ba9dabc7b427e475c1a8ec1b757017713333deb52
5
5
  SHA512:
6
- metadata.gz: 692286518c8eab95fc18f0e28504b4422e2014a107d53a7123f9f215a5eb63549edb3fefee40241f5c416b0657ec4eeafd7329111f0ffa67ef1fd71ed69e276e
7
- data.tar.gz: 2a8886b856dff71111f845b220ee35448e86a33d7728b30f89accf241f0505d725c559df3a241e0aac03fff62e9263a624f4b56f9ec2a57df86ebd6052005551
6
+ metadata.gz: a526f81e377c6d3fd560ee0774bc8b8e5c884d9aaa5db99aa9837d744fb9178143f019fbda41a3c2d4692c7966ada30abf3f75cf03722403d5250ad0b070b957
7
+ data.tar.gz: 81bf1e805fb0aea5303692bfa0bc064000bb3a02c5b8596e7a26167f1462be90134897f48ddce86ead1bde9e73be34758066608187d6fc619adbfaf9459c2bdb
data/README.md CHANGED
@@ -23,6 +23,22 @@ client = JSONRPC::Client.new('http://example.com')
23
23
  client.add_numbers(1, 2, 3)
24
24
  ```
25
25
 
26
+ ### Passing a customized connection
27
+
28
+ By default, the client uses a plain Faraday connection with Faraday's default adapter to connect to the JSON-RPC endpoint. If you wish to customize this connection, you can pass your own Faraday object into the constructor. In this example, SSL verification is disabled and HTTP Basic Authentication is used:
29
+
30
+ ```ruby
31
+ connection = Faraday.new { |connection|
32
+ connection.adapter Faraday.default_adapter
33
+ connection.ssl.verify = false # This is a baaaad idea!
34
+ connection.basic_auth('username', 'password')
35
+ }
36
+ client = JSONRPC::Client.new("http://example.com", { connection: connection })
37
+ ```
38
+
39
+ More information about Faraday is available at [that project's GitHub page](https://github.com/lostisland/faraday).
40
+
41
+
26
42
  ## Contributing
27
43
 
28
44
  1. Fork it
@@ -200,7 +200,7 @@ module JSONRPC
200
200
  return false
201
201
  end
202
202
 
203
- if !data['error']['code'].is_a?(::Fixnum) || !data['error']['message'].is_a?(::String)
203
+ if !data['error']['code'].is_a?(::Integer) || !data['error']['message'].is_a?(::String)
204
204
  return false
205
205
  end
206
206
  end
@@ -1,3 +1,3 @@
1
1
  module JSONRPC
2
- VERSION = '0.1.2'
2
+ VERSION = '0.1.4'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jsonrpc-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pavel Forkert
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-08-03 00:00:00.000000000 Z
11
+ date: 2023-07-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -90,7 +90,7 @@ files:
90
90
  homepage: https://github.com/fxposter/jsonrpc-client
91
91
  licenses: []
92
92
  metadata: {}
93
- post_install_message:
93
+ post_install_message:
94
94
  rdoc_options: []
95
95
  require_paths:
96
96
  - lib
@@ -105,9 +105,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
105
105
  - !ruby/object:Gem::Version
106
106
  version: '0'
107
107
  requirements: []
108
- rubyforge_project:
109
- rubygems_version: 2.4.5
110
- signing_key:
108
+ rubygems_version: 3.4.6
109
+ signing_key:
111
110
  specification_version: 4
112
111
  summary: JSON-RPC 2.0 client
113
112
  test_files: