omniauth-lever 0.1.0 → 0.3.0

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
2
  SHA256:
3
- metadata.gz: 2d4d718de0573a5f224a3a7a5c3f9ccf2d924713880f1e374972edded85dda9a
4
- data.tar.gz: 2e5fc8e82e13ce71f349ac3a1c4d86c2bf438247d09f1b17fda0a2c946649a92
3
+ metadata.gz: dc26b031962eae11ecde27dc220a48df43a0c0b6013c30584446a7db8aaf5c23
4
+ data.tar.gz: 653c28cd1f76388f02562af025a26fbbf0fd491715508b8378c8f355f79b9712
5
5
  SHA512:
6
- metadata.gz: 6cfb0dfbf1095a16430078024410add50135c16ef873cacfc92617739e16c849d5cc343fa39a8550e18d73fed4e0ad9e7b80ab2c58b1f62b4531add44dcd9686
7
- data.tar.gz: 1859ea06660186d057cea1ac6734ae6fdea7caf5507e28821463aad837b3803451a0a6ed2f7ad22103fe242cb44cdf90eb626472ddc9d70bee3cd6a2e015c116
6
+ metadata.gz: 880ba47d36e63d675992122a074296139947c1dfd55ea78ea0207456def12aef3c917ba0255aba659118bf9364cd61a1f34a4907c771cbfe827601162c9d0652
7
+ data.tar.gz: 5f7e66d981229818d3b2dc57e03ee9fc1157a69dfa1a3bcae636f118d13de92a4eb723b43a72f23134be457550abf36a7a681600c451f87a4721640e40058af1
@@ -14,23 +14,16 @@ jobs:
14
14
  package-name: omniauth-lever
15
15
  bump-minor-pre-major: true
16
16
  version-file: "lib/omniauth/lever/version.rb"
17
- # Checkout code if release was created
18
17
  - uses: actions/checkout@v2
19
- # if: ${{ steps.release.outputs.release_created }}
20
- # Setup ruby if a release was created
18
+ if: ${{ steps.release.outputs.release_created }}
21
19
  - uses: ruby/setup-ruby@v1
22
20
  with:
23
21
  ruby-version: 2.7.4
24
- # if: ${{ steps.release.outputs.release_created }}
25
- # Bundle install
22
+ if: ${{ steps.release.outputs.release_created }}
26
23
  - run: bundle install
27
24
  if: ${{ steps.release.outputs.release_created }}
28
25
  - name: publish gem
29
26
  run: |
30
- pwd
31
- echo $GITHUB_WORKSPACE
32
- echo $(ls | tr "\n" " ")
33
- echo "Done LS"
34
27
  ruby --version
35
28
  gem --version
36
29
  mkdir -p $HOME/.gem
@@ -41,4 +34,4 @@ jobs:
41
34
  gem push *.gem
42
35
  env:
43
36
  GEM_HOST_API_KEY: "${{secrets.RUBYGEMS_AUTH_TOKEN}}"
