blockscore 2.0.0 → 2.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
  SHA1:
3
- metadata.gz: 4f61e8c610b55b1f1ddcceaee471a43ff801f5b6
4
- data.tar.gz: 1bf303c4c529a8b938c6585f57f2270d83cae4a7
3
+ metadata.gz: a6572d9025db7922729dfa782a8a3862cd3a5c4c
4
+ data.tar.gz: e3362c4ff984588c2e676618d361397a0b8235dd
5
5
  SHA512:
6
- metadata.gz: 35faf5f2d4491efe6bb94fa84403302be778fc31725744a6b8b190dcfb66c807462f41368ea10f1316c7694e3dd3a6076d92568f0b937a6f417154c95c93a84b
7
- data.tar.gz: 7d80af18289d119a535c85756486fbfddeba67e0a9ef8ad8a1c8f11c6312686d90f3c0106bdd2e7d8c6218c73a318f33de602c1ba887eaa26c0e296b641e54eb
6
+ metadata.gz: 21d29e52127480c3c8e9753a42ff32c1222d60cb14b197442a2d5a952ae5079c212cb002a7af31c509d832c04aaad6c4f9787037113ed446860896d0cea3cbf1
7
+ data.tar.gz: 3670fa3f75bef1977c331be5e272b16bf4480bff37d19c91831316f29ec7aa746d08ca8adf70593706602ad3290f46e13208a45b913412fa88be5b964e4b47da
data/Gemfile CHANGED
@@ -3,12 +3,16 @@ source "https://rubygems.org"
3
3
  # Example:
4
4
  # gem "activesupport", ">= 2.3.5"
5
5
 
6
- gem 'httparty', '~> 0.13.1'
6
+ gem 'activesupport', '~> 3.1.0'
7
+
8
+ gem 'nokogiri', '~> 1.5.10'
9
+
10
+ gem 'httparty', '~> 0.11.0'
7
11
 
8
12
  # Add dependencies to develop your gem here.
9
13
  # Include everything needed to run rake, tests, features, etc.
10
14
  group :development do
11
- gem "shoulda", ">= 0"
15
+ gem "shoulda", "~> 3.1.0"
12
16
  gem "rdoc", "~> 3.12"
13
17
  gem "bundler", "~> 1.0"
14
18
  gem "jeweler", "~> 2.0.1"
data/Gemfile.lock CHANGED
@@ -1,34 +1,28 @@
1
1
  GEM
2
2
  remote: https://rubygems.org/
3
3
  specs:
4
- activesupport (4.0.3)
5
- i18n (~> 0.6, >= 0.6.4)
6
- minitest (~> 4.2)
7
- multi_json (~> 1.3)
8
- thread_safe (~> 0.1)
9
- tzinfo (~> 0.3.37)
10
- addressable (2.3.5)
11
- atomic (1.1.14)
4
+ activesupport (3.1.12)
5
+ multi_json (~> 1.0)
6
+ addressable (2.3.6)
7
+ bourne (1.5.0)
8
+ mocha (>= 0.13.2, < 0.15)
12
9
  builder (3.2.2)
13
- descendants_tracker (0.0.3)
14
- docile (1.1.3)
15
- faraday (0.9.0)
16
- multipart-post (>= 1.2, < 3)
17
- git (1.2.6)
18
- github_api (0.11.3)
19
- addressable (~> 2.3)
20
- descendants_tracker (~> 0.0.1)
21
- faraday (~> 0.8, < 0.10)
10
+ docile (1.1.5)
11
+ faraday (0.8.9)
12
+ multipart-post (~> 1.2.0)
13
+ git (1.2.7)
14
+ github_api (0.10.1)
15
+ addressable
16
+ faraday (~> 0.8.1)
22
17
  hashie (>= 1.2)
23
- multi_json (>= 1.7.5, < 2.0)
24
- nokogiri (~> 1.6.0)
18
+ multi_json (~> 1.4)
19
+ nokogiri (~> 1.5.2)
25
20
  oauth2
26
- hashie (2.0.5)
27
- highline (1.6.20)
28
- httparty (0.13.1)
29
- json (~> 1.8)
21
+ hashie (3.0.0)
22
+ highline (1.6.21)
23
+ httparty (0.11.0)
24
+ multi_json (~> 1.0)
30
25
  multi_xml (>= 0.5.2)
31
- i18n (0.6.9)
32
26
  jeweler (2.0.1)
33
27
  builder
34
28
  bundler (>= 1.0)
@@ -39,47 +33,46 @@ GEM
39
33
  rake
40
34
  rdoc
41
35
  json (1.8.1)
