checkr-rb 0.0.3a

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.
Files changed (43) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +14 -0
  3. data/Gemfile +4 -0
  4. data/LICENSE.txt +22 -0
  5. data/README.md +110 -0
  6. data/Rakefile +10 -0
  7. data/checkr.gemspec +29 -0
  8. data/lib/checkr.rb +37 -0
  9. data/lib/checkr/base.rb +24 -0
  10. data/lib/checkr/candidate.rb +39 -0
  11. data/lib/checkr/core_ext.rb +57 -0
  12. data/lib/checkr/county_criminal_search.rb +5 -0
  13. data/lib/checkr/motor_vehicle_report.rb +25 -0
  14. data/lib/checkr/national_criminal_search.rb +5 -0
  15. data/lib/checkr/report.rb +35 -0
  16. data/lib/checkr/report_charge.rb +6 -0
  17. data/lib/checkr/report_record.rb +17 -0
  18. data/lib/checkr/sex_offender search.rb +5 -0
  19. data/lib/checkr/ssn_trace.rb +5 -0
  20. data/lib/checkr/subaccount.rb +19 -0
  21. data/lib/checkr/terrorist_watchlist_search.rb +6 -0
  22. data/lib/checkr/version.rb +3 -0
  23. data/test/cassettes/test_0001_should_create_candidate.yml +41 -0
  24. data/test/cassettes/test_0001_should_create_candidate_for_the_subaccount.yml +41 -0
  25. data/test/cassettes/test_0001_should_create_report.yml +41 -0
  26. data/test/cassettes/test_0001_should_create_subaccount.yml +44 -0
  27. data/test/cassettes/test_0001_should_return_candidate_object.yml +41 -0
  28. data/test/cassettes/test_0001_should_return_motor_vehicle_report_object.yml +41 -0
  29. data/test/cassettes/test_0001_should_return_report_object.yml +41 -0
  30. data/test/cassettes/test_0002_returns_candidate_object_with_checkr_parameters.yml +41 -0
  31. data/test/cassettes/test_0002_returns_motor_vehicle_report_object_with_parameters.yml +41 -0
  32. data/test/cassettes/test_0002_returns_report_object_with_parameters.yml +41 -0
  33. data/test/cassettes/test_0002_should_respond_to_candidate_parameters_belongs_to_subaccount.yml +41 -0
  34. data/test/cassettes/test_0002_should_respond_to_parameters.yml +41 -0
  35. data/test/cassettes/test_0002_should_respond_to_report_parameters.yml +41 -0
  36. data/test/cassettes/test_0002_should_respond_to_subaccount_parameters.yml +44 -0
  37. data/test/checkr_test.rb +18 -0
  38. data/test/lib/checkr/candidate_test.rb +66 -0
  39. data/test/lib/checkr/motor_vehicle_report_test.rb +23 -0
  40. data/test/lib/checkr/report_test.rb +39 -0
  41. data/test/lib/checkr/subaccount_test.rb +24 -0
  42. data/test/test_helper.rb +15 -0
  43. metadata +189 -0
@@ -0,0 +1,41 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://83ebeabdec09f6670863766f792ead24d61fe3f9:@api.checkr.io/v1/reports/5878551b3ee1eacae5a2c558
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers: {}
10
+ response:
11
+ status:
12
+ code: 200
13
+ message: OK
14
+ headers:
15
+ Server:
16
+ - Cowboy
17
+ Connection:
18
+ - keep-alive
19
+ Date:
20
+ - Tue, 14 Oct 2014 07:17:14 GMT
21
+ Status:
22
+ - 200 OK
23
+ Strict-Transport-Security:
24
+ - max-age=31536000
25
+ Content-Type:
26
+ - application/json
27
+ Content-Length:
28
+ - '728'
29
+ X-Content-Type-Options:
30
+ - nosniff
31
+ Set-Cookie:
32
+ - checkr.production=BAh7CEkiD3Nlc3Npb25faWQGOgZFVEkiRTM4MDY4ZTU1MjYxYTgzMDlkNTRi%0ANDY1OTZjNmI4MTUzMjM0NDU0OTNhZjk0YjI3MTcxMDhhYzZmYjcxZWUxODAG%0AOwBGSSIJY3NyZgY7AEZJIiVjYjk1YmM3ZjM1NGZkYzg5OTE5MjVlZGE5YjFm%0AMDBlZAY7AEZJIg10cmFja2luZwY7AEZ7B0kiFEhUVFBfVVNFUl9BR0VOVAY7%0AAFRJIi1kYTM5YTNlZTVlNmI0YjBkMzI1NWJmZWY5NTYwMTg5MGFmZDgwNzA5%0ABjsARkkiGUhUVFBfQUNDRVBUX0xBTkdVQUdFBjsAVEkiLWRhMzlhM2VlNWU2%0AYjRiMGQzMjU1YmZlZjk1NjAxODkwYWZkODA3MDkGOwBG%0A--edf927ddf5f182d31976b6b8f29ea9c41c3cbc6b;
33
+ path=/; HttpOnly; secure
34
+ Via:
35
+ - 1.1 vegur
36
+ body:
37
+ encoding: UTF-8
38
+ string: '{"id":"5878551b3ee1eacae5a2c558","object":"test_report","uri":"/v1/reports/5878551b3ee1eacae5a2c558","status":"pending","created_at":"2014-10-14T07:10:16Z","completed_at":null,"upgraded_at":null,"turnaround_time":null,"package":"driver_plus","tags":[],"candidate_id":"e44aa283528e6fde7d542194","ssn_trace_id":"543ccc5835396200064a0000","sex_offender_search_id":"543ccc583539620006510000","terrorist_watchlist_search_id":"543ccc583539620006520000","national_criminal_search_id":"543ccc5835396200064f0000","county_criminal_search_ids":["543ccc583539620006530000","543ccc583539620006540000","543ccc593539620006550000","543ccc593539620006560000"],"motor_vehicle_report_id":"543ccc583539620006500000","geo_id":null,"document_ids":[]}'
39
+ http_version:
40
+ recorded_at: Tue, 14 Oct 2014 07:17:14 GMT
41
+ recorded_with: VCR 2.9.3
@@ -0,0 +1,41 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://83ebeabdec09f6670863766f792ead24d61fe3f9:@api.checkr.io/v1/subaccounts/8168372aac5a952b90eb9acb/candidates
6
+ body:
7
+ encoding: UTF-8
8
+ string: first_name=John&last_name=Smith&dob=1970-01-22&ssn=111-11-2000&phone=5555555555&email=john%40smith.org&subaccount_id=8168372aac5a952b90eb9acb
9
+ headers: {}
10
+ response:
11
+ status:
12
+ code: 201
13
+ message: Created
14
+ headers:
15
+ Server:
16
+ - Cowboy
17
+ Connection:
18
+ - keep-alive
19
+ Date:
20
+ - Tue, 14 Oct 2014 06:43:07 GMT
21
+ Status:
22
+ - 201 Created
23
+ Strict-Transport-Security:
24
+ - max-age=31536000
25
+ Content-Type:
26
+ - application/json
27
+ Content-Length:
28
+ - '375'
29
+ X-Content-Type-Options:
30
+ - nosniff
31
+ Set-Cookie:
32
+ - checkr.production=BAh7CEkiD3Nlc3Npb25faWQGOgZFVEkiRTZmYWZiYjE3YjVmODYzZTgxMTMy%0AN2E0ZjBjNGUyNmI2ZjJjNzA1MDZlNmU4MGQyNTY5YjY2MjAwODcwOGZlNzAG%0AOwBGSSIJY3NyZgY7AEZJIiVkOTZlZmQ1NzQ3MDZlODI3YWUxODQ3M2NjZGNk%0AYWFlNgY7AEZJIg10cmFja2luZwY7AEZ7B0kiFEhUVFBfVVNFUl9BR0VOVAY7%0AAFRJIi1kYTM5YTNlZTVlNmI0YjBkMzI1NWJmZWY5NTYwMTg5MGFmZDgwNzA5%0ABjsARkkiGUhUVFBfQUNDRVBUX0xBTkdVQUdFBjsAVEkiLWRhMzlhM2VlNWU2%0AYjRiMGQzMjU1YmZlZjk1NjAxODkwYWZkODA3MDkGOwBG%0A--eb2bd7282bfd964db64557abe35aba804161580f;
33
+ path=/; HttpOnly; secure
34
+ Via:
35
+ - 1.1 vegur
36
+ body:
37
+ encoding: UTF-8
38
+ string: '{"id":"aa10fd0d98ea6e4753718a23","object":"test_candidate","uri":"/v1/candidates/aa10fd0d98ea6e4753718a23","created_at":"2014-10-14T06:43:07Z","first_name":"John","last_name":"Smith","middle_name":null,"dob":"1970-01-22","ssn":"XXX-XX-2000","email":"john@smith.org","zipcode":null,"phone":"5555555555","driver_license_state":null,"driver_license_number":null,"report_ids":[]}'
39
+ http_version:
40
+ recorded_at: Tue, 14 Oct 2014 06:43:07 GMT
41
+ recorded_with: VCR 2.9.3
@@ -0,0 +1,41 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://83ebeabdec09f6670863766f792ead24d61fe3f9:@api.checkr.io/v1/candidates
6
+ body:
7
+ encoding: UTF-8
8
+ string: first_name=John&last_name=Smith&dob=1970-01-22&ssn=111-11-2000&phone=5555555555&email=john%40smith.org
9
+ headers: {}
10
+ response:
11
+ status:
12
+ code: 201
13
+ message: Created
14
+ headers:
15
+ Server:
16
+ - Cowboy
17
+ Connection:
18
+ - keep-alive
19
+ Date:
20
+ - Sun, 12 Oct 2014 16:07:27 GMT
21
+ Status:
22
+ - 201 Created
23
+ Strict-Transport-Security:
24
+ - max-age=31536000
25
+ Content-Type:
26
+ - application/json
27
+ Content-Length:
28
+ - '375'
29
+ X-Content-Type-Options:
30
+ - nosniff
31
+ Set-Cookie:
32
+ - checkr.production=BAh7CEkiD3Nlc3Npb25faWQGOgZFVEkiRTJhNmZiMTk4MTQ0ZTI0MTc5NWUx%0ANjVmODU3YzU1MWQ3ZWE0NTQ3NjU0YWVjYzliYjVlNTM5ZDU4OGRkODIzOGIG%0AOwBGSSIJY3NyZgY7AEZJIiU4YmViMmY1ZDRlMTczN2IxZWM3ZDYwOGIwYzVk%0ANzIzYgY7AEZJIg10cmFja2luZwY7AEZ7B0kiFEhUVFBfVVNFUl9BR0VOVAY7%0AAFRJIi1kYTM5YTNlZTVlNmI0YjBkMzI1NWJmZWY5NTYwMTg5MGFmZDgwNzA5%0ABjsARkkiGUhUVFBfQUNDRVBUX0xBTkdVQUdFBjsAVEkiLWRhMzlhM2VlNWU2%0AYjRiMGQzMjU1YmZlZjk1NjAxODkwYWZkODA3MDkGOwBG%0A--5550df00fb1edbbe0ebdbd47e524cfd5bbf84aa2;
33
+ path=/; HttpOnly; secure
34
+ Via:
35
+ - 1.1 vegur
36
+ body:
37
+ encoding: UTF-8
38
+ string: '{"id":"48e1768591583c31ada8810f","object":"test_candidate","uri":"/v1/candidates/48e1768591583c31ada8810f","created_at":"2014-10-12T16:07:27Z","first_name":"John","last_name":"Smith","middle_name":null,"dob":"1970-01-22","ssn":"XXX-XX-2000","email":"john@smith.org","zipcode":null,"phone":"5555555555","driver_license_state":null,"driver_license_number":null,"report_ids":[]}'
39
+ http_version:
40
+ recorded_at: Sun, 12 Oct 2014 16:07:27 GMT
41
+ recorded_with: VCR 2.9.3
@@ -0,0 +1,41 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://83ebeabdec09f6670863766f792ead24d61fe3f9:@api.checkr.io/v1/reports
6
+ body:
7
+ encoding: UTF-8
8
+ string: package=driver_plus&candidate_id=e44aa283528e6fde7d542194
9
+ headers: {}
10
+ response:
11
+ status:
12
+ code: 201
13
+ message: Created
14
+ headers:
15
+ Server:
16
+ - Cowboy
17
+ Connection:
18
+ - keep-alive
19
+ Date:
20
+ - Tue, 14 Oct 2014 07:10:17 GMT
21
+ Status:
22
+ - 201 Created
23
+ Strict-Transport-Security:
24
+ - max-age=31536000
25
+ Content-Type:
26
+ - application/json
27
+ Content-Length:
28
+ - '728'
29
+ X-Content-Type-Options:
30
+ - nosniff
31
+ Set-Cookie:
32
+ - checkr.production=BAh7CEkiD3Nlc3Npb25faWQGOgZFVEkiRWYyNzNiOTI5NWYzZmFiNjljZTAw%0ANWVlMjdhYzg3NDcwNTE5ZjJkZDdlYzEzZGNmMzIzMTAyMjAzOGI1ODViYjQG%0AOwBGSSIJY3NyZgY7AEZJIiUxNGRjMmZjMGU0NWZkOTI1YmVjMDhhNzAyNWRj%0ANzFhNAY7AEZJIg10cmFja2luZwY7AEZ7B0kiFEhUVFBfVVNFUl9BR0VOVAY7%0AAFRJIi1kYTM5YTNlZTVlNmI0YjBkMzI1NWJmZWY5NTYwMTg5MGFmZDgwNzA5%0ABjsARkkiGUhUVFBfQUNDRVBUX0xBTkdVQUdFBjsAVEkiLWRhMzlhM2VlNWU2%0AYjRiMGQzMjU1YmZlZjk1NjAxODkwYWZkODA3MDkGOwBG%0A--93b3068e4b3267226baaa335e0e75f7a74d6011d;
33
+ path=/; HttpOnly; secure
34
+ Via:
35
+ - 1.1 vegur
36
+ body:
37
+ encoding: UTF-8
38
+ string: '{"id":"5878551b3ee1eacae5a2c558","object":"test_report","uri":"/v1/reports/5878551b3ee1eacae5a2c558","status":"pending","created_at":"2014-10-14T07:10:16Z","completed_at":null,"upgraded_at":null,"turnaround_time":null,"package":"driver_plus","tags":[],"candidate_id":"e44aa283528e6fde7d542194","ssn_trace_id":"543ccc5835396200064a0000","sex_offender_search_id":"543ccc583539620006510000","terrorist_watchlist_search_id":"543ccc583539620006520000","national_criminal_search_id":"543ccc5835396200064f0000","county_criminal_search_ids":["543ccc583539620006530000","543ccc583539620006540000","543ccc593539620006550000","543ccc593539620006560000"],"motor_vehicle_report_id":"543ccc583539620006500000","geo_id":null,"document_ids":[]}'
39
+ http_version:
40
+ recorded_at: Tue, 14 Oct 2014 07:10:17 GMT
41
+ recorded_with: VCR 2.9.3
@@ -0,0 +1,44 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://83ebeabdec09f6670863766f792ead24d61fe3f9:@api.checkr.io/v1/subaccounts
6
+ body:
7
+ encoding: UTF-8
8
+ string: name=Checkr&entity_name=My%20Company&tax_id=XXXXX&representative_title=CEO&representative_name=John%20Smith&representative_email=john.smith%40company.org&phone=3101111111&incorporation_date=2010-02-02&incorporation_type=llc&incorporation_state=DE&address[street]=3230%203rd%20street&address[city]=San%20Francisco&address[state]=CA&address[zipcode]=94110
9
+ headers: {}
10
+ response:
11
+ status:
12
+ code: 201
13
+ message: Created
14
+ headers:
15
+ Server:
16
+ - Cowboy
17
+ Connection:
18
+ - keep-alive
19
+ Date:
20
+ - Tue, 14 Oct 2014 06:43:11 GMT
21
+ Status:
22
+ - 201 Created
23
+ Strict-Transport-Security:
24
+ - max-age=31536000
25
+ Content-Type:
26
+ - application/json
27
+ Content-Length:
28
+ - '425'
29
+ X-Content-Type-Options:
30
+ - nosniff
31
+ Set-Cookie:
32
+ - checkr.production=BAh7CEkiD3Nlc3Npb25faWQGOgZFVEkiRTYyZGNkZWMyM2JmNGNiODExMjdk%0ANmNmNjc1NDQyMWYxOTVjOTM5NWM3Y2QxM2M3MmY2YWFmZDUzMDkyYmI1OGUG%0AOwBGSSIJY3NyZgY7AEZJIiU0MjAyNDE5YjEyMzIyODU0NWU0MjMwZDZjYzVh%0AN2JkZAY7AEZJIg10cmFja2luZwY7AEZ7B0kiFEhUVFBfVVNFUl9BR0VOVAY7%0AAFRJIi1kYTM5YTNlZTVlNmI0YjBkMzI1NWJmZWY5NTYwMTg5MGFmZDgwNzA5%0ABjsARkkiGUhUVFBfQUNDRVBUX0xBTkdVQUdFBjsAVEkiLWRhMzlhM2VlNWU2%0AYjRiMGQzMjU1YmZlZjk1NjAxODkwYWZkODA3MDkGOwBG%0A--5a72a276bfff4c3adb286adc7a794738703439dc;
33
+ path=/; HttpOnly; secure
34
+ Via:
35
+ - 1.1 vegur
36
+ body:
37
+ encoding: UTF-8
38
+ string: '{"id":"d00650cde3fb6c501d60925b","name":"Checkr","authorized":true,"address":{"street":"3230
39
+ 3rd street","city":"San Francisco","zipcode":"94110","state":"CA"},"entity_name":"My
40
+ Company","tax_id":"XXXXX","incorporation_date":"2010-02-02","incorporation_type":"llc","incorporation_state":"DE","representative_title":"CEO","representative_name":"John
41
+ Smith","representative_email":"john.smith@company.org","phone":"3101111111"}'
42
+ http_version:
43
+ recorded_at: Tue, 14 Oct 2014 06:43:11 GMT
44
+ recorded_with: VCR 2.9.3
@@ -0,0 +1,18 @@
1
+ require 'test_helper'
2
+
3
+ describe Checkr do
4
+ it 'should have a version' do
5
+ Checkr::VERSION.wont_be_nil
6
+ end
7
+
8
+ it 'should have api_key' do
9
+ Checkr.respond_to?('api_key').must_equal true
10
+ Checkr.respond_to?('api_key=').must_equal true
11
+ end
12
+
13
+ describe '.configure' do
14
+ it 'should set the values' do
15
+ Checkr.api_key.must_equal "83ebeabdec09f6670863766f792ead24d61fe3f9"
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,66 @@
1
+ describe Checkr::Candidate do
2
+ before do
3
+ VCR.insert_cassette name
4
+ end
5
+
6
+ after do
7
+ VCR.eject_cassette
8
+ end
9
+
10
+ describe '.create' do
11
+ let(:params) { {:first_name => 'John', :last_name => 'Smith', :dob => '1970-01-22', :ssn => '111-11-2000', :phone => '5555555555', :email => 'john@smith.org' } }
12
+
13
+ describe 'without subacount' do
14
+ let(:candidate) { Checkr::Candidate.create(params)}
15
+
16
+ it "should create candidate" do
17
+ candidate.must_be_instance_of(Checkr::Candidate)
18
+ end
19
+
20
+ it "should respond to parameters" do
21
+ candidate.id.must_equal("48e1768591583c31ada8810f")
22
+ candidate.object.must_equal("test_candidate")
23
+ candidate.first_name.must_equal("John")
24
+ candidate.last_name.must_equal("Smith")
25
+ candidate.middle_name.must_equal(nil)
26
+ candidate.dob.must_equal("1970-01-22")
27
+ candidate.ssn.must_equal("XXX-XX-2000")
28
+ candidate.email.must_equal("john@smith.org")
29
+ candidate.phone.must_equal("5555555555")
30
+ end
31
+ end
32
+
33
+ describe 'with subacount' do
34
+ let(:candidate) { Checkr::Candidate.create(params.merge(:subaccount_id => '8168372aac5a952b90eb9acb') )}
35
+
36
+ it "should create candidate for the subaccount" do
37
+ candidate.must_be_instance_of(Checkr::Candidate)
38
+ end
39
+
40
+ it "should respond to candidate parameters belongs to subaccount" do
41
+ candidate.id.must_equal("aa10fd0d98ea6e4753718a23")
42
+ end
43
+ end
44
+ end
45
+
46
+ describe '.find' do
47
+ let(:candidate) { Checkr::Candidate.find("e44aa283528e6fde7d542194")}
48
+
49
+ it "should return candidate object" do
50
+ candidate.must_be_instance_of(Checkr::Candidate)
51
+ end
52
+
53
+ it "returns candidate object with checkr parameters" do
54
+ candidate.id.must_equal("e44aa283528e6fde7d542194")
55
+ candidate.object.must_equal("test_candidate")
56
+ candidate.first_name.must_equal("John")
57
+ candidate.last_name.must_equal("Smith")
58
+ candidate.middle_name.must_equal("Alfred")
59
+ candidate.dob.must_equal("1970-01-22")
60
+ candidate.ssn.must_equal("XXX-XX-4645")
61
+ candidate.email.must_equal("john.smith@gmail.com")
62
+ candidate.phone.must_equal(nil)
63
+ end
64
+ end
65
+
66
+ end
@@ -0,0 +1,23 @@
1
+ describe Checkr::MotorVehicleReport do
2
+ before do
3
+ VCR.insert_cassette name
4
+ end
5
+
6
+ after do
7
+ VCR.eject_cassette
8
+ end
9
+
10
+ describe '.find' do
11
+ let(:report) { Checkr::MotorVehicleReport.find("539fd88c101897f7cd000007")}
12
+
13
+ it "should return motor vehicle report object" do
14
+ report.must_be_instance_of(Checkr::MotorVehicleReport)
15
+ end
16
+
17
+ it "returns motor vehicle report object with parameters" do
18
+ report.id.must_equal("539fd88c101897f7cd000007")
19
+
20
+ end
21
+ end
22
+
23
+ end
@@ -0,0 +1,39 @@
1
+ describe Checkr::Report do
2
+ before do
3
+ VCR.insert_cassette name
4
+ end
5
+
6
+ after do
7
+ VCR.eject_cassette
8
+ end
9
+
10
+ describe '.create' do
11
+ let(:report) { Checkr::Report.create(:package => 'driver_plus', :candidate_id => 'e44aa283528e6fde7d542194')}
12
+
13
+ it "should create report" do
14
+ report.must_be_instance_of(Checkr::Report)
15
+ end
16
+
17
+ it "should respond to report parameters" do
18
+ report.id.must_equal("5878551b3ee1eacae5a2c558")
19
+ report.object.must_equal("test_report")
20
+ report.status.must_equal("pending")
21
+ report.package.must_equal("driver_plus")
22
+ end
23
+
24
+ end
25
+
26
+ describe '.find' do
27
+ let(:report) { Checkr::Report.find("5878551b3ee1eacae5a2c558")}
28
+
29
+ it "should return report object" do
30
+ report.must_be_instance_of(Checkr::Report)
31
+ end
32
+
33
+ it "returns report object with parameters" do
34
+ report.id.must_equal("5878551b3ee1eacae5a2c558")
35
+
36
+ end
37
+ end
38
+
39
+ end
@@ -0,0 +1,24 @@
1
+ describe Checkr::Subaccount do
2
+ before do
3
+ VCR.insert_cassette name
4
+ end
5
+
6
+ after do
7
+ VCR.eject_cassette
8
+ end
9
+
10
+ describe '.create' do
11
+ let(:subaccount) { Checkr::Subaccount.create(:name => 'Checkr', :entity_name => 'My Company', :tax_id => 'XXXXX', :representative_title => 'CEO', :representative_name => 'John Smith', :representative_email => 'john.smith@company.org', :phone => '3101111111',
12
+ :incorporation_date => '2010-02-02', :incorporation_type => 'llc', :incorporation_state => 'DE', 'address[street]' => '3230 3rd street', 'address[city]' => 'San Francisco',
13
+ 'address[state]' => 'CA', 'address[zipcode]'=> '94110' )}
14
+
15
+ it "should create subaccount" do
16
+ subaccount.must_be_instance_of(Checkr::Subaccount)
17
+ end
18
+
19
+ it "should respond to subaccount parameters" do
20
+ subaccount.id.must_equal("d00650cde3fb6c501d60925b")
21
+ subaccount.authorized.must_equal(true)
22
+ end
23
+ end
24
+ end
@@ -0,0 +1,15 @@
1
+ require 'minitest/autorun'
2
+ require 'minitest/pride'
3
+ require 'minispec-metadata'
4
+ require 'checkr'
5
+ require 'vcr'
6
+ require 'webmock'
7
+
8
+ VCR.configure do |c|
9
+ c.cassette_library_dir = 'test/cassettes'
10
+ c.hook_into :webmock
11
+ end
12
+
13
+ Checkr.configure do |c|
14
+ c.api_key = "83ebeabdec09f6670863766f792ead24d61fe3f9" #Test token from checkr document
15
+ end
metadata ADDED
@@ -0,0 +1,189 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: checkr-rb
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.3a
5
+ platform: ruby
6
+ authors:
7
+ - Vijendra Rao
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2015-04-06 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: httparty
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - '>='
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - '>='
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: bundler
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ~>
32
+ - !ruby/object:Gem::Version
33
+ version: '1.7'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ~>
39
+ - !ruby/object:Gem::Version
40
+ version: '1.7'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rake
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ~>
46
+ - !ruby/object:Gem::Version
47
+ version: '10.0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ~>
53
+ - !ruby/object:Gem::Version
54
+ version: '10.0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: vcr
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - '>='
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: webmock
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - '>='
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - '>='
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: codeclimate-test-reporter
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - '>='
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - '>='
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
97
+ description: 'checkr.io API wrapper: Automated background screenings and driving records'
98
+ email:
99
+ - vijendrakarkala@gmail.com
100
+ executables: []
101
+ extensions: []
102
+ extra_rdoc_files: []
103
+ files:
104
+ - .gitignore
105
+ - Gemfile
106
+ - LICENSE.txt
107
+ - README.md
108
+ - Rakefile
109
+ - checkr.gemspec
110
+ - lib/checkr.rb
111
+ - lib/checkr/base.rb
112
+ - lib/checkr/candidate.rb
113
+ - lib/checkr/core_ext.rb
114
+ - lib/checkr/county_criminal_search.rb
115
+ - lib/checkr/motor_vehicle_report.rb
116
+ - lib/checkr/national_criminal_search.rb
117
+ - lib/checkr/report.rb
118
+ - lib/checkr/report_charge.rb
119
+ - lib/checkr/report_record.rb
120
+ - lib/checkr/sex_offender search.rb
121
+ - lib/checkr/ssn_trace.rb
122
+ - lib/checkr/subaccount.rb
123
+ - lib/checkr/terrorist_watchlist_search.rb
124
+ - lib/checkr/version.rb
125
+ - test/cassettes/test_0001_should_create_candidate.yml
126
+ - test/cassettes/test_0001_should_create_candidate_for_the_subaccount.yml
127
+ - test/cassettes/test_0001_should_create_report.yml
128
+ - test/cassettes/test_0001_should_create_subaccount.yml
129
+ - test/cassettes/test_0001_should_return_candidate_object.yml
130
+ - test/cassettes/test_0001_should_return_motor_vehicle_report_object.yml
131
+ - test/cassettes/test_0001_should_return_report_object.yml
132
+ - test/cassettes/test_0002_returns_candidate_object_with_checkr_parameters.yml
133
+ - test/cassettes/test_0002_returns_motor_vehicle_report_object_with_parameters.yml
134
+ - test/cassettes/test_0002_returns_report_object_with_parameters.yml
135
+ - test/cassettes/test_0002_should_respond_to_candidate_parameters_belongs_to_subaccount.yml
136
+ - test/cassettes/test_0002_should_respond_to_parameters.yml
137
+ - test/cassettes/test_0002_should_respond_to_report_parameters.yml
138
+ - test/cassettes/test_0002_should_respond_to_subaccount_parameters.yml
139
+ - test/checkr_test.rb
140
+ - test/lib/checkr/candidate_test.rb
141
+ - test/lib/checkr/motor_vehicle_report_test.rb
142
+ - test/lib/checkr/report_test.rb
143
+ - test/lib/checkr/subaccount_test.rb
144
+ - test/test_helper.rb
145
+ homepage: https://github.com/vijendra/checkr
146
+ licenses:
147
+ - MIT
148
+ metadata: {}
149
+ post_install_message:
150
+ rdoc_options: []
151
+ require_paths:
152
+ - lib
153
+ required_ruby_version: !ruby/object:Gem::Requirement
154
+ requirements:
155
+ - - '>='
156
+ - !ruby/object:Gem::Version
157
+ version: '0'
158
+ required_rubygems_version: !ruby/object:Gem::Requirement
159
+ requirements:
160
+ - - '>'
161
+ - !ruby/object:Gem::Version
162
+ version: 1.3.1
163
+ requirements: []
164
+ rubyforge_project:
165
+ rubygems_version: 2.0.6
166
+ signing_key:
167
+ specification_version: 4
168
+ summary: checkr API Ruby wrapper
169
+ test_files:
170
+ - test/cassettes/test_0001_should_create_candidate.yml
171
+ - test/cassettes/test_0001_should_create_candidate_for_the_subaccount.yml
172
+ - test/cassettes/test_0001_should_create_report.yml
173
+ - test/cassettes/test_0001_should_create_subaccount.yml
174
+ - test/cassettes/test_0001_should_return_candidate_object.yml
175
+ - test/cassettes/test_0001_should_return_motor_vehicle_report_object.yml
176
+ - test/cassettes/test_0001_should_return_report_object.yml
177
+ - test/cassettes/test_0002_returns_candidate_object_with_checkr_parameters.yml
178
+ - test/cassettes/test_0002_returns_motor_vehicle_report_object_with_parameters.yml
179
+ - test/cassettes/test_0002_returns_report_object_with_parameters.yml
180
+ - test/cassettes/test_0002_should_respond_to_candidate_parameters_belongs_to_subaccount.yml
181
+ - test/cassettes/test_0002_should_respond_to_parameters.yml
182
+ - test/cassettes/test_0002_should_respond_to_report_parameters.yml
183
+ - test/cassettes/test_0002_should_respond_to_subaccount_parameters.yml
184
+ - test/checkr_test.rb
185
+ - test/lib/checkr/candidate_test.rb
186
+ - test/lib/checkr/motor_vehicle_report_test.rb
187
+ - test/lib/checkr/report_test.rb
188
+ - test/lib/checkr/subaccount_test.rb
189
+ - test/test_helper.rb