greenhouse_io 2.4.0 → 2.5.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: f943bd5a8beb683ca3d3e7093ab0da59b92dc080
4
- data.tar.gz: 61b72fbb33e6b07ff1182b73899820bbac253551
2
+ SHA256:
3
+ metadata.gz: 1048ec2b1e36efb4eac95d7f876c1fdcfd7072f88b6ac3b0e0286ed4eff52367
4
+ data.tar.gz: f3218f98249657bcdccecac18dd5c2f2188598d32a7e2dedcb589aea3906246e
5
5
  SHA512:
6
- metadata.gz: 1a60fbbbc126b6972486f2acbbae28ae86aa8b7d2ad4f16b281941279c239be64116b983e44d836a3ab6243b7df49685219bd8d2f2c958b55f7edcaa8f16cca0
7
- data.tar.gz: 998ddf413dc68f561770df31e79211bd384f0219b3e87270cb5f5920bce64b4e400fb0565373ec2aa6dc29824dba43f7dfa639df0f286fa28d5c57b766d61b2b
6
+ metadata.gz: 954f3b49ae51190b56c1b727e901473cb79f4f1ae486a43c432675ff4165d10e1eba689e3dfedd48f74728ac1c073595cf266e1ebe33f32eb1c0df3f326e80f8
7
+ data.tar.gz: ff03142502defd7c3a8a5d6035e56cbac3ed96efc8eef5b852677e53c16d19bd8949469a76dcdfe9069e1486383fafbedbf518285718264d5389487c7aa83768
data/.gitignore CHANGED
@@ -16,4 +16,4 @@ tmp
16
16
  .ruby-*
17
17
  *.swp
18
18
  *.un~
19
- tags
19
+ .tags
data/CHANGES.md CHANGED
@@ -2,8 +2,24 @@
2
2
 
