omniauth-workable 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.github/workflows/release.yml +37 -0
- data/.gitignore +12 -0
- data/.rspec +4 -0
- data/.rubocop.yml +55 -0
- data/CHANGELOG.md +15 -0
- data/Gemfile +9 -0
- data/Gemfile.lock +86 -0
- data/README.md +33 -0
- data/Rakefile +8 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/lib/omniauth/strategies/workable.rb +37 -0
- data/lib/omniauth/workable/version.rb +7 -0
- data/lib/omniauth/workable.rb +4 -0
- data/lib/omniauth-workable.rb +6 -0
- data/omniauth-workable.gemspec +37 -0
- metadata +119 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: faf4f74e6ea20ad7c9bad761d1bc9a9be6c5279be5ac07117fdaebb03447c34b
|
4
|
+
data.tar.gz: 8c0a83ee1b2cc6fa798ab6bc2bf418f9f46777c5ac386610a1b3c75529c13cd6
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 7231340a1633e97ae9514830a2bed089a6ab89a94d11bf5c052c97878e7bf726e56ede1dfa7a6f7bf75278eb26f33d3c2557a7bc012afcb7043080c6cfe44845
|
7
|
+
data.tar.gz: cd465ddd87646a49043623056fbd876a081e0b87f916e9c7aff713af244a32cbdbfa7c1e6167a5cc5b03d32b39adcf2960c827a6db4673871a6bc06d4103ed57
|
@@ -0,0 +1,37 @@
|
|
1
|
+
name: release
|
2
|
+
on:
|
3
|
+
push:
|
4
|
+
branches:
|
5
|
+
- master
|
6
|
+
jobs:
|
7
|
+
release-please:
|
8
|
+
runs-on: ubuntu-latest
|
9
|
+
steps:
|
10
|
+
- uses: GoogleCloudPlatform/release-please-action@v2
|
11
|
+
id: release
|
12
|
+
with:
|
13
|
+
release-type: ruby
|
14
|
+
package-name: omniauth-workable
|
15
|
+
bump-minor-pre-major: true
|
16
|
+
version-file: "lib/omniauth/workable/version.rb"
|
17
|
+
- uses: actions/checkout@v2
|
18
|
+
if: ${{ steps.release.outputs.release_created }}
|
19
|
+
- uses: ruby/setup-ruby@v1
|
20
|
+
with:
|
21
|
+
ruby-version: 2.7.4
|
22
|
+
if: ${{ steps.release.outputs.release_created }}
|
23
|
+
- run: bundle install
|
24
|
+
if: ${{ steps.release.outputs.release_created }}
|
25
|
+
- name: publish gem
|
26
|
+
run: |
|
27
|
+
ruby --version
|
28
|
+
gem --version
|
29
|
+
mkdir -p $HOME/.gem
|
30
|
+
touch $HOME/.gem/credentials
|
31
|
+
chmod 0600 $HOME/.gem/credentials
|
32
|
+
printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
|
33
|
+
gem build *.gemspec
|
34
|
+
gem push *.gem
|
35
|
+
env:
|
36
|
+
GEM_HOST_API_KEY: "${{secrets.RUBYGEMS_AUTH_TOKEN}}"
|
37
|
+
if: ${{ steps.release.outputs.release_created }}
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/.rubocop.yml
ADDED
@@ -0,0 +1,55 @@
|
|
1
|
+
require:
|
2
|
+
- rubocop-rspec
|
3
|
+
|
4
|
+
AllCops:
|
5
|
+
NewCops: enable
|
6
|
+
TargetRubyVersion: 2.6
|
7
|
+
Exclude:
|
8
|
+
- 'bin/**/*'
|
9
|
+
Layout/ParameterAlignment:
|
10
|
+
EnforcedStyle: with_fixed_indentation
|
11
|
+
Layout/ArgumentAlignment:
|
12
|
+
EnforcedStyle: with_fixed_indentation
|
13
|
+
Layout/FirstArgumentIndentation:
|
14
|
+
EnforcedStyle: consistent
|
15
|
+
Layout/FirstArrayElementIndentation:
|
16
|
+
EnforcedStyle: consistent
|
17
|
+
Layout/FirstHashElementIndentation:
|
18
|
+
EnforcedStyle: consistent
|
19
|
+
Layout/MultilineMethodCallIndentation:
|
20
|
+
EnforcedStyle: indented
|
21
|
+
Layout/MultilineOperationIndentation:
|
22
|
+
EnforcedStyle: indented
|
23
|
+
Lint/ConstantDefinitionInBlock:
|
24
|
+
AllowedMethods:
|
25
|
+
- enums
|
26
|
+
Metrics/BlockLength:
|
27
|
+
Exclude:
|
28
|
+
- 'spec/**/*'
|
29
|
+
Metrics/ClassLength:
|
30
|
+
Max: 120
|
31
|
+
Metrics/MethodLength:
|
32
|
+
Max: 20
|
33
|
+
Exclude:
|
34
|
+
- 'spec/**/*'
|
35
|
+
Naming/InclusiveLanguage:
|
36
|
+
Enabled: false
|
37
|
+
RSpec/ExampleLength:
|
38
|
+
Enabled: false
|
39
|
+
RSpec/FilePath:
|
40
|
+
CustomTransform:
|
41
|
+
OmniAuth: omniauth
|
42
|
+
RSpec/NestedGroups:
|
43
|
+
Enabled: false
|
44
|
+
Style/AccessorGrouping:
|
45
|
+
Enabled: false
|
46
|
+
Style/Documentation:
|
47
|
+
Enabled: false
|
48
|
+
Style/SymbolArray:
|
49
|
+
EnforcedStyle: brackets
|
50
|
+
Style/TrailingCommaInArguments:
|
51
|
+
EnforcedStyleForMultiline: comma
|
52
|
+
Style/TrailingCommaInArrayLiteral:
|
53
|
+
EnforcedStyleForMultiline: comma
|
54
|
+
Style/TrailingCommaInHashLiteral:
|
55
|
+
EnforcedStyleForMultiline: comma
|
data/CHANGELOG.md
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
# Changelog
|
2
|
+
|
3
|
+
### [0.1.1](https://www.github.com/ScreenLoop/omniauth-workable/compare/v0.1.0...v0.1.1) (2022-03-23)
|
4
|
+
|
5
|
+
|
6
|
+
### Bug Fixes
|
7
|
+
|
8
|
+
* update README.md ([8c9bcbd](https://www.github.com/ScreenLoop/omniauth-workable/commit/8c9bcbdb492f3037e3195e43b50617563b453680))
|
9
|
+
|
10
|
+
## 0.1.0 (2022-03-22)
|
11
|
+
|
12
|
+
|
13
|
+
### Features
|
14
|
+
|
15
|
+
* Add workable omniauth implementation. ([30bc795](https://www.github.com/ScreenLoop/omniauth-workable/commit/30bc795b657694a57c9c7bb16eaaa18eb4f3194e))
|
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,86 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
omniauth-workable (0.1.1)
|
5
|
+
omniauth (~> 2.0)
|
6
|
+
omniauth-oauth2 (~> 1.7.1)
|
7
|
+
|
8
|
+
GEM
|
9
|
+
remote: https://rubygems.org/
|
10
|
+
specs:
|
11
|
+
ast (2.4.2)
|
12
|
+
diff-lcs (1.4.4)
|
13
|
+
faraday (2.2.0)
|
14
|
+
faraday-net_http (~> 2.0)
|
15
|
+
ruby2_keywords (>= 0.0.4)
|
16
|
+
faraday-net_http (2.0.1)
|
17
|
+
hashie (5.0.0)
|
18
|
+
jwt (2.3.0)
|
19
|
+
multi_json (1.15.0)
|
20
|
+
multi_xml (0.6.0)
|
21
|
+
oauth2 (1.4.9)
|
22
|
+
faraday (>= 0.17.3, < 3.0)
|
23
|
+
jwt (>= 1.0, < 3.0)
|
24
|
+
multi_json (~> 1.3)
|
25
|
+
multi_xml (~> 0.5)
|
26
|
+
rack (>= 1.2, < 3)
|
27
|
+
omniauth (2.0.4)
|
28
|
+
hashie (>= 3.4.6)
|
29
|
+
rack (>= 1.6.2, < 3)
|
30
|
+
rack-protection
|
31
|
+
omniauth-oauth2 (1.7.2)
|
32
|
+
oauth2 (~> 1.4)
|
33
|
+
omniauth (>= 1.9, < 3)
|
34
|
+
parallel (1.20.1)
|
35
|
+
parser (3.0.2.0)
|
36
|
+
ast (~> 2.4.1)
|
37
|
+
rack (2.2.3)
|
38
|
+
rack-protection (2.2.0)
|
39
|
+
rack
|
40
|
+
rainbow (3.0.0)
|
41
|
+
rake (12.3.3)
|
42
|
+
regexp_parser (2.1.1)
|
43
|
+
rexml (3.2.5)
|
44
|
+
rspec (3.10.0)
|
45
|
+
rspec-core (~> 3.10.0)
|
46
|
+
rspec-expectations (~> 3.10.0)
|
47
|
+
rspec-mocks (~> 3.10.0)
|
48
|
+
rspec-core (3.10.1)
|
49
|
+
rspec-support (~> 3.10.0)
|
50
|
+
rspec-expectations (3.10.1)
|
51
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
52
|
+
rspec-support (~> 3.10.0)
|
53
|
+
rspec-mocks (3.10.2)
|
54
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
55
|
+
rspec-support (~> 3.10.0)
|
56
|
+
rspec-support (3.10.2)
|
57
|
+
rubocop (1.20.0)
|
58
|
+
parallel (~> 1.10)
|
59
|
+
parser (>= 3.0.0.0)
|
60
|
+
rainbow (>= 2.2.2, < 4.0)
|
61
|
+
regexp_parser (>= 1.8, < 3.0)
|
62
|
+
rexml
|
63
|
+
rubocop-ast (>= 1.9.1, < 2.0)
|
64
|
+
ruby-progressbar (~> 1.7)
|
65
|
+
unicode-display_width (>= 1.4.0, < 3.0)
|
66
|
+
rubocop-ast (1.11.0)
|
67
|
+
parser (>= 3.0.1.1)
|
68
|
+
rubocop-rspec (2.4.0)
|
69
|
+
rubocop (~> 1.0)
|
70
|
+
rubocop-ast (>= 1.1.0)
|
71
|
+
ruby-progressbar (1.11.0)
|
72
|
+
ruby2_keywords (0.0.5)
|
73
|
+
unicode-display_width (2.0.0)
|
74
|
+
|
75
|
+
PLATFORMS
|
76
|
+
ruby
|
77
|
+
|
78
|
+
DEPENDENCIES
|
79
|
+
omniauth-workable!
|
80
|
+
rake (~> 12.0)
|
81
|
+
rspec (~> 3.0)
|
82
|
+
rubocop (~> 1.20.0)
|
83
|
+
rubocop-rspec (~> 2.4.0)
|
84
|
+
|
85
|
+
BUNDLED WITH
|
86
|
+
2.2.20
|
data/README.md
ADDED
@@ -0,0 +1,33 @@
|
|
1
|
+
# omniauth-workable
|
2
|
+
|
3
|
+
Welcome to omniauth-workable gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/omniauth/workable`. To experiment with that code, run `bin/console` for an interactive prompt.
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Add this line to your application's Gemfile:
|
8
|
+
|
9
|
+
```ruby
|
10
|
+
gem 'omniauth-workable'
|
11
|
+
```
|
12
|
+
|
13
|
+
And then execute:
|
14
|
+
|
15
|
+
$ bundle install
|
16
|
+
|
17
|
+
Or install it yourself as:
|
18
|
+
|
19
|
+
$ gem install omniauth-workable
|
20
|
+
|
21
|
+
## Usage
|
22
|
+
|
23
|
+
## Development
|
24
|
+
|
25
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
26
|
+
|
27
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
28
|
+
|
29
|
+
## Contributing
|
30
|
+
|
31
|
+
This repository leverages [Google Cloud's release-please-action](https://github.com/google-github-actions/release-please-action) for releasing new version for the code. Please ensure your commits follow the [Convetional Commits](https://www.conventionalcommits.org/en/v1.0.0/) convention. Otherwise, the merge request won't be release.
|
32
|
+
|
33
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/screenloop/omniauth-workable.
|
data/Rakefile
ADDED
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "omniauth/workable"
|
5
|
+
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
8
|
+
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
+
# require "pry"
|
11
|
+
# Pry.start
|
12
|
+
|
13
|
+
require "irb"
|
14
|
+
IRB.start(__FILE__)
|
data/bin/setup
ADDED
@@ -0,0 +1,37 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'base64'
|
4
|
+
require 'oauth2'
|
5
|
+
require 'omniauth-oauth2'
|
6
|
+
|
7
|
+
module OmniAuth
|
8
|
+
module Strategies
|
9
|
+
# OmniAuth implementation for Workable
|
10
|
+
class Workable < OmniAuth::Strategies::OAuth2
|
11
|
+
DEFAULT_PROMPT = 'consent'
|
12
|
+
DEFAULT_RESPONSE_TYPE = 'code'
|
13
|
+
DEFAULT_SCOPE = 'r_candidates r_events r_members r_jobs w_comments'
|
14
|
+
|
15
|
+
option :name, 'workable'
|
16
|
+
|
17
|
+
option :client_options, {
|
18
|
+
site: 'https://www.workable',
|
19
|
+
audience: 'https://www.workable',
|
20
|
+
authorize_url: 'https://www.workable/oauth/authorize',
|
21
|
+
token_url: 'https://www.workable/oauth/token',
|
22
|
+
}
|
23
|
+
|
24
|
+
option :authorize_options, [:prompt, :response_type, :scope]
|
25
|
+
option :sandbox, false
|
26
|
+
|
27
|
+
def authorize_params
|
28
|
+
super.tap do |params|
|
29
|
+
params[:prompt] ||= DEFAULT_PROMPT
|
30
|
+
params[:response_type] ||= DEFAULT_RESPONSE_TYPE
|
31
|
+
params[:scope] ||= DEFAULT_SCOPE
|
32
|
+
params[:audience] ||= options.client_options[:audience]
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative 'lib/omniauth/workable/version'
|
4
|
+
|
5
|
+
Gem::Specification.new do |spec|
|
6
|
+
spec.name = 'omniauth-workable'
|
7
|
+
spec.version = OmniAuth::Workable::VERSION
|
8
|
+
spec.authors = ['Miguel Oliveira']
|
9
|
+
spec.email = ['miguel@screenloop.com']
|
10
|
+
|
11
|
+
spec.summary = 'OmniAuth implementation for Workable'
|
12
|
+
spec.homepage = 'https://github.com/ScreenLoop/omniauth-workable'
|
13
|
+
spec.required_ruby_version = Gem::Requirement.new('>= 2.6.0')
|
14
|
+
|
15
|
+
spec.metadata = {
|
16
|
+
'bug_tracker_uri' => "#{spec.homepage}/issues",
|
17
|
+
'changelog_uri' => "#{spec.homepage}/blob/main/CHANGELOG.md",
|
18
|
+
'documentation_uri' => spec.homepage.to_s,
|
19
|
+
'homepage_uri' => spec.homepage.to_s,
|
20
|
+
'source_code_uri' => spec.homepage.to_s,
|
21
|
+
}
|
22
|
+
|
23
|
+
# Specify which files should be added to the gem when it is released.
|
24
|
+
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
25
|
+
spec.files = Dir.chdir(File.expand_path(__dir__)) do
|
26
|
+
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
27
|
+
end
|
28
|
+
spec.bindir = 'exe'
|
29
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
30
|
+
spec.require_paths = ['lib']
|
31
|
+
|
32
|
+
spec.add_runtime_dependency 'omniauth', '~> 2.0'
|
33
|
+
spec.add_runtime_dependency 'omniauth-oauth2', '~> 1.7.1'
|
34
|
+
|
35
|
+
spec.add_development_dependency 'rubocop', '~> 1.20.0'
|
36
|
+
spec.add_development_dependency 'rubocop-rspec', '~> 2.4.0'
|
37
|
+
end
|
metadata
ADDED
@@ -0,0 +1,119 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: omniauth-workable
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Miguel Oliveira
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2022-03-23 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: omniauth
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '2.0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '2.0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: omniauth-oauth2
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 1.7.1
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 1.7.1
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rubocop
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: 1.20.0
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 1.20.0
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rubocop-rspec
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 2.4.0
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: 2.4.0
|
69
|
+
description:
|
70
|
+
email:
|
71
|
+
- miguel@screenloop.com
|
72
|
+
executables: []
|
73
|
+
extensions: []
|
74
|
+
extra_rdoc_files: []
|
75
|
+
files:
|
76
|
+
- ".github/workflows/release.yml"
|
77
|
+
- ".gitignore"
|
78
|
+
- ".rspec"
|
79
|
+
- ".rubocop.yml"
|
80
|
+
- CHANGELOG.md
|
81
|
+
- Gemfile
|
82
|
+
- Gemfile.lock
|
83
|
+
- README.md
|
84
|
+
- Rakefile
|
85
|
+
- bin/console
|
86
|
+
- bin/setup
|
87
|
+
- lib/omniauth-workable.rb
|
88
|
+
- lib/omniauth/strategies/workable.rb
|
89
|
+
- lib/omniauth/workable.rb
|
90
|
+
- lib/omniauth/workable/version.rb
|
91
|
+
- omniauth-workable.gemspec
|
92
|
+
homepage: https://github.com/ScreenLoop/omniauth-workable
|
93
|
+
licenses: []
|
94
|
+
metadata:
|
95
|
+
bug_tracker_uri: https://github.com/ScreenLoop/omniauth-workable/issues
|
96
|
+
changelog_uri: https://github.com/ScreenLoop/omniauth-workable/blob/main/CHANGELOG.md
|
97
|
+
documentation_uri: https://github.com/ScreenLoop/omniauth-workable
|
98
|
+
homepage_uri: https://github.com/ScreenLoop/omniauth-workable
|
99
|
+
source_code_uri: https://github.com/ScreenLoop/omniauth-workable
|
100
|
+
post_install_message:
|
101
|
+
rdoc_options: []
|
102
|
+
require_paths:
|
103
|
+
- lib
|
104
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
105
|
+
requirements:
|
106
|
+
- - ">="
|
107
|
+
- !ruby/object:Gem::Version
|
108
|
+
version: 2.6.0
|
109
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
110
|
+
requirements:
|
111
|
+
- - ">="
|
112
|
+
- !ruby/object:Gem::Version
|
113
|
+
version: '0'
|
114
|
+
requirements: []
|
115
|
+
rubygems_version: 3.1.6
|
116
|
+
signing_key:
|
117
|
+
specification_version: 4
|
118
|
+
summary: OmniAuth implementation for Workable
|
119
|
+
test_files: []
|