greenhouse_io-gitlab 2.5.5 → 2.5.6

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
  SHA256:
3
- metadata.gz: d3764248eccefc12f20c19068e1445052683a1441ba48f1c310a8111dc928b8f
4
- data.tar.gz: 99ac41ebba818e8f0a37b64dc4b2d8c23bc716fe2d99d0e16fddbf06a3d54273
3
+ metadata.gz: ffad7d5d1ccee961e66630d593e590a3165fb9b24cf42c67e5a3755552dc6088
4
+ data.tar.gz: 3c868a257c3842d7901a625741ead3e2a5190b28f59139866fdb3358a788bf9c
5
5
  SHA512:
6
- metadata.gz: a62284bdf1c6ee4f7bb8a175f68e59d5efbc295cdbd4d0a89603e366f0915f173dd92098199d418b06f2062fc4fbf74c157e6b95c0e5b428f2dd82c01c830aa5
7
- data.tar.gz: 47af15029f8d92d5e1c0ea6fa5e243e9e638efad1a6aea25841d1a64560bcd639eac1b68f95798ef7e90be44d006333e81518445b7474b6b73fb050c141201c3
6
+ metadata.gz: eaba6f630f8d0948aa4657b3810c504f2ce1eb212979f794bd771cb784764992536dbe21aacf1460ef725c39326143d2dc5a2aa8e0462e54446b03aedb3883f4
7
+ data.tar.gz: f213ef837d7abb67c4c89a0a508f0ce4e8205af71627e388cb3a52252020236b9b1e0e54a16d5ff6a2fdd049ed3b7ae29a701d516ed021b9e6917f5716775035
@@ -3,9 +3,12 @@ require 'rest-client'
3
3
  module GreenhouseIo
4
4
  module API
5
5
  def get_response(url, options)
6
- credential = Base64.strict_encode64(self.api_token + ':')
7
- headers = { "Authorization" => "Basic " + credential }
8
- headers.merge!({ params: options })
6
+ headers = {}
7
+ if self.api_token
8
+ credential = Base64.strict_encode64(self.api_token + ':')
9
+ headers = { "Authorization" => "Basic " + credential }
10
+ end
11
+ headers.merge!({ params: options }) unless options.empty?
9
12
  RestClient.get(url, headers)
10
13
  end
11
14
 
@@ -10,31 +10,31 @@ module GreenhouseIo
10
10
  end
11
11
 
12
12
  def offices(options = {})
13
- get_from_job_board_api("/boards/#{ query_organization(options) }/embed/offices")
13
+ get_from_job_board_api("#{BASE_URL}/boards/#{ query_organization(options) }/embed/offices")
14
14
  end
15
15
 
16
16
  def office(id, options = {})
17
- get_from_job_board_api("/boards/#{ query_organization(options) }/embed/office", query: { id: id })
17
+ get_from_job_board_api("#{BASE_URL}/boards/#{ query_organization(options) }/embed/office", { id: id })
18
18
  end
19
19
 
20
20
  def departments(options = {})
21
- get_from_job_board_api("/boards/#{ query_organization(options) }/embed/departments")
21
+ get_from_job_board_api("#{BASE_URL}/boards/#{ query_organization(options) }/embed/departments")
22
22
  end
23
23
 
24
24
  def department(id, options = {})
25
- get_from_job_board_api("/boards/#{ query_organization(options) }/embed/department", query: { id: id })
25
+ get_from_job_board_api("#{BASE_URL}/boards/#{ query_organization(options) }/embed/department", { id: id })
26
26
  end
27
27
 
28
28
  def jobs(options = {})
29
- get_from_job_board_api("/boards/#{ query_organization(options) }/embed/jobs", query: { content: options[:content] })
29
+ get_from_job_board_api("#{BASE_URL}/boards/#{ query_organization(options) }/embed/jobs", { content: options[:content] })
30
30
  end
31
31
 
32
32
  def job(id, options = {})
33
- get_from_job_board_api("/boards/#{ query_organization(options) }/embed/job", query: { id: id, questions: options[:questions] })
33
+ get_from_job_board_api("#{BASE_URL}/boards/#{ query_organization(options) }/embed/job", { id: id, questions: options[:questions] })
34
34
  end
35
35
 
36
36
  def apply_to_job(job_form_hash)
37
- post_to_job_board_api('/applications', { :body => job_form_hash, :basic_auth => basic_auth })
37
+ post_to_job_board_api("#{BASE_URL}/applications", { :body => job_form_hash, :basic_auth => basic_auth })
38
38
  end
39
39
 
40
40
  private
@@ -1,3 +1,3 @@
1
1
  module GreenhouseIo
2
- VERSION = "2.5.5"
2
+ VERSION = "2.5.6"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: greenhouse_io-gitlab
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.5.5
4
+ version: 2.5.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Greenhouse Software