peatio-bitcoincash 0.1.1 → 2.5.3

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
2
  SHA256:
3
- metadata.gz: 91d7507b182a6e5aa3fa2c08e2aab3ff29186795b3e9d8d344525d492bc024e4
4
- data.tar.gz: b88d5e7045f1ccd13ca6d907a66446d2df1f4b47c692cbe77533531f05951c5e
3
+ metadata.gz: e12e8dd94904f0e60b5bc27396bcce91551e82c3eaf95aef206037e78e1b2a98
4
+ data.tar.gz: 40d1179302f5659fb8d896e01bac7c7b92f2047b805f3d62d2efb846b0aa28e3
5
5
  SHA512:
6
- metadata.gz: 74fa303a78575ba7272cdca746a63190fb45c80e33527ec100923391fd114ea5626cd061c08d1f6a4b39d2092004c07e03ede0bcdf0c515c51f9f8c94ace697f
7
- data.tar.gz: ea99e9ed40d0a26560ce3f5e645dff652cadde142041cd21d9cdb3e0a3b8c43b6fcb84002e2605dec04fc222f7af1d7425feb9b2592cb1da0c879b47dd06acca
6
+ metadata.gz: 2ca20a92b9e130d1a2680f1c8ad94d6b60191b9950421b9a07a8607e5993cd9218de012ae7cdb5c3d0598eee9e94ec482eac437090912e896b8e046f690209af
7
+ data.tar.gz: 719530948ee7d892a889088b3311b33e04798beced3537150c7a51dfbc8521968df9de58022d8755651d7faf350e66704bf73769c2202e7a9e9f4a1c54bab356
@@ -1,28 +1,28 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- peatio-bitcoincash (0.1.1)
4
+ peatio-bitcoincash (2.5.3)
5
5
  activesupport (~> 5.2.3)
6
6
  better-faraday (~> 1.0.5)
7
7
  cash-addr (~> 0.2.0)
8
- faraday (~> 0.15.4)
8
+ faraday (~> 0.17)
9
9
  memoist (~> 0.16.0)
10
10
  net-http-persistent (~> 3.0.1)
11
- peatio (~> 0.6.3)
11
+ peatio (>= 0.6.3)
12
12
 
13
13
  GEM
14
14
  remote: https://rubygems.org/
15
15
  specs:
16
- activemodel (5.2.3)
17
- activesupport (= 5.2.3)
18
- activesupport (5.2.3)
16
+ activemodel (5.2.4.3)
17
+ activesupport (= 5.2.4.3)
18
+ activesupport (5.2.4.3)
19
19
  concurrent-ruby (~> 1.0, >= 1.0.2)
20
20
  i18n (>= 0.7, < 2)
21
21
  minitest (~> 5.1)
22
22
  tzinfo (~> 1.1)
23
- addressable (2.6.0)
24
- public_suffix (>= 2.0.2, < 4.0)
25
- amq-protocol (2.3.0)
23
+ addressable (2.7.0)
24
+ public_suffix (>= 2.0.2, < 5.0)
25
+ amq-protocol (2.3.1)
26
26
  amqp (1.8.0)
27
27
  amq-protocol (>= 2.2.0)
28
28
  eventmachine
@@ -30,77 +30,115 @@ GEM
30
30
  better-faraday (1.0.8)
31
31
  activesupport (>= 4.0, < 6.0)
32
32
  faraday (~> 0.12)
33
- bunny (2.14.3)
34
- amq-protocol (~> 2.3, >= 2.3.0)
35
- byebug (11.0.1)
33
+ bunny (2.15.0)
34
+ amq-protocol (~> 2.3, >= 2.3.1)
35
+ byebug (11.1.1)
36
36
  cash-addr (0.2.0)
37
37
  base58 (~> 0.2.2)
38
38
  clamp (1.3.1)
39
39
  coderay (1.1.2)
40
- concurrent-ruby (1.1.5)
41
- connection_pool (2.2.2)
40
+ concurrent-ruby (1.1.6)
41
+ connection_pool (2.2.3)
42
+ cookiejar (0.3.3)
42
43
  crack (0.4.3)
43
44
  safe_yaml (~> 1.0.0)
45
+ daemons (1.3.1)
44
46
  diff-lcs (1.3)
47
+ em-http-request (1.1.6)
48
+ addressable (>= 2.3.4)
49
+ cookiejar (!= 0.3.1)
50
+ em-socksify (>= 0.3)
51
+ eventmachine (>= 1.0.3)
52
+ http_parser.rb (>= 0.6.0)
53
+ em-socksify (0.3.2)
54
+ eventmachine (>= 1.0.0.beta.4)
55
+ em-synchrony (1.0.6)
56
+ eventmachine (>= 1.0.0.beta.1)
45
57
  em-websocket (0.5.1)
46
58
  eventmachine (>= 0.12.9)
47
59
  http_parser.rb (~> 0.6.0)
