diff --git a/.devcontainer/apt-install/devcontainer-feature.json b/.devcontainer/apt-install/devcontainer-feature.json new file mode 100644 index 0000000..bf4d0e4 --- /dev/null +++ b/.devcontainer/apt-install/devcontainer-feature.json @@ -0,0 +1,9 @@ +{ + "name": "Apt Install Packages", + "id": "apt-install", + "version": "1.0.0", + "description": "More packages are needed", + "install": { + "script": "install.sh" + } +} \ No newline at end of file diff --git a/.devcontainer/apt-install/install.sh b/.devcontainer/apt-install/install.sh new file mode 100644 index 0000000..061ca0f --- /dev/null +++ b/.devcontainer/apt-install/install.sh @@ -0,0 +1,5 @@ +#!/bin/sh +apt-get update -y +apt-get install -y direnv default-jdk postgresql libpq-dev git zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev software-properties-common libffi-dev +# Adds the direnv setup script to ~/.bashrc file (at the end) +echo 'eval "$(direnv hook bash)"' >> ~/.bashrc \ No newline at end of file diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..d3daa43 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,28 @@ +// For format details, see https://aka.ms/devcontainer.json. For config options, see the +// README at: https://github.com/devcontainers/templates/tree/main/src/ruby +{ + "name": "Ruby", + // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile + "image": "mcr.microsoft.com/devcontainers/ruby:1-3-bookworm", + + // Features to add to the dev container. More info: https://containers.dev/features. + "features": { + "./apt-install": {} + }, + + // Use 'forwardPorts' to make a list of ports inside the container available locally. + // "forwardPorts": [], + + // Use 'postCreateCommand' to run commands after the container is created. + "postCreateCommand": "bundle update --bundler", + + // Configure tool-specific properties. + "customizations" : { + "jetbrains" : { + "backend" : "RubyMine" + } + }, + + // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. + // "remoteUser": "root" +} diff --git a/.envrc b/.envrc new file mode 100644 index 0000000..87cfd95 --- /dev/null +++ b/.envrc @@ -0,0 +1,37 @@ +# Run any command in this library's bin/ without the bin/ prefix! +PATH_add bin + +# Only add things to this file that should be shared with the team. + +# **dotenv** (See end of file for .env.local integration) +# .env would override anything in this file, if enabled. +# .env is a DOCKER standard, and if we use it, it would be in deployed, or DOCKER, environments. +# Override and customize anything below in your own .env.local +# If you are using dotenv and not direnv, +# copy the following `export` statements to your own .env file. + +### General Ruby ### +# Turn off Ruby Warnings about deprecated code +# export RUBYOPT="-W0" + +### External Testing Controls +export K_SOUP_COV_DO=true # Means you want code coverage +# Available formats are html, xml, rcov, lcov, json, tty +export K_SOUP_COV_COMMAND_NAME="RSpec Coverage" +export K_SOUP_COV_FORMATTERS="html,tty" +export K_SOUP_COV_MIN_BRANCH=11 # Means you want to enforce X% branch coverage +export K_SOUP_COV_MIN_LINE=61 # Means you want to enforce X% line coverage +export K_SOUP_COV_MIN_HARD=true # Means you want the build to fail if the coverage thresholds are not met +export K_SOUP_COV_MULTI_FORMATTERS=true +export MAX_ROWS=1 # Setting for simplecov-console gem for tty output, limits to the worst N rows of bad coverage + +# Internal Debugging Controls +export DEBUG=false # do not allow byebug statements (override in .env.local) + +# .env would override anything in this file, if `dotenv` is uncommented below. +# .env is a DOCKER standard, and if we use it, it would be in deployed, or DOCKER, environments, +# and that is why we generally want to leave it commented out. +# dotenv + +# .env.local will override anything in this file. +dotenv_if_exists .env.local diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..46f1c90 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,13 @@ +version: 2 +updates: + - package-ecosystem: bundler + directory: "/" + schedule: + interval: "daily" + open-pull-requests-limit: 10 + ignore: + - dependency-name: "rubocop-lts" + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "daily" diff --git a/.github/workflows/ancient.yml b/.github/workflows/ancient.yml new file mode 100644 index 0000000..5ab5b99 --- /dev/null +++ b/.github/workflows/ancient.yml @@ -0,0 +1,144 @@ +name: MRI 2.4, 2.5 (Ancient) + +permissions: + contents: read + +env: + K_SOUP_COV_DO: false + +on: + push: + branches: + - 'main' + tags: + - '!*' # Do not execute on tags + pull_request: + branches: + - '*' + # Allow manually triggering the workflow. + workflow_dispatch: + +# Cancels all previous workflow runs for the same branch that have not yet completed. +concurrency: + # The concurrency group contains the workflow name and the branch name. + group: "${{ github.workflow }}-${{ github.ref }}" + cancel-in-progress: true + +jobs: + test: + name: Specs ${{ matrix.ruby }} ${{ matrix.appraisal_name }}${{ matrix.name_extra || '' }} + if: "!contains(github.event.commits[0].message, '[ci skip]') && !contains(github.event.commits[0].message, '[skip ci]')" + runs-on: ubuntu-22.04 + continue-on-error: ${{ matrix.experimental || endsWith(matrix.ruby, 'head') }} + env: # $BUNDLE_GEMFILE must be set at job level, so it is set for all steps + BUNDLE_GEMFILE: ${{ github.workspace }}/${{ matrix.gemfile }}.gemfile + strategy: + fail-fast: false + matrix: + include: + # Ruby 2.4 + - ruby: "2.4" + appraisal_name: "omniauth-v1.1-r2.4" + exec_cmd: "rake spec" + gemfile: "Appraisal.root" + rubygems: "3.3.27" + bundler: "2.3.27" + + # Ruby 2.5 + - ruby: "2.5" + appraisal_name: "omniauth-v1.2-r2" + exec_cmd: "rake spec" + gemfile: "Appraisal.root" + rubygems: "3.3.27" + bundler: "2.3.27" + - ruby: "2.5" + appraisal_name: "omniauth-v1.3-r2" + exec_cmd: "rake spec" + gemfile: "Appraisal.root" + rubygems: "3.3.27" + bundler: "2.3.27" + - ruby: "2.5" + appraisal_name: "omniauth-v1.4-r2" + exec_cmd: "rake spec" + gemfile: "Appraisal.root" + rubygems: "3.3.27" + bundler: "2.3.27" + - ruby: "2.5" + appraisal_name: "omniauth-v1.5-r2" + exec_cmd: "rake spec" + gemfile: "Appraisal.root" + rubygems: "3.3.27" + bundler: "2.3.27" + - ruby: "2.5" + appraisal_name: "omniauth-v1.6-r2" + exec_cmd: "rake spec" + gemfile: "Appraisal.root" + rubygems: "3.3.27" + bundler: "2.3.27" + - ruby: "2.5" + appraisal_name: "omniauth-v1.7-r2" + exec_cmd: "rake spec" + gemfile: "Appraisal.root" + rubygems: "3.3.27" + bundler: "2.3.27" + - ruby: "2.5" + appraisal_name: "omniauth-v1.8-r2" + exec_cmd: "rake spec" + gemfile: "Appraisal.root" + rubygems: "3.3.27" + bundler: "2.3.27" + - ruby: "2.5" + appraisal_name: "omniauth-v1.9-r2" + exec_cmd: "rake spec" + gemfile: "Appraisal.root" + rubygems: "3.3.27" + bundler: "2.3.27" + - ruby: "2.5" + appraisal_name: "omniauth-v2.0-r2" + exec_cmd: "rake spec" + gemfile: "Appraisal.root" + rubygems: "3.3.27" + bundler: "2.3.27" + + steps: + ### COUCHDB + - name: Start CouchDB + uses: iamssen/couchdb-github-action@master + if: "endsWith(matrix.exec_cmd, 'couch_potato')" + with: + couchdb-version: "3.4.1" + + ### MONGODB + - name: Start MongoDB + uses: supercharge/mongodb-github-action@1.12.0 + if: "endsWith(matrix.exec_cmd, 'mongoid')" + with: + mongodb-version: "8.0" + + ### SMOKE-TEST + - name: Smoke CouchDB + if: "endsWith(matrix.exec_cmd, 'couch_potato')" + run: | + curl -f http://127.0.0.1:5984/ + curl -X POST -H "Content-Type: application/json; charset=utf-8" -d '{"name": "admin", "password": "password"}' http://127.0.0.1:5984/_session + + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup Ruby & RubyGems + uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ matrix.ruby }} + rubygems: ${{ matrix.rubygems }} + bundler: ${{ matrix.bundler }} + bundler-cache: false + + # Raw `bundle` will use the BUNDLE_GEMFILE set to matrix.gemfile (i.e. Appraisal.root) + # We need to do this first to get appraisal installed. + # NOTE: This does not use the main Gemfile at all. + - name: Install Root Appraisal + run: bundle + - name: Appraisal for ${{ matrix.ruby }}@${{ matrix.appraisal_name }} + run: bundle exec appraisal ${{ matrix.appraisal_name }} bundle + - name: Run ${{ matrix.exec_cmd }} on ${{ matrix.ruby }}@${{ matrix.appraisal_name }} + run: bundle exec appraisal ${{ matrix.appraisal_name }} bundle exec ${{ matrix.exec_cmd }} diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml new file mode 100644 index 0000000..502c2a0 --- /dev/null +++ b/.github/workflows/codeql-analysis.yml @@ -0,0 +1,70 @@ +# For most projects, this workflow file will not need changing; you simply need +# to commit it to your repository. +# +# You may wish to alter this file to override the set of languages analyzed, +# or to provide custom queries or build logic. +# +# ******** NOTE ******** +# We have attempted to detect the languages in your repository. Please check +# the `language` matrix defined below to confirm you have the correct set of +# supported CodeQL languages. +# +name: "CodeQL" + +on: + push: + branches: [ main, "*-stable" ] + pull_request: + # The branches below must be a subset of the branches above + branches: [ main, "*-stable" ] + schedule: + - cron: '35 1 * * 5' + +jobs: + analyze: + name: Analyze + runs-on: ubuntu-latest + permissions: + actions: read + contents: read + security-events: write + + strategy: + fail-fast: false + matrix: + language: [ 'ruby' ] + # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ] + # Learn more about CodeQL language support at https://git.io/codeql-language-support + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + # Initializes the CodeQL tools for scanning. + - name: Initialize CodeQL + uses: github/codeql-action/init@v3 + with: + languages: ${{ matrix.language }} + # If you wish to specify custom queries, you can do so here or in a config file. + # By default, queries listed here will override any specified in a config file. + # Prefix the list here with "+" to use these queries and those in the config file. + # queries: ./path/to/local/query, your-org/your-repo/queries@main + + # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). + # If this step fails, then you should remove it and run the build manually (see below) + - name: Autobuild + uses: github/codeql-action/autobuild@v3 + + # â„šī¸ Command-line programs to run using the OS shell. + # 📚 https://git.io/JvXDl + + # âœī¸ If the Autobuild fails above, remove it and uncomment the following three lines + # and modify them (or add more) to build your code if your project + # uses a compiled language + + #- run: | + # make bootstrap + # make release + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v3 diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml new file mode 100644 index 0000000..1dd5a45 --- /dev/null +++ b/.github/workflows/coverage.yml @@ -0,0 +1,140 @@ +name: Test Coverage + +permissions: + contents: read + pull-requests: write + id-token: write + +env: + K_SOUP_COV_MIN_BRANCH: 11 + K_SOUP_COV_MIN_LINE: 61 + K_SOUP_COV_MIN_HARD: true + K_SOUP_COV_FORMATTERS: "html,xml,rcov,lcov,json,tty" + K_SOUP_COV_DO: true + K_SOUP_COV_MULTI_FORMATTERS: true + K_SOUP_COV_COMMAND_NAME: "RSpec Coverage" + +on: + push: + branches: + - 'main' + tags: + - '!*' # Do not execute on tags + pull_request: + branches: + - '*' + # Allow manually triggering the workflow. + workflow_dispatch: + +# Cancels all previous workflow runs for the same branch that have not yet completed. +concurrency: + # The concurrency group contains the workflow name and the branch name. + group: "${{ github.workflow }}-${{ github.ref }}" + cancel-in-progress: true + +jobs: + coverage: + name: Code Coverage on ${{ matrix.ruby }}@current + if: "!contains(github.event.commits[0].message, '[ci skip]') && !contains(github.event.commits[0].message, '[skip ci]')" + runs-on: ubuntu-latest + continue-on-error: ${{ matrix.experimental || endsWith(matrix.ruby, 'head') }} + env: # $BUNDLE_GEMFILE must be set at job level, so it is set for all steps + BUNDLE_GEMFILE: ${{ github.workspace }}/${{ matrix.gemfile }}.gemfile + strategy: + fail-fast: false + matrix: + include: + # Coverage + - ruby: "ruby" + appraisal_name: "coverage" + exec_cmd: "rake spec" + gemfile: "Appraisal.root" + rubygems: latest + bundler: latest + + steps: + ### COUCHDB + - name: Start CouchDB + uses: iamssen/couchdb-github-action@master + with: + couchdb-version: "3.4.1" + + ### MONGODB + - name: Start MongoDB + uses: supercharge/mongodb-github-action@1.12.0 + with: + mongodb-version: "8.0" + + ### SMOKE-TEST + - name: Smoke CouchDB + run: | + curl -f http://127.0.0.1:5984/ + curl -X POST -H "Content-Type: application/json; charset=utf-8" -d '{"name": "admin", "password": "password"}' http://127.0.0.1:5984/_session + + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup Ruby & RubyGems + uses: ruby/setup-ruby@v1 + with: + ruby-version: "${{ matrix.ruby }}" + rubygems: "${{ matrix.rubygems }}" + bundler: "${{ matrix.bundler }}" + bundler-cache: false + + # Raw `bundle` will use the BUNDLE_GEMFILE set to matrix.gemfile (i.e. Appraisal.root) + # We need to do this first to get appraisal installed. + # NOTE: This does not use the primary Gemfile at all. + - name: Install Root Appraisal + run: bundle + - name: Appraisal for ${{ matrix.ruby }}@${{ matrix.appraisal_name }} + run: bundle exec appraisal ${{ matrix.appraisal_name }} bundle + - name: Run ${{ matrix.exec_cmd }} on ${{ matrix.ruby }}@${{ matrix.appraisal_name }} + run: bundle exec appraisal ${{ matrix.appraisal_name }} bundle exec ${{ matrix.exec_cmd }} + + # Do SaaS coverage uploads first + - name: Upload coverage to Coveralls + uses: coverallsapp/github-action@master + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + continue-on-error: ${{ matrix.experimental != 'false' }} + +# - name: Upload coverage to QLTY +# uses: qltysh/qlty-action/coverage@main +# with: +# token: ${{secrets.QLTY_COVERAGE_TOKEN}} +# files: coverage/.resultset.json +# continue-on-error: ${{ matrix.experimental != 'false' }} + + # Build will fail here if coverage upload fails + # which will hopefully be noticed for the lack of code coverage comments + - name: Upload coverage to CodeCov + uses: codecov/codecov-action@v5 + with: + use_oidc: true + fail_ci_if_error: true # optional (default = false) + verbose: true # optional (default = false) + + # Then PR comments + - name: Code Coverage Summary Report + uses: irongut/CodeCoverageSummary@v1.3.0 + if: ${{ github.event_name == 'pull_request' }} + with: + filename: ./coverage/coverage.xml + badge: true + fail_below_min: true + format: markdown + hide_branch_rate: false + hide_complexity: true + indicators: true + output: both + thresholds: '61 11' + continue-on-error: ${{ matrix.experimental != 'false' }} + + - name: Add Coverage PR Comment + uses: marocchino/sticky-pull-request-comment@v2 + if: ${{ github.event_name == 'pull_request' }} + with: + recreate: true + path: code-coverage-results.md + continue-on-error: ${{ matrix.experimental != 'false' }} diff --git a/.github/workflows/current-runtime-heads.yml b/.github/workflows/current-runtime-heads.yml new file mode 100644 index 0000000..dfb913c --- /dev/null +++ b/.github/workflows/current-runtime-heads.yml @@ -0,0 +1,88 @@ +# Targets the evergreen latest release of ruby, truffleruby, and jruby +# and tests against the HEAD of runtime dependencies +name: Runtime Deps @ HEAD + +permissions: + contents: read + +env: + K_SOUP_COV_DO: false + +on: + push: + branches: + - 'main' + - '*-stable' + tags: + - '!*' # Do not execute on tags + pull_request: + branches: + - '*' + # Allow manually triggering the workflow. + workflow_dispatch: + +# Cancels all previous workflow runs for the same branch that have not yet completed. +concurrency: + # The concurrency group contains the workflow name and the branch name. + group: "${{ github.workflow }}-${{ github.ref }}" + cancel-in-progress: true + +jobs: + test: + name: Specs ${{ matrix.ruby }}@${{ matrix.appraisal_name }} + if: "!contains(github.event.commits[0].message, '[ci skip]') && !contains(github.event.commits[0].message, '[skip ci]')" + runs-on: ubuntu-latest + continue-on-error: ${{ matrix.experimental || endsWith(matrix.ruby, 'head') }} + env: # $BUNDLE_GEMFILE must be set at job level, so it is set for all steps + BUNDLE_GEMFILE: ${{ github.workspace }}/${{ matrix.gemfile }}.gemfile + strategy: + matrix: + include: + # Ruby 3.4 + - ruby: "ruby" + appraisal_name: "dep-heads" + exec_cmd: "rake spec" + gemfile: "Appraisal.root" + rubygems: latest + bundler: latest + + # truffleruby-24.1 + # (according to documentation: targets Ruby 3.3 compatibility) + # (according to runtime: targets Ruby 3.2 compatibility) + - ruby: "truffleruby" + appraisal_name: "dep-heads" + exec_cmd: "rake spec" + gemfile: "Appraisal.root" + rubygems: default + bundler: default + + # jruby-10.0 (targets Ruby 3.4 compatibility) + - ruby: "jruby" + appraisal_name: "dep-heads" + exec_cmd: "rake spec" + gemfile: "Appraisal.root" + experimental: true + rubygems: default + bundler: default + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup Ruby & RubyGems + uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ matrix.ruby }} + rubygems: ${{ matrix.rubygems }} + bundler: ${{ matrix.bundler }} + bundler-cache: false + + # Raw `bundle` will use the BUNDLE_GEMFILE set to matrix.gemfile (i.e. Appraisal.root) + # We need to do this first to get appraisal installed. + # NOTE: This does not use the primary Gemfile at all. + - name: Install Root Appraisal + run: bundle + - name: Appraisal for ${{ matrix.ruby }}@${{ matrix.appraisal_name }} + run: bundle exec appraisal ${{ matrix.appraisal_name }} bundle + - name: Run ${{ matrix.exec_cmd }} on ${{ matrix.ruby }}@${{ matrix.appraisal_name }} + run: bundle exec appraisal ${{ matrix.appraisal_name }} bundle exec ${{ matrix.exec_cmd }} diff --git a/.github/workflows/current.yml b/.github/workflows/current.yml new file mode 100644 index 0000000..afac894 --- /dev/null +++ b/.github/workflows/current.yml @@ -0,0 +1,83 @@ +# Targets the evergreen latest release of ruby, truffleruby, and jruby +name: Current + +permissions: + contents: read + +env: + K_SOUP_COV_DO: false + +on: + push: + branches: + - 'main' + tags: + - '!*' # Do not execute on tags + pull_request: + branches: + - '*' + # Allow manually triggering the workflow. + workflow_dispatch: + +# Cancels all previous workflow runs for the same branch that have not yet completed. +concurrency: + # The concurrency group contains the workflow name and the branch name. + group: "${{ github.workflow }}-${{ github.ref }}" + cancel-in-progress: true + +jobs: + test: + name: Specs ${{ matrix.ruby }}@${{ matrix.appraisal_name }} + if: "!contains(github.event.commits[0].message, '[ci skip]') && !contains(github.event.commits[0].message, '[skip ci]')" + runs-on: ubuntu-latest + continue-on-error: ${{ matrix.experimental || endsWith(matrix.ruby, 'head') }} + env: # $BUNDLE_GEMFILE must be set at job level, so it is set for all steps + BUNDLE_GEMFILE: ${{ github.workspace }}/${{ matrix.gemfile }}.gemfile + strategy: + matrix: + include: + # Ruby 3.4 + - ruby: "3.4" + appraisal_name: "omniauth-v2.1-r3" + exec_cmd: "rake spec" + gemfile: "Appraisal.root" + rubygems: latest + bundler: latest + + # truffleruby-24.1 + - ruby: "truffleruby" + appraisal_name: "omniauth-v2.1-r3" + exec_cmd: "rake spec" + gemfile: "Appraisal.root" + rubygems: default + bundler: default + + # jruby-10.0 (targets Ruby 3.4 compatibility) + - ruby: "jruby" + appraisal_name: "omniauth-v2.1-r3" + exec_cmd: "rake spec" + gemfile: "Appraisal.root" + rubygems: default + bundler: default + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup Ruby & RubyGems + uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ matrix.ruby }} + rubygems: ${{ matrix.rubygems }} + bundler: ${{ matrix.bundler }} + bundler-cache: false + + # Raw `bundle` will use the BUNDLE_GEMFILE set to matrix.gemfile (i.e. Appraisal.root) + # We need to do this first to get appraisal installed. + # NOTE: This does not use the main Gemfile at all. + - name: Install Root Appraisal + run: bundle + - name: Appraisal for ${{ matrix.ruby }}@${{ matrix.appraisal_name }} + run: bundle exec appraisal ${{ matrix.appraisal_name }} bundle + - name: Run ${{ matrix.exec_cmd }} on ${{ matrix.ruby }}@${{ matrix.appraisal_name }} + run: bundle exec appraisal ${{ matrix.appraisal_name }} bundle exec ${{ matrix.exec_cmd }} diff --git a/.github/workflows/dependency-review.yml b/.github/workflows/dependency-review.yml new file mode 100644 index 0000000..0d4a013 --- /dev/null +++ b/.github/workflows/dependency-review.yml @@ -0,0 +1,20 @@ +# Dependency Review Action +# +# This Action will scan dependency manifest files that change as part of a Pull Request, surfacing known-vulnerable versions of the packages declared or updated in the PR. Once installed, if the workflow run is marked as required, PRs introducing known-vulnerable packages will be blocked from merging. +# +# Source repository: https://github.com/actions/dependency-review-action +# Public documentation: https://docs.github.com/en/code-security/supply-chain-security/understanding-your-software-supply-chain/about-dependency-review#dependency-review-enforcement +name: 'Dependency Review' +on: [pull_request] + +permissions: + contents: read + +jobs: + dependency-review: + runs-on: ubuntu-latest + steps: + - name: 'Checkout Repository' + uses: actions/checkout@v4 + - name: 'Dependency Review' + uses: actions/dependency-review-action@v4 diff --git a/.github/workflows/heads.yml b/.github/workflows/heads.yml new file mode 100644 index 0000000..3dffcf2 --- /dev/null +++ b/.github/workflows/heads.yml @@ -0,0 +1,98 @@ +name: Heads + +permissions: + contents: read + +env: + K_SOUP_COV_DO: false + +on: + push: + branches: + - 'main' + tags: + - '!*' # Do not execute on tags + pull_request: + branches: + - '*' + # Allow manually triggering the workflow. + workflow_dispatch: + +# Cancels all previous workflow runs for the same branch that have not yet completed. +concurrency: + # The concurrency group contains the workflow name and the branch name. + group: "${{ github.workflow }}-${{ github.ref }}" + cancel-in-progress: true + +jobs: + test: + name: Specs ${{ matrix.ruby }}@${{ matrix.appraisal_name }}${{ matrix.name_extra || '' }} + if: "!contains(github.event.commits[0].message, '[ci skip]') && !contains(github.event.commits[0].message, '[skip ci]')" + runs-on: ubuntu-latest + continue-on-error: ${{ matrix.experimental || endsWith(matrix.ruby, 'head') }} + env: # $BUNDLE_GEMFILE must be set at job level, so it is set for all steps + BUNDLE_GEMFILE: ${{ github.workspace }}/${{ matrix.gemfile }}.gemfile + strategy: + fail-fast: true + matrix: + include: + # NOTE: Heads use default rubygems / bundler; their defaults are custom, unreleased, and from the future! + # ruby-head + - ruby: "ruby-head" + appraisal_name: "omniauth-v2.1-r3" + exec_cmd: "rake spec" + gemfile: "Appraisal.root" + rubygems: default + bundler: default + +# # truffleruby-head +# - ruby: "truffleruby-head" +# appraisal_name: "omniauth-v2.1-r3" +# exec_cmd: "rake spec" +# gemfile: "Appraisal.root" +# rubygems: default +# bundler: default + + # jruby-head + - ruby: "jruby-head" + appraisal_name: "omniauth-v2.1-r3" + exec_cmd: "rake spec" + gemfile: "Appraisal.root" + rubygems: default + bundler: default + + steps: + ### COUCHDB + - name: Start CouchDB + uses: iamssen/couchdb-github-action@master + if: "endsWith(matrix.exec_cmd, 'couch_potato')" + with: + couchdb-version: "3.4.1" + + ### SMOKE-TEST + - name: Smoke CouchDB + if: "endsWith(matrix.exec_cmd, 'couch_potato')" + run: | + curl -f http://127.0.0.1:5984/ + curl -X POST -H "Content-Type: application/json; charset=utf-8" -d '{"name": "admin", "password": "password"}' http://127.0.0.1:5984/_session + + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup Ruby & RubyGems + uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ matrix.ruby }} + rubygems: ${{ matrix.rubygems }} + bundler: ${{ matrix.bundler }} + bundler-cache: false + + # Raw `bundle` will use the BUNDLE_GEMFILE set to matrix.gemfile (i.e. Appraisal.root) + # We need to do this first to get appraisal installed. + # NOTE: This does not use the main Gemfile at all. + - name: Install Root Appraisal + run: bundle + - name: Appraisal for ${{ matrix.ruby }}@${{ matrix.appraisal_name }} + run: bundle exec appraisal ${{ matrix.appraisal_name }} bundle + - name: Run ${{ matrix.exec_cmd }} on ${{ matrix.ruby }}@${{ matrix.appraisal_name }} + run: bundle exec appraisal ${{ matrix.appraisal_name }} bundle exec ${{ matrix.exec_cmd }} diff --git a/.github/workflows/jruby-ancient.yml b/.github/workflows/jruby-ancient.yml new file mode 100644 index 0000000..02f961a --- /dev/null +++ b/.github/workflows/jruby-ancient.yml @@ -0,0 +1,100 @@ +name: JRuby 9.2, 9.3 + +permissions: + contents: read + +env: + K_SOUP_COV_DO: false + +on: + push: + branches: + - 'main' + tags: + - '!*' # Do not execute on tags + pull_request: + branches: + - '*' + # Allow manually triggering the workflow. + workflow_dispatch: + +# Cancels all previous workflow runs for the same branch that have not yet completed. +concurrency: + # The concurrency group contains the workflow name and the branch name. + group: "${{ github.workflow }}-${{ github.ref }}" + cancel-in-progress: true + +jobs: + test: + name: Specs ${{ matrix.ruby }} ${{ matrix.appraisal_name }}${{ matrix.name_extra || '' }} + if: "!contains(github.event.commits[0].message, '[ci skip]') && !contains(github.event.commits[0].message, '[skip ci]')" + runs-on: ubuntu-22.04 + continue-on-error: ${{ matrix.experimental || endsWith(matrix.ruby, 'head') }} + env: # $BUNDLE_GEMFILE must be set at job level, so it is set for all steps + BUNDLE_GEMFILE: ${{ github.workspace }}/${{ matrix.gemfile }}.gemfile + strategy: + matrix: + include: + # jruby-9.2 (targets Ruby 2.5 compatibility) + - ruby: "jruby-9.2" + appraisal_name: "omniauth-v1.9-r2" + exec_cmd: "rake spec" + gemfile: "Appraisal.root" + rubygems: default + bundler: default + - ruby: "jruby-9.2" + appraisal_name: "omniauth-v2.0-r2" + exec_cmd: "rake spec" + gemfile: "Appraisal.root" + rubygems: default + bundler: default + + # jruby-9.3 (targets Ruby 2.6 compatibility) + - ruby: "jruby-9.3" + appraisal_name: "omniauth-v1.9-r2" + exec_cmd: "rake spec" + gemfile: "Appraisal.root" + rubygems: default + bundler: default + - ruby: "jruby-9.3" + appraisal_name: "omniauth-v2.0-r2" + exec_cmd: "rake spec" + gemfile: "Appraisal.root" + rubygems: default + bundler: default + + steps: + ### COUCHDB + - name: Start CouchDB + uses: iamssen/couchdb-github-action@master + if: "endsWith(matrix.exec_cmd, 'couch_potato')" + with: + couchdb-version: "3.4.1" + + ### SMOKE-TEST + - name: Smoke CouchDB + if: "endsWith(matrix.exec_cmd, 'couch_potato')" + run: | + curl -f http://127.0.0.1:5984/ + curl -X POST -H "Content-Type: application/json; charset=utf-8" -d '{"name": "admin", "password": "password"}' http://127.0.0.1:5984/_session + + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup Ruby & RubyGems + uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ matrix.ruby }} + rubygems: ${{ matrix.rubygems }} + bundler: ${{ matrix.bundler }} + bundler-cache: false + + # Raw `bundle` will use the BUNDLE_GEMFILE set to matrix.gemfile (i.e. Appraisal.root) + # We need to do this first to get appraisal installed. + # NOTE: This does not use the main Gemfile at all. + - name: Install Root Appraisal + run: bundle + - name: Appraisal for ${{ matrix.ruby }}@${{ matrix.appraisal_name }} + run: bundle exec appraisal ${{ matrix.appraisal_name }} bundle + - name: Run ${{ matrix.exec_cmd }} on ${{ matrix.ruby }}@${{ matrix.appraisal_name }} + run: bundle exec appraisal ${{ matrix.appraisal_name }} bundle exec ${{ matrix.exec_cmd }} diff --git a/.github/workflows/jruby.yml b/.github/workflows/jruby.yml new file mode 100644 index 0000000..02c2e6d --- /dev/null +++ b/.github/workflows/jruby.yml @@ -0,0 +1,80 @@ +name: JRuby + +permissions: + contents: read + +env: + K_SOUP_COV_DO: false + +on: + push: + branches: + - 'main' + tags: + - '!*' # Do not execute on tags + pull_request: + branches: + - '*' + # Allow manually triggering the workflow. + workflow_dispatch: + +# Cancels all previous workflow runs for the same branch that have not yet completed. +concurrency: + # The concurrency group contains the workflow name and the branch name. + group: "${{ github.workflow }}-${{ github.ref }}" + cancel-in-progress: true + +jobs: + test: + name: Specs ${{ matrix.ruby }} ${{ matrix.appraisal_name }}${{ matrix.name_extra || '' }} + if: "!contains(github.event.commits[0].message, '[ci skip]') && !contains(github.event.commits[0].message, '[skip ci]')" + runs-on: ubuntu-22.04 + continue-on-error: ${{ matrix.experimental || endsWith(matrix.ruby, 'head') }} + env: # $BUNDLE_GEMFILE must be set at job level, so it is set for all steps + BUNDLE_GEMFILE: ${{ github.workspace }}/${{ matrix.gemfile }}.gemfile + strategy: + matrix: + include: + # jruby-9.4 (targets Ruby 3.1 compatibility) + - ruby: "jruby-9.4" + appraisal_name: "omniauth-v2.1-r3" + exec_cmd: "rake spec" + gemfile: "Appraisal.root" + rubygems: default + bundler: default + + steps: + ### COUCHDB + - name: Start CouchDB + uses: iamssen/couchdb-github-action@master + if: "endsWith(matrix.exec_cmd, 'couch_potato')" + with: + couchdb-version: "3.4.1" + + ### SMOKE-TEST + - name: Smoke CouchDB + if: "endsWith(matrix.exec_cmd, 'couch_potato')" + run: | + curl -f http://127.0.0.1:5984/ + curl -X POST -H "Content-Type: application/json; charset=utf-8" -d '{"name": "admin", "password": "password"}' http://127.0.0.1:5984/_session + + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup Ruby & RubyGems + uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ matrix.ruby }} + rubygems: ${{ matrix.rubygems }} + bundler: ${{ matrix.bundler }} + bundler-cache: false + + # Raw `bundle` will use the BUNDLE_GEMFILE set to matrix.gemfile (i.e. Appraisal.root) + # We need to do this first to get appraisal installed. + # NOTE: This does not use the main Gemfile at all. + - name: Install Root Appraisal + run: bundle + - name: Appraisal for ${{ matrix.ruby }}@${{ matrix.appraisal_name }} + run: bundle exec appraisal ${{ matrix.appraisal_name }} bundle + - name: Run ${{ matrix.exec_cmd }} on ${{ matrix.ruby }}@${{ matrix.appraisal_name }} + run: bundle exec appraisal ${{ matrix.appraisal_name }} bundle exec ${{ matrix.exec_cmd }} diff --git a/.github/workflows/legacy.yml b/.github/workflows/legacy.yml new file mode 100644 index 0000000..b2b9be6 --- /dev/null +++ b/.github/workflows/legacy.yml @@ -0,0 +1,67 @@ +name: MRI 3.0 (Legacy) + +permissions: + contents: read + +env: + K_SOUP_COV_DO: false + +on: + push: + branches: + - 'main' + tags: + - '!*' # Do not execute on tags + pull_request: + branches: + - '*' + # Allow manually triggering the workflow. + workflow_dispatch: + +# Cancels all previous workflow runs for the same branch that have not yet completed. +concurrency: + # The concurrency group contains the workflow name and the branch name. + group: "${{ github.workflow }}-${{ github.ref }}" + cancel-in-progress: true + +jobs: + test: + name: Specs ${{ matrix.ruby }} ${{ matrix.appraisal_name }}${{ matrix.name_extra || '' }} + if: "!contains(github.event.commits[0].message, '[ci skip]') && !contains(github.event.commits[0].message, '[skip ci]')" + runs-on: ubuntu-22.04 + continue-on-error: ${{ matrix.experimental || endsWith(matrix.ruby, 'head') }} + env: # $BUNDLE_GEMFILE must be set at job level, so it is set for all steps + BUNDLE_GEMFILE: ${{ github.workspace }}/${{ matrix.gemfile }}.gemfile + strategy: + fail-fast: false + matrix: + include: + # Ruby 3.0 + - ruby: "3.0" + appraisal_name: "omniauth-v2.1-r3.0" + exec_cmd: "rake spec" + gemfile: "Appraisal.root" + rubygems: '3.5.23' + bundler: '2.5.23' + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup Ruby & RubyGems + uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ matrix.ruby }} + rubygems: ${{ matrix.rubygems }} + bundler: ${{ matrix.bundler }} + bundler-cache: false + + # Raw `bundle` will use the BUNDLE_GEMFILE set to matrix.gemfile (i.e. Appraisal.root) + # We need to do this first to get appraisal installed. + # NOTE: This does not use the main Gemfile at all. + - name: Install Root Appraisal + run: bundle + - name: Appraisal for ${{ matrix.ruby }}@${{ matrix.appraisal_name }} + run: bundle exec appraisal ${{ matrix.appraisal_name }} bundle + - name: Run ${{ matrix.exec_cmd }} on ${{ matrix.ruby }}@${{ matrix.appraisal_name }} + run: bundle exec appraisal ${{ matrix.appraisal_name }} bundle exec ${{ matrix.exec_cmd }} diff --git a/.github/workflows/style.yml b/.github/workflows/style.yml new file mode 100644 index 0000000..fda124e --- /dev/null +++ b/.github/workflows/style.yml @@ -0,0 +1,64 @@ +name: Style + +permissions: + contents: read + +on: + push: + branches: + - 'main' + tags: + - '!*' # Do not execute on tags + pull_request: + branches: + - '*' + # Allow manually triggering the workflow. + workflow_dispatch: + +# Cancels all previous workflow runs for the same branch that have not yet completed. +concurrency: + # The concurrency group contains the workflow name and the branch name. + group: "${{ github.workflow }}-${{ github.ref }}" + cancel-in-progress: true + +jobs: + rubocop: + name: Style on ${{ matrix.ruby }}@current + if: "!contains(github.event.commits[0].message, '[ci skip]') && !contains(github.event.commits[0].message, '[skip ci]')" + runs-on: ubuntu-latest + continue-on-error: ${{ matrix.experimental || endsWith(matrix.ruby, 'head') }} + env: # $BUNDLE_GEMFILE must be set at job level, so it is set for all steps + BUNDLE_GEMFILE: ${{ github.workspace }}/${{ matrix.gemfile }}.gemfile + strategy: + fail-fast: false + matrix: + include: + # Style + - ruby: "ruby" + appraisal_name: "style" + exec_cmd: "rake rubocop_gradual:check" + gemfile: "Appraisal.root" + rubygems: latest + bundler: latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup Ruby & RubyGems + uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ matrix.ruby }} + rubygems: ${{ matrix.rubygems }} + bundler: ${{ matrix.bundler }} + bundler-cache: false + + # Raw `bundle` will use the BUNDLE_GEMFILE set to matrix.gemfile (i.e. Appraisal.root) + # We need to do this first to get appraisal installed. + # NOTE: This does not use the main Gemfile at all. + - name: Install Root Appraisal + run: bundle + - name: Appraisal for ${{ matrix.ruby }}@${{ matrix.appraisal_name }} + run: bundle exec appraisal ${{ matrix.appraisal_name }} bundle + - name: Run ${{ matrix.exec_cmd }} on ${{ matrix.ruby }}@${{ matrix.appraisal_name }} + run: bundle exec appraisal ${{ matrix.appraisal_name }} bundle exec ${{ matrix.exec_cmd }} diff --git a/.github/workflows/supported.yml b/.github/workflows/supported.yml new file mode 100644 index 0000000..7bef3c6 --- /dev/null +++ b/.github/workflows/supported.yml @@ -0,0 +1,82 @@ +name: MRI (Supported) + +permissions: + contents: read + +env: + K_SOUP_COV_DO: false + +on: + push: + branches: + - 'main' + tags: + - '!*' # Do not execute on tags + pull_request: + branches: + - '*' + # Allow manually triggering the workflow. + workflow_dispatch: + +# Cancels all previous workflow runs for the same branch that have not yet completed. +concurrency: + # The concurrency group contains the workflow name and the branch name. + group: "${{ github.workflow }}-${{ github.ref }}" + cancel-in-progress: true + +jobs: + test: + name: Specs ${{ matrix.ruby }} ${{ matrix.appraisal_name }}${{ matrix.name_extra || '' }} + if: "!contains(github.event.commits[0].message, '[ci skip]') && !contains(github.event.commits[0].message, '[skip ci]')" + runs-on: ubuntu-latest + continue-on-error: ${{ matrix.experimental || endsWith(matrix.ruby, 'head') }} + env: # $BUNDLE_GEMFILE must be set at job level, so it is set for all steps + BUNDLE_GEMFILE: ${{ github.workspace }}/${{ matrix.gemfile }}.gemfile + strategy: + matrix: + include: + # Ruby 3.1 + - ruby: "3.1" + appraisal_name: "omniauth-v2.1-r3" + exec_cmd: "rake spec" + gemfile: "Appraisal.root" + rubygems: latest + bundler: latest + + # Ruby 3.2 + - ruby: "3.2" + appraisal_name: "omniauth-v2.1-r3" + exec_cmd: "rake spec" + gemfile: "Appraisal.root" + rubygems: latest + bundler: latest + + # Ruby 3.3 + - ruby: "3.3" + appraisal_name: "omniauth-v2.1-r3" + exec_cmd: "rake spec" + gemfile: "Appraisal.root" + rubygems: latest + bundler: latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup Ruby & RubyGems + uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ matrix.ruby }} + rubygems: ${{ matrix.rubygems }} + bundler: ${{ matrix.bundler }} + bundler-cache: false + + # Raw `bundle` will use the BUNDLE_GEMFILE set to matrix.gemfile (i.e. Appraisal.root) + # We need to do this first to get appraisal installed. + # NOTE: This does not use the main Gemfile at all. + - name: Install Root Appraisal + run: bundle + - name: Appraisal for ${{ matrix.ruby }}@${{ matrix.appraisal_name }} + run: bundle exec appraisal ${{ matrix.appraisal_name }} bundle + - name: Run ${{ matrix.exec_cmd }} on ${{ matrix.ruby }}@${{ matrix.appraisal_name }} + run: bundle exec appraisal ${{ matrix.appraisal_name }} bundle exec ${{ matrix.exec_cmd }} diff --git a/.github/workflows/unsupported.yml b/.github/workflows/unsupported.yml new file mode 100644 index 0000000..c0242e2 --- /dev/null +++ b/.github/workflows/unsupported.yml @@ -0,0 +1,171 @@ +name: MRI 2.6 & 2.7 (Unsupported) + +permissions: + contents: read + +env: + K_SOUP_COV_DO: false + +on: + push: + branches: + - 'main' + tags: + - '!*' # Do not execute on tags + pull_request: + branches: + - '*' + # Allow manually triggering the workflow. + workflow_dispatch: + +# Cancels all previous workflow runs for the same branch that have not yet completed. +concurrency: + # The concurrency group contains the workflow name and the branch name. + group: "${{ github.workflow }}-${{ github.ref }}" + cancel-in-progress: true + +jobs: + test: + name: Specs ${{ matrix.ruby }} ${{ matrix.appraisal_name }}${{ matrix.name_extra || '' }} + if: "!contains(github.event.commits[0].message, '[ci skip]') && !contains(github.event.commits[0].message, '[skip ci]')" + runs-on: ubuntu-22.04 + continue-on-error: ${{ matrix.experimental || endsWith(matrix.ruby, 'head') }} + env: # $BUNDLE_GEMFILE must be set at job level, so it is set for all steps + BUNDLE_GEMFILE: ${{ github.workspace }}/${{ matrix.gemfile }}.gemfile + strategy: + fail-fast: false + matrix: + include: + # Ruby 2.6 + - ruby: "2.6" + appraisal_name: "omniauth-v1.2-r2" + exec_cmd: "rake spec" + gemfile: "Appraisal.root" + rubygems: '3.4.22' + bundler: '2.4.22' + - ruby: "2.6" + appraisal_name: "omniauth-v1.3-r2" + exec_cmd: "rake spec" + gemfile: "Appraisal.root" + rubygems: '3.4.22' + bundler: '2.4.22' + - ruby: "2.6" + appraisal_name: "omniauth-v1.4-r2" + exec_cmd: "rake spec" + gemfile: "Appraisal.root" + rubygems: '3.4.22' + bundler: '2.4.22' + - ruby: "2.6" + appraisal_name: "omniauth-v1.5-r2" + exec_cmd: "rake spec" + gemfile: "Appraisal.root" + rubygems: '3.4.22' + bundler: '2.4.22' + - ruby: "2.6" + appraisal_name: "omniauth-v1.6-r2" + exec_cmd: "rake spec" + gemfile: "Appraisal.root" + rubygems: '3.4.22' + bundler: '2.4.22' + - ruby: "2.6" + appraisal_name: "omniauth-v1.7-r2" + exec_cmd: "rake spec" + gemfile: "Appraisal.root" + rubygems: '3.4.22' + bundler: '2.4.22' + - ruby: "2.6" + appraisal_name: "omniauth-v1.8-r2" + exec_cmd: "rake spec" + gemfile: "Appraisal.root" + rubygems: '3.4.22' + bundler: '2.4.22' + - ruby: "2.6" + appraisal_name: "omniauth-v1.9-r2" + exec_cmd: "rake spec" + gemfile: "Appraisal.root" + rubygems: '3.4.22' + bundler: '2.4.22' + - ruby: "2.6" + appraisal_name: "omniauth-v2.0-r2" + exec_cmd: "rake spec" + gemfile: "Appraisal.root" + rubygems: '3.4.22' + bundler: '2.4.22' + + # Ruby 2.7 + - ruby: "2.7" + appraisal_name: "omniauth-v1.2-r2" + exec_cmd: "rake spec" + gemfile: "Appraisal.root" + rubygems: '3.4.22' + bundler: '2.4.22' + - ruby: "2.7" + appraisal_name: "omniauth-v1.3-r2" + exec_cmd: "rake spec" + gemfile: "Appraisal.root" + rubygems: '3.4.22' + bundler: '2.4.22' + - ruby: "2.7" + appraisal_name: "omniauth-v1.4-r2" + exec_cmd: "rake spec" + gemfile: "Appraisal.root" + rubygems: '3.4.22' + bundler: '2.4.22' + - ruby: "2.7" + appraisal_name: "omniauth-v1.5-r2" + exec_cmd: "rake spec" + gemfile: "Appraisal.root" + rubygems: '3.4.22' + bundler: '2.4.22' + - ruby: "2.7" + appraisal_name: "omniauth-v1.6-r2" + exec_cmd: "rake spec" + gemfile: "Appraisal.root" + rubygems: '3.4.22' + bundler: '2.4.22' + - ruby: "2.7" + appraisal_name: "omniauth-v1.7-r2" + exec_cmd: "rake spec" + gemfile: "Appraisal.root" + rubygems: '3.4.22' + bundler: '2.4.22' + - ruby: "2.7" + appraisal_name: "omniauth-v1.8-r2" + exec_cmd: "rake spec" + gemfile: "Appraisal.root" + rubygems: '3.4.22' + bundler: '2.4.22' + - ruby: "2.7" + appraisal_name: "omniauth-v1.9-r2" + exec_cmd: "rake spec" + gemfile: "Appraisal.root" + rubygems: '3.4.22' + bundler: '2.4.22' + - ruby: "2.7" + appraisal_name: "omniauth-v2.0-r2" + exec_cmd: "rake spec" + gemfile: "Appraisal.root" + rubygems: '3.4.22' + bundler: '2.4.22' + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup Ruby & RubyGems + uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ matrix.ruby }} + rubygems: ${{ matrix.rubygems }} + bundler: ${{ matrix.bundler }} + bundler-cache: false + + # Raw `bundle` will use the BUNDLE_GEMFILE set to matrix.gemfile (i.e. Appraisal.root) + # We need to do this first to get appraisal installed. + # NOTE: This does not use the main Gemfile at all. + - name: Install Root Appraisal + run: bundle + - name: Appraisal for ${{ matrix.ruby }}@${{ matrix.appraisal_name }} + run: bundle exec appraisal ${{ matrix.appraisal_name }} bundle + - name: Run ${{ matrix.exec_cmd }} on ${{ matrix.ruby }}@${{ matrix.appraisal_name }} + run: bundle exec appraisal ${{ matrix.appraisal_name }} bundle exec ${{ matrix.exec_cmd }} diff --git a/.gitignore b/.gitignore index f34d9a2..159a4bd 100644 --- a/.gitignore +++ b/.gitignore @@ -1,18 +1,44 @@ +# Build Artifacts +/pkg/ +/tmp/ *.gem -*.rbc -.bundle -.config -.yardoc -Gemfile.lock -InstalledFiles -_yardoc -coverage -doc/ -lib/bundler/man -/pkg -rdoc -spec/reports -test/tmp -test/version_tmp -tmp +# Bundler +/.bundle/ +/gemfiles/*.lock +/gemfiles/.bundle/ +/gemfiles/.bundle/config +/gemfiles/vendor/ +Appraisal.*.gemfile.lock + +# Specs +.rspec_status +/coverage/ +/spec/reports/ + +# Documentation +/.yardoc/ +/_yardoc/ +/rdoc/ +/doc/ + +# Ruby Version Managers (RVM, rbenv, etc) +# Ignored because we currently use .tool-versions +.rvmrc +.ruby-version +.ruby-gemset + +# Benchmarking +/measurement/ + +# Debugger detritus +.byebug_history + +# direnv - brew install direnv +.env.local + +# OS Detritus +.DS_Store + +# Editors +*~ diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..a29d697 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,10 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Editor-based HTTP Client requests +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml +# CodeStream ignored files +/codestream.xml diff --git a/.idea/GitLink.xml b/.idea/GitLink.xml new file mode 100644 index 0000000..009597c --- /dev/null +++ b/.idea/GitLink.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/.idea/dbnavigator.xml b/.idea/dbnavigator.xml new file mode 100644 index 0000000..b9e7cc8 --- /dev/null +++ b/.idea/dbnavigator.xml @@ -0,0 +1,427 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/dictionaries/project.xml b/.idea/dictionaries/project.xml new file mode 100644 index 0000000..4e1f2b8 --- /dev/null +++ b/.idea/dictionaries/project.xml @@ -0,0 +1,8 @@ + + + + securerandom + webmock + + + \ No newline at end of file diff --git a/.idea/git_toolbox_prj.xml b/.idea/git_toolbox_prj.xml new file mode 100644 index 0000000..02b915b --- /dev/null +++ b/.idea/git_toolbox_prj.xml @@ -0,0 +1,15 @@ + + + + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..39693f0 --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..0cf8196 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/omniauth-openid.iml b/.idea/omniauth-openid.iml new file mode 100644 index 0000000..fcab90e --- /dev/null +++ b/.idea/omniauth-openid.iml @@ -0,0 +1,112 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..13b4e4e --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/.qlty/qlty.toml b/.qlty/qlty.toml new file mode 100644 index 0000000..5f1b620 --- /dev/null +++ b/.qlty/qlty.toml @@ -0,0 +1,78 @@ +# For a guide to configuration, visit https://qlty.sh/d/config +# Or for a full reference, visit https://qlty.sh/d/qlty-toml +config_version = "0" + +exclude_patterns = [ + "*_min.*", + "*-min.*", + "*.min.*", + "**/.yarn/**", + "**/*.d.ts", + "**/assets/**", + "**/bin/**", + "**/bower_components/**", + "**/build/**", + "**/cache/**", + "**/config/**", + "**/.devcontainer", + "**/db/**", + "**/deps/**", + "**/dist/**", + "**/doc/**", + "**/extern/**", + "**/external/**", + "**/generated/**", + "**/Godeps/**", + "**/gradlew/**", + "**/mvnw/**", + "**/node_modules/**", + "**/protos/**", + "**/seed/**", + "**/target/**", + "**/templates/**", + "**/testdata/**", + "**/vendor/**", + ".github/workflows/codeql-analysis.yml" +] + +test_patterns = [ + "**/test/**", + "**/spec/**", + "**/*.test.*", + "**/*.spec.*", + "**/*_test.*", + "**/*_spec.*", + "**/test_*.*", + "**/spec_*.*", +] + +[smells] +mode = "comment" + +[smells.boolean_logic] +threshold = 4 +enabled = true + +[smells.file_complexity] +threshold = 55 +enabled = false + +[smells.return_statements] +threshold = 4 +enabled = true + +[smells.nested_control_flow] +threshold = 4 +enabled = true + +[smells.function_parameters] +threshold = 4 +enabled = true + +[smells.function_complexity] +threshold = 5 +enabled = true + +[smells.duplication] +enabled = true +threshold = 20 \ No newline at end of file diff --git a/.rspec b/.rspec index 5f16476..bdb15cb 100644 --- a/.rspec +++ b/.rspec @@ -1,2 +1,3 @@ ---color ---format progress +--require spec_helper +--format=documentation +--colour diff --git a/.rubocop.yml b/.rubocop.yml new file mode 100644 index 0000000..6de99cd --- /dev/null +++ b/.rubocop.yml @@ -0,0 +1,2 @@ +inherit_gem: + rubocop-lts: config/rubygem_rspec.yml diff --git a/.rubocop_gradual.lock b/.rubocop_gradual.lock new file mode 100644 index 0000000..daae9fe --- /dev/null +++ b/.rubocop_gradual.lock @@ -0,0 +1,22 @@ +{ + "bin/bundle:247448467": [ + [64, 5, 20, "ThreadSafety/ClassInstanceVariable: Avoid class instance variables.", 2485198147] + ], + "lib/omniauth/strategies/open_id.rb:3703196606": [ + [50, 17, 10, "Lint/DuplicateHashKey: Duplicated key in hash literal.", 3672542120] + ], + "omniauth-openid.gemspec:1698529195": [ + [4, 23, 12, "Gemspec/RubyVersionGlobalsUsage: Do not use `RUBY_VERSION` in gemspec file.", 31296028] + ], + "spec/omniauth/openid/version_spec.rb:4155563924": [ + [11, 58, 25, "RSpec/DescribedClass: Use `described_class` instead of `OmniAuth::OpenID::Version`.", 3486261707] + ], + "spec/omniauth/strategies/open_id_spec.rb:1187086664": [ + [1, 1, 60, "RSpec/SpecFilePathFormat: Spec path should end with `omni_auth/strategies/open_id*_spec.rb`.", 3122388919], + [55, 13, 12, "RSpec/ContextWording: Context description should match /^when\\b/, /^with\\b/, or /^without\\b/.", 1731001529], + [72, 13, 14, "RSpec/ContextWording: Context description should match /^when\\b/, /^with\\b/, or /^without\\b/.", 468958882], + [73, 7, 45, "RSpec/NestedGroups: Maximum example group nesting exceeded [4/3].", 3384971759], + [74, 9, 37, "RSpec/MultipleExpectations: Example has too many expectations [2/1].", 526327299], + [75, 11, 7, "RSpec/PendingWithoutReason: Give the reason for pending.", 2397655994] + ] +} diff --git a/.simplecov b/.simplecov new file mode 100644 index 0000000..cde49ad --- /dev/null +++ b/.simplecov @@ -0,0 +1,5 @@ +# frozen_string_literal: true + +require "kettle/soup/cover/config" + +SimpleCov.start diff --git a/.tool-versions b/.tool-versions new file mode 100644 index 0000000..ca745c6 --- /dev/null +++ b/.tool-versions @@ -0,0 +1 @@ +ruby 3.4.4 diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index ba4092c..0000000 --- a/.travis.yml +++ /dev/null @@ -1,23 +0,0 @@ -bundler_args: --without development -before_install: - - gem update --system - - gem update bundler -cache: bundler -env: - global: - - JRUBY_OPTS="$JRUBY_OPTS --debug" -language: ruby -rvm: - - jruby-9.2.14.0 - - 2.4.10 - - 2.5.8 - - 2.6.6 - - 2.7.2 - - jruby-head - - ruby-head -matrix: - allow_failures: - - rvm: jruby-head - - rvm: ruby-head - fast_finish: true -sudo: false diff --git a/.yard_gfm_support.rb b/.yard_gfm_support.rb new file mode 100644 index 0000000..4f2f140 --- /dev/null +++ b/.yard_gfm_support.rb @@ -0,0 +1,22 @@ +# Gratefully and liberally taken from the MIT-licensed https://github.com/bensheldon/good_job/pull/113/files +require "kramdown" +require "kramdown-parser-gfm" + +# Custom markup provider class that always renders Kramdown using GFM (Github Flavored Markdown). +# GFM is needed to render markdown tables and fenced code blocks in the README. +class KramdownGfmDocument < Kramdown::Document + def initialize(source, options = {}) + options[:input] = "GFM" unless options.key?(:input) + super(source, options) + end +end + +# Insert the new provider as the highest priority option for Markdown. +# See: +# - https://github.com/lsegal/yard/issues/1157 +# - https://github.com/lsegal/yard/issues/1017 +# - https://github.com/lsegal/yard/blob/main/lib/yard/templates/helpers/markup_helper.rb +YARD::Templates::Helpers::MarkupHelper::MARKUP_PROVIDERS[:markdown].insert( + 0, + {const: "KramdownGfmDocument"}, +) diff --git a/.yardopts b/.yardopts index 7a69ee4..479134d 100644 --- a/.yardopts +++ b/.yardopts @@ -1,4 +1,11 @@ +--plugin junk +--plugin relative_markdown_links +--readme README.md +--charset utf-8 --markup markdown ---markup-provider maruku +--output docs +--load .yard_gfm_support.rb +'lib/**/*.rb' - -LICENSE +'*.md' +'*.txt' \ No newline at end of file diff --git a/Appraisal.root.gemfile b/Appraisal.root.gemfile new file mode 100644 index 0000000..9d72016 --- /dev/null +++ b/Appraisal.root.gemfile @@ -0,0 +1,12 @@ +git_source(:github) { |repo_name| "https://github.com/#{repo_name}" } + +source "https://rubygems.org" + +# Appraisal Root Gemfile is for running appraisal to generate the Appraisal Gemfiles +# in gemfiles/*gemfile. +# On CI, we use it for the Appraisal-based builds. +# We do not load the standard Gemfile, as it is tailored for local development. + +gemspec + +gem "appraisal", github: "pboling/appraisal", branch: "galtzo" diff --git a/Appraisals b/Appraisals new file mode 100644 index 0000000..32b3cc5 --- /dev/null +++ b/Appraisals @@ -0,0 +1,171 @@ +# frozen_string_literal: true + +# HOW TO UPDATE APPRAISALS: +# BUNDLE_GEMFILE=Appraisal.root.gemfile bundle +# BUNDLE_GEMFILE=Appraisal.root.gemfile bundle exec appraisal update +# bundle exec rake rubocop_gradual:autocorrect + +# Used for HEAD (nightly) releases of ruby, truffleruby, and jruby. +# Split into discrete appraisals if one of them needs a dependency locked discretely. +appraise "dep-heads" do + eval_gemfile "modular/runtime_heads.gemfile" + remove_gem "appraisal" # only present because it must be in the gemfile because we target a git branch +end + +# Test Matrix: +# - Ruby 2.4 +appraise "omniauth-v1.1-r2.4" do + eval_gemfile "modular/omniauth/r2/v1.1.gemfile" + eval_gemfile "modular/x_std_libs/r2.4/libs.gemfile" + remove_gem "appraisal" # only present because it must be in the gemfile because we target a git branch +end + +# Test Matrix: +# - Ruby 2.5 +# - Ruby 2.6 +# - Ruby 2.7 +appraise "omniauth-v1.2-r2" do + eval_gemfile "modular/omniauth/r2/v1.2.gemfile" + eval_gemfile "modular/x_std_libs/r2/libs.gemfile" + remove_gem "appraisal" # only present because it must be in the gemfile because we target a git branch +end + +# Compat: Ruby >= 2.5 +# Test Matrix: +# - Ruby 2.5 +# - Ruby 2.6 +# - Ruby 2.7 +appraise "omniauth-v1.3-r2" do + eval_gemfile "modular/omniauth/r2/v1.3.gemfile" + eval_gemfile "modular/x_std_libs/r2/libs.gemfile" + remove_gem "appraisal" # only present because it must be in the gemfile because we target a git branch +end + +# Compat: Ruby >= 2.5 +# Test Matrix: +# - Ruby 2.5 +# - Ruby 2.6 +# - Ruby 2.7 +appraise "omniauth-v1.4-r2" do + eval_gemfile "modular/omniauth/r2/v1.4.gemfile" + eval_gemfile "modular/x_std_libs/r2/libs.gemfile" + remove_gem "appraisal" # only present because it must be in the gemfile because we target a git branch +end + +# Compat: Ruby >= 2.5 +# Test Matrix: +# - Ruby 2.5 +# - Ruby 2.6 +# - Ruby 2.7 +appraise "omniauth-v1.5-r2" do + eval_gemfile "modular/omniauth/r2/v1.5.gemfile" + eval_gemfile "modular/x_std_libs/r2/libs.gemfile" + remove_gem "appraisal" # only present because it must be in the gemfile because we target a git branch +end + +# Compat: Ruby >= 2.5 +# Test Matrix: +# - Ruby 2.5 +# - Ruby 2.6 +# - Ruby 2.7 +appraise "omniauth-v1.6-r2" do + eval_gemfile "modular/omniauth/r2/v1.6.gemfile" + eval_gemfile "modular/x_std_libs/r2/libs.gemfile" + remove_gem "appraisal" # only present because it must be in the gemfile because we target a git branch +end + +# Compat: Ruby >= 2.5 +# Test Matrix: +# - Ruby 2.5 +# - Ruby 2.6 +# - Ruby 2.7 +appraise "omniauth-v1.7-r2" do + eval_gemfile "modular/omniauth/r2/v1.7.gemfile" + eval_gemfile "modular/x_std_libs/r2/libs.gemfile" + remove_gem "appraisal" # only present because it must be in the gemfile because we target a git branch +end + +# Compat: Ruby >= 2.5 +# Test Matrix: +# - Ruby 2.5 +# - Ruby 2.6 +# - Ruby 2.7 +appraise "omniauth-v1.8-r2" do + eval_gemfile "modular/omniauth/r2/v1.8.gemfile" + eval_gemfile "modular/x_std_libs/r2/libs.gemfile" + remove_gem "appraisal" # only present because it must be in the gemfile because we target a git branch +end + +# Compat: Ruby >= 2.5 +# Test Matrix: +# - Ruby 2.5 +# - JRuby 9.2 +# - Ruby 2.6 +# - JRuby 9.3 +# - Ruby 2.7 +appraise "omniauth-v1.9-r2" do + eval_gemfile "modular/omniauth/r2/v1.9.gemfile" + eval_gemfile "modular/x_std_libs/r2/libs.gemfile" + remove_gem "appraisal" # only present because it must be in the gemfile because we target a git branch +end + +# Compat: Ruby >= 2.5 +# Test Matrix: +# - Ruby 2.5 +# - JRuby 9.2 +# - Ruby 2.6 +# - JRuby 9.3 +# - Ruby 2.7 +appraise "omniauth-v2.0-r2" do + eval_gemfile "modular/omniauth/r2/v2.0.gemfile" + eval_gemfile "modular/x_std_libs/r2/libs.gemfile" + remove_gem "appraisal" # only present because it must be in the gemfile because we target a git branch +end + +# Compat: Ruby >= 2.5 +# Test Matrix: +# - Ruby 3.0 +appraise "omniauth-v2.1-r3.0" do + eval_gemfile "modular/omniauth/r3/v2.1.gemfile" + eval_gemfile "modular/x_std_libs/r3/libs.gemfile" + remove_gem "appraisal" # only present because it must be in the gemfile because we target a git branch +end + +# Compat: Ruby >= 3.1 +# Test Matrix: +# - Ruby 3.1 +# - JRuby 9.4 +# - Ruby 3.2 +# - Ruby 3.3 +# - JRuby 10.0 +# - jruby-head +appraise "omniauth-v2.1-r3" do + eval_gemfile "modular/omniauth/r3/v2.1.gemfile" + eval_gemfile "modular/x_std_libs/r3/libs.gemfile" + remove_gem "appraisal" # only present because it must be in the gemfile because we target a git branch +end + +# Only run security audit on the latest version of Ruby +appraise "audit" do + eval_gemfile "modular/omniauth/r3/v2.1.gemfile" + eval_gemfile "modular/audit.gemfile" + eval_gemfile "modular/x_std_libs/r3/libs.gemfile" + remove_gem "appraisal" # only present because it must be in the gemfile because we target a git branch +end + +# Only run coverage on the latest version of Ruby +appraise "coverage" do + eval_gemfile "modular/omniauth/r3/v2.1.gemfile" + eval_gemfile "modular/coverage.gemfile" + gem "ostruct", "~> 0.6", ">= 0.6.1" # Ruby >= 2.5 + eval_gemfile "modular/x_std_libs/r3/libs.gemfile" + remove_gem "appraisal" # only present because it must be in the gemfile because we target a git branch +end + +# Only run linter on the latest version of Ruby (but, in support of the oldest supported Ruby version) +appraise "style" do + eval_gemfile "modular/style.gemfile" + eval_gemfile "modular/omniauth/r3/v2.1.gemfile" + eval_gemfile "modular/x_std_libs/r3/libs.gemfile" + remove_gem "appraisal" # only present because it must be in the gemfile because we target a git branch +end diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..c55955f --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,54 @@ +# Changelog + +This file documents all notable changes to this project since v2.0.2. + +The format is based on [Keep a Changelog v1](https://keepachangelog.com/en/1.0.0/), +and this project adheres to [Semantic Versioning v2](https://semver.org/spec/v2.0.0.html). + +## [Unreleased] +### Added +### Changed +### Deprecated +### Removed +### Fixed +### Security + +## [2.0.2] - 2025-06-08 +- TAG: [v2.0.2][2.0.2t] +- COVERAGE: 92.06% -- 348/378 lines in 15 files +- BRANCH COVERAGE: 79.49% -- 62/78 branches in 15 files +- 44.44% documented +### Added +- Github Actions for Continuous Integration by @pboling + - Test workflows with latest dependencies and more platform and dep HEADs + - Expanded test suite, covering many more points of the dependency matrix +- More documentation by @pboling +- 20 year signing cert expires 2045-04-29 by @pboling +- Added CITATION.cff by @pboling +- devcontainer for easier maintenance by @pboling +- Add SECURITY.md policy by @pboling +- CONTRIBUTING.md - Instructions for contributing by @pboling +- Modernized gem structure, and updated dependencies for development by @pboling +- Set `SKIP_GEM_SIGNING` in env to allow `gem build` without cryptographic signing requirement by @pboling + - Useful for linux distros whose package managers sign packages independently +### Changed +- Updated Code of Conduct to Contributor Covenant v2.1 by @pboling + +## [2.0.1] - 2021-01-19 +- TAG: [v2.0.0][2.0.0t] + +## [1.0.1] - 2011-11-04 +- TAG: [v1.0.1][1.0.1t] + +## [1.0.0] - 2011-11-02 +- TAG: [v1.0.][1.0.0t] + +[Unreleased]: https://github.com/omniauth/omniauth-openid/compare/v2.0.2...HEAD +[2.0.2]: https://github.com/omniauth/omniauth-openid/compare/v2.0.2...v2.0.1 +[2.0.2t]: https://github.com/omniauth/omniauth-openid/tags/v2.0.2 +[2.0.1]: https://github.com/omniauth/omniauth-openid/compare/v2.0.1...v1.0.1 +[2.0.1t]: https://github.com/omniauth/omniauth-openid/tags/v2.0.1 +[1.0.1]: https://github.com/omniauth/omniauth-openid/compare/v1.0.1...v1.0.0 +[1.0.1t]: https://github.com/omniauth/omniauth-openid/tags/v1.0.1 +[1.0.0]: https://github.com/omniauth/omniauth-openid/compare/6019f3abd7b707567e2217c91be64f7a6c4aa34b...v1.0.0 +[1.0.0t]: https://github.com/omniauth/omniauth-openid/tags/v1.0.0 diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index d33878e..6be4700 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -53,7 +53,7 @@ decisions when appropriate. 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, +Examples of representing our community include using an official email address, posting via an official social media account, or acting as an appointed representative at an online or offline event. @@ -61,7 +61,7 @@ representative at an online or offline event. Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at -[INSERT CONTACT METHOD]. +[![Contact BDFL][🚂bdfl-contact-img]][🚂bdfl-contact]. All complaints will be reviewed and investigated promptly and fairly. All community leaders are obligated to respect the privacy and security of the @@ -131,4 +131,5 @@ For answers to common questions about this code of conduct, see the FAQ at [Mozilla CoC]: https://github.com/mozilla/diversity [FAQ]: https://www.contributor-covenant.org/faq [translations]: https://www.contributor-covenant.org/translations - +[🚂bdfl-contact]: http://www.railsbling.com/contact +[🚂bdfl-contact-img]: https://img.shields.io/badge/Contact-BDFL-0093D0.svg?style=flat&logo=rubyonrails&logoColor=red diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100755 index 0000000..c0e650c --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,132 @@ +# Contributing + +Bug reports and pull requests are welcome on GitHub at [https://github.com/omniauth/omniauth-openid][🚎src-main]. +This project should be a safe, welcoming space for collaboration, so contributors agree to adhere to +the [code of conduct][🤝conduct]. + +To submit a patch, please fork the project, create a patch with tests, and send a pull request. + +Remember to [![Keep A Changelog][📗keep-changelog-img]][📗keep-changelog] if you make changes. + +## Help out! + +Take a look at the `reek` list which is the file called `REEK` and find something to improve. + +Follow these instructions: + +1. Fork the repository +2. Create a feature branch (`git checkout -b my-new-feature`) +3. Make some fixes. +4. Commit changes (`git commit -am 'Added some feature'`) +5. Push to the branch (`git push origin my-new-feature`) +6. Make sure to add tests for it. This is important, so it doesn't break in a future release. +7. Create new Pull Request. + +## Appraisals + +From time to time the appraisal gemfiles in `gemfiles/` will need to be updated. + +NOTE: The `eval_gemfile` feature comes from a [fork][🚎appraisal-fork] of Appraisal. + +Please upvote the PR for `eval_gemfile` [support][🚎appraisal-eval-gemfile-pr] + +Create or update them with the commands: + +```shell +BUNDLE_GEMFILE=Appraisal.root.gemfile bundle +BUNDLE_GEMFILE=Appraisal.root.gemfile bundle exec appraisal update +bundle exec rake rubocop_gradual:autocorrect +``` + +When adding an appraisal to CI, check the [runner tool cache][đŸƒâ€â™‚ī¸runner-tool-cache] to see which runner to use. + +## The Reek List + +Take a look at the `reek` list which is the file called `REEK` and find something to improve. + +To refresh the `reek` list: + +```bash +bundle exec reek > REEK +``` + +## Run Tests + +To run all tests: + +```bash +bundle exec rake test +``` + +## Lint It + +Run all the default tasks, which includes running the gradually autocorrecting linter, `rubocop-gradual`. + +```bash +bundle exec rake +``` + +Or just run the linter. + +```bash +bundle exec rake rubocop_gradual:autocorrect +``` + +## Contributors + +[![Contributors][🖐contributors-img]][🖐contributors] + +Made with [contributors-img][🖐contrib-rocks]. + +## For Maintainers + +### One-time, Per-maintainer, Setup + +**IMPORTANT**: To sign a build, +a 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). +All releases to RubyGems.org are signed releases. +See: [RubyGems Security Guide][đŸ”’ī¸rubygems-security-guide] + +NOTE: To build without signing the gem set `SKIP_GEM_SIGNING` to any value in the environment. + +### To release a new version: + +1. Run `bin/setup && bin/rake` as a "test, coverage, & linting" sanity check +2. Update the version number in `version.rb`, and ensure `CHANGELOG.md` reflects changes +3. Run `bin/setup && bin/rake` again as a secondary check, and to update `Gemfile.lock` +4. Run `git commit -am "🔖 Prepare release v"` to commit the changes +5. Run `git push` to trigger the final CI pipeline before release, and merge PRs + - NOTE: Remember to [check the build][đŸ§Ēbuild]. +6. Run `export GIT_TRUNK_BRANCH_NAME="$(git remote show origin | grep 'HEAD branch' | cut -d ' ' -f5)" && echo $GIT_TRUNK_BRANCH_NAME` +7. Run `git checkout $GIT_TRUNK_BRANCH_NAME` +8. Run `git pull origin $GIT_TRUNK_BRANCH_NAME` to ensure latest trunk code +9. Set `SOURCE_DATE_EPOCH` so `rake build` and `rake release` use same timestamp, and generate same checksums + - Run `export SOURCE_DATE_EPOCH=$EPOCHSECONDS && echo $SOURCE_DATE_EPOCH` + - If the echo above has no output, then it didn't work. + - Note: `zsh/datetime` module is needed, if running `zsh`. + - In older versions of `bash` you can use `date +%s` instead, i.e. `export SOURCE_DATE_EPOCH=$(date +%s) && echo $SOURCE_DATE_EPOCH` +10. Run `bundle exec rake build` +11. Run `bin/gem_checksums` (more context [1][đŸ”’ī¸rubygems-checksums-pr], [2][đŸ”’ī¸rubygems-guides-pr]) + to create SHA-256 and SHA-512 checksums. This functionality is provided by the `stone_checksums` + [gem][💎stone_checksums]. + - The script automatically commits but does not push the checksums +12. 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] + +13. [🚎src-main]: https://github.com/omniauth/omniauth-openid +[đŸ§Ēbuild]: https://github.com/omniauth/omniauth-openid/actions +[🤝conduct]: https://github.com/omniauth/omniauth-openid/blob/main/CODE_OF_CONDUCT.md +[🖐contrib-rocks]: https://contrib.rocks +[🖐contributors]: https://github.com/omniauth/omniauth-openid/graphs/contributors +[🖐contributors-img]: https://contrib.rocks/image?repo=omniauth/omniauth-openid +[💎rubygems]: https://rubygems.org +[đŸ”’ī¸rubygems-security-guide]: https://guides.rubygems.org/security/#building-gems +[đŸ”’ī¸rubygems-checksums-pr]: https://github.com/rubygems/rubygems/pull/6022 +[đŸ”’ī¸rubygems-guides-pr]: https://github.com/rubygems/guides/pull/325 +[💎stone_checksums]: https://github.com/pboling/stone_checksums +[📗keep-changelog]: https://keepachangelog.com/en/1.0.0/ +[📗keep-changelog-img]: https://img.shields.io/badge/keep--a--changelog-1.0.0-FFDD67.svg?style=flat +[🚎appraisal-eval-gemfile-pr]: https://github.com/thoughtbot/appraisal/pull/248 +[🚎appraisal-fork]: https://github.com/pboling/appraisal/tree/galtzo +[đŸƒâ€â™‚ī¸runner-tool-cache]: https://github.com/ruby/ruby-builder/releases/tag/toolcache diff --git a/Gemfile b/Gemfile index 402aaf2..46be10c 100644 --- a/Gemfile +++ b/Gemfile @@ -1,23 +1,43 @@ -source 'http://rubygems.org' +#### IMPORTANT ####################################################### +# Gemfile is for local development ONLY; Gemfile is NOT loaded in CI # +####################################################### IMPORTANT #### -gem 'rake', '~> 12.0' +source "https://rubygems.org" -platforms :jruby do - gem 'jruby-openssl', '~> 0.9' -end - -gem 'ruby-openid', '2.1.8', :git => 'git://github.com/mbleigh/ruby-openid.git' +git_source(:github) { |repo_name| "https://github.com/#{repo_name}" } gemspec -group :development, :test do - gem 'rack-test' - gem 'rspec', '>= 3.0' - gem 'simplecov', '>= 0.9' - gem 'webmock', '~> 3.0' - gem 'yard', '>= 0.9.11' -end - -group :example do - gem 'sinatra' -end +### Std Lib Extracted Gems +eval_gemfile "gemfiles/modular/x_std_libs/r3/libs.gemfile" + +### Security Audit +eval_gemfile "gemfiles/modular/audit.gemfile" + +### Documentation +eval_gemfile "gemfiles/modular/documentation.gemfile" + +### Linting +eval_gemfile "gemfiles/modular/style.gemfile" + +# Code Coverage +eval_gemfile "gemfiles/modular/coverage.gemfile" + +### Testing +gem "appraisal", github: "pboling/appraisal", branch: "galtzo" + +# gem 'rake', '~> 12.0' + +# platforms :jruby do +# gem 'jruby-openssl', '~> 0.9' +# end +# group :development, :test do +# gem 'rack-test' +# gem 'rspec', '>= 3.0' +# gem 'simplecov', '>= 0.9' +# gem 'webmock'#, '~> 3.0' +# gem 'yard', '>= 0.9.11' +# end +# group :example do +# gem 'sinatra' +# end diff --git a/Gemfile.lock b/Gemfile.lock index 1cc6560..2aae65f 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,41 +1,128 @@ GIT - remote: git://github.com/mbleigh/ruby-openid.git - revision: 4b6fdd152edbc9d1f617056879eb03bd82b78eb4 + remote: https://github.com/pboling/appraisal + revision: a3a3e4b7db67d9b085f96b2ffddd2b51bd8a1196 + branch: galtzo specs: - ruby-openid (2.1.8) + appraisal (3.0.0.rc1) + bundler (>= 1.17.3) + rake (>= 10) + thor (>= 0.14) + +GIT + remote: https://github.com/pboling/yard-junk + revision: 54ccebabbfa9a9cd44d0b991687ebbfd22c32b55 + branch: next + specs: + yard-junk (0.0.10) + backports (>= 3.18) + benchmark + ostruct + rainbow + yard PATH remote: . specs: - omniauth-openid (2.0.1) - omniauth (>= 1.0, < 3.0) - rack-openid (~> 1.4.0) + omniauth-openid (2.0.2) + omniauth (>= 1.1) + rack-openid (~> 1.4) + ruby-openid (~> 2.1, >= 2.1.8) + version_gem (~> 1.1, >= 1.1.8) GEM - remote: http://rubygems.org/ + remote: https://rubygems.org/ specs: - addressable (2.8.1) - public_suffix (>= 2.0.2, < 6.0) - base64 (0.2.0) - crack (0.4.5) + addressable (2.8.7) + public_suffix (>= 2.0.2, < 7.0) + ansi (1.5.0) + ast (2.4.3) + backports (3.25.1) + base64 (0.3.0) + benchmark (0.4.1) + bigdecimal (3.2.2) + bundler-audit (0.9.2) + bundler (>= 1.2.0, < 3) + thor (~> 1.0) + concurrent-ruby (1.3.5) + crack (1.0.0) + bigdecimal rexml - diff-lcs (1.4.4) - docile (1.3.5) - hashdiff (1.0.1) - hashie (4.1.0) + date (3.4.1) + diff-lcs (1.6.2) + diffy (3.4.3) + docile (1.4.1) + dry-configurable (1.3.0) + dry-core (~> 1.1) + zeitwerk (~> 2.6) + dry-core (1.1.0) + concurrent-ruby (~> 1.0) + logger + zeitwerk (~> 2.6) + dry-inflector (1.2.0) + dry-initializer (3.2.0) + dry-logic (1.6.0) + bigdecimal + concurrent-ruby (~> 1.0) + dry-core (~> 1.1) + zeitwerk (~> 2.6) + dry-schema (1.14.1) + concurrent-ruby (~> 1.0) + dry-configurable (~> 1.0, >= 1.0.1) + dry-core (~> 1.1) + dry-initializer (~> 3.2) + dry-logic (~> 1.5) + dry-types (~> 1.8) + zeitwerk (~> 2.6) + dry-types (1.8.2) + bigdecimal (~> 3.0) + concurrent-ruby (~> 1.0) + dry-core (~> 1.0) + dry-inflector (~> 1.0) + dry-logic (~> 1.4) + zeitwerk (~> 2.6) + erb (5.0.1) + hashdiff (1.2.0) + hashie (5.0.0) + json (2.12.2) + kettle-soup-cover (1.0.9) + simplecov (~> 0.22) + simplecov-cobertura (~> 2.1) + simplecov-console (~> 0.9, >= 0.9.1) + simplecov-html (~> 0.12) + simplecov-lcov (~> 0.8) + simplecov-rcov (~> 0.3, >= 0.3.3) + simplecov_json_formatter (~> 0.1, >= 0.1.4) + version_gem (~> 1.1, >= 1.1.7) + kramdown (2.5.1) + rexml (>= 3.3.9) + kramdown-parser-gfm (1.1.0) + kramdown (~> 2.0) + language_server-protocol (3.17.0.5) + lint_roller (1.1.0) logger (1.7.0) - mustermann (3.0.3) - ruby2_keywords (~> 0.0.1) + mutex_m (0.3.0) + nokogiri (1.18.8-x86_64-linux-gnu) + racc (~> 1.4) omniauth (2.1.3) hashie (>= 3.4.6) rack (>= 2.2.3) rack-protection - public_suffix (5.0.0) + ostruct (0.6.1) + parallel (1.27.0) + parser (3.3.8.0) + ast (~> 2.4.1) + racc + prism (1.4.0) + psych (5.2.6) + date + stringio + public_suffix (6.0.2) + racc (1.8.1) rack (3.1.16) rack-openid (1.4.2) rack (>= 1.1.0) ruby-openid (>= 2.1.8) - rack-protection (4.1.0) + rack-protection (4.1.1) base64 (>= 0.1.0) logger (>= 1.6.0) rack (>= 3.0.0, < 4) @@ -44,54 +131,170 @@ GEM rack (>= 3.0.0) rack-test (2.2.0) rack (>= 1.3) - rake (12.3.3) - rexml (3.3.9) - rspec (3.10.0) - rspec-core (~> 3.10.0) - rspec-expectations (~> 3.10.0) - rspec-mocks (~> 3.10.0) - rspec-core (3.10.1) - rspec-support (~> 3.10.0) - rspec-expectations (3.10.1) + rainbow (3.1.1) + rake (13.3.0) + rdoc (6.14.0) + erb + psych (>= 4.0.0) + reek (6.5.0) + dry-schema (~> 1.13) + logger (~> 1.6) + parser (~> 3.3.0) + rainbow (>= 2.0, < 4.0) + rexml (~> 3.1) + regexp_parser (2.10.0) + rexml (3.4.1) + rspec (3.13.1) + rspec-core (~> 3.13.0) + rspec-expectations (~> 3.13.0) + rspec-mocks (~> 3.13.0) + rspec-block_is_expected (1.0.6) + rspec-core (3.13.4) + rspec-support (~> 3.13.0) + rspec-expectations (3.13.5) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.13.0) + rspec-mocks (3.13.5) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.10.0) - rspec-mocks (3.10.1) + rspec-support (~> 3.13.0) + rspec-support (3.13.4) + rubocop (1.75.8) + json (~> 2.3) + language_server-protocol (~> 3.17.0.2) + lint_roller (~> 1.1.0) + parallel (~> 1.10) + parser (>= 3.3.0.2) + rainbow (>= 2.2.2, < 4.0) + regexp_parser (>= 2.9.3, < 3.0) + rubocop-ast (>= 1.44.0, < 2.0) + ruby-progressbar (~> 1.7) + unicode-display_width (>= 2.4.0, < 4.0) + rubocop-ast (1.45.0) + parser (>= 3.3.7.2) + prism (~> 1.4) + rubocop-gradual (0.3.6) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.10.0) - rspec-support (3.10.1) - ruby2_keywords (0.0.5) - simplecov (0.18.5) + diffy (~> 3.0) + parallel (~> 1.10) + rainbow (>= 2.2.2, < 4.0) + rubocop (~> 1.0) + rubocop-lts (12.1.1) + rubocop-ruby2_4 (>= 2.0.3, < 3) + standard-rubocop-lts (>= 1.0.3, < 3) + version_gem (>= 1.1.2, < 3) + rubocop-md (1.2.4) + rubocop (>= 1.45) + rubocop-packaging (0.6.0) + lint_roller (~> 1.1.0) + rubocop (>= 1.72.1, < 2.0) + rubocop-performance (1.25.0) + lint_roller (~> 1.1) + rubocop (>= 1.75.0, < 2.0) + rubocop-ast (>= 1.38.0, < 2.0) + rubocop-rake (0.7.1) + lint_roller (~> 1.1) + rubocop (>= 1.72.1) + rubocop-rspec (3.6.0) + lint_roller (~> 1.1) + rubocop (~> 1.72, >= 1.72.1) + rubocop-ruby2_4 (2.0.5) + rubocop-gradual (~> 0.3, >= 0.3.1) + rubocop-md (~> 1.2) + rubocop-rake (~> 0.6) + rubocop-shopify (~> 2.14) + rubocop-thread_safety (~> 0.5, >= 0.5.1) + standard-rubocop-lts (~> 1.0, >= 1.0.7) + version_gem (>= 1.1.3, < 3) + rubocop-shopify (2.17.1) + rubocop (~> 1.62) + rubocop-thread_safety (0.7.2) + lint_roller (~> 1.1) + rubocop (~> 1.72, >= 1.72.1) + ruby-openid (2.9.2) + ruby-progressbar (1.13.0) + simplecov (0.22.0) docile (~> 1.1) simplecov-html (~> 0.11) - simplecov-html (0.12.3) - sinatra (4.1.0) - logger (>= 1.6.0) - mustermann (~> 3.0) - rack (>= 3.0.0, < 4) - rack-protection (= 4.1.0) - rack-session (>= 2.0.0, < 3) - tilt (~> 2.0) - tilt (2.6.0) - webmock (3.11.1) - addressable (>= 2.3.6) + simplecov_json_formatter (~> 0.1) + simplecov-cobertura (2.1.0) + rexml + simplecov (~> 0.19) + simplecov-console (0.9.3) + ansi + simplecov + terminal-table + simplecov-html (0.13.1) + simplecov-lcov (0.8.0) + simplecov-rcov (0.3.7) + simplecov (>= 0.4.1) + simplecov_json_formatter (0.1.4) + standard (1.50.0) + language_server-protocol (~> 3.17.0.2) + lint_roller (~> 1.0) + rubocop (~> 1.75.5) + standard-custom (~> 1.0.0) + standard-performance (~> 1.8) + standard-custom (1.0.2) + lint_roller (~> 1.0) + rubocop (~> 1.50) + standard-performance (1.8.0) + lint_roller (~> 1.1) + rubocop-performance (~> 1.25.0) + standard-rubocop-lts (1.0.10) + rspec-block_is_expected (~> 1.0, >= 1.0.5) + standard (>= 1.35.1, < 2) + standard-custom (>= 1.0.2, < 2) + standard-performance (>= 1.3.1, < 2) + version_gem (>= 1.1.4, < 3) + stone_checksums (1.0.0) + version_gem (>= 1.1.5, < 3) + stringio (3.1.7) + terminal-table (4.0.0) + unicode-display_width (>= 1.1.1, < 4) + thor (1.3.2) + unicode-display_width (3.1.4) + unicode-emoji (~> 4.0, >= 4.0.4) + unicode-emoji (4.0.4) + version_gem (1.1.8) + webmock (3.25.1) + addressable (>= 2.8.0) crack (>= 0.3.2) hashdiff (>= 0.4.0, < 2.0.0) - yard (0.9.36) + yard (0.9.37) + yard-relative_markdown_links (0.5.0) + nokogiri (>= 1.14.3, < 2) + zeitwerk (2.7.3) PLATFORMS - ruby + x86_64-linux DEPENDENCIES - jruby-openssl (~> 0.9) + appraisal! + benchmark (~> 0.4, >= 0.4.1) + bundler-audit (~> 0.9.2) + kettle-soup-cover (~> 1.0, >= 1.0.6) + kramdown (~> 2.5, >= 2.5.1) + kramdown-parser-gfm (~> 1.1) + logger (~> 1.7) + mutex_m (~> 0.2) omniauth-openid! - rack-test - rake (~> 12.0) - rspec (>= 3.0) - ruby-openid (= 2.1.8)! - simplecov (>= 0.9) - sinatra - webmock (~> 3.0) - yard (>= 0.9.11) + rack-session (>= 1) + rack-test (~> 2.2) + rake (~> 13) + rdoc (~> 6.11) + reek (~> 6.5) + rspec (~> 3) + rspec-block_is_expected (~> 1.0, >= 1.0.6) + rubocop-lts (~> 12.1, >= 12.1.1) + rubocop-packaging (~> 0.6, >= 0.6.0) + rubocop-rspec (~> 3.6) + standard (>= 1.50) + stone_checksums (~> 1.0) + stringio (>= 3.0) + webmock (~> 3.18, >= 3.18.1) + yard (~> 0.9, >= 0.9.37) + yard-junk (~> 0.0, >= 0.0.10)! + yard-relative_markdown_links (~> 0.5.0) BUNDLED WITH - 2.2.5 + 2.6.9 diff --git a/Guardfile b/Guardfile index fbefba2..9ca65f8 100644 --- a/Guardfile +++ b/Guardfile @@ -1,9 +1,8 @@ # A sample Guardfile # More info at https://github.com/guard/guard#readme -guard 'rspec', :version => 2 do +guard "rspec", version: 2 do watch(%r{^spec/.+_spec\.rb$}) - watch(%r{^lib/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" } - watch('spec/spec_helper.rb') { "spec" } + watch(%r{^lib/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" } + watch("spec/spec_helper.rb") { "spec" } end - diff --git a/LICENSE b/LICENSE deleted file mode 100644 index 811fa0e..0000000 --- a/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2010-2011 Michael Bleigh and Intridea, Inc. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/LICENSE.txt b/LICENSE.txt new file mode 100644 index 0000000..d88543b --- /dev/null +++ b/LICENSE.txt @@ -0,0 +1,23 @@ +MIT License + +Copyright (c) 2025 Peter H. Boling, and omniauth-openid contributors +Copyright (c) 2010-2011 Michael Bleigh, and Intridea, Inc. + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/README.md b/README.md index 164163d..887a0f4 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,26 @@ -# OmniAuth::OpenID +

