omniauth-multipassword 2.0.0.rc1 → 2.0.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
2
  SHA256:
3
- metadata.gz: 4c42cc59feffb560101a1ca960ea75b5099054097dc688570f814fde8a07d33a
4
- data.tar.gz: d8a94787d62f2d9ab2a8435cbaa81d087a4a2332e703a560fa907e3da0c9f9d5
3
+ metadata.gz: 22cda2cc2846bbe4d81087736f52e35f63c590595e6fc384006b0af8da14802f
4
+ data.tar.gz: 0600cb2dbafa41d13aeee34bda46ecb0263546489903aa68444d05126ade735c
5
5
  SHA512:
6
- metadata.gz: caef3ce2da16ace112cb73c2f178fb3909ad5fe184f57912cc0ae50622511e6f581638c0f4ab79d84c39229486b2114cc4799d47ba1057e02129392f892e4173
7
- data.tar.gz: 2bb20ced2304ba9496012e1b186619b7149fc4c19265b013305afb1ce68a3c76b12fa1d7300432f38851fe6d7e1c7fa21225f337b227da89662b47ace17d9937
6
+ metadata.gz: f3148c680d27dd56bae5325280e49670cd905d42d6e79cb668b01f0eb8951605bd27816233f3f55cef452c1a67215a94c6b25280dc6083eae3796c1eb12c2ce3
7
+ data.tar.gz: 6b48ab914cd47ff3b8b9641d52f1618050b5cafec8e1f171528eae6f7c8cbe909dd4095fbadc2b92caca6a9f25c002a06e9ab4ee837e8b504d1c031502772f26
@@ -0,0 +1,13 @@
1
+ ---
2
+ name: maintenance-cache-clear
3
+ on:
4
+ schedule:
5
+ - cron: "0 0 1 * *"
6
+ workflow_dispatch:
7
+
8
+ jobs:
9
+ cache-clear:
10
+ runs-on: ubuntu-latest
11
+
12
+ steps:
13
+ - uses: easimon/wipe-cache@v2
@@ -0,0 +1,17 @@
1
+ ---
2
+ name: maintenance-workflow-cleanup
3
+ on:
4
+ schedule:
5
+ - cron: "0 0 1 * *"
6
+ workflow_dispatch:
7
+
8
+ jobs:
9
+ delete-workflow-runs:
10
+ runs-on: ubuntu-latest
11
+ steps:
12
+ - uses: Mattraks/delete-workflow-runs@v2
13
+ with:
14
+ token: ${{ github.token }}
15
+ repository: ${{ github.repository }}
16
+ retain_days: 180
17
+ keep_minimum_runs: 50
@@ -1,45 +1,61 @@
1
1
  ---
2
2
  name: test
3
- on: push
3
+ on:
4
+ - push
5
+ - pull_request
6
+ - workflow_dispatch
7
+
4
8
  jobs:
5
9
  rspec:
6
- name: "Ruby ${{ matrix.ruby }}"
7
- runs-on: ubuntu-20.04
10
+ name: "Ruby ${{ matrix.ruby }} / ${{ matrix.gemfile }}"
11
+ runs-on: ubuntu-22.04
8
12
 
9
13
  strategy:
10
14
  fail-fast: false
11
15
  matrix:
12
16
  ruby:
17
+ - "3.3"
18
+ - "3.2"
19
+ - "3.1"
13
20
  - "3.0"
14
21
  - "2.7"
15
- - "2.6"
16
- - "2.5"
22
+ gemfile:
23
+ - omniauth_2.0
24
+ - omniauth_2.1
25
+
26
+ env:
27
+ BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}.gemfile
28
+ BUNDLE_WITHOUT: development
17
29
 
18
30
  steps:
19
31
  - uses: actions/checkout@master
20
32
  - uses: ruby/setup-ruby@v1
21
33
  with:
22
34
  ruby-version: ${{ matrix.ruby }}
23
- bundler-cache: True
35
+ bundler-cache: true
24
36
  env:
25
- BUNDLE_WITHOUT: development
26
37
  BUNDLE_JOBS: 4
27
38
  BUNDLE_RETRY: 3
28
39
 
29
- - run: bundle exec rspec --color
40
+ - run: |
41
+ bundle exec rspec --color --format documentation
42
+
43
+ - uses: codecov/codecov-action@v4
44
+ with:
45
+ fail_ci_if_error: true
46
+ token: ${{ secrets.CODECOV_TOKEN }}
30
47
 
31
48
  rubocop:
32
49
  name: rubocop
33
- runs-on: ubuntu-20.04
50
+ runs-on: ubuntu-22.04
34
51
 
