Skip to content

Commit 95eda9e

Browse files
committed
βœ… Retain compatibility with old omniauth & ruby
1 parent 08c9029 commit 95eda9e

File tree

6 files changed

+21
-20
lines changed

6 files changed

+21
-20
lines changed

β€Ž.rubocop_gradual.lockβ€Ž

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -14,29 +14,29 @@
1414
[54, 27, 3, "Style/AndOr: Use `&&` instead of `and`.", 193409806],
1515
[71, 7, 970, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 3995669691]
1616
],
17-
"omniauth-ldap.gemspec:2957894489": [
17+
"omniauth-ldap.gemspec:587429113": [
1818
[100, 3, 31, "Gemspec/DependencyVersion: Dependency version specification is required.", 1863578069],
1919
[101, 3, 26, "Gemspec/DependencyVersion: Dependency version specification is required.", 1276340125],
2020
[104, 3, 31, "Gemspec/DependencyVersion: Dependency version specification is required.", 2110985977],
2121
[105, 3, 32, "Gemspec/DependencyVersion: Dependency version specification is required.", 3005951394]
2222
],
23-
"spec/omniauth-ldap/adaptor_spec.rb:3932937965": [
24-
[71, 7, 26, "RSpec/StubbedMock: Prefer `allow` over `expect` when configuring a response.", 1924417310],
23+
"spec/omniauth-ldap/adaptor_spec.rb:3490841684": [
2524
[72, 7, 26, "RSpec/StubbedMock: Prefer `allow` over `expect` when configuring a response.", 1924417310],
2625
[73, 7, 26, "RSpec/StubbedMock: Prefer `allow` over `expect` when configuring a response.", 1924417310],
27-
[79, 7, 26, "RSpec/StubbedMock: Prefer `allow` over `expect` when configuring a response.", 1924417310],
26+
[74, 7, 26, "RSpec/StubbedMock: Prefer `allow` over `expect` when configuring a response.", 1924417310],
2827
[80, 7, 26, "RSpec/StubbedMock: Prefer `allow` over `expect` when configuring a response.", 1924417310],
29-
[81, 7, 26, "RSpec/StubbedMock: Prefer `allow` over `expect` when configuring a response.", 1924417310]
28+
[81, 7, 26, "RSpec/StubbedMock: Prefer `allow` over `expect` when configuring a response.", 1924417310],
29+
[82, 7, 26, "RSpec/StubbedMock: Prefer `allow` over `expect` when configuring a response.", 1924417310]
3030
],
31-
"spec/omniauth/strategies/ldap_spec.rb:438668078": [
32-
[12, 3, 54, "RSpec/LeakyConstantDeclaration: Stub class constant instead of declaring explicitly.", 2419068710],
33-
[68, 13, 9, "RSpec/ContextWording: Context description should match /^when\\b/, /^with\\b/, or /^without\\b/.", 1130140517],
34-
[93, 17, 28, "RSpec/ContextWording: Context description should match /^when\\b/, /^with\\b/, or /^without\\b/.", 3444838747],
35-
[102, 17, 23, "RSpec/ContextWording: Context description should match /^when\\b/, /^with\\b/, or /^without\\b/.", 1584148894],
36-
[113, 17, 32, "RSpec/ContextWording: Context description should match /^when\\b/, /^with\\b/, or /^without\\b/.", 1515076977],
37-
[121, 19, 19, "RSpec/ContextWording: Context description should match /^when\\b/, /^with\\b/, or /^without\\b/.", 2526348694],
38-
[133, 17, 56, "RSpec/ContextWording: Context description should match /^when\\b/, /^with\\b/, or /^without\\b/.", 2413495789],
39-
[148, 13, 9, "RSpec/ContextWording: Context description should match /^when\\b/, /^with\\b/, or /^without\\b/.", 3182939526],
40-
[181, 15, 19, "RSpec/ContextWording: Context description should match /^when\\b/, /^with\\b/, or /^without\\b/.", 2526348694]
31+
"spec/omniauth/strategies/ldap_spec.rb:3993817175": [
32+
[13, 3, 54, "RSpec/LeakyConstantDeclaration: Stub class constant instead of declaring explicitly.", 2419068710],
33+
[69, 13, 9, "RSpec/ContextWording: Context description should match /^when\\b/, /^with\\b/, or /^without\\b/.", 1130140517],
34+
[94, 17, 28, "RSpec/ContextWording: Context description should match /^when\\b/, /^with\\b/, or /^without\\b/.", 3444838747],
35+
[103, 17, 23, "RSpec/ContextWording: Context description should match /^when\\b/, /^with\\b/, or /^without\\b/.", 1584148894],
36+
[114, 17, 32, "RSpec/ContextWording: Context description should match /^when\\b/, /^with\\b/, or /^without\\b/.", 1515076977],
37+
[122, 19, 19, "RSpec/ContextWording: Context description should match /^when\\b/, /^with\\b/, or /^without\\b/.", 2526348694],
38+
[134, 17, 56, "RSpec/ContextWording: Context description should match /^when\\b/, /^with\\b/, or /^without\\b/.", 2413495789],
39+
[149, 13, 9, "RSpec/ContextWording: Context description should match /^when\\b/, /^with\\b/, or /^without\\b/.", 3182939526],
40+
[182, 15, 19, "RSpec/ContextWording: Context description should match /^when\\b/, /^with\\b/, or /^without\\b/.", 2526348694]
4141
]
4242
}

β€ŽAppraisalsβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ appraise "dep-heads" do
5454
end
5555

5656
appraise "ruby-2-3" do
57-
eval_gemfile "modular/omniauth/r2/v1.0.gemfile"
57+
eval_gemfile "modular/omniauth/r2/v1.1.gemfile"
5858
eval_gemfile "modular/rack/r2.1/v1.6.gemfile"
5959
eval_gemfile "modular/x_std_libs/r2.3/libs.gemfile"
6060
end
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
# Ruby >= 2.5 (dependency of omniauth)
2-
gem "logger", github: "ruby/logger", branch: "master"
2+
gem "logger", :github => "ruby/logger", :branch => "master"

β€Žgemfiles/ruby_2_3.gemfileβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ source "https://gem.coop"
44

55
gemspec :path => "../"
66

7-
eval_gemfile("modular/omniauth/r2/v1.0.gemfile")
7+
eval_gemfile("modular/omniauth/r2/v1.1.gemfile")
88

99
eval_gemfile("modular/rack/r2.1/v1.6.gemfile")
1010

β€Žspec/config/debug.rbβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
load_debugger = ENV.fetch("DEBUG", "false").casecmp?("true")
1+
load_debugger = ENV.fetch("DEBUG", "false").casecmp("true").zero?
22
puts "LOADING DEBUGGER: #{load_debugger}" if load_debugger
33

44
require "debug" if load_debugger

β€Žspec/spec_helper.rbβ€Ž

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@
2222

2323
TEST_LOGGER = Logger.new(StringIO.new)
2424
OmniAuth.config.logger = TEST_LOGGER
25-
OmniAuth.config.request_validation_phase = proc {}
25+
# New config for OmniAuth 2.0+
26+
OmniAuth.config.request_validation_phase = proc {} if OmniAuth.config.respond_to?(:request_validation_phase=)
2627

2728
RSpec.configure do |config|
2829
config.include Rack::Test::Methods

0 commit comments

Comments
Β (0)