omniauth-greenhouse 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,15 @@
1
+ ---
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ MmNiNDZlMDc0NjUxOTA5MTY1OTJkMTg1OGRlN2Q5N2JmMjZhMmUxMA==
5
+ data.tar.gz: !binary |-
6
+ OTRjNzJhNmU0MTM1MDRmYzkzNTczZWY0ODEwMjgzMmEwOTEzMDA1NQ==
7
+ SHA512:
8
+ metadata.gz: !binary |-
9
+ OGIwNThkNTlkOWVhNzJjMmJiNjExOGRhMzFmNjVmN2ZmOTk0YTdhMTM4MjM4
10
+ YTBlMjM1MDhiOTQyM2M3OWY0ODcyZTIyZDAyMWJhYTg5MWMxNTYzYjg2YTU4
11
+ Y2U0Y2ZiMDU4MDI0MjZhNTdjZTJmNjU0ZDI5NjQ3OGFiYzkyNDI=
12
+ data.tar.gz: !binary |-
13
+ NzVjMmEzMjE3NDc2MjhiZWIxODI0YTJlNDgwMTJhYjAxOGFlNWE5NjFkNjNh
14
+ MjFiYjMxNmQ3ZWZmMjY0ZGE2NWMyOTNkNTEwZWIxZDU1NzM1ZjYxYjJmYTZk
15
+ ZDA3MTRiODE0MjY3ZmExM2ExNWZiM2M1ZDZiOTFmYTQzN2MyODE=
data/.gitignore ADDED
@@ -0,0 +1,17 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ .yardoc
6
+ Gemfile.lock
7
+ InstalledFiles
8
+ _yardoc
9
+ coverage
10
+ doc/
11
+ lib/bundler/man
12
+ pkg
13
+ rdoc
14
+ spec/reports
15
+ test/tmp
16
+ test/version_tmp
17
+ tmp
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in greenhouse.gemspec
4
+ gemspec
data/LICENSE.txt ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2013 timothy.frey
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,57 @@
1
+ # Greenhouse
2
+
3
+ Integrate with Greenhouse via OAuth 2.0
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ gem 'oauth-greenhouse'
10
+
11
+ And then execute:
12
+
13
+ $ bundle
14
+
15
+ Or install it yourself as:
16
+
17
+ $ gem install oauth-greenhouse
18
+
19
+ ## Usage
20
+
21
+ It's easy to integrate with Greenhouse using the OmniAuth gem.
22
+
23
+ The first step is to request a CLIENT_KEY and CLIENT_SECRET from a Greenhouse support specialist (support@greenhouse.io).
24
+ Unfortunately, there is no self-service mechanism to register your application. When you send a request to register
25
+ your application, you will need to provide:
26
+
27
+ * Application Name
28
+ * Application URL
29
+ * Callback URL (using OmniAuth, it will be http://myapp.example.com/authorize/greenhouse/callback)
30
+ * Small 128x128px Logo to display in the Greenhouse Authorizaiton screen
31
+
32
+ Once you receive your CLIENT_KEY and CLIENT_SECRET, add this to your config/initializers/omniauth.rb file:
33
+
34
+ ```ruby
35
+ Rails.application.config.middleware.use OmniAuth::Builder do
36
+ provider :greenhouse, '<CLIENT_KEY>', '<CLIENT_SECRET>',
37
+ :scope => 'candidates.create candidates.view'
38
+ end
39
+ ```
40
+
41
+ After this is configured, your users will be able to authorize your application to use their Greenhouse account via:
42
+
43
+ http://myapp.example.com/authorize/greenhouse
44
+
45
+ The user will be presented with an authorization screen. When the user clicks on the 'Authorize' button, they will be
46
+ redirected back to your site to the 'Callback URL' you provided during the application registration process. This
47
+ callback URL will look something like:
48
+
49
+ http://myapp.example.com/authorize/greenhouse/callback
50
+
51
+ If the user clicked on the 'Authorize' button, you can retrieve the OAuth 2.0 token via:
52
+
53
+ ```ruby
54
+ request.env['omniauth.auth']['credentials']['token']
55
+ ```
56
+
57
+ If the user clicked on the 'Deny' button, a 'oauth_problem' query parameter will be set with a value of 'user_refused'.
data/Rakefile ADDED
@@ -0,0 +1 @@
1
+ require 'bundler/gem_tasks'
@@ -0,0 +1,2 @@
1
+ require 'omniauth-oauth2'
2
+ require 'omniauth/strategies/greenhouse'
@@ -0,0 +1,8 @@
1
+ module OmniAuth
2
+ module Strategies
3
+ class Greenhouse < OmniAuth::Strategies::OAuth2
4
+ option :name, 'greenhouse'
5
+ option :client_options, { :site => "https://app.greenhouse.io" }
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,25 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+
5
+ Gem::Specification.new do |spec|
6
+ spec.name = 'omniauth-greenhouse'
7
+ spec.version = '1.0.1'
8
+ spec.authors = %w(timothy.frey)
9
+ spec.email = %w(tech@greenhouse.io)
10
+ spec.description = 'Integrate with Greenhouse with OmniAuth'
11
+ spec.summary = 'Integrate with Greenhouse with OmniAuth'
12
+ spec.homepage = 'http://greenhouse.io'
13
+ spec.license = 'MIT'
14
+
15
+ spec.files = `git ls-files`.split($/)
16
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
17
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
18
+ spec.require_paths = %w(lib)
19
+
20
+ spec.add_development_dependency 'bundler', '~> 1.3'
21
+ spec.add_development_dependency 'rake'
22
+
23
+ spec.add_runtime_dependency 'omniauth-oauth2', '~> 1.1.1'
24
+ spec.add_runtime_dependency 'omniauth', '~> 1.1.4'
25
+ end
metadata ADDED
@@ -0,0 +1,108 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: omniauth-greenhouse
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.1
5
+ platform: ruby
6
+ authors:
7
+ - timothy.frey
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2013-12-10 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ~>
18
+ - !ruby/object:Gem::Version
19
+ version: '1.3'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ~>
25
+ - !ruby/object:Gem::Version
26
+ version: '1.3'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ! '>='
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ! '>='
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: omniauth-oauth2
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ~>
46
+ - !ruby/object:Gem::Version
47
+ version: 1.1.1
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ~>
53
+ - !ruby/object:Gem::Version
54
+ version: 1.1.1
55
+ - !ruby/object:Gem::Dependency
56
+ name: omniauth
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ~>
60
+ - !ruby/object:Gem::Version
61
+ version: 1.1.4
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ~>
67
+ - !ruby/object:Gem::Version
68
+ version: 1.1.4
69
+ description: Integrate with Greenhouse with OmniAuth
70
+ email:
71
+ - tech@greenhouse.io
72
+ executables: []
73
+ extensions: []
74
+ extra_rdoc_files: []
75
+ files:
76
+ - .gitignore
77
+ - Gemfile
78
+ - LICENSE.txt
79
+ - README.md
80
+ - Rakefile
81
+ - lib/omniauth-greenhouse.rb
82
+ - lib/omniauth/strategies/greenhouse.rb
83
+ - omniauth-greenhouse.gemspec
84
+ homepage: http://greenhouse.io
85
+ licenses:
86
+ - MIT
87
+ metadata: {}
88
+ post_install_message:
89
+ rdoc_options: []
90
+ require_paths:
91
+ - lib
92
+ required_ruby_version: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ! '>='
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
97
+ required_rubygems_version: !ruby/object:Gem::Requirement
98
+ requirements:
99
+ - - ! '>='
100
+ - !ruby/object:Gem::Version
101
+ version: '0'
102
+ requirements: []
103
+ rubyforge_project:
104
+ rubygems_version: 2.1.5
105
+ signing_key:
106
+ specification_version: 4
107
+ summary: Integrate with Greenhouse with OmniAuth
108
+ test_files: []