helloblock-lite 1.0.2 → 1.0.3

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: cb32017efb4127aebda83516f0e7ecf85dc717c7
4
- data.tar.gz: bc23990c7c1e5824a5a77d76f1c6ddfbde6205a9
3
+ metadata.gz: 09bc326fb2a8d5618e9cbd079f6933f452b0c4b4
4
+ data.tar.gz: 25893fdd368cc1117651dda2ceefad59ec09606d
5
5
  SHA512:
6
- metadata.gz: 459853252fa1c2e75e06f752756efbb0041283121fd9334f28ef3e063ee36f5d1db99973f4971d0c1c45313469f2e03450b4b23a2c2c40092310418a217933cf
7
- data.tar.gz: d99ea64b321ce155c0e002a887d70a713456ac9c617ba77cb31376bf8696f72791ae599a5010470a4dbd2122d2e3a6503630b0e7b5c71a2ea4d846c28e83391d
6
+ metadata.gz: bbaeb12e17f25c392ce6b13f2f9ec939142c2fe1212e4875c76a0c5ad480c10c752a5cc33f7d6e29d59f61e5c9287765311b4bc15f9a5f879068a4156559070e
7
+ data.tar.gz: f520c9c2e2d0f81c3ac524d8dfe9de2e96feb4002ad0477c3fb4f43a0ef5e1254249b143d891326606f4d4c0ef2deb76f01e33200f4ed75d5a14eccb6746ed47
data/README.md CHANGED
@@ -3,3 +3,5 @@
3
3
  Lightweight HelloBlock API Client, for demonstration purposes.
4
4
 
5
5
  To use the extensive library with ActiveRecord-like syntax, visit https://github.com/nathanielwroblewski/helloblock
6
+
7
+ To see the source for the core API, visit https://github.com/helloblock
@@ -11,8 +11,9 @@ module HelloBlock::Request
11
11
 
12
12
  # TODO: Better Handling
13
13
  if response.code != 200
14
- p response.body
15
- raise Error
14
+ body = JSON.parse(response.body)
15
+ p body
16
+ raise "#{body["message"]}"
16
17
  end
17
18
  return response["data"]
18
19
  end
@@ -22,8 +23,9 @@ module HelloBlock::Request
22
23
 
23
24
  # TODO: Better Handling
24
25
  if response.code != 200
25
- p response.body
26
- raise Error
26
+ body = JSON.parse(response.body)
27
+ p body
28
+ raise "#{body["message"]}"
27
29
  end
28
30
  return response["data"]
29
31
  end
@@ -1,3 +1,3 @@
1
1
  module HelloBlock
2
- VERSION = "1.0.2"
2
+ VERSION = "1.0.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: helloblock-lite
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Scott Li