omniauth-greenhouse 1.3.0 → 1.3.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 42ca1eb8452ea7720f9630c2f3d9de23df80fcde
4
- data.tar.gz: f6469e73ad6dfb4a22d18ab069612ba3e3dbffe0
2
+ SHA256:
3
+ metadata.gz: 532de894aa0897a89628ae9e4941fa38e9fc5fde43a34a3538521fc0de589943
4
+ data.tar.gz: 97ba69f2b8015934142aa490949427c94684806796b04da95a04bda3ccf2a5e2
5
5
  SHA512:
6
- metadata.gz: 2fefe8feea8cee61984edd0555568a885ff65c8ff5f4620296957c78658bebb15f97f3700ea2a3d6ecac1fda995b103cd7512427dd26496be679da8e74377fe6
7
- data.tar.gz: e26b2eaa44283b348f53cb05c3b82eb9abe61b33f441fc862f70f08993ec25d4d45fb3b9e65c25382397d0249fb532d49d130dfeb4939e7d5b8abf7d8329f851
6
+ metadata.gz: c56ebd02adb82b4e24e7894cd280fa3c8e9936349db317d26252019fc6c0c522e4ef0789f084e42bdb3ae453f77a17781c8515add49ab33b7d1cf16b0a7f902d
7
+ data.tar.gz: 05aea1ee3b37f7843378ee6dedb4ab46f9e44f69f3509c446c4e0bfb03a894d37b4dfe8853dd9974338cdad936034548ac8fba65026d6ca589430879e3eef026
data/README.md CHANGED
@@ -1,3 +1,7 @@
1
+ # Important Note
2
+
3
+ This will be Greenhouse's last supported version of this gem. Any updates moving forward should be forked and maintained by the users.
4
+
1
5
  # Greenhouse
2
6
 
3
7
  Integrate with Greenhouse via OAuth 2.0
@@ -20,13 +24,14 @@ Or install it yourself as:
20
24
 
21
25
  It's easy to integrate with Greenhouse using the OmniAuth gem.
22
26
 
23
- The first step is to request a CLIENT_KEY and CLIENT_SECRET from a Greenhouse support specialist (support@greenhouse.io).
27
+ If you aren't currently a Greenhouse customer, the first step is to reach out to our Partnerships team at partners@greenhouse.io to request a CLIENT_KEY and CLIENT_SECRET.
28
+
24
29
  Unfortunately, there is no self-service mechanism to register your application. When you send a request to register
25
30
  your application, you will need to provide:
26
31
 
27
32
  * Application Name
28
33
  * Application URL
