peatio-ripple 2.4.0 → 2.6.1

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: 1a9f8709c2f011d255cedf911bacad327898770daa720ea6a31c90aa8610bf62
4
- data.tar.gz: 941e35f35df7494ef22d2fe9015c58c47fe4575def226e81bc5700cd9e6ca1bc
3
+ metadata.gz: 473837d503c533e5d0e22e4d5b0ed6053269f40d1f078be4d304cb94ff72b124
4
+ data.tar.gz: ea52ceea5c269ae213e379324054d845935af86b6b2288e4d15ff33c6b65e6ab
5
5
  SHA512:
6
- metadata.gz: 11b510ca522b23881e2ae2bafc633707a9900703f2ba740062939fef6d9a91951e9d0c641a7825258f6641c3a0098d8f75a3f2b09d3a18386c4f0cfbfc97a69a
7
- data.tar.gz: 309d8f9368e6c177becb01e04b968ae896a60795b30d41a9f02c6d8e7c956ce928899f2ade649d873ebfe24e53b44149eee9f0c7b09f1aefa439d7792ad8d302
6
+ metadata.gz: 0b697d8022a6e08a16ab021f2b0e044fe7005191dc22b56dda27a7d5e2e27a381f93325fd8f00f0c150210f1a3a9b472c1af9848d1420db27988e918513447c4
7
+ data.tar.gz: 638264ea4301a0d606a0bed07a044fd48d5e38d2c7773282ceafed0f08d53d8a6abf300d526d49a4bb6a2ea935aa4b59aef1107be3c2efdda31cc28171b1d19b
@@ -1,10 +1,10 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- peatio-ripple (2.4.0)
4
+ peatio-ripple (2.6.1)
5
5
  activesupport (~> 5.2.3)
6
6
  better-faraday (~> 1.0.5)
7
- faraday (~> 0.15.4)
7
+ faraday (~> 0.17)
8
8
  memoist (~> 0.16.0)
9
9
  net-http-persistent (~> 3.0.1)
10
10
  peatio (>= 0.6.3)
@@ -12,91 +12,129 @@ PATH
12
12
  GEM
13
13
  remote: https://rubygems.org/
14
14
  specs:
15
- activemodel (5.2.3)
16
- activesupport (= 5.2.3)
17
- activesupport (5.2.3)
15
+ activemodel (5.2.4.3)
16
+ activesupport (= 5.2.4.3)
17
+ activesupport (5.2.4.3)
18
18
  concurrent-ruby (~> 1.0, >= 1.0.2)
19
19
  i18n (>= 0.7, < 2)
20
20
  minitest (~> 5.1)
21
21
  tzinfo (~> 1.1)
22
22
  addressable (2.7.0)
23
23
  public_suffix (>= 2.0.2, < 5.0)
24
- amq-protocol (2.3.0)
24
+ amq-protocol (2.3.1)
25
25
  amqp (1.8.0)
26
26
  amq-protocol (>= 2.2.0)
27
27
  eventmachine
28
28
  better-faraday (1.0.8)
29
29
  activesupport (>= 4.0, < 6.0)
30
30
  faraday (~> 0.12)
31
- bunny (2.14.3)
32
- amq-protocol (~> 2.3, >= 2.3.0)
33
- byebug (11.0.1)
31
+ bunny (2.15.0)
32
+ amq-protocol (~> 2.3, >= 2.3.1)
33
+ byebug (11.1.1)
34
34
  clamp (1.3.1)
35
35
  coderay (1.1.2)
36
- concurrent-ruby (1.1.5)
37
- connection_pool (2.2.2)
36
+ concurrent-ruby (1.1.6)
37
+ connection_pool (2.2.3)
38
+ cookiejar (0.3.3)
38
39
  crack (0.4.3)
39
40
  safe_yaml (~> 1.0.0)
41
+ daemons (1.3.1)
40
42
  diff-lcs (1.3)
43
+ em-http-request (1.1.6)
44
+ addressable (>= 2.3.4)
45
+ cookiejar (!= 0.3.1)
46
+ em-socksify (>= 0.3)
47
+ eventmachine (>= 1.0.3)
48
+ http_parser.rb (>= 0.6.0)
49
+ em-socksify (0.3.2)
50
+ eventmachine (>= 1.0.0.beta.4)
51
+ em-synchrony (1.0.6)
52
+ eventmachine (>= 1.0.0.beta.1)
41
53
  em-websocket (0.5.1)
42
54
  eventmachine (>= 0.12.9)
43
55
  http_parser.rb (~> 0.6.0)
44
56
  eventmachine (1.2.7)
45
- faraday (0.15.4)
57
+ faraday (0.17.3)
46
58
  multipart-post (>= 1.2, < 3)
47
- hashdiff (1.0.0)
59
+ faraday_middleware (0.13.1)
60
+ faraday (>= 0.7.4, < 1.0)
61
+ faye (1.3.0)
62
+ cookiejar (>= 0.3.0)
63
+ em-http-request (>= 0.3.0)
64
+ eventmachine (>= 0.12.0)
65
+ faye-websocket (>= 0.9.1)
66
+ multi_json (>= 1.0.0)
67
+ rack (>= 1.0.0)
68
+ websocket-driver (>= 0.5.1)
69
+ faye-websocket (0.10.9)
70
+ eventmachine (>= 0.12.0)
71
+ websocket-driver (>= 0.5.1)
72
+ hashdiff (1.0.1)
48
73
  http_parser.rb (0.6.0)
49
- i18n (1.7.0)
74
+ i18n (1.8.3)
50
75
  concurrent-ruby (~> 1.0)
51
76
  jwt (2.2.1)
52
- memoist (0.16.1)
53
- metaclass (0.0.4)
54
- method_source (0.9.2)
55
- minitest (5.13.0)
56
- mocha (1.9.0)
57
- metaclass (~> 0.0.1)
77
+ memoist (0.16.2)
78
+ method_source (1.0.0)
79
+ minitest (5.14.1)
80
+ mocha (1.11.2)
81
+ multi_json (1.14.1)
58
82
  multipart-post (2.1.1)
59
- mysql2 (0.5.2)
83
+ mysql2 (0.5.3)
60
84
  net-http-persistent (3.0.1)
61
85
  connection_pool (~> 2.2)
62
- peatio (0.6.3)
86
+ peatio (2.6.1)
63
87
  activemodel (> 5.2, <= 6.0.0)
64
88
  amqp
65
89
  bunny
66
90
  clamp
91
+ em-synchrony (~> 1.0)
67
92
  em-websocket
68
93
  eventmachine
94
+ faraday_middleware (~> 0.13.1)
95
+ faye (~> 1.2)
69
96
  jwt
70
97
  mysql2
71
- pry (0.12.2)
72
- coderay (~> 1.1.0)
73
- method_source (~> 0.9.0)
74
- pry-byebug (3.7.0)
98
+ prometheus-client
99
+ thin
100
+ prometheus-client (2.0.0)
101
+ pry (0.13.0)
102
+ coderay (~> 1.1)
103
+ method_source (~> 1.0)
104
+ pry-byebug (3.9.0)
75
105
  byebug (~> 11.0)
76
- pry (~> 0.10)
77
- public_suffix (4.0.1)
78
- rake (10.5.0)
106
+ pry (~> 0.13.0)
107
+ public_suffix (4.0.4)
108
+ rack (2.2.2)
109
+ rake (13.0.1)
79
110
  rspec (3.9.0)
80
111
  rspec-core (~> 3.9.0)
81
112
  rspec-expectations (~> 3.9.0)
82
113
  rspec-mocks (~> 3.9.0)
83
- rspec-core (3.9.0)
84
- rspec-support (~> 3.9.0)
85
- rspec-expectations (3.9.0)
114
+ rspec-core (3.9.1)
115
+ rspec-support (~> 3.9.1)
116
+ rspec-expectations (3.9.1)
86
117
  diff-lcs (>= 1.2.0, < 2.0)
87
118
  rspec-support (~> 3.9.0)
88
- rspec-mocks (3.9.0)
119
+ rspec-mocks (3.9.1)
89
120
  diff-lcs (>= 1.2.0, < 2.0)
90
121
  rspec-support (~> 3.9.0)
91
- rspec-support (3.9.0)
122
+ rspec-support (3.9.2)
92
123
  safe_yaml (1.0.5)
124
+ thin (1.7.2)
125
+ daemons (~> 1.0, >= 1.0.9)
126
+ eventmachine (~> 1.0, >= 1.0.4)
127
+ rack (>= 1, < 3)
93
128
  thread_safe (0.3.6)
94
- tzinfo (1.2.5)
129
+ tzinfo (1.2.7)
95
130
  thread_safe (~> 0.1)
