clinch-talent 0.2.1 → 0.2.2
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.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/Gemfile.lock +1 -1
- data/clinch-talent.gemspec +1 -1
- data/lib/clinch_talent.rb +1 -0
- data/lib/clinch_talent/job_department.rb +5 -0
- data/test/clinch_talent/candidate_test.rb +46 -48
- data/test/clinch_talent/job_department_test.rb +20 -0
- metadata +5 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b9c3819d6e08575fd1ec7435051ad6f550a5ad845889e7227b7afa0ac0c9096e
|
|
4
|
+
data.tar.gz: e41c5379774318f32a6541cd468fc49d7fea4ac455b7a3e4512aa8221ab08955
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 664999636ba42e68ec81db9860ac86a6049d6b96f3541ec8a3279907340955557f31f50b464f6f37cddaeb1004a41239375a05e6e35d4ce9aa3637949e204fdc
|
|
7
|
+
data.tar.gz: a24ddeee7f89986f3c836e4a6e457ab8191cde3bf1236f0976e5dd5b6683ac731e49c76ed78dd3457a159a767a608417bedaac5e1467d4e9b8f8ab15ecc3abeb
|
data/.gitignore
CHANGED
data/Gemfile.lock
CHANGED
data/clinch-talent.gemspec
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Gem::Specification.new do |s|
|
|
2
2
|
s.name = 'clinch-talent'
|
|
3
|
-
s.version = '0.2.
|
|
3
|
+
s.version = '0.2.2'
|
|
4
4
|
s.summary = 'A ruby client for the Clinch Talent API'
|
|
5
5
|
s.description = 'A ruby client for the Clinch Talent API. Requests are HMAC signed. Responses are in JSON API format (https://jsonapi.org). See https://support.clinchtalent.com/article/77-getting-started'
|
|
6
6
|
s.authors = ['Damien Glancy', 'Steve Quinlan']
|
data/lib/clinch_talent.rb
CHANGED
|
@@ -1,57 +1,55 @@
|
|
|
1
1
|
require_relative '../test_helper'
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
end
|
|
8
|
-
|
|
9
|
-
def test_get_signing
|
|
10
|
-
stub_request(:get, 'https://api.clinchtalent.com/v1/candidates').
|
|
11
|
-
with(:headers => {'Accept' => 'application/vnd.api+json',
|
|
12
|
-
'Accept-Encoding' => 'gzip;q=1.0,deflate;q=0.6,identity;q=0.3',
|
|
13
|
-
'Authorization' => 'APIAuth access_id:BNBb+1TD1ZW2v2KInKm0EtDCrdg=',
|
|
14
|
-
'Content-Md5' => '1B2M2Y8AsgTpgAmY7PhCfg==',
|
|
15
|
-
'Content-Type' => 'application/vnd.api+json',
|
|
16
|
-
'Date' => 'Wed, 01 Jan 2014 01:01:01 GMT',
|
|
17
|
-
'User-Agent' => 'Faraday v0.15.2'})
|
|
18
|
-
ClinchTalent::Base.config('access_id', 'secret')
|
|
19
|
-
ClinchTalent::Candidate.all
|
|
20
|
-
end
|
|
3
|
+
class ClinchTalent::CandidateTest < Minitest::Test
|
|
4
|
+
def setup
|
|
5
|
+
Time.stubs(:now).returns(Time.new(2014, 01, 01, 01, 01, 01))
|
|
6
|
+
end
|
|
21
7
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
}).
|
|
35
|
-
to_return(status: 200, body: "", headers: {})
|
|
8
|
+
def test_get_signing
|
|
9
|
+
stub_request(:get, 'https://api.clinchtalent.com/v1/candidates').
|
|
10
|
+
with(:headers => {'Accept' => 'application/vnd.api+json',
|
|
11
|
+
'Accept-Encoding' => 'gzip;q=1.0,deflate;q=0.6,identity;q=0.3',
|
|
12
|
+
'Authorization' => 'APIAuth access_id:BNBb+1TD1ZW2v2KInKm0EtDCrdg=',
|
|
13
|
+
'Content-Md5' => '1B2M2Y8AsgTpgAmY7PhCfg==',
|
|
14
|
+
'Content-Type' => 'application/vnd.api+json',
|
|
15
|
+
'Date' => 'Wed, 01 Jan 2014 01:01:01 GMT',
|
|
16
|
+
'User-Agent' => 'Faraday v0.15.2'})
|
|
17
|
+
ClinchTalent::Base.config('access_id', 'secret')
|
|
18
|
+
ClinchTalent::Candidate.all
|
|
19
|
+
end
|
|
36
20
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
21
|
+
def test_post_signing
|
|
22
|
+
stub_request(:post, "https://api.clinchtalent.com/v1/candidates").
|
|
23
|
+
with(
|
|
24
|
+
body: "{\"data\":{\"type\":\"candidates\",\"attributes\":{\"first_name\":\"Steve\",\"last_name\":\"Jobs\",\"email\":\"steve.jobs@example.com\"}}}",
|
|
25
|
+
headers: {
|
|
26
|
+
'Accept' => 'application/vnd.api+json',
|
|
27
|
+
'Accept-Encoding' => 'gzip;q=1.0,deflate;q=0.6,identity;q=0.3',
|
|
28
|
+
'Authorization' => 'APIAuth access_id:GpqVWbyL6re9hA4PVFciK9JGXtE=',
|
|
29
|
+
'Content-Md5' => 'BHelHgS90QHICtQEYCK1CA==',
|
|
30
|
+
'Content-Type' => 'application/vnd.api+json',
|
|
31
|
+
'Date' => 'Wed, 01 Jan 2014 01:01:01 GMT',
|
|
32
|
+
'User-Agent' => 'Faraday v0.15.2'
|
|
33
|
+
}).
|
|
34
|
+
to_return(status: 200, body: "", headers: {})
|
|
40
35
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
:headers => {'Accept'=>'application/vnd.api+json', 'Accept-Encoding'=>'gzip;q=1.0,deflate;q=0.6,identity;q=0.3',
|
|
45
|
-
'Authorization'=>'APIAuth access_id:P9RDanGcxbHK/aWLPC/T6Eitplc=',
|
|
46
|
-
'Content-Md5'=>'hy9ALXrYXtG7YZXuVdXzjA==',
|
|
47
|
-
'Content-Type'=>'application/vnd.api+json',
|
|
48
|
-
'Date'=>'Wed, 01 Jan 2014 01:01:01 GMT',
|
|
49
|
-
'User-Agent'=>'Faraday v0.15.2'}).
|
|
50
|
-
to_return(:status => 200, :body => "", :headers => {})
|
|
36
|
+
ClinchTalent::Base.config('access_id', 'secret')
|
|
37
|
+
ClinchTalent::Candidate.create("first_name": "Steve", "last_name": "Jobs", "email": "steve.jobs@example.com")
|
|
38
|
+
end
|
|
51
39
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
40
|
+
def test_post_signing_no_body
|
|
41
|
+
stub_request(:post, "https://api.clinchtalent.com/v1/candidates").
|
|
42
|
+
with(:body => "{\"data\":{\"type\":\"candidates\",\"attributes\":{}}}",
|
|
43
|
+
:headers => {'Accept' => 'application/vnd.api+json', 'Accept-Encoding' => 'gzip;q=1.0,deflate;q=0.6,identity;q=0.3',
|
|
44
|
+
'Authorization' => 'APIAuth access_id:P9RDanGcxbHK/aWLPC/T6Eitplc=',
|
|
45
|
+
'Content-Md5' => 'hy9ALXrYXtG7YZXuVdXzjA==',
|
|
46
|
+
'Content-Type' => 'application/vnd.api+json',
|
|
47
|
+
'Date' => 'Wed, 01 Jan 2014 01:01:01 GMT',
|
|
48
|
+
'User-Agent' => 'Faraday v0.15.2'}).
|
|
49
|
+
to_return(:status => 200, :body => "", :headers => {})
|
|
55
50
|
|
|
51
|
+
ClinchTalent::Base.config('access_id', 'secret')
|
|
52
|
+
ClinchTalent::Candidate.create
|
|
56
53
|
end
|
|
54
|
+
|
|
57
55
|
end
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
require_relative '../test_helper'
|
|
2
|
+
|
|
3
|
+
class ClinchTalent::JobDepartmentTest < Minitest::Test
|
|
4
|
+
def setup
|
|
5
|
+
Time.stubs(:now).returns(Time.new(2014, 01, 01, 01, 01, 01))
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
def test_get_signing
|
|
9
|
+
stub_request(:get, 'https://api.clinchtalent.com/v1/job_departments').
|
|
10
|
+
with(:headers => {'Accept' => 'application/vnd.api+json',
|
|
11
|
+
'Accept-Encoding' => 'gzip;q=1.0,deflate;q=0.6,identity;q=0.3',
|
|
12
|
+
'Authorization' => 'APIAuth access_id:a6qLnFKzp9cObEdcXmKw5zOtLRU=',
|
|
13
|
+
'Content-Md5' => '1B2M2Y8AsgTpgAmY7PhCfg==',
|
|
14
|
+
'Content-Type' => 'application/vnd.api+json',
|
|
15
|
+
'Date' => 'Wed, 01 Jan 2014 01:01:01 GMT',
|
|
16
|
+
'User-Agent' => 'Faraday v0.15.2'})
|
|
17
|
+
ClinchTalent::Base.config('access_id', 'secret')
|
|
18
|
+
ClinchTalent::JobDepartment.all
|
|
19
|
+
end
|
|
20
|
+
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: clinch-talent
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Damien Glancy
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2018-06-
|
|
12
|
+
date: 2018-06-28 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: json_api_client
|
|
@@ -72,7 +72,9 @@ files:
|
|
|
72
72
|
- lib/clinch_talent/base.rb
|
|
73
73
|
- lib/clinch_talent/candidate.rb
|
|
74
74
|
- lib/clinch_talent/hmac_signing_middleware.rb
|
|
75
|
+
- lib/clinch_talent/job_department.rb
|
|
75
76
|
- test/clinch_talent/candidate_test.rb
|
|
77
|
+
- test/clinch_talent/job_department_test.rb
|
|
76
78
|
- test/test_helper.rb
|
|
77
79
|
homepage: http://rubygems.org/gems/clinch-talent
|
|
78
80
|
licenses:
|
|
@@ -100,4 +102,5 @@ specification_version: 4
|
|
|
100
102
|
summary: A ruby client for the Clinch Talent API
|
|
101
103
|
test_files:
|
|
102
104
|
- test/clinch_talent/candidate_test.rb
|
|
105
|
+
- test/clinch_talent/job_department_test.rb
|
|
103
106
|
- test/test_helper.rb
|