+ + Galtzo.com Logo by Aboling0, CC BY-SA 4.0 + + + OmniAuth Logo possibly by Ted O'Meara, license unknown + + + OmniAuth Logo possibly by Ted O'Meara, license unknown + + + Yukihiro Matsumoto, Ruby Visual Identity Team, CC BY-SA 2.5 + +

-[![Liberapay Goal Progress][â›ŗliberapay-img]][â›ŗliberapay] [![Sponsor Me on Github][🖇sponsor-img]][🖇sponsor] [![Buy me a coffee][🖇buyme-small-img]][🖇buyme] [![Donate on Polar][🖇polar-img]][🖇polar] [![Donate to my FLOSS or refugee efforts at ko-fi.com][🖇kofi-img]][🖇kofi] [![Donate to my FLOSS or refugee efforts using Patreon][🖇patreon-img]][🖇patreon] +# đŸĢĩ OmniAuth::OpenID + +[![Version][đŸ‘Ŋversioni]][đŸ‘Ŋversion] [![License: MIT][📄license-img]][📄license-ref] [![Downloads Rank][đŸ‘Ŋdl-ranki]][đŸ‘Ŋdl-rank] [![Open Source Helpers][đŸ‘Ŋoss-helpi]][đŸ‘Ŋoss-help] [![Depfu][🔑depfuiâ™ģī¸]][🔑depfu] [![CodeCov Test Coverage][🔑codecoviâ™ģī¸]][🔑codecov] [![Coveralls Test Coverage][🔑coveralls-img]][🔑coveralls] [![CI Heads][🚎3-hd-wfi]][🚎3-hd-wf] [![CI Runtime Dependencies @ HEAD][🚎12-crh-wfi]][🚎12-crh-wf] [![CI Current][🚎11-c-wfi]][🚎11-c-wf] [![CI JRuby][🚎10-j-wfi]][🚎10-j-wf] [![CI Supported][🚎6-s-wfi]][🚎6-s-wf] [![CI Legacy][🚎4-lg-wfi]][🚎4-lg-wf] [![CI Unsupported][🚎7-us-wfi]][🚎7-us-wf] [![CI Ancient][🚎1-an-wfi]][🚎1-an-wf] [![CI Test Coverage][🚎2-cov-wfi]][🚎2-cov-wf] [![CI Style][🚎5-st-wfi]][🚎5-st-wf] --- + +[![Liberapay Goal Progress][â›ŗliberapay-img]][â›ŗliberapay] [![Sponsor Me on Github][🖇sponsor-img]][🖇sponsor] [![Buy me a coffee][🖇buyme-small-img]][🖇buyme] [![Donate on Polar][🖇polar-img]][🖇polar] [![Donate to my FLOSS or refugee efforts at ko-fi.com][🖇kofi-img]][🖇kofi] [![Donate to my FLOSS or refugee efforts using Patreon][🖇patreon-img]][🖇patreon] + [â›ŗliberapay-img]: https://img.shields.io/liberapay/goal/pboling.svg?logo=liberapay [â›ŗliberapay]: https://liberapay.com/pboling/donate [🖇sponsor-img]: https://img.shields.io/badge/Sponsor_Me!-pboling.svg?style=social&logo=github @@ -15,38 +33,96 @@ [🖇patreon]: https://patreon.com/galtzo [🖇buyme-small-img]: https://img.shields.io/badge/buy_me_a_coffee-✓-yellow.svg?style=flat -Provides strategies for authenticating to providers using the OpenID v2 standard, which is deprecated, and very old. It is *not* for the modern OpenID Connect standard. If you want OpenID Connect then you want: [omniauth/omniauth_openid_connect](https://github.com/omniauth/omniauth_openid_connect) +Provides strategies for authenticating to providers using the OpenID v2 standard, which is deprecated, and very old. It is *not* for the modern OpenID Connect (OIDC) standard. For OpenID Connect (OIDC) check out: [omniauth/omniauth_openid_connect](https://github.com/omniauth/omniauth_openid_connect) + +| Tokens to Remember | [![Gem name][â›ŗī¸name-img]][â›ŗī¸gem-name] [![Gem namespace][â›ŗī¸namespace-img]][â›ŗī¸gem-namespace] | +|-----------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Works with JRuby | [![JRuby 9.2 Compat][💎jruby-9.2i]][🚎10-j-wf] [![JRuby 9.3 Compat][💎jruby-9.3i]][🚎10-j-wf] [![JRuby 9.4 Compat][💎jruby-9.4i]][🚎10-j-wf] [![JRuby 10.0 Compat][💎jruby-c-i]][🚎11-c-wf] [![JRuby HEAD Compat][💎jruby-headi]][🚎3-hd-wf] | +| Works with MRI Ruby 3 | [![Ruby 3.0 Compat][💎ruby-3.0i]][🚎4-lg-wf] [![Ruby 3.1 Compat][💎ruby-3.1i]][🚎6-s-wf] [![Ruby 3.2 Compat][💎ruby-3.2i]][🚎6-s-wf] [![Ruby 3.3 Compat][💎ruby-3.3i]][🚎6-s-wf] [![Ruby 3.4 Compat][💎ruby-c-i]][🚎11-c-wf] [![Ruby HEAD Compat][💎ruby-headi]][🚎3-hd-wf] | +| Works with MRI Ruby 2 | [![Ruby 2.4 Compat][💎ruby-2.4i]][🚎1-an-wf] [![Ruby 2.5 Compat][💎ruby-2.5i]][🚎1-an-wf] [![Ruby 2.6 Compat][💎ruby-2.6i]][🚎7-us-wf] [![Ruby 2.7 Compat][💎ruby-2.7i]][🚎7-us-wf] | +| Source | [![Source on GitLab.com][📜src-gl-img]][📜src-gl] [![Source on CodeBerg.org][📜src-cb-img]][📜src-cb] [![Source on Github.com][📜src-gh-img]][📜src-gh] [![The best SHA: dQw4w9WgXcQ!][🧮kloc-img]][🧮kloc] | +| Documentation | [![Current release on RubyDoc.info][📜docs-cr-rd-img]][🚎yard-current] [![YARD on Galtzo.com][📜docs-head-rd-img]][🚎yard-head] [![BDFL Blog][🚂bdfl-blog-img]][🚂bdfl-blog] [![Wiki][📜wiki-img]][📜wiki] | +| Compliance | [![License: MIT][📄license-img]][📄license-ref] [![📄ilo-declaration-img]][📄ilo-declaration] [![Security Policy][🔐security-img]][🔐security] [![Contributor Covenant 2.1][đŸĒ‡conduct-img]][đŸĒ‡conduct] [![SemVer 2.0.0][📌semver-img]][📌semver] | +| Style | [![Enforced Code Style Linter][💎rlts-img]][💎rlts] [![Keep-A-Changelog 1.0.0][📗keep-changelog-img]][📗keep-changelog] [![Gitmoji Commits][📌gitmoji-img]][📌gitmoji] | +| Support | [![Live Chat on Discord][âœ‰ī¸discord-invite-img]][âœ‰ī¸discord-invite] [![Get help from me on Upwork][👨đŸŧ‍đŸĢexpsup-upwork-img]][👨đŸŧ‍đŸĢexpsup-upwork] [![Get help from me on Codementor][👨đŸŧ‍đŸĢexpsup-codementor-img]][👨đŸŧ‍đŸĢexpsup-codementor] | +| Enterprise Support | [![Get help from me on Tidelift][đŸ™ī¸entsup-tidelift-img]][đŸ™ī¸entsup-tidelift]
💡Subscribe for support guarantees covering _all_ FLOSS dependencies!
💡Tidelift is part of [Sonar][đŸ™ī¸entsup-tidelift-sonar]!
💡Tidelift pays maintainers to maintain the software you depend on!
📊`@`Pointy Haired Boss: An [enterprise support][đŸ™ī¸entsup-tidelift] subscription is "[never gonna let you down][🧮kloc]", and *supports* open source maintainers! | +| Comrade BDFL đŸŽ–ī¸ | [![Follow Me on LinkedIn][💖🖇linkedin-img]][💖🖇linkedin] [![Follow Me on Ruby.Social][💖🐘ruby-mast-img]][💖🐘ruby-mast] [![Follow Me on Bluesky][💖đŸĻ‹bluesky-img]][💖đŸĻ‹bluesky] [![Contact BDFL][🚂bdfl-contact-img]][🚂bdfl-contact] [![My technical writing][💖💁đŸŧâ€â™‚ī¸devto-img]][💖💁đŸŧâ€â™‚ī¸devto] | +| `...` 💖 | [![Find Me on WellFound:][đŸ’–âœŒī¸wellfound-img]][đŸ’–âœŒī¸wellfound] [![Find Me on CrunchBase][💖💲crunchbase-img]][💖💲crunchbase] [![My LinkTree][đŸ’–đŸŒŗlinktree-img]][đŸ’–đŸŒŗlinktree] [![More About Me][💖💁đŸŧâ€â™‚ī¸aboutme-img]][💖💁đŸŧâ€â™‚ī¸aboutme] [🧊][💖🧊berg] [🐙][💖🐙hub] [🛖][💖🛖hut] [đŸ§Ē][💖đŸ§Ēlab] | + +## ✨ Installation + +Install the gem and add to the application's Gemfile by executing: + + $ bundle add omniauth-openid + +If bundler is not being used to manage dependencies, install the gem by executing: + + $ gem install omniauth-openid + +### 🔒 Secure Installation + +`omniauth-openid` is cryptographically signed, and has verifiable [SHA-256 and SHA-512][💎SHA_checksums] checksums by +[stone_checksums][💎stone_checksums]. Be sure the gem you install hasn’t been tampered with +by following the instructions below. + +Add my public key (if you haven’t already, expires 2045-04-29) as a trusted certificate: -## Installation +```shell +gem cert --add <(curl -Ls https://raw.github.com/omniauth/omniauth-openid/main/certs/pboling.pem) +``` - gem install omniauth-openid +You only need to do that once. Then proceed to install with: -## Stand-Alone Example +```shell +gem install omniauth-openid -P MediumSecurity +``` + +The `MediumSecurity` trust profile will verify signed gems, but allow the installation of unsigned dependencies. + +This is necessary because not all of `omniauth-openid`’s dependencies are signed, so we cannot use `HighSecurity`. + +If you want to up your security game full-time: + +```shell +bundle config set --global trust-policy MediumSecurity +``` + +NOTE: Be prepared to track down certs for signed gems and add them the same way you added mine. + +## 🔧 Compatibility + +... + +## 🔧 Basic Usage Use the strategy as a middleware in your application: - require 'omniauth-openid' - require 'openid/store/filesystem' +```ruby +require "omniauth-openid" +require "openid/store/filesystem" - use Rack::Session::Cookie - use OmniAuth::Strategies::OpenID, :store => OpenID::Store::Filesystem.new('/tmp') +use Rack::Session::Cookie +use OmniAuth::Strategies::OpenID, store: OpenID::Store::Filesystem.new("/tmp") +``` Then simply direct users to `/auth/open_id` to prompt them for their OpenID identifier. You may also pre-set the identifier by passing an `identifier` parameter to the URL (Example: `/auth/open_id?openid_url=yahoo.com`). A list of all OpenID stores is available at http://github.com/openid/ruby-openid/tree/master/lib/openid/store/ -## OmniAuth Builder +### OmniAuth Builder If OpenID is one of several authentication strategies, use the OmniAuth Builder: - require 'omniauth-openid' - require 'openid/store/filesystem' +```ruby +require "omniauth-openid" +require "openid/store/filesystem" - use OmniAuth::Builder do - provider :open_id, :store => OpenID::Store::Filesystem.new('/tmp') - end +use OmniAuth::Builder do + provider :open_id, store: OpenID::Store::Filesystem.new("/tmp") +end +``` -## Configured Identifiers +### Configured Identifiers You may pre-configure an OpenID identifier. For example, to use Google's main OpenID endpoint: @@ -56,15 +132,112 @@ You may pre-configure an OpenID identifier. For example, to use Google's main O Note the use of nil, which will trigger ruby-openid's default Memory Store. -## License +Please contribute some documentation if you have the gumption! The maintainer's time is limited, and sometimes the authors of PRs with new options don't update the _this_ readme. 😭 + +## 🔐 Security + +See [SECURITY.md][🔐security]. + +## 🤝 Contributing + +If you need some ideas of where to help, you could work on adding more code coverage, +or if it is already đŸ’¯ (see [below](#code-coverage)) check [issues][🤝gh-issues], or [PRs][🤝gh-pulls], +or use the gem and think about how it could be better. -Copyright (c) 2011 Michael Bleigh and Intridea, Inc. +We [![Keep A Changelog][📗keep-changelog-img]][📗keep-changelog] so if you make changes, remember to update it. -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +See [CONTRIBUTING.md][🤝contributing] for more detailed instructions. -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +### 🚀 Release Instructions -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +See [CONTRIBUTING.md][🤝contributing]. + +### Code Coverage + +[![Coverage Graph][🔑codecov-gâ™ģī¸]][🔑codecov] + +### đŸĒ‡ Code of Conduct + +Everyone interacting with this project's codebases, issue trackers, +chat rooms and mailing lists agrees to follow the [![Contributor Covenant 2.1][đŸĒ‡conduct-img]][đŸĒ‡conduct]. + +## 🌈 Contributors + +[![Contributors][🖐contributors-img]][🖐contributors] + +Made with [contributors-img][🖐contrib-rocks]. + +## â­ī¸ Star History + + + + + + Star History Chart + + + +## 📌 Versioning + +This Library adheres to [![Semantic Versioning 2.0.0][📌semver-img]][📌semver]. +Violations of this scheme should be reported as bugs. +Specifically, if a minor or patch version is released that breaks backward compatibility, +a new version should be immediately released that restores compatibility. +Breaking changes to the public API will only be introduced with new major versions. + +### 📌 Is "Platform Support" part of the public API? + +Yes. But I'm obligated to include notes... + +SemVer should, but doesn't explicitly, say that dropping support for specific Platforms +is a *breaking change* to an API. +It is obvious to many, but not all, and since the spec is silent, the bike shedding is endless. + +> dropping support for a platform is both obviously and objectively a breaking change + +- Jordan Harband (@ljharb, maintainer of SemVer) [in SemVer issue 716][📌semver-breaking] + +To get a better understanding of how SemVer is intended to work over a project's lifetime, +read this article from the creator of SemVer: + +- ["Major Version Numbers are Not Sacred"][📌major-versions-not-sacred] + +As a result of this policy, and the interpretive lens used by the maintainer, +you can (and should) specify a dependency on these libraries using +the [Pessimistic Version Constraint][📌pvc] with two digits of precision. + +For example: + +```ruby +spec.add_dependency("omniauth-openid", "~> 3.1") +``` + +See [CHANGELOG.md][📌changelog] for a list of releases. + +## 📄 License + +The gem is available as open source under the terms of +the [MIT License][📄license] [![License: MIT][📄license-img]][📄license-ref]. +See [LICENSE.txt][📄license] for the official [Copyright Notice][📄copyright-notice-explainer]. + +### Š Copyright + + ## 🤑 One more thing @@ -79,3 +252,153 @@ or one of the others at the head of this README. [🖇buyme-img]: https://img.buymeacoffee.com/button-api/?text=Buy%20me%20a%20latte&emoji=&slug=pboling&button_colour=FFDD00&font_colour=000000&font_family=Cookie&outline_colour=000000&coffee_colour=ffffff [🖇buyme]: https://www.buymeacoffee.com/pboling + +[✇bundle-group-pattern]: https://gist.github.com/pboling/4564780 +[â›ŗī¸gem-namespace]: https://github.com/omniauth/omniauth-openid +[â›ŗī¸namespace-img]: https://img.shields.io/badge/namespace-OmniAuth%3A%3AOpenID-brightgreen.svg?style=flat&logo=ruby&logoColor=white +[â›ŗī¸gem-name]: https://rubygems.org/gems/omniauth-openid +[â›ŗī¸name-img]: https://img.shields.io/badge/name-omniauth--openid-brightgreen.svg?style=flat&logo=rubygems&logoColor=red +[🚂bdfl-blog]: http://www.railsbling.com/tags/omniauth-openid +[🚂bdfl-blog-img]: https://img.shields.io/badge/blog-railsbling-0093D0.svg?style=for-the-badge&logo=rubyonrails&logoColor=orange +[🚂bdfl-contact]: http://www.railsbling.com/contact +[🚂bdfl-contact-img]: https://img.shields.io/badge/Contact-BDFL-0093D0.svg?style=flat&logo=rubyonrails&logoColor=red +[💖🖇linkedin]: http://www.linkedin.com/in/peterboling +[💖🖇linkedin-img]: https://img.shields.io/badge/PeterBoling-LinkedIn-0B66C2?style=flat&logo=newjapanprowrestling +[đŸ’–âœŒī¸wellfound]: https://angel.co/u/peter-boling +[đŸ’–âœŒī¸wellfound-img]: https://img.shields.io/badge/peter--boling-orange?style=flat&logo=wellfound +[💖💲crunchbase]: https://www.crunchbase.com/person/peter-boling +[💖💲crunchbase-img]: https://img.shields.io/badge/peter--boling-purple?style=flat&logo=crunchbase +[💖🐘ruby-mast]: https://ruby.social/@galtzo +[💖🐘ruby-mast-img]: https://img.shields.io/mastodon/follow/109447111526622197?domain=https%3A%2F%2Fruby.social&style=flat&logo=mastodon&label=Ruby%20%40galtzo +[💖đŸĻ‹bluesky]: https://bsky.app/profile/galtzo.com +[💖đŸĻ‹bluesky-img]: https://img.shields.io/badge/@galtzo.com-0285FF?style=flat&logo=bluesky&logoColor=white +[đŸ’–đŸŒŗlinktree]: https://linktr.ee/galtzo +[đŸ’–đŸŒŗlinktree-img]: https://img.shields.io/badge/galtzo-purple?style=flat&logo=linktree +[💖💁đŸŧâ€â™‚ī¸devto]: https://dev.to/galtzo +[💖💁đŸŧâ€â™‚ī¸devto-img]: https://img.shields.io/badge/dev.to-0A0A0A?style=flat&logo=devdotto&logoColor=white +[💖💁đŸŧâ€â™‚ī¸aboutme]: https://about.me/peter.boling +[💖💁đŸŧâ€â™‚ī¸aboutme-img]: https://img.shields.io/badge/about.me-0A0A0A?style=flat&logo=aboutme&logoColor=white +[💖🧊berg]: https://codeberg.org/pboling +[💖🐙hub]: https://github.org/pboling +[💖🛖hut]: https://sr.ht/~galtzo/ +[💖đŸ§Ēlab]: https://gitlab.com/pboling +[👨đŸŧ‍đŸĢexpsup-upwork]: https://www.upwork.com/freelancers/~014942e9b056abdf86?mp_source=share +[👨đŸŧ‍đŸĢexpsup-upwork-img]: https://img.shields.io/badge/UpWork-13544E?style=for-the-badge&logo=Upwork&logoColor=white +[👨đŸŧ‍đŸĢexpsup-codementor]: https://www.codementor.io/peterboling?utm_source=github&utm_medium=button&utm_term=peterboling&utm_campaign=github +[👨đŸŧ‍đŸĢexpsup-codementor-img]: https://img.shields.io/badge/CodeMentor-Get_Help-1abc9c?style=for-the-badge&logo=CodeMentor&logoColor=white +[đŸ™ī¸entsup-tidelift]: https://tidelift.com/subscription +[đŸ™ī¸entsup-tidelift-img]: https://img.shields.io/badge/Tidelift_and_Sonar-Enterprise_Support-FD3456?style=for-the-badge&logo=sonar&logoColor=white +[đŸ™ī¸entsup-tidelift-sonar]: https://blog.tidelift.com/tidelift-joins-sonar +[💁đŸŧâ€â™‚ī¸peterboling]: http://www.peterboling.com +[🚂railsbling]: http://www.railsbling.com +[📜src-gl-img]: https://img.shields.io/badge/GitLab-FBA326?style=for-the-badge&logo=Gitlab&logoColor=orange +[📜src-gl]: https://gitlab.com/omniauth/omniauth-openid/ +[📜src-cb-img]: https://img.shields.io/badge/CodeBerg-4893CC?style=for-the-badge&logo=CodeBerg&logoColor=blue +[📜src-cb]: https://codeberg.org/omniauth/omniauth-openid +[📜src-gh-img]: https://img.shields.io/badge/GitHub-238636?style=for-the-badge&logo=Github&logoColor=green +[📜src-gh]: https://github.com/omniauth/omniauth-openid +[📜docs-cr-rd-img]: https://img.shields.io/badge/RubyDoc-Current_Release-943CD2?style=for-the-badge&logo=readthedocs&logoColor=white +[📜docs-head-rd-img]: https://img.shields.io/badge/YARD_on_Galtzo.com-HEAD-943CD2?style=for-the-badge&logo=readthedocs&logoColor=white +[📜wiki]: https://github.com/omniauth/omniauth-openid/wiki +[📜wiki-img]: https://img.shields.io/badge/wiki-examples-943CD2.svg?style=for-the-badge&logo=Wiki&logoColor=white +[đŸ‘Ŋdl-rank]: https://rubygems.org/gems/omniauth-openid +[đŸ‘Ŋdl-ranki]: https://img.shields.io/gem/rd/omniauth-openid.svg +[đŸ‘Ŋoss-help]: https://www.codetriage.com/omniauth/omniauth-openid +[đŸ‘Ŋoss-helpi]: https://www.codetriage.com/omniauth/omniauth-openid/badges/users.svg +[đŸ‘Ŋversion]: https://rubygems.org/gems/omniauth-openid +[đŸ‘Ŋversioni]: https://img.shields.io/gem/v/omniauth-openid.svg +[🔑qlty-mnt]: https://qlty.sh/gh/omniauth/projects/omniauth-openid +[🔑qlty-mntiâ™ģī¸]: https://qlty.sh/badges/c2eb0211-c105-4fc6-9b36-650307c67e06/maintainability.svg +[🔑qlty-cov]: https://qlty.sh/gh/omniauth/projects/omniauth-openid +[🔑qlty-coviâ™ģī¸]: https://qlty.sh/badges/c2eb0211-c105-4fc6-9b36-650307c67e06/test_coverage.svg +[🔑codecov]: https://codecov.io/gh/omniauth/omniauth-openid +[🔑codecoviâ™ģī¸]: https://codecov.io/gh/omniauth/omniauth-openid/branch/main/graph/badge.svg?token=E1fzzcuB8f +[🔑coveralls]: https://coveralls.io/github/omniauth/omniauth-openid?branch=main +[🔑coveralls-img]: https://coveralls.io/repos/github/omniauth/omniauth-openid/badge.svg?branch=main +[🔑depfu]: https://depfu.com/github/omniauth/omniauth-openid?project_id=22381 +[🔑depfuiâ™ģī¸]: https://badges.depfu.com/badges/6c9b45362951b872127f9e46d39bed76/count.svg +[🖐codeQL]: https://github.com/omniauth/omniauth-openid/security/code-scanning +[🖐codeQL-img]: https://github.com/omniauth/omniauth-openid/actions/workflows/codeql-analysis.yml/badge.svg +[🚎1-an-wf]: https://github.com/omniauth/omniauth-openid/actions/workflows/ancient.yml +[🚎1-an-wfi]: https://github.com/omniauth/omniauth-openid/actions/workflows/ancient.yml/badge.svg +[🚎2-cov-wf]: https://github.com/omniauth/omniauth-openid/actions/workflows/coverage.yml +[🚎2-cov-wfi]: https://github.com/omniauth/omniauth-openid/actions/workflows/coverage.yml/badge.svg +[🚎3-hd-wf]: https://github.com/omniauth/omniauth-openid/actions/workflows/heads.yml +[🚎3-hd-wfi]: https://github.com/omniauth/omniauth-openid/actions/workflows/heads.yml/badge.svg +[🚎4-lg-wf]: https://github.com/omniauth/omniauth-openid/actions/workflows/legacy.yml +[🚎4-lg-wfi]: https://github.com/omniauth/omniauth-openid/actions/workflows/legacy.yml/badge.svg +[🚎5-st-wf]: https://github.com/omniauth/omniauth-openid/actions/workflows/style.yml +[🚎5-st-wfi]: https://github.com/omniauth/omniauth-openid/actions/workflows/style.yml/badge.svg +[🚎6-s-wf]: https://github.com/omniauth/omniauth-openid/actions/workflows/supported.yml +[🚎6-s-wfi]: https://github.com/omniauth/omniauth-openid/actions/workflows/supported.yml/badge.svg +[🚎7-us-wf]: https://github.com/omniauth/omniauth-openid/actions/workflows/unsupported.yml +[🚎7-us-wfi]: https://github.com/omniauth/omniauth-openid/actions/workflows/unsupported.yml/badge.svg +[🚎8-ho-wf]: https://github.com/omniauth/omniauth-openid/actions/workflows/hoary.yml +[🚎8-ho-wfi]: https://github.com/omniauth/omniauth-openid/actions/workflows/hoary.yml/badge.svg +[🚎9-t-wf]: https://github.com/omniauth/omniauth-openid/actions/workflows/truffle.yml +[🚎9-t-wfi]: https://github.com/omniauth/omniauth-openid/actions/workflows/truffle.yml/badge.svg +[🚎10-j-wf]: https://github.com/omniauth/omniauth-openid/actions/workflows/jruby.yml +[🚎10-j-wfi]: https://github.com/omniauth/omniauth-openid/actions/workflows/jruby.yml/badge.svg +[🚎11-c-wf]: https://github.com/omniauth/omniauth-openid/actions/workflows/current.yml +[🚎11-c-wfi]: https://github.com/omniauth/omniauth-openid/actions/workflows/current.yml/badge.svg +[🚎12-crh-wf]: https://github.com/omniauth/omniauth-openid/actions/workflows/current-runtime-heads.yml +[🚎12-crh-wfi]: https://github.com/omniauth/omniauth-openid/actions/workflows/current-runtime-heads.yml/badge.svg +[💎ruby-2.3i]: https://img.shields.io/badge/Ruby-2.3-DF00CA?style=for-the-badge&logo=ruby&logoColor=white +[💎ruby-2.4i]: https://img.shields.io/badge/Ruby-2.4-DF00CA?style=for-the-badge&logo=ruby&logoColor=white +[💎ruby-2.5i]: https://img.shields.io/badge/Ruby-2.5-DF00CA?style=for-the-badge&logo=ruby&logoColor=white +[💎ruby-2.6i]: https://img.shields.io/badge/Ruby-2.6-DF00CA?style=for-the-badge&logo=ruby&logoColor=white +[💎ruby-2.7i]: https://img.shields.io/badge/Ruby-2.7-DF00CA?style=for-the-badge&logo=ruby&logoColor=white +[💎ruby-3.0i]: https://img.shields.io/badge/Ruby-3.0-CC342D?style=for-the-badge&logo=ruby&logoColor=white +[💎ruby-3.1i]: https://img.shields.io/badge/Ruby-3.1-CC342D?style=for-the-badge&logo=ruby&logoColor=white +[💎ruby-3.2i]: https://img.shields.io/badge/Ruby-3.2-CC342D?style=for-the-badge&logo=ruby&logoColor=white +[💎ruby-3.3i]: https://img.shields.io/badge/Ruby-3.3-CC342D?style=for-the-badge&logo=ruby&logoColor=white +[💎ruby-c-i]: https://img.shields.io/badge/Ruby-current-CC342D?style=for-the-badge&logo=ruby&logoColor=green +[💎ruby-headi]: https://img.shields.io/badge/Ruby-HEAD-CC342D?style=for-the-badge&logo=ruby&logoColor=blue +[💎truby-22.3i]: https://img.shields.io/badge/Truffle_Ruby-22.3-34BCB1?style=for-the-badge&logo=ruby&logoColor=pink +[💎truby-23.0i]: https://img.shields.io/badge/Truffle_Ruby-23.0-34BCB1?style=for-the-badge&logo=ruby&logoColor=pink +[💎truby-23.1i]: https://img.shields.io/badge/Truffle_Ruby-23.1-34BCB1?style=for-the-badge&logo=ruby&logoColor=pink +[💎truby-c-i]: https://img.shields.io/badge/Truffle_Ruby-current-34BCB1?style=for-the-badge&logo=ruby&logoColor=green +[💎truby-headi]: https://img.shields.io/badge/Truffle_Ruby-HEAD-34BCB1?style=for-the-badge&logo=ruby&logoColor=blue +[💎jruby-9.2i]: https://img.shields.io/badge/JRuby-9.2-FBE742?style=for-the-badge&logo=ruby&logoColor=red +[💎jruby-9.3i]: https://img.shields.io/badge/JRuby-9.3-FBE742?style=for-the-badge&logo=ruby&logoColor=red +[💎jruby-9.4i]: https://img.shields.io/badge/JRuby-9.4-FBE742?style=for-the-badge&logo=ruby&logoColor=red +[💎jruby-c-i]: https://img.shields.io/badge/JRuby-current-FBE742?style=for-the-badge&logo=ruby&logoColor=green +[💎jruby-headi]: https://img.shields.io/badge/JRuby-HEAD-FBE742?style=for-the-badge&logo=ruby&logoColor=blue +[🤝gh-issues]: https://github.com/omniauth/omniauth-openid/issues +[🤝gh-pulls]: https://github.com/omniauth/omniauth-openid/pulls +[🤝contributing]: CONTRIBUTING.md +[🔑codecov-gâ™ģī¸]: https://codecov.io/gh/omniauth/omniauth-openid/graphs/tree.svg?token=E1fzzcuB8f +[🖐contrib-rocks]: https://contrib.rocks +[🖐contributors]: https://github.com/omniauth/omniauth-openid/graphs/contributors +[🖐contributors-img]: https://contrib.rocks/image?repo=omniauth/omniauth-openid +[🚎contributors-gl]: https://gitlab.com/omniauth/omniauth-openid/-/graphs/main +[đŸĒ‡conduct]: CODE_OF_CONDUCT.md +[đŸĒ‡conduct-img]: https://img.shields.io/badge/Contributor_Covenant-2.1-259D6C.svg +[📌pvc]: http://guides.rubygems.org/patterns/#pessimistic-version-constraint +[📌semver]: https://semver.org/spec/v2.0.0.html +[📌semver-img]: https://img.shields.io/badge/semver-2.0.0-259D6C.svg?style=flat +[📌semver-breaking]: https://github.com/semver/semver/issues/716#issuecomment-869336139 +[📌major-versions-not-sacred]: https://tom.preston-werner.com/2022/05/23/major-version-numbers-are-not-sacred.html +[📌changelog]: CHANGELOG.md +[📗keep-changelog]: https://keepachangelog.com/en/1.0.0/ +[📗keep-changelog-img]: https://img.shields.io/badge/keep--a--changelog-1.0.0-34495e.svg?style=flat +[📌gitmoji]:https://gitmoji.dev +[📌gitmoji-img]:https://img.shields.io/badge/gitmoji_commits-%20😜%20😍-34495e.svg?style=flat-square +[🧮kloc]: https://www.youtube.com/watch?v=dQw4w9WgXcQ +[🧮kloc-img]: https://img.shields.io/badge/KLOC-0.080-FFDD67.svg?style=for-the-badge&logo=YouTube&logoColor=blue +[🔐security]: SECURITY.md +[🔐security-img]: https://img.shields.io/badge/security-policy-259D6C.svg?style=flat +[📄copyright-notice-explainer]: https://opensource.stackexchange.com/questions/5778/why-do-licenses-such-as-the-mit-license-specify-a-single-year +[📄license]: LICENSE.txt +[📄license-ref]: https://opensource.org/licenses/MIT +[📄license-img]: https://img.shields.io/badge/License-MIT-259D6C.svg +[📄ilo-declaration]: https://www.ilo.org/declaration/lang--en/index.htm +[📄ilo-declaration-img]: https://img.shields.io/badge/ILO_Fundamental_Principles-✓-259D6C.svg?style=flat +[🚎yard-current]: http://rubydoc.info/gems/omniauth-openid +[🚎yard-head]: https://omniauth-openid.galtzo.com +[💎stone_checksums]: https://github.com/pboling/stone_checksums +[💎SHA_checksums]: https://github.com/omniauth/omniauth-openid/tree/main/checksums +[💎rlts]: https://github.com/rubocop-lts/rubocop-lts +[💎rlts-img]: https://img.shields.io/badge/code_style_%26_linting-rubocop--lts-34495e.svg?plastic&logo=ruby&logoColor=white +[âœ‰ī¸discord-invite]: https://discord.gg/3qme4XHNKN +[âœ‰ī¸discord-invite-img]: https://img.shields.io/discord/1373797679469170758?style=for-the-badge diff --git a/REEK b/REEK new file mode 100644 index 0000000..36afd00 --- /dev/null +++ b/REEK @@ -0,0 +1,36 @@ +lib/omniauth/openid/version.rb -- 1 warning: + [2]:IrresponsibleModule: OmniAuth::OpenID has no descriptive comment [https://github.com/troessner/reek/blob/v6.5.0/docs/Irresponsible-Module.md] +lib/omniauth/strategies/open_id.rb -- 28 warnings: + [129, 129]:DuplicateMethodCall: OmniAuth::Strategies::OpenID#ax_user_info calls 'AX[:city]' 2 times [https://github.com/troessner/reek/blob/v6.5.0/docs/Duplicate-Method-Call.md] + [126, 128]:DuplicateMethodCall: OmniAuth::Strategies::OpenID#ax_user_info calls 'AX[:first_name]' 2 times [https://github.com/troessner/reek/blob/v6.5.0/docs/Duplicate-Method-Call.md] + [127, 128]:DuplicateMethodCall: OmniAuth::Strategies::OpenID#ax_user_info calls 'AX[:last_name]' 2 times [https://github.com/troessner/reek/blob/v6.5.0/docs/Duplicate-Method-Call.md] + [129, 129]:DuplicateMethodCall: OmniAuth::Strategies::OpenID#ax_user_info calls 'AX[:state]' 2 times [https://github.com/troessner/reek/blob/v6.5.0/docs/Duplicate-Method-Call.md] + [131, 131]:DuplicateMethodCall: OmniAuth::Strategies::OpenID#ax_user_info calls 'AX[:website]' 2 times [https://github.com/troessner/reek/blob/v6.5.0/docs/Duplicate-Method-Call.md] + [131, 131]:DuplicateMethodCall: OmniAuth::Strategies::OpenID#ax_user_info calls 'Array(ax.get_single(AX[:website]))' 2 times [https://github.com/troessner/reek/blob/v6.5.0/docs/Duplicate-Method-Call.md] + [129, 129]:DuplicateMethodCall: OmniAuth::Strategies::OpenID#ax_user_info calls 'ax.get_single(AX[:city])' 2 times [https://github.com/troessner/reek/blob/v6.5.0/docs/Duplicate-Method-Call.md] + [126, 128]:DuplicateMethodCall: OmniAuth::Strategies::OpenID#ax_user_info calls 'ax.get_single(AX[:first_name])' 2 times [https://github.com/troessner/reek/blob/v6.5.0/docs/Duplicate-Method-Call.md] + [127, 128]:DuplicateMethodCall: OmniAuth::Strategies::OpenID#ax_user_info calls 'ax.get_single(AX[:last_name])' 2 times [https://github.com/troessner/reek/blob/v6.5.0/docs/Duplicate-Method-Call.md] + [129, 129]:DuplicateMethodCall: OmniAuth::Strategies::OpenID#ax_user_info calls 'ax.get_single(AX[:state])' 2 times [https://github.com/troessner/reek/blob/v6.5.0/docs/Duplicate-Method-Call.md] + [131, 131]:DuplicateMethodCall: OmniAuth::Strategies::OpenID#ax_user_info calls 'ax.get_single(AX[:website])' 2 times [https://github.com/troessner/reek/blob/v6.5.0/docs/Duplicate-Method-Call.md] + [45, 50]:DuplicateMethodCall: OmniAuth::Strategies::OpenID#dummy_app calls 'options.trust_root' 2 times [https://github.com/troessner/reek/blob/v6.5.0/docs/Duplicate-Method-Call.md] + [81, 82]:DuplicateMethodCall: OmniAuth::Strategies::OpenID#get_identifier calls 'options.identifier_param' 2 times [https://github.com/troessner/reek/blob/v6.5.0/docs/Duplicate-Method-Call.md] + [125, 126, 127, 128, 128, 128, 129, 129, 129, 129, 130, 131, 131]:FeatureEnvy: OmniAuth::Strategies::OpenID#ax_user_info refers to 'ax' more than self (maybe move it to another class?) [https://github.com/troessner/reek/blob/v6.5.0/docs/Feature-Envy.md] + [81, 82, 83]:FeatureEnvy: OmniAuth::Strategies::OpenID#get_identifier refers to 'f' more than self (maybe move it to another class?) [https://github.com/troessner/reek/blob/v6.5.0/docs/Feature-Envy.md] + [114, 115, 116, 117]:FeatureEnvy: OmniAuth::Strategies::OpenID#sreg_user_info refers to 'sreg' more than self (maybe move it to another class?) [https://github.com/troessner/reek/blob/v6.5.0/docs/Feature-Envy.md] + [9]:InstanceVariableAssumption: OmniAuth::Strategies::OpenID assumes too much for instance variable '@openid_response' [https://github.com/troessner/reek/blob/v6.5.0/docs/Instance-Variable-Assumption.md] + [45]:NestedIterators: OmniAuth::Strategies::OpenID#dummy_app contains iterators nested 2 deep [https://github.com/troessner/reek/blob/v6.5.0/docs/Nested-Iterators.md] + [134]:NilCheck: OmniAuth::Strategies::OpenID#ax_user_info performs a nil-check [https://github.com/troessner/reek/blob/v6.5.0/docs/Nil-Check.md] + [118]:NilCheck: OmniAuth::Strategies::OpenID#sreg_user_info performs a nil-check [https://github.com/troessner/reek/blob/v6.5.0/docs/Nil-Check.md] + [132]:UncommunicativeVariableName: OmniAuth::Strategies::OpenID#ax_user_info has the variable name 'h' [https://github.com/troessner/reek/blob/v6.5.0/docs/Uncommunicative-Variable-Name.md] + [132, 134]:UncommunicativeVariableName: OmniAuth::Strategies::OpenID#ax_user_info has the variable name 'k' [https://github.com/troessner/reek/blob/v6.5.0/docs/Uncommunicative-Variable-Name.md] + [132, 134]:UncommunicativeVariableName: OmniAuth::Strategies::OpenID#ax_user_info has the variable name 'v' [https://github.com/troessner/reek/blob/v6.5.0/docs/Uncommunicative-Variable-Name.md] + [45]:UncommunicativeVariableName: OmniAuth::Strategies::OpenID#dummy_app has the variable name 'm' [https://github.com/troessner/reek/blob/v6.5.0/docs/Uncommunicative-Variable-Name.md] + [80]:UncommunicativeVariableName: OmniAuth::Strategies::OpenID#get_identifier has the variable name 'f' [https://github.com/troessner/reek/blob/v6.5.0/docs/Uncommunicative-Variable-Name.md] + [59, 60]:UncommunicativeVariableName: OmniAuth::Strategies::OpenID#identifier has the variable name 'i' [https://github.com/troessner/reek/blob/v6.5.0/docs/Uncommunicative-Variable-Name.md] + [118]:UncommunicativeVariableName: OmniAuth::Strategies::OpenID#sreg_user_info has the variable name 'k' [https://github.com/troessner/reek/blob/v6.5.0/docs/Uncommunicative-Variable-Name.md] + [118]:UncommunicativeVariableName: OmniAuth::Strategies::OpenID#sreg_user_info has the variable name 'v' [https://github.com/troessner/reek/blob/v6.5.0/docs/Uncommunicative-Variable-Name.md] +spec/omniauth/strategies/open_id_spec.rb -- 1 warning: + [2]:TooManyStatements: app has approx 6 statements [https://github.com/troessner/reek/blob/v6.5.0/docs/Too-Many-Statements.md] +.yard_gfm_support.rb -- 1 warning: + [9, 9]:FeatureEnvy: KramdownGfmDocument#initialize refers to 'options' more than self (maybe move it to another class?) [https://github.com/troessner/reek/blob/v6.5.0/docs/Feature-Envy.md] +31 total warnings diff --git a/Rakefile b/Rakefile index 69797fc..ef7c4a1 100644 --- a/Rakefile +++ b/Rakefile @@ -1,6 +1,126 @@ -require 'bundler' -Bundler::GemHelper.install_tasks -require 'rspec/core/rake_task' -RSpec::Core::RakeTask.new(:spec) -task :default => :spec -task :test => :spec +# frozen_string_literal: true + +require "bundler/gem_tasks" + +defaults = [] + +# See: https://docs.gitlab.com/ci/variables/predefined_variables/ +is_gitlab = ENV.fetch("GITLAB_CI", "false").casecmp("true") == 0 + +### DEVELOPMENT TASKS +# Setup Kettle Soup Cover +begin + require "kettle-soup-cover" + + Kettle::Soup::Cover.install_tasks + # NOTE: Coverage on CI is configured independent of this task. + # This task is for local development, as it opens results in browser + defaults << "coverage" unless Kettle::Soup::Cover::IS_CI +rescue LoadError + desc("(stub) coverage is unavailable") + task("coverage") do + warn("NOTE: kettle-soup-cover isn't installed, or is disabled for #{RUBY_VERSION} in the current environment") + end +end + +# Setup Bundle Audit +begin + require "bundler/audit/task" + + Bundler::Audit::Task.new + defaults.push("bundle:audit:update", "bundle:audit") +rescue LoadError + desc("(stub) bundle:audit is unavailable") + task("bundle:audit") do + warn("NOTE: bundler-audit isn't installed, or is disabled for #{RUBY_VERSION} in the current environment") + end + desc("(stub) bundle:audit:update is unavailable") + task("bundle:audit:update") do + warn("NOTE: bundler-audit isn't installed, or is disabled for #{RUBY_VERSION} in the current environment") + end +end + +# Setup RSpec +begin + require "rspec/core/rake_task" + + RSpec::Core::RakeTask.new(:spec) + defaults << "spec" +rescue LoadError + desc("spec task stub") + task(:spec) do + warn("NOTE: rspec isn't installed, or is disabled for #{RUBY_VERSION} in the current environment") + end +end + +desc "spec is a pre-requisite of test task" +task test: :spec + +# Setup RuboCop-LTS +begin + require "rubocop/lts" + + Rubocop::Lts.install_tasks + # Make autocorrect the default rubocop task + defaults << "rubocop_gradual:autocorrect" +rescue LoadError + desc("(stub) rubocop_gradual is unavailable") + task(:rubocop_gradual) do + warn("NOTE: rubocop-lts isn't installed, or is disabled for #{RUBY_VERSION} in the current environment") + end +end + +# Setup Yard +begin + require "yard" + + YARD::Rake::YardocTask.new(:yard) do |t| + t.files = [ + # Source Splats (alphabetical) + "lib/**/*.rb", + "-", # source and extra docs are separated by "-" + # Extra Files (alphabetical) + "*.cff", + "*.md", + "*.txt", + ] + end + defaults << "yard" +rescue LoadError + desc("(stub) yard is unavailable") + task(:yard) do + warn("NOTE: yard isn't installed, or is disabled for #{RUBY_VERSION} in the current environment") + end +end + +# Setup Reek +begin + require "reek/rake/task" + + Reek::Rake::Task.new do |t| + t.fail_on_error = true + t.verbose = false + t.source_files = "{lib,spec,spec_ignored,spec_orms}/**/*.rb" + end + defaults << "reek" unless is_gitlab +rescue LoadError + desc("(stub) reek is unavailable") + task(:reek) do + warn("NOTE: reek isn't installed, or is disabled for #{RUBY_VERSION} in the current environment") + end +end + +### RELEASE TASKS +# Setup stone_checksums +begin + require "stone_checksums" + + GemChecksums.install_tasks +rescue LoadError + desc("(stub) build:generate_checksums is unavailable") + task("build:generate_checksums") do + warn("NOTE: stone_checksums isn't installed, or is disabled for #{RUBY_VERSION} in the current environment") + end +end + +task default: defaults diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 0000000..c3d3cee --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,30 @@ +# Security Policy + +## Supported Versions + +| Version | Supported | +|---------|-----------| +| 2.x | ✅ | +| 1.x | ❌ | + +## Security contact information + +To report a security vulnerability, please use the +[Tidelift security contact](https://tidelift.com/security). +Tidelift will coordinate the fix and disclosure. + +## Additional Support + +If you are interested in support for versions older than the latest release, +please consider sponsoring the project / maintainer @ https://liberapay.com/pboling/donate, +or find other sponsorship links in the [README]. + +[README]: README.md + +## Enterprise Support + +Available as part of the Tidelift Subscription. + +The maintainers of this library and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source packages you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers for the exact packages you use. [Learn more.][tidelift-ref] + +[tidelift-ref]: https://tidelift.com/subscription/pkg/rubygems-omniauth-openid?utm_source=rubygems-omniauth-openid&utm_medium=referral&utm_campaign=enterprise&utm_term=repo \ No newline at end of file diff --git a/bin/bundle b/bin/bundle new file mode 100755 index 0000000..71881c3 --- /dev/null +++ b/bin/bundle @@ -0,0 +1,109 @@ +#!/usr/bin/env ruby +# frozen_string_literal: true + +# +# This file was generated by Bundler. +# +# The application 'bundle' is installed as part of a gem, and +# this file is here to facilitate running it. +# + +require "rubygems" + +m = Module.new do + module_function + + def invoked_as_script? + File.expand_path($0) == File.expand_path(__FILE__) + end + + def env_var_version + ENV["BUNDLER_VERSION"] + end + + def cli_arg_version + return unless invoked_as_script? # don't want to hijack other binstubs + return unless "update".start_with?(ARGV.first || " ") # must be running `bundle update` + bundler_version = nil + update_index = nil + ARGV.each_with_index do |a, i| + if update_index && update_index.succ == i && a.match?(Gem::Version::ANCHORED_VERSION_PATTERN) + bundler_version = a + end + next unless a =~ /\A--bundler(?:[= ](#{Gem::Version::VERSION_PATTERN}))?\z/o + bundler_version = $1 + update_index = i + end + bundler_version + end + + def gemfile + gemfile = ENV["BUNDLE_GEMFILE"] + return gemfile if gemfile && !gemfile.empty? + + File.expand_path("../Gemfile", __dir__) + end + + def lockfile + lockfile = + case File.basename(gemfile) + when "gems.rb" then gemfile.sub(/\.rb$/, ".locked") + else "#{gemfile}.lock" + end + File.expand_path(lockfile) + end + + def lockfile_version + return unless File.file?(lockfile) + lockfile_contents = File.read(lockfile) + return unless lockfile_contents =~ /\n\nBUNDLED WITH\n\s{2,}(#{Gem::Version::VERSION_PATTERN})\n/o + Regexp.last_match(1) + end + + def bundler_requirement + @bundler_requirement ||= + env_var_version || + cli_arg_version || + bundler_requirement_for(lockfile_version) + end + + def bundler_requirement_for(version) + return "#{Gem::Requirement.default}.a" unless version + + bundler_gem_version = Gem::Version.new(version) + + bundler_gem_version.approximate_recommendation + end + + def load_bundler! + ENV["BUNDLE_GEMFILE"] ||= gemfile + + activate_bundler + end + + def activate_bundler + gem_error = activation_error_handling do + gem("bundler", bundler_requirement) + end + return if gem_error.nil? + require_error = activation_error_handling do + require "bundler/version" + end + return if require_error.nil? && Gem::Requirement.new(bundler_requirement).satisfied_by?(Gem::Version.new(Bundler::VERSION)) + warn("Activating bundler (#{bundler_requirement}) failed:\n#{gem_error.message}\n\nTo install the version of bundler this project requires, run `gem install bundler -v '#{bundler_requirement}'`") + exit(42) + end + + def activation_error_handling + yield + nil + rescue StandardError, LoadError => e + e + end +end + +m.load_bundler! + +if m.invoked_as_script? + load Gem.bin_path("bundler", "bundle") +end diff --git a/bin/gem_checksums b/bin/gem_checksums new file mode 100755 index 0000000..45a1d2a --- /dev/null +++ b/bin/gem_checksums @@ -0,0 +1,27 @@ +#!/usr/bin/env ruby +# frozen_string_literal: true + +# +# This file was generated by Bundler. +# +# The application 'gem_checksums' is installed as part of a gem, and +# this file is here to facilitate running it. +# + +ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__) + +bundle_binstub = File.expand_path("bundle", __dir__) + +if File.file?(bundle_binstub) + if File.read(bundle_binstub, 300).include?("This file was generated by Bundler") + load(bundle_binstub) + else + abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run. +Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.") + end +end + +require "rubygems" +require "bundler/setup" + +load Gem.bin_path("stone_checksums", "gem_checksums") diff --git a/bin/htmldiff b/bin/htmldiff new file mode 100755 index 0000000..0aeaec8 --- /dev/null +++ b/bin/htmldiff @@ -0,0 +1,27 @@ +#!/usr/bin/env ruby +# frozen_string_literal: true + +# +# This file was generated by Bundler. +# +# The application 'htmldiff' is installed as part of a gem, and +# this file is here to facilitate running it. +# + +ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__) + +bundle_binstub = File.expand_path("bundle", __dir__) + +if File.file?(bundle_binstub) + if File.read(bundle_binstub, 300).include?("This file was generated by Bundler") + load(bundle_binstub) + else + abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run. +Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.") + end +end + +require "rubygems" +require "bundler/setup" + +load Gem.bin_path("diff-lcs", "htmldiff") diff --git a/bin/ldiff b/bin/ldiff new file mode 100755 index 0000000..8173ede --- /dev/null +++ b/bin/ldiff @@ -0,0 +1,27 @@ +#!/usr/bin/env ruby +# frozen_string_literal: true + +# +# This file was generated by Bundler. +# +# The application 'ldiff' is installed as part of a gem, and +# this file is here to facilitate running it. +# + +ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__) + +bundle_binstub = File.expand_path("bundle", __dir__) + +if File.file?(bundle_binstub) + if File.read(bundle_binstub, 300).include?("This file was generated by Bundler") + load(bundle_binstub) + else + abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run. +Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.") + end +end + +require "rubygems" +require "bundler/setup" + +load Gem.bin_path("diff-lcs", "ldiff") diff --git a/bin/rackup b/bin/rackup new file mode 100755 index 0000000..0af6faf --- /dev/null +++ b/bin/rackup @@ -0,0 +1,27 @@ +#!/usr/bin/env ruby +# frozen_string_literal: true + +# +# This file was generated by Bundler. +# +# The application 'rackup' is installed as part of a gem, and +# this file is here to facilitate running it. +# + +ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__) + +bundle_binstub = File.expand_path("bundle", __dir__) + +if File.file?(bundle_binstub) + if File.read(bundle_binstub, 300).include?("This file was generated by Bundler") + load(bundle_binstub) + else + abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run. +Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.") + end +end + +require "rubygems" +require "bundler/setup" + +load Gem.bin_path("rack", "rackup") diff --git a/bin/rake b/bin/rake new file mode 100755 index 0000000..4eb7d7b --- /dev/null +++ b/bin/rake @@ -0,0 +1,27 @@ +#!/usr/bin/env ruby +# frozen_string_literal: true + +# +# This file was generated by Bundler. +# +# The application 'rake' is installed as part of a gem, and +# this file is here to facilitate running it. +# + +ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__) + +bundle_binstub = File.expand_path("bundle", __dir__) + +if File.file?(bundle_binstub) + if File.read(bundle_binstub, 300).include?("This file was generated by Bundler") + load(bundle_binstub) + else + abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run. +Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.") + end +end + +require "rubygems" +require "bundler/setup" + +load Gem.bin_path("rake", "rake") diff --git a/bin/rspec b/bin/rspec new file mode 100755 index 0000000..cb53ebe --- /dev/null +++ b/bin/rspec @@ -0,0 +1,27 @@ +#!/usr/bin/env ruby +# frozen_string_literal: true + +# +# This file was generated by Bundler. +# +# The application 'rspec' is installed as part of a gem, and +# this file is here to facilitate running it. +# + +ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__) + +bundle_binstub = File.expand_path("bundle", __dir__) + +if File.file?(bundle_binstub) + if File.read(bundle_binstub, 300).include?("This file was generated by Bundler") + load(bundle_binstub) + else + abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run. +Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.") + end +end + +require "rubygems" +require "bundler/setup" + +load Gem.bin_path("rspec-core", "rspec") diff --git a/certs/pboling.pem b/certs/pboling.pem new file mode 100644 index 0000000..d5c7e8b --- /dev/null +++ b/certs/pboling.pem @@ -0,0 +1,27 @@ +-----BEGIN CERTIFICATE----- +MIIEgDCCAuigAwIBAgIBATANBgkqhkiG9w0BAQsFADBDMRUwEwYDVQQDDAxwZXRl +ci5ib2xpbmcxFTATBgoJkiaJk/IsZAEZFgVnbWFpbDETMBEGCgmSJomT8ixkARkW +A2NvbTAeFw0yNTA1MDQxNTMzMDlaFw00NTA0MjkxNTMzMDlaMEMxFTATBgNVBAMM +DHBldGVyLmJvbGluZzEVMBMGCgmSJomT8ixkARkWBWdtYWlsMRMwEQYKCZImiZPy +LGQBGRYDY29tMIIBojANBgkqhkiG9w0BAQEFAAOCAY8AMIIBigKCAYEAruUoo0WA +uoNuq6puKWYeRYiZekz/nsDeK5x/0IEirzcCEvaHr3Bmz7rjo1I6On3gGKmiZs61 +LRmQ3oxy77ydmkGTXBjruJB+pQEn7UfLSgQ0xa1/X3kdBZt6RmabFlBxnHkoaGY5 +mZuZ5+Z7walmv6sFD9ajhzj+oIgwWfnEHkXYTR8I6VLN7MRRKGMPoZ/yvOmxb2DN +coEEHWKO9CvgYpW7asIihl/9GMpKiRkcYPm9dGQzZc6uTwom1COfW0+ZOFrDVBuV +FMQRPswZcY4Wlq0uEBLPU7hxnCL9nKK6Y9IhdDcz1mY6HZ91WImNslOSI0S8hRpj +yGOWxQIhBT3fqCBlRIqFQBudrnD9jSNpSGsFvbEijd5ns7Z9ZMehXkXDycpGAUj1 +to/5cuTWWw1JqUWrKJYoifnVhtE1o1DZ+LkPtWxHtz5kjDG/zR3MG0Ula0UOavlD +qbnbcXPBnwXtTFeZ3C+yrWpE4pGnl3yGkZj9SMTlo9qnTMiPmuWKQDatAgMBAAGj +fzB9MAkGA1UdEwQCMAAwCwYDVR0PBAQDAgSwMB0GA1UdDgQWBBQE8uWvNbPVNRXZ +HlgPbc2PCzC4bjAhBgNVHREEGjAYgRZwZXRlci5ib2xpbmdAZ21haWwuY29tMCEG +A1UdEgQaMBiBFnBldGVyLmJvbGluZ0BnbWFpbC5jb20wDQYJKoZIhvcNAQELBQAD +ggGBAJbnUwfJQFPkBgH9cL7hoBfRtmWiCvdqdjeTmi04u8zVNCUox0A4gT982DE9 +wmuN12LpdajxZONqbXuzZvc+nb0StFwmFYZG6iDwaf4BPywm2e/Vmq0YG45vZXGR +L8yMDSK1cQXjmA+ZBKOHKWavxP6Vp7lWvjAhz8RFwqF9GuNIdhv9NpnCAWcMZtpm +GUPyIWw/Cw/2wZp74QzZj6Npx+LdXoLTF1HMSJXZ7/pkxLCsB8m4EFVdb/IrW/0k +kNSfjtAfBHO8nLGuqQZVH9IBD1i9K6aSs7pT6TW8itXUIlkIUI2tg5YzW6OFfPzq +QekSkX3lZfY+HTSp/o+YvKkqWLUV7PQ7xh1ZYDtocpaHwgxe/j3bBqHE+CUPH2vA +0V/FwdTRWcwsjVoOJTrYcff8pBZ8r2MvtAc54xfnnhGFzeRHfcltobgFxkAXdE6p +DVjBtqT23eugOqQ73umLcYDZkc36vnqGxUBSsXrzY9pzV5gGr2I8YUxMqf6ATrZt +L9nRqA== +-----END CERTIFICATE----- diff --git a/.gemtest b/docs/.nojekyll similarity index 100% rename from .gemtest rename to docs/.nojekyll diff --git a/docs/OmniAuth.html b/docs/OmniAuth.html new file mode 100644 index 0000000..6c28639 --- /dev/null +++ b/docs/OmniAuth.html @@ -0,0 +1,117 @@ + + + + + + + Module: OmniAuth + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Module: OmniAuth + + + +

