Skip to content

Comments

FYI: I rebuilt the gem and released with a 2#1

Open
pboling wants to merge 312 commits intogrosser:masterfrom
ruby-openid:main
Open

FYI: I rebuilt the gem and released with a 2#1
pboling wants to merge 312 commits intogrosser:masterfrom
ruby-openid:main

Conversation

@pboling
Copy link

@pboling pboling commented Sep 5, 2024

Needed to pickup all the Ruby 2.7+ and Rails 5+ fixes from the fork network, and add working CI (GitHub Actions) in a very short period of time. Not expecting this to be merged, but happy to talk about how we could merge the work.

This repo used to be at the openid org, but that org archived their repo ~a year ago, so this repo is the closest thing to canonical as we have.

grosser and others added 30 commits January 28, 2014 20:11
This reverts commit 477ca17, reversing
changes made to 457b2c5.
This reverts commit 79fad48, reversing
changes made to 7d8692e.
If an AX attribute is set to boolean(true) value it results in 
undefined method `gsub' for true:TrueClass error. 

If it's set to false then its replaced by empty string resulting in 
to signature mismatch on the consumer, because the server still computes 
false AX value.

Fix is to set val to empty string if it's nil and if it's
boolean type then convert it to string.
OpenId::OpenIDServiceEndpoint and OpenID::Consumer::DiscoveredServices
objects are lost when these store into the session.

These objects change to Hash object before storing into session.
This avoids an error I was getting while parsing
http://localhost:8095/foo

`invalid value for Integer(): ":"`
Objects change to Hash object before storing into session.
Handle AX boolean value properly
More safely build filenames
Drop Ruby 1.9.2 from Travis, since this has issues with the latest
verison of Minitest, and Ruby 1.9.2 is not supported upstream any more.

Remove admin/runtest.rb, since this is deprecated in favor of simply
running "rake" to execute the test suite.
The default values of body and headers ought to be "nil", but in fact
they end up as the string "0" in test_redirect_limit.

This causes all sorts of problems. When body is defined as "0", we
follow the conditional that leads us to conn.request_post instead of
conn.request_get, and request_post crashes since it expects a key-value
string instead of simply "0". The unexpected string for the headers
variable wreaks havoc as well; when headers is "0", the hash value
assignment at the beginning of fetch() fails, because Ruby can't convert
the string to a hash.

I'm not sure why these values are "0" instead of nil, but setting them
explicitly during the call fixes the bug.
test_no_services() makes use of the with_method_overridden() function.
Depending on the order in which the tests ran, this function might or
might not be present.
Switch to Minitest, and misc test cleanups
When checking if `Digest::HMAC` is defined, we should not check ancestors,
we're only interested if `HMAC` is defined on `Digest`.

This will fix an issue in Ruby 2.2 where `Digest::HMAC` has been removed, but the
current check will result in the `Digest` library trying to load `digest/hmac` in 
`Digest.const_missing` and thus causing an error.
Avoid checking ancestors for constant
The Digest::HMAC was an experimental implementation and has been removed
from the latest Ruby version (2.2).
Conflicts:
	test/test_extras.rb
Removed custom String#starts_with? and #ends_with?
Since we changed from `Digest::HMAC` to `OpenSSL::HMAC`, we should check
for if `OpenSSL` is loaded, and then we can safely assume that `HMAC` is
available. Before `Digest` was always defined, so we had to check if
it had loaded its submodules.
From Ruby 2.2 the default `URI.parse` method uses a new RFC 3986
compatible parser, which will parse most of the “invalid” URLs in the
trustroot test.
Now you can run all test files individually, because each now correctly
requires everything it needs.
An explicit return inside a Proc can return from the current scope.
This fixes an issue with the test exiting before all tests are run.
This test became obsolete after openid#61 was merged,
since the code now uses Ruby's build in `String#start_with?` rather
than a custom implementation.
Use HMAC from OpenSSL rather than Digest.
Use RFC 2396 compatible URI parser for trustroot.
pboling and others added 27 commits June 26, 2025 04:41
- Ruby 3.5 may remove cgi from std lib
- See: https://bugs.ruby-lang.org/issues/21258
Remove HTML Coverage export
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](actions/checkout@v4...v5)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3 to 4.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](github/codeql-action@v3...v4)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: '4'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [actions/checkout](https://github.com/actions/checkout) from 5 to 6.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](actions/checkout@v5...v6)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Copilot AI review requested due to automatic review settings December 2, 2025 03:12
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR releases a new major version (3.1.0) of the ruby-openid2 gem, representing a rebuild and rerelease to pick up compatibility fixes for Ruby 2.7+ and Rails 5+. The changes include regenerated documentation files, version configuration, and release artifact checksums.

  • Regenerates YARD documentation files for API documentation
  • Adds version management configuration (.tool-versions)
  • Includes gem checksums for release verification

Reviewed changes

Copilot reviewed 77 out of 463 changed files in this pull request and generated no comments.

File Description
docs/OpenID/**/*.html Regenerated YARD API documentation for OpenID classes and modules
checksums/.sha Checksums for verifying the 3.1.0 gem release artifact
.tool-versions Specifies Ruby 3.4.4 as the project's Ruby version
Files not reviewed (7)
  • .idea/GitLink.xml: Language not supported
  • .idea/dbnavigator.xml: Language not supported
  • .idea/git_toolbox_prj.xml: Language not supported
  • .idea/misc.xml: Language not supported
  • .idea/ruby-openid2.iml: Language not supported
  • .idea/vcs.xml: Language not supported
  • .idea/workspace.xml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.