48
60
  eventmachine (1.2.7)
49
- faraday (0.15.4)
61
+ faraday (0.17.3)
50
62
  multipart-post (>= 1.2, < 3)
51
- hashdiff (0.3.9)
63
+ faraday_middleware (0.13.1)
64
+ faraday (>= 0.7.4, < 1.0)
65
+ faye (1.3.0)
66
+ cookiejar (>= 0.3.0)
67
+ em-http-request (>= 0.3.0)
68
+ eventmachine (>= 0.12.0)
69
+ faye-websocket (>= 0.9.1)
70
+ multi_json (>= 1.0.0)
71
+ rack (>= 1.0.0)
72
+ websocket-driver (>= 0.5.1)
73
+ faye-websocket (0.10.9)
74
+ eventmachine (>= 0.12.0)
75
+ websocket-driver (>= 0.5.1)
76
+ hashdiff (1.0.1)
52
77
  http_parser.rb (0.6.0)
53
- i18n (1.7.0)
78
+ i18n (1.8.3)
54
79
  concurrent-ruby (~> 1.0)
55
80
  jwt (2.2.1)
56
- memoist (0.16.1)
57
- metaclass (0.0.4)
58
- method_source (0.9.2)
59
- minitest (5.13.0)
60
- mocha (1.8.0)
61
- metaclass (~> 0.0.1)
81
+ memoist (0.16.2)
82
+ method_source (1.0.0)
83
+ minitest (5.14.1)
84
+ mocha (1.11.2)
85
+ multi_json (1.14.1)
62
86
  multipart-post (2.1.1)
63
- mysql2 (0.5.2)
87
+ mysql2 (0.5.3)
64
88
  net-http-persistent (3.0.1)
65
89
  connection_pool (~> 2.2)
66
- peatio (0.6.3)
90
+ peatio (2.6.1)
67
91
  activemodel (> 5.2, <= 6.0.0)
68
92
  amqp
69
93
  bunny
70
94
  clamp
95
+ em-synchrony (~> 1.0)
71
96
  em-websocket
72
97
  eventmachine
98
+ faraday_middleware (~> 0.13.1)
99
+ faye (~> 1.2)
73
100
  jwt
74
101
  mysql2
75
- pry (0.12.2)
76
- coderay (~> 1.1.0)
77
- method_source (~> 0.9.0)
78
- pry-byebug (3.7.0)
102
+ prometheus-client
103
+ thin
104
+ prometheus-client (2.0.0)
105
+ pry (0.13.0)
106
+ coderay (~> 1.1)
107
+ method_source (~> 1.0)
108
+ pry-byebug (3.9.0)
79
109
  byebug (~> 11.0)
80
- pry (~> 0.10)
81
- public_suffix (3.0.3)
82
- rake (10.5.0)
83
- rspec (3.8.0)
84
- rspec-core (~> 3.8.0)
85
- rspec-expectations (~> 3.8.0)
86
- rspec-mocks (~> 3.8.0)
87
- rspec-core (3.8.0)
88
- rspec-support (~> 3.8.0)
89
- rspec-expectations (3.8.3)
110
+ pry (~> 0.13.0)
111
+ public_suffix (4.0.4)
112
+ rack (2.2.2)
113
+ rake (13.0.1)
114
+ rspec (3.9.0)
115
+ rspec-core (~> 3.9.0)
116
+ rspec-expectations (~> 3.9.0)
117
+ rspec-mocks (~> 3.9.0)
118
+ rspec-core (3.9.1)
119
+ rspec-support (~> 3.9.1)
120
+ rspec-expectations (3.9.1)
90
121
  diff-lcs (>= 1.2.0, < 2.0)
91
- rspec-support (~> 3.8.0)
92
- rspec-mocks (3.8.0)
122
+ rspec-support (~> 3.9.0)
123
+ rspec-mocks (3.9.1)
93
124
  diff-lcs (>= 1.2.0, < 2.0)
94
- rspec-support (~> 3.8.0)
95
- rspec-support (3.8.0)
125
+ rspec-support (~> 3.9.0)
126
+ rspec-support (3.9.2)
96
127
  safe_yaml (1.0.5)
128
+ thin (1.7.2)
129
+ daemons (~> 1.0, >= 1.0.9)
130
+ eventmachine (~> 1.0, >= 1.0.4)
131
+ rack (>= 1, < 3)
97
132
  thread_safe (0.3.6)
98
- tzinfo (1.2.5)
133
+ tzinfo (1.2.7)
99
134
  thread_safe (~> 0.1)
100
- webmock (3.5.1)
135
+ webmock (3.8.3)
101
136
  addressable (>= 2.3.6)
102
137
  crack (>= 0.3.2)
103
- hashdiff
138
+ hashdiff (>= 0.4.0, < 2.0.0)
139
+ websocket-driver (0.7.2)
140
+ websocket-extensions (>= 0.1.0)
141
+ websocket-extensions (0.1.5)
104
142
 