44
- # if: ${{ steps.release.outputs.release_created }}
37
+ if: ${{ steps.release.outputs.release_created }}
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 CHANGED
@@ -1,5 +1,33 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.3.0](https://www.github.com/ScreenLoop/omniauth-lever/compare/v0.2.1...v0.3.0) (2021-09-16)
4
+
5
+
6
+ ### Features
7
+
8
+ * Add support to sandbox instance ([12a9531](https://www.github.com/ScreenLoop/omniauth-lever/commit/12a9531d888cb8c50312d36ddcf24830517e83ee))
9
+
10
+ ### [0.2.1](https://www.github.com/ScreenLoop/omniauth-lever/compare/v0.2.0...v0.2.1) (2021-09-13)
11
+
12
+
13
+ ### Bug Fixes
14
+
15
+ * Fix imports for omniauth-lever gem ([f26ea25](https://www.github.com/ScreenLoop/omniauth-lever/commit/f26ea25a1c43abdbb01a0d6122cf7618e40bf25d))
16
+
17
+ ## [0.2.0](https://www.github.com/ScreenLoop/omniauth-lever/compare/v0.1.1...v0.2.0) (2021-09-10)
18
+
19
+
20
+ ### Features
21
+
22
+ * Add initial support to Lever strategy ([48eb4e2](https://www.github.com/ScreenLoop/omniauth-lever/commit/48eb4e2279be80affb3e877606acd30d1e59e65b))
23
+
24
+ ### [0.1.1](https://www.github.com/ScreenLoop/omniauth-lever/compare/v0.1.0...v0.1.1) (2021-09-10)
25
+
26
+
27
+ ### Bug Fixes
28
+
29
+ * Fix automatic release script ([fe98e5d](https://www.github.com/ScreenLoop/omniauth-lever/commit/fe98e5d34d1d8394197f55570cc35b5057e81bdf))
30
+
3
31
  ## 0.1.0 (2021-09-10)
4
32
 
5
33
 
data/Gemfile CHANGED
@@ -1,7 +1,9 @@
1
- source "https://rubygems.org"
1
+ # frozen_string_literal: true
2
+
3
+ source 'https://rubygems.org'
2
4
 
3
5
  # Specify your gem's dependencies in omniauth-lever.gemspec
4
6
  gemspec
5
7
 
6
- gem "rake", "~> 12.0"
7
- gem "rspec", "~> 3.0"
8
+ gem 'rake', '~> 12.0'
9
+ gem 'rspec', '~> 3.0'
data/Gemfile.lock CHANGED
@@ -1,13 +1,62 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- omniauth-lever (0.1.0)
4
+ omniauth-lever (0.3.0)
5
+ omniauth (~> 2.0)
6
+ omniauth-oauth2 (~> 1.7.1)
5
7
 
6
8
  GEM
7
9
  remote: https://rubygems.org/
8
10
  specs:
11
+ ast (2.4.2)
9
12
  diff-lcs (1.4.4)
13
+ faraday (1.7.2)
14
+ faraday-em_http (~> 1.0)
15
+ faraday-em_synchrony (~> 1.0)
16
+ faraday-excon (~> 1.1)
17
+ faraday-httpclient (~> 1.0.1)
18
+ faraday-net_http (~> 1.0)
19
+ faraday-net_http_persistent (~> 1.1)
20
+ faraday-patron (~> 1.0)
21
+ faraday-rack (~> 1.0)
22
+ multipart-post (>= 1.2, < 3)
23
+ ruby2_keywords (>= 0.0.4)
24
+ faraday-em_http (1.0.0)
25
+ faraday-em_synchrony (1.0.0)
26
+ faraday-excon (1.1.0)
27
+ faraday-httpclient (1.0.1)
28
+ faraday-net_http (1.0.1)
29
+ faraday-net_http_persistent (1.2.0)
30
+ faraday-patron (1.0.0)
31
+ faraday-rack (1.0.0)
32
+ hashie (4.1.0)
33
+ jwt (2.2.3)
34
+ multi_json (1.15.0)
35
+ multi_xml (0.6.0)
36
+ multipart-post (2.1.1)
37
+ oauth2 (1.4.7)
38
+ faraday (>= 0.8, < 2.0)
39
+ jwt (>= 1.0, < 3.0)
40
+ multi_json (~> 1.3)
41
+ multi_xml (~> 0.5)
42
+ rack (>= 1.2, < 3)
43
+ omniauth (2.0.4)
44
+ hashie (>= 3.4.6)
45
+ rack (>= 1.6.2, < 3)
46
+ rack-protection
47
+ omniauth-oauth2 (1.7.1)
48
+ oauth2 (~> 1.4)
49
+ omniauth (>= 1.9, < 3)
50
+ parallel (1.20.1)
51
+ parser (3.0.2.0)
52
+ ast (~> 2.4.1)
53
+ rack (2.2.3)
54
+ rack-protection (2.1.0)
55
+ rack
56
+ rainbow (3.0.0)
10
57
  rake (12.3.3)
58
+ regexp_parser (2.1.1)
59
+ rexml (3.2.5)
11
60
  rspec (3.10.0)
12
61
  rspec-core (~> 3.10.0)
13
62
  rspec-expectations (~> 3.10.0)
@@ -21,6 +70,23 @@ GEM
21
70
  diff-lcs (>= 1.2.0, < 2.0)
22
71
  rspec-support (~> 3.10.0)
23
72
  rspec-support (3.10.2)
73
+ rubocop (1.20.0)
74
+ parallel (~> 1.10)
75
+ parser (>= 3.0.0.0)
76
+ rainbow (>= 2.2.2, < 4.0)
77
+ regexp_parser (>= 1.8, < 3.0)
78
+ rexml
79
+ rubocop-ast (>= 1.9.1, < 2.0)
80
+ ruby-progressbar (~> 1.7)
81
+ unicode-display_width (>= 1.4.0, < 3.0)
82
+ rubocop-ast (1.11.0)
83
+ parser (>= 3.0.1.1)
84
+ rubocop-rspec (2.4.0)
85
+ rubocop (~> 1.0)
86
+ rubocop-ast (>= 1.1.0)
87
+ ruby-progressbar (1.11.0)
88
+ ruby2_keywords (0.0.5)
89
+ unicode-display_width (2.0.0)
24
90
 
25
91
  PLATFORMS
26
92
  ruby
@@ -29,6 +95,8 @@ DEPENDENCIES
29
95
  omniauth-lever!
30
96
  rake (~> 12.0)
31
97
  rspec (~> 3.0)
98
+ rubocop (~> 1.20.0)
99
+ rubocop-rspec (~> 2.4.0)
32
100
 
33
101
  BUNDLED WITH
34
102
  2.1.4
data/Rakefile CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'bundler/gem_tasks'
2
4
  require 'rspec/core/rake_task'
3
5
 
@@ -1,5 +1,7 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module OmniAuth
2
4
  module Lever
3
- VERSION = '0.1.0'
5
+ VERSION = '0.3.0'
4
6
  end
5
7
  end
@@ -1,8 +1,4 @@
1
- require 'omniauth/lever/version'
1
+ # frozen_string_literal: true
2
2
 
3
- module OmniAuth
4
- module Lever
5
- class Error < StandardError; end
6
- # Your code goes here...
7
- end
8
- end
3
+ require 'omniauth/lever/version'
4
+ require 'omniauth/strategies/lever'
@@ -0,0 +1,45 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'base64'
4
+ require 'oauth2'
5
+ require 'omniauth-oauth2'
6
+
7
+ module OmniAuth
8
+ module Strategies
9
+ class Lever < OmniAuth::Strategies::OAuth2
10
+ DEFAULT_PROMPT = 'consent'
11
+ DEFAULT_RESPONSE_TYPE = 'code'
12
+ DEFAULT_SCOPE = 'offline_access opportunities:read:admin archive_reasons:read:admin users:read:admin interviews:read:admin postings:read:admin feedback_templates:read:admin notes:write:admin'
13
+ SANDBOX_OAUTH_URL = 'https://sandbox-lever.auth0.com'
14
+ SANDBOX_CLIENT_OPTIONS = {
15
+ site: 'https://api.sandbox.lever.co/v1',
16
+ authorize_url: "#{SANDBOX_OAUTH_URL}/authorize",
17
+ token_url: "#{SANDBOX_OAUTH_URL}/oauth/token",
18
+ }
19
+
20
+ option :name, 'lever'
21
+
22
+ option :client_options, {
23
+ site: 'https://api.lever.co/v1',
24
+ authorize_url: 'https://auth.lever.co/authorize',
25
+ token_url: 'https://auth.lever.co/oauth/token',
26
+ }
27
+
28
+ option :authorize_options, [:prompt, :response_type, :scope]
29
+ option :sandbox, false
30
+
31
+ def setup_phase
32
+ options.client_options.merge!(SANDBOX_CLIENT_OPTIONS) if options.sandbox
33
+ super
34
+ end
35
+
36
+ def authorize_params
37
+ super.tap do |params|
38
+ params[:prompt] ||= DEFAULT_PROMPT
39
+ params[:response_type] ||= DEFAULT_RESPONSE_TYPE
40
+ params[:scope] ||= DEFAULT_SCOPE
41
+ end
42
+ end
43
+ end
44
+ end
45
+ end
@@ -0,0 +1 @@
1
+ require 'omniauth/lever'
@@ -1,29 +1,37 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require_relative 'lib/omniauth/lever/version'
2
4
 
3
5
  Gem::Specification.new do |spec|
4
- spec.name = "omniauth-lever"
6
+ spec.name = 'omniauth-lever'
5
7
  spec.version = OmniAuth::Lever::VERSION
6
- spec.authors = ["Alex Santos"]
7
- spec.email = ["hello@alexcsantos.com"]
8
+ spec.authors = ['Alex Santos']
9
+ spec.email = ['hello@alexcsantos.com']
8
10
 
9
- spec.summary = %q{OmniAuth implementation for Lever}
10
- spec.homepage = "https://github.com/ScreenLoop/omniauth-lever"
11
- spec.required_ruby_version = Gem::Requirement.new(">= 2.3.0")
11
+ spec.summary = 'OmniAuth implementation for Lever'
12
+ spec.homepage = 'https://github.com/ScreenLoop/omniauth-lever'
13
+ spec.required_ruby_version = Gem::Requirement.new('>= 2.6.0')
12
14
 
13
15
  spec.metadata = {
14
- "bug_tracker_uri" => "#{spec.homepage}/issues",
15
- "changelog_uri" => "#{spec.homepage}/blob/main/CHANGELOG.md",
16
- "documentation_uri" => spec.homepage.to_s,
17
- "homepage_uri" => spec.homepage.to_s,
18
- "source_code_uri" => spec.homepage.to_s
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,
19
21
  }
20
22
 
21
23
  # Specify which files should be added to the gem when it is released.
22
24
  # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
23
- spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
25
+ spec.files = Dir.chdir(File.expand_path(__dir__)) do
24
26
  `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
25
27
  end
26
- spec.bindir = "exe"
28
+ spec.bindir = 'exe'
27
29
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
28
- spec.require_paths = ["lib"]
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'
29
37
  end
metadata CHANGED
@@ -1,15 +1,71 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-lever
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alex Santos
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-09-10 00:00:00.000000000 Z
12
- dependencies: []
11
+ date: 2021-09-16 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
13
69
  description:
14
70
  email:
15
71
  - hello@alexcsantos.com
@@ -20,6 +76,7 @@ files:
20
76
  - ".github/workflows/release.yml"
21
77
  - ".gitignore"
22
78
  - ".rspec"
79
+ - ".rubocop.yml"
23
80
  - CHANGELOG.md
24
81
  - Gemfile
25
82
  - Gemfile.lock
@@ -27,8 +84,10 @@ files:
27
84
  - Rakefile
28
85
  - bin/console
29
86
  - bin/setup
87
+ - lib/omniauth-lever.rb
30
88
  - lib/omniauth/lever.rb
31
89
  - lib/omniauth/lever/version.rb
90
+ - lib/omniauth/strategies/lever.rb
32
91
  - omniauth-lever.gemspec
33
92
  homepage: https://github.com/ScreenLoop/omniauth-lever
34
93
  licenses: []
@@ -46,7 +105,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
46
105
  requirements:
47
106
  - - ">="
48
107
  - !ruby/object:Gem::Version
49
- version: 2.3.0
108
+ version: 2.6.0
50
109
  required_rubygems_version: !ruby/object:Gem::Requirement
51
110
  requirements:
52
111
  - - ">="