29
- * Callback URL (using OmniAuth, it will be http://myapp.example.com/authorize/greenhouse/callback)
34
+ * Callback URL (using OmniAuth, it will be http://myapp.example.com/auth/greenhouse/callback)
30
35
  * Small 128x128px Logo to display in the Greenhouse Authorizaiton screen
31
36
 
32
37
  Once you receive your CLIENT_KEY and CLIENT_SECRET, add this to your config/initializers/omniauth.rb file:
@@ -40,13 +45,13 @@ end
40
45
 
41
46
  After this is configured, your users will be able to authorize your application to use their Greenhouse account via:
42
47
 
43
- http://myapp.example.com/authorize/greenhouse
48
+ http://myapp.example.com/auth/greenhouse
44
49
 
45
50
  The user will be presented with an authorization screen. When the user clicks on the 'Authorize' button, they will be
46
51
  redirected back to your site to the 'Callback URL' you provided during the application registration process. This
47
52
  callback URL will look something like:
48
53
 
49
- http://myapp.example.com/authorize/greenhouse/callback
54
+ http://myapp.example.com/auth/greenhouse/callback
50
55
 
51
56
  If the user clicked on the 'Authorize' button, you can retrieve the OAuth 2.0 token via:
52
57
 
@@ -2,7 +2,36 @@ module OmniAuth
2
2
  module Strategies
3
3
  class Greenhouse < OmniAuth::Strategies::OAuth2
4
4
  option :name, 'greenhouse'
5
- option :client_options, { :site => "https://app.greenhouse.io" }
5
+ option :client_options, { :site => "https://api.greenhouse.io" }
6
+
7
+ info do
8
+ {
9
+ :name => "#{raw_info['first_name']} #{raw_info['last_name']}",
10
+ :email => raw_info['email']
11
+ }
12
+ end
13
+
14
+ extra do
15
+ {
16
+ 'raw_info' => raw_info
17
+ }
18
+ end
19
+
20
+ def raw_info
21
+ @raw_info ||= access_token.get('/v1/partner/current_user').parsed
22
+ end
23
+ end
24
+
25
+ # Override callback URL for compatibility with omniauth-oauth2 >= 1.4,
26
+ # which by default passes the entire URL of the callback, including
27
+ # query parameters. Greenhouse fails validation because that doesn't match the
28
+ # registered callback as required in the Oauth 2.0 spec.
29
+ # Refs:
30
+ # https://tools.ietf.org/html/rfc6749#section-4.1.3
31
+ # https://github.com/omniauth/omniauth-oauth2/commit/26152673224aca5c3e918bcc83075dbb0659717f
32
+ # https://github.com/omniauth/omniauth-oauth2/pull/70
33
+ def callback_url
34
+ options[:redirect_uri] || (full_host + script_name + callback_path)
6
35
  end
7
36
  end
8
37
  end
@@ -4,20 +4,27 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = 'omniauth-greenhouse'
7
- spec.version = '1.3.0'
8
- spec.authors = %w(timothy.frey)
7
+ spec.version = '1.3.2'
8
+ spec.authors = %w(Greenhouse Software)
9
9
  spec.email = %w(tech@greenhouse.io)
10
10
  spec.description = 'Integrate with Greenhouse with OmniAuth'
11
11
  spec.summary = 'Integrate with Greenhouse with OmniAuth'
12
- spec.homepage = 'http://greenhouse.io'
12
+ spec.homepage = "https://github.com/grnhse/omniauth-greenhouse"
13
13
  spec.license = 'MIT'
14
14
 
15
+ spec.post_install_message = %q{
16
+ omniauth-greenhouse will be removed from Rubygems.org on Friday, April 3, 2026.
17
+ Please install using a direct link to the Github repo:
18
+
19
+ gem "omniauth-greenhouse", git: "git@github.com:grnhse/omniauth-greenhouse.git", branch: "master"
20
+ }
21
+
15
22
  spec.files = `git ls-files`.split($/)
16
23
  spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
17
24
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
18
25
  spec.require_paths = %w(lib)
19
26
 
20
- spec.add_development_dependency 'bundler', '~> 1.3'
27
+ spec.add_development_dependency 'bundler'
21
28
  spec.add_development_dependency 'rake'
22
29
 
23
30
  spec.add_runtime_dependency 'omniauth-oauth2', '~> 1'
metadata CHANGED
@@ -1,29 +1,30 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-greenhouse
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
4
+ version: 1.3.2
5
5
  platform: ruby
6
6
  authors:
7
- - timothy.frey
8
- autorequire:
7
+ - Greenhouse
8
+ - Software
9
+ autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
- date: 2016-03-24 00:00:00.000000000 Z
12
+ date: 2026-01-21 00:00:00.000000000 Z
12
13
  dependencies:
13
14
  - !ruby/object:Gem::Dependency
14
15
  name: bundler
15
16
  requirement: !ruby/object:Gem::Requirement
16
17
  requirements:
17
- - - "~>"
18
+ - - ">="
18
19
  - !ruby/object:Gem::Version
19
- version: '1.3'
20
+ version: '0'
20
21
  type: :development
21
22
  prerelease: false
22
23
  version_requirements: !ruby/object:Gem::Requirement
23
24
  requirements:
24
- - - "~>"
25
+ - - ">="
25
26
  - !ruby/object:Gem::Version
26
- version: '1.3'
27
+ version: '0'
27
28
  - !ruby/object:Gem::Dependency
28
29
  name: rake
29
30
  requirement: !ruby/object:Gem::Requirement
@@ -87,11 +88,14 @@ files:
87
88
  - lib/omniauth-greenhouse.rb
88
89
  - lib/omniauth/strategies/greenhouse.rb
89
90
  - omniauth-greenhouse.gemspec
90
- homepage: http://greenhouse.io
91
+ homepage: https://github.com/grnhse/omniauth-greenhouse
91
92
  licenses:
92
93
  - MIT
93
94
  metadata: {}
94
- post_install_message:
95
+ post_install_message: "\n omniauth-greenhouse will be removed from Rubygems.org
96
+ on Friday, April 3, 2026.\n Please install using a direct link to the Github
97
+ repo:\n \n gem \"omniauth-greenhouse\", git: \"git@github.com:grnhse/omniauth-greenhouse.git\",
98
+ branch: \"master\"\n "
95
99
  rdoc_options: []
96
100
  require_paths:
97
101
  - lib
@@ -106,9 +110,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
106
110
  - !ruby/object:Gem::Version
107
111
  version: '0'
108
112
  requirements: []
109
- rubyforge_project:
110
- rubygems_version: 2.4.8
111
- signing_key:
113
+ rubygems_version: 3.3.26
114
+ signing_key:
112
115
  specification_version: 4
113
116
  summary: Integrate with Greenhouse with OmniAuth
114
117
  test_files: []