+
+ + + + + + + + + + + +
+
Defined in:
+
lib/omniauth/openid/version.rb,
+ lib/omniauth/strategies/open_id.rb
+
+
+ +
+ +

Defined Under Namespace

+

+ + + Modules: OpenID, Strategies + + + + +

+ + + + + + + + + +
+ + + +
+ + \ No newline at end of file diff --git a/docs/OmniAuth/OpenID.html b/docs/OmniAuth/OpenID.html new file mode 100644 index 0000000..99f272e --- /dev/null +++ b/docs/OmniAuth/OpenID.html @@ -0,0 +1,132 @@ + + + + + + + Module: OmniAuth::OpenID + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Module: OmniAuth::OpenID + + + +

+
+ + + + + + +
+
Includes:
+
Version
+
+ + + + + + +
+
Defined in:
+
lib/omniauth/openid/version.rb
+
+ +
+ +

Defined Under Namespace

+

+ + + Modules: Version + + + + +

+ + + +

Constant Summary

+ +

Constants included + from Version

+

Version::VERSION

+ + + + + + + + + + + + + +
+ + + +
+ + \ No newline at end of file diff --git a/docs/OmniAuth/OpenID/Version.html b/docs/OmniAuth/OpenID/Version.html new file mode 100644 index 0000000..3bec143 --- /dev/null +++ b/docs/OmniAuth/OpenID/Version.html @@ -0,0 +1,126 @@ + + + + + + + Module: OmniAuth::OpenID::Version + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Module: OmniAuth::OpenID::Version + + + +

