-
Notifications
You must be signed in to change notification settings - Fork 0
Bump omniauth and hashie versions #18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
cb9e9dc
Bump omniauth and hashie versions
tramuntanal 62bdb28
Add test to check AuthHash doesn't cause conflicts in the future
tramuntanal 6d1f92f
Bump version of GitHub actions used in CI
tramuntanal 9d12369
Add explanation why upgrade Hashie
tramuntanal File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,6 +2,6 @@ | |
|
|
||
| module Omniauth | ||
| module IdCatMobil | ||
| VERSION = "0.5.0" | ||
| VERSION = "0.6.0" | ||
| end | ||
| end | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,66 @@ | ||
| # frozen_string_literal: true | ||
|
|
||
| require "spec_helper" | ||
|
|
||
| describe OmniAuth::AuthHash do | ||
| let(:auth_hash) do | ||
| OmniAuth::AuthHash.new( | ||
| provider: "idcat_mobil", | ||
| uid: "123456789", | ||
| info: { | ||
| email: "email@example.net", | ||
| name: "Oriol", | ||
| surname1: "Junquerol", | ||
| surname2: "Balaguer" | ||
| }, | ||
| credentials: { | ||
| token: "fake_token", | ||
| expires: false | ||
| }, | ||
| extra: { | ||
| identifier_type: "1", | ||
| method: "idcatmobil", | ||
| status: "ok" | ||
| } | ||
| ) | ||
| end | ||
|
|
||
| describe "indifferent access" do | ||
| it "is accessible with string keys at root level" do | ||
| expect(auth_hash["provider"]).to eq("idcat_mobil") | ||
| expect(auth_hash["uid"]).to eq("123456789") | ||
| expect(auth_hash["info"]).to be_a(Hash) | ||
| expect(auth_hash["credentials"]).to be_a(Hash) | ||
| expect(auth_hash["extra"]).to be_a(Hash) | ||
| end | ||
|
|
||
| it "is accessible with symbol keys at root level" do | ||
| expect(auth_hash[:provider]).to eq("idcat_mobil") | ||
| expect(auth_hash[:uid]).to eq("123456789") | ||
| expect(auth_hash[:info]).to be_a(Hash) | ||
| expect(auth_hash[:credentials]).to be_a(Hash) | ||
| expect(auth_hash[:extra]).to be_a(Hash) | ||
| end | ||
|
|
||
| it "is accessible with string keys in nested hashes" do | ||
| expect(auth_hash["info"]["email"]).to eq("email@example.net") | ||
| expect(auth_hash["info"]["name"]).to eq("Oriol") | ||
| expect(auth_hash["credentials"]["token"]).to eq("fake_token") | ||
| expect(auth_hash["extra"]["method"]).to eq("idcatmobil") | ||
| end | ||
|
|
||
| it "is accessible with symbol keys in nested hashes" do | ||
| expect(auth_hash[:info][:email]).to eq("email@example.net") | ||
| expect(auth_hash[:info][:name]).to eq("Oriol") | ||
| expect(auth_hash[:credentials][:token]).to eq("fake_token") | ||
| expect(auth_hash[:extra][:method]).to eq("idcatmobil") | ||
| end | ||
|
|
||
| it "supports mixed string and symbol access" do | ||
| expect(auth_hash["info"][:email]).to eq("email@example.net") | ||
| expect(auth_hash[:info]["name"]).to eq("Oriol") | ||
| expect(auth_hash["credentials"][:token]).to eq("fake_token") | ||
| expect(auth_hash[:extra]["method"]).to eq("idcatmobil") | ||
| end | ||
| end | ||
| end |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.