Skip to content

Feat/10 release 3.0.0 #11

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 13 commits into from
Sep 4, 2024
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
3,588 changes: 551 additions & 3,037 deletions .rubocop_gradual.lock

Large diffs are not rendered by default.

26 changes: 0 additions & 26 deletions .travis.yml

This file was deleted.

18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,22 @@
# Changelog
All notable changes to this project will be documented in this file.

Since version 3.0.0, the format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]
### Added
### Changed
### Fixed
### Removed

## 3.0.0
3831 relevant lines, 3510 lines covered and 321 lines missed. ( 91.62% )
1228 total branches, 1070 branches covered and 158 branches missed. ( 87.13% )
### Fixed
- Compatibility with Ruby 2.7+
### Removed
- Support for Ruby < 2.7

## 2.9.2

Expand Down
36 changes: 0 additions & 36 deletions CHANGES-2.0.0

This file was deleted.

36 changes: 0 additions & 36 deletions CHANGES-2.1.0

This file was deleted.

84 changes: 84 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
# Contributor Covenant Code of Conduct

## Our Pledge

We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.

We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.

## Our Standards

Examples of behavior that contributes to a positive environment for our community include:

* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
* Focusing on what is best not just for us as individuals, but for the overall community

Examples of unacceptable behavior include:

* The use of sexualized language or imagery, and sexual attention or
advances of any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email
address, without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting

## Enforcement Responsibilities

Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.

Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.

## Scope

This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at [email protected]. All complaints will be reviewed and investigated promptly and fairly.

All community leaders are obligated to respect the privacy and security of the reporter of any incident.

## Enforcement Guidelines

Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:

### 1. Correction

**Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.

**Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.

### 2. Warning

**Community Impact**: A violation through a single incident or series of actions.

**Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.

### 3. Temporary Ban

**Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.

**Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.

### 4. Permanent Ban

**Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.

**Consequence**: A permanent ban from any sort of public interaction within the community.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0,
available at https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.

Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity).

[homepage]: https://www.contributor-covenant.org

For answers to common questions about this code of conduct, see the FAQ at
https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations.
54 changes: 54 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
## Contributing