+
+ + + + + + + + + +
+
Included in:
+
OmniAuth::OpenID
+
+ + + +
+
Defined in:
+
lib/omniauth/openid/version.rb
+
+ +
+ + + +

+ Constant Summary + collapse +

+ +
+ +
VERSION = + +
+
"2.0.2"
+ +
+ + + + + + + + + + +
+ + + +
+ + \ No newline at end of file diff --git a/docs/OmniAuth/Strategies.html b/docs/OmniAuth/Strategies.html new file mode 100644 index 0000000..42241de --- /dev/null +++ b/docs/OmniAuth/Strategies.html @@ -0,0 +1,115 @@ + + + + + + + Module: OmniAuth::Strategies + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Module: OmniAuth::Strategies + + + +

+
+ + + + + + + + + + + +
+
Defined in:
+
lib/omniauth/strategies/open_id.rb
+
+ +
+ +

Defined Under Namespace

+

+ + + + + Classes: OpenID + + +

+ + + + + + + + + +
+ + + +
+ + \ No newline at end of file diff --git a/docs/OmniAuth/Strategies/OpenID.html b/docs/OmniAuth/Strategies/OpenID.html new file mode 100644 index 0000000..9f79a3b --- /dev/null +++ b/docs/OmniAuth/Strategies/OpenID.html @@ -0,0 +1,772 @@ + + + + + + + Class: OmniAuth::Strategies::OpenID + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: OmniAuth::Strategies::OpenID + + + +