105
143
  PLATFORMS
106
144
  ruby
@@ -110,7 +148,7 @@ DEPENDENCIES
110
148
  mocha (~> 1.8)
111
149
  peatio-bitcoincash!
112
150
  pry-byebug
113
- rake (~> 10.0)
151
+ rake (~> 13.0)
114
152
  rspec (~> 3.0)
115
153
  webmock (~> 3.5)
116
154
 
@@ -26,11 +26,8 @@ module Peatio
26
26
  end
27
27
 
28
28
  def json_rpc(method, params = [])
29
- response = connection.post \
30
- '/',
31
- { jsonrpc: '1.0', method: method, params: params }.to_json,
32
- { 'Accept' => 'application/json',
33
- 'Content-Type' => 'application/json' }
29
+ response = post(method, params)
30
+
34
31
  response.assert_2xx!
35
32
  response = JSON.parse(response.body)
36
33
  response['error'].tap { |e| raise ResponseError.new(e['code'], e['message']) if e }
@@ -47,6 +44,11 @@ module Peatio
47
44
 
48
45
  private
49
46
 
47
+ def post(method, params)
48
+ connection.post("/", {jsonrpc: "1.0", method: method, params: params}.to_json,
49
+ "Accept" => "application/json", "Content-Type" => "application/json")
50
+ end
51
+
50
52
  def connection
51
53
  @connection ||= Faraday.new(@json_rpc_endpoint) do |f|
52
54
  f.adapter :net_http_persistent, pool_size: 5
@@ -26,8 +26,8 @@ module Peatio
26
26
  end
27
27
 
28
28
  def register
29
- Peatio::Blockchain.registry[:bitcoincash] = Bitcoincash::Blockchain.new
30
- Peatio::Wallet.registry[:bitcoincashd] = Bitcoincash::Wallet.new
29
+ Peatio::Blockchain.registry[:bitcoincash] = Bitcoincash::Blockchain
30
+ Peatio::Wallet.registry[:bitcoincashd] = Bitcoincash::Wallet
31
31
  end
32
32
  end
33
33
 
@@ -1,5 +1,5 @@
1
1
  module Peatio
2
2
  module Bitcoincash
3
- VERSION = "0.1.1"
3
+ VERSION = "2.5.3".freeze
4
4
  end
5
5
  end
@@ -25,16 +25,16 @@ Gem::Specification.new do |spec|
25
25
 
26
26
  spec.add_dependency "activesupport", "~> 5.2.3"
27
27
  spec.add_dependency "better-faraday", "~> 1.0.5"
28
- spec.add_dependency "faraday", "~> 0.15.4"
28
+ spec.add_dependency "faraday", "~> 0.17"
29
29
  spec.add_dependency "memoist", "~> 0.16.0"
30
- spec.add_dependency "peatio", "~> 0.6.3"
30
+ spec.add_dependency "peatio", ">= 0.6.3"
31
31
  spec.add_dependency "cash-addr", '~> 0.2.0'
32
32
  spec.add_dependency 'net-http-persistent', '~> 3.0.1'
33
33
 
34
34
  spec.add_development_dependency "bundler", "~> 1.17"
35
35
  spec.add_development_dependency "mocha", "~> 1.8"
36
36
  spec.add_development_dependency "pry-byebug"
37
- spec.add_development_dependency "rake", "~> 10.0"
37
+ spec.add_development_dependency "rake", "~> 13.0"
38
38
  spec.add_development_dependency "rspec", "~> 3.0"
39
39
  spec.add_development_dependency "webmock", "~> 3.5"
40
40
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: peatio-bitcoincash
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 2.5.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dinesh Chohda
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-11-14 00:00:00.000000000 Z
11
+ date: 2020-06-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -44,14 +44,14 @@ dependencies:
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: 0.15.4
47
+ version: '0.17'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: 0.15.4
54
+ version: '0.17'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: memoist
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -70,14 +70,14 @@ dependencies:
70
70
  name: peatio
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - "~>"
73
+ - - ">="
74
74
  - !ruby/object:Gem::Version
75
75
  version: 0.6.3
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - "~>"
80
+ - - ">="
81
81
  - !ruby/object:Gem::Version
82
82
  version: 0.6.3
83
83
  - !ruby/object:Gem::Dependency
@@ -156,14 +156,14 @@ dependencies:
156
156
  requirements:
157
157
  - - "~>"
158
158
  - !ruby/object:Gem::Version
159
- version: '10.0'
159
+ version: '13.0'
160
160
  type: :development
161
161
  prerelease: false
162
162
  version_requirements: !ruby/object:Gem::Requirement
163
163
  requirements:
164
164
  - - "~>"
165
165
  - !ruby/object:Gem::Version
166
- version: '10.0'
166
+ version: '13.0'
167
167
  - !ruby/object:Gem::Dependency
168
168
  name: rspec
169
169
  requirement: !ruby/object:Gem::Requirement