cwallet-ruby 0.0.10 → 0.0.11

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
  SHA1:
3
- metadata.gz: 49a194a434d1825c404571a6fc08e31e5e521cfd
4
- data.tar.gz: aa1f066ae1cb9b60e81b1e224ac4a23730677e25
3
+ metadata.gz: 24bc245124ecb3ac1a0269fedcee2ad5951d485f
4
+ data.tar.gz: 2536e0206e37c13feb1e93d2ba5679a7c62714ec
5
5
  SHA512:
6
- metadata.gz: 6481512a899c84a54e766ba580628118d14b2951f8c156bbc0baac39c78474716bcd7511a415b9005669faef83b9dbb425d9cdd6ddc270bb3b15e0fbaaca6a6a
7
- data.tar.gz: 8a5c67d16b765b28aed73e2483d721ecb0ca05f2aab150153685ea19e3ed10bcaff6c90a634e1705bfd6af3176dfbce51346276db370009586a26207d0f7003a
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
@@ -1,5 +1,5 @@
1
1
  module Cwallet
2
2
  module Wallet
3
- VERSION = "0.0.10"
3
+ VERSION = "0.0.11"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cwallet-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.10
4
+ version: 0.0.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Duc Le