35
52
  steps:
36
53
  - uses: actions/checkout@master
37
54
  - uses: ruby/setup-ruby@v1
38
55
  with:
39
- ruby-version: 3.0
40
- bundler-cache: True
56
+ ruby-version: "3.3"
57
+ bundler-cache: true
41
58
  env:
42
- BUNDLE_WITHOUT: development
43
59
  BUNDLE_JOBS: 4
44
60
  BUNDLE_RETRY: 3
45
61
 
data/.gitignore CHANGED
@@ -1,13 +1,13 @@
1
- *.gem
2
- *.rbc
1
+ _yardoc
3
2
  .bundle
4
3
  .config
5
4
  .yardoc
6
- Gemfile.lock
7
- InstalledFiles
8
- _yardoc
5
+ *.gem
6
+ *.rbc
9
7
  coverage
10
8
  doc/
9
+ *.lock
10
+ InstalledFiles
11
11
  lib/bundler/man
12
12
  pkg
13
13
  rdoc
data/.rubocop.yml CHANGED
@@ -1,8 +1,8 @@
1
1
  inherit_gem:
2
- my-rubocop: default.yml
2
+ rubocop-config: default.yml
3
3
 
4
4
  AllCops:
5
- TargetRubyVersion: 2.5
5
+ TargetRubyVersion: "2.7"
6
6
  SuggestExtensions: False
7
7
 
8
8
  Naming/FileName:
