jsonrpc-client 0.1.3 → 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: 4b7a1b7bdea17d09f6592500813eef896f8c13ff
4
- data.tar.gz: fe6dabdbc25e80ab642b014726fc580e3111d012
2
+ SHA256:
3
+ metadata.gz: 9809b5bd50882f40cd6f24fcdf7c3d750d896b708efdae4b9f40f32af61f8c23
4
+ data.tar.gz: 8a47545474f4493f9f85869ba9dabc7b427e475c1a8ec1b757017713333deb52
5
5
  SHA512:
6
- metadata.gz: 61c078c9186ab42de94a0191720c4d643302029780dbbed36061cd088e6f4e2916a9b8a2efcd0027f2e2184f1c9faca5214e67b5da9ec8f9bc8a8ff932f8dd0d
7
- data.tar.gz: 3a69de2b8996b3af35b0089ef2ae0c922f257431b958f60e6daa517a621fe78c02d7973878b0f03658a0972aef6770f43daeeb071cd41be4e4981e424353a899
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.3'
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.3
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-09-17 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.1
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: