cwallet-ruby 0.0.10 → 0.0.11
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.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 24bc245124ecb3ac1a0269fedcee2ad5951d485f
|
4
|
+
data.tar.gz: 2536e0206e37c13feb1e93d2ba5679a7c62714ec
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 285c2871c10ce10306dab857e7527a715a4fe79551a1f58e0833cd03c36d99103f24b4d4ca9e006139277c90fe2651257d503f35a7c7f7876334a819a5ce920d
|
7
|
+
data.tar.gz: b3064a0a35b43e7059dd266921baf4858e5b3539e65518e39e3661736a1e36b3ce87de3329a16fe092c8b9f06776d95e14cc35004464a12532ada17c9f4cf2aa
|
@@ -8,6 +8,10 @@ module Cwallet
|
|
8
8
|
|
9
9
|
private
|
10
10
|
|
11
|
+
def debug
|
12
|
+
raise 'Need to be implemented'
|
13
|
+
end
|
14
|
+
|
11
15
|
def http_verb(method, path, body = nil, headers = {})
|
12
16
|
case method
|
13
17
|
when 'GET' then req = Net::HTTP::Get.new(path)
|
@@ -28,6 +32,10 @@ module Cwallet
|
|
28
32
|
req[key] = val
|
29
33
|
end
|
30
34
|
|
35
|
+
if debug
|
36
|
+
$stdout.puts("#{req.method} #{req.path}\n#{req.to_hash}\nBODY:\n#{req.body}")
|
37
|
+
end
|
38
|
+
|
31
39
|
resp = @conn.request(req)
|
32
40
|
out = NetHTTPResponse.new(resp)
|
33
41
|
Cwallet::Wallet::check_response_status(out)
|
@@ -662,10 +662,6 @@ module Cwallet
|
|
662
662
|
params.delete(:two_factor_token)
|
663
663
|
end
|
664
664
|
|
665
|
-
if debug
|
666
|
-
$stdout.puts "URI: #{uri}"
|
667
|
-
$stdout.puts "headers: #{headers.inspect}"
|
668
|
-
end
|
669
665
|
http_verb('GET', uri, nil, headers) do |resp|
|
670
666
|
if params[:fetch_all] == true &&
|
671
667
|
resp.body.has_key?('pagination') &&
|
@@ -702,11 +698,6 @@ module Cwallet
|
|
702
698
|
params.delete(:two_factor_token)
|
703
699
|
end
|
704
700
|
|
705
|
-
if debug
|
706
|
-
$stdout.puts("URI: #{path}")
|
707
|
-
$stdout.puts("params: #{JSON.parse(params)}")
|
708
|
-
$stdout.puts("headers: #{headers.inspect}")
|
709
|
-
end
|
710
701
|
http_verb('POST', path, params.to_json, headers) do |resp|
|
711
702
|
yield(resp)
|
712
703
|
end
|