bitstamp_client 1.0.0 → 1.0.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: 284b6c7a1d6d71cf415e7ecaef262865e0ead1c22395d6bcdb5041b86e096aab
4
- data.tar.gz: 0214c9d3d809a5401e48cdec9b9b4e1b8121fb72382dfdcc0ba10cde53a7bedb
3
+ metadata.gz: e71eda09644388a9d26214bc9cafba34c287dd78e092a5acf13bfc124a5ef6cd
4
+ data.tar.gz: 940eb60767ad7e04e5f70ee9143ad17344b325a8307566db3e002fc1e6e3734b
5
5
  SHA512:
6
- metadata.gz: c9c859fd3c2d78225e8698269707bd7b301cd1f42f75e4928f339d1f55e8159dea59158f94a32aef0fc95b4d072bc33d344a6dd95d1b19b32ff1a81414fbbcf1
7
- data.tar.gz: f22dd6da2654178191dc569c643fb7ef6bea9665a407ea962db8e6372f4df7e888de7de7d01b2c22d29ad5a20cc59d2a5cc7694e7203f13fd37ec513cd8f1e5c
6
+ metadata.gz: a3bd3720cd709b0c17bf1827ee8aed81162346e2fc2d9ed86f7e4db19ebe95fdd08fbe1c2673152beb0e1b125d44735199099b26932ebe80e848e6c9a34af2a3
7
+ data.tar.gz: a13bf80119fa7eac0f315d36f3f838eb44b7422a37607db80b98475b1b129e27c53a6a0c19b9880be3b933d623b7e452717a3173567a164142e5c19ac0f33e6c
@@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
4
4
  The format is based on [Keep a Changelog](http://keepachangelog.com/)
5
5
  and this project adheres to [Semantic Versioning](http://semver.org/).
6
6
 
7
+ ## [1.0.1] - 2019-01-07
8
+ ### Fixed
9
+ - All responses are not successful when Bitstamp's response has a `status` key
10
+
7
11
  ## [1.0.0] - 2019-01-04
8
12
  ### Added
9
13
  - Place market orders
@@ -3,6 +3,7 @@ module BitstampClient
3
3
 
4
4
  include APIClientBase::Response.module
5
5
  attribute :body, String, lazy: true, default: :default_body
6
+ attribute :parsed_body, Hash, lazy: true, default: :default_parsed_body
6
7
 
7
8
  private
8
9
 
@@ -10,5 +11,13 @@ module BitstampClient
10
11
  raw_response.body
11
12
  end
12
13
 
14
+ def default_success
15
+ raw_response.success? && !parsed_body.has_key?("status")
16
+ end
17
+
18
+ def default_parsed_body
19
+ JSON.parse(body)
20
+ end
21
+
13
22
  end
14
23
  end
@@ -7,7 +7,6 @@ module BitstampClient
7
7
  })
8
8
  attribute :status, String, lazy: true, default: :default_status
9
9
  attribute :reason, String, lazy: true, default: :default_reason
10
- attribute :parsed_body, Hash, lazy: true, default: :default_parsed_body
11
10
 
12
11
  private
13
12
 
@@ -23,9 +22,5 @@ module BitstampClient
23
22
  parsed_body["reason"]
24
23
  end
25
24
 
26
- def default_parsed_body
27
- JSON.parse(body)
28
- end
29
-
30
25
  end
31
26
  end
@@ -1,3 +1,3 @@
1
1
  module BitstampClient
2
- VERSION = "1.0.0"
2
+ VERSION = "1.0.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bitstamp_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ramon Tayag
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-01-04 00:00:00.000000000 Z
11
+ date: 2019-01-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: api_client_base