Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/lint_code.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: "[CI] Lint"
on: "push"

env:
RUBY_VERSION: 2.7.1
RUBY_VERSION: 3.2.2

jobs:
lint:
Expand All @@ -13,7 +13,7 @@ jobs:
if: "github.ref != 'refs/heads/develop'"
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
- uses: actions/checkout@v2.0.0
- uses: actions/checkout@v3
with:
fetch-depth: 1
- uses: ruby/setup-ruby@v1
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Tests
on: "push"

env:
RUBY_VERSION: 2.7.1
RUBY_VERSION: 3.2.2

jobs:
tests:
Expand All @@ -13,13 +13,13 @@ jobs:
if: "github.ref != 'refs/heads/master' || github.ref != 'refs/heads/develop'"
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
- uses: actions/checkout@v2.0.0
- uses: actions/checkout@v3
with:
fetch-depth: 1
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ env.RUBY_VERSION }}
bundler-cache: true
- uses: nanasess/setup-chromedriver@v1.0.1
- uses: nanasess/setup-chromedriver@v2
- run: bundle exec rspec
name: RSpec
10 changes: 5 additions & 5 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
require:
plugins:
- rubocop-rspec

# Common configuration.
AllCops:
# Default formatter will be used if no -f/--format option is given.
Expand Down Expand Up @@ -53,7 +52,7 @@ AllCops:
# If a value is specified for TargetRubyVersion then it is used.
# Else if .ruby-version exists and it contains an MRI version it is used.
# Otherwise we fallback to the oldest officially supported Ruby version (2.0).
TargetRubyVersion: 2.7
TargetRubyVersion: 3.2.2
SuggestExtensions: false

RSpec:
Expand Down Expand Up @@ -1217,11 +1216,12 @@ RSpec/LeakyConstantDeclaration:
RSpec/DescribedClass:
Enabled: false

RSpec/FilePath:
RSpec/SpecFilePathFormat:
Enabled: true
Exclude:
- "spec/omniauth/strategies/publik_spec.rb"
# This is the default configuration file.

RSpec/VerifiedDoubleReference:
Exclude:
- "spec/omniauth/strategies/publik_spec.rb"
- "spec/omniauth/strategies/publik_spec.rb"
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.7.1
3.2.2
4 changes: 2 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ gemspec

group :test do
gem "byebug"
gem "rack", ">= 1.6.2"
gem "rack", "~> 2.2"
gem "rack-test"
gem "rspec", "~> 3.0"
gem "rspec", "~> 3.1"
end
13 changes: 7 additions & 6 deletions omniauth-publik.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,20 @@ Gem::Specification.new do |spec|
spec.summary = "OmniAuth strategy for Publik"
spec.description = "OmniAuth strategy for Publik"
spec.homepage = "https://github.com/OpenSourcePolitics/omniauth-publik"
spec.required_ruby_version = ">= 2.7"
spec.required_ruby_version = ">= 3.2"
spec.files = `git ls-files -z`.split("\x0").reject do |f|
f.match(%r{^(test|spec|features)/})
end
spec.bindir = "exe"
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
spec.require_paths = ["lib"]

spec.add_dependency "omniauth", "~> 2.0"
# rubocop:disable Gemspec/DevelopmentDependencies
spec.add_dependency "omniauth", "~> 2.1"
spec.add_dependency "omniauth-oauth2", ">= 1.7.2", "< 2.0"
spec.add_development_dependency "bundler", "~> 2.3.4"
spec.add_development_dependency "rake", "~> 13.0"
spec.add_development_dependency "rubocop", "1.23"
spec.add_development_dependency "bundler", ">= 2.4"
spec.add_development_dependency "rake", "~> 13.2"
spec.add_development_dependency "rubocop", "~> 1.69"
spec.add_development_dependency "rubocop-rspec"
# rubocop:enable Gemspec/DevelopmentDependencies
spec.metadata["rubygems_mfa_required"] = "true"
end
5 changes: 2 additions & 3 deletions spec/omniauth/strategies/publik_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
let(:client_site) { "http : // example.com" }

it "raises an ArgumentError" do
expect { subject.client.site }.to raise_error(URI::InvalidURIError, "bad URI(is not URI?): \"http : // example.com\"")
expect { subject.client.site }.to raise_error(URI::InvalidURIError, "bad URI (is not URI?): \"http : // example.com\"")
end

it "can't define authorize url" do
Expand All @@ -85,8 +85,7 @@

describe "#callback_url" do
before do
allow(strategy).to receive(:full_host).and_return("https://example.com")
allow(strategy).to receive(:script_name).and_return("/sub_uri")
allow(strategy).to receive_messages(full_host: "https://example.com", script_name: "/sub_uri")
end

it "is a combination of host, script name, and callback path" do
Expand Down