onfido 0.6.0 → 0.6.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: 9e6b62644e597c30a6baae2efd01abf4867c7345
4
- data.tar.gz: a1c16d4de9eaac5018022c09fda175b9a6dc2daf
3
+ metadata.gz: c63f7c25eb6a4d6a774be396edf561175a9ab3f1
4
+ data.tar.gz: b1dadefd0aaf4971077671d52b816b699e7217f1
5
5
  SHA512:
6
- metadata.gz: 4a2fda0f29284247ae819b70293ffc44b7e92126d2344b29f0553102fc00abc965f46bddfc4386ee10fefbd495c30d94d40f2069100fc1d5bf11e8a14d354429
7
- data.tar.gz: 9580b28bacaaa10d9b7efa62178324570c74c0de4b7abaa8f998f4ed5dbd391598d390f80d5e83f68d1a7859f45d967c2434c1d1fccde309bc767eaa357f0d88
6
+ metadata.gz: 77a4f0fe6dbd99bb4c93c57cfb8bce13a2c4172fc767cdb446cb6694357fbef51b639cd1cfc7cd3120b2890634b701a249704dcfc93333e3c39fcf30724a1c32
7
+ data.tar.gz: ea7725d553e7ad385c24d8ba1e52ba3b5b08b9bc10c11ac871de5df87d3c8f066b976b7f82efbde071eb84d494a2dd3e79ae2f184730da8a7b1297c1963893e2
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ ## v0.6.1, 15 July 2016
2
+
3
+ - Fix `Onfido::API.live_photo` so it returns an `Onfido::LivePhoto` instance
4
+ (see https://github.com/hvssle/onfido/pull/14)
5
+
1
6
  ## v0.6.0, 7 July 2016
2
7
 
3
8
  - Add `expand` option to `Onfido::Check.find` and `Onfido::Check.all`. See
data/lib/onfido/api.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  module Onfido
2
2
  class API
3
3
  def method_missing(method, *args)
4
- klass = method.to_s.capitalize
4
+ klass = method.to_s.split('_').collect(&:capitalize).join
5
5
  Object.const_get("Onfido::#{klass}").new
6
6
  rescue NameError
7
7
  super
@@ -1,3 +1,3 @@
1
1
  module Onfido
2
- VERSION = '0.6.0'.freeze
2
+ VERSION = '0.6.1'.freeze
3
3
  end
@@ -0,0 +1,15 @@
1
+ describe Onfido::API do
2
+ subject(:api) { described_class.new }
3
+
4
+ describe 'given a single-word resource' do
5
+ specify { expect(api.address).to be_a(Onfido::Address) }
6
+ end
7
+
8
+ describe 'given a multi-word resource' do
9
+ specify { expect(api.live_photo).to be_a(Onfido::LivePhoto) }
10
+ end
11
+
12
+ describe 'given an unknown resource' do
13
+ specify { expect { api.blood_test }.to raise_error(NameError) }
14
+ end
15
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: onfido
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pericles Theodorou
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2016-07-07 00:00:00.000000000 Z
12
+ date: 2016-07-15 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -166,6 +166,7 @@ files:
166
166
  - spec/integrations/live_photo_spec.rb
167
167
  - spec/integrations/report_spec.rb
168
168
  - spec/integrations/webhook_spec.rb
169
+ - spec/onfido/api_spec.rb
169
170
  - spec/onfido/connection_error_spec.rb
170
171
  - spec/onfido/request_error_spec.rb
171
172
  - spec/onfido/resource_spec.rb
@@ -220,6 +221,7 @@ test_files:
220
221
  - spec/integrations/live_photo_spec.rb
221
222
  - spec/integrations/report_spec.rb
222
223
  - spec/integrations/webhook_spec.rb
224
+ - spec/onfido/api_spec.rb
223
225
  - spec/onfido/connection_error_spec.rb
224
226
  - spec/onfido/request_error_spec.rb
225
227
  - spec/onfido/resource_spec.rb