42
- jwt (0.1.11)
43
- multi_json (>= 1.5)
44
- mini_portile (0.5.2)
45
- minitest (4.7.5)
46
- multi_json (1.8.4)
36
+ jwt (1.0.0)
37
+ metaclass (0.0.4)
38
+ mocha (0.14.0)
39
+ metaclass (~> 0.0.1)
40
+ multi_json (1.10.1)
47
41
  multi_xml (0.5.5)
48
- multipart-post (2.0.0)
49
- nokogiri (1.6.1)
50
- mini_portile (~> 0.5.0)
51
- oauth2 (0.9.3)
42
+ multipart-post (1.2.0)
43
+ nokogiri (1.5.11)
44
+ oauth2 (0.9.4)
52
45
  faraday (>= 0.8, < 0.10)
53
- jwt (~> 0.1.8)
46
+ jwt (~> 1.0)
54
47
  multi_json (~> 1.3)
55
48
  multi_xml (~> 0.5)
56
49
  rack (~> 1.2)
57
50
  rack (1.5.2)
58
- rake (10.1.1)
51
+ rake (10.3.2)
59
52
  rdoc (3.12.2)
60
53
  json (~> 1.4)
61
- shoulda (3.5.0)
62
- shoulda-context (~> 1.0, >= 1.0.1)
63
- shoulda-matchers (>= 1.4.1, < 3.0)
64
- shoulda-context (1.1.6)
65
- shoulda-matchers (2.5.0)
54
+ shoulda (3.1.1)
55
+ shoulda-context (~> 1.0)
56
+ shoulda-matchers (~> 1.2)
57
+ shoulda-context (1.2.1)
58
+ shoulda-matchers (1.5.6)
66
59
  activesupport (>= 3.0.0)
60
+ bourne (~> 1.3)
67
61
  simplecov (0.8.2)
68
62
  docile (~> 1.1.0)
69
63
  multi_json
70
64
  simplecov-html (~> 0.8.0)
71
65
  simplecov-html (0.8.0)
72
- thread_safe (0.1.3)
73
- atomic
74
- tzinfo (0.3.38)
75
66
 
76
67
  PLATFORMS
77
68
  ruby
78
69
 
79
70
  DEPENDENCIES
71
+ activesupport (~> 3.1.0)
80
72
  bundler (~> 1.0)
81
- httparty (~> 0.13.1)
73
+ httparty (~> 0.11.0)
82
74
  jeweler (~> 2.0.1)
75
+ nokogiri (~> 1.5.10)
83
76
  rdoc (~> 3.12)
84
- shoulda
77
+ shoulda (~> 3.1.0)
85
78
  simplecov
data/README.md CHANGED
@@ -13,7 +13,7 @@ gem install blockscore
13
13
  If you are using Rails, add the following to your `Gemfile`:
14
14
 
15
15
  ```ruby
16
- gem 'blockscore', '~> 1.0.1'
16
+ gem 'blockscore', '~> 2.0.0'
17
17
  ```
18
18
 
19
19
  ## Getting Started
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.0.0
1
+ 2.0.1
data/blockscore.gemspec CHANGED
@@ -2,16 +2,16 @@
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
3
  # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
- # stub: blockscore 2.0.0 ruby lib
5
+ # stub: blockscore 2.0.1 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "blockscore"
9
- s.version = "2.0.0"
9
+ s.version = "2.0.1"
10
10
 
11
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
12
12
  s.require_paths = ["lib"]
13
13
  s.authors = ["Alain Meier"]
14
- s.date = "2014-06-15"
14
+ s.date = "2014-06-22"
15
15
  s.description = "A ruby client library for the BlockScore API."
16
16
  s.email = "alain@blockscore.com"