data/Appraisals ADDED
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ appraise 'omniauth-2.0' do
4
+ gem 'omniauth', '~> 2.0.0'
5
+ end
6
+
7
+ appraise 'omniauth-2.1' do
8
+ gem 'omniauth', '~> 2.1'
9
+ end
data/CHANGELOG.md CHANGED
@@ -3,16 +3,25 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  This project adheres to [Semantic Versioning](http://semver.org/) and [Keep a Changelog](http://keepachangelog.com/).
5
5
 
6
- ## Unreleased
7
- ---
6
+ ## [Unreleased]
8
7
 
9
- ### New
8
+ ## [2.0.1] - 2024-07-20
10
9
 
11
- ### Changes
10
+ ### Changed
12
11
 
13
- ### Fixes
12
+ - Version bump due to wrong tag
14
13
 
15
- ### Breaks
16
- * Updated strategy to OmniAuth >= 2.0
14
+ ## [2.0.0] - 2024-07-20
17
15
 
16
+ ### Added
18
17
 
18
+ - Add compatibility with newer Rack and OmniAuth 2.1+
19
+
20
+ ### Changed
21
+
22
+ - Updated strategy to OmniAuth >= 2.0
23
+ - Drop support for Ruby < 2.7
24
+
25
+ [Unreleased]: https://github.com/jgraichen/omniauth-multipassword/compare/v2.0.1...HEAD
26
+ [2.0.1]: https://github.com/jgraichen/omniauth-multipassword/compare/v2.0.0...v2.0.1
27
+ [2.0.0]: https://github.com/jgraichen/omniauth-multipassword/releases/tag/v2.0.0
data/Gemfile CHANGED
@@ -5,6 +5,8 @@ source 'https://rubygems.org'
5
5
  # Specify your gem's dependencies in omniauth-multipassword.gemspec
6
6
  gemspec
7
7
 
8
+ gem 'appraisal'
9
+
8
10
  gem 'rake'
9
11
  gem 'rake-release'
10
12
 
@@ -13,8 +15,10 @@ group :test do
13
15
 
14
16
  gem 'rspec', '~> 3.0'
15
17
 
16
- gem 'codecov', require: false
17
- gem 'simplecov', require: false
18
+ gem 'simplecov'
19
+ gem 'simplecov-cobertura'
20
+ end
18
21
 
19
- gem 'my-rubocop', github: 'jgraichen/my-rubocop', ref: 'v2'
22
+ group :development do
23
+ gem 'rubocop-config', github: 'jgraichen/rubocop-config', ref: 'v12'
20
24
  end
@@ -0,0 +1,21 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "appraisal"
6
+ gem "rake"
7
+ gem "rake-release"
8
+ gem "omniauth", "~> 2.0.0"
9
+
10
+ group :test do
11
+ gem "rack-test"
12
+ gem "rspec", "~> 3.0"
13
+ gem "simplecov"
14
+ gem "simplecov-cobertura"
15
+ end
16
+
17
+ group :development do
18
+ gem "rubocop-config", github: "jgraichen/rubocop-config", ref: "v12"
19
+ end
20
+
21
+ gemspec path: "../"
@@ -0,0 +1,21 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "appraisal"
6
+ gem "rake"
7
+ gem "rake-release"
8
+ gem "omniauth", "~> 2.1"
9
+
10
+ group :test do
11
+ gem "rack-test"
12
+ gem "rspec", "~> 3.0"
13
+ gem "simplecov"
14
+ gem "simplecov-cobertura"
15
+ end
16
+
17
+ group :development do
18
+ gem "rubocop-config", github: "jgraichen/rubocop-config", ref: "v12"
19
+ end
20
+
21
+ gemspec path: "../"
@@ -13,15 +13,15 @@ module OmniAuth
13
13
  end
14
14
 
15
15
  def username_id
16
- options[:fields][0] || 'username'
16
+ options.dig(:fields, 0) || 'username'
17
17
  end
18
18
 
19
19
  def password_id
20
- options[:fields][1] || 'password'
20
+ options.dig(:fields, 1) || 'password'
21
21
  end
22
22
 
23
23
  def username
24
- @username || request[username_id].to_s
24
+ @username || request.params[username_id.to_s].to_s
25
25
  end
26
26
 
27
27
  def init_authenticator(request, env, username)
@@ -31,7 +31,7 @@ module OmniAuth
31
31
  end
32
32
 
33
33
  def callback_phase
34
- if authenticate(username, request[password_id])
34
+ if authenticate(username, request.params[password_id.to_s])
35
35
  super
36
36
  else
37
37
  fail!(:invalid_credentials)
@@ -49,7 +49,7 @@ module OmniAuth
49
49
  # OmniAuth, by default, disables "GET" requests for security reasons.
50
50
  # This effectively disables showing a password form on a GET request to
51
51
  # the `request_phase`. Instead, we hook the GET requests here.
52
- return request_phase if on_request_path?
52
+ request_phase if on_request_path?
53
53
  end
54
54
  end
55
55
  end
@@ -5,11 +5,11 @@ module Omniauth
5
5
  module VERSION
6
6
  MAJOR = 2
7
7
  MINOR = 0
8
- PATCH = 0
9
- STAGE = 'rc1'
8
+ PATCH = 1
9
+ STAGE = nil
10
10
 
11
11
  def self.to_s
12
- [MAJOR, MINOR, PATCH, STAGE].reject(&:nil?).join '.'
12
+ [MAJOR, MINOR, PATCH, STAGE].compact.join '.'
13
13
  end
14
14
  end
15
15
  end
@@ -44,8 +44,8 @@ module OmniAuth
44
44
  end
45
45
 
46
46
  def callback_phase
47
- username = request[username_id].to_s
48
- password = request[password_id].to_s
47
+ username = request.params[username_id.to_s].to_s
48
+ password = request.params[password_id.to_s].to_s
49
49
  if authenticate(username, password)
50
50
  super
51
51
  else
@@ -3,6 +3,8 @@
3
3
  require File.expand_path('lib/omniauth/multipassword/version', __dir__)
4
4
 
5
5
  Gem::Specification.new do |gem|
6
+ gem.name = 'omniauth-multipassword'
7
+ gem.version = Omniauth::Multipassword::VERSION
6
8
  gem.authors = ['Jan Graichen']
7
9
  gem.email = ['jgraichen@altimos.de']
8
10
  gem.description = 'A OmniAuth strategy to authenticate using different passwort strategies.'
@@ -10,17 +12,14 @@ Gem::Specification.new do |gem|
10
12
  gem.homepage = 'https://github.com/jgraichen/omniauth-multipassword'
11
13
  gem.license = 'MIT'
12
14
 
13
- gem.required_ruby_version = '>= 2.5'
15
+ gem.required_ruby_version = '>= 2.7'
14
16
  gem.metadata = {
15
17
  'rubygems_mfa_required' => 'true',
16
18
  }
17
19
 
18
20
  gem.executables = `git ls-files -- bin/*`.split("\n").map {|f| File.basename(f) }
19
21
  gem.files = `git ls-files`.split("\n")
20
- gem.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
21
- gem.name = 'omniauth-multipassword'
22
22
  gem.require_paths = ['lib']
23
- gem.version = Omniauth::Multipassword::VERSION
24
23
 
25
24
  gem.add_dependency 'omniauth', '~> 2.0'
26
25
  end
data/renovate.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "$schema": "https://docs.renovatebot.com/renovate-schema.json",
3
+ "extends": [
4
+ "local>jgraichen/renovate-config"
5
+ ]
6
+ }
@@ -3,9 +3,7 @@
3
3
  require 'spec_helper'
4
4
  require 'rack/test'
5
5
 
