uphold 1.2.0 → 1.2.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
  SHA1:
3
- metadata.gz: 6b06b5b6b81ab035ed8ed1c06625127d682d57ac
4
- data.tar.gz: 5bd5cdb7d9c5c12b4809e91c52c9028fb1ee1152
3
+ metadata.gz: 38d0ab4a38dca7469c06bd23b468245893eb8dba
4
+ data.tar.gz: 39ba6324bcad6e8aee938db19c3d2936921e7c67
5
5
  SHA512:
6
- metadata.gz: 07b191dcb567fe6e7d6e1b1f7b021c9e432307800d65b30f5c54234661a06f3e6380b7e3c07aa91b824c6fbc51746775657be218599cf8a72da7aa1a93c2ef6f
7
- data.tar.gz: dbc6966ce2dc0c278bb332bd3d628b109824f67dae5a0bafaa942236f7e2430365177565de06f470dce38a07b99d2a8e874a75882f90ffc4917f052d5fec0862
6
+ metadata.gz: 0b36edb512b5f71449205b0acab8d7ed3f57ab911d94af83f8ecf7cf7c28fc8c700581aac260ae81df964e596f850228e89f6f6f1b041e44e3e0b8262d86bf41
7
+ data.tar.gz: a88491bbe12cc2458a2cb5f69185c1caa5e12d47558c1986cad33c8ab61dd188cd9d82c7b8e4b2331f05af853cbcdb1293b5b127943ca7070122b4b55c9f6ae5
@@ -14,6 +14,10 @@ module Uphold
14
14
  super(Uphold::Helpers.underscored_hash(attributes))
15
15
  end
16
16
 
17
+ def error?
18
+ is_a?(Uphold::Entities::Error)
19
+ end
20
+
17
21
  class PaginatedCollection < Array
18
22
  attr_reader :total_size
19
23
 
@@ -1,3 +1,3 @@
1
1
  module Uphold
2
- VERSION = '1.2.0'
2
+ VERSION = '1.2.1'
3
3
  end
@@ -21,6 +21,20 @@ module Uphold
21
21
  end
22
22
  end
23
23
 
24
+ context '#error?' do
25
+ it 'is false for non-error entities' do
26
+ entity = Uphold::Entities::User.new
27
+
28
+ expect(entity.error?).to be_falsey
29
+ end
30
+
31
+ it 'is true for error entities' do
32
+ entity = Uphold::Entities::Error.new
33
+
34
+ expect(entity.error?).to be_truthy
35
+ end
36
+ end
37
+
24
38
  context '.from_collection' do
25
39
  it 'instantiates each of the entities passed in' do
26
40
  entity = double('Entity')
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: uphold
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Subvisual
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-02-19 00:00:00.000000000 Z
11
+ date: 2016-05-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty
@@ -245,7 +245,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
245
245
  version: '0'
246
246
  requirements: []
247
247
  rubyforge_project:
248
- rubygems_version: 2.5.1
248
+ rubygems_version: 2.6.2
249
249
  signing_key:
250
250
  specification_version: 4
251
251
  summary: A wrapper for the Uphold API