96
- webmock (3.7.6)
131
+ webmock (3.8.3)
97
132
  addressable (>= 2.3.6)
98
133
  crack (>= 0.3.2)
99
134
  hashdiff (>= 0.4.0, < 2.0.0)
135
+ websocket-driver (0.7.2)
136
+ websocket-extensions (>= 0.1.0)
137
+ websocket-extensions (0.1.5)
100
138
 
101
139
  PLATFORMS
102
140
  ruby
@@ -106,7 +144,7 @@ DEPENDENCIES
106
144
  mocha (~> 1.8)
107
145
  peatio-ripple!
108
146
  pry-byebug
109
- rake (~> 10.0)
147
+ rake (~> 13.0)
110
148
  rspec (~> 3.0)
111
149
  webmock (~> 3.5)
112
150
 
@@ -6,7 +6,7 @@ module Peatio
6
6
  module Ripple
7
7
  class Client
8
8
  Error = Class.new(StandardError)
9
- class ConnectionError < Error; end
9
+ ConnectionError = Class.new(Error)
10
10
 
11
11
  class ResponseError < Error
12
12
  def initialize(code, msg)
@@ -38,14 +38,8 @@ module Peatio
38
38
  raise ResponseError.new(result['error_code'], result['error_message']) if result['status'] == 'error'
39
39
  end
40
40
  response.fetch('result')
41
- rescue => e
42
- if e.is_a?(Error)
43
- raise e, e.message
44
- elsif e.is_a?(Faraday::Error)
45
- raise ConnectionError, e
46
- else
47
- raise Error, e
48
- end
41
+ rescue Faraday::Error => e
42
+ raise ConnectionError, e
49
43
  end
50
44
 
51
45
  private
@@ -19,8 +19,8 @@ module Peatio
19
19
  end
20
20
 
21
21
  def register
22
- Peatio::Blockchain.registry[:ripple] = Ripple::Blockchain.new
23
- Peatio::Wallet.registry[:rippled] = Ripple::Wallet.new
22
+ Peatio::Blockchain.registry[:ripple] = Ripple::Blockchain
23
+ Peatio::Wallet.registry[:rippled] = Ripple::Wallet
24
24
  end
25
25
  end
26
26
 
@@ -1,5 +1,5 @@
1
1
  module Peatio
2
2
  module Ripple
3
- VERSION = "2.4.0".freeze
3
+ VERSION = "2.6.1".freeze
4
4
  end
5
5
  end
@@ -4,8 +4,11 @@ module Peatio
4
4
 
5
5
  Error = Class.new(StandardError)
6
6
 
7
- def initialize(settings = {})
8
- @settings = settings
7
+ DEFAULT_FEATURES = { skip_deposit_collection: false }.freeze
8
+
9
+ def initialize(custom_features = {})
10
+ @features = DEFAULT_FEATURES.merge(custom_features).slice(*SUPPORTED_FEATURES)
11
+ @settings = {}
9
12
  end
10
13
 
11
14
  def configure(settings = {})
@@ -25,13 +25,13 @@ Gem::Specification.new do |spec|
25
25
 
26
26
  spec.add_dependency "activesupport", "~> 5.2.3"
27
27
  spec.add_dependency "peatio", ">= 0.6.3"
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
30
  spec.add_dependency "better-faraday", "~> 1.0.5"
31
31
  spec.add_dependency 'net-http-persistent', '~> 3.0.1'
32
32
 
33
33
  spec.add_development_dependency "bundler", "~> 1.17"
34
- spec.add_development_dependency "rake", "~> 10.0"
34
+ spec.add_development_dependency "rake", "~> 13.0"
35
35
  spec.add_development_dependency "rspec", "~> 3.0"
36
36
  spec.add_development_dependency "mocha", "~> 1.8"
37
37
  spec.add_development_dependency "pry-byebug"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: peatio-ripple
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.4.0
4
+ version: 2.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Maksym N.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-11-16 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
@@ -114,14 +114,14 @@ dependencies:
114
114
  requirements:
115
115
  - - "~>"
116
116
  - !ruby/object:Gem::Version
117
- version: '10.0'
117
+ version: '13.0'
118
118
  type: :development
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
122
  - - "~>"
123
123
  - !ruby/object:Gem::Version
124
- version: '10.0'
124
+ version: '13.0'
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: rspec
127
127
  requirement: !ruby/object:Gem::Requirement