3
3
  This project follows [semantic versioning](http://semver.org/). This changelog follows suggestions from [keepachangelog.com](http://keepachangelog.com/).
4
4
 
5
+ ## Version 2.5.1
6
+ Released 2026-01-21.
7
+
8
+ #### Added
9
+ - Post-install message directing users to directly source the gem from the [Github public repository](https://github.com/grnhse/greenhouse_io).
10
+ - Notice for decomissioning of Harvest V1/V2, August 2026.
11
+
12
+ #### Added
13
+ - Added methods for retrieving offers for an application: `current_offer_for_application` and `offers_for_application`
14
+
15
+ ## Version 2.5.0
16
+ Released 2016-05-31. Contributed by [@theshanx](https://github.com/theshanx). Thanks! :)
17
+
18
+ #### Added
19
+ - Added methods for retrieving offers for an application: `current_offer_for_application` and `offers_for_application`
20
+
5
21
  ## Version 2.4.0
6
- Released 2016-04-20.
22
+ Released 2016-04-20. Contributed by [@mariochavez](https://github.com/mariochavez) -- thank you!
7
23
 
8
24
  #### Added
9
25
  - Exposed `link` HTTP header in `GreenhouseIo::Client`.
@@ -32,4 +48,4 @@ Released 2016-02-03.
32
48
 
33
49
  ##### Changed
34
50
  - Upgraded dependencies: `multi_json` (now ~>1.11.2), and development gems
35
- - Added version dependency for `httmultiparty`: ``'~> 0.3.16'``
51
+ - Added version dependency for `httmultiparty`: ``'~> 0.3.16'``
data/README.md CHANGED
@@ -183,6 +183,8 @@ Methods for which an `id` is **required**:
183
183
  * `activity_feed` *(requires a candidate ID)*
184
184
  * `scorecards` *(requires an application ID)*
185
185
  * `scheduled_interviews` *(requires an application ID)*
186
+ * `offers_for_application` *(requires an application ID)*
187
+ * `current_offer_for_application` *(requires an application ID)*
186
188
  * `stages` *(requires a job ID)*
187
189
  * `job_post` *(requires a job ID)*
188
190
  * `create_candidate_note` *(requires a candidate ID)*
@@ -6,13 +6,22 @@ require 'greenhouse_io/version'
6
6
  Gem::Specification.new do |spec|
7
7
  spec.name = "greenhouse_io"
8
8
  spec.version = GreenhouseIo::VERSION
9
- spec.authors = ["Greenhouse Software", "Adrian Bautista"]
10
- spec.email = ["support@greenhouse.io", "adrianbautista8@gmail.com"]
9
+ spec.authors = %w(Greenhouse Software)
10
+ spec.email = %w(tech@greenhouse.io)
11
11
  spec.description = %q{Ruby bindings for the greenhouse.io Harvest API and Job Board API}
12
12
  spec.summary = %q{Ruby bindings for the greenhouse.io Harvest API and Job Board API}
13
13
  spec.license = "MIT"
14
14
  spec.homepage = "https://github.com/grnhse/greenhouse_io"
15
15
 
16
+ spec.post_install_message = %q{
17
+ greenhouse_io will be removed from Rubygems.org on Friday, April 3, 2026.
18
+ Please install using a direct link to the Github repo:
19
+
20
+ gem "greenhouse_io", git: "git@github.com:grnhse/greenhouse_io.git", branch: "master"
21
+
22
+ Additionally, Harvest V1/V2 will be decomissioned in August 2026.
23
+ }
24
+
16
25
  spec.files = `git ls-files`.split($/)
17
26
  spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
27
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
@@ -44,6 +44,14 @@ module GreenhouseIo
44
44
  get_from_harvest_api "/applications#{path_id(id)}", options
45
45
  end
46
46
 
47
+ def offers_for_application(id, options = {})
48
+ get_from_harvest_api "/applications/#{id}/offers", options
49
+ end
50
+
51
+ def current_offer_for_application(id, options = {})
52
+ get_from_harvest_api "/applications/#{id}/offers/current_offer", options
53
+ end
54
+
47
55
  def scorecards(id, options = {})
48
56
  get_from_harvest_api "/applications/#{id}/scorecards", options
49
57
  end
@@ -3,7 +3,7 @@ module GreenhouseIo
3
3
  include HTTMultiParty
4
4
  include GreenhouseIo::API
5
5
  attr_accessor :api_token, :organization
6
- base_uri 'https://api.greenhouse.io/v1'
6
+ base_uri 'https://boards-api.greenhouse.io/v1'
7
7
 
8
8
  def initialize(api_token = nil, default_options = {})
9
9
  @api_token = api_token || GreenhouseIo.configuration.api_token
@@ -1,3 +1,3 @@
1
1
  module GreenhouseIo
2
- VERSION = "2.4.0"
2
+ VERSION = "2.5.1"
3
3
  end
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: post
5
- uri: https://123FakeToken:@api.greenhouse.io/v1/applications
5
+ uri: https://123FakeToken:@boards-api.greenhouse.io/v1/applications
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: id=721&first_name=Richard&last_name=Feynman&email=richard123%40test.ga.co
@@ -0,0 +1,40 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://123FakeToken:@harvest.greenhouse.io/v1/applications/123/offers/current_offer
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, 31 May 2016 19:48:29 GMT
21
+ Status:
22
+ - 200 OK
23
+ Content-Type:
24
+ - application/json;charset=utf-8
25
+ Content-Length:
26
+ - '416'
27
+ X-Ratelimit-Limit:
28
+ - '40'
29
+ X-Ratelimit-Remaining:
30
+ - '39'
31
+ X-Content-Type-Options:
32
+ - nosniff
33
+ Via:
34
+ - 1.1 vegur
35
+ body:
36
+ encoding: UTF-8
37
+ string: '{"id":320847,"version":1,"application_id":123,"created_at":"2016-05-31T19:38:43.623Z","updated_at":"2016-05-31T19:38:56.024Z","sent_at":null,"resolved_at":"2016-05-31T19:38:56.024Z","starts_at":"2016-05-31","status":"accepted","custom_fields":{"benefits":null,"bonus":"1000","current_salary":null,"employment_type":"Full-time","notes":null,"options":"2000","salary":"74111","source_cost":null,"visa_cost":null}}'
38
+ http_version:
39
+ recorded_at: Tue, 31 May 2016 19:48:32 GMT
40
+ recorded_with: VCR 3.0.1
@@ -0,0 +1,40 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://123FakeToken:@harvest.greenhouse.io/v1/applications/123/offers
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, 31 May 2016 19:39:19 GMT
21
+ Status:
22
+ - 200 OK
23
+ Content-Type:
24
+ - application/json;charset=utf-8
25
+ Content-Length:
26
+ - '418'
27
+ X-Ratelimit-Limit:
28
+ - '40'
29
+ X-Ratelimit-Remaining:
30
+ - '39'
31
+ X-Content-Type-Options:
32
+ - nosniff
33
+ Via:
34
+ - 1.1 vegur
35
+ body:
36
+ encoding: UTF-8
37
+ string: '[{"id":320847,"version":1,"application_id":123,"created_at":"2016-05-31T19:38:43.623Z","updated_at":"2016-05-31T19:38:56.024Z","sent_at":null,"resolved_at":"2016-05-31T19:38:56.024Z","starts_at":"2016-05-31","status":"accepted","custom_fields":{"benefits":null,"bonus":"1000","current_salary":null,"employment_type":"Full-time","notes":null,"options":"2000","salary":"74111","source_cost":null,"visa_cost":null}}]'
38
+ http_version:
39
+ recorded_at: Tue, 31 May 2016 19:39:22 GMT
40
+ recorded_with: VCR 3.0.1
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: https://api.greenhouse.io/v1/boards/generalassembly/embed/department?id=187
5
+ uri: https://boards-api.greenhouse.io/v1/boards/generalassembly/embed/department?id=187
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: https://api.greenhouse.io/v1/boards/generalassembly/embed/departments
5
+ uri: https://boards-api.greenhouse.io/v1/boards/generalassembly/embed/departments
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: post
5
- uri: https://123FakeToken:@api.greenhouse.io/v1/applications
5
+ uri: https://123FakeToken:@boards-api.greenhouse.io/v1/applications
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: id=721&question_2720=not_required
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: post
5
- uri: https://123FakeToken:@api.greenhouse.io/v1/applications
5
+ uri: https://123FakeToken:@boards-api.greenhouse.io/v1/applications
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: id=456&first_name=Gob&last_name=Bluth&email=gob%40bluth.com
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: https://api.greenhouse.io/v1/boards/generalassembly/embed/job?id=123&questions=
5
+ uri: https://boards-api.greenhouse.io/v1/boards/generalassembly/embed/job?id=123&questions=
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: https://api.greenhouse.io/v1/boards/not-real-inc/embed/offices
5
+ uri: https://boards-api.greenhouse.io/v1/boards/not-real-inc/embed/offices
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: https://api.greenhouse.io/v1/boards/generalassembly/embed/job?id=721&questions=
5
+ uri: https://boards-api.greenhouse.io/v1/boards/generalassembly/embed/job?id=721&questions=
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: https://api.greenhouse.io/v1/boards/generalassembly/embed/job?id=721&questions=true
5
+ uri: https://boards-api.greenhouse.io/v1/boards/generalassembly/embed/job?id=721&questions=true
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: https://api.greenhouse.io/v1/boards/generalassembly/embed/jobs?content=
5
+ uri: https://boards-api.greenhouse.io/v1/boards/generalassembly/embed/jobs?content=
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: https://api.greenhouse.io/v1/boards/generalassembly/embed/jobs?content=true
5
+ uri: https://boards-api.greenhouse.io/v1/boards/generalassembly/embed/jobs?content=true
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: https://api.greenhouse.io/v1/boards/generalassembly/embed/office?id=0
5
+ uri: https://boards-api.greenhouse.io/v1/boards/generalassembly/embed/office?id=0
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: https://api.greenhouse.io/v1/boards/generalassembly/embed/offices
5
+ uri: https://boards-api.greenhouse.io/v1/boards/generalassembly/embed/offices
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
@@ -634,5 +634,46 @@ describe GreenhouseIo::Client do
634
634
  end
635
635
  end
636
636
  end
637
+
638
+ describe "#offers_for_application" do
639
+ before do
640
+ VCR.use_cassette('client/offers_for_application') do
641
+ @offers = @client.offers_for_application(123)
642
+ end
643
+ end
644
+
645
+ it "returns a response" do
646
+ expect(@offers).to_not be_nil
647
+ end
648
+
649
+ it "returns an array of offers" do
650
+ expect(@offers).to be_an_instance_of(Array)
651
+
652
+ return unless @offers.size > 0
653
+ expect(@offers.first).to have_key(:application_id)
654
+ expect(@offers.first).to have_key(:version)
655
+ expect(@offers.first).to have_key(:status)
656
+ end
657
+ end
658
+
659
+ describe "#current_offer_for_application" do
660
+ before do
661
+ VCR.use_cassette('client/current_offer_for_application') do
662
+ @offer = @client.current_offer_for_application(123)
663
+ end
664
+ end
665
+
666
+ it "returns a response" do
667
+ expect(@offer).to_not be_nil
668
+ end
669
+
670
+ it "returns an offer object" do
671
+ expect(@offer).to be_an_instance_of(Hash)
672
+ expect(@offer[:id]).to be_a(Integer).and be > 0
673
+ expect(@offer[:created_at]).to be_a(String)
674
+ expect(@offer[:version]).to be_a(Integer).and be > 0
675
+ expect(@offer[:status]).to be_a(String)
676
+ end
677
+ end
637
678
  end
638
679
  end
@@ -3,7 +3,7 @@ require 'spec_helper'
3
3
  describe GreenhouseIo::JobBoard do
4
4
 
5
5
  it "should have a base url for an API endpoint" do
6
- expect(GreenhouseIo::JobBoard.base_uri).to eq("https://api.greenhouse.io/v1")
6
+ expect(GreenhouseIo::JobBoard.base_uri).to eq("https://boards-api.greenhouse.io/v1")
7
7
  end
8
8
 
9
9
  context "given an instance of GreenhouseIo::JobBoard" do
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: greenhouse_io
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.4.0
4
+ version: 2.5.1
5
5
  platform: ruby
6
6
  authors:
7
- - Greenhouse Software
8
- - Adrian Bautista
9
- autorequire:
7
+ - Greenhouse
8
+ - Software
9
+ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2016-04-20 00:00:00.000000000 Z
12
+ date: 2026-01-21 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: httmultiparty
@@ -97,8 +97,7 @@ dependencies:
97
97
  version: 3.0.1
98
98
  description: Ruby bindings for the greenhouse.io Harvest API and Job Board API
99
99
  email:
100
- - support@greenhouse.io
101
- - adrianbautista8@gmail.com
100
+ - tech@greenhouse.io
102
101
  executables: []
103
102
  extensions: []
104
103
  extra_rdoc_files: []
@@ -131,6 +130,7 @@ files:
131
130
  - spec/fixtures/cassettes/client/create_candidate_note_invalid_missing_field.yml
132
131
  - spec/fixtures/cassettes/client/create_candidate_note_invalid_on_behalf_of.yml
133
132
  - spec/fixtures/cassettes/client/create_candidate_note_invalid_user_id.yml
133
+ - spec/fixtures/cassettes/client/current_offer_for_application.yml
134
134
  - spec/fixtures/cassettes/client/department.yml
135
135
  - spec/fixtures/cassettes/client/departments.yml
136
136
  - spec/fixtures/cassettes/client/headers.yml
@@ -139,6 +139,7 @@ files:
139
139
  - spec/fixtures/cassettes/client/jobs.yml
140
140
  - spec/fixtures/cassettes/client/offer.yml
141
141
  - spec/fixtures/cassettes/client/offers.yml
142
+ - spec/fixtures/cassettes/client/offers_for_application.yml
142
143
  - spec/fixtures/cassettes/client/office.yml
143
144
  - spec/fixtures/cassettes/client/offices.yml
144
145
  - spec/fixtures/cassettes/client/scheduled_interviews.yml
@@ -169,7 +170,11 @@ homepage: https://github.com/grnhse/greenhouse_io
169
170
  licenses:
170
171
  - MIT
171
172
  metadata: {}
172
- post_install_message:
173
+ post_install_message: "\n greenhouse_io will be removed from Rubygems.org on Friday,
174
+ April 3, 2026.\n Please install using a direct link to the Github repo:\n \n
175
+ \ gem \"greenhouse_io\", git: \"git@github.com:grnhse/greenhouse_io.git\", branch:
176
+ \"master\"\n\n Additionally, Harvest V1/V2 will be decomissioned in August 2026.\n
177
+ \ "
173
178
  rdoc_options: []
174
179
  require_paths:
175
180
  - lib
@@ -184,9 +189,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
184
189
  - !ruby/object:Gem::Version
185
190
  version: '0'
186
191
  requirements: []
187
- rubyforge_project:
188
- rubygems_version: 2.4.8
189
- signing_key:
192
+ rubygems_version: 3.3.26
193
+ signing_key:
190
194
  specification_version: 4
191
195
  summary: Ruby bindings for the greenhouse.io Harvest API and Job Board API
192
196
  test_files:
@@ -203,6 +207,7 @@ test_files:
203
207
  - spec/fixtures/cassettes/client/create_candidate_note_invalid_missing_field.yml
204
208
  - spec/fixtures/cassettes/client/create_candidate_note_invalid_on_behalf_of.yml
205
209
  - spec/fixtures/cassettes/client/create_candidate_note_invalid_user_id.yml
210
+ - spec/fixtures/cassettes/client/current_offer_for_application.yml
206
211
  - spec/fixtures/cassettes/client/department.yml
207
212
  - spec/fixtures/cassettes/client/departments.yml
208
213
  - spec/fixtures/cassettes/client/headers.yml
@@ -211,6 +216,7 @@ test_files:
211
216
  - spec/fixtures/cassettes/client/jobs.yml
212
217
  - spec/fixtures/cassettes/client/offer.yml
213
218
  - spec/fixtures/cassettes/client/offers.yml
219
+ - spec/fixtures/cassettes/client/offers_for_application.yml
214
220
  - spec/fixtures/cassettes/client/office.yml
215
221
  - spec/fixtures/cassettes/client/offices.yml
216
222
  - spec/fixtures/cassettes/client/scheduled_interviews.yml