6
- describe OmniAuth::MultiPassword::Base do # rubocop:disable RSpec/FilePath
7
- subject { strategy }
8
-
6
+ describe OmniAuth::MultiPassword::Base do # rubocop:disable RSpec/SpecFilePathFormat subject { strategy }
9
7
  let(:app) { instance_double(Proc) }
10
8
  let(:strategy) do
11
9
  OmniAuth::Strategies::OneTest.new(app, *args, &block)
@@ -3,7 +3,7 @@
3
3
  require 'spec_helper'
4
4
  require 'rack/test'
5
5
 
6
- describe OmniAuth::Strategies::MultiPassword do # rubocop:disable RSpec/FilePath
6
+ describe OmniAuth::Strategies::MultiPassword do # rubocop:disable RSpec/SpecFilePathFormat
7
7
  include Rack::Test::Methods
8
8
 
9
9
  let(:app) do
data/spec/spec_helper.rb CHANGED
@@ -1,17 +1,19 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'rspec'
4
- require 'simplecov'
5
4
 
6
- if ENV['CI']
7
- require 'codecov'
8
- SimpleCov.formatter = SimpleCov::Formatter::Codecov
9
- end
5
+ require 'simplecov'
6
+ require 'simplecov-cobertura'
10
7
 
11
8
  SimpleCov.start do
12
9
  add_filter 'spec'
13
10
  end
14
11
 
12
+ SimpleCov.formatters = [
13
+ SimpleCov::Formatter::HTMLFormatter,
14
+ SimpleCov::Formatter::CoberturaFormatter,
15
+ ]
16
+
15
17
  require 'omniauth-multipassword'
16
18
 
17
19
  Dir[File.expand_path('spec/support/**/*.rb')].sort.each {|f| require f }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-multipassword
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0.rc1
4
+ version: 2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jan Graichen
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-11-23 00:00:00.000000000 Z
11
+ date: 2024-07-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: omniauth
@@ -32,21 +32,26 @@ extensions: []
32
32
  extra_rdoc_files: []
33
33
  files:
34
34
  - ".editorconfig"
35
+ - ".github/workflows/maintenance-cache-wipe.yml"
36
+ - ".github/workflows/maintenance-workflow-cleanup.yml"
35
37
  - ".github/workflows/test.yml"
36
38
  - ".gitignore"
37
39
  - ".rspec"
38
40
  - ".rubocop.yml"
39
- - ".travis.yml"
41
+ - Appraisals
40
42
  - CHANGELOG.md
41
43
  - Gemfile
42
44
  - LICENSE
43
45
  - README.md
44
46
  - Rakefile
47
+ - gemfiles/omniauth_2.0.gemfile
48
+ - gemfiles/omniauth_2.1.gemfile
45
49
  - lib/omniauth-multipassword.rb
46
50
  - lib/omniauth/multipassword/base.rb
47
51
  - lib/omniauth/multipassword/version.rb
48
52
  - lib/omniauth/strategies/multi_password.rb
49
53
  - omniauth-multipassword.gemspec
54
+ - renovate.json
50
55
  - spec/omniauth/multipassword/base_spec.rb
51
56
  - spec/omniauth/strategy/multi_password_spec.rb
52
57
  - spec/spec_helper.rb
@@ -56,7 +61,7 @@ licenses:
56
61
  - MIT
57
62
  metadata:
58
63
  rubygems_mfa_required: 'true'
59
- post_install_message:
64
+ post_install_message:
60
65
  rdoc_options: []
61
66
  require_paths:
62
67
  - lib
@@ -64,15 +69,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
64
69
  requirements:
65
70
  - - ">="
66
71
  - !ruby/object:Gem::Version
67
- version: '2.5'
72
+ version: '2.7'
68
73
  required_rubygems_version: !ruby/object:Gem::Requirement
69
74
  requirements:
70
- - - ">"
75
+ - - ">="
71
76
  - !ruby/object:Gem::Version
72
- version: 1.3.1
77
+ version: '0'
73
78
  requirements: []
74
- rubygems_version: 3.2.22
75
- signing_key:
79
+ rubygems_version: 3.5.11
80
+ signing_key:
76
81
  specification_version: 4
77
82
  summary: A OmniAuth strategy to authenticate using different passwort strategies.
78
83
  test_files: []
data/.travis.yml DELETED
@@ -1,10 +0,0 @@
1
- sudo: false
2
- language: ruby
3
- cache: bundler
4
- rvm:
5
- - '2.4.0'
6
- - '2.3.3'
7
- - '2.2.6'
8
- - '2.1.10'
9
- after_success:
10
- - bundle exec codeclimate-test-reporter