+
+ +
+
Inherits:
+
+ Object + +
    +
  • Object
  • + + + +
+ show all + +
+
+ + + + + + +
+
Includes:
+
OmniAuth::Strategy
+
+ + + + + + +
+
Defined in:
+
lib/omniauth/strategies/open_id.rb
+
+ +
+ +

Overview

+
+

OmniAuth strategy for connecting via OpenID. This allows for connection
+to a wide variety of sites, some of which are listed on the OpenID website.

+ + +
+
+
+ + +
+ +

+ Constant Summary + collapse +

+ +
+ +
AX = + +
+
{
+  email: "http://axschema.org/contact/email",
+  name: "http://axschema.org/namePerson",
+  nickname: "http://axschema.org/namePerson/friendly",
+  first_name: "http://axschema.org/namePerson/first",
+  last_name: "http://axschema.org/namePerson/last",
+  city: "http://axschema.org/contact/city/home",
+  state: "http://axschema.org/contact/state/home",
+  website: "http://axschema.org/contact/web/default",
+  image: "http://axschema.org/media/image/aspect11",
+}
+ +
+ + + + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + + +
+

Instance Method Details

+ + +
+

+ + #ax_user_infoObject + + + + + +

+ + + + +
+
+
+
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+
+
# File 'lib/omniauth/strategies/open_id.rb', line 121
+
+def 
+  ax = ::OpenID::AX::FetchResponse.from_success_response(openid_response)
+  return {} unless ax
+  {
+    "email" => ax.get_single(AX[:email]),
+    "first_name" => ax.get_single(AX[:first_name]),
+    "last_name" => ax.get_single(AX[:last_name]),
+    "name" => (ax.get_single(AX[:name]) || [ax.get_single(AX[:first_name]), ax.get_single(AX[:last_name])].join(" ")).strip,
+    "location" => ("#{ax.get_single(AX[:city])}, #{ax.get_single(AX[:state])}" if Array(ax.get_single(AX[:city])).any? && Array(ax.get_single(AX[:state])).any?),
+    "nickname" => ax.get_single(AX[:nickname]),
+    "urls" => ({"Website" => Array(ax.get_single(AX[:website])).first} if Array(ax.get_single(AX[:website])).any?),
+  }.each_with_object({}) { |(k, v), h|
+    h[k] = Array(v).first
+  }.reject { |k, v| v.nil? || v == "" }
+end
+
+
+ +
+