17
17
  s.extra_rdoc_files = [
@@ -53,23 +53,29 @@ Gem::Specification.new do |s|
53
53
  s.specification_version = 4
54
54
 
55
55
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
56
- s.add_runtime_dependency(%q<httparty>, ["~> 0.13.1"])
57
- s.add_development_dependency(%q<shoulda>, [">= 0"])
56
+ s.add_runtime_dependency(%q<activesupport>, ["~> 3.1.0"])
57
+ s.add_runtime_dependency(%q<nokogiri>, ["~> 1.5.10"])
58
+ s.add_runtime_dependency(%q<httparty>, ["~> 0.11.0"])
59
+ s.add_development_dependency(%q<shoulda>, ["~> 3.1.0"])
58
60
  s.add_development_dependency(%q<rdoc>, ["~> 3.12"])
59
61
  s.add_development_dependency(%q<bundler>, ["~> 1.0"])
60
62
  s.add_development_dependency(%q<jeweler>, ["~> 2.0.1"])
61
63
  s.add_development_dependency(%q<simplecov>, [">= 0"])
62
64
  else
63
- s.add_dependency(%q<httparty>, ["~> 0.13.1"])
64
- s.add_dependency(%q<shoulda>, [">= 0"])
65
+ s.add_dependency(%q<activesupport>, ["~> 3.1.0"])
66
+ s.add_dependency(%q<nokogiri>, ["~> 1.5.10"])
67
+ s.add_dependency(%q<httparty>, ["~> 0.11.0"])
68
+ s.add_dependency(%q<shoulda>, ["~> 3.1.0"])
65
69
  s.add_dependency(%q<rdoc>, ["~> 3.12"])
66
70
  s.add_dependency(%q<bundler>, ["~> 1.0"])
67
71
  s.add_dependency(%q<jeweler>, ["~> 2.0.1"])
68
72
  s.add_dependency(%q<simplecov>, [">= 0"])
69
73
  end
70
74
  else
71
- s.add_dependency(%q<httparty>, ["~> 0.13.1"])
72
- s.add_dependency(%q<shoulda>, [">= 0"])
75
+ s.add_dependency(%q<activesupport>, ["~> 3.1.0"])
76
+ s.add_dependency(%q<nokogiri>, ["~> 1.5.10"])
77
+ s.add_dependency(%q<httparty>, ["~> 0.11.0"])
78
+ s.add_dependency(%q<shoulda>, ["~> 3.1.0"])
73
79
  s.add_dependency(%q<rdoc>, ["~> 3.12"])
74
80
  s.add_dependency(%q<bundler>, ["~> 1.0"])
75
81
  s.add_dependency(%q<jeweler>, ["~> 2.0.1"])
@@ -11,7 +11,7 @@ module BlockScore
11
11
  def initialize(api_key, version, options = {})
12
12
 
13
13
  @api_key = api_key
14
- @auth = { username: @api_key, password: "" }
14
+ @auth = { :username => @api_key, :password => "" }
15
15
  @verification = BlockScore::Verification.new(self)
16
16
  @question_set = BlockScore::QuestionSet.new(self)
17
17
  @error_handler = BlockScore::ErrorHandler.new
@@ -26,7 +26,7 @@ module BlockScore
26
26
 
27
27
  def get(path, options = {})
28
28
 
29
- options = { body: options, basic_auth: @auth }
29
+ options = { :body => options, :basic_auth => @auth }
30
30
 
31
31
  response = self.class.get(path, options)
32
32
 
@@ -40,7 +40,7 @@ module BlockScore
40
40
 
41
41
  def post(path, options = {})
42
42
 
43
- options = { body: options, basic_auth: @auth }
43
+ options = { :body => options, :basic_auth => @auth }
44
44
 
45
45
  response = self.class.post(path, options)
46
46
 
@@ -1,4 +1,5 @@
1
- require_relative './blockscore_error'
1
+ require File.join(File.dirname(__FILE__), 'blockscore_error')
2
+
2
3
  module BlockScore
3
4
  class AuthorizationError < BlockscoreError
4
5
 
@@ -1,4 +1,5 @@
1
- require_relative './blockscore_error'
1
+ require File.join(File.dirname(__FILE__), 'blockscore_error')
2
+
2
3
  module BlockScore
3
4
  class InternalServerError < BlockscoreError
4
5
 
@@ -1,4 +1,5 @@
1
- require_relative './blockscore_error'
1
+ require File.join(File.dirname(__FILE__), 'blockscore_error')
2
+
2
3
  module BlockScore
3
4
  class NotFoundError < BlockscoreError
4
5
 
@@ -1,11 +1,11 @@
1
- require_relative './blockscore_error'
1
+ require File.join(File.dirname(__FILE__), 'blockscore_error')
2
+
2
3
  module BlockScore
3
4
  class ParameterError < BlockscoreError
4
5
 
5
6
  @@http_status = 400
6
7
 
7
8
  def initialize(message=nil, json_body=nil, error_type=nil)
8
-
9
9
  super(message, json_body, @@http_status, error_type)
10
10
  end
11
11
  end
@@ -1,4 +1,5 @@
1
- require_relative './blockscore_error'
1
+ require File.join(File.dirname(__FILE__), 'blockscore_error')
2
+
2
3
  module BlockScore
3
4
  class ValidationError < BlockscoreError
4
5
 
@@ -21,9 +21,9 @@ module BlockScore
21
21
  def score(verification_id, question_set_id, answers)
22
22
 
23
23
  body = {
24
- verification_id: verification_id,
25
- question_set_id: question_set_id,
26
- answers: answers
24
+ :verification_id => verification_id,
25
+ :question_set_id => question_set_id,
26
+ :answers => answers
27
27
  }
28
28
 
29
29
  response = @client.post "/questions/score", body
@@ -1,4 +1,4 @@
1
- require_relative './helper'
1
+ require File.join(File.dirname(__FILE__), 'helper')
2
2
 
3
3
  class TestBlockScore < Test::Unit::TestCase
4
4
  context "a verification" do
@@ -33,23 +33,23 @@ class TestBlockScore < Test::Unit::TestCase
33
33
 
34
34
  should "return create a verification" do
35
35
  verification_params = {
36
- type: "us_citizen",
37
- date_of_birth: "1975-01-01",
38
- identification: {
39
- ssn: "0000"
36
+ :type => "us_citizen",
37
+ :date_of_birth => "1975-01-01",
38
+ :identification => {
39
+ :ssn => "0000"
40
40
  },
41
- name: {
42
- first: "John",
43
- middle: "P",
44
- last: "Doe"
41
+ :name => {
42
+ :first => "John",
43
+ :middle => "P",
44
+ :last => "Doe"
45
45
  },
46
- address: {
47
- street1: "1 Infinite Loop",
48
- street2: nil,
49
- city: "Cupertino",
50
- state: "CA",
51
- postal_code: "95014",
52
- country: "US"
46
+ :address => {
47
+ :street1 => "1 Infinite Loop",
48
+ :street2 => nil,
49
+ :city => "Cupertino",
50
+ :state => "CA",
51
+ :postal_code => "95014",
52
+ :country => "US"
53
53
  }
54
54
  }
55
55
 
@@ -86,24 +86,24 @@ class TestBlockScore < Test::Unit::TestCase
86
86
  should "return a score for the question set" do
87
87
  @answers = [
88
88
  {
89
- question_id: 1,
90
- answer_id: 1
89
+ :question_id => 1,
90
+ :answer_id => 1
91
91
  },
92
92
  {
93
- question_id: 2,
94
- answer_id: 1
93
+ :question_id => 2,
94
+ :answer_id => 1
95
95
  },
96
96
  {
97
- question_id: 3,
98
- answer_id: 1
97
+ :question_id => 3,
98
+ :answer_id => 1
99
99
  },
100
100
  {
101
- question_id: 4,
102
- answer_id: 1
101
+ :question_id => 4,
102
+ :answer_id => 1
103
103
  },
104
104
  {
105
- question_id: 5,
106
- answer_id: 1
105
+ :question_id => 5,
106
+ :answer_id => 1
107
107
  }
108
108
  ]
109
109
 
metadata CHANGED
@@ -1,43 +1,71 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: blockscore
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alain Meier
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-06-15 00:00:00.000000000 Z
11
+ date: 2014-06-22 00:00:00.000000000 Z
12
12
  dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: activesupport
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: 3.1.0
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: 3.1.0
27
+ - !ruby/object:Gem::Dependency
28
+ name: nokogiri
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: 1.5.10
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: 1.5.10
13
41
  - !ruby/object:Gem::Dependency
14
42
  name: httparty
15
43
  requirement: !ruby/object:Gem::Requirement
16
44
  requirements:
17
45
  - - "~>"
18
46
  - !ruby/object:Gem::Version
19
- version: 0.13.1
47
+ version: 0.11.0
20
48
  type: :runtime
21
49
  prerelease: false
22
50
  version_requirements: !ruby/object:Gem::Requirement
23
51
  requirements:
24
52
  - - "~>"
25
53
  - !ruby/object:Gem::Version
26
- version: 0.13.1
54
+ version: 0.11.0
27
55
  - !ruby/object:Gem::Dependency
28
56
  name: shoulda
29
57
  requirement: !ruby/object:Gem::Requirement
30
58
  requirements:
31
- - - ">="
59
+ - - "~>"
32
60
  - !ruby/object:Gem::Version
33
- version: '0'
61
+ version: 3.1.0
34
62
  type: :development
35
63
  prerelease: false
36
64
  version_requirements: !ruby/object:Gem::Requirement
37
65
  requirements:
38
- - - ">="
66
+ - - "~>"
39
67
  - !ruby/object:Gem::Version
40
- version: '0'
68
+ version: 3.1.0
41
69
  - !ruby/object:Gem::Dependency
42
70
  name: rdoc
43
71
  requirement: !ruby/object:Gem::Requirement