Bug reports and pull requests are welcome on GitHub at [https://github.com/VitalConnectInc/ruby-openid2][🚎src-main]
. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to
the [code of conduct][🤝conduct].

To submit a patch, please fork the project and create a patch with tests.
Once you're happy with it send a pull request.

## Release

### One-time, Per-developer, Setup

**IMPORTANT**: Your public key for signing gems will need to be picked up by the line in the
`gemspec` defining the `spec.cert_chain` (check the relevant ENV variables there),
in order to sign the new release.
See: [RubyGems Security Guide][🔒️rubygems-security-guide]

### To release a new version:

1. Run `bin/setup && bin/rake` as a tests, coverage, & linting sanity check
2. Update the version number in `version.rb`
3. Run `bin/setup && bin/rake` again as a secondary check, and to update `Gemfile.lock`
4. Run `git commit -am "🔖 Prepare release v<VERSION>"` to commit the changes
5. Run `git push` to trigger the final CI pipeline before release, & merge PRs
a. NOTE: Remember to [check the build][🧪build]!
6. Run `git checkout main`
7. Run `git pull origin main` to ensure you will release the latest trunk code.
8. Set `SOURCE_DATE_EPOCH` so `rake build` and `rake release` use same timestamp, and generate same checksums
a. Run `export SOURCE_DATE_EPOCH=$EPOCHSECONDS && echo $SOURCE_DATE_EPOCH`
b. If the echo above has no output, then it didn't work.
c. Note that you'll need the `zsh/datetime` module, if running `zsh`.
d. In `bash` you can use `date +%s` instead, i.e. `export SOURCE_DATE_EPOCH=$(date +%s) && echo $SOURCE_DATE_EPOCH`
9. Run `bundle exec rake build`
10. Run [`bin/checksums`][🔒️rubygems-checksums-pr] to create SHA-256 and SHA-512 checksums
a. Checksums will be committed automatically by the script, but not pushed
11. Run `bundle exec rake release` which will create a git tag for the version,
push git commits and tags, and push the `.gem` file to [rubygems.org][💎rubygems]

## Contributors

[![Contributors][🖐contributors-img]][🖐contributors]

Made with [contributors-img][🖐contrib-rocks].

[🧪build]: https://github.com/VitalConnectInc/ruby-openid2/actions
[🤝conduct]: https://github.com/VitalConnectInc/ruby-openid2/blob/main/CODE_OF_CONDUCT.md
[🖐contrib-rocks]: https://contrib.rocks
[🖐contributors]: https://github.com/VitalConnectInc/ruby-openid2/graphs/contributors
[🖐contributors-img]: https://contrib.rocks/image?repo=VitalConnectInc/ruby-openid2
[💎rubygems]: https://rubygems.org
[🔒️rubygems-security-guide]: https://guides.rubygems.org/security/#building-gems
[🔒️rubygems-checksums-pr]: https://github.com/rubygems/guides/pull/325
[🚎src-main]: https://github.com/VitalConnectInc/ruby-openid2
9 changes: 4 additions & 5 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
PATH
remote: .
specs:
ruby-openid (2.9.2)
ruby-openid2 (3.0.0)
version_gem (~> 1.1, >= 1.1.4)

GEM
remote: https://rubygems.org/
Expand Down Expand Up @@ -34,8 +35,7 @@ GEM
rainbow (3.1.1)
rake (13.2.1)
regexp_parser (2.9.2)
rexml (3.3.6)
strscan
rexml (3.3.7)
rspec-block_is_expected (1.0.6)
rubocop (1.64.1)
json (~> 2.3)
Expand Down Expand Up @@ -119,7 +119,6 @@ GEM
standard-custom (>= 1.0.2, < 2)
standard-performance (>= 1.3.1, < 2)
version_gem (>= 1.1.4, < 3)
strscan (3.1.0)
terminal-table (3.0.2)
unicode-display_width (>= 1.1.1, < 3)
unicode-display_width (2.5.0)
Expand All @@ -143,7 +142,7 @@ DEPENDENCIES
rubocop-lts (~> 18.2, >= 18.2.1)
rubocop-minitest (~> 0.36)
rubocop-packaging (~> 0.5, >= 0.5.2)
ruby-openid!
ruby-openid2!
standard (>= 1.35.1)
webrick (~> 1.8)
yard (~> 0.9, >= 0.9.34)
Expand Down
File renamed without changes.
18 changes: 9 additions & 9 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
#!/usr/bin/env rake
require 'bundler/gem_tasks'
require "bundler/gem_tasks"

require 'rake/testtask'
require "rake/testtask"

desc 'Run tests'
Rake::TestTask.new('test') do |t|
t.libs << 'lib'
t.libs << 'test'
t.test_files = FileList['test/**/test_*.rb']
desc "Run tests"
Rake::TestTask.new("test") do |t|
t.libs << "lib"
t.libs << "test"
t.test_files = FileList["test/**/test_*.rb"]
t.verbose = false
end

begin
require 'rubocop/lts'
require "rubocop/lts"
Rubocop::Lts.install_tasks
rescue LoadError
task(:rubocop_gradual) do
warn('RuboCop (Gradual) is disabled')
warn("RuboCop (Gradual) is disabled")
end
end

Expand Down
15 changes: 15 additions & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Security Policy

## Supported Versions

| Version | Supported |
|---------|-----------|
| 3.x | ✅ |
| 2.x | ❌ |
| 1.x | ❌ |

## Reporting a Vulnerability

Peter Boling is the primary maintainer of this gem. Please find a way
to [contact him directly](https://railsbling.com/contact) to report the issue. Include as much relevant information as
possible.
10 changes: 5 additions & 5 deletions admin/mkassoc
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
#!/usr/bin/env ruby

require 'openid/consumer/associationmanager'
require 'openid/store/memory'
require "openid/consumer/associationmanager"
require "openid/store/memory"

store = OpenID::Store::Memory.new
ARGV.each do |server_url|
unless URI::DEFAULT_PARSER.make_regexp =~ server_url
unless URI::DEFAULT_PARSER.make_regexp&.match?(server_url)
puts "`#{server_url}` will be skipped for invalid URI format."
next
end

mgr = OpenID::Consumer::AssociationManager.new(store, server_url)
puts '=' * 50
puts "=" * 50
puts "Server: #{server_url}"
puts mgr.get_association.serialize
puts '-' * 50
puts "-" * 50
end
8 changes: 8 additions & 0 deletions bin/setup
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/usr/bin/env bash
set -euo pipefail
IFS=$'\n\t'
set -vx

bundle install

# Do any other automated setup that you need to do here
Loading
Loading