+ + #callback_phaseObject + + + + + +

+ + + + +
+
+
+
+96
+97
+98
+99
+
+
# File 'lib/omniauth/strategies/open_id.rb', line 96
+
+def callback_phase
+  return fail!(:invalid_credentials) unless openid_response && openid_response.status == :success
+  super
+end
+
+
+ +
+

+ + #dummy_appObject + + + + + +

+ + + + +
+
+
+
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+
+
# File 'lib/omniauth/strategies/open_id.rb', line 34
+
+def dummy_app
+  lambda { |env|
+    req = Rack::Request.new(env)
+    root_uri = "#{req.scheme}://#{req.host_with_port}/"
+
+    [
+      401,
+      {
+        "WWW-Authenticate" => Rack::OpenID.build_header(
+          identifier: identifier,
+          return_to: callback_url,
+          trust_root: options.trust_root || %r{^(https?://[^/]+)}.match(callback_url) { |m| m[1] },
+          required: options.required,
+          optional: options.optional,
+          method: "post",
+          immediate: options.immediate,
+          trust_root: options.trust_root.call(root_uri),
+        ),
+      },
+      [],
+    ]
+  }
+end
+
+
+ +
+

+ + #get_identifierObject + + + + + +

+ + + + +
+
+
+
+79
+80
+81
+82
+83
+84
+
+
# File 'lib/omniauth/strategies/open_id.rb', line 79
+
+def get_identifier
+  f = OmniAuth::Form.new(title: "OpenID Authentication")
+  f.label_field("OpenID Identifier", options.identifier_param)
+  f.input_field("url", options.identifier_param)
+  f.to_response
+end
+
+
+ +
+

+ + #identifierObject + + + + + +

+ + + + +
+
+
+
+58
+59
+60
+61
+62
+
+
# File 'lib/omniauth/strategies/open_id.rb', line 58
+
+def identifier
+  i = options.identifier || request.params[options.identifier_param.to_s]
+  i = nil if i == ""
+  i
+end
+
+
+ +
+

+ + #openid_responseObject + + + + + +

+ + + + +
+
+
+
+101
+102
+103
+104
+105
+106
+107
+108
+
+
# File 'lib/omniauth/strategies/open_id.rb', line 101
+
+def openid_response
+  unless @openid_response
+    openid = Rack::OpenID.new(lambda { |env| [200, {}, []] }, options[:store])
+    openid.call(env)
+    @openid_response = env.delete("rack.openid.response")
+  end
+  @openid_response
+end
+
+
+ +
+

+ + #request_phaseObject + + + + + +

+ + + + +
+
+
+
+64
+65
+66
+
+
# File 'lib/omniauth/strategies/open_id.rb', line 64
+
+def request_phase
+  identifier ? start : get_identifier
+end
+
+
+ +
+

+ + #sreg_user_infoObject + + + + + +

+ + + + +
+
+
+
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+
+
# File 'lib/omniauth/strategies/open_id.rb', line 110
+
+def 
+  sreg = ::OpenID::SReg::Response.from_success_response(openid_response)
+  return {} unless sreg
+  {
+    "email" => sreg["email"],
+    "name" => sreg["fullname"],
+    "location" => sreg["postcode"],
+    "nickname" => sreg["nickname"],
+  }.reject { |k, v| v.nil? || v == "" }
+end
+
+
+ +
+

+ + #startObject + + + + + +

+ + + + +
+
+
+
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+
+
# File 'lib/omniauth/strategies/open_id.rb', line 68
+
+def start
+  openid = Rack::OpenID.new(dummy_app, options[:store])
+  response = openid.call(env)
+  case env["rack.openid.response"]
+  when Rack::OpenID::MissingResponse, Rack::OpenID::TimeoutResponse
+    fail!(:connection_failed)
+  else
+    response
+  end
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/_index.html b/docs/_index.html new file mode 100644 index 0000000..f81d1dd --- /dev/null +++ b/docs/_index.html @@ -0,0 +1,169 @@ + + + + + + + Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Documentation by YARD 0.9.37

+
+

Alphabetic Index

+ +

File Listing

+ + +
+

Namespace Listing A-Z

+ + + + + + + + +
+ + +
    +
  • O
  • +
      + +
    • + OmniAuth + +
    • + +
    • + OpenID + + (OmniAuth::Strategies) + +
    • + +
    • + OpenID + + (OmniAuth) + +
    • + +
    +
+ + + + + +
    +
  • V
  • +
      + +
    • + Version + + (OmniAuth::OpenID) + +
    • + +
    +
+ +
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/class_list.html b/docs/class_list.html new file mode 100644 index 0000000..4daa6ec --- /dev/null +++ b/docs/class_list.html @@ -0,0 +1,54 @@ + + + + + + + + + + + + + + + + + + Class List + + + +
+
+

Class List

+ + + +
+ + +
+ + diff --git a/docs/css/common.css b/docs/css/common.css new file mode 100644 index 0000000..cf25c45 --- /dev/null +++ b/docs/css/common.css @@ -0,0 +1 @@ +/* Override this file with custom rules */ \ No newline at end of file diff --git a/docs/css/full_list.css b/docs/css/full_list.css new file mode 100644 index 0000000..6eef5e4 --- /dev/null +++ b/docs/css/full_list.css @@ -0,0 +1,58 @@ +body { + margin: 0; + font-family: "Lucida Sans", "Lucida Grande", Verdana, Arial, sans-serif; + font-size: 13px; + height: 101%; + overflow-x: hidden; + background: #fafafa; +} + +h1 { padding: 12px 10px; padding-bottom: 0; margin: 0; font-size: 1.4em; } +.clear { clear: both; } +.fixed_header { position: fixed; background: #fff; width: 100%; padding-bottom: 10px; margin-top: 0; top: 0; z-index: 9999; height: 70px; } +#search { position: absolute; right: 5px; top: 9px; padding-left: 24px; } +#content.insearch #search, #content.insearch #noresults { background: url(data:image/gif;base64,R0lGODlhEAAQAPYAAP///wAAAPr6+pKSkoiIiO7u7sjIyNjY2J6engAAAI6OjsbGxjIyMlJSUuzs7KamppSUlPLy8oKCghwcHLKysqSkpJqamvT09Pj4+KioqM7OzkRERAwMDGBgYN7e3ujo6Ly8vCoqKjY2NkZGRtTU1MTExDw8PE5OTj4+PkhISNDQ0MrKylpaWrS0tOrq6nBwcKysrLi4uLq6ul5eXlxcXGJiYoaGhuDg4H5+fvz8/KKiohgYGCwsLFZWVgQEBFBQUMzMzDg4OFhYWBoaGvDw8NbW1pycnOLi4ubm5kBAQKqqqiQkJCAgIK6urnJyckpKSjQ0NGpqatLS0sDAwCYmJnx8fEJCQlRUVAoKCggICLCwsOTk5ExMTPb29ra2tmZmZmhoaNzc3KCgoBISEiIiIgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh/hpDcmVhdGVkIHdpdGggYWpheGxvYWQuaW5mbwAh+QQJCAAAACwAAAAAEAAQAAAHaIAAgoMgIiYlg4kACxIaACEJCSiKggYMCRselwkpghGJBJEcFgsjJyoAGBmfggcNEx0flBiKDhQFlIoCCA+5lAORFb4AJIihCRbDxQAFChAXw9HSqb60iREZ1omqrIPdJCTe0SWI09GBACH5BAkIAAAALAAAAAAQABAAAAdrgACCgwc0NTeDiYozCQkvOTo9GTmDKy8aFy+NOBA7CTswgywJDTIuEjYFIY0JNYMtKTEFiRU8Pjwygy4ws4owPyCKwsMAJSTEgiQlgsbIAMrO0dKDGMTViREZ14kYGRGK38nHguHEJcvTyIEAIfkECQgAAAAsAAAAABAAEAAAB2iAAIKDAggPg4iJAAMJCRUAJRIqiRGCBI0WQEEJJkWDERkYAAUKEBc4Po1GiKKJHkJDNEeKig4URLS0ICImJZAkuQAhjSi/wQyNKcGDCyMnk8u5rYrTgqDVghgZlYjcACTA1sslvtHRgQAh+QQJCAAAACwAAAAAEAAQAAAHZ4AAgoOEhYaCJSWHgxGDJCQARAtOUoQRGRiFD0kJUYWZhUhKT1OLhR8wBaaFBzQ1NwAlkIszCQkvsbOHL7Y4q4IuEjaqq0ZQD5+GEEsJTDCMmIUhtgk1lo6QFUwJVDKLiYJNUd6/hoEAIfkECQgAAAAsAAAAABAAEAAAB2iAAIKDhIWGgiUlh4MRgyQkjIURGRiGGBmNhJWHm4uen4ICCA+IkIsDCQkVACWmhwSpFqAABQoQF6ALTkWFnYMrVlhWvIKTlSAiJiVVPqlGhJkhqShHV1lCW4cMqSkAR1ofiwsjJyqGgQAh+QQJCAAAACwAAAAAEAAQAAAHZ4AAgoOEhYaCJSWHgxGDJCSMhREZGIYYGY2ElYebi56fhyWQniSKAKKfpaCLFlAPhl0gXYNGEwkhGYREUywag1wJwSkHNDU3D0kJYIMZQwk8MjPBLx9eXwuETVEyAC/BOKsuEjYFhoEAIfkECQgAAAAsAAAAABAAEAAAB2eAAIKDhIWGgiUlh4MRgyQkjIURGRiGGBmNhJWHm4ueICImip6CIQkJKJ4kigynKaqKCyMnKqSEK05StgAGQRxPYZaENqccFgIID4KXmQBhXFkzDgOnFYLNgltaSAAEpxa7BQoQF4aBACH5BAkIAAAALAAAAAAQABAAAAdogACCg4SFggJiPUqCJSWGgkZjCUwZACQkgxGEXAmdT4UYGZqCGWQ+IjKGGIUwPzGPhAc0NTewhDOdL7Ykji+dOLuOLhI2BbaFETICx4MlQitdqoUsCQ2vhKGjglNfU0SWmILaj43M5oEAOwAAAAAAAAAAAA==) no-repeat center left; } +#full_list { padding: 0; list-style: none; margin-left: 0; margin-top: 80px; font-size: 1.1em; } +#full_list ul { padding: 0; } +#full_list li { padding: 0; margin: 0; list-style: none; } +#full_list li .item { padding: 5px 5px 5px 12px; } +#noresults { padding: 7px 12px; background: #fff; } +#content.insearch #noresults { margin-left: 7px; } +li.collapsed ul { display: none; } +li a.toggle { cursor: default; position: relative; left: -5px; top: 4px; text-indent: -999px; width: 10px; height: 9px; margin-left: -10px; display: block; float: left; background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAASCAYAAABb0P4QAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAK8AAACvABQqw0mAAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTM5jWRgMAAAAVdEVYdENyZWF0aW9uIFRpbWUAMy8xNC8wOeNZPpQAAAE2SURBVDiNrZTBccIwEEXfelIAHUA6CZ24BGaWO+FuzZAK4k6gg5QAdGAq+Bxs2Yqx7BzyL7Llp/VfzZeQhCTc/ezuGzKKnKSzpCxXJM8fwNXda3df5RZETlIt6YUzSQDs93sl8w3wBZxCCE10GM1OcWbWjB2mWgEH4Mfdyxm3PSepBHibgQE2wLe7r4HjEidpnXMYdQPKEMJcsZ4zs2POYQOcaPfwMVOo58zsAdMt18BuoVDPxUJRacELbXv3hUIX2vYmOUvi8C8ydz/ThjXrqKqqLbDIAdsCKBd+Wo7GWa7o9qzOQHVVVXeAbs+yHHCH4aTsaCOQqunmUy1yBUAXkdMIfMlgF5EXLo2OpV/c/Up7jG4hhHcYLgWzAZXUc2b2ixsfvc/RmNNfOXD3Q/oeL9axJE1yT9IOoUu6MGUkAAAAAElFTkSuQmCC) no-repeat bottom left; } +li.collapsed a.toggle { cursor: default; background-position: top left; } +li { color: #666; cursor: pointer; } +li.deprecated { text-decoration: line-through; font-style: italic; } +li.odd { background: #f0f0f0; } +li.even { background: #fafafa; } +.item:hover { background: #ddd; } +li small:before { content: "("; } +li small:after { content: ")"; } +li small.search_info { display: none; } +a, a:visited { text-decoration: none; color: #05a; } +li.clicked > .item { background: #05a; color: #ccc; } +li.clicked > .item a, li.clicked > .item a:visited { color: #eee; } +li.clicked > .item a.toggle { opacity: 0.5; background-position: bottom right; } +li.collapsed.clicked a.toggle { background-position: top right; } +#search input { border: 1px solid #bbb; border-radius: 3px; } +#full_list_nav { margin-left: 10px; font-size: 0.9em; display: block; color: #aaa; } +#full_list_nav a, #nav a:visited { color: #358; } +#full_list_nav a:hover { background: transparent; color: #5af; } +#full_list_nav span:after { content: ' | '; } +#full_list_nav span:last-child:after { content: ''; } + +#content h1 { margin-top: 0; } +li { white-space: nowrap; cursor: normal; } +li small { display: block; font-size: 0.8em; } +li small:before { content: ""; } +li small:after { content: ""; } +li small.search_info { display: none; } +#search { width: 170px; position: static; margin: 3px; margin-left: 10px; font-size: 0.9em; color: #666; padding-left: 0; padding-right: 24px; } +#content.insearch #search { background-position: center right; } +#search input { width: 110px; } + +#full_list.insearch ul { display: block; } +#full_list.insearch .item { display: none; } +#full_list.insearch .found { display: block; padding-left: 11px !important; } +#full_list.insearch li a.toggle { display: none; } +#full_list.insearch li small.search_info { display: block; } diff --git a/docs/css/style.css b/docs/css/style.css new file mode 100644 index 0000000..f169a65 --- /dev/null +++ b/docs/css/style.css @@ -0,0 +1,503 @@ +html { + width: 100%; + height: 100%; +} +body { + font-family: "Lucida Sans", "Lucida Grande", Verdana, Arial, sans-serif; + font-size: 13px; + width: 100%; + margin: 0; + padding: 0; + display: flex; + display: -webkit-flex; + display: -ms-flexbox; +} + +#nav { + position: relative; + width: 100%; + height: 100%; + border: 0; + border-right: 1px dotted #eee; + overflow: auto; +} +.nav_wrap { + margin: 0; + padding: 0; + width: 20%; + height: 100%; + position: relative; + display: flex; + display: -webkit-flex; + display: -ms-flexbox; + flex-shrink: 0; + -webkit-flex-shrink: 0; + -ms-flex: 1 0; +} +#resizer { + position: absolute; + right: -5px; + top: 0; + width: 10px; + height: 100%; + cursor: col-resize; + z-index: 9999; +} +#main { + flex: 5 1; + -webkit-flex: 5 1; + -ms-flex: 5 1; + outline: none; + position: relative; + background: #fff; + padding: 1.2em; + padding-top: 0.2em; + box-sizing: border-box; +} + +@media (max-width: 920px) { + .nav_wrap { width: 100%; top: 0; right: 0; overflow: visible; position: absolute; } + #resizer { display: none; } + #nav { + z-index: 9999; + background: #fff; + display: none; + position: absolute; + top: 40px; + right: 12px; + width: 500px; + max-width: 80%; + height: 80%; + overflow-y: scroll; + border: 1px solid #999; + border-collapse: collapse; + box-shadow: -7px 5px 25px #aaa; + border-radius: 2px; + } +} + +@media (min-width: 920px) { + body { height: 100%; overflow: hidden; } + #main { height: 100%; overflow: auto; } + #search { display: none; } +} + +@media (max-width: 320px) { + body { height: 100%; overflow: hidden; overflow-wrap: break-word; } + #main { height: 100%; overflow: auto; } +} + +#main img { max-width: 100%; } +h1 { font-size: 25px; margin: 1em 0 0.5em; padding-top: 4px; border-top: 1px dotted #d5d5d5; } +h1.noborder { border-top: 0px; margin-top: 0; padding-top: 4px; } +h1.title { margin-bottom: 10px; } +h1.alphaindex { margin-top: 0; font-size: 22px; } +h2 { + padding: 0; + padding-bottom: 3px; + border-bottom: 1px #aaa solid; + font-size: 1.4em; + margin: 1.8em 0 0.5em; + position: relative; +} +h2 small { font-weight: normal; font-size: 0.7em; display: inline; position: absolute; right: 0; } +h2 small a { + display: block; + height: 20px; + border: 1px solid #aaa; + border-bottom: 0; + border-top-left-radius: 5px; + background: #f8f8f8; + position: relative; + padding: 2px 7px; +} +a { font-weight: 550; } +.clear { clear: both; } +.inline { display: inline; } +.inline p:first-child { display: inline; } +.docstring, .tags, #filecontents { font-size: 15px; line-height: 1.5145em; } +.docstring p > code, .docstring p > tt, .tags p > code, .tags p > tt { + color: #c7254e; background: #f9f2f4; padding: 2px 4px; font-size: 1em; + border-radius: 4px; +} +.docstring h1, .docstring h2, .docstring h3, .docstring h4 { padding: 0; border: 0; border-bottom: 1px dotted #bbb; } +.docstring h1 { font-size: 1.2em; } +.docstring h2 { font-size: 1.1em; } +.docstring h3, .docstring h4 { font-size: 1em; border-bottom: 0; padding-top: 10px; } +.summary_desc .object_link a, .docstring .object_link a { + font-family: monospace; font-size: 1.05em; + color: #05a; background: #EDF4FA; padding: 2px 4px; font-size: 1em; + border-radius: 4px; +} +.rdoc-term { padding-right: 25px; font-weight: bold; } +.rdoc-list p { margin: 0; padding: 0; margin-bottom: 4px; } +.summary_desc pre.code .object_link a, .docstring pre.code .object_link a { + padding: 0px; background: inherit; color: inherit; border-radius: inherit; +} + +/* style for */ +#filecontents table, .docstring table { border-collapse: collapse; } +#filecontents table th, #filecontents table td, +.docstring table th, .docstring table td { border: 1px solid #ccc; padding: 8px; padding-right: 17px; } +#filecontents table tr:nth-child(odd), +.docstring table tr:nth-child(odd) { background: #eee; } +#filecontents table tr:nth-child(even), +.docstring table tr:nth-child(even) { background: #fff; } +#filecontents table th, .docstring table th { background: #fff; } + +/* style for
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Tokens to Remember +Gem name Gem namespace +
Works with JRuby +JRuby 9.2 Compat JRuby 9.3 Compat JRuby 9.4 Compat JRuby 10.0 Compat JRuby HEAD Compat +
Works with MRI Ruby 3 +Ruby 3.0 Compat Ruby 3.1 Compat Ruby 3.2 Compat Ruby 3.3 Compat Ruby 3.4 Compat Ruby HEAD Compat +
Works with MRI Ruby 2 +Ruby 2.4 Compat Ruby 2.5 Compat Ruby 2.6 Compat Ruby 2.7 Compat +
Source +Source on GitLab.com Source on CodeBerg.org Source on Github.com The best SHA: dQw4w9WgXcQ! +
Documentation +Current release on RubyDoc.info YARD on Galtzo.com BDFL Blog Wiki +
Compliance +License: MIT 📄ilo-declaration-img Security Policy Contributor Covenant 2.1 SemVer 2.0.0 +
Style +Enforced Code Style Linter Keep-A-Changelog 1.0.0 Gitmoji Commits +
Support +Live Chat on Discord Get help from me on Upwork Get help from me on Codementor +
Enterprise Support +Get help from me on Tidelift
💡Subscribe for support guarantees covering all FLOSS dependencies!
💡Tidelift is part of Sonar!
💡Tidelift pays maintainers to maintain the software you depend on!
📊@Pointy Haired Boss: An enterprise support subscription is “never gonna let you down”, and supports open source maintainers!
Comrade BDFL đŸŽ–ī¸ +Follow Me on LinkedIn Follow Me on Ruby.Social Follow Me on Bluesky Contact BDFL My technical writing +
+... 💖 +Find Me on WellFound: Find Me on CrunchBase My LinkTree More About Me 🧊 🐙 🛖 đŸ§Ē +
+ +

✨ Installation

+ +

Install the gem and add to the application’s Gemfile by executing:

+ +
$ bundle add omniauth-openid
+
+ +

If bundler is not being used to manage dependencies, install the gem by executing:

+ +
$ gem install omniauth-openid
+
+ +

🔒 Secure Installation

+ +

omniauth-openid is cryptographically signed, and has verifiable SHA-256 and SHA-512 checksums by
+stone_checksums. Be sure the gem you install hasn’t been tampered with
+by following the instructions below.

+ +

Add my public key (if you haven’t already, expires 2045-04-29) as a trusted certificate:

+ +
gem cert --add <(curl -Ls https://raw.github.com/omniauth/omniauth-openid/main/certs/pboling.pem)
+
+ +

You only need to do that once. Then proceed to install with:

+ +
gem install omniauth-openid -P MediumSecurity
+
+ +

The MediumSecurity trust profile will verify signed gems, but allow the installation of unsigned dependencies.

+ +

This is necessary because not all of omniauth-openid’s dependencies are signed, so we cannot use HighSecurity.

+ +

If you want to up your security game full-time:

+ +
bundle config set --global trust-policy MediumSecurity
+
+ +

NOTE: Be prepared to track down certs for signed gems and add them the same way you added mine.

+ +

🔧 Compatibility

+ +

â€Ļ

+ +

🔧 Basic Usage

+ +

Use the strategy as a middleware in your application:

+ +
require "omniauth-openid"
+require "openid/store/filesystem"
+
+use Rack::Session::Cookie
+use OmniAuth::Strategies::OpenID, store: OpenID::Store::Filesystem.new("/tmp")
+
+ +

Then simply direct users to /auth/open_id to prompt them for their OpenID identifier. You may also pre-set the identifier by passing an identifier parameter to the URL (Example: /auth/open_id?openid_url=yahoo.com).

+ +

A list of all OpenID stores is available at http://github.com/openid/ruby-openid/tree/master/lib/openid/store/

+ +

OmniAuth Builder

+ +

If OpenID is one of several authentication strategies, use the OmniAuth Builder:

+ +
require "omniauth-openid"
+require "openid/store/filesystem"
+
+use OmniAuth::Builder do
+  provider :open_id, store: OpenID::Store::Filesystem.new("/tmp")
+end
+
+ +

Configured Identifiers

+ +

You may pre-configure an OpenID identifier. For example, to use Google’s main OpenID endpoint:

+ +
use OmniAuth::Builder do
+  provider :open_id, nil, :name => 'google', :identifier => 'https://www.google.com/accounts/o8/id'
+end
+
+ +

Note the use of nil, which will trigger ruby-openid’s default Memory Store.

+ +

Please contribute some documentation if you have the gumption! The maintainer’s time is limited, and sometimes the authors of PRs with new options don’t update the this readme. 😭

+ +

🔐 Security

+ +

See SECURITY.md.

+ +

🤝 Contributing

+ +

If you need some ideas of where to help, you could work on adding more code coverage,
+or if it is already đŸ’¯ (see below) check issues, or PRs,
+or use the gem and think about how it could be better.

+ +

We Keep A Changelog so if you make changes, remember to update it.

+ +

See CONTRIBUTING.md for more detailed instructions.

+ +

🚀 Release Instructions

+ +

See CONTRIBUTING.md.

+ +

Code Coverage

+ +

Coverage Graph

+ +

đŸĒ‡ Code of Conduct

+ +

Everyone interacting with this project’s codebases, issue trackers,
+chat rooms and mailing lists agrees to follow the Contributor Covenant 2.1.

+ +

🌈 Contributors

+ +

Contributors

+ +

Made with contributors-img.

+ +

â­ī¸ Star History

+ +

+ + + + Star History Chart + +

</a>

+ +

📌 Versioning

+ +

This Library adheres to Semantic Versioning 2.0.0.
+Violations of this scheme should be reported as bugs.
+Specifically, if a minor or patch version is released that breaks backward compatibility,
+a new version should be immediately released that restores compatibility.
+Breaking changes to the public API will only be introduced with new major versions.

+ +

📌 Is “Platform Support” part of the public API?

+ +

Yes. But I’m obligated to include notesâ€Ļ

+ +

SemVer should, but doesn’t explicitly, say that dropping support for specific Platforms
+is a breaking change to an API.
+It is obvious to many, but not all, and since the spec is silent, the bike shedding is endless.

+ +
+

dropping support for a platform is both obviously and objectively a breaking change

+
+ + + +

To get a better understanding of how SemVer is intended to work over a project’s lifetime,
+read this article from the creator of SemVer:

+ + + +

As a result of this policy, and the interpretive lens used by the maintainer,
+you can (and should) specify a dependency on these libraries using
+the Pessimistic Version Constraint with two digits of precision.

+ +

For example:

+ +
spec.add_dependency("omniauth-openid", "~> 3.1")
+
+ +

See CHANGELOG.md for a list of releases.

+ +

📄 License

+ +

The gem is available as open source under the terms of
+the MIT License License: MIT.
+See LICENSE.txt for the official Copyright Notice.

+ + + + + +

🤑 One more thing

+ +

You made it to the bottom of the page,
+so perhaps you’ll indulge me for another 20 seconds.
+I maintain many dozens of gems, including this one,
+because I want Ruby to be a great place for people to solve problems, big and small.
+Please consider supporting my efforts via the giant yellow link below,
+or one of the others at the head of this README.

+ +

Buy me a latte

+ + + + + + + + \ No newline at end of file diff --git a/docs/file.SECURITY.html b/docs/file.SECURITY.html new file mode 100644 index 0000000..51dbbd9 --- /dev/null +++ b/docs/file.SECURITY.html @@ -0,0 +1,111 @@ + + + + + + + File: SECURITY + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

Security Policy

+ +

Supported Versions

+ + + + + + + + + + + + + + + + + + +
VersionSupported
2.x✅
1.x❌
+ +

Security contact information

+ +

To report a security vulnerability, please use the
+Tidelift security contact.
+Tidelift will coordinate the fix and disclosure.

+ +

Additional Support

+ +

If you are interested in support for versions older than the latest release,
+please consider sponsoring the project / maintainer @ https://liberapay.com/pboling/donate,
+or find other sponsorship links in the README.

+ +

Enterprise Support

+ +

Available as part of the Tidelift Subscription.

+ +

The maintainers of this library and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source packages you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers for the exact packages you use. Learn more.

+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/file_list.html b/docs/file_list.html new file mode 100644 index 0000000..321a679 --- /dev/null +++ b/docs/file_list.html @@ -0,0 +1,89 @@ + + + + + + + + + + + + + + + + + + File List + + + +
+
+

File List

+ + + +
+ + +
+ + diff --git a/docs/frames.html b/docs/frames.html new file mode 100644 index 0000000..6586005 --- /dev/null +++ b/docs/frames.html @@ -0,0 +1,22 @@ + + + + + Documentation by YARD 0.9.37 + + + + diff --git a/docs/images/logo/README.txt b/docs/images/logo/README.txt new file mode 100644 index 0000000..26ad9dc --- /dev/null +++ b/docs/images/logo/README.txt @@ -0,0 +1,38 @@ +Galtzo.com Logos +- galtzo-floss-logos-original.svg +- galtzo-floss-logos-wordless.svg + +Š 2025 by Aboling0 (https://github.com/Aboling0) + +Licensed under CC BY-SA 4.0 + +https://creativecommons.org/licenses/by-sa/4.0/ + +--- + +The OmniAuth Logo - omniauth-logo-182px.jpeg (resized to square) + +Committed by https://github.com/tomeara to the old GH-Pages site for OmniAuth + +https://github.com/omniauth/omniauth/commit/89a03ef889cd9994cdfa8a61d5195d76884510ec + +Creator and License specifically are unknown, +but the code of the project and website was and is licensed under MIT. + +--- + +The OpenID Logo - openid_rgb-300dpi.png + +Logo Guidelines: The OpenID logo is to be displayed in its entirety on either a solid light or dark background—avoid mid-tones or strongly colored backgrounds. The logo should not be displayed in parts, with color variations, or with other elements superimposed on top of the logo. The stylized I+D symbol should not be modified or distorted. + +https://openid.net/policies/ + +--- + +The Ruby Logo - ruby-logo-124px.jpeg (resized) + +https://www.ruby-lang.org/en/about/logo/ + +Yukihiro Matsumoto, Ruby Visual Identity Team, CC BY-SA 2.5 + +https://creativecommons.org/licenses/by-sa/2.5 diff --git a/docs/images/logo/galtzo-floss-logos-original.svg b/docs/images/logo/galtzo-floss-logos-original.svg new file mode 100644 index 0000000..40358de --- /dev/null +++ b/docs/images/logo/galtzo-floss-logos-original.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/docs/images/logo/galtzo-floss-logos-wordless.svg b/docs/images/logo/galtzo-floss-logos-wordless.svg new file mode 100644 index 0000000..45620af --- /dev/null +++ b/docs/images/logo/galtzo-floss-logos-wordless.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/docs/images/logo/omniauth-logo-182px.png b/docs/images/logo/omniauth-logo-182px.png new file mode 100644 index 0000000..8362552 Binary files /dev/null and b/docs/images/logo/omniauth-logo-182px.png differ diff --git a/docs/images/logo/openid_rgb-300dpi.png b/docs/images/logo/openid_rgb-300dpi.png new file mode 100644 index 0000000..76c98fb Binary files /dev/null and b/docs/images/logo/openid_rgb-300dpi.png differ diff --git a/docs/images/logo/ruby-logo-124px.jpeg b/docs/images/logo/ruby-logo-124px.jpeg new file mode 100644 index 0000000..f1fc0df Binary files /dev/null and b/docs/images/logo/ruby-logo-124px.jpeg differ diff --git a/docs/images/logo/ruby-logo-198px.svg b/docs/images/logo/ruby-logo-198px.svg new file mode 100644 index 0000000..59cf324 --- /dev/null +++ b/docs/images/logo/ruby-logo-198px.svg @@ -0,0 +1,948 @@ + + + +image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/index.html b/docs/index.html new file mode 100644 index 0000000..27ccf3c --- /dev/null +++ b/docs/index.html @@ -0,0 +1,377 @@ + + + + + + + File: README + + — Documentation by YARD 0.9.37 + + + + + + + + + + + + + + + + + + + +
+ + +

+ + Galtzo.com Logo by Aboling0, CC BY-SA 4.0 + + + OmniAuth Logo possibly by Ted O'Meara, license unknown + + + OmniAuth Logo possibly by Ted O'Meara, license unknown + + + Yukihiro Matsumoto, Ruby Visual Identity Team, CC BY-SA 2.5 + +

+ +

đŸĢĩ OmniAuth::OpenID

+ +

Version License: MIT Downloads Rank Open Source Helpers Depfu CodeCov Test Coverage Coveralls Test Coverage QLTY Test Coverage QLTY Maintainability CI Heads CI Runtime Dependencies @ HEAD CI Current CI JRuby CI Supported CI Legacy CI Unsupported CI Ancient CI Test Coverage CI Style

+ +
+ +

Liberapay Goal Progress Sponsor Me on Github Buy me a coffee Donate on Polar Donate to my FLOSS or refugee efforts at ko-fi.com Donate to my FLOSS or refugee efforts using Patreon

+ +

Provides strategies for authenticating to providers using the OpenID v2 standard, which is deprecated, and very old. It is not for the modern OpenID Connect (OIDC) standard. For OpenID Connect (OIDC) check out: omniauth/omniauth_openid_connect

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Tokens to Remember +Gem name Gem namespace +
Works with JRuby +JRuby 9.2 Compat JRuby 9.3 Compat JRuby 9.4 Compat JRuby 10.0 Compat JRuby HEAD Compat +
Works with MRI Ruby 3 +Ruby 3.0 Compat Ruby 3.1 Compat Ruby 3.2 Compat Ruby 3.3 Compat Ruby 3.4 Compat Ruby HEAD Compat +
Works with MRI Ruby 2 +Ruby 2.4 Compat Ruby 2.5 Compat Ruby 2.6 Compat Ruby 2.7 Compat +
Source +Source on GitLab.com Source on CodeBerg.org Source on Github.com The best SHA: dQw4w9WgXcQ! +
Documentation +Current release on RubyDoc.info YARD on Galtzo.com BDFL Blog Wiki +
Compliance +License: MIT 📄ilo-declaration-img Security Policy Contributor Covenant 2.1 SemVer 2.0.0 +
Style +Enforced Code Style Linter Keep-A-Changelog 1.0.0 Gitmoji Commits +
Support +Live Chat on Discord Get help from me on Upwork Get help from me on Codementor +
Enterprise Support +Get help from me on Tidelift
💡Subscribe for support guarantees covering all FLOSS dependencies!
💡Tidelift is part of Sonar!
💡Tidelift pays maintainers to maintain the software you depend on!
📊@Pointy Haired Boss: An enterprise support subscription is “never gonna let you down”, and supports open source maintainers!
Comrade BDFL đŸŽ–ī¸ +Follow Me on LinkedIn Follow Me on Ruby.Social Follow Me on Bluesky Contact BDFL My technical writing +
+... 💖 +Find Me on WellFound: Find Me on CrunchBase My LinkTree More About Me 🧊 🐙 🛖 đŸ§Ē +
+ +

✨ Installation

+ +

Install the gem and add to the application’s Gemfile by executing:

+ +
$ bundle add omniauth-openid
+
+ +

If bundler is not being used to manage dependencies, install the gem by executing:

+ +
$ gem install omniauth-openid
+
+ +

🔒 Secure Installation

+ +

omniauth-openid is cryptographically signed, and has verifiable SHA-256 and SHA-512 checksums by
+stone_checksums. Be sure the gem you install hasn’t been tampered with
+by following the instructions below.

+ +

Add my public key (if you haven’t already, expires 2045-04-29) as a trusted certificate:

+ +
gem cert --add <(curl -Ls https://raw.github.com/omniauth/omniauth-openid/main/certs/pboling.pem)
+
+ +

You only need to do that once. Then proceed to install with:

+ +
gem install omniauth-openid -P MediumSecurity
+
+ +

The MediumSecurity trust profile will verify signed gems, but allow the installation of unsigned dependencies.

+ +

This is necessary because not all of omniauth-openid’s dependencies are signed, so we cannot use HighSecurity.

+ +

If you want to up your security game full-time:

+ +
bundle config set --global trust-policy MediumSecurity
+
+ +

NOTE: Be prepared to track down certs for signed gems and add them the same way you added mine.

+ +

🔧 Compatibility

+ +

â€Ļ

+ +

🔧 Basic Usage

+ +

Use the strategy as a middleware in your application:

+ +
require "omniauth-openid"
+require "openid/store/filesystem"
+
+use Rack::Session::Cookie
+use OmniAuth::Strategies::OpenID, store: OpenID::Store::Filesystem.new("/tmp")
+
+ +

Then simply direct users to /auth/open_id to prompt them for their OpenID identifier. You may also pre-set the identifier by passing an identifier parameter to the URL (Example: /auth/open_id?openid_url=yahoo.com).

+ +

A list of all OpenID stores is available at http://github.com/openid/ruby-openid/tree/master/lib/openid/store/

+ +

OmniAuth Builder

+ +

If OpenID is one of several authentication strategies, use the OmniAuth Builder:

+ +
require "omniauth-openid"
+require "openid/store/filesystem"
+
+use OmniAuth::Builder do
+  provider :open_id, store: OpenID::Store::Filesystem.new("/tmp")
+end
+
+ +

Configured Identifiers

+ +

You may pre-configure an OpenID identifier. For example, to use Google’s main OpenID endpoint:

+ +
use OmniAuth::Builder do
+  provider :open_id, nil, :name => 'google', :identifier => 'https://www.google.com/accounts/o8/id'
+end
+
+ +

Note the use of nil, which will trigger ruby-openid’s default Memory Store.

+ +

Please contribute some documentation if you have the gumption! The maintainer’s time is limited, and sometimes the authors of PRs with new options don’t update the this readme. 😭

+ +

🔐 Security

+ +

See SECURITY.md.

+ +

🤝 Contributing

+ +

If you need some ideas of where to help, you could work on adding more code coverage,
+or if it is already đŸ’¯ (see below) check issues, or PRs,
+or use the gem and think about how it could be better.

+ +

We Keep A Changelog so if you make changes, remember to update it.

+ +

See CONTRIBUTING.md for more detailed instructions.

+ +

🚀 Release Instructions

+ +

See CONTRIBUTING.md.

+ +

Code Coverage

+ +

Coverage Graph

+ +

đŸĒ‡ Code of Conduct

+ +

Everyone interacting with this project’s codebases, issue trackers,
+chat rooms and mailing lists agrees to follow the Contributor Covenant 2.1.

+ +

🌈 Contributors

+ +

Contributors

+ +

Made with contributors-img.

+ +

â­ī¸ Star History

+ +

+ + + + Star History Chart + +

</a>

+ +

📌 Versioning

+ +

This Library adheres to Semantic Versioning 2.0.0.
+Violations of this scheme should be reported as bugs.
+Specifically, if a minor or patch version is released that breaks backward compatibility,
+a new version should be immediately released that restores compatibility.
+Breaking changes to the public API will only be introduced with new major versions.

+ +

📌 Is “Platform Support” part of the public API?

+ +

Yes. But I’m obligated to include notesâ€Ļ

+ +

SemVer should, but doesn’t explicitly, say that dropping support for specific Platforms
+is a breaking change to an API.
+It is obvious to many, but not all, and since the spec is silent, the bike shedding is endless.

+ +
+

dropping support for a platform is both obviously and objectively a breaking change

+
+ + + +

To get a better understanding of how SemVer is intended to work over a project’s lifetime,
+read this article from the creator of SemVer:

+ + + +

As a result of this policy, and the interpretive lens used by the maintainer,
+you can (and should) specify a dependency on these libraries using
+the Pessimistic Version Constraint with two digits of precision.

+ +

For example:

+ +
spec.add_dependency("omniauth-openid", "~> 3.1")
+
+ +

See CHANGELOG.md for a list of releases.

+ +

📄 License

+ +

The gem is available as open source under the terms of
+the MIT License License: MIT.
+See LICENSE.txt for the official Copyright Notice.

+ + + +
    +
  • + Copyright (c) 2025 Peter H. Boling, of + + Galtzo.com + + Galtzo.com Logo by Aboling0, CC BY-SA 4.0 + + , and omniauth-openid contributors +
  • +
  • + 2010-2011 Michael Bleigh, and Intridea, Inc. +
  • +
+ +

🤑 One more thing

+ +

You made it to the bottom of the page,
+so perhaps you’ll indulge me for another 20 seconds.
+I maintain many dozens of gems, including this one,
+because I want Ruby to be a great place for people to solve problems, big and small.
+Please consider supporting my efforts via the giant yellow link below,
+or one of the others at the head of this README.

+ +

Buy me a latte

+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/js/app.js b/docs/js/app.js new file mode 100644 index 0000000..b5610ef --- /dev/null +++ b/docs/js/app.js @@ -0,0 +1,344 @@ +(function () { + var localStorage = {}, + sessionStorage = {}; + try { + localStorage = window.localStorage; + } catch (e) {} + try { + sessionStorage = window.sessionStorage; + } catch (e) {} + + function createSourceLinks() { + $(".method_details_list .source_code").before( + "[View source]" + ); + $(".toggleSource").toggle( + function () { + $(this).parent().nextAll(".source_code").slideDown(100); + $(this).text("Hide source"); + }, + function () { + $(this).parent().nextAll(".source_code").slideUp(100); + $(this).text("View source"); + } + ); + } + + function createDefineLinks() { + var tHeight = 0; + $(".defines").after(" more..."); + $(".toggleDefines").toggle( + function () { + tHeight = $(this).parent().prev().height(); + $(this).prev().css("display", "inline"); + $(this).parent().prev().height($(this).parent().height()); + $(this).text("(less)"); + }, + function () { + $(this).prev().hide(); + $(this).parent().prev().height(tHeight); + $(this).text("more..."); + } + ); + } + + function createFullTreeLinks() { + var tHeight = 0; + $(".inheritanceTree").toggle( + function () { + tHeight = $(this).parent().prev().height(); + $(this).parent().toggleClass("showAll"); + $(this).text("(hide)"); + $(this).parent().prev().height($(this).parent().height()); + }, + function () { + $(this).parent().toggleClass("showAll"); + $(this).parent().prev().height(tHeight); + $(this).text("show all"); + } + ); + } + + function searchFrameButtons() { + $(".full_list_link").click(function () { + toggleSearchFrame(this, $(this).attr("href")); + return false; + }); + window.addEventListener("message", function (e) { + if (e.data === "navEscape") { + $("#nav").slideUp(100); + $("#search a").removeClass("active inactive"); + $(window).focus(); + } + }); + + $(window).resize(function () { + if ($("#search:visible").length === 0) { + $("#nav").removeAttr("style"); + $("#search a").removeClass("active inactive"); + $(window).focus(); + } + }); + } + + function toggleSearchFrame(id, link) { + var frame = $("#nav"); + $("#search a").removeClass("active").addClass("inactive"); + if (frame.attr("src") === link && frame.css("display") !== "none") { + frame.slideUp(100); + $("#search a").removeClass("active inactive"); + } else { + $(id).addClass("active").removeClass("inactive"); + if (frame.attr("src") !== link) frame.attr("src", link); + frame.slideDown(100); + } + } + + function linkSummaries() { + $(".summary_signature").click(function () { + document.location = $(this).find("a").attr("href"); + }); + } + + function summaryToggle() { + $(".summary_toggle").click(function (e) { + e.preventDefault(); + localStorage.summaryCollapsed = $(this).text(); + $(".summary_toggle").each(function () { + $(this).text($(this).text() == "collapse" ? "expand" : "collapse"); + var next = $(this).parent().parent().nextAll("ul.summary").first(); + if (next.hasClass("compact")) { + next.toggle(); + next.nextAll("ul.summary").first().toggle(); + } else if (next.hasClass("summary")) { + var list = $('