diff --git a/.devcontainer/apt-install/install.sh b/.devcontainer/apt-install/install.sh index 061ca0f7..694838c7 100644 --- a/.devcontainer/apt-install/install.sh +++ b/.devcontainer/apt-install/install.sh @@ -1,5 +1,11 @@ #!/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 + +# Basic, commonly needed, dependencies of Ruby & JRuby projects +apt-get install -y direnv default-jdk git zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libxml2-dev libxslt1-dev libcurl4-openssl-dev software-properties-common libffi-dev + +# Support for PostgreSQL +apt-get install -y postgresql libpq-dev + # Adds the direnv setup script to ~/.bashrc file (at the end) -echo 'eval "$(direnv hook bash)"' >> ~/.bashrc \ No newline at end of file +echo 'eval "$(direnv hook bash)"' >> ~/.bashrc diff --git a/.env.local.example b/.env.local.example index 7729745d..c1f35971 100644 --- a/.env.local.example +++ b/.env.local.example @@ -1,7 +1,7 @@ # # DO NOT EDIT THIS FILE # -# COPT THIS FILE TO .env.local +# COPY THIS FILE TO .env.local # # That file is ignored by .gitignore. This file is not. # @@ -25,3 +25,7 @@ export GITHUB_TOKEN= export GITLAB_TOKEN= # Alternatively: # export GL_TOKEN= + +# OmniAuth not have an open source collective. +export OPENCOLLECTIVE_HANDLE=false +export FUNDING_ORG=false diff --git a/.envrc b/.envrc index f699db33..2af5ca40 100644 --- a/.envrc +++ b/.envrc @@ -1,25 +1,37 @@ # Run any command in this library's bin/ without the bin/ prefix! + # Prefer exe version over binstub + PATH_add exe 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 export K_SOUP_COV_COMMAND_NAME="Test Coverage" + # Available formats are html, xml, rcov, lcov, json, tty + export K_SOUP_COV_FORMATTERS="html,xml,rcov,lcov,json,tty" export K_SOUP_COV_MIN_BRANCH=80 # Means you want to enforce X% branch coverage export K_SOUP_COV_MIN_LINE=96 # Means you want to enforce X% line coverage @@ -30,20 +42,28 @@ export MAX_ROWS=1 # Setting for simplecov-console gem for tty output, limits to export KETTLE_TEST_SILENT=true # Internal Debugging Controls +export INTEGRATION_LOG_LEVEL= # Set to debug for debugging output from integration tests. Set to empty string for normal output. export DEBUG=false # do not allow byebug statements (override in .env.local) export FLOSS_CFG_FUND_DEBUG=false # extra logging to help diagnose issues (override in .env.local) export FLOSS_CFG_FUND_LOGFILE=tmp/log/debug.log # Concurrently developing the rubocop-lts suite? + export RUBOCOP_LTS_LOCAL=false -# kettle-dev open collective integration +# omniauth-identity has no open source collective. + export OPENCOLLECTIVE_HANDLE=false +export FUNDING_ORG=false # .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/.git-hooks/commit-msg b/.git-hooks/commit-msg index 750c5bb1..5d160e67 100755 --- a/.git-hooks/commit-msg +++ b/.git-hooks/commit-msg @@ -16,33 +16,39 @@ begin # Is the first character a GitMoji? gitmoji_index = full_text =~ Gitmoji::Regex::REGEX if gitmoji_index == 0 - exit 0 + exit(0) else - denied = < e - warn("gitmoji-regex gem not found: #{e.class}: #{e.message}.\n\tSkipping gitmoji check and allowing commit to proceed.\n\tRecommendation: add 'gitmoji-regex' to your development dependencies to enable this check.") - exit 0 + failure = <<~EOM + gitmoji-regex gem not found: #{e.class}: #{e.message}. + Skipping gitmoji check and allowing commit to proceed. + Recommendation: add 'gitmoji-regex' to your development dependencies to enable this check. + + EOM + warn(failure) + exit(0) end diff --git a/.git-hooks/footer-template.erb.txt b/.git-hooks/footer-template.erb.txt index d732d699..36cdb0ad 100644 --- a/.git-hooks/footer-template.erb.txt +++ b/.git-hooks/footer-template.erb.txt @@ -1,5 +1,5 @@ ⚡️ A message from a fellow meat-based-AI ⚡️ -- [❤️] Finely-crafted open-source tools like <%= @gem_name %> (& many more) are a full-time endeavor. +- [❤️] Finely-crafted open-source tools like <%= @gem_name %> (& many more) require time and effort. - [❤️] Though I adore my work, it lacks financial sustainability. - [❤️] Please, help me continue enhancing your tools by becoming a sponsor: - [💲] https://liberapay.com/pboling/donate diff --git a/.git-hooks/prepare-commit-msg b/.git-hooks/prepare-commit-msg index c6a15570..dbc30589 100755 --- a/.git-hooks/prepare-commit-msg +++ b/.git-hooks/prepare-commit-msg @@ -3,17 +3,6 @@ # Fail on error and unset variables set -eu -# Determine project root as the parent directory of this hook script -PROJECT_ROOT="$(CDPATH= cd -- "$(dirname -- "$0")"/.. && pwd)" - -# Run the Ruby hook within the direnv context (if available), -# so ENV from .envrc/.env.local at project root is loaded. -# One of the things .envrc needs to do is add $PROJECT_ROOT/bin/ to the path. -# You should have this line at the top of .envrc -# PATH_add bin -# NOTE: If this project ships exe scripts it should also add that. -if command -v direnv >/dev/null 2>&1; then - exec direnv exec "$PROJECT_ROOT" "kettle-commit-msg" "$@" -else - raise "direnv not found. Local development of this project ($PROJECT_ROOT) with tools from the kettle-dev gem may not work properly. Please run 'brew install direnv'." -fi +# We are not using direnv exec here because mise and direnv can result in conflicting PATH settings: +# See: https://mise.jdx.dev/direnv.html +exec "kettle-commit-msg" "$@" diff --git a/.github/workflows/current.yml b/.github/workflows/current.yml index da98c5fc..a4d58f22 100644 --- a/.github/workflows/current.yml +++ b/.github/workflows/current.yml @@ -38,6 +38,13 @@ jobs: matrix: include: # Ruby 3.4 + - ruby: "ruby" + appraisal: "ar-7-1" + exec_cmd: "rake spec:orm:active_record" + gemfile: "Appraisal.root" + rubygems: latest + bundler: latest + - ruby: "ruby" appraisal: "ar-7-2" exec_cmd: "rake spec:orm:active_record" diff --git a/.github/workflows/style.yml b/.github/workflows/style.yml index 2fe1e03c..4fbef86e 100644 --- a/.github/workflows/style.yml +++ b/.github/workflows/style.yml @@ -63,3 +63,5 @@ jobs: run: bundle exec appraisal ${{ matrix.appraisal }} bundle - name: Run ${{ matrix.appraisal }} checks via ${{ matrix.exec_cmd }} run: bundle exec appraisal ${{ matrix.appraisal }} bundle exec ${{ matrix.exec_cmd }} + - name: Validate RBS Types + run: bundle exec appraisal ${{ matrix.appraisal }} bin/rbs validate diff --git a/.gitignore b/.gitignore index fc62abc1..d7e5721f 100644 --- a/.gitignore +++ b/.gitignore @@ -48,3 +48,18 @@ Appraisal.*.gemfile.lock # Sentinels .floss_funding.*.lock + +# Integration test databases and dummies (Phase 1) +spec/dummies/rails/db/*.sqlite3 +spec/dummies/rails/db/*.sqlite3-* +spec/dummies/rails/log/ +spec/dummies/rails/tmp/ + +tmp/db/ + +# Prevent incorrectly named sqlite database files from being tracked +sqlite::memory:* +*::memory::* + +# Combustion / Rails internal files +spec/internal/log/ diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3390138a..f5e31277 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -13,7 +13,7 @@ # - template: Security/SAST.gitlab-ci.yml default: - image: ruby + image: "ruby:${RUBY_VERSION}" variables: BUNDLE_INSTALL_FLAGS: "--quiet --jobs=$(nproc) --retry=3" @@ -22,8 +22,8 @@ variables: K_SOUP_COV_DEBUG: true K_SOUP_COV_DO: true K_SOUP_COV_HARD: true - K_SOUP_COV_MIN_BRANCH: 100 - K_SOUP_COV_MIN_LINE: 100 + K_SOUP_COV_MIN_BRANCH: 74 + K_SOUP_COV_MIN_LINE: 90 K_SOUP_COV_VERBOSE: true K_SOUP_COV_FORMATTERS: "tty" K_SOUP_COV_MULTI_FORMATTERS: true @@ -39,7 +39,6 @@ workflow: - if: '$CI_COMMIT_TAG' .test_template-current: &test_definition-current - image: ruby:${RUBY_VERSION} stage: test script: # || true so we don't fail here, because it'll probably work even if the gem update fails @@ -67,7 +66,6 @@ workflow: - vendor/ruby .test_template-legacy: &test_definition-legacy - image: ruby:${RUBY_VERSION} stage: test script: # RUBYGEMS_VERSION because we support EOL Ruby still... @@ -87,7 +85,7 @@ workflow: - bundle exec appraisal ${APPRAISAL} bin/rake --tasks # Run tests, skipping those that won't work in CI - > - bundle exec appraisal unlocked_deps \ + bundle exec appraisal ${APPRAISAL} \ bin/rspec spec \ --tag \~ci_skip \ --format progress \ @@ -108,7 +106,7 @@ ruby-current: ruby-ruby3_1: variables: RUBYGEMS_VERSION: "3.6.9" - APPRAISAL: ruby_3_1 + APPRAISAL: ruby-3-1 K_SOUP_COV_DO: false <<: *test_definition-legacy parallel: @@ -118,7 +116,7 @@ ruby-ruby3_1: ruby-ruby3_0: variables: RUBYGEMS_VERSION: "3.5.23" - APPRAISAL: ruby_3_0 + APPRAISAL: ruby-3-0 K_SOUP_COV_DO: false <<: *test_definition-legacy parallel: @@ -128,7 +126,7 @@ ruby-ruby3_0: ruby-ruby2_7: variables: RUBYGEMS_VERSION: "3.4.22" - APPRAISAL: ruby_2_7 + APPRAISAL: ruby-2-7 K_SOUP_COV_DO: false <<: *test_definition-legacy parallel: diff --git a/.idea/.gitignore b/.idea/.gitignore old mode 100755 new mode 100644 index b8b740bd..2c74abc4 --- a/.idea/.gitignore +++ b/.idea/.gitignore @@ -6,10 +6,6 @@ # Datasource local storage ignored files /dataSources/ /dataSources.local.xml -# CodeStream ignored files -/codestream.xml -# Ignored default folder with query files -/queries/ # Zencoder local files /zencoder/chats @@ -18,3 +14,32 @@ # Local project config *.iml +# Added: Ignore plugin state artifacts (machine-specific) +/copilot*.xml +/GitLink.xml + +# Added: Ignore task & usage statistics (contain local timestamps / paths) +/tasks.xml +/usage.statistics.xml + +# Added: Local inspection profiles (developer-specific customizations) +/inspectionProfiles/ + +# Added: Library & index caches (regenerated per machine) +/libraries/ +/indexLayout.xml +/indexes/ + +# Added: Terminal, SSH, and other per-user runtime config +/terminal/ +/sshConfigs/ + +# Added: RubyMine misc SDK version drift (optional). Comment to share SDK config. +# /misc.xml + +# Commit: VCS local mappings can be regenerated (optional). Comment to share settings. +# /vcs.xml + +# Commit: Dictionary files (local spellcheck customizations) +# /dictionaries/ + diff --git a/.idea/GitLink.xml b/.idea/GitLink.xml old mode 100755 new mode 100644 diff --git a/.idea/active-tab-highlighter.xml b/.idea/active-tab-highlighter.xml deleted file mode 100755 index 409aba97..00000000 --- a/.idea/active-tab-highlighter.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/.idea/dbnavigator.xml b/.idea/dbnavigator.xml deleted file mode 100644 index 0910bc64..00000000 --- a/.idea/dbnavigator.xml +++ /dev/null @@ -1,430 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/developer-tools.xml b/.idea/developer-tools.xml deleted file mode 100755 index 5421cc50..00000000 --- a/.idea/developer-tools.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/.idea/dictionaries/project.xml b/.idea/dictionaries/project.xml new file mode 100644 index 00000000..e2fee970 --- /dev/null +++ b/.idea/dictionaries/project.xml @@ -0,0 +1,7 @@ + + + + ostruct + + + \ No newline at end of file diff --git a/.idea/git_toolbox_blame.xml b/.idea/git_toolbox_blame.xml deleted file mode 100755 index 75202252..00000000 --- a/.idea/git_toolbox_blame.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/.idea/git_toolbox_prj.xml b/.idea/git_toolbox_prj.xml deleted file mode 100755 index 02b915b8..00000000 --- a/.idea/git_toolbox_prj.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml deleted file mode 100644 index 564cff9c..00000000 --- a/.idea/inspectionProfiles/Project_Default.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml index 9d5eda5f..98f06998 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -1,4 +1,15 @@ + + \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml new file mode 100644 index 00000000..4d74e95b --- /dev/null +++ b/.idea/workspace.xml @@ -0,0 +1,708 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + { + "lastFilter": { + "state": "OPENED", + "assignee": { + "type": "org.jetbrains.plugins.gitlab.mergerequest.ui.filters.GitLabMergeRequestsFiltersValue.MergeRequestsMemberFilterValue.MergeRequestsAssigneeFilterValue", + "username": "pboling", + "fullname": "Peter Boling" + } + } +} + { + "selectedUrlAndAccountId": { + "first": "git@gitlab.com:omniauth/omniauth-identity.git", + "second": "e48d1869-12e2-4c93-9360-3329de046d71" + } +} + {} + { + "isMigrated": true +} + { + "associatedIndex": 0 +} + + + + + + + { + "keyToString": { + "ModuleVcsDetector.initialDetectionPerformed": "true", + "RailsGeneratorsRunner#FAILED_RELOADS_PROPERTY": "3", + "RunOnceActivity.GPG_PINENTRY_CONFIGURATION_PROPOSAL": "true", + "RunOnceActivity.ShowReadmeOnStart": "true", + "RunOnceActivity.TerminalTabsStorage.copyFrom.TerminalArrangementManager.252": "true", + "RunOnceActivity.git.unshallow": "true", + "SHARE_PROJECT_CONFIGURATION_FILES": "true", + "com.github.patou.gitmoji.display-icon": "emoji", + "com.github.patou.gitmoji.text-after-unicode": " ", + "com.github.patou.gitmoji.use-unicode": "true", + "com.intellij.lang.ruby.rbs.tools.collection.workspace.sync.RbsCollectionUpdateProjectActivity#LAST_UPDATE_TIMESTAMP": "1763929149548", + "com.intellij.ml.llm.matterhorn.ej.ui.settings.DefaultAutoModeForALLUsers.v1": "true", + "com.intellij.ml.llm.matterhorn.ej.ui.settings.DefaultModelSelectionForGA.v1": "true", + "git-widget-placeholder": "feat/integration-test", + "junie.onboarding.icon.badge.shown": "true", + "last_opened_file_path": "/home/pboling/src/omniauth/omniauth-identity/gemfiles/modular", + "node.js.detected.package.eslint": "true", + "node.js.detected.package.tslint": "true", + "node.js.selected.package.eslint": "(autodetect)", + "node.js.selected.package.tslint": "(autodetect)", + "nodejs_package_manager_path": "npm", + "ruby.structure.view.model.defaults.configured": "true", + "settings.editor.selected.configurable": "preferences.pluginManager", + "to.speed.mode.migration.done": "true", + "vue.rearranger.settings.migration": "true" + } +} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1762806402941 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.junie/guidelines.md b/.junie/guidelines.md index 386ce4eb..b5a48ec5 100644 --- a/.junie/guidelines.md +++ b/.junie/guidelines.md @@ -47,9 +47,7 @@ This document captures project-specific knowledge to streamline setup, testing, - RSpec 3.13 with custom spec/spec_helper.rb configuration: - silent_stream: STDOUT is silenced by default for examples to keep logs clean. - To explicitly test console output, tag the example or group with :check_output. - - Global state hygiene: Around each example, FlossFunding.namespaces and FlossFunding.silenced are snapshotted and restored to prevent cross-test pollution. - DEBUG toggle: Set DEBUG=true to require 'debug' and avoid silencing output during your run. - - ENV seeding: The suite sets ENV["FLOSS_FUNDING_FLOSS_FUNDING"] = "Free-as-in-beer" so that the library’s own namespace is considered activated (avoids noisy warnings). - Coverage: kettle-soup-cover integrates SimpleCov; .simplecov is invoked from spec_helper when enabled by Kettle::Soup::Cover::DO_COV, which is controlled by K_SOUP_COV_DO being set to true / false. - RSpec.describe usage: - Use `describe "#"` to contain a block of specs that test instance method behavior. @@ -73,10 +71,11 @@ This document captures project-specific knowledge to streamline setup, testing, - Output visibility - To see STDOUT from the code under test, use the :check_output tag on the example or group. Example: - RSpec.describe "output", :check_output do - it "prints" do - puts "This output should be visible" - expect(true).to be true + RSpec.describe "with output", :check_output do + it "has output" do + output = capture(:stderr) {kernel.warn("This is a warning")} + logs = [ "This is a warning\n" ] + expect(output).to(include(*logs)) end end - Alternatively, run with DEBUG=true to disable silencing for the entire run. diff --git a/.rubocop_gradual.lock b/.rubocop_gradual.lock index b9b673cb..67681c3a 100644 --- a/.rubocop_gradual.lock +++ b/.rubocop_gradual.lock @@ -1,11 +1,11 @@ { - "README.md:4219525257": [ + "README.md:2907444128": [ [292, 3, 100, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 3592044714] ], "bin/bundle:247448467": [ [64, 5, 20, "ThreadSafety/ClassInstanceVariable: Avoid class instance variables.", 2485198147] ], - "lib/omniauth/identity/model.rb:2544890477": [ + "lib/omniauth/identity/model.rb:1526545408": [ [71, 11, 9, "ThreadSafety/ClassInstanceVariable: Avoid class instance variables.", 4045031525], [72, 11, 9, "ThreadSafety/ClassInstanceVariable: Avoid class instance variables.", 4045031525], [72, 40, 9, "ThreadSafety/ClassInstanceVariable: Avoid class instance variables.", 4045031525], @@ -31,7 +31,7 @@ [57, 13, 125, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 3604044426], [69, 13, 83, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 902334745] ], - "lib/omniauth/identity/models/rom.rb:1006067066": [ + "lib/omniauth/identity/models/rom.rb:2493518238": [ [28, 9, 866, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 3432708653], [39, 33, 14, "ThreadSafety/ClassInstanceVariable: Avoid class instance variables.", 3392992668], [60, 13, 14, "ThreadSafety/ClassInstanceVariable: Avoid class instance variables.", 2710654061], @@ -50,14 +50,20 @@ [31, 7, 113, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 353293128], [46, 9, 23, "ThreadSafety/ClassAndModuleAttributes: Avoid mutating class and module attributes.", 1578198260] ], + "spec/dummies/sinatra_app/models/identity.rb:391883596": [ + [23, 3, 60, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 2223458314] + ], "spec/omniauth/identity/model_spec.rb:3920022856": [ [3, 1, 40, "RSpec/SpecFilePathFormat: Spec path should end with `omni_auth/identity/model*_spec.rb`.", 1316823397] ], "spec/omniauth/identity/secure_password_spec.rb:4120880794": [ [3, 1, 49, "RSpec/SpecFilePathFormat: Spec path should end with `omni_auth/identity/secure_password*_spec.rb`.", 2365105762] ], - "spec/omniauth/strategies/identity_spec.rb:974965787": [ + "spec/omniauth/strategies/identity_spec.rb:1931794378": [ [6, 1, 55, "RSpec/SpecFilePathFormat: Spec path should end with `omni_auth/strategies/identity*_spec.rb`.", 3369296900], + [52, 7, 63, "RSpec/LeakyLocalVariable: Do not use local variables defined outside of examples inside of them.", 4024977967], + [53, 7, 47, "RSpec/LeakyLocalVariable: Do not use local variables defined outside of examples inside of them.", 2937627495], + [54, 7, 47, "RSpec/LeakyLocalVariable: Do not use local variables defined outside of examples inside of them.", 359943335], [164, 13, 63, "Style/IdenticalConditionalBranches: Move `expect(last_response.body).not_to include(\"Create an Identity\")` out of the conditional.", 3058698764], [167, 13, 63, "Style/IdenticalConditionalBranches: Move `expect(last_response.body).not_to include(\"Create an Identity\")` out of the conditional.", 3058698764], [180, 9, 15, "RSpec/StubbedMock: Prefer `allow` over `expect` when configuring a response.", 1348721721], @@ -73,6 +79,11 @@ [394, 33, 2, "RSpec/BeEq: Prefer `be` over `eq`.", 5860785], [417, 33, 2, "RSpec/BeEq: Prefer `be` over `eq`.", 5860785] ], + "spec/support/integration_helpers.rb:1249500677": [ + [45, 7, 6, "ThreadSafety/ClassInstanceVariable: Avoid class instance variables.", 2771267058], + [117, 7, 11, "ThreadSafety/ClassInstanceVariable: Avoid class instance variables.", 3188878486], + [121, 7, 15, "ThreadSafety/ClassInstanceVariable: Avoid class instance variables.", 847829822] + ], "spec/support/shared_contexts/instance_with_instance_methods.rb:664047042": [ [65, 7, 58, "RSpec/ReceiveMessages: Use `receive_messages` instead of multiple stubs on lines [66].", 2575742549], [66, 7, 55, "RSpec/ReceiveMessages: Use `receive_messages` instead of multiple stubs on lines [65].", 4289606631], @@ -87,6 +98,10 @@ "spec/support/shared_contexts/persistable_model.rb:4102269984": [ [3, 22, 19, "RSpec/ContextWording: Context description should match /^when\\b/, /^with\\b/, or /^without\\b/.", 3037799226] ], + "spec/support/shared_examples/integration.rb:2073621034": [ + [180, 20, 20, "RSpec/ExpectActual: Provide the actual value you are testing to `expect(...)`.", 2373910860], + [227, 20, 15, "RSpec/ExpectActual: Provide the actual value you are testing to `expect(...)`.", 2673315381] + ], "spec_ignored/nobrainer_spec.rb:3191134947": [ [19, 1, 65, "RSpec/SpecFilePathFormat: Spec path should end with `omni_auth/identity/models/no_brainer*_spec.rb`.", 1527957824], [20, 3, 12, "RSpec/BeforeAfterAll: Beware of using `before(:all)` as it may cause state to leak between tests. If you are using `rspec-rails`, and `use_transactional_fixtures` is enabled, then records created in `before(:all)` are not automatically rolled back.", 86334566], diff --git a/.rubocop_rspec.yml b/.rubocop_rspec.yml index df5911b2..ee96d669 100644 --- a/.rubocop_rspec.yml +++ b/.rubocop_rspec.yml @@ -18,7 +18,7 @@ RSpec/InstanceVariable: RSpec/NestedGroups: Enabled: false - + RSpec/ExpectInHook: Enabled: false diff --git a/.yardignore b/.yardignore new file mode 100644 index 00000000..ade54b79 --- /dev/null +++ b/.yardignore @@ -0,0 +1,13 @@ +# Ignore built gem artifacts and package dir +bin/**/* +certs/**/* +checksums/**/* +gemfiles/**/* +pkg/**/* +spec/**/* +spec*/**/* +test/**/* +tmp/**/* +*.gem +# Also ignore yardoc cache +.yardoc/ diff --git a/.yardopts b/.yardopts index 479134df..fafc28d8 100644 --- a/.yardopts +++ b/.yardopts @@ -1,11 +1,14 @@ +--plugin fence +-e yard/fence/hoist.rb +--plugin yaml --plugin junk --plugin relative_markdown_links ---readme README.md +--readme tmp/yard-fence/README.md --charset utf-8 --markup markdown +--markup-provider kramdown --output docs ---load .yard_gfm_support.rb 'lib/**/*.rb' - -'*.md' -'*.txt' \ No newline at end of file +'tmp/yard-fence/*.md' +'tmp/yard-fence/*.txt' diff --git a/Appraisal.root.gemfile b/Appraisal.root.gemfile index dafd51a9..9fea0a19 100644 --- a/Appraisal.root.gemfile +++ b/Appraisal.root.gemfile @@ -8,3 +8,6 @@ source "https://gem.coop" # We do not load the standard Gemfile, as it is tailored for local development. gemspec + +# bundler-audit v0.9.2 requires bundler < 3.0, but 4.0.0-beta1 is out. +# gem "bundler", "~> 2.7", ">= 2.7.2" diff --git a/Appraisals b/Appraisals index d2f696dd..34ea3fe1 100644 --- a/Appraisals +++ b/Appraisals @@ -20,51 +20,78 @@ # - Broken workflow indicates that a new contributor will have a bad time # appraise "unlocked_deps" do - gem "sequel", "~> 5.86", ">= 5.86.0" - gem "rom-sql", "~> 3.7" - eval_gemfile "modular/activerecord/r3/v8.0.gemfile" eval_gemfile "modular/omniauth/r3/v2.1.gemfile" + eval_gemfile "modular/rails/r3/v8.1.gemfile" eval_gemfile "modular/coverage.gemfile" eval_gemfile "modular/documentation.gemfile" eval_gemfile "modular/style.gemfile" eval_gemfile "modular/optional.gemfile" eval_gemfile "modular/x_std_libs.gemfile" + eval_gemfile "modular/integration.gemfile" +end + +# Used for head (nightly) releases of ruby, truffleruby, and jruby. +# Split into discrete appraisals if one of them needs a dependency locked discretely. +appraise "head" do + # Why is gem "cgi" here? See: https://github.com/vcr/vcr/issues/1057 + # gem "cgi", ">= 0.5" + gem "benchmark", "~> 0.4", ">= 0.4.1" + eval_gemfile "modular/x_std_libs.gemfile" + eval_gemfile "modular/rack/vHEAD.gemfile" +end + +# Used for current releases of ruby, truffleruby, and jruby. +# Split into discrete appraisals if one of them needs a dependency locked discretely. +appraise "current" do + eval_gemfile "modular/x_std_libs.gemfile" + eval_gemfile "modular/integration.gemfile" end # Test current Rubies against head versions of runtime dependencies appraise "dep-heads" do - eval_gemfile "modular/activerecord/vHEAD.gemfile" eval_gemfile "modular/runtime_heads.gemfile" + # eval_gemfile "modular/integration.gemfile" # favor individual vHEAD gemfiles + eval_gemfile "modular/combustion/vHEAD.gemfile" + eval_gemfile "modular/hanami/vHEAD.gemfile" + eval_gemfile "modular/rack/vHEAD.gemfile" + eval_gemfile "modular/rails/vHEAD.gemfile" + eval_gemfile "modular/roda/vHEAD.gemfile" + eval_gemfile "modular/rom-sql/vHEAD.gemfile" + eval_gemfile "modular/sequel/vHEAD.gemfile" + eval_gemfile "modular/sinatra/vHEAD.gemfile" end -# Compat: Ruby >= 2.2.2 +# Compatibility: Ruby >= 2.2.2 # Test Matrix: # - Ruby 2.4 appraise "ar-5-2-r2.4" do eval_gemfile "modular/activerecord/r2.4/v5.2.gemfile" eval_gemfile "modular/omniauth/r2/v1.0.gemfile" + eval_gemfile "modular/rack/r2/v1.6.gemfile" eval_gemfile "modular/x_std_libs/r2.4/libs.gemfile" end -# Compat: Ruby >= 2.2.2 +# Compatibility: Ruby >= 2.2.2 # Test Matrix: # - Ruby 2.5 appraise "ar-5-2-r2" do eval_gemfile "modular/activerecord/r2/v5.2.gemfile" eval_gemfile "modular/omniauth/r2/v1.1.gemfile" + eval_gemfile "modular/rack/r2/v1.6.gemfile" eval_gemfile "modular/x_std_libs/r2.6/libs.gemfile" end -# Compat: Ruby >= 2.5 +# Compatibility: Ruby >= 2.5 # Test Matrix: # - Ruby 2.5 appraise "ar-6-0" do eval_gemfile "modular/activerecord/r2/v6.0.gemfile" eval_gemfile "modular/omniauth/r2/v1.2.gemfile" + eval_gemfile "modular/rack/r2/v1.6.gemfile" eval_gemfile "modular/x_std_libs/r2.6/libs.gemfile" end -# Compat: Ruby >= 2.5 +# Compatibility: Ruby >= 2.5 # Test Matrix: # - JRuby 9.2 # - Ruby 2.5 @@ -73,37 +100,41 @@ end appraise "ar-6-1-r2.6" do eval_gemfile "modular/activerecord/r2/v6.1.gemfile" eval_gemfile "modular/omniauth/r2/v1.3.gemfile" + eval_gemfile "modular/rack/r2/v1.6.gemfile" eval_gemfile "modular/x_std_libs/r2.6/libs.gemfile" end -# Compat: Ruby >= 2.7 +# Compatibility: Ruby >= 2.7 # Test Matrix: # - Ruby 2.7 appraise "ar-6-1-r2" do eval_gemfile "modular/activerecord/r2/v6.1.gemfile" eval_gemfile "modular/omniauth/r2/v1.3.gemfile" + eval_gemfile "modular/rack/r2/v1.6.gemfile" eval_gemfile "modular/x_std_libs/r2/libs.gemfile" end -# Compat: Ruby >= 2.5 +# Compatibility: Ruby >= 2.5 # Test Matrix: # - Ruby 3.0 appraise "ar-6-1-r3" do eval_gemfile "modular/activerecord/r3/v6.1.gemfile" eval_gemfile "modular/omniauth/r3/v2.1.gemfile" + eval_gemfile "modular/rack/r3/v3.2.gemfile" eval_gemfile "modular/x_std_libs/r3.1/libs.gemfile" end -# Compat: Ruby >= 2.7 +# Compatibility: Ruby >= 2.7 # Test Matrix: # - Ruby 2.7 appraise "ar-7-0-r2" do eval_gemfile "modular/activerecord/r2/v7.0.gemfile" eval_gemfile "modular/omniauth/r2/v1.4.gemfile" + eval_gemfile "modular/rack/r2/v1.6.gemfile" eval_gemfile "modular/x_std_libs/r2/libs.gemfile" end -# Compat: Ruby >= 2.7 +# Compatibility: Ruby >= 2.7 # Test Matrix: # - Ruby 3.0 # - Ruby 3.1 @@ -111,19 +142,21 @@ end appraise "ar-7-0-r3" do eval_gemfile "modular/activerecord/r3/v7.0.gemfile" eval_gemfile "modular/omniauth/r3/v2.1.gemfile" + eval_gemfile "modular/rack/r3/v3.2.gemfile" eval_gemfile "modular/x_std_libs/r3.1/libs.gemfile" end -# Compat: Ruby >= 2.7 +# Compatibility: Ruby >= 2.7 # Test Matrix: # - Ruby 2.7 appraise "ar-7-1-r2" do eval_gemfile "modular/activerecord/r2/v7.1.gemfile" eval_gemfile "modular/omniauth/r2/v1.5.gemfile" + eval_gemfile "modular/rack/r2/v1.6.gemfile" eval_gemfile "modular/x_std_libs/r2/libs.gemfile" end -# Compat: Ruby >= 2.7 +# Compatibility: Ruby >= 2.7 # Test Matrix: # - Ruby 3.0 # - Ruby 3.1 @@ -131,54 +164,76 @@ end appraise "ar-7-1-r3.1" do eval_gemfile "modular/activerecord/r3/v7.1.gemfile" eval_gemfile "modular/omniauth/r3/v2.1.gemfile" + eval_gemfile "modular/rack/r3/v3.2.gemfile" eval_gemfile "modular/x_std_libs/r3.1/libs.gemfile" end -# Compat: Ruby >= 2.7 +# Compatibility: Ruby >= 2.7 # Test Matrix: # - Ruby 3.2 # - Ruby 3.3 +# - Ruby 3.4 # - JRuby 10.0 appraise "ar-7-1-r3" do - eval_gemfile "modular/activerecord/r3/v7.1.gemfile" + # eval_gemfile "modular/activerecord/r3/v7.1.gemfile" # favor the dependency on rails instead eval_gemfile "modular/omniauth/r3/v2.1.gemfile" + eval_gemfile "modular/rails/r3/v7.1.gemfile" eval_gemfile "modular/x_std_libs/r3/libs.gemfile" + eval_gemfile "modular/integration.gemfile" end -# Compat: Ruby >= 3.1 +# Compatibility: Ruby >= 3.1 # Test Matrix: # - Ruby 3.3 # - Ruby 3.4 appraise "ar-7-2" do - eval_gemfile "modular/activerecord/r3/v7.2.gemfile" + # eval_gemfile "modular/activerecord/r3/v7.2.gemfile" # favor the dependency on rails instead eval_gemfile "modular/omniauth/r3/v2.1.gemfile" + eval_gemfile "modular/rails/r3/v7.2.gemfile" eval_gemfile "modular/x_std_libs/r3/libs.gemfile" + eval_gemfile "modular/integration.gemfile" end -# Compat: Ruby >= 3.2 +# Compatibility: Ruby >= 3.2 # Test Matrix: # - Ruby 3.2 # - Ruby 3.3 # - Ruby 3.4 appraise "ar-8-0" do - eval_gemfile "modular/activerecord/r3/v8.0.gemfile" + # eval_gemfile "modular/activerecord/r3/v8.0.gemfile" # favor the dependency on rails instead eval_gemfile "modular/omniauth/r3/v2.1.gemfile" + eval_gemfile "modular/rails/r3/v8.0.gemfile" eval_gemfile "modular/x_std_libs/r3/libs.gemfile" + eval_gemfile "modular/integration.gemfile" end -# Compat: Ruby >= 2.2.2 (due to AR >= 5) +# Compatibility: Ruby >= 3.2 +# Test Matrix: +# - Ruby 3.2 +# - Ruby 3.3 +# - Ruby 3.4 +appraise "ar-8-1" do + # eval_gemfile "modular/activerecord/r3/v8.1.gemfile" # favor the dependency on rails instead + eval_gemfile "modular/omniauth/r3/v2.1.gemfile" + eval_gemfile "modular/rails/r3/v8.1.gemfile" + eval_gemfile "modular/x_std_libs/r3/libs.gemfile" + eval_gemfile "modular/integration.gemfile" +end + +# Compatibility: Ruby >= 2.2.2 (due to AR >= 5) # Test Matrix: # - Ruby 2.4 appraise "couch-1.17-r2.4" do gem "couch_potato", "~> 1.17" gem "ostruct", "~> 0.1" # Ruby >= 0, all newer releases of ostruct require Ruby >= 2.5 - eval_gemfile "modular/activerecord/r2/v5.2.gemfile" + eval_gemfile "modular/activerecord/r2.4/v5.2.gemfile" eval_gemfile "modular/omniauth/r2/v1.6.gemfile" + eval_gemfile "modular/rack/r2/v1.6.gemfile" eval_gemfile "modular/x_std_libs/r2.4/libs.gemfile" end -# Compat: Ruby >= 2.2.2 (due to AR >= 5) +# Compatibility: Ruby >= 2.2.2 (due to AR >= 5) # Test Matrix: # - Ruby 2.5 appraise "couch-1.17-r2.5" do @@ -188,10 +243,11 @@ appraise "couch-1.17-r2.5" do eval_gemfile "modular/activerecord/r2/v6.0.gemfile" eval_gemfile "modular/omniauth/r2/v1.7.gemfile" + eval_gemfile "modular/rack/r2/v1.6.gemfile" eval_gemfile "modular/x_std_libs/r2.6/libs.gemfile" end -# Compat: Ruby >= 2.2.2 (due to AR >= 5) +# Compatibility: Ruby >= 2.2.2 (due to AR >= 5) # Test Matrix: # - Ruby 2.6 # - JRuby 9.3 @@ -202,10 +258,11 @@ appraise "couch-1.17-r2.6" do eval_gemfile "modular/activerecord/r2/v6.1.gemfile" eval_gemfile "modular/omniauth/r2/v1.7.gemfile" + eval_gemfile "modular/rack/r2/v1.6.gemfile" eval_gemfile "modular/x_std_libs/r2.6/libs.gemfile" end -# Compat: Ruby >= 2.2.2 (due to AR >= 5) +# Compatibility: Ruby >= 2.2.2 (due to AR >= 5) # Test Matrix: # - Ruby 2.7 appraise "couch-1.17-r2.7" do @@ -215,10 +272,11 @@ appraise "couch-1.17-r2.7" do eval_gemfile "modular/activerecord/r2/v6.1.gemfile" eval_gemfile "modular/omniauth/r2/v1.7.gemfile" + eval_gemfile "modular/rack/r2/v1.6.gemfile" eval_gemfile "modular/x_std_libs/r2/libs.gemfile" end -# Compat: Ruby >= 2.2.2 (due to AR >= 5) +# Compatibility: Ruby >= 2.2.2 (due to AR >= 5) # Test Matrix: # - Ruby 3.0 # - Ruby 3.1 @@ -229,10 +287,11 @@ appraise "couch-1.17-r3.1" do eval_gemfile "modular/activerecord/r3/v7.1.gemfile" eval_gemfile "modular/omniauth/r3/v2.1.gemfile" + eval_gemfile "modular/rack/r3/v3.2.gemfile" eval_gemfile "modular/x_std_libs/r3.1/libs.gemfile" end -# Compat: Ruby >= 2.2.2 (due to AR >= 5) +# Compatibility: Ruby >= 2.2.2 (due to AR >= 5) # Test Matrix: # - Ruby 3.2 # - Ruby 3.3 @@ -241,12 +300,14 @@ appraise "couch-1.17-r3" do gem "couch_potato", "~> 1.17" gem "ostruct", "~> 0.6", ">= 0.6.1" # Ruby >= 2.5 - eval_gemfile "modular/activerecord/r3/v7.1.gemfile" + # eval_gemfile "modular/activerecord/r3/v7.1.gemfile" # favor the dependency on rails instead eval_gemfile "modular/omniauth/r3/v2.1.gemfile" + eval_gemfile "modular/rails/r3/v7.1.gemfile" + eval_gemfile "modular/integration.gemfile" eval_gemfile "modular/x_std_libs/r3/libs.gemfile" end -# Compat: Ruby >= 2.3 +# Compatibility: Ruby >= 2.3 # Test Matrix: # - Ruby 2.4 appraise "mongoid-7.3-b4.12" do @@ -256,10 +317,11 @@ appraise "mongoid-7.3-b4.12" do eval_gemfile "modular/activerecord/r2.4/v5.2.gemfile" eval_gemfile "modular/omniauth/r2/v1.8.gemfile" + eval_gemfile "modular/rack/r2/v1.6.gemfile" eval_gemfile "modular/x_std_libs/r2.4/libs.gemfile" end -# Compat: Ruby >= 2.3 +# Compatibility: Ruby >= 2.3 # Test Matrix: # - JRuby 9.2 appraise "mongoid-7.3-b4.15" do @@ -269,10 +331,11 @@ appraise "mongoid-7.3-b4.15" do eval_gemfile "modular/activerecord/r2/v6.1.gemfile" eval_gemfile "modular/omniauth/r2/v1.9.gemfile" + eval_gemfile "modular/rack/r2/v1.6.gemfile" eval_gemfile "modular/x_std_libs/r2.6/libs.gemfile" end -# Compat: Ruby >= 2.5 +# Compatibility: Ruby >= 2.5 # Test Matrix: # - Ruby 2.5 # - JRuby 9.2 @@ -284,10 +347,11 @@ appraise "mongoid-7.4-b4.15" do eval_gemfile "modular/activerecord/r2/v6.1.gemfile" eval_gemfile "modular/omniauth/r2/v2.0.gemfile" + eval_gemfile "modular/rack/r2/v1.6.gemfile" eval_gemfile "modular/x_std_libs/r2.6/libs.gemfile" end -# Compat: Ruby >= 2.6 (because of bson v5) +# Compatibility: Ruby >= 2.6 (because of bson v5) # Test Matrix: # - JRuby 9.3 appraise "mongoid-7.4-b5" do @@ -297,10 +361,11 @@ appraise "mongoid-7.4-b5" do eval_gemfile "modular/activerecord/r2/v6.1.gemfile" eval_gemfile "modular/omniauth/r2/v2.0.gemfile" + eval_gemfile "modular/rack/r2/v1.6.gemfile" eval_gemfile "modular/x_std_libs/r2.6/libs.gemfile" end -# Compat: Ruby >= 2.6 +# Compatibility: Ruby >= 2.6 # Test Matrix: # - JRuby 9.3 appraise "mongoid-8.1-r2.6" do @@ -310,10 +375,11 @@ appraise "mongoid-8.1-r2.6" do eval_gemfile "modular/activerecord/r2/v6.1.gemfile" eval_gemfile "modular/omniauth/r2/v2.0.gemfile" + eval_gemfile "modular/rack/r2/v1.6.gemfile" eval_gemfile "modular/x_std_libs/r2.6/libs.gemfile" end -# Compat: Ruby >= 2.7 +# Compatibility: Ruby >= 2.7 # Test Matrix: # - Ruby 2.7 appraise "mongoid-8.1-r2" do @@ -323,10 +389,11 @@ appraise "mongoid-8.1-r2" do eval_gemfile "modular/activerecord/r2/v6.1.gemfile" eval_gemfile "modular/omniauth/r2/v2.0.gemfile" + eval_gemfile "modular/rack/r2/v1.6.gemfile" eval_gemfile "modular/x_std_libs/r2/libs.gemfile" end -# Compat: Ruby >= 2.6 +# Compatibility: Ruby >= 2.6 # Test Matrix: # - Ruby 3.1 # - JRuby 9.4 @@ -337,10 +404,11 @@ appraise "mongoid-8.1-r3.1" do eval_gemfile "modular/activerecord/r3/v7.1.gemfile" eval_gemfile "modular/omniauth/r3/v2.1.gemfile" + eval_gemfile "modular/rack/r3/v3.2.gemfile" eval_gemfile "modular/x_std_libs/r3.1/libs.gemfile" end -# Compat: Ruby >= 2.6 +# Compatibility: Ruby >= 2.6 # Test Matrix: # - Ruby 3.2 # - Ruby 3.3 @@ -350,12 +418,16 @@ appraise "mongoid-8.1-r3" do gem "mongoid-rspec", "~> 4.2" eval_gemfile "modular/bson/r3/v5.1.gemfile" - eval_gemfile "modular/activerecord/r3/v7.1.gemfile" + # eval_gemfile "modular/activerecord/r3/v7.1.gemfile" # favor the dependency on rails instead eval_gemfile "modular/omniauth/r3/v2.1.gemfile" + eval_gemfile "modular/rails/r3/v7.1.gemfile" + eval_gemfile "modular/rom-sql/r3/v3.7.gemfile" + eval_gemfile "modular/sequel/r3/v5.86.gemfile" + eval_gemfile "modular/integration.gemfile" eval_gemfile "modular/x_std_libs/r3/libs.gemfile" end -# Compat: Ruby >= 2.7 +# Compatibility: Ruby >= 2.7 # Test Matrix: # - Ruby 2.7 appraise "mongoid-9.0-r2-omni1.9" do @@ -365,11 +437,12 @@ appraise "mongoid-9.0-r2-omni1.9" do eval_gemfile "modular/activerecord/r2/v7.1.gemfile" eval_gemfile "modular/omniauth/r2/v1.9.gemfile" + eval_gemfile "modular/rack/r2/v1.6.gemfile" eval_gemfile "modular/x_std_libs/r2/libs.gemfile" gem "ostruct", "~> 0.6", ">= 0.6.1" # Ruby >= 2.5 end -# Compat: Ruby >= 2.7 +# Compatibility: Ruby >= 2.7 # Test Matrix: # - Ruby 2.7 appraise "mongoid-9.0-r2-omni2.0" do @@ -379,11 +452,12 @@ appraise "mongoid-9.0-r2-omni2.0" do eval_gemfile "modular/activerecord/r2/v7.1.gemfile" eval_gemfile "modular/omniauth/r2/v2.0.gemfile" + eval_gemfile "modular/rack/r2/v1.6.gemfile" eval_gemfile "modular/x_std_libs/r2/libs.gemfile" gem "ostruct", "~> 0.6", ">= 0.6.1" # Ruby >= 2.5 end -# Compat: Ruby >= 2.7 +# Compatibility: Ruby >= 2.7 # Test Matrix: # - Ruby 2.7 appraise "mongoid-9.0-r2-omni2.1" do @@ -393,11 +467,12 @@ appraise "mongoid-9.0-r2-omni2.1" do eval_gemfile "modular/activerecord/r2/v7.1.gemfile" eval_gemfile "modular/omniauth/r2/v2.1.gemfile" + eval_gemfile "modular/rack/r2/v3.2.gemfile" eval_gemfile "modular/x_std_libs/r2/libs.gemfile" gem "ostruct", "~> 0.6", ">= 0.6.1" # Ruby >= 2.5 end -# Compat: Ruby >= 2.7 +# Compatibility: Ruby >= 2.7 # Test Matrix: # - Ruby 3.0 # - JRuby 9.4 @@ -408,11 +483,12 @@ appraise "mongoid-9.0-r3.1" do eval_gemfile "modular/activerecord/r3/v7.1.gemfile" eval_gemfile "modular/omniauth/r3/v2.1.gemfile" + eval_gemfile "modular/rack/r3/v3.2.gemfile" eval_gemfile "modular/x_std_libs/r3.1/libs.gemfile" gem "ostruct", "~> 0.6", ">= 0.6.1" # Ruby >= 2.5 end -# Compat: Ruby >= 2.7 +# Compatibility: Ruby >= 2.7 # Test Matrix: # - Ruby 3.2 # - Ruby 3.3 @@ -422,8 +498,10 @@ appraise "mongoid-9.0-r3" do gem "mongoid-rspec", "~> 4.2" eval_gemfile "modular/bson/r3/v5.1.gemfile" - eval_gemfile "modular/activerecord/r3/v7.1.gemfile" eval_gemfile "modular/omniauth/r3/v2.1.gemfile" + eval_gemfile "modular/rack/r3/v3.2.gemfile" + eval_gemfile "modular/rails/r3/v7.1.gemfile" + eval_gemfile "modular/integration.gemfile" eval_gemfile "modular/x_std_libs/r3/libs.gemfile" gem "ostruct", "~> 0.6", ">= 0.6.1" # Ruby >= 2.5 end @@ -437,7 +515,7 @@ end # You might be inspired by the existing other services this library is currently # tested against (e.g. CouchDB, MongoDB) # See: https://github.com/rethinkdb/rethinkdb/issues/6981 -# Compat: Ruby >= 1.9 +# Compatibility: Ruby >= 1.9 # Test Matrix: # - Ruby 2.4 # - Ruby 2.5 @@ -456,7 +534,7 @@ end # gem "stringio", ">= 0.0.2" # end -# Compat: Ruby >= 3.1.0 +# Compatibility: Ruby >= 3.1.0 # Test Matrix: # - Ruby 3.1 # - TruffleRuby 23.1 @@ -465,10 +543,11 @@ appraise "rom-r3.1" do gem "rom-sql", "~> 3.7" eval_gemfile "modular/activerecord/r3/v7.1.gemfile" eval_gemfile "modular/omniauth/r3/v2.1.gemfile" + eval_gemfile "modular/rack/r3/v3.2.gemfile" eval_gemfile "modular/x_std_libs/r3.1/libs.gemfile" end -# Compat: Ruby >= 3.1.0 +# Compatibility: Ruby >= 3.1.0 # Test Matrix: # - Ruby 3.2 # - TruffleRuby 24.1 @@ -476,73 +555,79 @@ end # - Ruby 3.4 # - JRuby 10.0 appraise "rom-r3" do - gem "rom-sql", "~> 3.7" eval_gemfile "modular/activerecord/r3/v7.1.gemfile" eval_gemfile "modular/omniauth/r3/v2.1.gemfile" eval_gemfile "modular/x_std_libs/r3/libs.gemfile" + eval_gemfile "modular/integration.gemfile" end -# Compat: Ruby >= 1.9.2 +# Compatibility: Ruby >= 1.9.2 # Test Matrix: # - Ruby 2.4 appraise "sequel-5.86-r2.4" do - gem "sequel", "~> 5.86", ">= 5.86.0" eval_gemfile "modular/activerecord/r2.4/v5.2.gemfile" eval_gemfile "modular/omniauth/r2/v2.0.gemfile" + eval_gemfile "modular/rack/r2/v1.6.gemfile" + eval_gemfile "modular/sequel/r3/v5.86.gemfile" eval_gemfile "modular/x_std_libs/r2.4/libs.gemfile" end -# Compat: Ruby >= 1.9.2 +# Compatibility: Ruby >= 1.9.2 # Test Matrix: # - Ruby 2.5 appraise "sequel-5.86-r2.5" do - gem "sequel", "~> 5.86", ">= 5.86.0" eval_gemfile "modular/activerecord/r2/v6.0.gemfile" eval_gemfile "modular/omniauth/r2/v2.1.gemfile" + eval_gemfile "modular/rack/r2/v3.2.gemfile" + eval_gemfile "modular/sequel/r3/v5.86.gemfile" eval_gemfile "modular/x_std_libs/r2.6/libs.gemfile" end -# Compat: Ruby >= 1.9.2 +# Compatibility: Ruby >= 1.9.2 # Test Matrix: # - Ruby 2.6 appraise "sequel-5.86-r2.6" do - gem "sequel", "~> 5.86", ">= 5.86.0" eval_gemfile "modular/activerecord/r2/v6.1.gemfile" eval_gemfile "modular/omniauth/r2/v2.1.gemfile" + eval_gemfile "modular/rack/r2/v3.2.gemfile" + eval_gemfile "modular/sequel/r3/v5.86.gemfile" eval_gemfile "modular/x_std_libs/r2.6/libs.gemfile" end -# Compat: Ruby >= 1.9.2 +# Compatibility: Ruby >= 1.9.2 # Test Matrix: # - Ruby 2.7 appraise "sequel-5.86-r2.7" do - gem "sequel", "~> 5.86", ">= 5.86.0" eval_gemfile "modular/activerecord/r2/v7.1.gemfile" eval_gemfile "modular/omniauth/r2/v2.1.gemfile" + eval_gemfile "modular/rack/r2/v3.2.gemfile" + eval_gemfile "modular/sequel/r3/v5.86.gemfile" eval_gemfile "modular/x_std_libs/r2/libs.gemfile" end -# Compat: Ruby >= 1.9.2 +# Compatibility: Ruby >= 1.9.2 # Test Matrix: # - Ruby 3.0 # - Ruby 3.1 appraise "sequel-5.86-r3.1" do - gem "sequel", "~> 5.86", ">= 5.86.0" eval_gemfile "modular/activerecord/r3/v7.1.gemfile" eval_gemfile "modular/omniauth/r3/v2.1.gemfile" + eval_gemfile "modular/rack/r3/v3.2.gemfile" + eval_gemfile "modular/sequel/r3/v5.86.gemfile" eval_gemfile "modular/x_std_libs/r3.1/libs.gemfile" end -# Compat: Ruby >= 1.9.2 +# Compatibility: Ruby >= 1.9.2 # Test Matrix: # - Ruby 3.2 # - Ruby 3.3 # - Ruby 3.4 # - JRuby 10.0 appraise "sequel-5.86-r3" do - gem "sequel", "~> 5.86", ">= 5.86.0" - eval_gemfile "modular/activerecord/r3/v7.1.gemfile" + # eval_gemfile "modular/activerecord/r3/v7.1.gemfile" # favor the dependency on rails instead eval_gemfile "modular/omniauth/r3/v2.1.gemfile" + eval_gemfile "modular/rails/r3/v7.1.gemfile" + eval_gemfile "modular/integration.gemfile" eval_gemfile "modular/x_std_libs/r3/libs.gemfile" end @@ -555,17 +640,17 @@ end # Only run coverage on the latest version of Ruby appraise "coverage" do gem "couch_potato", "~> 1.17" - gem "rom-sql", "~> 3.7" - gem "sequel", "~> 5.86", ">= 5.86.0" gem "mongoid", "~> 9.0", ">= 9.0.3" gem "mongoid-rspec", "~> 4.2" - eval_gemfile "modular/activerecord/r3/v8.0.gemfile" + # eval_gemfile "modular/activerecord/r3/v8.0.gemfile" # favor the dependency on rails instead eval_gemfile "modular/bson/r3/v5.1.gemfile" eval_gemfile "modular/omniauth/r3/v2.1.gemfile" + eval_gemfile "modular/rails/r3/v8.0.gemfile" # TODO: Once mongoid support AR v8.1, update here eval_gemfile "modular/coverage.gemfile" gem "ostruct", "~> 0.6", ">= 0.6.1" # Ruby >= 2.5 eval_gemfile "modular/optional.gemfile" eval_gemfile "modular/x_std_libs.gemfile" + eval_gemfile "modular/integration.gemfile" end # Only run linter on the latest version of Ruby (but, in support of oldest supported Ruby version) diff --git a/CHANGELOG.md b/CHANGELOG.md index 10d6cf9a..5f9d943e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,14 +20,23 @@ Please file a bug if you notice a violation of semantic versioning. ### Added +- Greatly improved documentation +- Traditional VERSION constant @ OmniAuth::Identity::VERSION + - Retains modern VERSION constant @ OmniAuth::Identity::Version::VERSION + ### Changed +- Improved devcontainer for easier maintenance +- `appraisal:reset` rake task for maintenance + ### Deprecated ### Removed ### Fixed +- GitLab pipeline for Ruby 2.7, 3.0, 3.1 + ### Security ## [3.1.5] - 2025-10-13 @@ -334,7 +343,9 @@ Please file a bug if you notice a violation of semantic versioning. - Gemfile.lock file - MongoMapper support; unable to satisfy dependencies of both MongoMapper and Mongoid now that MongoMapper is no longer actively maintained. -[Unreleased]: https://github.com/omniauth/omniauth-identity/compare/v3.1.5...HEAD +[Unreleased]: https://github.com/omniauth/omniauth-identity/compare/v3.1.6...HEAD +[3.1.6]: https://github.com/omniauth/omniauth-identity/compare/v3.1.5...v3.1.6 +[3.1.6t]: https://github.com/omniauth/omniauth-identity/releases/tag/v3.1.6 [3.1.5]: https://github.com/omniauth/omniauth-identity/compare/v3.1.4...v3.1.5 [3.1.5t]: https://github.com/omniauth/omniauth-identity/releases/tag/v3.1.5 [3.1.4]: https://github.com/omniauth/omniauth-identity/compare/v3.1.3...v3.1.4 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 65dcfe33..cfd4ecb2 100755 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -24,31 +24,22 @@ Follow these instructions: ## Executables vs Rake tasks -Executables shipped by omniauth-identity can be used with or without generating the binstubs. -They will work when omniauth-identity is installed globally (i.e., `gem install omniauth-identity`) and do not require that omniauth-identity be in your bundle. +Executables shipped by dependencies, such as kettle-dev, and stone_checksums, are available +after running `bin/setup`. These include: +- gem_checksums - kettle-changelog - kettle-commit-msg -- omniauth-identity-setup +- kettle-dev-setup - kettle-dvcs - kettle-pre-release - kettle-readme-backers - kettle-release -However, the rake tasks provided by omniauth-identity do require omniauth-identity to be added as a development dependency and loaded in your Rakefile. -See the full list of rake tasks in head of Rakefile +There are many Rake tasks available as well. You can see them by running: -**Gemfile** -```ruby -group :development do - gem "omniauth-identity", require: false -end -``` - -**Rakefile** -```ruby -# Rakefile -require "omniauth/identity" +```shell +bin/rake -T ``` ## Environment Variables for Local Development @@ -77,7 +68,9 @@ GitHub API and CI helpers Releasing and signing - SKIP_GEM_SIGNING: If set, skip gem signing during build/release - GEM_CERT_USER: Username for selecting your public cert in `certs/.pem` (defaults to $USER) -- SOURCE_DATE_EPOCH: Reproducible build timestamp. `kettle-release` will set this automatically for the session. +- SOURCE_DATE_EPOCH: Reproducible build timestamp. + - `kettle-release` will set this automatically for the session. + - Not needed on bundler >= 2.7.0, as reproducible builds have become the default. Git hooks and commit message helpers (exe/kettle-commit-msg) - GIT_HOOK_BRANCH_VALIDATE: Branch name validation mode (e.g., `jira`) or `false` to disable @@ -96,6 +89,12 @@ They are created and updated with the commands: bin/rake appraisal:update ``` +If you need to reset all gemfiles/*.gemfile.lock files: + +```console +bin/rake appraisal:reset +``` + When adding an appraisal to CI, check the [runner tool cache][🏃‍♂️runner-tool-cache] to see which runner to use. ## The Reek List @@ -174,10 +173,8 @@ bundle exec rspec spec_ignored/nobrainer_spec.rb ### Spec organization (required) -- One spec file per class/module. For each class or module under `lib/`, keep all of its unit tests in a single spec file under `spec/` that mirrors the path and file name exactly: `lib/omniauth/identity/*.rb` -> `spec/omniauth/identity/*_spec.rb`. -- Never add a second spec file for the same class/module. Examples of disallowed names: `*_more_spec.rb`, `*_extra_spec.rb`, `*_status_spec.rb`, or any other suffix that still targets the same class. If you find yourself wanting a second file, merge those examples into the canonical spec file for that class/module. +- One spec file per class/module. For each class or module under `lib/`, keep all of its unit tests in a single spec file under `spec/` that mirrors the path and file name exactly: `lib/omniauth/identity/my_class.rb` -> `spec/omniauth/identity/my_class_spec.rb`. - Exception: Integration specs that intentionally span multiple classes. Place these under `spec/integration/` (or a clearly named integration folder), and do not directly mirror a single class. Name them after the scenario, not a class. -- Migration note: If a duplicate spec file exists, move all examples into the canonical file and delete the duplicate. Do not leave stubs or empty files behind. ## Lint It @@ -200,7 +197,7 @@ For more detailed information about using RuboCop in this project, please see th Never add `# rubocop:disable ...` / `# rubocop:enable ...` comments to code or specs (except when following the few existing `rubocop:disable` patterns for a rule already being disabled elsewhere in the code). Instead: - Prefer configuration-based exclusions when a rule should not apply to certain paths or files (e.g., via `.rubocop.yml`). -- When a violation is temporary and you plan to fix it later, record it in `.rubocop_gradual.lock` using the gradual workflow: +- When a violation is temporary, and you plan to fix it later, record it in `.rubocop_gradual.lock` using the gradual workflow: - `bundle exec rake rubocop_gradual:autocorrect` (preferred) - `bundle exec rake rubocop_gradual:force_update` (only when you cannot fix the violations immediately) @@ -232,9 +229,10 @@ NOTE: To build without signing the gem set `SKIP_GEM_SIGNING` to any value in th #### Automated process -1. Update version.rb to contian the correct version-to-be-released. +1. Update version.rb to contain the correct version-to-be-released. 2. Run `bundle exec kettle-changelog`. 3. Run `bundle exec kettle-release`. +4. Stay awake and monitor the release process for any errors, and answer any prompts. #### Manual process diff --git a/FUNDING.md b/FUNDING.md index 602bc704..29dcea8a 100644 --- a/FUNDING.md +++ b/FUNDING.md @@ -6,7 +6,7 @@ Many paths lead to being a sponsor or a backer of this project. Are you on such [![Sponsor Me on Github][🖇sponsor-img]][🖇sponsor] [![Liberapay Goal Progress][⛳liberapay-img]][⛳liberapay] [![Donate on PayPal][🖇paypal-img]][🖇paypal] -[![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] +[![Buy me a coffee][🖇buyme-small-img]][🖇buyme] [![Donate on Polar][🖇polar-img]][🖇polar] [![Donate to my FLOSS efforts at ko-fi.com][🖇kofi-img]][🖇kofi] [![Donate to my FLOSS efforts using Patreon][🖇patreon-img]][🖇patreon] [⛳liberapay-img]: https://img.shields.io/liberapay/goal/pboling.svg?logo=liberapay&color=a51611&style=flat [⛳liberapay]: https://liberapay.com/pboling/donate @@ -27,11 +27,11 @@ Many paths lead to being a sponsor or a backer of this project. Are you on such -# 🤑 Request for Help +# 🤑 A request for help Maintainers have teeth and need to pay their dentists. -After getting laid off in an RIF in March and filled with many dozens of rejections, -I'm now spending ~60+ hours a week building open source tools. +After getting laid off in an RIF in March, and encountering difficulty finding a new one, +I began spending most of my time building open source tools. I'm hoping to be able to pay for my kids' health insurance this month, so if you value the work I am doing, I need your support. Please consider sponsoring me or the project. @@ -40,16 +40,13 @@ To join the community or get help 👇️ Join the Discord. [![Live Chat on Discord][✉️discord-invite-img-ftb]][✉️discord-invite] -To say "thanks for maintaining such a great tool" ☝️ Join the Discord or 👇️ send money. +To say "thanks!" ☝️ Join the Discord or 👇️ send money. -[![Sponsor me on GitHub Sponsors][🖇sponsor-bottom-img]][🖇sponsor] 💌 [![Sponsor me on Liberapay][⛳liberapay-bottom-img]][⛳liberapay-img] 💌 [![Donate on PayPal][🖇paypal-bottom-img]][🖇paypal-img] +[![Sponsor me on GitHub Sponsors][🖇sponsor-bottom-img]][🖇sponsor] 💌 [![Sponsor me on Liberapay][⛳liberapay-bottom-img]][⛳liberapay] 💌 [![Donate on PayPal][🖇paypal-bottom-img]][🖇paypal] # Another Way to Support Open Source Software -> How wonderful it is that nobody need wait a single moment before starting to improve the world.
->—Anne Frank - -I’m driven by a passion to foster a thriving open-source community – a space where people can tackle complex problems, no matter how small. Revitalizing libraries that have fallen into disrepair, and building new libraries focused on solving real-world challenges, are my passions — totaling 79 hours of FLOSS coding over just the past seven days, a pretty regular week for me. I was recently affected by layoffs, and the tech jobs market is unwelcoming. I’m reaching out here because your support would significantly aid my efforts to provide for my family, and my farm (11 🐔 chickens, 2 🐶 dogs, 3 🐰 rabbits, 8 🐈‍ cats). +I’m driven by a passion to foster a thriving open-source community – a space where people can tackle complex problems, no matter how small. Revitalizing libraries that have fallen into disrepair, and building new libraries focused on solving real-world challenges, are my passions. I was recently affected by layoffs, and the tech jobs market is unwelcoming. I’m reaching out here because your support would significantly aid my efforts to provide for my family, and my farm (11 🐔 chickens, 2 🐶 dogs, 3 🐰 rabbits, 8 🐈‍ cats). If you work at a company that uses my work, please encourage them to support me as a corporate sponsor. My work on gems you use might show up in `bundle fund`. diff --git a/Gemfile b/Gemfile index 3dbecf2d..05cac106 100644 --- a/Gemfile +++ b/Gemfile @@ -27,6 +27,9 @@ eval_gemfile "gemfiles/modular/documentation.gemfile" # Optional eval_gemfile "gemfiles/modular/optional.gemfile" +# Integration Testing +eval_gemfile "gemfiles/modular/integration.gemfile" + ### Std Lib Extracted Gems eval_gemfile "gemfiles/modular/x_std_libs.gemfile" @@ -35,16 +38,14 @@ gem "couch_potato", "~> 1.17", require: false gem "mongoid", ">= 7", require: false gem "mongoid-rspec", "~> 4.2", require: false gem "nobrainer", "~> 0.44", require: false -gem "sequel", "~> 5.86", require: false gem "sqlite3", ">= 1", require: false -gem "rom-sql", "~> 3.7", require: false ### Local dev tools -gem "growl" -gem "guard" -gem "guard-bundler" -gem "guard-rspec" -gem "rb-fsevent" +# gem "growl" +# gem "guard" +# gem "guard-bundler" +# gem "guard-rspec" +# gem "rb-fsevent" ### Testing gem "test-unit", ">= 3.0" diff --git a/Gemfile.lock b/Gemfile.lock index b56c67b1..b37fa407 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -22,13 +22,32 @@ PATH GEM remote: https://gem.coop/ specs: - activemodel (7.2.2.2) - activesupport (= 7.2.2.2) - activerecord (7.2.2.2) - activemodel (= 7.2.2.2) - activesupport (= 7.2.2.2) + actionpack (7.2.3) + actionview (= 7.2.3) + activesupport (= 7.2.3) + cgi + nokogiri (>= 1.8.5) + racc + rack (>= 2.2.4, < 3.3) + rack-session (>= 1.0.1) + rack-test (>= 0.6.3) + rails-dom-testing (~> 2.2) + rails-html-sanitizer (~> 1.6) + useragent (~> 0.16) + actionview (7.2.3) + activesupport (= 7.2.3) + builder (~> 3.1) + cgi + erubi (~> 1.11) + rails-dom-testing (~> 2.2) + rails-html-sanitizer (~> 1.6) + activemodel (7.2.3) + activesupport (= 7.2.3) + activerecord (7.2.3) + activemodel (= 7.2.3) + activesupport (= 7.2.3) timeout (>= 0.4.0) - activesupport (7.2.2.2) + activesupport (7.2.3) base64 benchmark (>= 0.3) bigdecimal @@ -55,13 +74,27 @@ GEM backports (3.25.2) base64 (0.3.0) bcrypt (3.1.20) - benchmark (0.4.1) + benchmark (0.5.0) bigdecimal (3.3.1) bson (5.2.0) + builder (3.3.0) bundler-audit (0.9.2) bundler (>= 1.2.0, < 3) thor (~> 1.0) - coderay (1.1.3) + capybara (3.40.0) + addressable + matrix + mini_mime (>= 0.1.3) + nokogiri (~> 1.11) + rack (>= 1.6.0) + rack-test (>= 0.6.3) + regexp_parser (>= 1.5, < 3.0) + xpath (~> 3.2) + cgi (0.5.0) + combustion (1.5.0) + activesupport (>= 3.0.0) + railties (>= 3.0.0) + thor (>= 0.14.6) concurrent-ruby (1.3.5) connection_pool (2.5.4) couch_potato (1.19.2) @@ -72,7 +105,9 @@ GEM httpclient (~> 2.8) mime-types (>= 1.15) multi_json (~> 1.7) - date (3.4.1) + crass (1.0.6) + csv (3.3.5) + date (3.5.0) debug (1.11.0) irb (~> 1.10) reline (>= 0.3.8) @@ -81,6 +116,10 @@ GEM diffy (3.4.4) docile (1.4.1) drb (2.2.3) + dry-auto_inject (1.1.0) + dry-core (~> 1.1) + zeitwerk (~> 2.6) + dry-cli (1.3.0) dry-configurable (1.3.0) dry-core (~> 1.1) zeitwerk (~> 2.6) @@ -88,13 +127,22 @@ GEM concurrent-ruby (~> 1.0) logger zeitwerk (~> 2.6) + dry-events (1.1.0) + concurrent-ruby (~> 1.0) + dry-core (~> 1.1) + dry-files (1.1.0) dry-inflector (1.2.0) dry-initializer (3.2.0) + dry-logger (1.2.0) dry-logic (1.6.0) bigdecimal concurrent-ruby (~> 1.0) dry-core (~> 1.1) zeitwerk (~> 2.6) + dry-monitor (1.0.1) + dry-configurable (~> 1.0, < 2) + dry-core (~> 1.0, < 2) + dry-events (~> 1.0, < 2) dry-schema (1.14.1) concurrent-ruby (~> 1.0) dry-configurable (~> 1.0, >= 1.0.1) @@ -108,6 +156,13 @@ GEM dry-types (~> 1.8, >= 1.8.2) ice_nine (~> 0.11) zeitwerk (~> 2.6) + dry-system (1.2.4) + dry-auto_inject (~> 1.1) + dry-configurable (~> 1.3) + dry-core (~> 1.1) + dry-inflector (~> 1.1) + dry-transformer (1.0.1) + zeitwerk (~> 2.6) dry-types (1.8.3) bigdecimal (~> 3.0) concurrent-ruby (~> 1.0) @@ -115,45 +170,46 @@ GEM dry-inflector (~> 1.0) dry-logic (~> 1.4) zeitwerk (~> 2.6) - erb (5.1.1) - ffi (1.17.2-aarch64-linux-gnu) - ffi (1.17.2-aarch64-linux-musl) - ffi (1.17.2-arm-linux-gnu) - ffi (1.17.2-arm-linux-musl) - ffi (1.17.2-arm64-darwin) - ffi (1.17.2-x86-linux-gnu) - ffi (1.17.2-x86-linux-musl) - ffi (1.17.2-x86_64-darwin) - ffi (1.17.2-x86_64-linux-gnu) - ffi (1.17.2-x86_64-linux-musl) - formatador (1.2.1) - reline + erb (5.1.3) + erubi (1.13.1) gem_bench (2.0.5) bundler (>= 1.14) version_gem (~> 1.1, >= 1.1.4) gitmoji-regex (1.0.3) version_gem (~> 1.1, >= 1.1.8) - growl (1.0.3) - guard (2.19.1) - formatador (>= 0.2.4) - listen (>= 2.7, < 4.0) - logger (~> 1.6) - lumberjack (>= 1.0.12, < 2.0) - nenv (~> 0.1) - notiffany (~> 0.0) - ostruct (~> 0.6) - pry (>= 0.13.0) - shellany (~> 0.0) - thor (>= 0.18.1) - guard-bundler (3.0.1) - bundler (>= 2.1, < 3) - guard (~> 2.2) - guard-compat (~> 1.1) - guard-compat (1.2.1) - guard-rspec (4.7.3) - guard (~> 2.1) - guard-compat (~> 1.1) - rspec (>= 2.99.0, < 4.0) + hanami (2.3.1) + bundler (>= 1.16, < 3) + dry-configurable (~> 1.0, >= 1.2.0, < 2) + dry-core (~> 1.0, < 2) + dry-inflector (~> 1.0, >= 1.1.0, < 2) + dry-logger (~> 1.2, < 2) + dry-monitor (~> 1.0, >= 1.0.1, < 2) + dry-system (~> 1.1) + hanami-cli (>= 2.3.1) + hanami-utils (>= 2.3.0) + json (>= 2.7.2) + rack-session + zeitwerk (~> 2.6) + hanami-cli (2.3.2) + bundler (~> 2.1) + dry-cli (~> 1.0, >= 1.1.0) + dry-files (~> 1.0, >= 1.0.2, < 2) + dry-inflector (~> 1.0, < 2) + irb + rackup + rake (~> 13.0) + zeitwerk (~> 2.6) + hanami-router (2.3.0) + csv (~> 3.3) + mustermann (~> 3.0) + mustermann-contrib (~> 3.0) + rack (>= 2.0) + hanami-utils (2.3.0) + bigdecimal (~> 3.1) + concurrent-ruby (~> 1.0) + dry-core (~> 1.0, < 2) + dry-transformer (~> 1.0, < 2) + hansi (0.2.1) hashie (5.0.0) httpclient (2.9.0) mutex_m @@ -161,12 +217,12 @@ GEM concurrent-ruby (~> 1.0) ice_nine (0.11.2) io-console (0.8.1) - irb (1.15.2) + irb (1.15.3) pp (>= 0.6.0) rdoc (>= 4.0.0) reline (>= 0.4.2) - json (2.15.1) - kettle-dev (1.1.38) + json (2.16.0) + kettle-dev (1.1.59) kettle-soup-cover (1.0.10) simplecov (~> 0.22) simplecov-cobertura (~> 3.0) @@ -193,19 +249,18 @@ GEM kramdown (~> 2.0) language_server-protocol (3.17.0.5) lint_roller (1.1.0) - listen (3.9.0) - rb-fsevent (~> 0.10, >= 0.10.3) - rb-inotify (~> 0.9, >= 0.9.10) logger (1.7.0) - lumberjack (1.4.2) - method_source (1.1.0) + loofah (2.24.1) + crass (~> 1.0.2) + nokogiri (>= 1.12.0) + matrix (0.4.3) middleware (0.1.0) mime-types (3.7.0) logger mime-types-data (~> 3.2025, >= 3.2025.0507) mime-types-data (3.2025.0924) - mini_portile2 (2.8.9) - minitest (5.26.0) + mini_mime (1.1.5) + minitest (5.26.2) mongo (2.21.3) base64 bson (>= 4.14.1, < 6.0.0) @@ -220,36 +275,20 @@ GEM mongoid (>= 3.0, < 10.0) mongoid-compatibility (>= 0.5.1) multi_json (1.17.0) + mustermann (3.0.4) + ruby2_keywords (~> 0.0.1) + mustermann-contrib (3.0.4) + hansi (~> 0.2.0) + mustermann (= 3.0.4) mutex_m (0.3.0) - nenv (0.3.0) nobrainer (0.44.1) activemodel (>= 4.1.0, < 8) activesupport (>= 4.1.0, < 8) middleware (~> 0.1.0) rethinkdb (>= 2.3.0, < 2.5) symbol_decoration (~> 1.1) - nokogiri (1.18.10) - mini_portile2 (~> 2.8.2) - racc (~> 1.4) - nokogiri (1.18.10-aarch64-linux-gnu) - racc (~> 1.4) - nokogiri (1.18.10-aarch64-linux-musl) - racc (~> 1.4) - nokogiri (1.18.10-arm-linux-gnu) - racc (~> 1.4) - nokogiri (1.18.10-arm-linux-musl) - racc (~> 1.4) - nokogiri (1.18.10-arm64-darwin) - racc (~> 1.4) - nokogiri (1.18.10-x86_64-darwin) - racc (~> 1.4) nokogiri (1.18.10-x86_64-linux-gnu) racc (~> 1.4) - nokogiri (1.18.10-x86_64-linux-musl) - racc (~> 1.4) - notiffany (0.1.3) - nenv (~> 0.1) - shellany (~> 0.0) omniauth (2.1.4) hashie (>= 3.4.6) logger @@ -257,36 +296,58 @@ GEM rack-protection ostruct (0.6.3) parallel (1.27.0) - parser (3.3.9.0) + parser (3.3.10.0) ast (~> 2.4.1) racc - power_assert (2.0.5) + pdf-core (0.10.0) + power_assert (3.0.1) pp (0.6.3) prettyprint + prawn (2.5.0) + matrix (~> 0.4) + pdf-core (~> 0.10.0) + ttfunk (~> 1.8) prettyprint (0.2.0) prism (1.6.0) - pry (0.15.2) - coderay (~> 1.1) - method_source (~> 1.0) psych (5.2.6) date stringio public_suffix (6.0.2) racc (1.8.1) - rack (2.2.20) - rack-protection (3.2.0) + rack (3.2.4) + rack-protection (4.2.1) + base64 (>= 0.1.0) + logger (>= 1.6.0) + rack (>= 3.0.0, < 4) + rack-session (2.1.1) base64 (>= 0.1.0) - rack (~> 2.2, >= 2.2.4) - rack-test (1.1.0) - rack (>= 1.0, < 3) + rack (>= 3.0.0) + rack-test (2.2.0) + rack (>= 1.3) + rackup (2.2.1) + rack (>= 3) + rails-dom-testing (2.3.0) + activesupport (>= 5.0.0) + minitest + nokogiri (>= 1.6) + rails-html-sanitizer (1.6.2) + loofah (~> 2.21) + nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0) + railties (7.2.3) + actionpack (= 7.2.3) + activesupport (= 7.2.3) + cgi + irb (~> 1.13) + rackup (>= 1.0.0) + rake (>= 12.2) + thor (~> 1.0, >= 1.2.2) + tsort (>= 0.2) + zeitwerk (~> 2.6) rainbow (3.1.1) - rake (13.3.0) - rb-fsevent (0.11.2) - rb-inotify (0.11.1) - ffi (~> 1.0) + rake (13.3.1) rbs (3.9.5) logger - rdoc (6.15.0) + rdoc (6.15.1) erb psych (>= 4.0.0) tsort @@ -297,16 +358,18 @@ GEM rainbow (>= 2.0, < 4.0) rexml (~> 3.1) regexp_parser (2.11.3) - reline (0.6.2) + reline (0.6.3) io-console (~> 0.5) require_bench (1.0.4) version_gem (>= 1.1.3, < 4) rethinkdb (2.4.0.0) rexml (3.4.4) - rom (5.4.2) + roda (3.98.0) + rack + rom (5.4.3) rom-changeset (~> 5.4) rom-core (~> 5.4) - rom-repository (~> 5.4, >= 5.4.2) + rom-repository (~> 5.4, >= 5.4.3) rom-changeset (5.4.0) dry-core (~> 1.0) rom-core (~> 5.4) @@ -320,7 +383,7 @@ GEM dry-struct (~> 1.0) dry-types (~> 1.6) transproc (~> 1.1) - rom-repository (5.4.2) + rom-repository (5.4.3) dry-core (~> 1.0) dry-initializer (~> 3.2) rom-core (~> 5.4) @@ -329,7 +392,7 @@ GEM dry-types (~> 1.8) rom (~> 5.4) sequel (>= 4.49) - rspec (3.13.1) + rspec (3.13.2) rspec-core (~> 3.13.0) rspec-expectations (~> 3.13.0) rspec-mocks (~> 3.13.0) @@ -339,7 +402,7 @@ GEM rspec-expectations (3.13.5) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.13.0) - rspec-mocks (3.13.6) + rspec-mocks (3.13.7) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.13.0) rspec-pending_for (0.1.19) @@ -351,7 +414,7 @@ GEM rspec-support (3.13.6) rspec_junit_formatter (0.6.0) rspec-core (>= 2, < 4, != 2.12.0) - rubocop (1.80.2) + rubocop (1.81.7) json (~> 2.3) language_server-protocol (~> 3.17.0.2) lint_roller (~> 1.1.0) @@ -359,10 +422,10 @@ GEM parser (>= 3.3.0.2) rainbow (>= 2.2.2, < 4.0) regexp_parser (>= 2.9.3, < 3.0) - rubocop-ast (>= 1.46.0, < 2.0) + rubocop-ast (>= 1.47.1, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 2.4.0, < 4.0) - rubocop-ast (1.47.1) + rubocop-ast (1.48.0) parser (>= 3.3.7.2) prism (~> 1.4) rubocop-gradual (0.3.6) @@ -392,9 +455,9 @@ GEM rubocop-rake (0.7.1) lint_roller (~> 1.1) rubocop (>= 1.72.1) - rubocop-rspec (3.7.0) + rubocop-rspec (3.8.0) lint_roller (~> 1.1) - rubocop (~> 1.72, >= 1.72.1) + rubocop (~> 1.81) rubocop-ruby2_4 (2.0.5) rubocop-gradual (~> 0.3, >= 0.3.1) rubocop-md (~> 1.2) @@ -406,19 +469,19 @@ GEM rubocop-sequel (0.4.1) lint_roller (~> 1.1) rubocop (>= 1.72.1, < 2) - rubocop-shopify (2.17.1) + rubocop-shopify (2.18.0) rubocop (~> 1.62) rubocop-thread_safety (0.7.3) lint_roller (~> 1.1) rubocop (~> 1.72, >= 1.72.1) rubocop-ast (>= 1.44.0, < 2.0) ruby-progressbar (1.13.0) + ruby2_keywords (0.0.5) ruby_engine (2.0.3) ruby_version (1.0.3) securerandom (0.4.1) - sequel (5.97.0) + sequel (5.98.0) bigdecimal - shellany (0.0.1) silent_stream (1.0.12) logger (~> 1.2) version_gem (>= 1.1.8, < 3) @@ -438,20 +501,24 @@ GEM simplecov-rcov (0.3.7) simplecov (>= 0.4.1) simplecov_json_formatter (0.1.4) - sqlite3 (2.7.4-aarch64-linux-gnu) - sqlite3 (2.7.4-aarch64-linux-musl) - sqlite3 (2.7.4-arm-linux-gnu) - sqlite3 (2.7.4-arm-linux-musl) - sqlite3 (2.7.4-arm64-darwin) - sqlite3 (2.7.4-x86-linux-gnu) - sqlite3 (2.7.4-x86-linux-musl) - sqlite3 (2.7.4-x86_64-darwin) - sqlite3 (2.7.4-x86_64-linux-gnu) - sqlite3 (2.7.4-x86_64-linux-musl) - standard (1.51.1) + sinatra (4.2.1) + logger (>= 1.6.0) + mustermann (~> 3.0) + rack (>= 3.0.0, < 4) + rack-protection (= 4.2.1) + rack-session (>= 2.0.0, < 3) + tilt (~> 2.0) + sinatra-contrib (4.2.1) + multi_json (>= 0.0.2) + mustermann (~> 3.0) + rack-protection (= 4.2.1) + sinatra (= 4.2.1) + tilt (~> 2.0) + sqlite3 (2.8.0-x86_64-linux-gnu) + standard (1.52.0) language_server-protocol (~> 3.17.0.2) lint_roller (~> 1.0) - rubocop (~> 1.80.2) + rubocop (~> 1.81.7) standard-custom (~> 1.0.0) standard-performance (~> 1.8) standard-custom (1.0.2) @@ -466,50 +533,56 @@ GEM standard-custom (>= 1.0.2, < 2) standard-performance (>= 1.3.1, < 2) version_gem (>= 1.1.4, < 3) - stone_checksums (1.0.2) - version_gem (~> 1.1, >= 1.1.8) - stringio (3.1.7) + stone_checksums (1.0.3) + version_gem (~> 1.1, >= 1.1.9) + stringio (3.1.8) symbol_decoration (1.1.0) terminal-table (4.0.0) unicode-display_width (>= 1.1.1, < 4) - test-unit (3.7.0) + test-unit (3.7.1) power_assert thor (1.4.0) + tilt (2.6.1) timecop (0.9.10) timecop-rspec (1.0.3) delegate (~> 0.1) rspec (~> 3.0) timecop (>= 0.7, < 1) - timeout (0.4.3) + timeout (0.4.4) transproc (1.1.1) tsort (0.2.0) + ttfunk (1.8.0) + bigdecimal (~> 3.1) tzinfo (2.0.6) concurrent-ruby (~> 1.0) unicode-display_width (3.2.0) unicode-emoji (~> 4.1) unicode-emoji (4.1.0) + useragent (0.16.11) version_gem (1.1.9) + xpath (3.2.0) + nokogiri (~> 1.8) + yaml-converter (0.1.0) + kramdown (>= 2.4, < 3) + kramdown-parser-gfm (~> 1.1) + prawn (>= 2.5, < 3) + version_gem (~> 1.1, >= 1.1.9) yard (0.9.37) - yard-relative_markdown_links (0.5.0) + yard-fence (0.8.0) + rdoc (~> 6.11) + version_gem (~> 1.1, >= 1.1.9) + yard (~> 0.9, >= 0.9.37) + yard-relative_markdown_links (0.6.0) nokogiri (>= 1.14.3, < 2) + yard-yaml (0.1.0) + version_gem (~> 1.1, >= 1.1.9) + yaml-converter (~> 0.1) zeitwerk (2.7.3) - zlib (3.2.1) + zlib (3.2.2) PLATFORMS - aarch64-linux - aarch64-linux-gnu - aarch64-linux-musl - arm-linux - arm-linux-gnu - arm-linux-musl - arm64-darwin - x86-linux - x86-linux-gnu - x86-linux-musl - x86_64-darwin x86_64-linux x86_64-linux-gnu - x86_64-linux-musl DEPENDENCIES activerecord (>= 5) @@ -518,19 +591,19 @@ DEPENDENCIES appraisal2 (~> 3.0) benchmark (~> 0.4, >= 0.4.1) bundler-audit (~> 0.9.2) + capybara (~> 3.40) + combustion (~> 1.5) couch_potato (~> 1.17) debug (>= 1.1) erb (~> 5.0) gem_bench (~> 2.0, >= 2.0.5) gitmoji-regex (~> 1.0, >= 1.0.3) - growl - guard - guard-bundler - guard-rspec + hanami (~> 2.2) + hanami-router (~> 2.2) irb (~> 1.15, >= 1.15.2) kettle-dev (~> 1.1) kettle-soup-cover (~> 1.0, >= 1.0.10) - kettle-test (~> 1.0) + kettle-test (~> 1.0, >= 1.0.6) kramdown (~> 2.5, >= 2.5.1) kramdown-parser-gfm (~> 1.1) logger (~> 1.7) @@ -539,12 +612,14 @@ DEPENDENCIES mutex_m (~> 0.2) nobrainer (~> 0.44) omniauth-identity! - rack-test (~> 1) + rack (~> 3.2, >= 3.2.4) + rack-session (~> 2.1, >= 2.1.1) + rack-test (~> 2.2, ~> 2.1) rake (~> 13.0) - rb-fsevent rdoc (~> 6.11) reek (~> 6.5) require_bench (~> 1.0, >= 1.0.4) + roda (~> 3.85) rom-sql (~> 3.7) rspec-pending_for (~> 0.0, >= 0.0.17) rubocop (~> 1.73, >= 1.73.2) @@ -555,15 +630,20 @@ DEPENDENCIES rubocop-ruby2_4 rubocop-sequel ruby-progressbar (~> 1.13) - sequel (~> 5.86) + sequel (~> 5.86, >= 5.86.0) + sinatra (~> 4.2) + sinatra-contrib (~> 4.2) sqlite3 (>= 1) standard (>= 1.50) stone_checksums (~> 1.0, >= 1.0.2) stringio (>= 3.0) test-unit (>= 3.0) + yaml-converter (~> 0.1) yard (~> 0.9, >= 0.9.37) + yard-fence (~> 0.8) yard-junk (~> 0.0, >= 0.0.10)! - yard-relative_markdown_links (~> 0.5.0) + yard-relative_markdown_links (~> 0.6) + yard-yaml (~> 0.1) BUNDLED WITH 2.7.2 diff --git a/README.md b/README.md index a97c91dd..2739032c 100644 --- a/README.md +++ b/README.md @@ -82,7 +82,7 @@ Compatible with MRI Ruby 2.4+, and concordant releases of JRuby, and TruffleRuby ### Federated DVCS -
+
Find this repo on federated forges (Coming soon!) | Federated [DVCS][💎d-in-dvcs] Repository | Status | Issues | PRs | Wiki | CI | Discussions | @@ -100,7 +100,7 @@ Compatible with MRI Ruby 2.4+, and concordant releases of JRuby, and TruffleRuby Available as part of the Tidelift Subscription. -
+
Need enterprise-level guarantees? The maintainers of this 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 of the exact packages you use. @@ -135,7 +135,7 @@ gem install omniauth-identity ### 🔒 Secure Installation -
+
For Medium or High Security Installations This gem is cryptographically signed, and has verifiable [SHA-256 and SHA-512][💎SHA_checksums] checksums by @@ -465,10 +465,7 @@ and [Tidelift][🏙️entsup-tidelift]. ### Another way to support open-source -> How wonderful it is that nobody need wait a single moment before starting to improve the world.
->—Anne Frank - -I’m driven by a passion to foster a thriving open-source community – a space where people can tackle complex problems, no matter how small. Revitalizing libraries that have fallen into disrepair, and building new libraries focused on solving real-world challenges, are my passions — totaling 79 hours of FLOSS coding over just the past seven days, a pretty regular week for me. I was recently affected by layoffs, and the tech jobs market is unwelcoming. I’m reaching out here because your support would significantly aid my efforts to provide for my family, and my farm (11 🐔 chickens, 2 🐶 dogs, 3 🐰 rabbits, 8 🐈‍ cats). +I’m driven by a passion to foster a thriving open-source community – a space where people can tackle complex problems, no matter how small. Revitalizing libraries that have fallen into disrepair, and building new libraries focused on solving real-world challenges, are my passions. I was recently affected by layoffs, and the tech jobs market is unwelcoming. I’m reaching out here because your support would significantly aid my efforts to provide for my family, and my farm (11 🐔 chickens, 2 🐶 dogs, 3 🐰 rabbits, 8 🐈‍ cats). If you work at a company that uses my work, please encourage them to support me as a corporate sponsor. My work on gems you use might show up in `bundle fund`. @@ -476,7 +473,7 @@ I’m developing a new library, [floss_funding][🖇floss-funding-gem], designed **[Floss-Funding.dev][🖇floss-funding.dev]: 👉️ No network calls. 👉️ No tracking. 👉️ No oversight. 👉️ Minimal crypto hashing. 💡 Easily disabled nags** -[![Sponsor Me on Github][🖇sponsor-img]][🖇sponsor] [![Liberapay Goal Progress][⛳liberapay-img]][⛳liberapay] [![Donate on PayPal][🖇paypal-img]][🖇paypal] [![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] +[![Sponsor Me on Github][🖇sponsor-img]][🖇sponsor] [![Liberapay Goal Progress][⛳liberapay-img]][⛳liberapay] [![Donate on PayPal][🖇paypal-img]][🖇paypal] [![Buy me a coffee][🖇buyme-small-img]][🖇buyme] [![Donate on Polar][🖇polar-img]][🖇polar] [![Donate to my FLOSS efforts at ko-fi.com][🖇kofi-img]][🖇kofi] [![Donate to my FLOSS efforts using Patreon][🖇patreon-img]][🖇patreon] ## 🔐 Security @@ -552,12 +549,11 @@ For example: spec.add_dependency("omniauth-identity", "~> 1.0") ``` -
+
📌 Is "Platform Support" part of the public API? More details inside. SemVer should, IMO, 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. +is a *breaking change* to an API, and for that reason the bike shedding is endless. 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: @@ -597,8 +593,8 @@ See [LICENSE.txt][📄license] for the official [Copyright Notice][📄copyright ## 🤑 A request for help Maintainers have teeth and need to pay their dentists. -After getting laid off in an RIF in March and filled with many dozens of rejections, -I'm now spending ~60+ hours a week building open source tools. +After getting laid off in an RIF in March, and encountering difficulty finding a new one, +I began spending most of my time building open source tools. I'm hoping to be able to pay for my kids' health insurance this month, so if you value the work I am doing, I need your support. Please consider sponsoring me or the project. @@ -609,7 +605,7 @@ To join the community or get help 👇️ Join the Discord. To say "thanks!" ☝️ Join the Discord or 👇️ send money. -[![Sponsor me on GitHub Sponsors][🖇sponsor-bottom-img]][🖇sponsor] 💌 [![Sponsor me on Liberapay][⛳liberapay-bottom-img]][⛳liberapay-img] 💌 [![Donate on PayPal][🖇paypal-bottom-img]][🖇paypal-img] +[![Sponsor me on GitHub Sponsors][🖇sponsor-bottom-img]][🖇sponsor] 💌 [![Sponsor me on Liberapay][⛳liberapay-bottom-img]][⛳liberapay] 💌 [![Donate on PayPal][🖇paypal-bottom-img]][🖇paypal] ### Please give the project a star ⭐ ♥. @@ -782,8 +778,8 @@ Thanks for RTFM. ☺️ [📌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%F0%9F%98%9C%20%F0%9F%98%8D-34495e.svg?style=flat-square +[📌gitmoji]: https://gitmoji.dev +[📌gitmoji-img]: https://img.shields.io/badge/gitmoji_commits-%20%F0%9F%98%9C%20%F0%9F%98%8D-34495e.svg?style=flat-square [🧮kloc]: https://www.youtube.com/watch?v=dQw4w9WgXcQ [🧮kloc-img]: https://img.shields.io/badge/KLOC-0.467-FFDD67.svg?style=for-the-badge&logo=YouTube&logoColor=blue [🔐security]: SECURITY.md diff --git a/Rakefile b/Rakefile index 60c9de2a..c19f89f9 100644 --- a/Rakefile +++ b/Rakefile @@ -1,6 +1,6 @@ # frozen_string_literal: true -# kettle-dev Rakefile v1.1.38 - 2025-10-21 +# kettle-dev Rakefile v1.1.59 - 2025-11-13 # Ruby 2.3 (Safe Navigation) or higher required # # MIT License (see License.txt) @@ -11,6 +11,8 @@ # # Sets up tasks for appraisal, floss_funding, rspec, minitest, rubocop, reek, yard, and stone_checksums. # +# rake appraisal:install # Install Appraisal gemfiles (initial setup... +# rake appraisal:reset # Delete Appraisal lockfiles (gemfiles/*.gemfile.lock) # rake appraisal:update # Update Appraisal gemfiles and run RuboCop... # rake bench # Run all benchmarks (alias for bench:run) # rake bench:list # List available benchmark scripts diff --git a/bin/combust b/bin/combust new file mode 100755 index 00000000..2d957489 --- /dev/null +++ b/bin/combust @@ -0,0 +1,16 @@ +#!/usr/bin/env ruby +# frozen_string_literal: true + +# +# This file was generated by Bundler. +# +# The application 'combust' is installed as part of a gem, and +# this file is here to facilitate running it. +# + +ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__) + +require "rubygems" +require "bundler/setup" + +load Gem.bin_path("combustion", "combust") diff --git a/bin/hanami b/bin/hanami new file mode 100755 index 00000000..3539b95e --- /dev/null +++ b/bin/hanami @@ -0,0 +1,16 @@ +#!/usr/bin/env ruby +# frozen_string_literal: true + +# +# This file was generated by Bundler. +# +# The application 'hanami' is installed as part of a gem, and +# this file is here to facilitate running it. +# + +ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__) + +require "rubygems" +require "bundler/setup" + +load Gem.bin_path("hanami-cli", "hanami") diff --git a/bin/rails b/bin/rails new file mode 100755 index 00000000..3cf76b0f --- /dev/null +++ b/bin/rails @@ -0,0 +1,16 @@ +#!/usr/bin/env ruby +# frozen_string_literal: true + +# +# This file was generated by Bundler. +# +# The application 'rails' is installed as part of a gem, and +# this file is here to facilitate running it. +# + +ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__) + +require "rubygems" +require "bundler/setup" + +load Gem.bin_path("railties", "rails") diff --git a/bin/tilt b/bin/tilt new file mode 100755 index 00000000..045ff6f8 --- /dev/null +++ b/bin/tilt @@ -0,0 +1,16 @@ +#!/usr/bin/env ruby +# frozen_string_literal: true + +# +# This file was generated by Bundler. +# +# The application 'tilt' is installed as part of a gem, and +# this file is here to facilitate running it. +# + +ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__) + +require "rubygems" +require "bundler/setup" + +load Gem.bin_path("tilt", "tilt") diff --git a/bin/yaml-convert b/bin/yaml-convert new file mode 100755 index 00000000..961263ed --- /dev/null +++ b/bin/yaml-convert @@ -0,0 +1,16 @@ +#!/usr/bin/env ruby +# frozen_string_literal: true + +# +# This file was generated by Bundler. +# +# The application 'yaml-convert' is installed as part of a gem, and +# this file is here to facilitate running it. +# + +ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__) + +require "rubygems" +require "bundler/setup" + +load Gem.bin_path("yaml-converter", "yaml-convert") diff --git a/docs/CNAME b/docs/CNAME deleted file mode 100644 index bdfa0138..00000000 --- a/docs/CNAME +++ /dev/null @@ -1 +0,0 @@ -omniauth-identity.galtzo.com \ No newline at end of file diff --git a/docs/OmniAuth.html b/docs/OmniAuth.html index 1a1b3d79..69a24cc8 100644 --- a/docs/OmniAuth.html +++ b/docs/OmniAuth.html @@ -117,7 +117,7 @@

Overview

diff --git a/docs/OmniAuth/Identity.html b/docs/OmniAuth/Identity.html index 9355c273..c7429fa3 100644 --- a/docs/OmniAuth/Identity.html +++ b/docs/OmniAuth/Identity.html @@ -136,6 +136,32 @@

Basic Setup

+ +

+ Constant Summary + collapse +

+ +
+ +
VERSION = +
+
+

Traditional version constant location

+ + +
+
+
+ + +
+
+
Version::VERSION
+ +
+ + @@ -147,7 +173,7 @@

Basic Setup

diff --git a/docs/OmniAuth/Identity/Model.html b/docs/OmniAuth/Identity/Model.html index 3aef3edb..e6293236 100644 --- a/docs/OmniAuth/Identity/Model.html +++ b/docs/OmniAuth/Identity/Model.html @@ -910,7 +910,7 @@

diff --git a/docs/OmniAuth/Identity/Model/ClassCreateApi.html b/docs/OmniAuth/Identity/Model/ClassCreateApi.html index d6afa586..fa37ce51 100644 --- a/docs/OmniAuth/Identity/Model/ClassCreateApi.html +++ b/docs/OmniAuth/Identity/Model/ClassCreateApi.html @@ -125,7 +125,7 @@

- Deprecated.

v4.0 will begin using #new with #save instead.

+ Deprecated.

v4.0 will begin using {.new} with {#save} instead.

@@ -151,7 +151,7 @@

-
Deprecated.

v4.0 will begin using #new with #save instead.

+
Deprecated.

v4.0 will begin using {.new} with {#save} instead.

This method is abstract. @@ -159,7 +159,7 @@

Persists a new Identity object to the ORM.
-Only included if the class doesn’t define create, as a reminder to define create.
+Only included if the class doesn’t define create, as a reminder to define create.
Override as needed per ORM.

@@ -258,7 +258,7 @@

diff --git a/docs/OmniAuth/Identity/Model/ClassMethods.html b/docs/OmniAuth/Identity/Model/ClassMethods.html index ffd46db2..a84a3d34 100644 --- a/docs/OmniAuth/Identity/Model/ClassMethods.html +++ b/docs/OmniAuth/Identity/Model/ClassMethods.html @@ -467,7 +467,7 @@

diff --git a/docs/OmniAuth/Identity/Model/InstancePersistedApi.html b/docs/OmniAuth/Identity/Model/InstancePersistedApi.html index bcde94c2..a1994445 100644 --- a/docs/OmniAuth/Identity/Model/InstancePersistedApi.html +++ b/docs/OmniAuth/Identity/Model/InstancePersistedApi.html @@ -236,7 +236,7 @@

diff --git a/docs/OmniAuth/Identity/Model/InstanceSaveApi.html b/docs/OmniAuth/Identity/Model/InstanceSaveApi.html index 44e63ca8..4c93aaf5 100644 --- a/docs/OmniAuth/Identity/Model/InstanceSaveApi.html +++ b/docs/OmniAuth/Identity/Model/InstanceSaveApi.html @@ -257,7 +257,7 @@

diff --git a/docs/OmniAuth/Identity/Models.html b/docs/OmniAuth/Identity/Models.html index dea7c908..61d5caa1 100644 --- a/docs/OmniAuth/Identity/Models.html +++ b/docs/OmniAuth/Identity/Models.html @@ -119,7 +119,7 @@

Overview

diff --git a/docs/OmniAuth/Identity/Models/ActiveRecord.html b/docs/OmniAuth/Identity/Models/ActiveRecord.html index 38d2a07b..0c2f5380 100644 --- a/docs/OmniAuth/Identity/Models/ActiveRecord.html +++ b/docs/OmniAuth/Identity/Models/ActiveRecord.html @@ -441,7 +441,7 @@

Examples:

diff --git a/docs/OmniAuth/Identity/Models/CouchPotatoModule.html b/docs/OmniAuth/Identity/Models/CouchPotatoModule.html index 03c5dc16..c8a9d82b 100644 --- a/docs/OmniAuth/Identity/Models/CouchPotatoModule.html +++ b/docs/OmniAuth/Identity/Models/CouchPotatoModule.html @@ -341,7 +341,7 @@

diff --git a/docs/OmniAuth/Identity/Models/Mongoid.html b/docs/OmniAuth/Identity/Models/Mongoid.html index 30c6b16c..39c923eb 100644 --- a/docs/OmniAuth/Identity/Models/Mongoid.html +++ b/docs/OmniAuth/Identity/Models/Mongoid.html @@ -307,7 +307,7 @@

diff --git a/docs/OmniAuth/Identity/Models/NoBrainer.html b/docs/OmniAuth/Identity/Models/NoBrainer.html index c2b8616f..c437caf3 100644 --- a/docs/OmniAuth/Identity/Models/NoBrainer.html +++ b/docs/OmniAuth/Identity/Models/NoBrainer.html @@ -306,7 +306,7 @@

diff --git a/docs/OmniAuth/Identity/Models/Rom.html b/docs/OmniAuth/Identity/Models/Rom.html index 2e892a34..3c69cba5 100644 --- a/docs/OmniAuth/Identity/Models/Rom.html +++ b/docs/OmniAuth/Identity/Models/Rom.html @@ -330,6 +330,29 @@

Hash-like access to underlying ROM tuple.

+ + + +
  • + + + #id ⇒ Object + + + + + + + + + + + + + +

    Provide id method for Model module compatibility.

    +
    +
  • @@ -376,6 +399,29 @@

    Convenience accessor for owner id.

    + + + +
  • + + + #persisted? ⇒ Boolean + + + + + + + + + + + + + +

    Check if this identity is persisted (has an id) Required by OmniAuth::Identity strategy.

    +
    +
  • @@ -725,12 +771,12 @@

     
     
    -135
    -136
    -137
    +142 +143 +144 -
    # File 'lib/omniauth/identity/models/rom.rb', line 135
    +      
    # File 'lib/omniauth/identity/models/rom.rb', line 142
     
     def [](key)
       @identity_data[key]
    @@ -738,6 +784,46 @@ 

    + + +
    +

    + + #idObject + + + + + +

    +
    +

    Provide id method for Model module compatibility

    + + +
    +
    +
    + + +
    + + + + +
    +
    +
    +
    +137
    +138
    +139
    +
    +
    # File 'lib/omniauth/identity/models/rom.rb', line 137
    +
    +def id
    +  @uid
    +end
    +
    @@ -774,7 +860,9 @@

    129 130 131 -132

    +132 +133 +134
    # File 'lib/omniauth/identity/models/rom.rb', line 113
    @@ -785,9 +873,11 @@ 

    @uid = identity_data[:id] @email = identity_data[:email] - # Prefer owner name if available, else fall back to email + # Prefer owner name if available, else identity name, else fall back to email @name = if owner_data && owner_data[:name] owner_data[:name] + elsif identity_data[:name] + identity_data[:name] else identity_data[:email] end @@ -829,12 +919,12 @@

     
     
    -140
    -141
    -142
    +147 +148 +149

    -
    # File 'lib/omniauth/identity/models/rom.rb', line 140
    +      
    # File 'lib/omniauth/identity/models/rom.rb', line 147
     
     def owner_id
       @identity_data[:owner_id]
    @@ -842,6 +932,64 @@ 

    + + +
    +

    + + #persisted?Boolean + + + + + +

    +
    +

    Check if this identity is persisted (has an id)
    +Required by OmniAuth::Identity strategy

    + + +
    +
    +
    + +

    Returns:

    +
      + +
    • + + + (Boolean) + + + + — +

      true if persisted, false otherwise

      +
      + +
    • + +
    + +
    + + + + +
    +
    +
    +
    +159
    +160
    +161
    +
    +
    # File 'lib/omniauth/identity/models/rom.rb', line 159
    +
    +def persisted?
    +  !@uid.nil? && !@uid.to_s.empty?
    +end
    +
    @@ -869,12 +1017,12 @@

     
     
    -145
    -146
    -147
    +152 +153 +154

    -
    # File 'lib/omniauth/identity/models/rom.rb', line 145
    +      
    # File 'lib/omniauth/identity/models/rom.rb', line 152
     
     def to_hash
       @info
    @@ -889,7 +1037,7 @@ 

    diff --git a/docs/OmniAuth/Identity/Models/Rom/ClassMethods.html b/docs/OmniAuth/Identity/Models/Rom/ClassMethods.html index d574b98f..4f31f1a3 100644 --- a/docs/OmniAuth/Identity/Models/Rom/ClassMethods.html +++ b/docs/OmniAuth/Identity/Models/Rom/ClassMethods.html @@ -534,7 +534,7 @@

    diff --git a/docs/OmniAuth/Identity/Models/Sequel.html b/docs/OmniAuth/Identity/Models/Sequel.html index 1580e8ce..4359c62b 100644 --- a/docs/OmniAuth/Identity/Models/Sequel.html +++ b/docs/OmniAuth/Identity/Models/Sequel.html @@ -398,7 +398,7 @@

    diff --git a/docs/OmniAuth/Identity/SecurePassword.html b/docs/OmniAuth/Identity/SecurePassword.html index 6a1a407b..e1fc675d 100644 --- a/docs/OmniAuth/Identity/SecurePassword.html +++ b/docs/OmniAuth/Identity/SecurePassword.html @@ -478,7 +478,7 @@

    diff --git a/docs/OmniAuth/Identity/SecurePassword/ClassMethods.html b/docs/OmniAuth/Identity/SecurePassword/ClassMethods.html index e3c16095..17ca0e4d 100644 --- a/docs/OmniAuth/Identity/SecurePassword/ClassMethods.html +++ b/docs/OmniAuth/Identity/SecurePassword/ClassMethods.html @@ -353,7 +353,7 @@

    diff --git a/docs/OmniAuth/Identity/SecurePassword/InstanceMethodsOnActivation.html b/docs/OmniAuth/Identity/SecurePassword/InstanceMethodsOnActivation.html index eee75bee..80d79967 100644 --- a/docs/OmniAuth/Identity/SecurePassword/InstanceMethodsOnActivation.html +++ b/docs/OmniAuth/Identity/SecurePassword/InstanceMethodsOnActivation.html @@ -294,7 +294,7 @@

    diff --git a/docs/OmniAuth/Identity/Version.html b/docs/OmniAuth/Identity/Version.html index d5014700..c16a55a1 100644 --- a/docs/OmniAuth/Identity/Version.html +++ b/docs/OmniAuth/Identity/Version.html @@ -223,7 +223,7 @@

    diff --git a/docs/OmniAuth/Strategies.html b/docs/OmniAuth/Strategies.html index 7a2a1a56..f6a4d7ac 100644 --- a/docs/OmniAuth/Strategies.html +++ b/docs/OmniAuth/Strategies.html @@ -117,7 +117,7 @@

    Overview

    diff --git a/docs/OmniAuth/Strategies/Identity.html b/docs/OmniAuth/Strategies/Identity.html index 42b0bbbd..4dc19129 100644 --- a/docs/OmniAuth/Strategies/Identity.html +++ b/docs/OmniAuth/Strategies/Identity.html @@ -2240,7 +2240,7 @@

    diff --git a/docs/_index.html b/docs/_index.html index 2690b560..1645e763 100644 --- a/docs/_index.html +++ b/docs/_index.html @@ -87,34 +87,28 @@

    File Listing

  • CITATION
  • -
  • omniauth-identity-3.1.0.gem
  • - - -
  • omniauth-identity-3.1.1.gem
  • - - -
  • omniauth-identity-3.1.2.gem
  • +
  • CHANGELOG
  • -
  • omniauth-identity-3.1.3.gem
  • +
  • CODE_OF_CONDUCT
  • -
  • omniauth-identity-3.1.4.gem
  • +
  • CONTRIBUTING
  • -
  • omniauth-identity-3.1.0.gem
  • +
  • FUNDING
  • -
  • omniauth-identity-3.1.1.gem
  • +
  • README
  • -
  • omniauth-identity-3.1.2.gem
  • +
  • RUBOCOP
  • -
  • omniauth-identity-3.1.3.gem
  • +
  • SECURITY
  • -
  • omniauth-identity-3.1.4.gem
  • +
  • LICENSE
  • REEK
  • @@ -361,7 +355,7 @@

    Namespace Listing A-Z

    diff --git a/docs/file.CHANGELOG.html b/docs/file.CHANGELOG.html index 3bfdcb24..00a40626 100644 --- a/docs/file.CHANGELOG.html +++ b/docs/file.CHANGELOG.html @@ -68,18 +68,37 @@ and yes, platform and engine support are part of the public API.
    Please file a bug if you notice a violation of semantic versioning.

    -

    Unreleased

    +

    Unreleased

    Added

    +
      +
    • Greatly improved documentation
    • +
    • Traditional VERSION constant @ OmniAuth::Identity::VERSION +
        +
      • Retains modern VERSION constant @ OmniAuth::Identity::Version::VERSION
      • +
      +
    • +
    +

    Changed

    +
      +
    • Improved devcontainer for easier maintenance
    • +
    • +appraisal:reset rake task for maintenance
    • +
    +

    Deprecated

    Removed

    Fixed

    +
      +
    • GitLab pipeline for Ruby 2.7, 3.0, 3.1
    • +
    +

    Security

    @@ -579,7 +598,7 @@

    Removed

    diff --git a/docs/file.CITATION.html b/docs/file.CITATION.html index 37914a9f..7ec9d35f 100644 --- a/docs/file.CITATION.html +++ b/docs/file.CITATION.html @@ -82,7 +82,7 @@ diff --git a/docs/file.CODE_OF_CONDUCT.html b/docs/file.CODE_OF_CONDUCT.html index 0e589a6c..c659e7d0 100644 --- a/docs/file.CODE_OF_CONDUCT.html +++ b/docs/file.CODE_OF_CONDUCT.html @@ -191,7 +191,7 @@

    Attribution

    diff --git a/docs/file.CONTRIBUTING.html b/docs/file.CONTRIBUTING.html index 9d2b5bf7..8310773b 100644 --- a/docs/file.CONTRIBUTING.html +++ b/docs/file.CONTRIBUTING.html @@ -85,31 +85,23 @@

    Help out!

    Executables vs Rake tasks

    -

    Executables shipped by omniauth-identity can be used with or without generating the binstubs.
    -They will work when omniauth-identity is installed globally (i.e., gem install omniauth-identity) and do not require that omniauth-identity be in your bundle.

    +

    Executables shipped by dependencies, such as kettle-dev, and stone_checksums, are available
    +after running bin/setup. These include:

      +
    • gem_checksums
    • kettle-changelog
    • kettle-commit-msg
    • -
    • omniauth-identity-setup
    • +
    • kettle-dev-setup
    • kettle-dvcs
    • kettle-pre-release
    • kettle-readme-backers
    • kettle-release
    -

    However, the rake tasks provided by omniauth-identity do require omniauth-identity to be added as a development dependency and loaded in your Rakefile.
    -See the full list of rake tasks in head of Rakefile

    +

    There are many Rake tasks available as well. You can see them by running:

    -

    Gemfile

    -
    group :development do
    -  gem "omniauth-identity", require: false
    -end
    -
    - -

    Rakefile

    -
    # Rakefile
    -require "omniauth/identity"
    +
    bin/rake -T
     

    Environment Variables for Local Development

    @@ -145,7 +137,13 @@

    Environment Variables for L
    • SKIP_GEM_SIGNING: If set, skip gem signing during build/release
    • GEM_CERT_USER: Username for selecting your public cert in certs/<USER>.pem (defaults to $USER)
    • -
    • SOURCE_DATE_EPOCH: Reproducible build timestamp. kettle-release will set this automatically for the session.
    • +
    • SOURCE_DATE_EPOCH: Reproducible build timestamp. +
        +
      • +kettle-release will set this automatically for the session.
      • +
      • Not needed on bundler >= 2.7.0, as reproducible builds have become the default.
      • +
      +

    Git hooks and commit message helpers (exe/kettle-commit-msg)

    @@ -166,6 +164,11 @@

    Appraisals

    bin/rake appraisal:update
     
    +

    If you need to reset all gemfiles/*.gemfile.lock files:

    + +
    bin/rake appraisal:reset
    +
    +

    When adding an appraisal to CI, check the runner tool cache to see which runner to use.

    The Reek List

    @@ -243,10 +246,8 @@

    Run Tests

    Spec organization (required)

      -
    • One spec file per class/module. For each class or module under lib/, keep all of its unit tests in a single spec file under spec/ that mirrors the path and file name exactly: lib/omniauth/identity/*.rb -> spec/omniauth/identity/*_spec.rb.
    • -
    • Never add a second spec file for the same class/module. Examples of disallowed names: *_more_spec.rb, *_extra_spec.rb, *_status_spec.rb, or any other suffix that still targets the same class. If you find yourself wanting a second file, merge those examples into the canonical spec file for that class/module.
    • +
    • One spec file per class/module. For each class or module under lib/, keep all of its unit tests in a single spec file under spec/ that mirrors the path and file name exactly: lib/omniauth/identity/my_class.rb -> spec/omniauth/identity/my_class_spec.rb.
    • Exception: Integration specs that intentionally span multiple classes. Place these under spec/integration/ (or a clearly named integration folder), and do not directly mirror a single class. Name them after the scenario, not a class.
    • -
    • Migration note: If a duplicate spec file exists, move all examples into the canonical file and delete the duplicate. Do not leave stubs or empty files behind.

    Lint It

    @@ -269,7 +270,7 @@

    Important: Do not add inli
    • Prefer configuration-based exclusions when a rule should not apply to certain paths or files (e.g., via .rubocop.yml).
    • -
    • When a violation is temporary and you plan to fix it later, record it in .rubocop_gradual.lock using the gradual workflow: +
    • When a violation is temporary, and you plan to fix it later, record it in .rubocop_gradual.lock using the gradual workflow:
      • bundle exec rake rubocop_gradual:autocorrect (preferred)
      • @@ -311,6 +312,7 @@

        Automated process

      • Update version.rb to contain the correct version-to-be-released.
      • Run bundle exec kettle-changelog.
      • Run bundle exec kettle-release.
      • +
      • Stay awake and monitor the release process for any errors, and answer any prompts.
      • Manual process

        @@ -363,7 +365,7 @@

        Manual process

        diff --git a/docs/file.FUNDING.html b/docs/file.FUNDING.html index e5a2d9f2..fca19359 100644 --- a/docs/file.FUNDING.html +++ b/docs/file.FUNDING.html @@ -65,15 +65,15 @@

        Sponsor Me on Github Liberapay Goal Progress Donate on PayPal

        -

        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

        +

        Buy me a coffee Donate on Polar Donate to my FLOSS efforts at ko-fi.com Donate to my FLOSS efforts using Patreon

        -

        🤑 Request for Help

        +

        🤑 A request for help

        Maintainers have teeth and need to pay their dentists.
        -After getting laid off in an RIF in March and filled with many dozens of rejections,
        -I’m now spending ~60+ hours a week building open source tools.
        +After getting laid off in an RIF in March, and encountering difficulty finding a new one,
        +I began spending most of my time building open source tools.
        I’m hoping to be able to pay for my kids’ health insurance this month,
        so if you value the work I am doing, I need your support.
        Please consider sponsoring me or the project.

        @@ -82,18 +82,13 @@

        🤑 Request for Help

        Live Chat on Discord

        -

        To say “thanks for maintaining such a great tool” ☝️ Join the Discord or 👇️ send money.

        +

        To say “thanks!” ☝️ Join the Discord or 👇️ send money.

        -

        Sponsor me on GitHub Sponsors 💌 Sponsor me on Liberapay 💌 Donate on PayPal

        +

        Sponsor me on GitHub Sponsors 💌 Sponsor me on Liberapay 💌 Donate on PayPal

        Another Way to Support Open Source Software

        -
        -

        How wonderful it is that nobody need wait a single moment before starting to improve the world.

        -—Anne Frank

        -
        - -

        I’m driven by a passion to foster a thriving open-source community – a space where people can tackle complex problems, no matter how small. Revitalizing libraries that have fallen into disrepair, and building new libraries focused on solving real-world challenges, are my passions — totaling 79 hours of FLOSS coding over just the past seven days, a pretty regular week for me. I was recently affected by layoffs, and the tech jobs market is unwelcoming. I’m reaching out here because your support would significantly aid my efforts to provide for my family, and my farm (11 🐔 chickens, 2 🐶 dogs, 3 🐰 rabbits, 8 🐈‍ cats).

        +

        I’m driven by a passion to foster a thriving open-source community – a space where people can tackle complex problems, no matter how small. Revitalizing libraries that have fallen into disrepair, and building new libraries focused on solving real-world challenges, are my passions. I was recently affected by layoffs, and the tech jobs market is unwelcoming. I’m reaching out here because your support would significantly aid my efforts to provide for my family, and my farm (11 🐔 chickens, 2 🐶 dogs, 3 🐰 rabbits, 8 🐈‍ cats).

        If you work at a company that uses my work, please encourage them to support me as a corporate sponsor. My work on gems you use might show up in bundle fund.

        @@ -104,7 +99,7 @@

        Another Way to Support Open diff --git a/docs/file.LICENSE.html b/docs/file.LICENSE.html index 106e5596..42dc1fab 100644 --- a/docs/file.LICENSE.html +++ b/docs/file.LICENSE.html @@ -60,7 +60,7 @@
        MIT License

        Copyright (c) 2021, 2024-2025 Peter H. Boling, and omniauth-identity contributors
        Copyright (c) 2020 Peter H. Boling, Andrew Roberts, and Jellybooks Ltd.
        Copyright (c) 2010-2015 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/docs/file.README.html b/docs/file.README.html index d311d3b2..585ca4a6 100644 --- a/docs/file.README.html +++ b/docs/file.README.html @@ -65,16 +65,34 @@ - RubyGems.org was recently compromised in a hostile takeover about which many lies have been told. + RubyGems (the GitHub org, not the website) suffered a hostile takeover in September 2025. - I’m in the process of adding warnings to some important gems because I don’t condone the theft of the bundler and rubygems-update projects. + Ultimately 4 maintainers were hard removed and a reason has been given for only 1 of those, while 2 others resigned in protest. - Once publishing to gem.coop is available I will stop publishing to RubyGems.org. + It is a complicated story which is difficult to parse quickly. - Please see here and here for more info on what comes next. + I’m adding notes like this to gems because I don’t condone theft of repositories or gems from their rightful owners. + + + If a similar theft happened with my repos/gems, I’d hope some would stand up for me. + + + Disenfranchised former-maintainers have started gem.coop. + + + Once available I will publish there exclusively; unless RubyCentral makes amends with the community. + + + The “Technology for Humans: Joel Draper” podcast episode by reinteractive is the most cogent summary I’m aware of. + + + See here, here and here for more info on what comes next. + + + What I’m doing: A (WIP) proposal for bundler/gem scopes, and a (WIP) proposal for a federated gem server. @@ -207,12 +225,61 @@

        Federated DVCS

        Find this repo on federated forges (Coming soon!) -| Federated [DVCS][💎d-in-dvcs] Repository | Status | Issues | PRs | Wiki | CI | Discussions | -|-------------------------------------------------|-----------------------------------------------------------------------|---------------------------|--------------------------|---------------------------|--------------------------|------------------------------| -| 🧪 [omniauth/omniauth-identity on GitLab][📜src-gl] | The Truth | [💚][🤝gl-issues] | [💚][🤝gl-pulls] | [💚][📜gl-wiki] | 🐭 Tiny Matrix | ➖ | -| 🧊 [omniauth/omniauth-identity on CodeBerg][📜src-cb] | An Ethical Mirror ([Donate][🤝cb-donate]) | [💚][🤝cb-issues] | [💚][🤝cb-pulls] | ➖ | ⭕️ No Matrix | ➖ | -| 🐙 [omniauth/omniauth-identity on GitHub][📜src-gh] | Another Mirror | [💚][🤝gh-issues] | [💚][🤝gh-pulls] | [💚][📜gh-wiki] | 💯 Full Matrix | [💚][gh-discussions] | -| 🎮️ [Discord Server][✉️discord-invite] | [![Live Chat on Discord][✉️discord-invite-img-ftb]][✉️discord-invite] | [Let's][✉️discord-invite] | [talk][✉️discord-invite] | [about][✉️discord-invite] | [this][✉️discord-invite] | [library!][✉️discord-invite] | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        Federated DVCS RepositoryStatusIssuesPRsWikiCIDiscussions
        🧪 omniauth/omniauth-identity on GitLab +The Truth💚💚💚🐭 Tiny Matrix
        🧊 omniauth/omniauth-identity on CodeBerg +An Ethical Mirror (Donate)💚💚⭕️ No Matrix
        🐙 omniauth/omniauth-identity on GitHub +Another Mirror💚💚💚💯 Full Matrix💚
        🎮️ Discord Server +Live Chat on DiscordLet’stalkaboutthislibrary!
        @@ -224,19 +291,24 @@

        Enterprise Support Get help from me on Tidelift

        -- 💡Subscribe for support guarantees covering _all_ your 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 +
          +
        • 💡Subscribe for support guarantees covering all your 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
        • +
        -Alternatively: +

        Alternatively:

        -- [![Live Chat on Discord][✉️discord-invite-img-ftb]][✉️discord-invite] -- [![Get help from me on Upwork][👨🏼‍🏫expsup-upwork-img]][👨🏼‍🏫expsup-upwork] -- [![Get help from me on Codementor][👨🏼‍🏫expsup-codementor-img]][👨🏼‍🏫expsup-codementor] +
          +
        • Live Chat on Discord
        • +
        • Get help from me on Upwork
        • +
        • Get help from me on Codementor
        • +

    @@ -257,33 +329,30 @@

    🔒 Secure Installation

    For Medium or High Security Installations -This gem 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. +

    This gem 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: +

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

    -```console -gem cert --add <(curl -Ls https://raw.github.com/galtzo-floss/certs/main/pboling.pem) -``` +
    gem cert --add <(curl -Ls https://raw.github.com/galtzo-floss/certs/main/pboling.pem)
    +
    -You only need to do that once. Then proceed to install with: +

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

    -```console -gem install omniauth-identity -P HighSecurity -``` +
    gem install omniauth-identity -P HighSecurity
    +
    -The `HighSecurity` trust profile will verify signed gems, and not allow the installation of unsigned dependencies. +

    The HighSecurity trust profile will verify signed gems, and not allow the installation of unsigned dependencies.

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

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

    -```console -bundle config set --global trust-policy MediumSecurity -``` +
    bundle config set --global trust-policy MediumSecurity
    +
    -`MediumSecurity` instead of `HighSecurity` is necessary if not all the gems you use are signed. +

    MediumSecurity instead of HighSecurity is necessary if not all the gems you use are signed.

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

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

    @@ -552,7 +621,7 @@

    Customizing Locate Conditions

    locate_conditions takes a Proc object, and must return a Hash object, which will be used
    as the argument to the locate method for your ORM. The proc is evaluated in the
    callback context, and has access to your Identity model (using model) and receives the request
    -object as a parameter. Note that model.auth_key defaults to email, but is also configurable.

    +object as a parameter. Note that model.auth_key defaults to email, but is also configurable.

    Note: Be careful when customizing locate_conditions. The best way to modify the conditions is
    to copy the default value, and then add to the hash. Removing the default condition will almost
    @@ -611,12 +680,7 @@

    🦷 FLOSS Funding

    Another way to support open-source

    -
    -

    How wonderful it is that nobody need wait a single moment before starting to improve the world.

    -—Anne Frank

    -
    - -

    I’m driven by a passion to foster a thriving open-source community – a space where people can tackle complex problems, no matter how small. Revitalizing libraries that have fallen into disrepair, and building new libraries focused on solving real-world challenges, are my passions — totaling 79 hours of FLOSS coding over just the past seven days, a pretty regular week for me. I was recently affected by layoffs, and the tech jobs market is unwelcoming. I’m reaching out here because your support would significantly aid my efforts to provide for my family, and my farm (11 🐔 chickens, 2 🐶 dogs, 3 🐰 rabbits, 8 🐈‍ cats).

    +

    I’m driven by a passion to foster a thriving open-source community – a space where people can tackle complex problems, no matter how small. Revitalizing libraries that have fallen into disrepair, and building new libraries focused on solving real-world challenges, are my passions. I was recently affected by layoffs, and the tech jobs market is unwelcoming. I’m reaching out here because your support would significantly aid my efforts to provide for my family, and my farm (11 🐔 chickens, 2 🐶 dogs, 3 🐰 rabbits, 8 🐈‍ cats).

    If you work at a company that uses my work, please encourage them to support me as a corporate sponsor. My work on gems you use might show up in bundle fund.

    @@ -624,7 +688,7 @@

    Another way to support open-sourceFloss-Funding.dev: 👉️ No network calls. 👉️ No tracking. 👉️ No oversight. 👉️ Minimal crypto hashing. 💡 Easily disabled nags

    -

    Sponsor Me on Github Liberapay Goal Progress Donate on PayPal 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

    +

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

    🔐 Security

    @@ -702,16 +766,17 @@

    📌 Versioning

    -📌 Is "Platform Support" part of the public API? More details inside. + 📌 Is "Platform Support" part of the public API? More details inside. -SemVer should, IMO, 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. +

    SemVer should, IMO, but doesn’t explicitly, say that dropping support for specific Platforms +is a breaking change to an API, and for that reason the bike shedding is endless.

    -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: +

    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] +
    @@ -746,8 +811,8 @@

    🤑 A request for help

    Maintainers have teeth and need to pay their dentists.
    -After getting laid off in an RIF in March and filled with many dozens of rejections,
    -I’m now spending ~60+ hours a week building open source tools.
    +After getting laid off in an RIF in March, and encountering difficulty finding a new one,
    +I began spending most of my time building open source tools.
    I’m hoping to be able to pay for my kids’ health insurance this month,
    so if you value the work I am doing, I need your support.
    Please consider sponsoring me or the project.

    @@ -758,7 +823,7 @@

    🤑 A request for help

    To say “thanks!” ☝️ Join the Discord or 👇️ send money.

    -

    Sponsor me on GitHub Sponsors 💌 Sponsor me on Liberapay 💌 Donate on PayPal

    +

    Sponsor me on GitHub Sponsors 💌 Sponsor me on Liberapay 💌 Donate on PayPal

    Please give the project a star ⭐ ♥.

    @@ -767,7 +832,7 @@

    Please give the project a star ⭐ ♥ diff --git a/docs/file.REEK.html b/docs/file.REEK.html index 8efd53f0..571bda53 100644 --- a/docs/file.REEK.html +++ b/docs/file.REEK.html @@ -61,7 +61,7 @@ diff --git a/docs/file.RUBOCOP.html b/docs/file.RUBOCOP.html index 52c1b8d6..a537422a 100644 --- a/docs/file.RUBOCOP.html +++ b/docs/file.RUBOCOP.html @@ -161,7 +161,7 @@

    Benefits of rubocop_gradual

    diff --git a/docs/file.SECURITY.html b/docs/file.SECURITY.html index 160ac3ec..aaf6704e 100644 --- a/docs/file.SECURITY.html +++ b/docs/file.SECURITY.html @@ -102,7 +102,7 @@

    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.

    +or find other sponsorship links in the README.

    Enterprise Support

    @@ -113,7 +113,7 @@

    Enterprise Support

    diff --git a/docs/file.omniauth-identity-3.1.0.gem.html b/docs/file.omniauth-identity-3.1.0.gem.html deleted file mode 100644 index 175c5dfa..00000000 --- a/docs/file.omniauth-identity-3.1.0.gem.html +++ /dev/null @@ -1,71 +0,0 @@ - - - - - - - File: omniauth-identity-3.1.0.gem - - — Documentation by YARD 0.9.37 - - - - - - - - - - - - - - - - - - - -
    - - -

    b35c6230931b5773cc62d26170ec0b41a152edf1317f749df00ab579c7ec0b831173dbe236208aef2841878a3efa6d77265a2c132c7c7136370a14dbc695f456

    -
    - - - -
    - - \ No newline at end of file diff --git a/docs/file.omniauth-identity-3.1.1.gem.html b/docs/file.omniauth-identity-3.1.1.gem.html deleted file mode 100644 index 383750fb..00000000 --- a/docs/file.omniauth-identity-3.1.1.gem.html +++ /dev/null @@ -1,71 +0,0 @@ - - - - - - - File: omniauth-identity-3.1.1.gem - - — Documentation by YARD 0.9.37 - - - - - - - - - - - - - - - - - - - -
    - - -

    7ff8385d8355b8c7744fabb5b91067b9fe45e3ca10ca507b5dd6b27f03e2c9ecac2cceacf9707a1a41553e5d6df7544fe8680356134223b06732f2003c0cec77

    -
    - - - -
    - - \ No newline at end of file diff --git a/docs/file.omniauth-identity-3.1.2.gem.html b/docs/file.omniauth-identity-3.1.2.gem.html deleted file mode 100644 index 39736ddc..00000000 --- a/docs/file.omniauth-identity-3.1.2.gem.html +++ /dev/null @@ -1,71 +0,0 @@ - - - - - - - File: omniauth-identity-3.1.2.gem - - — Documentation by YARD 0.9.37 - - - - - - - - - - - - - - - - - - - -
    - - -

    30bdf3083a2b43ff6335d5a7deb475feef98ac3a0fcdbcc0648fb98f2900aa484fb8c2056267f11df335459f114934800d2147b4e3840eb06f7c97fb045f1ad0

    -
    - - - -
    - - \ No newline at end of file diff --git a/docs/file.omniauth-identity-3.1.3.gem.html b/docs/file.omniauth-identity-3.1.3.gem.html deleted file mode 100644 index 580fa6a7..00000000 --- a/docs/file.omniauth-identity-3.1.3.gem.html +++ /dev/null @@ -1,71 +0,0 @@ - - - - - - - File: omniauth-identity-3.1.3.gem - - — Documentation by YARD 0.9.37 - - - - - - - - - - - - - - - - - - - -
    - - -

    08bec76d6dd2a6e8b5e43af814926d4d1c624cedb5dc85f93fbf80adfd47e5f4909bbda9a813aa24a04c7855f7d0a71904cef30c5265f5ca1f0a3e10e31b6a9c

    -
    - - - -
    - - \ No newline at end of file diff --git a/docs/file.omniauth-identity-3.1.4.gem.html b/docs/file.omniauth-identity-3.1.4.gem.html deleted file mode 100644 index 2e3e5856..00000000 --- a/docs/file.omniauth-identity-3.1.4.gem.html +++ /dev/null @@ -1,71 +0,0 @@ - - - - - - - File: omniauth-identity-3.1.4.gem - - — Documentation by YARD 0.9.37 - - - - - - - - - - - - - - - - - - - -
    - - -

    14f742d9b947ccdd6191d6b230f106b481d5a9a2dad682edc00bee39622115252026d608ccfe5a79d36b0a7383b7e2362622cfeb251061e56664054ff531e95e

    -
    - - - -
    - - \ No newline at end of file diff --git a/docs/file_list.html b/docs/file_list.html index 3c1d2bcf..659401af 100644 --- a/docs/file_list.html +++ b/docs/file_list.html @@ -92,53 +92,43 @@

    File List

    -
  • - -
  • - - -
  • - -
  • - - -
  • - +
  • +
  • -
  • - +
  • +
  • -
  • - +
  • +
  • -
  • - +
  • +
  • -
  • - +
  • +
  • -
  • - +
  • +
  • -
  • - +
  • +
  • -
  • - +
  • +
  • diff --git a/docs/images/logo/README.txt b/docs/images/logo/README.txt deleted file mode 100644 index f52f1506..00000000 --- a/docs/images/logo/README.txt +++ /dev/null @@ -1,30 +0,0 @@ -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 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 deleted file mode 100644 index 40358dec..00000000 --- a/docs/images/logo/galtzo-floss-logos-original.svg +++ /dev/null @@ -1 +0,0 @@ - \ 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 deleted file mode 100644 index 45620af7..00000000 --- a/docs/images/logo/galtzo-floss-logos-wordless.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/docs/images/logo/omniauth-logo-182px.png b/docs/images/logo/omniauth-logo-182px.png deleted file mode 100644 index 8362552e..00000000 Binary files a/docs/images/logo/omniauth-logo-182px.png and /dev/null differ diff --git a/docs/images/logo/ruby-logo-124px.jpeg b/docs/images/logo/ruby-logo-124px.jpeg deleted file mode 100644 index f1fc0df8..00000000 Binary files a/docs/images/logo/ruby-logo-124px.jpeg and /dev/null differ diff --git a/docs/images/logo/ruby-logo-198px.svg b/docs/images/logo/ruby-logo-198px.svg deleted file mode 100644 index 59cf324f..00000000 --- a/docs/images/logo/ruby-logo-198px.svg +++ /dev/null @@ -1,948 +0,0 @@ - - - -image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs/index.html b/docs/index.html index 3f76e4fd..5b42a75b 100644 --- a/docs/index.html +++ b/docs/index.html @@ -65,16 +65,34 @@ - RubyGems.org was recently compromised in a hostile takeover about which many lies have been told. + RubyGems (the GitHub org, not the website) suffered a hostile takeover in September 2025. - I’m in the process of adding warnings to some important gems because I don’t condone the theft of the bundler and rubygems-update projects. + Ultimately 4 maintainers were hard removed and a reason has been given for only 1 of those, while 2 others resigned in protest. - Once publishing to gem.coop is available I will stop publishing to RubyGems.org. + It is a complicated story which is difficult to parse quickly. - Please see here and here for more info on what comes next. + I’m adding notes like this to gems because I don’t condone theft of repositories or gems from their rightful owners. + + + If a similar theft happened with my repos/gems, I’d hope some would stand up for me. + + + Disenfranchised former-maintainers have started gem.coop. + + + Once available I will publish there exclusively; unless RubyCentral makes amends with the community. + + + The “Technology for Humans: Joel Draper” podcast episode by reinteractive is the most cogent summary I’m aware of. + + + See here, here and here for more info on what comes next. + + + What I’m doing: A (WIP) proposal for bundler/gem scopes, and a (WIP) proposal for a federated gem server. @@ -207,12 +225,61 @@

    Federated DVCS

    Find this repo on federated forges (Coming soon!) -| Federated [DVCS][💎d-in-dvcs] Repository | Status | Issues | PRs | Wiki | CI | Discussions | -|-------------------------------------------------|-----------------------------------------------------------------------|---------------------------|--------------------------|---------------------------|--------------------------|------------------------------| -| 🧪 [omniauth/omniauth-identity on GitLab][📜src-gl] | The Truth | [💚][🤝gl-issues] | [💚][🤝gl-pulls] | [💚][📜gl-wiki] | 🐭 Tiny Matrix | ➖ | -| 🧊 [omniauth/omniauth-identity on CodeBerg][📜src-cb] | An Ethical Mirror ([Donate][🤝cb-donate]) | [💚][🤝cb-issues] | [💚][🤝cb-pulls] | ➖ | ⭕️ No Matrix | ➖ | -| 🐙 [omniauth/omniauth-identity on GitHub][📜src-gh] | Another Mirror | [💚][🤝gh-issues] | [💚][🤝gh-pulls] | [💚][📜gh-wiki] | 💯 Full Matrix | [💚][gh-discussions] | -| 🎮️ [Discord Server][✉️discord-invite] | [![Live Chat on Discord][✉️discord-invite-img-ftb]][✉️discord-invite] | [Let's][✉️discord-invite] | [talk][✉️discord-invite] | [about][✉️discord-invite] | [this][✉️discord-invite] | [library!][✉️discord-invite] | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Federated DVCS RepositoryStatusIssuesPRsWikiCIDiscussions
    🧪 omniauth/omniauth-identity on GitLab +The Truth💚💚💚🐭 Tiny Matrix
    🧊 omniauth/omniauth-identity on CodeBerg +An Ethical Mirror (Donate)💚💚⭕️ No Matrix
    🐙 omniauth/omniauth-identity on GitHub +Another Mirror💚💚💚💯 Full Matrix💚
    🎮️ Discord Server +Live Chat on DiscordLet’stalkaboutthislibrary!
    @@ -224,19 +291,24 @@

    Enterprise Support Get help from me on Tidelift

    -- 💡Subscribe for support guarantees covering _all_ your 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 +
      +
    • 💡Subscribe for support guarantees covering all your 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
    • +
    -Alternatively: +

    Alternatively:

    -- [![Live Chat on Discord][✉️discord-invite-img-ftb]][✉️discord-invite] -- [![Get help from me on Upwork][👨🏼‍🏫expsup-upwork-img]][👨🏼‍🏫expsup-upwork] -- [![Get help from me on Codementor][👨🏼‍🏫expsup-codementor-img]][👨🏼‍🏫expsup-codementor] +
      +
    • Live Chat on Discord
    • +
    • Get help from me on Upwork
    • +
    • Get help from me on Codementor
    • +

    @@ -257,33 +329,30 @@

    🔒 Secure Installation

    For Medium or High Security Installations -This gem 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. +

    This gem 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: +

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

    -```console -gem cert --add <(curl -Ls https://raw.github.com/galtzo-floss/certs/main/pboling.pem) -``` +
    gem cert --add <(curl -Ls https://raw.github.com/galtzo-floss/certs/main/pboling.pem)
    +
    -You only need to do that once. Then proceed to install with: +

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

    -```console -gem install omniauth-identity -P HighSecurity -``` +
    gem install omniauth-identity -P HighSecurity
    +
    -The `HighSecurity` trust profile will verify signed gems, and not allow the installation of unsigned dependencies. +

    The HighSecurity trust profile will verify signed gems, and not allow the installation of unsigned dependencies.

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

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

    -```console -bundle config set --global trust-policy MediumSecurity -``` +
    bundle config set --global trust-policy MediumSecurity
    +
    -`MediumSecurity` instead of `HighSecurity` is necessary if not all the gems you use are signed. +

    MediumSecurity instead of HighSecurity is necessary if not all the gems you use are signed.

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

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

    @@ -552,7 +621,7 @@

    Customizing Locate Conditions

    locate_conditions takes a Proc object, and must return a Hash object, which will be used
    as the argument to the locate method for your ORM. The proc is evaluated in the
    callback context, and has access to your Identity model (using model) and receives the request
    -object as a parameter. Note that model.auth_key defaults to email, but is also configurable.

    +object as a parameter. Note that model.auth_key defaults to email, but is also configurable.

    Note: Be careful when customizing locate_conditions. The best way to modify the conditions is
    to copy the default value, and then add to the hash. Removing the default condition will almost
    @@ -562,18 +631,18 @@

    Customizing Other Things

    From the code - here are the options we have for you, a couple of which are documented above, and the rest are documented… in the specs we hope!?

    -
    option :fields, %i[name email]
    -
    -      # Primary Feature Switches:
    -option :enable_registration, true   # See #other_phase and #request_phase
    -option :enable_login, true          # See #other_phase
    -
    -      # Customization Options:
    -option :on_login, nil               # See #request_phase
    -option :on_validation, nil          # See #registration_phase
    -option :on_registration, nil        # See #registration_phase
    -option :on_failed_registration, nil # See #registration_phase
    -option :locate_conditions, ->(req) { {model.auth_key => req.params["auth_key"]} }
    +
    option :fields, %i[name email]
    +
    +      # Primary Feature Switches:
    +option :enable_registration, true   # See #other_phase and #request_phase
    +option :enable_login, true          # See #other_phase
    +
    +      # Customization Options:
    +option :on_login, nil               # See #request_phase
    +option :on_validation, nil          # See #registration_phase
    +option :on_registration, nil        # See #registration_phase
    +option :on_failed_registration, nil # See #registration_phase
    +option :locate_conditions, ->(req) { {model.auth_key => req.params["auth_key"]} }
     

    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. 😭

    @@ -611,12 +680,7 @@

    🦷 FLOSS Funding

    Another way to support open-source

    -
    -

    How wonderful it is that nobody need wait a single moment before starting to improve the world.

    -—Anne Frank

    -
    - -

    I’m driven by a passion to foster a thriving open-source community – a space where people can tackle complex problems, no matter how small. Revitalizing libraries that have fallen into disrepair, and building new libraries focused on solving real-world challenges, are my passions — totaling 79 hours of FLOSS coding over just the past seven days, a pretty regular week for me. I was recently affected by layoffs, and the tech jobs market is unwelcoming. I’m reaching out here because your support would significantly aid my efforts to provide for my family, and my farm (11 🐔 chickens, 2 🐶 dogs, 3 🐰 rabbits, 8 🐈‍ cats).

    +

    I’m driven by a passion to foster a thriving open-source community – a space where people can tackle complex problems, no matter how small. Revitalizing libraries that have fallen into disrepair, and building new libraries focused on solving real-world challenges, are my passions. I was recently affected by layoffs, and the tech jobs market is unwelcoming. I’m reaching out here because your support would significantly aid my efforts to provide for my family, and my farm (11 🐔 chickens, 2 🐶 dogs, 3 🐰 rabbits, 8 🐈‍ cats).

    If you work at a company that uses my work, please encourage them to support me as a corporate sponsor. My work on gems you use might show up in bundle fund.

    @@ -624,7 +688,7 @@

    Another way to support open-sourceFloss-Funding.dev: 👉️ No network calls. 👉️ No tracking. 👉️ No oversight. 👉️ Minimal crypto hashing. 💡 Easily disabled nags

    -

    Sponsor Me on Github Liberapay Goal Progress Donate on PayPal 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

    +

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

    🔐 Security

    @@ -702,16 +766,17 @@

    📌 Versioning

    -📌 Is "Platform Support" part of the public API? More details inside. + 📌 Is "Platform Support" part of the public API? More details inside. -SemVer should, IMO, 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. +

    SemVer should, IMO, but doesn’t explicitly, say that dropping support for specific Platforms +is a breaking change to an API, and for that reason the bike shedding is endless.

    -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: +

    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] +
    @@ -746,8 +811,8 @@

    🤑 A request for help

    Maintainers have teeth and need to pay their dentists.
    -After getting laid off in an RIF in March and filled with many dozens of rejections,
    -I’m now spending ~60+ hours a week building open source tools.
    +After getting laid off in an RIF in March, and encountering difficulty finding a new one,
    +I began spending most of my time building open source tools.
    I’m hoping to be able to pay for my kids’ health insurance this month,
    so if you value the work I am doing, I need your support.
    Please consider sponsoring me or the project.

    @@ -758,7 +823,7 @@

    🤑 A request for help

    To say “thanks!” ☝️ Join the Discord or 👇️ send money.

    -

    Sponsor me on GitHub Sponsors 💌 Sponsor me on Liberapay 💌 Donate on PayPal

    +

    Sponsor me on GitHub Sponsors 💌 Sponsor me on Liberapay 💌 Donate on PayPal

    Please give the project a star ⭐ ♥.

    @@ -767,7 +832,7 @@

    Please give the project a star ⭐ ♥ diff --git a/docs/method_list.html b/docs/method_list.html index 5ef8707b..bea9526e 100644 --- a/docs/method_list.html +++ b/docs/method_list.html @@ -208,6 +208,14 @@

    Method List

  • +
    + #id + OmniAuth::Identity::Models::Rom +
    +
  • + + +
  • #identity OmniAuth::Strategies::Identity @@ -215,7 +223,7 @@

    Method List

  • -
  • +
  • included OmniAuth::Identity::Model @@ -223,7 +231,7 @@

    Method List

  • -
  • +
  • included OmniAuth::Identity::Models::Rom @@ -231,7 +239,7 @@

    Method List

  • -
  • +
  • included OmniAuth::Identity::Models::Sequel @@ -239,7 +247,7 @@

    Method List

  • -
  • +
  • included OmniAuth::Identity::Models::Mongoid @@ -247,7 +255,7 @@

    Method List

  • -
  • +
  • included OmniAuth::Identity::SecurePassword @@ -255,7 +263,7 @@

    Method List

  • -
  • +
  • included OmniAuth::Identity::Models::NoBrainer @@ -263,7 +271,7 @@

    Method List

  • -
  • +
  • included OmniAuth::Identity::Models::CouchPotatoModule @@ -271,7 +279,7 @@

    Method List

  • -
  • +
  • #info OmniAuth::Identity::Model @@ -279,7 +287,7 @@

    Method List

  • -
  • +
  • #info OmniAuth::Identity::Models::Rom @@ -287,7 +295,7 @@

    Method List

  • -
  • +
  • #info OmniAuth::Strategies::Identity @@ -295,7 +303,7 @@

    Method List

  • -
  • +
  • #initialize OmniAuth::Identity::Models::Rom @@ -303,7 +311,7 @@

    Method List

  • -
  • +
  • #initialize OmniAuth::Identity::SecurePassword::InstanceMethodsOnActivation @@ -311,7 +319,7 @@

    Method List

  • -
  • +
  • #locate OmniAuth::Identity::Model::ClassMethods @@ -319,7 +327,7 @@

    Method List

  • -
  • +
  • #locate OmniAuth::Identity::Models::Rom::ClassMethods @@ -327,7 +335,7 @@

    Method List

  • -
  • +
  • locate OmniAuth::Identity::Models::ActiveRecord @@ -335,7 +343,7 @@

    Method List

  • -
  • +
  • #locate_conditions OmniAuth::Strategies::Identity @@ -343,7 +351,7 @@

    Method List

  • -
  • +
  • min_cost OmniAuth::Identity::SecurePassword @@ -351,7 +359,7 @@

    Method List

  • -
  • +
  • #model OmniAuth::Strategies::Identity @@ -359,7 +367,7 @@

    Method List

  • -
  • +
  • #name OmniAuth::Identity::Models::Rom @@ -367,7 +375,7 @@

    Method List

  • -
  • +
  • #on_failed_registration OmniAuth::Strategies::Identity @@ -375,7 +383,7 @@

    Method List

  • -
  • +
  • #on_login OmniAuth::Strategies::Identity @@ -383,7 +391,7 @@

    Method List

  • -
  • +
  • #on_registration OmniAuth::Strategies::Identity @@ -391,7 +399,7 @@

    Method List

  • -
  • +
  • #on_registration_path? OmniAuth::Strategies::Identity @@ -399,7 +407,7 @@

    Method List

  • -
  • +
  • #on_validation OmniAuth::Strategies::Identity @@ -407,7 +415,7 @@

    Method List

  • -
  • +
  • #other_phase OmniAuth::Strategies::Identity @@ -415,7 +423,7 @@

    Method List

  • -
  • +
  • #owner OmniAuth::Identity::Models::Rom @@ -423,7 +431,7 @@

    Method List

  • -
  • +
  • #owner_id OmniAuth::Identity::Models::Rom @@ -431,7 +439,7 @@

    Method List

  • -
  • +
  • #owner_relation_name OmniAuth::Identity::Models::Rom::ClassMethods @@ -439,7 +447,7 @@

    Method List

  • -
  • +
  • #password_field OmniAuth::Identity::Models::Rom::ClassMethods @@ -447,7 +455,7 @@

    Method List

  • -
  • +
  • #persisted? OmniAuth::Identity::Model::InstancePersistedApi @@ -455,6 +463,14 @@

    Method List

  • +
  • +
    + #persisted? + OmniAuth::Identity::Models::Rom +
    +
  • + +
  • #registration_failure_message diff --git a/docs/top-level-namespace.html b/docs/top-level-namespace.html index d07cfdf0..86a134d0 100644 --- a/docs/top-level-namespace.html +++ b/docs/top-level-namespace.html @@ -100,7 +100,7 @@

    Defined Under Namespace

    diff --git a/gemfiles/ar_5_2_r2.4.gemfile b/gemfiles/ar_5_2_r2.4.gemfile index 2b5e577a..fa6aab22 100644 --- a/gemfiles/ar_5_2_r2.4.gemfile +++ b/gemfiles/ar_5_2_r2.4.gemfile @@ -8,4 +8,6 @@ eval_gemfile("modular/activerecord/r2.4/v5.2.gemfile") eval_gemfile("modular/omniauth/r2/v1.0.gemfile") +eval_gemfile("modular/rack/r2/v1.6.gemfile") + eval_gemfile("modular/x_std_libs/r2.4/libs.gemfile") diff --git a/gemfiles/ar_5_2_r2.gemfile b/gemfiles/ar_5_2_r2.gemfile index a434cc65..2da748fa 100644 --- a/gemfiles/ar_5_2_r2.gemfile +++ b/gemfiles/ar_5_2_r2.gemfile @@ -8,4 +8,6 @@ eval_gemfile("modular/activerecord/r2/v5.2.gemfile") eval_gemfile("modular/omniauth/r2/v1.1.gemfile") +eval_gemfile("modular/rack/r2/v1.6.gemfile") + eval_gemfile("modular/x_std_libs/r2.6/libs.gemfile") diff --git a/gemfiles/ar_6_0.gemfile b/gemfiles/ar_6_0.gemfile index 0ae92af6..ea27b3a5 100644 --- a/gemfiles/ar_6_0.gemfile +++ b/gemfiles/ar_6_0.gemfile @@ -8,4 +8,6 @@ eval_gemfile("modular/activerecord/r2/v6.0.gemfile") eval_gemfile("modular/omniauth/r2/v1.2.gemfile") +eval_gemfile("modular/rack/r2/v1.6.gemfile") + eval_gemfile("modular/x_std_libs/r2.6/libs.gemfile") diff --git a/gemfiles/ar_6_1_r2.6.gemfile b/gemfiles/ar_6_1_r2.6.gemfile index 6c40c669..b319f82d 100644 --- a/gemfiles/ar_6_1_r2.6.gemfile +++ b/gemfiles/ar_6_1_r2.6.gemfile @@ -8,4 +8,6 @@ eval_gemfile("modular/activerecord/r2/v6.1.gemfile") eval_gemfile("modular/omniauth/r2/v1.3.gemfile") +eval_gemfile("modular/rack/r2/v1.6.gemfile") + eval_gemfile("modular/x_std_libs/r2.6/libs.gemfile") diff --git a/gemfiles/ar_6_1_r2.gemfile b/gemfiles/ar_6_1_r2.gemfile index a6751716..92485af3 100644 --- a/gemfiles/ar_6_1_r2.gemfile +++ b/gemfiles/ar_6_1_r2.gemfile @@ -8,4 +8,6 @@ eval_gemfile("modular/activerecord/r2/v6.1.gemfile") eval_gemfile("modular/omniauth/r2/v1.3.gemfile") +eval_gemfile("modular/rack/r2/v1.6.gemfile") + eval_gemfile("modular/x_std_libs/r2/libs.gemfile") diff --git a/gemfiles/ar_6_1_r3.gemfile b/gemfiles/ar_6_1_r3.gemfile index daeee5d2..dce2fa6c 100644 --- a/gemfiles/ar_6_1_r3.gemfile +++ b/gemfiles/ar_6_1_r3.gemfile @@ -8,4 +8,6 @@ eval_gemfile("modular/activerecord/r3/v6.1.gemfile") eval_gemfile("modular/omniauth/r3/v2.1.gemfile") +eval_gemfile("modular/rack/r3/v3.2.gemfile") + eval_gemfile("modular/x_std_libs/r3.1/libs.gemfile") diff --git a/gemfiles/ar_7_0_r2.gemfile b/gemfiles/ar_7_0_r2.gemfile index 7d5171ec..10ced2ed 100644 --- a/gemfiles/ar_7_0_r2.gemfile +++ b/gemfiles/ar_7_0_r2.gemfile @@ -8,4 +8,6 @@ eval_gemfile("modular/activerecord/r2/v7.0.gemfile") eval_gemfile("modular/omniauth/r2/v1.4.gemfile") +eval_gemfile("modular/rack/r2/v1.6.gemfile") + eval_gemfile("modular/x_std_libs/r2/libs.gemfile") diff --git a/gemfiles/ar_7_0_r3.gemfile b/gemfiles/ar_7_0_r3.gemfile index aa7d8059..f81a7858 100644 --- a/gemfiles/ar_7_0_r3.gemfile +++ b/gemfiles/ar_7_0_r3.gemfile @@ -8,4 +8,6 @@ eval_gemfile("modular/activerecord/r3/v7.0.gemfile") eval_gemfile("modular/omniauth/r3/v2.1.gemfile") +eval_gemfile("modular/rack/r3/v3.2.gemfile") + eval_gemfile("modular/x_std_libs/r3.1/libs.gemfile") diff --git a/gemfiles/ar_7_1_r2.gemfile b/gemfiles/ar_7_1_r2.gemfile index 1a87a502..2938c9fb 100644 --- a/gemfiles/ar_7_1_r2.gemfile +++ b/gemfiles/ar_7_1_r2.gemfile @@ -8,4 +8,6 @@ eval_gemfile("modular/activerecord/r2/v7.1.gemfile") eval_gemfile("modular/omniauth/r2/v1.5.gemfile") +eval_gemfile("modular/rack/r2/v1.6.gemfile") + eval_gemfile("modular/x_std_libs/r2/libs.gemfile") diff --git a/gemfiles/ar_7_1_r3.1.gemfile b/gemfiles/ar_7_1_r3.1.gemfile index d6288f3c..e8a7e2a2 100644 --- a/gemfiles/ar_7_1_r3.1.gemfile +++ b/gemfiles/ar_7_1_r3.1.gemfile @@ -8,4 +8,6 @@ eval_gemfile("modular/activerecord/r3/v7.1.gemfile") eval_gemfile("modular/omniauth/r3/v2.1.gemfile") +eval_gemfile("modular/rack/r3/v3.2.gemfile") + eval_gemfile("modular/x_std_libs/r3.1/libs.gemfile") diff --git a/gemfiles/ar_7_1_r3.gemfile b/gemfiles/ar_7_1_r3.gemfile index 8a18f4f5..ced0816e 100644 --- a/gemfiles/ar_7_1_r3.gemfile +++ b/gemfiles/ar_7_1_r3.gemfile @@ -4,8 +4,10 @@ source "https://gem.coop" gemspec path: "../" -eval_gemfile("modular/activerecord/r3/v7.1.gemfile") - eval_gemfile("modular/omniauth/r3/v2.1.gemfile") +eval_gemfile("modular/rails/r3/v7.1.gemfile") + eval_gemfile("modular/x_std_libs/r3/libs.gemfile") + +eval_gemfile("modular/integration.gemfile") diff --git a/gemfiles/ar_7_2.gemfile b/gemfiles/ar_7_2.gemfile index f1913a5c..c713e1c5 100644 --- a/gemfiles/ar_7_2.gemfile +++ b/gemfiles/ar_7_2.gemfile @@ -4,8 +4,10 @@ source "https://gem.coop" gemspec path: "../" -eval_gemfile("modular/activerecord/r3/v7.2.gemfile") - eval_gemfile("modular/omniauth/r3/v2.1.gemfile") +eval_gemfile("modular/rails/r3/v7.2.gemfile") + eval_gemfile("modular/x_std_libs/r3/libs.gemfile") + +eval_gemfile("modular/integration.gemfile") diff --git a/gemfiles/ar_8_0.gemfile b/gemfiles/ar_8_0.gemfile index 8a0a43ac..4d5d6280 100644 --- a/gemfiles/ar_8_0.gemfile +++ b/gemfiles/ar_8_0.gemfile @@ -4,8 +4,10 @@ source "https://gem.coop" gemspec path: "../" -eval_gemfile("modular/activerecord/r3/v8.0.gemfile") - eval_gemfile("modular/omniauth/r3/v2.1.gemfile") +eval_gemfile("modular/rails/r3/v8.0.gemfile") + eval_gemfile("modular/x_std_libs/r3/libs.gemfile") + +eval_gemfile("modular/integration.gemfile") diff --git a/gemfiles/ar_8_1.gemfile b/gemfiles/ar_8_1.gemfile new file mode 100644 index 00000000..f21b3dcf --- /dev/null +++ b/gemfiles/ar_8_1.gemfile @@ -0,0 +1,13 @@ +# This file was generated by Appraisal2 + +source "https://gem.coop" + +gemspec path: "../" + +eval_gemfile("modular/omniauth/r3/v2.1.gemfile") + +eval_gemfile("modular/rails/r3/v8.1.gemfile") + +eval_gemfile("modular/x_std_libs/r3/libs.gemfile") + +eval_gemfile("modular/integration.gemfile") diff --git a/gemfiles/couch_1.17_r2.4.gemfile b/gemfiles/couch_1.17_r2.4.gemfile index 7bb688e6..b3157e52 100644 --- a/gemfiles/couch_1.17_r2.4.gemfile +++ b/gemfiles/couch_1.17_r2.4.gemfile @@ -7,8 +7,10 @@ gem "ostruct", "~> 0.1" gemspec path: "../" -eval_gemfile("modular/activerecord/r2/v5.2.gemfile") +eval_gemfile("modular/activerecord/r2.4/v5.2.gemfile") eval_gemfile("modular/omniauth/r2/v1.6.gemfile") +eval_gemfile("modular/rack/r2/v1.6.gemfile") + eval_gemfile("modular/x_std_libs/r2.4/libs.gemfile") diff --git a/gemfiles/couch_1.17_r2.5.gemfile b/gemfiles/couch_1.17_r2.5.gemfile index 757254ac..0056c2a4 100644 --- a/gemfiles/couch_1.17_r2.5.gemfile +++ b/gemfiles/couch_1.17_r2.5.gemfile @@ -11,4 +11,6 @@ eval_gemfile("modular/activerecord/r2/v6.0.gemfile") eval_gemfile("modular/omniauth/r2/v1.7.gemfile") +eval_gemfile("modular/rack/r2/v1.6.gemfile") + eval_gemfile("modular/x_std_libs/r2.6/libs.gemfile") diff --git a/gemfiles/couch_1.17_r2.6.gemfile b/gemfiles/couch_1.17_r2.6.gemfile index 33090789..f9aad196 100644 --- a/gemfiles/couch_1.17_r2.6.gemfile +++ b/gemfiles/couch_1.17_r2.6.gemfile @@ -11,4 +11,6 @@ eval_gemfile("modular/activerecord/r2/v6.1.gemfile") eval_gemfile("modular/omniauth/r2/v1.7.gemfile") +eval_gemfile("modular/rack/r2/v1.6.gemfile") + eval_gemfile("modular/x_std_libs/r2.6/libs.gemfile") diff --git a/gemfiles/couch_1.17_r2.7.gemfile b/gemfiles/couch_1.17_r2.7.gemfile index 97174631..9bd70c86 100644 --- a/gemfiles/couch_1.17_r2.7.gemfile +++ b/gemfiles/couch_1.17_r2.7.gemfile @@ -11,4 +11,6 @@ eval_gemfile("modular/activerecord/r2/v6.1.gemfile") eval_gemfile("modular/omniauth/r2/v1.7.gemfile") +eval_gemfile("modular/rack/r2/v1.6.gemfile") + eval_gemfile("modular/x_std_libs/r2/libs.gemfile") diff --git a/gemfiles/couch_1.17_r3.1.gemfile b/gemfiles/couch_1.17_r3.1.gemfile index 28595068..d9e43d83 100644 --- a/gemfiles/couch_1.17_r3.1.gemfile +++ b/gemfiles/couch_1.17_r3.1.gemfile @@ -11,4 +11,6 @@ eval_gemfile("modular/activerecord/r3/v7.1.gemfile") eval_gemfile("modular/omniauth/r3/v2.1.gemfile") +eval_gemfile("modular/rack/r3/v3.2.gemfile") + eval_gemfile("modular/x_std_libs/r3.1/libs.gemfile") diff --git a/gemfiles/couch_1.17_r3.gemfile b/gemfiles/couch_1.17_r3.gemfile index 833919c5..0f43cd55 100644 --- a/gemfiles/couch_1.17_r3.gemfile +++ b/gemfiles/couch_1.17_r3.gemfile @@ -7,8 +7,10 @@ gem "ostruct", "~> 0.6", ">= 0.6.1" gemspec path: "../" -eval_gemfile("modular/activerecord/r3/v7.1.gemfile") - eval_gemfile("modular/omniauth/r3/v2.1.gemfile") +eval_gemfile("modular/rails/r3/v7.1.gemfile") + +eval_gemfile("modular/integration.gemfile") + eval_gemfile("modular/x_std_libs/r3/libs.gemfile") diff --git a/gemfiles/coverage.gemfile b/gemfiles/coverage.gemfile index 1b75321d..7b68e8dd 100644 --- a/gemfiles/coverage.gemfile +++ b/gemfiles/coverage.gemfile @@ -3,22 +3,22 @@ source "https://gem.coop" gem "couch_potato", "~> 1.17" -gem "rom-sql", "~> 3.7" -gem "sequel", "~> 5.86", ">= 5.86.0" gem "mongoid", "~> 9.0", ">= 9.0.3" gem "mongoid-rspec", "~> 4.2" gem "ostruct", "~> 0.6", ">= 0.6.1" gemspec path: "../" -eval_gemfile("modular/activerecord/r3/v8.0.gemfile") - eval_gemfile("modular/bson/r3/v5.1.gemfile") eval_gemfile("modular/omniauth/r3/v2.1.gemfile") +eval_gemfile("modular/rails/r3/v8.0.gemfile") + eval_gemfile("modular/coverage.gemfile") eval_gemfile("modular/optional.gemfile") eval_gemfile("modular/x_std_libs.gemfile") + +eval_gemfile("modular/integration.gemfile") diff --git a/gemfiles/current.gemfile b/gemfiles/current.gemfile new file mode 100644 index 00000000..251e8c34 --- /dev/null +++ b/gemfiles/current.gemfile @@ -0,0 +1,9 @@ +# This file was generated by Appraisal2 + +source "https://gem.coop" + +gemspec path: "../" + +eval_gemfile("modular/x_std_libs.gemfile") + +eval_gemfile("modular/integration.gemfile") diff --git a/gemfiles/dep_heads.gemfile b/gemfiles/dep_heads.gemfile index ec659b7f..61bb0bbf 100644 --- a/gemfiles/dep_heads.gemfile +++ b/gemfiles/dep_heads.gemfile @@ -4,6 +4,20 @@ source "https://gem.coop" gemspec path: "../" -eval_gemfile("modular/activerecord/vHEAD.gemfile") - eval_gemfile("modular/runtime_heads.gemfile") + +eval_gemfile("modular/combustion/vHEAD.gemfile") + +eval_gemfile("modular/hanami/vHEAD.gemfile") + +eval_gemfile("modular/rack/vHEAD.gemfile") + +eval_gemfile("modular/rails/vHEAD.gemfile") + +eval_gemfile("modular/roda/vHEAD.gemfile") + +eval_gemfile("modular/rom-sql/vHEAD.gemfile") + +eval_gemfile("modular/sequel/vHEAD.gemfile") + +eval_gemfile("modular/sinatra/vHEAD.gemfile") diff --git a/gemfiles/head.gemfile b/gemfiles/head.gemfile new file mode 100644 index 00000000..2df340dc --- /dev/null +++ b/gemfiles/head.gemfile @@ -0,0 +1,11 @@ +# This file was generated by Appraisal2 + +source "https://gem.coop" + +gem "benchmark", "~> 0.4", ">= 0.4.1" + +gemspec path: "../" + +eval_gemfile("modular/x_std_libs.gemfile") + +eval_gemfile("modular/rack/vHEAD.gemfile") diff --git a/gemfiles/modular/activerecord-jdbc-adapter/r3/v81.gemfile b/gemfiles/modular/activerecord-jdbc-adapter/r3/v81.gemfile new file mode 100644 index 00000000..f1906116 --- /dev/null +++ b/gemfiles/modular/activerecord-jdbc-adapter/r3/v81.gemfile @@ -0,0 +1,15 @@ +# NOTE: JRuby is still working on compatibility with Rails 8.0 +platforms :jruby do + # NOTE: There is no v81 yet. + gem "activerecord-jdbc-adapter", github: "jruby/activerecord-jdbc-adapter", branch: "master" + gem "activerecord-jdbcsqlite3-adapter", github: "jruby/activerecord-jdbc-adapter", branch: "master" + gem "jdbc-sqlite3", "~> 3.46", ">= 3.46.1.1" + # gem "activerecord-jdbc-adapter", github: "JesseChavez/activerecord-jdbc-adapter", branch: "stable-dev" + # # gem "activerecord-jdbcsqlite3-adapter", github: "JesseChavez/activerecord-jdbc-adapter", branch: "stable-dev" + # gem "jdbc-sqlite3", github: "jruby/activerecord-jdbc-adapter", branch: "master" + # # gem "jdbc-mysql", github: "jruby/activerecord-jdbc-adapter", branch: "master" + # # gem "jdbc-postgres", github: "jruby/activerecord-jdbc-adapter", branch: "master" + # gem "activerecord-jdbcsqlite3-adapter", github: "jruby/activerecord-jdbc-adapter", branch: "master" + # # gem "activerecord-jdbcmysql-adapter", github: "jruby/activerecord-jdbc-adapter", branch: "master" + # # gem "activerecord-jdbcpostgresql-adapter", github: "jruby/activerecord-jdbc-adapter", branch: "master" +end diff --git a/gemfiles/modular/activerecord-jdbc-adapter/vHEAD.gemfile b/gemfiles/modular/activerecord-jdbc-adapter/vHEAD.gemfile index 0236d9e3..999f9a48 100644 --- a/gemfiles/modular/activerecord-jdbc-adapter/vHEAD.gemfile +++ b/gemfiles/modular/activerecord-jdbc-adapter/vHEAD.gemfile @@ -1,7 +1,7 @@ # NOTE: JRuby is still working on compatibility with Rails 8.0 platforms :jruby do - gem "activerecord-jdbc-adapter", "~> 80.0", github: "jruby/activerecord-jdbc-adapter", branch: "master" - gem "activerecord-jdbcsqlite3-adapter", "~> 80.0", github: "jruby/activerecord-jdbc-adapter", branch: "master" + gem "activerecord-jdbc-adapter", github: "jruby/activerecord-jdbc-adapter", branch: "master" + gem "activerecord-jdbcsqlite3-adapter", github: "jruby/activerecord-jdbc-adapter", branch: "master" gem "jdbc-sqlite3", "~> 3.46", ">= 3.46.1.1" # gem "activerecord-jdbc-adapter", github: "JesseChavez/activerecord-jdbc-adapter", branch: "stable-dev" # # gem "activerecord-jdbcsqlite3-adapter", github: "JesseChavez/activerecord-jdbc-adapter", branch: "stable-dev" diff --git a/gemfiles/modular/activerecord/r2/v7.0.gemfile b/gemfiles/modular/activerecord/r2/v7.0.gemfile index 116b6c4c..14b45af7 100644 --- a/gemfiles/modular/activerecord/r2/v7.0.gemfile +++ b/gemfiles/modular/activerecord/r2/v7.0.gemfile @@ -1,3 +1,3 @@ -gem "activerecord", "~> 7.0.8.6" +gem "activerecord", "~> 7.0.10" eval_gemfile("../../sqlite3/r2/v1.6.gemfile") eval_gemfile("../../activerecord-jdbc-adapter/r2/v70.gemfile") diff --git a/gemfiles/modular/activerecord/r2/v7.1.gemfile b/gemfiles/modular/activerecord/r2/v7.1.gemfile index f5ebc080..3061dc40 100644 --- a/gemfiles/modular/activerecord/r2/v7.1.gemfile +++ b/gemfiles/modular/activerecord/r2/v7.1.gemfile @@ -1,3 +1,3 @@ -gem "activerecord", "~> 7.1.5" +gem "activerecord", "~> 7.1.6" eval_gemfile("../../sqlite3/r2/v1.6.gemfile") eval_gemfile("../../activerecord-jdbc-adapter/r2/v71.gemfile") diff --git a/gemfiles/modular/activerecord/r3/v7.0.gemfile b/gemfiles/modular/activerecord/r3/v7.0.gemfile index 284c3ca8..8f39df67 100644 --- a/gemfiles/modular/activerecord/r3/v7.0.gemfile +++ b/gemfiles/modular/activerecord/r3/v7.0.gemfile @@ -1,3 +1,3 @@ -gem "activerecord", "~> 7.0.8.6" +gem "activerecord", "~> 7.0.10" eval_gemfile("../../sqlite3/r3/v1.7.gemfile") eval_gemfile("../../activerecord-jdbc-adapter/r3/v70.gemfile") diff --git a/gemfiles/modular/activerecord/r3/v7.1.gemfile b/gemfiles/modular/activerecord/r3/v7.1.gemfile index 6ad7eaf9..c2121b6b 100644 --- a/gemfiles/modular/activerecord/r3/v7.1.gemfile +++ b/gemfiles/modular/activerecord/r3/v7.1.gemfile @@ -1,3 +1,3 @@ -gem "activerecord", "~> 7.1.5" +gem "activerecord", "~> 7.1.6" eval_gemfile("../../sqlite3/r3/v1.7.gemfile") eval_gemfile("../../activerecord-jdbc-adapter/r3/v71.gemfile") diff --git a/gemfiles/modular/activerecord/r3/v7.2.gemfile b/gemfiles/modular/activerecord/r3/v7.2.gemfile index 5cc59994..1bb411a8 100644 --- a/gemfiles/modular/activerecord/r3/v7.2.gemfile +++ b/gemfiles/modular/activerecord/r3/v7.2.gemfile @@ -1,3 +1,3 @@ -gem "activerecord", "~> 7.2.2" +gem "activerecord", "~> 7.2.3" eval_gemfile("../../sqlite3/r3/v2.1.gemfile") eval_gemfile("../../activerecord-jdbc-adapter/r3/v72.gemfile") diff --git a/gemfiles/modular/activerecord/r3/v8.0.gemfile b/gemfiles/modular/activerecord/r3/v8.0.gemfile index 75a9077b..a13dd664 100644 --- a/gemfiles/modular/activerecord/r3/v8.0.gemfile +++ b/gemfiles/modular/activerecord/r3/v8.0.gemfile @@ -1,3 +1,3 @@ -gem "activerecord", "~> 8.0.2" +gem "activerecord", "~> 8.0.4" eval_gemfile("../../sqlite3/r3/v2.6.gemfile") eval_gemfile("../../activerecord-jdbc-adapter/r3/v80.gemfile") diff --git a/gemfiles/modular/activerecord/r3/v8.1.gemfile b/gemfiles/modular/activerecord/r3/v8.1.gemfile new file mode 100644 index 00000000..9f141b84 --- /dev/null +++ b/gemfiles/modular/activerecord/r3/v8.1.gemfile @@ -0,0 +1,3 @@ +gem "activerecord", "~> 8.1.1" +eval_gemfile("../../sqlite3/r3/v2.6.gemfile") +eval_gemfile("../../activerecord-jdbc-adapter/r3/v81.gemfile") diff --git a/gemfiles/modular/combustion/r3/v1.5.gemfile b/gemfiles/modular/combustion/r3/v1.5.gemfile new file mode 100644 index 00000000..cbb9be1f --- /dev/null +++ b/gemfiles/modular/combustion/r3/v1.5.gemfile @@ -0,0 +1,9 @@ +# frozen_string_literal: true + +# Web Frameworks for Integration Testing +# All marked as require: false to allow selective loading in tests + +# Rails via Combustion - Minimal Rails app setup for testing +# Combustion allows us to test against multiple Rails versions +# Rails >= 3.0, Thor >= 0.14.6, Ruby >= 0 +gem "combustion", "~> 1.5", require: false diff --git a/gemfiles/modular/combustion/vHEAD.gemfile b/gemfiles/modular/combustion/vHEAD.gemfile new file mode 100644 index 00000000..326dcc2e --- /dev/null +++ b/gemfiles/modular/combustion/vHEAD.gemfile @@ -0,0 +1 @@ +gem "combustion", github: "pat/combustion", branch: "main" diff --git a/gemfiles/modular/documentation.gemfile b/gemfiles/modular/documentation.gemfile index 78533908..af182806 100755 --- a/gemfiles/modular/documentation.gemfile +++ b/gemfiles/modular/documentation.gemfile @@ -1,11 +1,14 @@ # frozen_string_literal: true # Documentation -gem "kramdown", "~> 2.5", ">= 2.5.1" # Ruby >= 2.5 -gem "kramdown-parser-gfm", "~> 1.1" # Ruby >= 2.3 +gem "kramdown", "~> 2.5", ">= 2.5.1", require: false # Ruby >= 2.5 +gem "kramdown-parser-gfm", "~> 1.1", require: false # Ruby >= 2.3 gem "yard", "~> 0.9", ">= 0.9.37", require: false +gem "yaml-converter", "~> 0.1", require: false # Ruby >= 3.2 +gem "yard-yaml", "~> 0.1", require: false # Ruby >= 3.2 +gem "yard-fence", "~> 0.8", require: false # Ruby >= 3.2 gem "yard-junk", "~> 0.0", ">= 0.0.10", github: "pboling/yard-junk", branch: "next", require: false -gem "yard-relative_markdown_links", "~> 0.5.0" +gem "yard-relative_markdown_links", "~> 0.6", require: false # Std Lib extractions -gem "rdoc", "~> 6.11" +gem "rdoc", "~> 6.11", require: false diff --git a/gemfiles/modular/hanami/r3/v2.2.gemfile b/gemfiles/modular/hanami/r3/v2.2.gemfile new file mode 100644 index 00000000..35eda151 --- /dev/null +++ b/gemfiles/modular/hanami/r3/v2.2.gemfile @@ -0,0 +1,9 @@ +# frozen_string_literal: true + +# Web Frameworks for Integration Testing +# All marked as require: false to allow selective loading in tests + +# Hanami - Full-featured web framework +# Hanami 2.x requires Ruby 3.1+ +gem "hanami", "~> 2.2", require: false +gem "hanami-router", "~> 2.2", require: false diff --git a/gemfiles/modular/hanami/vHEAD.gemfile b/gemfiles/modular/hanami/vHEAD.gemfile new file mode 100644 index 00000000..d4e90088 --- /dev/null +++ b/gemfiles/modular/hanami/vHEAD.gemfile @@ -0,0 +1 @@ +gem "hanami", github: "hanami/hanami", branch: "main" diff --git a/gemfiles/modular/integration.gemfile b/gemfiles/modular/integration.gemfile new file mode 100644 index 00000000..8fad5cae --- /dev/null +++ b/gemfiles/modular/integration.gemfile @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +# Web Frameworks for Integration Testing +# All marked as require: false to allow selective loading in tests +# Rails not included because Rails integration tests run against +# whatever version the appraisal specifies; loaded by Combustion +gem "sequel", "~> 5.86", ">= 5.86.0" + +eval_gemfile("combustion/r3/v1.5.gemfile") +eval_gemfile("hanami/r3/v2.2.gemfile") +eval_gemfile("rack/r3/v3.2.gemfile") +eval_gemfile("roda/r3/v3.85.gemfile") +eval_gemfile("rom-sql/r3/v3.7.gemfile") +eval_gemfile("sequel/r3/v5.86.gemfile") +eval_gemfile("sinatra/r3/v4.2.gemfile") + +# Testing utilities +gem "rack-test", "~> 2.1" +gem "capybara", "~> 3.40" diff --git a/gemfiles/modular/rack/r2/v1.6.gemfile b/gemfiles/modular/rack/r2/v1.6.gemfile new file mode 100644 index 00000000..9e89138b --- /dev/null +++ b/gemfiles/modular/rack/r2/v1.6.gemfile @@ -0,0 +1,2 @@ +gem "rack", "~> 1.6", ">= 1.6.13" +# Rack::Session was part of core rack gem prior to v3 diff --git a/gemfiles/modular/rack/r2/v2.2.gemfile b/gemfiles/modular/rack/r2/v2.2.gemfile new file mode 100644 index 00000000..4633808f --- /dev/null +++ b/gemfiles/modular/rack/r2/v2.2.gemfile @@ -0,0 +1,2 @@ +gem "rack", "~> 2.2", ">= 2.2.21" +# Rack::Session was part of core rack gem prior to v3 diff --git a/gemfiles/modular/rack/r2/v3.2.gemfile b/gemfiles/modular/rack/r2/v3.2.gemfile new file mode 100644 index 00000000..153ee093 --- /dev/null +++ b/gemfiles/modular/rack/r2/v3.2.gemfile @@ -0,0 +1,3 @@ +gem "rack", "~> 3.2", ">= 3.2.4" +# Rack::Session was extracted from core rack gem with release of rack v3 +gem "rack-session", "~> 2.1", ">= 2.1.1" diff --git a/gemfiles/modular/rack/r3/v3.2.gemfile b/gemfiles/modular/rack/r3/v3.2.gemfile new file mode 100644 index 00000000..61378667 --- /dev/null +++ b/gemfiles/modular/rack/r3/v3.2.gemfile @@ -0,0 +1,2 @@ +gem "rack", "~> 3.2", ">= 3.2.4" +gem "rack-session", "~> 2.1", ">= 2.1.1" diff --git a/gemfiles/modular/rack/vHEAD.gemfile b/gemfiles/modular/rack/vHEAD.gemfile new file mode 100644 index 00000000..4b05dcf3 --- /dev/null +++ b/gemfiles/modular/rack/vHEAD.gemfile @@ -0,0 +1,2 @@ +gem "rack", github: "rack/rack", branch: "main" +gem "rack-session", github: "rack/rack-session", branch: "main" diff --git a/gemfiles/modular/rails/r3/v7.1.gemfile b/gemfiles/modular/rails/r3/v7.1.gemfile new file mode 100644 index 00000000..67c90af3 --- /dev/null +++ b/gemfiles/modular/rails/r3/v7.1.gemfile @@ -0,0 +1,2 @@ +gem "rails", "~> 7.1.6" +eval_gemfile("../../activerecord/r3/v7.1.gemfile") diff --git a/gemfiles/modular/rails/r3/v7.2.gemfile b/gemfiles/modular/rails/r3/v7.2.gemfile new file mode 100644 index 00000000..2c29077b --- /dev/null +++ b/gemfiles/modular/rails/r3/v7.2.gemfile @@ -0,0 +1,2 @@ +gem "rails", "~> 7.2.3" +eval_gemfile("../../activerecord/r3/v7.2.gemfile") diff --git a/gemfiles/modular/rails/r3/v8.0.gemfile b/gemfiles/modular/rails/r3/v8.0.gemfile new file mode 100644 index 00000000..c9ca3724 --- /dev/null +++ b/gemfiles/modular/rails/r3/v8.0.gemfile @@ -0,0 +1,2 @@ +gem "rails", "~> 8.0.4" +eval_gemfile("../../activerecord/r3/v8.0.gemfile") diff --git a/gemfiles/modular/rails/r3/v8.1.gemfile b/gemfiles/modular/rails/r3/v8.1.gemfile new file mode 100644 index 00000000..68885130 --- /dev/null +++ b/gemfiles/modular/rails/r3/v8.1.gemfile @@ -0,0 +1,2 @@ +gem "rails", "~> 8.1.1" +eval_gemfile("../../activerecord/r3/v8.1.gemfile") diff --git a/gemfiles/modular/rails/vHEAD.gemfile b/gemfiles/modular/rails/vHEAD.gemfile new file mode 100644 index 00000000..4e39979e --- /dev/null +++ b/gemfiles/modular/rails/vHEAD.gemfile @@ -0,0 +1,5 @@ +# main targets Rails 8.1 +gem "rails", github: "rails/rails", branch: "main" + +eval_gemfile("../activerecord/vHEAD.gemfile") +eval_gemfile("../sqlite3/vHEAD.gemfile") diff --git a/gemfiles/modular/roda/r3/v3.85.gemfile b/gemfiles/modular/roda/r3/v3.85.gemfile new file mode 100644 index 00000000..85a5d138 --- /dev/null +++ b/gemfiles/modular/roda/r3/v3.85.gemfile @@ -0,0 +1,8 @@ +# frozen_string_literal: true + +# Web Frameworks for Integration Testing +# All marked as require: false to allow selective loading in tests + +# Roda - Fast, simple routing tree web framework +# Compatible with Ruby 1.9+, but we'll test on Ruby 3.1+ due to ROM requirements +gem "roda", "~> 3.85", require: false diff --git a/gemfiles/modular/roda/vHEAD.gemfile b/gemfiles/modular/roda/vHEAD.gemfile new file mode 100644 index 00000000..8f583269 --- /dev/null +++ b/gemfiles/modular/roda/vHEAD.gemfile @@ -0,0 +1 @@ +gem "roda", github: "jeremyevans/roda", branch: "master" diff --git a/gemfiles/modular/rom-sql/r3/v3.7.gemfile b/gemfiles/modular/rom-sql/r3/v3.7.gemfile new file mode 100644 index 00000000..3b871c43 --- /dev/null +++ b/gemfiles/modular/rom-sql/r3/v3.7.gemfile @@ -0,0 +1 @@ +gem "rom-sql", "~> 3.7", require: false diff --git a/gemfiles/modular/rom-sql/vHEAD.gemfile b/gemfiles/modular/rom-sql/vHEAD.gemfile new file mode 100644 index 00000000..58272665 --- /dev/null +++ b/gemfiles/modular/rom-sql/vHEAD.gemfile @@ -0,0 +1 @@ +gem "rom-sql", github: "rom-rb/rom-sql", branch: "release-3.7", require: false diff --git a/gemfiles/modular/runtime_heads.gemfile b/gemfiles/modular/runtime_heads.gemfile index 376765a0..016a4a32 100644 --- a/gemfiles/modular/runtime_heads.gemfile +++ b/gemfiles/modular/runtime_heads.gemfile @@ -7,4 +7,6 @@ eval_gemfile("omniauth/vHEAD.gemfile") # Ruby >= 2.2 gem "version_gem", github: "ruby-oauth/version_gem", branch: "main" +eval_gemfile("rack/vHEAD.gemfile") + eval_gemfile("x_std_libs/vHEAD.gemfile") diff --git a/gemfiles/modular/sequel/r3/v5.86.gemfile b/gemfiles/modular/sequel/r3/v5.86.gemfile new file mode 100644 index 00000000..84abe70b --- /dev/null +++ b/gemfiles/modular/sequel/r3/v5.86.gemfile @@ -0,0 +1 @@ +gem "sequel", "~> 5.86", ">= 5.86.0", require: false diff --git a/gemfiles/modular/sequel/vHEAD.gemfile b/gemfiles/modular/sequel/vHEAD.gemfile new file mode 100644 index 00000000..166d04a9 --- /dev/null +++ b/gemfiles/modular/sequel/vHEAD.gemfile @@ -0,0 +1 @@ +gem "sequel", github: "jeremyevans/sequel", branch: "master", require: false diff --git a/gemfiles/modular/sinatra/r3/v4.2.gemfile b/gemfiles/modular/sinatra/r3/v4.2.gemfile new file mode 100644 index 00000000..4434a9a4 --- /dev/null +++ b/gemfiles/modular/sinatra/r3/v4.2.gemfile @@ -0,0 +1,10 @@ +# frozen_string_literal: true + +# Web Frameworks for Integration Testing +# All marked as require: false to allow selective loading in tests + +# Sinatra - Minimal web framework +# Compatible with Ruby 2.4+ (Sinatra 3.x), Ruby 2.6+ (Sinatra 4.x) +# We'll use version constraints in appraisals if needed +gem "sinatra", "~> 4.2", require: false +gem "sinatra-contrib", "~> 4.2", require: false diff --git a/gemfiles/modular/sinatra/vHEAD.gemfile b/gemfiles/modular/sinatra/vHEAD.gemfile new file mode 100644 index 00000000..5b165fab --- /dev/null +++ b/gemfiles/modular/sinatra/vHEAD.gemfile @@ -0,0 +1 @@ +gem "sinatra", github: "sinatra/sinatra", branch: "main" diff --git a/gemfiles/modular/x_std_libs/r2.3/libs.gemfile b/gemfiles/modular/x_std_libs/r2.3/libs.gemfile new file mode 100644 index 00000000..3482d6d5 --- /dev/null +++ b/gemfiles/modular/x_std_libs/r2.3/libs.gemfile @@ -0,0 +1,4 @@ +eval_gemfile "../../erb/r2.3/default.gemfile" +eval_gemfile "../../mutex_m/r2.4/v0.1.gemfile" +eval_gemfile "../../stringio/r2.4/v0.0.2.gemfile" +eval_gemfile "../../logger/r2.4/v1.5.3.gemfile" diff --git a/gemfiles/mongoid_7.3_b4.12.gemfile b/gemfiles/mongoid_7.3_b4.12.gemfile index 6fd5f2ba..e082ce51 100644 --- a/gemfiles/mongoid_7.3_b4.12.gemfile +++ b/gemfiles/mongoid_7.3_b4.12.gemfile @@ -13,4 +13,6 @@ eval_gemfile("modular/activerecord/r2.4/v5.2.gemfile") eval_gemfile("modular/omniauth/r2/v1.8.gemfile") +eval_gemfile("modular/rack/r2/v1.6.gemfile") + eval_gemfile("modular/x_std_libs/r2.4/libs.gemfile") diff --git a/gemfiles/mongoid_7.3_b4.15.gemfile b/gemfiles/mongoid_7.3_b4.15.gemfile index 636ecf56..3d0f8703 100644 --- a/gemfiles/mongoid_7.3_b4.15.gemfile +++ b/gemfiles/mongoid_7.3_b4.15.gemfile @@ -13,4 +13,6 @@ eval_gemfile("modular/activerecord/r2/v6.1.gemfile") eval_gemfile("modular/omniauth/r2/v1.9.gemfile") +eval_gemfile("modular/rack/r2/v1.6.gemfile") + eval_gemfile("modular/x_std_libs/r2.6/libs.gemfile") diff --git a/gemfiles/mongoid_7.4_b4.15.gemfile b/gemfiles/mongoid_7.4_b4.15.gemfile index 3cc25a39..f6334d2d 100644 --- a/gemfiles/mongoid_7.4_b4.15.gemfile +++ b/gemfiles/mongoid_7.4_b4.15.gemfile @@ -13,4 +13,6 @@ eval_gemfile("modular/activerecord/r2/v6.1.gemfile") eval_gemfile("modular/omniauth/r2/v2.0.gemfile") +eval_gemfile("modular/rack/r2/v1.6.gemfile") + eval_gemfile("modular/x_std_libs/r2.6/libs.gemfile") diff --git a/gemfiles/mongoid_7.4_b5.gemfile b/gemfiles/mongoid_7.4_b5.gemfile index ea6ba312..1cb25c1a 100644 --- a/gemfiles/mongoid_7.4_b5.gemfile +++ b/gemfiles/mongoid_7.4_b5.gemfile @@ -13,4 +13,6 @@ eval_gemfile("modular/activerecord/r2/v6.1.gemfile") eval_gemfile("modular/omniauth/r2/v2.0.gemfile") +eval_gemfile("modular/rack/r2/v1.6.gemfile") + eval_gemfile("modular/x_std_libs/r2.6/libs.gemfile") diff --git a/gemfiles/mongoid_8.1_r2.6.gemfile b/gemfiles/mongoid_8.1_r2.6.gemfile index 3d9a0150..528e6c0e 100644 --- a/gemfiles/mongoid_8.1_r2.6.gemfile +++ b/gemfiles/mongoid_8.1_r2.6.gemfile @@ -13,4 +13,6 @@ eval_gemfile("modular/activerecord/r2/v6.1.gemfile") eval_gemfile("modular/omniauth/r2/v2.0.gemfile") +eval_gemfile("modular/rack/r2/v1.6.gemfile") + eval_gemfile("modular/x_std_libs/r2.6/libs.gemfile") diff --git a/gemfiles/mongoid_8.1_r2.gemfile b/gemfiles/mongoid_8.1_r2.gemfile index ea7f55fe..e3cb465e 100644 --- a/gemfiles/mongoid_8.1_r2.gemfile +++ b/gemfiles/mongoid_8.1_r2.gemfile @@ -13,4 +13,6 @@ eval_gemfile("modular/activerecord/r2/v6.1.gemfile") eval_gemfile("modular/omniauth/r2/v2.0.gemfile") +eval_gemfile("modular/rack/r2/v1.6.gemfile") + eval_gemfile("modular/x_std_libs/r2/libs.gemfile") diff --git a/gemfiles/mongoid_8.1_r3.1.gemfile b/gemfiles/mongoid_8.1_r3.1.gemfile index 8a501b46..07a06d5b 100644 --- a/gemfiles/mongoid_8.1_r3.1.gemfile +++ b/gemfiles/mongoid_8.1_r3.1.gemfile @@ -13,4 +13,6 @@ eval_gemfile("modular/activerecord/r3/v7.1.gemfile") eval_gemfile("modular/omniauth/r3/v2.1.gemfile") +eval_gemfile("modular/rack/r3/v3.2.gemfile") + eval_gemfile("modular/x_std_libs/r3.1/libs.gemfile") diff --git a/gemfiles/mongoid_8.1_r3.gemfile b/gemfiles/mongoid_8.1_r3.gemfile index 4928c266..929a39e9 100644 --- a/gemfiles/mongoid_8.1_r3.gemfile +++ b/gemfiles/mongoid_8.1_r3.gemfile @@ -9,8 +9,14 @@ gemspec path: "../" eval_gemfile("modular/bson/r3/v5.1.gemfile") -eval_gemfile("modular/activerecord/r3/v7.1.gemfile") - eval_gemfile("modular/omniauth/r3/v2.1.gemfile") +eval_gemfile("modular/rails/r3/v7.1.gemfile") + +eval_gemfile("modular/rom-sql/r3/v3.7.gemfile") + +eval_gemfile("modular/sequel/r3/v5.86.gemfile") + +eval_gemfile("modular/integration.gemfile") + eval_gemfile("modular/x_std_libs/r3/libs.gemfile") diff --git a/gemfiles/mongoid_9.0_r2_omni1.9.gemfile b/gemfiles/mongoid_9.0_r2_omni1.9.gemfile index c7c9d892..55a56918 100644 --- a/gemfiles/mongoid_9.0_r2_omni1.9.gemfile +++ b/gemfiles/mongoid_9.0_r2_omni1.9.gemfile @@ -14,4 +14,6 @@ eval_gemfile("modular/activerecord/r2/v7.1.gemfile") eval_gemfile("modular/omniauth/r2/v1.9.gemfile") +eval_gemfile("modular/rack/r2/v1.6.gemfile") + eval_gemfile("modular/x_std_libs/r2/libs.gemfile") diff --git a/gemfiles/mongoid_9.0_r2_omni2.0.gemfile b/gemfiles/mongoid_9.0_r2_omni2.0.gemfile index e1d7bd30..edbcfb71 100644 --- a/gemfiles/mongoid_9.0_r2_omni2.0.gemfile +++ b/gemfiles/mongoid_9.0_r2_omni2.0.gemfile @@ -14,4 +14,6 @@ eval_gemfile("modular/activerecord/r2/v7.1.gemfile") eval_gemfile("modular/omniauth/r2/v2.0.gemfile") +eval_gemfile("modular/rack/r2/v1.6.gemfile") + eval_gemfile("modular/x_std_libs/r2/libs.gemfile") diff --git a/gemfiles/mongoid_9.0_r2_omni2.1.gemfile b/gemfiles/mongoid_9.0_r2_omni2.1.gemfile index 9dd095aa..5583e6dc 100644 --- a/gemfiles/mongoid_9.0_r2_omni2.1.gemfile +++ b/gemfiles/mongoid_9.0_r2_omni2.1.gemfile @@ -14,4 +14,6 @@ eval_gemfile("modular/activerecord/r2/v7.1.gemfile") eval_gemfile("modular/omniauth/r2/v2.1.gemfile") +eval_gemfile("modular/rack/r2/v3.2.gemfile") + eval_gemfile("modular/x_std_libs/r2/libs.gemfile") diff --git a/gemfiles/mongoid_9.0_r3.1.gemfile b/gemfiles/mongoid_9.0_r3.1.gemfile index 048804d1..2ab6c335 100644 --- a/gemfiles/mongoid_9.0_r3.1.gemfile +++ b/gemfiles/mongoid_9.0_r3.1.gemfile @@ -14,4 +14,6 @@ eval_gemfile("modular/activerecord/r3/v7.1.gemfile") eval_gemfile("modular/omniauth/r3/v2.1.gemfile") +eval_gemfile("modular/rack/r3/v3.2.gemfile") + eval_gemfile("modular/x_std_libs/r3.1/libs.gemfile") diff --git a/gemfiles/mongoid_9.0_r3.gemfile b/gemfiles/mongoid_9.0_r3.gemfile index 057005f1..cfe272d8 100644 --- a/gemfiles/mongoid_9.0_r3.gemfile +++ b/gemfiles/mongoid_9.0_r3.gemfile @@ -10,8 +10,12 @@ gemspec path: "../" eval_gemfile("modular/bson/r3/v5.1.gemfile") -eval_gemfile("modular/activerecord/r3/v7.1.gemfile") - eval_gemfile("modular/omniauth/r3/v2.1.gemfile") +eval_gemfile("modular/rack/r3/v3.2.gemfile") + +eval_gemfile("modular/rails/r3/v7.1.gemfile") + +eval_gemfile("modular/integration.gemfile") + eval_gemfile("modular/x_std_libs/r3/libs.gemfile") diff --git a/gemfiles/rom_r3.1.gemfile b/gemfiles/rom_r3.1.gemfile index 4166d51d..6dcf4bea 100644 --- a/gemfiles/rom_r3.1.gemfile +++ b/gemfiles/rom_r3.1.gemfile @@ -10,4 +10,6 @@ eval_gemfile("modular/activerecord/r3/v7.1.gemfile") eval_gemfile("modular/omniauth/r3/v2.1.gemfile") +eval_gemfile("modular/rack/r3/v3.2.gemfile") + eval_gemfile("modular/x_std_libs/r3.1/libs.gemfile") diff --git a/gemfiles/rom_r3.gemfile b/gemfiles/rom_r3.gemfile index 0def55f6..ae00d59b 100644 --- a/gemfiles/rom_r3.gemfile +++ b/gemfiles/rom_r3.gemfile @@ -2,8 +2,6 @@ source "https://gem.coop" -gem "rom-sql", "~> 3.7" - gemspec path: "../" eval_gemfile("modular/activerecord/r3/v7.1.gemfile") @@ -11,3 +9,5 @@ eval_gemfile("modular/activerecord/r3/v7.1.gemfile") eval_gemfile("modular/omniauth/r3/v2.1.gemfile") eval_gemfile("modular/x_std_libs/r3/libs.gemfile") + +eval_gemfile("modular/integration.gemfile") diff --git a/gemfiles/sequel_5.86_r2.4.gemfile b/gemfiles/sequel_5.86_r2.4.gemfile index e5c5e911..4cfb8c7b 100644 --- a/gemfiles/sequel_5.86_r2.4.gemfile +++ b/gemfiles/sequel_5.86_r2.4.gemfile @@ -2,12 +2,14 @@ source "https://gem.coop" -gem "sequel", "~> 5.86", ">= 5.86.0" - gemspec path: "../" eval_gemfile("modular/activerecord/r2.4/v5.2.gemfile") eval_gemfile("modular/omniauth/r2/v2.0.gemfile") +eval_gemfile("modular/rack/r2/v1.6.gemfile") + +eval_gemfile("modular/sequel/r3/v5.86.gemfile") + eval_gemfile("modular/x_std_libs/r2.4/libs.gemfile") diff --git a/gemfiles/sequel_5.86_r2.5.gemfile b/gemfiles/sequel_5.86_r2.5.gemfile index 32578b70..6c5705a8 100644 --- a/gemfiles/sequel_5.86_r2.5.gemfile +++ b/gemfiles/sequel_5.86_r2.5.gemfile @@ -2,12 +2,14 @@ source "https://gem.coop" -gem "sequel", "~> 5.86", ">= 5.86.0" - gemspec path: "../" eval_gemfile("modular/activerecord/r2/v6.0.gemfile") eval_gemfile("modular/omniauth/r2/v2.1.gemfile") +eval_gemfile("modular/rack/r2/v3.2.gemfile") + +eval_gemfile("modular/sequel/r3/v5.86.gemfile") + eval_gemfile("modular/x_std_libs/r2.6/libs.gemfile") diff --git a/gemfiles/sequel_5.86_r2.6.gemfile b/gemfiles/sequel_5.86_r2.6.gemfile index 486ef4e1..fcc988b8 100644 --- a/gemfiles/sequel_5.86_r2.6.gemfile +++ b/gemfiles/sequel_5.86_r2.6.gemfile @@ -2,12 +2,14 @@ source "https://gem.coop" -gem "sequel", "~> 5.86", ">= 5.86.0" - gemspec path: "../" eval_gemfile("modular/activerecord/r2/v6.1.gemfile") eval_gemfile("modular/omniauth/r2/v2.1.gemfile") +eval_gemfile("modular/rack/r2/v3.2.gemfile") + +eval_gemfile("modular/sequel/r3/v5.86.gemfile") + eval_gemfile("modular/x_std_libs/r2.6/libs.gemfile") diff --git a/gemfiles/sequel_5.86_r2.7.gemfile b/gemfiles/sequel_5.86_r2.7.gemfile index 80102f40..90b3a933 100644 --- a/gemfiles/sequel_5.86_r2.7.gemfile +++ b/gemfiles/sequel_5.86_r2.7.gemfile @@ -2,12 +2,14 @@ source "https://gem.coop" -gem "sequel", "~> 5.86", ">= 5.86.0" - gemspec path: "../" eval_gemfile("modular/activerecord/r2/v7.1.gemfile") eval_gemfile("modular/omniauth/r2/v2.1.gemfile") +eval_gemfile("modular/rack/r2/v3.2.gemfile") + +eval_gemfile("modular/sequel/r3/v5.86.gemfile") + eval_gemfile("modular/x_std_libs/r2/libs.gemfile") diff --git a/gemfiles/sequel_5.86_r3.1.gemfile b/gemfiles/sequel_5.86_r3.1.gemfile index f5c3c88e..96aaa21c 100644 --- a/gemfiles/sequel_5.86_r3.1.gemfile +++ b/gemfiles/sequel_5.86_r3.1.gemfile @@ -2,12 +2,14 @@ source "https://gem.coop" -gem "sequel", "~> 5.86", ">= 5.86.0" - gemspec path: "../" eval_gemfile("modular/activerecord/r3/v7.1.gemfile") eval_gemfile("modular/omniauth/r3/v2.1.gemfile") +eval_gemfile("modular/rack/r3/v3.2.gemfile") + +eval_gemfile("modular/sequel/r3/v5.86.gemfile") + eval_gemfile("modular/x_std_libs/r3.1/libs.gemfile") diff --git a/gemfiles/sequel_5.86_r3.gemfile b/gemfiles/sequel_5.86_r3.gemfile index f1e9647f..8b810bdd 100644 --- a/gemfiles/sequel_5.86_r3.gemfile +++ b/gemfiles/sequel_5.86_r3.gemfile @@ -2,12 +2,12 @@ source "https://gem.coop" -gem "sequel", "~> 5.86", ">= 5.86.0" - gemspec path: "../" -eval_gemfile("modular/activerecord/r3/v7.1.gemfile") - eval_gemfile("modular/omniauth/r3/v2.1.gemfile") +eval_gemfile("modular/rails/r3/v7.1.gemfile") + +eval_gemfile("modular/integration.gemfile") + eval_gemfile("modular/x_std_libs/r3/libs.gemfile") diff --git a/gemfiles/unlocked_deps.gemfile b/gemfiles/unlocked_deps.gemfile index 7e0ff554..b6247f81 100644 --- a/gemfiles/unlocked_deps.gemfile +++ b/gemfiles/unlocked_deps.gemfile @@ -2,15 +2,12 @@ source "https://gem.coop" -gem "sequel", "~> 5.86", ">= 5.86.0" -gem "rom-sql", "~> 3.7" - gemspec path: "../" -eval_gemfile("modular/activerecord/r3/v8.0.gemfile") - eval_gemfile("modular/omniauth/r3/v2.1.gemfile") +eval_gemfile("modular/rails/r3/v8.1.gemfile") + eval_gemfile("modular/coverage.gemfile") eval_gemfile("modular/documentation.gemfile") @@ -20,3 +17,5 @@ eval_gemfile("modular/style.gemfile") eval_gemfile("modular/optional.gemfile") eval_gemfile("modular/x_std_libs.gemfile") + +eval_gemfile("modular/integration.gemfile") diff --git a/lib/omniauth/identity/model.rb b/lib/omniauth/identity/model.rb index 20e555f1..24b373c3 100644 --- a/lib/omniauth/identity/model.rb +++ b/lib/omniauth/identity/model.rb @@ -87,10 +87,10 @@ def locate(_key) # Provides a create method for models that don't have one. module ClassCreateApi # Persists a new Identity object to the ORM. - # Only included if the class doesn't define create, as a reminder to define create. + # Only included if the class doesn't define `create`, as a reminder to define `create`. # Override as needed per ORM. # - # @deprecated v4.0 will begin using {#new} with {#save} instead. + # @deprecated v4.0 will begin using `{.new}` with `{#save}` instead. # @abstract # @param [Hash] _args Attributes of the new instance. # @return [Model] An instance of the identity model class. diff --git a/lib/omniauth/identity/models/rom.rb b/lib/omniauth/identity/models/rom.rb index fa176fc5..71731b07 100644 --- a/lib/omniauth/identity/models/rom.rb +++ b/lib/omniauth/identity/models/rom.rb @@ -116,9 +116,11 @@ def initialize(identity_data, owner_data = nil) @uid = identity_data[:id] @email = identity_data[:email] - # Prefer owner name if available, else fall back to email + # Prefer owner name if available, else identity name, else fall back to email @name = if owner_data && owner_data[:name] owner_data[:name] + elsif identity_data[:name] + identity_data[:name] else identity_data[:email] end @@ -131,6 +133,11 @@ def initialize(identity_data, owner_data = nil) @owner = owner_data end + # Provide id method for Model module compatibility + def id + @uid + end + # Hash-like access to underlying ROM tuple def [](key) @identity_data[key] @@ -145,6 +152,13 @@ def owner_id def to_hash @info end + + # Check if this identity is persisted (has an id) + # Required by OmniAuth::Identity strategy + # @return [Boolean] true if persisted, false otherwise + def persisted? + !@uid.nil? && !@uid.to_s.empty? + end end end end diff --git a/lib/omniauth/identity/version.rb b/lib/omniauth/identity/version.rb index fb17b513..45bc1aa9 100644 --- a/lib/omniauth/identity/version.rb +++ b/lib/omniauth/identity/version.rb @@ -9,5 +9,6 @@ module Version # @return [String] VERSION = "3.1.5" end + VERSION = Version::VERSION # Traditional version constant location end end diff --git a/omniauth-identity.gemspec b/omniauth-identity.gemspec index 1aaf1c52..23892346 100644 --- a/omniauth-identity.gemspec +++ b/omniauth-identity.gemspec @@ -60,8 +60,7 @@ Gem::Specification.new do |spec| # Specify which files are part of the released package. spec.files = Dir[ - # Executables and tasks - "exe/*", + # Code / tasks / data (NOTE: exe/ is specified via spec.bindir and spec.executables below) "lib/**/*.rb", "lib/**/*.rake", # Signatures @@ -133,8 +132,8 @@ Gem::Specification.new do |spec| spec.add_development_dependency("activerecord", ">= 5") # ruby >= 2.2.2 spec.add_development_dependency("anonymous_active_record", "~> 1.0", ">= 1.0.9") # ruby >= 2.4 spec.add_development_dependency("appraisal2", "~> 3.0") # ruby >= 1.8.7, for testing against multiple versions of dependencies - spec.add_development_dependency("kettle-test", "~> 1.0") # ruby >= 2.3 - spec.add_development_dependency("rack-test", "~> 1") # ruby >= 2.0 + spec.add_development_dependency("kettle-test", "~> 1.0", ">= 1.0.6") # ruby >= 2.3 + spec.add_development_dependency("rack-test", "~> 2.2") # ruby >= 2.0, rack >= 1.3 spec.add_development_dependency("rspec-pending_for", "~> 0.0", ">= 0.0.17") # ruby >= 2.3, used to skip specs on incompatible Rubies # Releasing spec.add_development_dependency("ruby-progressbar", "~> 1.13") # ruby >= 0 diff --git a/spec/combustion_helper.rb b/spec/combustion_helper.rb new file mode 100644 index 00000000..1fdda025 --- /dev/null +++ b/spec/combustion_helper.rb @@ -0,0 +1,33 @@ +# frozen_string_literal: true + +require "combustion" + +# Initialize Combustion with minimal Rails components +Combustion.path = "spec/internal" + +Combustion.initialize! :active_record, :action_controller do + # Configure OmniAuth middleware + config.middleware.use OmniAuth::Builder do + provider :identity, + fields: %i[name email], + model: User, + locate_conditions: ->(req) { {email: req.params.fetch("auth_key", req.params["email"])} } + end + + # Session configuration + config.session_store :cookie_store, key: "_rails_identity_test_session" + config.secret_key_base = "9KHEBcgxHpoZhjQ3j8p2OKSS5oYBlMBDsO2khkc78LPPGErlr9HKrAhfwpP8l2UI" + + # Additional test configuration + config.eager_load = false + config.cache_classes = true + config.consider_all_requests_local = true + config.action_controller.allow_forgery_protection = false + config.active_support.deprecation = :stderr +end + +# Ensure database schema is loaded +# Combustion should handle this automatically, but we'll be explicit +if ActiveRecord::Base.connection.tables.empty? + load File.expand_path("internal/db/schema.rb", __dir__) +end diff --git a/docs/.nojekyll b/spec/dummies/.keep similarity index 100% rename from docs/.nojekyll rename to spec/dummies/.keep diff --git a/spec/dummies/hanami_app/app.rb b/spec/dummies/hanami_app/app.rb new file mode 100644 index 00000000..e6d3db6c --- /dev/null +++ b/spec/dummies/hanami_app/app.rb @@ -0,0 +1,68 @@ +# frozen_string_literal: true + +require "json" +require "rack" +require "omniauth" +require "omniauth/identity" + +require_relative "models/hanami_identity" + +module Dummy + # Simple Rack-based app that mimics Hanami structure + # Using plain Rack for simplicity since Hanami 2.x full setup is complex + class HanamiApp + def initialize + @app = Rack::Builder.new do + # Session middleware + use Rack::Session::Cookie, + secret: ENV.fetch("HANAMI_SESSION_SECRET", "test_secret_key_for_hanami_integration_testing_omniauth_identity_min_64_chars"), + key: "hanami.session" + + # OmniAuth middleware + use OmniAuth::Builder do + provider :identity, + fields: %i[name email], + model: HanamiIdentity, + locate_conditions: ->(req) { {email: req.params.fetch("auth_key", req.params["email"])} } + end + + # Main app + run ->(env) { + request = Rack::Request.new(env) + path = request.path_info + method = request.request_method + + case [method, path] + when ["GET", "/"] + [200, {"Content-Type" => "text/plain"}, ["Hanami Dummy App"]] + + when ["GET", "/health"] + [200, {"Content-Type" => "text/plain"}, ["ok"]] + + when ["GET", "/auth/identity/callback"], ["POST", "/auth/identity/callback"] + # OmniAuth callback success + auth = env["omniauth.auth"] + [200, {"Content-Type" => "application/json"}, [JSON.generate({provider: "identity", uid: auth&.fetch("uid", nil)})]] + + when ["GET", "/auth/failure"] + # OmniAuth failure + [401, {"Content-Type" => "application/json"}, [JSON.generate({error: request.params[:message] || "failure"})]] + + else + [404, {"Content-Type" => "text/plain"}, ["Not Found"]] + end + } + end + end + + def call(env) + @app.call(env) + end + end +end + +if ENV.fetch("DEBUG", "false").casecmp("true").zero? + puts "=== HANAMI APP LOADED ===" + puts "HanamiIdentity: #{HanamiIdentity}" + puts "=======================" +end diff --git a/spec/dummies/hanami_app/models/hanami_identity.rb b/spec/dummies/hanami_app/models/hanami_identity.rb new file mode 100644 index 00000000..0f84e046 --- /dev/null +++ b/spec/dummies/hanami_app/models/hanami_identity.rb @@ -0,0 +1,119 @@ +# frozen_string_literal: true + +require "rom" +require "rom-sql" +require "bcrypt" +require "sequel" +require "omniauth/identity/models/rom" + +# Set up database connection +HANAMI_ROM_DB = Sequel.connect("sqlite::memory:") + +# Create the identities table +HANAMI_ROM_DB.create_table?(:hanami_identities) do + primary_key :id + String :name, null: false + String :email, null: false, unique: true + String :password_digest, null: false + Time :created_at, null: false + Time :updated_at, null: false +end + +# Define the ROM relation class +class HanamiIdentities < ROM::Relation[:sql] + schema(:hanami_identities, infer: true) do + attribute :id, ROM::SQL::Types::Serial + attribute :name, ROM::SQL::Types::String + attribute :email, ROM::SQL::Types::String + attribute :password_digest, ROM::SQL::Types::String + attribute :created_at, ROM::SQL::Types::Time + attribute :updated_at, ROM::SQL::Types::Time + end + + auto_struct true +end + +# Set up ROM container +HANAMI_ROM_CONFIG = ROM::Configuration.new(:sql, HANAMI_ROM_DB) +HANAMI_ROM_CONFIG.register_relation(HanamiIdentities) +HANAMI_ROM_CONTAINER = ROM.container(HANAMI_ROM_CONFIG) + +# HanamiIdentity class using ROM adapter +class HanamiIdentity + include OmniAuth::Identity::Models::Rom + + # Configure ROM + rom_container HANAMI_ROM_CONTAINER + rom_relation_name :hanami_identities + password_field :password_digest + auth_key :email + + class << self + # Create a new identity + # Returns the created identity on success, or an unpersisted identity on failure + def create(attributes) + # Validate required fields + unless attributes[:name] && !attributes[:name].to_s.strip.empty? + return new_unpersisted(attributes.merge(password_digest: nil)) + end + + unless attributes[:email] && !attributes[:email].to_s.strip.empty? + return new_unpersisted(attributes.merge(password_digest: nil)) + end + + unless attributes[:password] && !attributes[:password].to_s.strip.empty? + return new_unpersisted(attributes.merge(password_digest: nil)) + end + + # Validate password confirmation matches + if attributes[:password_confirmation] && attributes[:password] != attributes[:password_confirmation] + return new_unpersisted(attributes.merge(password_digest: nil)) + end + + # Hash password + attributes[:password_digest] = BCrypt::Password.create(attributes[:password]) + attributes.delete(:password) + attributes.delete(:password_confirmation) + + # Add timestamps + now = Time.now + attributes[:created_at] ||= now + attributes[:updated_at] ||= now + + # Insert directly via Sequel for simplicity + begin + HANAMI_ROM_DB[:hanami_identities].insert(attributes) + # Fetch and return the created identity + locate(email: attributes[:email]) + rescue Sequel::UniqueConstraintViolation, Sequel::ConstraintViolation + # Return an unpersisted identity on validation failure + # This allows the strategy to detect the failure via persisted? => false + new_unpersisted(attributes) + end + end + + # Create an unpersisted identity (for validation failures) + def new_unpersisted(attributes) + identity_data = { + id: nil, + name: attributes[:name], + email: attributes[:email], + password_digest: attributes[:password_digest], + created_at: attributes[:created_at], + updated_at: attributes[:updated_at], + } + new(identity_data) + end + + # Ready the database (for compatibility with other adapters) + def ready!(_db = nil) + # ROM is already initialized, nothing to do + true + end + + # Clear all identities (for testing) + def delete_all + HANAMI_ROM_DB[:hanami_identities].delete + end + end +end diff --git a/spec/dummies/roda_app/app.rb b/spec/dummies/roda_app/app.rb new file mode 100644 index 00000000..b05e8cf9 --- /dev/null +++ b/spec/dummies/roda_app/app.rb @@ -0,0 +1,68 @@ +# frozen_string_literal: true + +require "json" +require "roda" +require "omniauth" +require "omniauth/identity" + +require_relative "models/roda_identity" + +module Dummy + class RodaApp < Roda + # Use Rack::Session::Cookie for OmniAuth compatibility + use Rack::Session::Cookie, + secret: ENV.fetch("RODA_SESSION_SECRET", "test_secret_key_for_roda_integration_testing_omniauth_identity_min_64_chars"), + key: "roda.session" + + # OmniAuth middleware + use OmniAuth::Builder do + provider :identity, + fields: %i[name email], + model: RodaIdentity, + locate_conditions: ->(req) { {email: req.params.fetch("auth_key", req.params["email"])} } + end + + route do |r| + # Root endpoint + r.root do + "Roda Dummy App" + end + + # Health check + r.get "health" do + "ok" + end + + # Auth routes + r.on "auth" do + # OmniAuth callback success endpoint + r.on String do |provider| + r.get "callback" do + auth = request.env["omniauth.auth"] + response["Content-Type"] = "application/json" + JSON.generate({provider: provider, uid: auth&.fetch("uid", nil)}) + end + + r.post "callback" do + auth = request.env["omniauth.auth"] + response["Content-Type"] = "application/json" + JSON.generate({provider: provider, uid: auth&.fetch("uid", nil)}) + end + end + + # OmniAuth failure endpoint + r.get "failure" do + response.status = 401 + response["Content-Type"] = "application/json" + JSON.generate({error: request.params[:message] || "failure"}) + end + end + end + end +end + +if ENV.fetch("DEBUG", "false").casecmp("true").zero? + puts "=== RODA APP LOADED ===" + puts "Middleware: #{Dummy::RodaApp.opts[:middleware]&.inspect}" + puts "=======================" +end diff --git a/spec/dummies/roda_app/models/roda_identity.rb b/spec/dummies/roda_app/models/roda_identity.rb new file mode 100644 index 00000000..0b30e2be --- /dev/null +++ b/spec/dummies/roda_app/models/roda_identity.rb @@ -0,0 +1,119 @@ +# frozen_string_literal: true + +require "rom" +require "rom-sql" +require "bcrypt" +require "sequel" +require "omniauth/identity/models/rom" + +# Set up database connection +RODA_ROM_DB = Sequel.connect("sqlite::memory:") + +# Create the identities table +RODA_ROM_DB.create_table?(:roda_identities) do + primary_key :id + String :name, null: false + String :email, null: false, unique: true + String :password_digest, null: false + Time :created_at, null: false + Time :updated_at, null: false +end + +# Define the ROM relation class +class RodaIdentities < ROM::Relation[:sql] + schema(:roda_identities, infer: true) do + attribute :id, ROM::SQL::Types::Serial + attribute :name, ROM::SQL::Types::String + attribute :email, ROM::SQL::Types::String + attribute :password_digest, ROM::SQL::Types::String + attribute :created_at, ROM::SQL::Types::Time + attribute :updated_at, ROM::SQL::Types::Time + end + + auto_struct true +end + +# Set up ROM container +RODA_ROM_CONFIG = ROM::Configuration.new(:sql, RODA_ROM_DB) +RODA_ROM_CONFIG.register_relation(RodaIdentities) +RODA_ROM_CONTAINER = ROM.container(RODA_ROM_CONFIG) + +# RodaIdentity class using ROM adapter +class RodaIdentity + include OmniAuth::Identity::Models::Rom + + # Configure ROM + rom_container RODA_ROM_CONTAINER + rom_relation_name :roda_identities + password_field :password_digest + auth_key :email + + class << self + # Create a new identity + # Returns the created identity on success, or an unpersisted identity on failure + def create(attributes) + # Validate required fields + unless attributes[:name] && !attributes[:name].to_s.strip.empty? + return new_unpersisted(attributes.merge(password_digest: nil)) + end + + unless attributes[:email] && !attributes[:email].to_s.strip.empty? + return new_unpersisted(attributes.merge(password_digest: nil)) + end + + unless attributes[:password] && !attributes[:password].to_s.strip.empty? + return new_unpersisted(attributes.merge(password_digest: nil)) + end + + # Validate password confirmation matches + if attributes[:password_confirmation] && attributes[:password] != attributes[:password_confirmation] + return new_unpersisted(attributes.merge(password_digest: nil)) + end + + # Hash password + attributes[:password_digest] = BCrypt::Password.create(attributes[:password]) + attributes.delete(:password) + attributes.delete(:password_confirmation) + + # Add timestamps + now = Time.now + attributes[:created_at] ||= now + attributes[:updated_at] ||= now + + # Insert directly via Sequel for simplicity + begin + RODA_ROM_DB[:roda_identities].insert(attributes) + # Fetch and return the created identity + locate(email: attributes[:email]) + rescue Sequel::UniqueConstraintViolation, Sequel::ConstraintViolation + # Return an unpersisted identity on validation failure + # This allows the strategy to detect the failure via persisted? => false + new_unpersisted(attributes) + end + end + + # Create an unpersisted identity (for validation failures) + def new_unpersisted(attributes) + identity_data = { + id: nil, + name: attributes[:name], + email: attributes[:email], + password_digest: attributes[:password_digest], + created_at: attributes[:created_at], + updated_at: attributes[:updated_at], + } + new(identity_data) + end + + # Ready the database (for compatibility with other adapters) + def ready!(_db = nil) + # ROM is already initialized, nothing to do + true + end + + # Clear all identities (for testing) + def delete_all + RODA_ROM_DB[:roda_identities].delete + end + end +end diff --git a/spec/dummies/sinatra_app/app.rb b/spec/dummies/sinatra_app/app.rb new file mode 100644 index 00000000..cc2f7011 --- /dev/null +++ b/spec/dummies/sinatra_app/app.rb @@ -0,0 +1,65 @@ +# frozen_string_literal: true + +require "json" +require "sinatra/base" +require "omniauth" +require "omniauth/identity" + +require_relative "models/identity" + +module Dummy + class App < Sinatra::Base + # Use Rack::Session::Cookie instead of Sinatra's built-in sessions + use Rack::Session::Cookie, secret: ENV.fetch( + "SINATRA_SESSION_SECRET", + "aRM1uGVWoh6Rx14Gc4XGmzhV8FehJNqZ2VjEe386BlZjv4hicoifs7804uPfWsxI", + ) + configure :test, :development, :production do + set :host_authorization, {permitted_hosts: []} + + use OmniAuth::Builder do + provider :identity, + fields: %i[name email], + locate_conditions: ->(req) { {email: req.params.fetch("auth_key", req.params["email"])} } + end + end + + helpers do + def json_response(payload, status: 200) + content_type :json + halt status, JSON.generate(payload) + end + end + + get "/" do + "Sinatra Dummy App" + end + + get "/health" do + "ok" + end + + # OmniAuth callback success endpoint + get "/auth/:provider/callback" do + auth = request.env["omniauth.auth"] + json_response({provider: params[:provider], uid: auth&.fetch("uid", nil)}) + end + + post "/auth/:provider/callback" do + auth = request.env["omniauth.auth"] + json_response({provider: params[:provider], uid: auth&.fetch("uid", nil)}) + end + + get "/auth/failure" do + json_response({error: params[:message] || "failure"}, status: 401) + end + end +end + +if ENV.fetch("DEBUG", "false").casecmp("true").zero? + puts "=== MIDDLEWARE START ===" + Dummy::App.middleware.each do |middleware| + puts middleware.inspect + end + puts "=== MIDDLEWARE END ===" +end diff --git a/spec/dummies/sinatra_app/config.ru b/spec/dummies/sinatra_app/config.ru new file mode 100644 index 00000000..105b2689 --- /dev/null +++ b/spec/dummies/sinatra_app/config.ru @@ -0,0 +1,6 @@ +# frozen_string_literal: true + +require_relative "../../integration/spec_helper" +require_relative "app" + +run Dummy::App diff --git a/spec/dummies/sinatra_app/db/migrate/001_create_identities.rb b/spec/dummies/sinatra_app/db/migrate/001_create_identities.rb new file mode 100644 index 00000000..edc89fb9 --- /dev/null +++ b/spec/dummies/sinatra_app/db/migrate/001_create_identities.rb @@ -0,0 +1,14 @@ +# frozen_string_literal: true + +Sequel.migration do + change do + create_table(:identities) do + primary_key :id + String :name, null: false + String :email, null: false, unique: true + String :password_digest, null: false + DateTime :created_at, null: false, default: Sequel::CURRENT_TIMESTAMP + DateTime :updated_at, null: false, default: Sequel::CURRENT_TIMESTAMP + end + end +end diff --git a/spec/dummies/sinatra_app/models/identity.rb b/spec/dummies/sinatra_app/models/identity.rb new file mode 100644 index 00000000..49e129de --- /dev/null +++ b/spec/dummies/sinatra_app/models/identity.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true + +require "sequel" +require "omniauth/identity/models/sequel" + +BOOTSTRAP_DB = Sequel.sqlite +BOOTSTRAP_DB.create_table?(:identities) do + primary_key :id + String :name + String :email + String :password_digest + DateTime :created_at + DateTime :updated_at +end + +class Identity < Sequel::Model(BOOTSTRAP_DB[:identities]) + include OmniAuth::Identity::Models::Sequel + + plugin :timestamps, update_on_create: true + + auth_key :email + + def self.ready!(db) + self.dataset = db[:identities] + end +end diff --git a/spec/integration/README.md b/spec/integration/README.md new file mode 100644 index 00000000..7e48333a --- /dev/null +++ b/spec/integration/README.md @@ -0,0 +1,103 @@ +# Integration Tests + +This directory contains integration tests that verify omniauth-identity works correctly within actual web application frameworks. + +## Structure + +- `spec/integration/*_spec.rb` - Integration test specs +- `spec/dummies/` - Minimal dummy Sinatra, Roda, and Hanami applications for testing +- `spec/internal/` - Minimal dummy Rails application for testing + +## Frameworks Tested + +1. **Sinatra + Sequel** - Minimal framework with lightweight ORM +2. **Roda + ROM** - Modern minimal stack with Ruby Object Mapper +3. **Hanami + ROM** - Full-featured modern framework with Ruby Object Mapper +4. **Rails + ActiveRecord** (via Combustion) - Want to build a blog in 15 minutes? + +## Running Tests + +All integration tests run exclusively on the current Ruby release, which is v3.4 as of November 2025. + +```bash +# Run all integration tests +bundle exec rspec spec/integration + +# Run specific framework +bundle exec rspec spec/integration/sinatra_spec.rb +bundle exec rspec spec/integration/roda_spec.rb +bundle exec rspec spec/integration/hanami_spec.rb +bundle exec rspec spec/integration/rails_spec.rb + +# Run with specific appraisal +bundle exec appraisal rom-r3 rspec spec/integration/roda_spec.rb +bundle exec appraisal rom-r3 rspec spec/integration/hanami_spec.rb +bundle exec appraisal ar-7-2 rspec spec/integration/rails_spec.rb +bundle exec appraisal ar-8-0 rspec spec/integration/rails_spec.rb +``` + +## Framework-Specific Notes + +### Roda + ROM + +**Requirements**: latest version of Ruby, ROM 5.x, ROM-SQL 3.x + +The Roda integration demonstrates: +- ROM's data mapper pattern (vs. ActiveRecord's active record pattern) +- Roda's plugin-based architecture +- In-memory SQLite database for testing +- ROM relations and repositories + +**Files**: +- `spec/integration/roda_spec.rb` - Integration tests +- `spec/dummies/roda_app/app.rb` - Roda application +- `spec/dummies/roda_app/models/roda_identity.rb` - ROM-based identity model + +Automatically skips tests on older-than-current ruby. + +### Hanami + ROM + +**Requirements**: latest version of Ruby, ROM 5.x, Hanami 2.x + +The Hanami integration demonstrates: +- Full-featured modern Ruby framework +- ROM as native data layer +- Clean architecture patterns +- In-memory SQLite database for testing + +**Files**: +- `spec/integration/hanami_spec.rb` - Integration tests +- `spec/dummies/hanami_app/app.rb` - Hanami application (Rack-based for simplicity) +- `spec/dummies/hanami_app/models/hanami_identity.rb` - ROM-based identity model + +Automatically skips tests on older-than-current ruby. + +### Rails + ActiveRecord + +**Requirements**: latest version of Ruby, Rails 7.2+ + +The Rails integration demonstrates: +- Most common production use case +- ActiveRecord ORM (Rails default) +- Combustion for minimal Rails setup +- In-memory SQLite database for testing +- has_secure_password integration + +**Files**: +- `spec/integration/rails_spec.rb` - Integration tests +- `spec/internal/` - Combustion Rails app structure + - `config/routes.rb` - Rails routes + - `config/database.yml` - Database configuration + - `db/schema.rb` - Database schema + - `app/models/user.rb` - ActiveRecord User model + - `app/controllers/sessions_controller.rb` - Auth callbacks +- `spec/support/combustion_helper.rb` - Combustion initialization + +Combustion automatically adapts to the Rails version being tested. +Integration tests run against Rails 7.2, 8.0, and 8.1. + +## Notes + +- Integration gemfile uses `require: false` to prevent auto-loading +- Each test will explicitly require only the framework it needs + diff --git a/spec/integration/hanami_spec.rb b/spec/integration/hanami_spec.rb new file mode 100644 index 00000000..e9c1508a --- /dev/null +++ b/spec/integration/hanami_spec.rb @@ -0,0 +1,164 @@ +# frozen_string_literal: true + +# Only run on latest Ruby +if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new("3.4.0") + require "integration_helper" + require "rom" + require "rom-sql" + + require_relative "../dummies/hanami_app/app" + + RSpec.describe "Hanami Integration", :integration, integration_framework: :hanami do + include Rack::Test::Methods + + def app + Rack::Builder.new do + run Dummy::HanamiApp.new + end + end + + before do + # Set OmniAuth config for integration tests only + OmniAuth.config.logger = OmniAuthIdentity::IntegrationLogger.for(:hanami) + OmniAuth.config.allowed_request_methods = %i[get post] + OmniAuth.config.silence_get_warning = true + + OmniAuth.config.on_failure = ->(env) { + OmniAuth::FailureEndpoint.new(env).call + } + + OmniAuth::Strategies::Identity.option :on_failed_registration, lambda { |_env| + Rack::Response.new(["Registration failed"], 422, {}).finish + } + + # Clear the identities table before each test + HanamiIdentity.delete_all + end + + it_behaves_like "omniauth identity integration", "hanami" + + describe "ROM-specific features" do + it "uses ROM container and relations" do + # Verify ROM container is properly configured + expect(HANAMI_ROM_CONTAINER).to be_a(ROM::Container) + expect(HANAMI_ROM_CONTAINER.relations[:hanami_identities]).not_to be_nil + end + + it "creates identities with ROM commands" do + identity = HanamiIdentity.create( + name: "ROM Test", + email: "rom@example.com", + password: "test_password_123", + password_confirmation: "test_password_123", + ) + + expect(identity).to be_a(HanamiIdentity) + expect(identity.name).to eq("ROM Test") + expect(identity.email).to eq("rom@example.com") + expect(identity.uid).not_to be_nil + end + + it "locates identities through ROM adapter" do + HanamiIdentity.create( + name: "Locate Test", + email: "locate@example.com", + password: "test_password_123", + password_confirmation: "test_password_123", + ) + + identity = HanamiIdentity.locate(email: "locate@example.com") + expect(identity).to be_a(HanamiIdentity) + expect(identity.name).to eq("Locate Test") + expect(identity.email).to eq("locate@example.com") + end + + it "authenticates identities with BCrypt" do + HanamiIdentity.create( + name: "Auth Test", + email: "auth@example.com", + password: "test_password_123", + password_confirmation: "test_password_123", + ) + + identity = HanamiIdentity.locate(email: "auth@example.com") + expect(identity.authenticate("test_password_123")).to be_truthy + expect(identity.authenticate("wrong_password")).to be_falsey + end + + it "stores timestamps" do + identity = HanamiIdentity.create( + name: "Timestamp Test", + email: "timestamp@example.com", + password: "test_password_123", + password_confirmation: "test_password_123", + ) + + expect(identity[:created_at]).to be_a(Time) + expect(identity[:updated_at]).to be_a(Time) + expect(identity[:created_at]).to be_within(1).of(Time.now) + end + + it "enforces unique email constraint" do + HanamiIdentity.create( + name: "First User", + email: "duplicate@example.com", + password: "password123", + password_confirmation: "password123", + ) + + duplicate = HanamiIdentity.create( + name: "Second User", + email: "duplicate@example.com", + password: "password456", + password_confirmation: "password456", + ) + + expect(duplicate.persisted?).to be false + end + end + + describe "Hanami routing" do + it "handles root route" do + get "/" + expect(last_response).to be_ok + expect(last_response.body).to eq("Hanami Dummy App") + end + + it "handles health check" do + get "/health" + expect(last_response).to be_ok + expect(last_response.body).to eq("ok") + end + + it "handles auth callback routes with JSON responses" do + HanamiIdentity.create( + name: "Callback Test", + email: "callback@example.com", + password: "test_password_123", + password_confirmation: "test_password_123", + ) + + post "/auth/identity/callback", + { + auth_key: "callback@example.com", + password: "test_password_123", + }, + {"HTTP_HOST" => "example.org", "rack.url_scheme" => "http"} + + follow_redirect! if last_response.redirect? + + if last_response.status == 200 + body = JSON.parse(last_response.body) + expect(body["provider"]).to eq("identity") + expect(body["uid"]).not_to be_nil + end + end + end + end +else + RSpec.describe "Hanami Integration", :integration, integration_framework: :hanami do + it "skips tests on Ruby < 3.4" do + skip "Hanami integration tests run on latest ruby only, current version: #{RUBY_VERSION}" + end + end +end diff --git a/spec/integration/rails_spec.rb b/spec/integration/rails_spec.rb new file mode 100644 index 00000000..cc101e51 --- /dev/null +++ b/spec/integration/rails_spec.rb @@ -0,0 +1,166 @@ +# frozen_string_literal: true + +# Only run on latest Ruby +if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new("3.4.0") + require "integration_helper" + require "combustion_helper" + + RSpec.describe "Rails Integration", :integration, integration_framework: :rails do + include Rack::Test::Methods + + def app + Rails.application + end + + before do + # Set OmniAuth config for integration tests only + OmniAuth.config.logger = OmniAuthIdentity::IntegrationLogger.for(:rails) + OmniAuth.config.allowed_request_methods = %i[get post] + OmniAuth.config.silence_get_warning = true + + OmniAuth.config.on_failure = ->(env) { + OmniAuth::FailureEndpoint.new(env).call + } + + OmniAuth::Strategies::Identity.option :on_failed_registration, lambda { |_env| + Rack::Response.new(["Registration failed"], 422, {}).finish + } + + # Clear database before each test + User.delete_all + end + + it_behaves_like "omniauth identity integration", "rails" + + describe "Rails-specific features" do + it "loads Rails successfully" do + expect(Rails.application).to be_a(Rails::Application) + expect(Rails.env).to eq("test") + end + + it "has ActiveRecord configured" do + expect(ActiveRecord::Base.connection).to be_active + end + + it "has User model with OmniAuth::Identity" do + expect(User.ancestors).to include(OmniAuth::Identity::Models::ActiveRecord) + end + + it "responds to root route" do + get "/" + expect(last_response).to be_ok + expect(last_response.body).to eq("Rails Identity Test App") + end + + it "creates users with ActiveRecord" do + user = User.create!( + name: "ActiveRecord Test", + email: "ar@example.com", + password: "test_password_123", + password_confirmation: "test_password_123", + ) + + expect(user).to be_persisted + expect(user.id).not_to be_nil + expect(user.name).to eq("ActiveRecord Test") + expect(user.email).to eq("ar@example.com") + end + + it "locates users through ActiveRecord" do + User.create!( + name: "Locate Test", + email: "locate@example.com", + password: "test_password_123", + password_confirmation: "test_password_123", + ) + + user = User.find_by(email: "locate@example.com") + expect(user).not_to be_nil + expect(user.name).to eq("Locate Test") + end + + it "authenticates users with has_secure_password" do + User.create!( + name: "Auth Test", + email: "auth@example.com", + password: "test_password_123", + password_confirmation: "test_password_123", + ) + + user = User.find_by(email: "auth@example.com") + expect(user.authenticate("test_password_123")).to be_truthy + expect(user.authenticate("wrong_password")).to be_falsey + end + + it "enforces unique email with validation" do + User.create!( + name: "First User", + email: "unique@example.com", + password: "password123", + password_confirmation: "password123", + ) + + expect { + User.create!( + name: "Second User", + email: "unique@example.com", + password: "password456", + password_confirmation: "password456", + ) + }.to raise_error(ActiveRecord::RecordInvalid, /Email has already been taken/) + end + + it "validates required fields" do + user = User.new(email: "test@example.com") + expect(user).not_to be_valid + expect(user.errors[:name]).to include("can't be blank") + expect(user.errors[:password]).to include("can't be blank") + end + + it "stores timestamps" do + user = User.create!( + name: "Timestamp Test", + email: "timestamp@example.com", + password: "test_password_123", + password_confirmation: "test_password_123", + ) + + expect(user.created_at).to be_a(Time) + expect(user.updated_at).to be_a(Time) + expect(user.created_at).to be_within(1).of(Time.now) + end + end + + describe "Rails routing" do + it "handles auth callback with JSON response" do + User.create!( + name: "Callback Test", + email: "callback@example.com", + password: "test_password_123", + password_confirmation: "test_password_123", + ) + + post "/auth/identity/callback", + { + auth_key: "callback@example.com", + password: "test_password_123", + }, + {"HTTP_HOST" => "example.org", "rack.url_scheme" => "http"} + + follow_redirect! if last_response.redirect? + + if last_response.status == 200 + body = JSON.parse(last_response.body) + expect(body["provider"]).to eq("identity") + expect(body["uid"]).not_to be_nil + end + end + end + end +else + RSpec.describe "Rails Integration", :integration, integration_framework: :rails do + it "skips tests on Ruby < 3.4" do + skip "Rails integration tests run on latest ruby only, current version: #{RUBY_VERSION}" + end + end +end diff --git a/spec/integration/roda_spec.rb b/spec/integration/roda_spec.rb new file mode 100644 index 00000000..84a8ec32 --- /dev/null +++ b/spec/integration/roda_spec.rb @@ -0,0 +1,165 @@ +# frozen_string_literal: true + +# Only run on latest Ruby +if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new("3.4.0") + require "integration_helper" + require "roda" + require "rom" + require "rom-sql" + + require_relative "../dummies/roda_app/app" + + RSpec.describe "Roda Integration", :integration, integration_framework: :roda do + include Rack::Test::Methods + + def app + Rack::Builder.new do + run Dummy::RodaApp + end + end + + before do + # Set OmniAuth config for integration tests only + OmniAuth.config.logger = OmniAuthIdentity::IntegrationLogger.for(:roda) + OmniAuth.config.allowed_request_methods = %i[get post] + OmniAuth.config.silence_get_warning = true + + OmniAuth.config.on_failure = ->(env) { + OmniAuth::FailureEndpoint.new(env).call + } + + OmniAuth::Strategies::Identity.option :on_failed_registration, lambda { |env| + Rack::Response.new(["Registration failed"], 422, {}).finish + } + + # Clear the identities table before each test + RodaIdentity.delete_all + end + + it_behaves_like "omniauth identity integration", "roda" + + describe "ROM-specific features" do + it "uses ROM container and relations" do + # Verify ROM container is properly configured + expect(RODA_ROM_CONTAINER).to be_a(ROM::Container) + expect(RODA_ROM_CONTAINER.relations[:roda_identities]).not_to be_nil + end + + it "creates identities with ROM commands" do + identity = RodaIdentity.create( + name: "ROM Test", + email: "rom@example.com", + password: "test_password_123", + password_confirmation: "test_password_123", + ) + + expect(identity).to be_a(RodaIdentity) + expect(identity.name).to eq("ROM Test") + expect(identity.email).to eq("rom@example.com") + expect(identity.uid).not_to be_nil + end + + it "locates identities through ROM adapter" do + RodaIdentity.create( + name: "Locate Test", + email: "locate@example.com", + password: "test_password_123", + password_confirmation: "test_password_123", + ) + + identity = RodaIdentity.locate(email: "locate@example.com") + expect(identity).to be_a(RodaIdentity) + expect(identity.name).to eq("Locate Test") + expect(identity.email).to eq("locate@example.com") + end + + it "authenticates identities with BCrypt" do + RodaIdentity.create( + name: "Auth Test", + email: "auth@example.com", + password: "test_password_123", + password_confirmation: "test_password_123", + ) + + identity = RodaIdentity.locate(email: "auth@example.com") + expect(identity.authenticate("test_password_123")).to be_truthy + expect(identity.authenticate("wrong_password")).to be_falsey + end + + it "stores timestamps" do + identity = RodaIdentity.create( + name: "Timestamp Test", + email: "timestamp@example.com", + password: "test_password_123", + password_confirmation: "test_password_123", + ) + + expect(identity[:created_at]).to be_a(Time) + expect(identity[:updated_at]).to be_a(Time) + expect(identity[:created_at]).to be_within(1).of(Time.now) + end + + it "enforces unique email constraint" do + RodaIdentity.create( + name: "First User", + email: "duplicate@example.com", + password: "password123", + password_confirmation: "password123", + ) + + duplicate = RodaIdentity.create( + name: "Second User", + email: "duplicate@example.com", + password: "password456", + password_confirmation: "password456", + ) + + expect(duplicate.persisted?).to be false + end + end + + describe "Roda routing" do + it "handles root route" do + get "/" + expect(last_response).to be_ok + expect(last_response.body).to eq("Roda Dummy App") + end + + it "handles health check" do + get "/health" + expect(last_response).to be_ok + expect(last_response.body).to eq("ok") + end + + it "handles auth callback routes with JSON responses" do + RodaIdentity.create( + name: "Callback Test", + email: "callback@example.com", + password: "test_password_123", + password_confirmation: "test_password_123", + ) + + post "/auth/identity/callback", + { + auth_key: "callback@example.com", + password: "test_password_123", + }, + {"HTTP_HOST" => "example.org", "rack.url_scheme" => "http"} + + follow_redirect! if last_response.redirect? + + if last_response.status == 200 + body = JSON.parse(last_response.body) + expect(body["provider"]).to eq("identity") + expect(body["uid"]).not_to be_nil + end + end + end + end +else + RSpec.describe "Roda Integration", :integration, integration_framework: :roda do + it "skips tests on Ruby < 3.4" do + skip "Roda integration tests run on latest ruby only, current version: #{RUBY_VERSION}" + end + end +end diff --git a/spec/integration/sinatra_spec.rb b/spec/integration/sinatra_spec.rb new file mode 100644 index 00000000..7cb9259f --- /dev/null +++ b/spec/integration/sinatra_spec.rb @@ -0,0 +1,40 @@ +# frozen_string_literal: true + +# Only run on latest Ruby +if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new("3.4.0") + require "integration_helper" + require_relative "../dummies/sinatra_app/app" + + RSpec.describe "Sinatra Integration", :integration, integration_framework: :sinatra do + include Rack::Test::Methods + + def app + Rack::Builder.new do + run Dummy::App + end + end + + before do + # Set OmniAuth config for integration tests only + OmniAuth.config.logger = OmniAuthIdentity::IntegrationLogger.for(:sinatra) + OmniAuth.config.allowed_request_methods = %i[get post] + OmniAuth.config.silence_get_warning = true + + OmniAuth.config.on_failure = ->(env) { + OmniAuth::FailureEndpoint.new(env).call + } + + OmniAuth::Strategies::Identity.option :on_failed_registration, lambda { |env| + Rack::Response.new(["Registration failed"], 422, {}).finish + } + end + + it_behaves_like "omniauth identity integration", "sinatra" + end +else + RSpec.describe "Sinatra Integration", :integration, integration_framework: :sinatra do + it "skips tests on Ruby < 3.4" do + skip "Sinatra integration tests run on latest ruby only, current version: #{RUBY_VERSION}" + end + end +end diff --git a/spec/integration_helper.rb b/spec/integration_helper.rb new file mode 100644 index 00000000..f0584f6f --- /dev/null +++ b/spec/integration_helper.rb @@ -0,0 +1,29 @@ +# frozen_string_literal: true + +# DO NOT load the main spec_helper for base configuration, +# because it is always loaded first, by .rspec +# require_relative "../spec_helper" + +# Load Capybara for browser-based tests +require "capybara/rspec" +require "capybara/dsl" + +require_relative "support/shared_examples/integration" +require_relative "support/integration_helpers" + +RSpec.configure do |config| + config.include Rack::Test::Methods + config.include Capybara::DSL, type: :feature + + # Tag all integration tests + config.define_derived_metadata(file_path: %r{/spec/integration/}) do |metadata| + metadata[:type] = :integration + metadata[:integration] = true + end + + # Configure Capybara + Capybara.configure do |capybara_config| + capybara_config.default_driver = :rack_test + capybara_config.app_host = "http://example.org" + end +end diff --git a/spec/internal/app/controllers/sessions_controller.rb b/spec/internal/app/controllers/sessions_controller.rb new file mode 100644 index 00000000..0d5fc361 --- /dev/null +++ b/spec/internal/app/controllers/sessions_controller.rb @@ -0,0 +1,14 @@ +# frozen_string_literal: true + +class SessionsController < ActionController::Base + # OmniAuth callback - successful authentication + def create + auth = request.env["omniauth.auth"] + render json: {provider: auth["provider"], uid: auth["uid"]}, status: :ok + end + + # OmniAuth failure + def failure + render json: {error: params[:message] || "failure"}, status: :unauthorized + end +end diff --git a/spec/internal/app/models/user.rb b/spec/internal/app/models/user.rb new file mode 100644 index 00000000..5afec064 --- /dev/null +++ b/spec/internal/app/models/user.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +require "omniauth/identity/models/active_record" + +class User < OmniAuth::Identity::Models::ActiveRecord + # OmniAuth::Identity configuration + auth_key :email + + # ActiveRecord validations (in addition to those from has_secure_password) + validates :name, presence: true + validates :email, presence: true, uniqueness: true +end diff --git a/spec/internal/config/database.yml b/spec/internal/config/database.yml new file mode 100644 index 00000000..f3e948ad --- /dev/null +++ b/spec/internal/config/database.yml @@ -0,0 +1,7 @@ +# Combustion test database configuration +test: + adapter: sqlite3 + database: ":memory:" + pool: 5 + timeout: 5000 + diff --git a/spec/internal/config/routes.rb b/spec/internal/config/routes.rb new file mode 100644 index 00000000..cf98e6ca --- /dev/null +++ b/spec/internal/config/routes.rb @@ -0,0 +1,11 @@ +# frozen_string_literal: true + +Rails.application.routes.draw do + # Root route + root to: proc { [200, {"Content-Type" => "text/plain"}, ["Rails Identity Test App"]] } + + # OmniAuth callback routes + get "/auth/:provider/callback", to: "sessions#create" + post "/auth/:provider/callback", to: "sessions#create" + get "/auth/failure", to: "sessions#failure" +end diff --git a/spec/internal/db/schema.rb b/spec/internal/db/schema.rb new file mode 100644 index 00000000..81e62982 --- /dev/null +++ b/spec/internal/db/schema.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +ActiveRecord::Schema.define do + create_table :users, force: true do |t| + t.string :name, null: false + t.string :email, null: false + t.string :password_digest, null: false + t.timestamps null: false + end + + add_index :users, :email, unique: true +end diff --git a/spec/omniauth/strategies/identity_spec.rb b/spec/omniauth/strategies/identity_spec.rb index e3849680..add0a29a 100644 --- a/spec/omniauth/strategies/identity_spec.rb +++ b/spec/omniauth/strategies/identity_spec.rb @@ -30,7 +30,7 @@ def app opts = identity_options.reverse_merge({model: anon_ar}) script_name = app_options[:script_name] self.app = Rack::Builder.app do - use Rack::Session::Cookie, secret: "1234567890qwertyuiop" + use Rack::Session::Cookie, secret: "3bkbV2Ri9HtbcB2kNCOFeXacJI9Xury6b6NjaYrVhOHrbQYp2IPbfdXb7LqR2T8Z" if script_name map script_name do use OmniAuth::Strategies::Identity, opts diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index bc7fc5a5..591ec7b9 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -21,6 +21,11 @@ require "omniauth" require "omniauth/version" +begin + require "rack/session" +rescue LoadError +end + # RSpec Configs require "config/debug" require "config/omniauth" diff --git a/spec/support/integration_helpers.rb b/spec/support/integration_helpers.rb new file mode 100644 index 00000000..7f53ee01 --- /dev/null +++ b/spec/support/integration_helpers.rb @@ -0,0 +1,252 @@ +# frozen_string_literal: true + +require "fileutils" +require "pathname" +require "time" +require "logger" + +require "sequel" +require "sequel/extensions/migration" + +module OmniAuthIdentity + module IntegrationLogger + module_function + + class NullLogger + def initialize + severity_constants.each do |severity| + severity_name = severity.to_s.downcase + define_singleton_method(severity_name) { |_msg = nil| nil } + define_singleton_method("#{severity_name}?") { false } + end + end + + def add(*_args) + end + + def method_missing(*_args, &_block) + end + + def respond_to_missing?(*_args) + true + end + + private + + def severity_constants + defined?(Logger::Severity) ? Logger::Severity.constants : [] + end + end + + LoggerState = Struct.new(:loggers, :log_level_cache, :mutex) + NULL_LOGGER = NullLogger.new + + def state + @state ||= LoggerState.new({}, {}, Mutex.new) + end + + def for(framework) + level = log_level + st = state + st.mutex.synchronize do + st.loggers[framework] ||= build_logger(framework, level) + end + end + + def build_logger(framework, level = log_level) + return NULL_LOGGER if level.nil? + + Logger.new($stdout).tap do |logger| + logger.level = level + logger.progname = "integration:#{framework}" + logger.formatter = proc do |severity, datetime, progname, msg| + "[#{datetime.utc.iso8601}] #{progname} #{severity}: #{msg}\n" + end + end + end + + def log_level + st = state + level_name = ENV.fetch("INTEGRATION_LOG_LEVEL", "").strip + st.mutex.synchronize do + cache = st.log_level_cache + return cache[:value] if cache[:name] == level_name + + cache[:name] = level_name + cache[:value] = resolve_level(level_name) + end + end + + def resolve_level(level_name) + return if level_name.empty? || level_name.casecmp("off").zero? + + Logger.const_get(level_name.upcase) + rescue NameError + warn("[integration] Unknown INTEGRATION_LOG_LEVEL=#{level_name.inspect}, defaulting to off") + nil + end + end + + module IntegrationHelpers + module_function + + SPEC_ROOT = Pathname.new(File.expand_path("..", __dir__)).freeze + REPO_ROOT = SPEC_ROOT.parent.freeze + TMP_ROOT = REPO_ROOT.join("tmp").freeze + TMP_DB_ROOT = TMP_ROOT.join("db").freeze + DUMMIES_ROOT = SPEC_ROOT.join("dummies").freeze + + def integration_tmp_db_root + FileUtils.mkdir_p(TMP_DB_ROOT) + TMP_DB_ROOT + end + + def integration_database_path(framework) + integration_tmp_db_root.join("#{framework_key(framework)}.sqlite3") + end + + def integration_logger(framework) + OmniAuthIdentity::IntegrationLogger.for(framework) + end + + def framework_key(framework) + framework.to_s.downcase.to_sym + end + + def registries + @registries ||= {initializers: {}, truncators: {}} + end + + def registry_mutex + @registry_mutex ||= Mutex.new + end + + def register_database_initializer(framework, &block) + raise ArgumentError, "initializer block required" unless block + + registry_mutex.synchronize do + registries[:initializers][framework_key(framework)] = block + end + end + + def register_database_truncator(framework, &block) + registry_mutex.synchronize do + registries[:truncators][framework_key(framework)] = block + end + end + + def database_initializer(framework) + registries[:initializers][framework_key(framework)] + end + + def database_truncator(framework) + registries[:truncators][framework_key(framework)] + end + + def with_sequel_db(path) + Sequel.sqlite(path.to_s) { |db| yield db } + end + + def reset_integration_database!(framework) + path = integration_database_path(framework) + FileUtils.rm_f(path) + integration_logger(framework).info { "reset database #{path}" } + path + end + + def ensure_clean_database_for(framework) + path = reset_integration_database!(framework) + apply_framework_database_env(framework, path) + database_initializer(framework)&.call(path) + yield(path) if block_given? + ensure + truncate_database_for(framework) + end + + def apply_framework_database_env(framework, path) + case framework_key(framework) + when :sinatra + ENV["DATABASE_URL"] = path.to_s + ENV["SINATRA_DATABASE_URL"] = path.to_s + end + end + + def truncate_database_for(framework) + return unless (truncator = database_truncator(framework)) + + truncator.call(integration_database_path(framework)) + end + + def register_sinatra_hooks + migrations_path = DUMMIES_ROOT.join("sinatra_app", "db", "migrate") + + register_database_initializer(:sinatra) do |db_path| + with_sequel_db(db_path) do |db| + Sequel::Migrator.run(db, migrations_path) + Identity.ready!(db) if defined?(Identity) + end + end + + register_database_truncator(:sinatra) do |db_path| + with_sequel_db(db_path) do |db| + db.tables.reject { |table| table == :schema_info }.each { |table| db[table].truncate } + end + end + end + + def register_roda_hooks + # Roda uses in-memory ROM, so no file-based initialization needed + # Just need to clear data between tests + register_database_truncator(:roda) do |_db_path| + RodaIdentity.delete_all if defined?(RodaIdentity) + end + end + + def register_hanami_hooks + # Hanami uses in-memory ROM, so no file-based initialization needed + # Just need to clear data between tests + register_database_truncator(:hanami) do |_db_path| + HanamiIdentity.delete_all if defined?(HanamiIdentity) + end + end + + def register_rails_hooks + # Rails uses Combustion with in-memory database + # Just need to clear data between tests + register_database_truncator(:rails) do |_db_path| + User.delete_all if defined?(User) && User.respond_to?(:delete_all) + end + end + + def register_default_database_hooks + register_sinatra_hooks + register_roda_hooks + register_hanami_hooks + register_rails_hooks + end + + register_default_database_hooks + end +end + +OmniAuthIdentity::IntegrationHelpers.register_default_database_hooks + +RSpec.configure do |config| + config.include OmniAuthIdentity::IntegrationHelpers, type: :integration + + config.before(:suite) do + OmniAuthIdentity::IntegrationHelpers.integration_tmp_db_root + end + + config.around(:example, :integration_framework) do |example| + framework = example.metadata[:integration_framework] + unless framework + warn("[integration] :integration_framework metadata missing") + next example.run + end + + OmniAuthIdentity::IntegrationHelpers.ensure_clean_database_for(framework) do + example.run + end + end +end diff --git a/spec/support/omniauth.rb b/spec/support/omniauth.rb new file mode 100644 index 00000000..0cef6508 --- /dev/null +++ b/spec/support/omniauth.rb @@ -0,0 +1,16 @@ +# frozen_string_literal: true + +RSpec.configure do |config| + config.before do + # Reset OmniAuth global config to defaults + OmniAuth.config.test_mode = false + OmniAuth.config.mock_auth[:identity] = nil + OmniAuth.config.on_failure = OmniAuth::FailureEndpoint + OmniAuth.config.logger = Logger.new($stdout) + OmniAuth.config.allowed_request_methods = %i[post] + OmniAuth.config.silence_get_warning = false + + # Reset OmniAuth::Strategies::Identity strategy options to defaults + OmniAuth::Strategies::Identity.option :on_failed_registration, nil + end +end diff --git a/spec/support/shared_examples/integration.rb b/spec/support/shared_examples/integration.rb new file mode 100644 index 00000000..7608a8ba --- /dev/null +++ b/spec/support/shared_examples/integration.rb @@ -0,0 +1,247 @@ +# Shared examples for OmniAuth integration tests +RSpec.shared_examples "omniauth identity integration" do |framework_name| + include Rack::Test::Methods + + describe "#{framework_name} integration", integration_framework: framework_name.to_sym do + describe "registration flow" do + it "creates a new user with valid credentials", :check_output do + post "/auth/identity/register", + { + name: "Test User", + email: "test@example.com", + password: "secure_password_123", + password_confirmation: "secure_password_123", + }, + { + "HTTP_HOST" => "example.org", + "HTTP_ORIGIN" => "http://example.org", + "rack.url_scheme" => "http", + } + + # $stderr.puts "=== REGISTRATION RESPONSE ===" + # $stderr.puts "Status: #{last_response.status}" + # $stderr.puts "Body: #{last_response.body}" + # $stderr.puts "Request env HTTP_HOST: #{last_request.env["HTTP_HOST"]}" + # $stderr.puts "Request env HTTP_ORIGIN: #{last_request.env["HTTP_ORIGIN"]}" + # $stderr.puts "Request env SERVER_NAME: #{last_request.env["SERVER_NAME"]}" + # $stderr.puts "============================" + + follow_redirect! if last_response.redirect? + expect(last_response.status).to be_between(200, 302) + end + + it "rejects registration with missing fields", :check_output do + post "/auth/identity/register", + { + email: "test@example.com", + # Missing password + }, + {"HTTP_HOST" => "example.org", "rack.url_scheme" => "http"} + + follow_redirect! if last_response.redirect? + expect(last_response.status).to be >= 400 + end + + it "rejects duplicate email registration", :check_output do + post "/auth/identity/register", + { + name: "Test User", + email: "duplicate@example.com", + password: "secure_password_123", + password_confirmation: "secure_password_123", + }, + {"HTTP_HOST" => "example.org", "rack.url_scheme" => "http"} + + post "/auth/identity/register", + { + name: "Another User", + email: "duplicate@example.com", + password: "different_password", + password_confirmation: "different_password", + }, + {"HTTP_HOST" => "example.org", "rack.url_scheme" => "http"} + + follow_redirect! if last_response.redirect? + expect(last_response.status).to be >= 400 + end + end + + describe "login flow" do + before do + post "/auth/identity/register", + { + name: "Login Test", + email: "login@example.com", + password: "test_password_123", + password_confirmation: "test_password_123", + }, + {"HTTP_HOST" => "example.org", "rack.url_scheme" => "http"} + end + + it "authenticates with valid credentials", :check_output do + post "/auth/identity/callback", + { + auth_key: "login@example.com", + password: "test_password_123", + }, + {"HTTP_HOST" => "example.org", "rack.url_scheme" => "http"} + + # $stderr.puts "=== REGISTRATION RESPONSE ===" + # $stderr.puts "Status: #{last_response.status}" + # $stderr.puts "Body: #{last_response.body}" + # $stderr.puts "Request env HTTP_HOST: #{last_request.env["HTTP_HOST"]}" + # $stderr.puts "Request env HTTP_ORIGIN: #{last_request.env["HTTP_ORIGIN"]}" + # $stderr.puts "Request env SERVER_NAME: #{last_request.env["SERVER_NAME"]}" + # $stderr.puts "============================" + + follow_redirect! if last_response.redirect? + expect(last_response.status).to be_between(200, 302) + end + + it "rejects invalid password", :check_output do + post "/auth/identity/callback", + { + auth_key: "login@example.com", + password: "wrong_password", + }, + {"HTTP_HOST" => "example.org", "rack.url_scheme" => "http"} + + follow_redirect! + expect(last_response.status).to be >= 400 + end + + it "rejects non-existent user", :check_output do + post "/auth/identity/callback", + { + auth_key: "nonexistent@example.com", + password: "any_password", + }, + {"HTTP_HOST" => "example.org", "rack.url_scheme" => "http"} + + follow_redirect! + expect(last_response.status).to be >= 400 + end + end + + describe "browser-based flows", :capybara, type: :feature do + before do + # Configure Capybara for this app + Capybara.app = app + Capybara.default_driver = :rack_test + Capybara.current_driver = :rack_test + end + + after do + Capybara.reset_sessions! + Capybara.use_default_driver + end + + describe "registration through browser" do + it "can view the registration page provided by OmniAuth" do + # OmniAuth Identity provides a basic registration form when accessed via GET + visit "/auth/identity/register" + + # The default OmniAuth form should be present + expect(page.status_code).to eq(200) + expect(page).to have_content("Identity") + end + + it "submits registration and gets redirected" do + visit "/auth/identity/register" + + # Fill out OmniAuth's default form if it has the fields + # Note: Field names depend on OmniAuth's form builder + if page.has_field?("Name") + fill_in "Name", with: "Browser User" + end + + if page.has_field?("Email") + fill_in "Email", with: "browser#{Time.now.to_i}@example.com" + end + + # Use match: :first to avoid ambiguity when there are multiple password fields + if page.has_field?("Password") + all_inputs = page.all(:fillable_field, "Password") + if all_inputs.length > 1 + # Fill first password field (password) + all_inputs[0].set("secure_password_123") + # Fill second password field (confirmation) + all_inputs[1].set("secure_password_123") + else + fill_in "Password", with: "secure_password_123", match: :first + end + end + + # Try to find and click submit button + if page.has_button?(disabled: false) + first('input[type="submit"]', minimum: 0)&.click || first('button[type="submit"]', minimum: 0)&.click + + # Should get some response + expect([200, 302, 400, 422]).to include(page.status_code) + else + skip "OmniAuth Identity form not found or customized by application" + end + end + end + + describe "login through browser" do + before do + # Create a user first using API + post "/auth/identity/register", + { + name: "Browser Login User", + email: "browserlogin@example.com", + password: "test_password_123", + password_confirmation: "test_password_123", + }, + {"HTTP_HOST" => "example.org", "rack.url_scheme" => "http"} + end + + it "can view the login page provided by OmniAuth" do + # OmniAuth Identity provides a basic login form via GET request phase + visit "/auth/identity" + + # The default OmniAuth form should be present + expect(page.status_code).to eq(200) + expect(page).to have_content("Identity") if page.status_code == 200 + end + + it "submits login credentials" do + visit "/auth/identity" + + # Fill out OmniAuth's default form if present + if page.has_field?("Login") || page.has_field?("Email") + auth_field = page.has_field?("Login") ? "Login" : "Email" + fill_in auth_field, with: "browserlogin@example.com" if page.has_field?(auth_field) + end + + if page.has_field?("Password") + fill_in "Password", with: "test_password_123", match: :first + end + + # Submit the form + if page.has_button?(disabled: false) && page.has_field?("Password") + first('input[type="submit"]', minimum: 0)&.click || first('button[type="submit"]', minimum: 0)&.click + + # Should get redirected or show response + expect([200, 302, 401]).to include(page.status_code) + else + skip "OmniAuth Identity login form not found or customized by application" + end + end + end + + describe "form presence validation" do + it "ensures registration form is accessible" do + visit "/auth/identity/register" + expect(page.status_code).to be_between(200, 302) + end + + it "ensures login form is accessible" do + visit "/auth/identity" + expect(page.status_code).to be_between(200, 302) + end + end + end + end +end diff --git a/spec_orms/support/rspec_config/rom.rb b/spec_orms/support/rspec_config/rom.rb index 1f2a7dac..1a2dd0d6 100644 --- a/spec_orms/support/rspec_config/rom.rb +++ b/spec_orms/support/rspec_config/rom.rb @@ -6,11 +6,11 @@ ROM_DB = if RUBY_ENGINE == "jruby" require "jdbc/sqlite3" require "sequel" - Sequel.connect("jdbc:sqlite::memory:rom") + Sequel.connect("jdbc:sqlite::memory:") else require "sqlite3" require "sequel" - Sequel.connect("sqlite::memory:rom") + Sequel.connect("sqlite::memory:") end # :nocov: diff --git a/spec_orms/support/rspec_config/sequel.rb b/spec_orms/support/rspec_config/sequel.rb index 72fdca09..68df6ce8 100644 --- a/spec_orms/support/rspec_config/sequel.rb +++ b/spec_orms/support/rspec_config/sequel.rb @@ -6,10 +6,10 @@ DB = if RUBY_ENGINE == "jruby" require "jdbc/sqlite3" require "sequel" - Sequel.connect("jdbc:sqlite::memory:sequel") + Sequel.connect("jdbc:sqlite::memory:") else require "sqlite3" require "sequel" - Sequel.connect("sqlite::memory:sequel") + Sequel.connect("sqlite::memory:") end # :nocov: