checkr-official 1.5.1 → 1.5.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE +13 -0
- data/checkr-official.gemspec +4 -3
- data/lib/checkr.rb +2 -1
- data/lib/checkr/education_verification.rb +17 -0
- data/lib/checkr/report.rb +3 -0
- data/lib/checkr/version.rb +1 -1
- data/test/checkr/education_verification_test.rb +81 -0
- data/test/test_data.rb +11 -0
- metadata +12 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4ebde1801424e4900edd3d78b68d51eac0b893fe
|
4
|
+
data.tar.gz: 6b67ba39e5d0e62ed9fd12f2e854ec55fdb8e1c6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 29c9eb0abe778ad5a645d9c94cebcfdd4c9361d3ef917b725fabe12cf9cf2b1157cb553ee15893ca97865679656e446ff3c2753a7cc51245cda876b38be30d1b
|
7
|
+
data.tar.gz: 739abbf04cd06202348a733d83a89fa98e725b3665e8d599860d52f7d3b1c902b9fbbc8283b73df2c82e854e5c98732742284a68a8376dc6223ccf9178cb031f
|
data/LICENSE
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
Copyright 2018 Checkr, Inc
|
2
|
+
|
3
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
you may not use this file except in compliance with the License.
|
5
|
+
You may obtain a copy of the License at
|
6
|
+
|
7
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
|
9
|
+
Unless required by applicable law or agreed to in writing, software
|
10
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
See the License for the specific language governing permissions and
|
13
|
+
limitations under the License.
|
data/checkr-official.gemspec
CHANGED
@@ -5,11 +5,12 @@ require 'checkr/version'
|
|
5
5
|
Gem::Specification.new do |s|
|
6
6
|
s.name = 'checkr-official'
|
7
7
|
s.summary = 'Ruby bindings for Checkr API'
|
8
|
-
s.description = 'Checkr -
|
8
|
+
s.description = 'Checkr - Background check platform for the New World of Work. See https://docs.checkr.com for details.'
|
9
9
|
s.homepage = 'https://checkr.com/'
|
10
|
-
s.authors = ['
|
11
|
-
s.email = ['
|
10
|
+
s.authors = ['Checkr Engineering Team']
|
11
|
+
s.email = ['eng@checkr.com']
|
12
12
|
s.version = Checkr::VERSION
|
13
|
+
s.license = 'Apache-2.0'
|
13
14
|
|
14
15
|
s.required_ruby_version = '>= 1.9.3'
|
15
16
|
|
data/lib/checkr.rb
CHANGED
@@ -22,9 +22,10 @@ require 'checkr/candidate'
|
|
22
22
|
require 'checkr/county_criminal_search'
|
23
23
|
require 'checkr/document'
|
24
24
|
require 'checkr/document_list'
|
25
|
+
require 'checkr/education_verification'
|
25
26
|
require 'checkr/eviction_search'
|
26
|
-
require 'checkr/federal_criminal_search'
|
27
27
|
require 'checkr/federal_civil_search'
|
28
|
+
require 'checkr/federal_criminal_search'
|
28
29
|
require 'checkr/geo'
|
29
30
|
require 'checkr/global_watchlist_search'
|
30
31
|
require 'checkr/invitation'
|
@@ -0,0 +1,17 @@
|
|
1
|
+
module Checkr
|
2
|
+
class EducationVerification < APIResource
|
3
|
+
|
4
|
+
attribute :status
|
5
|
+
attribute :completed_at
|
6
|
+
attribute :turnaround_time
|
7
|
+
attribute :records
|
8
|
+
|
9
|
+
api_class_method :retrieve, :get, ":path/:id", :arguments => [:id]
|
10
|
+
|
11
|
+
def self.path
|
12
|
+
"/v1/education_verifications"
|
13
|
+
end
|
14
|
+
|
15
|
+
APIClass.register_subclass(self, "education_verification")
|
16
|
+
end
|
17
|
+
end
|
data/lib/checkr/report.rb
CHANGED
@@ -44,6 +44,9 @@ module Checkr
|
|
44
44
|
attribute :verifications, :VerificationList, :nested => true, :default => {}
|
45
45
|
attribute_writer_alias :verification_ids, :verifications
|
46
46
|
|
47
|
+
attribute :education_verification, :EducationVerification
|
48
|
+
attribute_writer_alias :education_verification_id, :education_verification
|
49
|
+
|
47
50
|
api_class_method :retrieve, :get, ":path/:id", :arguments => [:id]
|
48
51
|
api_class_method :create, :post
|
49
52
|
|
data/lib/checkr/version.rb
CHANGED
@@ -0,0 +1,81 @@
|
|
1
|
+
require File.expand_path('../../test_helper', __FILE__)
|
2
|
+
|
3
|
+
module Checkr
|
4
|
+
class EducationVerificationTest < Test::Unit::TestCase
|
5
|
+
setup do
|
6
|
+
@education_verification_url = "#{Checkr.api_base}/v1/education_verifications"
|
7
|
+
end
|
8
|
+
|
9
|
+
context 'EducationVerification class' do
|
10
|
+
should 'be retrieveable' do
|
11
|
+
id = "education_verification_id"
|
12
|
+
@mock.expects(:get).once.with("#{@education_verification_url}/#{id}", anything, anything)
|
13
|
+
.returns(test_response(test_education_verification))
|
14
|
+
education_verification = EducationVerification.retrieve(id)
|
15
|
+
assert(education_verification.is_a?(EducationVerification))
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
context 'EducationVerification instance' do
|
20
|
+
should 'be refreshable' do
|
21
|
+
@mock.expects(:get).once
|
22
|
+
.with("#{@education_verification_url}/#{test_education_verification[:id]}",
|
23
|
+
anything, anything)
|
24
|
+
.returns(test_response(test_education_verification))
|
25
|
+
education_verification = EducationVerification.new(test_education_verification[:id])
|
26
|
+
education_verification.refresh
|
27
|
+
assert_equal(test_education_verification[:status], education_verification.status)
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
|
32
|
+
context 'Retrieved EducationVerification instance' do
|
33
|
+
setup do
|
34
|
+
@mock.expects(:get).once.returns(test_response(test_education_verification))
|
35
|
+
@education_verification = EducationVerification.retrieve('education_verification_id')
|
36
|
+
end
|
37
|
+
|
38
|
+
should 'have the id attribute' do
|
39
|
+
assert_equal(test_education_verification[:id], @education_verification.id)
|
40
|
+
end
|
41
|
+
|
42
|
+
should 'have the object attribute' do
|
43
|
+
assert_equal(test_education_verification[:object], @education_verification.object)
|
44
|
+
end
|
45
|
+
|
46
|
+
should 'have the uri attribute' do
|
47
|
+
assert_equal(test_education_verification[:uri], @education_verification.uri)
|
48
|
+
end
|
49
|
+
|
50
|
+
should 'have the status attribute' do
|
51
|
+
assert_equal(test_education_verification[:status], @education_verification.status)
|
52
|
+
end
|
53
|
+
|
54
|
+
should 'have the created_at attribute' do
|
55
|
+
assert_equal(test_education_verification[:created_at],
|
56
|
+
@education_verification.created_at)
|
57
|
+
end
|
58
|
+
|
59
|
+
should 'have the completed_at attribute' do
|
60
|
+
assert_equal(test_education_verification[:completed_at],
|
61
|
+
@education_verification.completed_at)
|
62
|
+
end
|
63
|
+
|
64
|
+
should 'have the turnaround_time attribute' do
|
65
|
+
assert_equal(test_education_verification[:turnaround_time],
|
66
|
+
@education_verification.turnaround_time)
|
67
|
+
end
|
68
|
+
|
69
|
+
should 'have the records attribute' do
|
70
|
+
assert_equal(test_education_verification[:records], @education_verification.records)
|
71
|
+
end
|
72
|
+
|
73
|
+
end
|
74
|
+
|
75
|
+
should 'be registered' do
|
76
|
+
assert(APIClass.subclasses.include?(EducationVerification))
|
77
|
+
assert_equal(EducationVerification, APIClass.subclass_fetch("education_verification"))
|
78
|
+
end
|
79
|
+
|
80
|
+
end
|
81
|
+
end
|
data/test/test_data.rb
CHANGED
@@ -511,6 +511,17 @@ module Checkr
|
|
511
511
|
}
|
512
512
|
end
|
513
513
|
|
514
|
+
def test_education_verification
|
515
|
+
{:id => "5af5e030d24297006cce1e06",
|
516
|
+
:object => "education_verification",
|
517
|
+
:uri => "/v1/education_verifications/5af5e030d24297006cce1e06",
|
518
|
+
:status => "consider",
|
519
|
+
:created_at => "2018-05-11T18:25:52Z",
|
520
|
+
:completed_at => "2018-05-11T18:26:04Z",
|
521
|
+
:turnaround_time => 12,
|
522
|
+
:records => []}
|
523
|
+
end
|
524
|
+
|
514
525
|
# Errors
|
515
526
|
def test_api_error
|
516
527
|
{
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: checkr-official
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.5.
|
4
|
+
version: 1.5.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
-
|
7
|
+
- Checkr Engineering Team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-05-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rest-client
|
@@ -122,10 +122,10 @@ dependencies:
|
|
122
122
|
- - ">="
|
123
123
|
- !ruby/object:Gem::Version
|
124
124
|
version: '0'
|
125
|
-
description: Checkr -
|
125
|
+
description: Checkr - Background check platform for the New World of Work. See https://docs.checkr.com
|
126
126
|
for details.
|
127
127
|
email:
|
128
|
-
-
|
128
|
+
- eng@checkr.com
|
129
129
|
executables:
|
130
130
|
- checkr-console
|
131
131
|
extensions: []
|
@@ -136,6 +136,7 @@ files:
|
|
136
136
|
- ".travis.yml"
|
137
137
|
- Changelog.md
|
138
138
|
- Gemfile
|
139
|
+
- LICENSE
|
139
140
|
- README.md
|
140
141
|
- Rakefile
|
141
142
|
- bin/checkr-console
|
@@ -149,6 +150,7 @@ files:
|
|
149
150
|
- lib/checkr/county_criminal_search.rb
|
150
151
|
- lib/checkr/document.rb
|
151
152
|
- lib/checkr/document_list.rb
|
153
|
+
- lib/checkr/education_verification.rb
|
152
154
|
- lib/checkr/errors/api_connection_error.rb
|
153
155
|
- lib/checkr/errors/api_error.rb
|
154
156
|
- lib/checkr/errors/authentication_error.rb
|
@@ -197,6 +199,7 @@ files:
|
|
197
199
|
- test/checkr/county_criminal_search_test.rb
|
198
200
|
- test/checkr/document_list_test.rb
|
199
201
|
- test/checkr/document_test.rb
|
202
|
+
- test/checkr/education_verification_test.rb
|
200
203
|
- test/checkr/eviction_search_test.rb
|
201
204
|
- test/checkr/federal_civil_search_test.rb
|
202
205
|
- test/checkr/federal_criminal_search_test.rb
|
@@ -219,7 +222,8 @@ files:
|
|
219
222
|
- test/test_data.rb
|
220
223
|
- test/test_helper.rb
|
221
224
|
homepage: https://checkr.com/
|
222
|
-
licenses:
|
225
|
+
licenses:
|
226
|
+
- Apache-2.0
|
223
227
|
metadata: {}
|
224
228
|
post_install_message:
|
225
229
|
rdoc_options: []
|
@@ -237,7 +241,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
237
241
|
version: '0'
|
238
242
|
requirements: []
|
239
243
|
rubyforge_project:
|
240
|
-
rubygems_version: 2.
|
244
|
+
rubygems_version: 2.6.11
|
241
245
|
signing_key:
|
242
246
|
specification_version: 4
|
243
247
|
summary: Ruby bindings for Checkr API
|
@@ -251,6 +255,7 @@ test_files:
|
|
251
255
|
- test/checkr/county_criminal_search_test.rb
|
252
256
|
- test/checkr/document_list_test.rb
|
253
257
|
- test/checkr/document_test.rb
|
258
|
+
- test/checkr/education_verification_test.rb
|
254
259
|
- test/checkr/eviction_search_test.rb
|
255
260
|
- test/checkr/federal_civil_search_test.rb
|
256
261
|
- test/checkr/federal_criminal_search_test.rb
|