pax_global_header00006660000000000000000000000064150443100130014501gustar00rootroot0000000000000052 comment=00137b8320e3270dc4fe510965a93b7c4f9c7888 rspec-stubbed_env-1.0.4/000077500000000000000000000000001504431001300151155ustar00rootroot00000000000000rspec-stubbed_env-1.0.4/.devcontainer/000077500000000000000000000000001504431001300176545ustar00rootroot00000000000000rspec-stubbed_env-1.0.4/.devcontainer/devcontainer.json000066400000000000000000000016421504431001300232330ustar00rootroot00000000000000// For format details, see https://aka.ms/devcontainer.json. For config options, see the // README at: https://github.com/devcontainers/templates/tree/main/src/ruby { "name": "Ruby", // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile "image": "mcr.microsoft.com/devcontainers/ruby:1-3-bookworm", // Features to add to the dev container. More info: https://containers.dev/features. // "features": {}, // Use 'forwardPorts' to make a list of ports inside the container available locally. // "forwardPorts": [], // Use 'postCreateCommand' to run commands after the container is created. // "postCreateCommand": "ruby --version", // Configure tool-specific properties. "customizations" : { "jetbrains" : { "backend" : "RubyMine" } }, // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. // "remoteUser": "root" } rspec-stubbed_env-1.0.4/.envrc000077500000000000000000000034001504431001300162330ustar00rootroot00000000000000# Run any command in this library's bin/ without the bin/ prefix! PATH_add bin # Only add things to this file that should be shared with the team. # **dotenv** (See end of file for .env.local integration) # .env would override anything in this file, if enabled. # .env is a DOCKER standard, and if we use it, it would be in deployed, or DOCKER, environments. # Override and customize anything below in your own .env.local # If you are using dotenv and not direnv, # copy the following `export` statements to your own .env file. ### General Ruby ### # Turn off Ruby Warnings about deprecated code # export RUBYOPT="-W0" ### External Testing Controls export K_SOUP_COV_DO=true # Means you want code coverage # Available formats are html, xml, rcov, lcov, json, tty export K_SOUP_COV_COMMAND_NAME="RSpec Coverage" export K_SOUP_COV_FORMATTERS="html,tty" export K_SOUP_COV_MIN_BRANCH=100 # Means you want to enforce X% branch coverage export K_SOUP_COV_MIN_LINE=100 # Means you want to enforce X% line coverage export K_SOUP_COV_MIN_HARD=true # Means you want the build to fail if the coverage thresholds are not met export K_SOUP_COV_MULTI_FORMATTERS=true export K_SOUP_COV_OPEN_BIN= # Means don't try to open coverage results in browser export MAX_ROWS=1 # Setting for simplecov-console gem for tty output, limits to the worst N rows of bad coverage # Internal Debugging Controls export DEBUG=false # do not allow byebug statements (override in .env.local) # .env would override anything in this file, if `dotenv` is uncommented below. # .env is a DOCKER standard, and if we use it, it would be in deployed, or DOCKER, environments, # and that is why we generally want to leave it commented out. # dotenv # .env.local will override anything in this file. dotenv_if_exists .env.local rspec-stubbed_env-1.0.4/.github/000077500000000000000000000000001504431001300164555ustar00rootroot00000000000000rspec-stubbed_env-1.0.4/.github/FUNDING.yml000066400000000000000000000013121504431001300202670ustar00rootroot00000000000000# These are supported funding model platforms buy_me_a_coffee: pboling community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry github: [pboling] # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] issuehunt: pboling # Replace with a single IssueHunt username ko_fi: pboling # Replace with a single Ko-fi username liberapay: pboling # Replace with a single Liberapay username open_collective: # Replace with a single Open Collective username patreon: galtzo # Replace with a single Patreon username polar: pboling thanks_dev: u/gh/pboling tidelift: rubygems/rspec-stubbed_env # Replace with a single Tidelift platform-name/package-name e.g., npm/babel rspec-stubbed_env-1.0.4/.github/dependabot.yml000066400000000000000000000004001504431001300212770ustar00rootroot00000000000000version: 2 updates: - package-ecosystem: bundler directory: "/" schedule: interval: daily time: "04:34" open-pull-requests-limit: 10 - package-ecosystem: "github-actions" directory: "/" schedule: interval: "daily" rspec-stubbed_env-1.0.4/.github/workflows/000077500000000000000000000000001504431001300205125ustar00rootroot00000000000000rspec-stubbed_env-1.0.4/.github/workflows/ancient.yml000077500000000000000000000047751504431001300226760ustar00rootroot00000000000000name: MRI 2.3, 2.4, 2.5 (EOL) on: push: branches: - 'main' tags: - '!*' # Do not execute on tags pull_request: branches: - '*' # Allow manually triggering the workflow. workflow_dispatch: # Cancels all previous workflow runs for the same branch that have not yet completed. concurrency: # The concurrency group contains the workflow name and the branch name. group: "${{ github.workflow }}-${{ github.ref }}" cancel-in-progress: true jobs: test: name: Specs ${{ matrix.ruby }} ${{ matrix.appraisal }}${{ matrix.name_extra || '' }} if: "!contains(github.event.commits[0].message, '[ci skip]') && !contains(github.event.commits[0].message, '[skip ci]')" runs-on: ubuntu-22.04 continue-on-error: ${{ matrix.experimental || endsWith(matrix.ruby, 'head') }} env: # $BUNDLE_GEMFILE must be set at job level, so it is set for all steps BUNDLE_GEMFILE: ${{ github.workspace }}/${{ matrix.gemfile }}.gemfile strategy: fail-fast: false matrix: include: # Ruby 2.3 - ruby: "ruby-2.3" appraisal: "ruby-2-3" exec_cmd: "rake spec" gemfile: "Appraisal.root" rubygems: "3.3.27" bundler: "2.3.27" # Ruby 2.4 - ruby: "ruby-2.4" appraisal: "ruby-2-4" exec_cmd: "rake spec" gemfile: "Appraisal.root" rubygems: "3.3.27" bundler: "2.3.27" # Ruby 2.5 - ruby: "ruby-2.5" appraisal: "ruby-2-5" exec_cmd: "rake spec" gemfile: "Appraisal.root" rubygems: "3.3.27" bundler: "2.3.27" steps: - name: Checkout uses: actions/checkout@v4 - name: Setup Ruby & RubyGems uses: ruby/setup-ruby@v1 with: ruby-version: ${{ matrix.ruby }} rubygems: ${{ matrix.rubygems }} bundler: ${{ matrix.bundler }} bundler-cache: false # Raw `bundle` will use the BUNDLE_GEMFILE set to matrix.gemfile (i.e. Appraisal.root) # We need to do this first to get appraisal installed. # NOTE: This does not use the main Gemfile at all. - name: Install Root Appraisal run: bundle - name: Appraisal for ${{ matrix.appraisal }} run: bundle exec appraisal ${{ matrix.appraisal }} bundle - name: Tests for ${{ matrix.ruby }} via ${{ matrix.exec_cmd }} run: bundle exec appraisal ${{ matrix.appraisal }} bundle exec ${{ matrix.exec_cmd }} rspec-stubbed_env-1.0.4/.github/workflows/auto-assign.yml000066400000000000000000000007201504431001300234660ustar00rootroot00000000000000name: Auto Assign on: issues: types: [opened] pull_request: types: [opened] jobs: run: runs-on: ubuntu-latest permissions: issues: write pull-requests: write steps: - name: 'Auto-assign issue' uses: pozil/auto-assign-issue@v2 with: repo-token: ${{ secrets.GITHUB_TOKEN }} assignees: pboling abortIfPreviousAssignees: true allowSelfAssign: true numOfAssignee: 1rspec-stubbed_env-1.0.4/.github/workflows/codeql-analysis.yml000077500000000000000000000044631504431001300243370ustar00rootroot00000000000000# For most projects, this workflow file will not need changing; you simply need # to commit it to your repository. # # You may wish to alter this file to override the set of languages analyzed, # or to provide custom queries or build logic. # # ******** NOTE ******** # We have attempted to detect the languages in your repository. Please check # the `language` matrix defined below to confirm you have the correct set of # supported CodeQL languages. # name: "CodeQL" on: push: branches: [ main, "*-stable" ] pull_request: # The branches below must be a subset of the branches above branches: [ main, "*-stable" ] schedule: - cron: '35 1 * * 5' jobs: analyze: name: Analyze runs-on: ubuntu-latest permissions: actions: read contents: read security-events: write strategy: fail-fast: false matrix: language: [ 'ruby' ] # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ] # Learn more about CodeQL language support at https://git.io/codeql-language-support steps: - name: Checkout repository uses: actions/checkout@v4 # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL uses: github/codeql-action/init@v3 with: languages: ${{ matrix.language }} # If you wish to specify custom queries, you can do so here or in a config file. # By default, queries listed here will override any specified in a config file. # Prefix the list here with "+" to use these queries and those in the config file. # queries: ./path/to/local/query, your-org/your-repo/queries@main # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). # If this step fails, then you should remove it and run the build manually (see below) - name: Autobuild uses: github/codeql-action/autobuild@v3 # â„šī¸ Command-line programs to run using the OS shell. # 📚 https://git.io/JvXDl # âœī¸ If the Autobuild fails above, remove it and uncomment the following three lines # and modify them (or add more) to build your code if your project # uses a compiled language #- run: | # make bootstrap # make release - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@v3 rspec-stubbed_env-1.0.4/.github/workflows/coverage.yml000077500000000000000000000102251504431001300230330ustar00rootroot00000000000000name: Test Coverage permissions: contents: read pull-requests: write id-token: write env: K_SOUP_COV_MIN_BRANCH: 100 K_SOUP_COV_MIN_LINE: 100 K_SOUP_COV_MIN_HARD: true K_SOUP_COV_FORMATTERS: "html,xml,rcov,lcov,tty" K_SOUP_COV_DO: true K_SOUP_COV_MULTI_FORMATTERS: true K_SOUP_COV_COMMAND_NAME: "Test Coverage" on: push: branches: - 'main' tags: - '!*' # Do not execute on tags pull_request: branches: - '*' # Allow manually triggering the workflow. workflow_dispatch: # Cancels all previous workflow runs for the same branch that have not yet completed. concurrency: # The concurrency group contains the workflow name and the branch name. group: "${{ github.workflow }}-${{ github.ref }}" cancel-in-progress: true jobs: coverage: name: Code Coverage on ${{ matrix.ruby }}@current if: "!contains(github.event.commits[0].message, '[ci skip]') && !contains(github.event.commits[0].message, '[skip ci]')" runs-on: ubuntu-latest continue-on-error: ${{ matrix.experimental || endsWith(matrix.ruby, 'head') }} env: # $BUNDLE_GEMFILE must be set at job level, so it is set for all steps BUNDLE_GEMFILE: ${{ github.workspace }}/${{ matrix.gemfile }}.gemfile strategy: fail-fast: false matrix: include: # Coverage - ruby: "ruby" appraisal: "coverage" exec_cmd: "rake spec" gemfile: "Appraisal.root" rubygems: latest bundler: latest steps: - name: Checkout uses: actions/checkout@v4 - name: Setup Ruby & RubyGems uses: ruby/setup-ruby@v1 with: ruby-version: "${{ matrix.ruby }}" rubygems: "${{ matrix.rubygems }}" bundler: "${{ matrix.bundler }}" bundler-cache: false # Raw `bundle` will use the BUNDLE_GEMFILE set to matrix.gemfile (i.e. Appraisal.root) # We need to do this first to get appraisal installed. # NOTE: This does not use the main Gemfile at all. - name: Install Root Appraisal run: bundle - name: Appraisal for ${{ matrix.appraisal }} run: bundle exec appraisal ${{ matrix.appraisal }} bundle - name: Tests for ${{ matrix.ruby }}@current via ${{ matrix.exec_cmd }} run: bundle exec appraisal ${{ matrix.appraisal }} bundle exec ${{ matrix.exec_cmd }} # Do SaaS coverage uploads first - name: Upload coverage to Coveralls if: ${{ !env.ACT }} uses: coverallsapp/github-action@master with: github-token: ${{ secrets.GITHUB_TOKEN }} continue-on-error: ${{ matrix.experimental != 'false' }} - name: Upload coverage to QLTY if: ${{ !env.ACT }} uses: qltysh/qlty-action/coverage@v1 with: token: ${{secrets.QLTY_COVERAGE_TOKEN}} files: coverage/.resultset.json continue-on-error: ${{ matrix.experimental != 'false' }} # Build will fail here if coverage upload fails # which will hopefully be noticed for the lack of code coverage comments - name: Upload coverage to CodeCov uses: codecov/codecov-action@v5 with: use_oidc: true fail_ci_if_error: true # optional (default = false) files: coverage/lcov.info,coverage/coverage.xml verbose: true # optional (default = false) # Then PR comments - name: Code Coverage Summary Report if: ${{ !env.ACT && github.event_name == 'pull_request' }} uses: irongut/CodeCoverageSummary@v1.3.0 with: filename: ./coverage/coverage.xml badge: true fail_below_min: true format: markdown hide_branch_rate: false hide_complexity: true indicators: true output: both thresholds: '100 100' continue-on-error: ${{ matrix.experimental != 'false' }} - name: Add Coverage PR Comment uses: marocchino/sticky-pull-request-comment@v2 if: ${{ !env.ACT && github.event_name == 'pull_request' }} with: recreate: true path: code-coverage-results.md continue-on-error: ${{ matrix.experimental != 'false' }} rspec-stubbed_env-1.0.4/.github/workflows/current.yml000077500000000000000000000054231504431001300227260ustar00rootroot00000000000000# Targets the evergreen latest release of ruby, truffleruby, and jruby name: Current env: K_SOUP_COV_DO: false on: push: branches: - 'main' tags: - '!*' # Do not execute on tags pull_request: branches: - '*' # Allow manually triggering the workflow. workflow_dispatch: permissions: contents: read # Cancels all previous workflow runs for the same branch that have not yet completed. concurrency: # The concurrency group contains the workflow name and the branch name. group: "${{ github.workflow }}-${{ github.ref }}" cancel-in-progress: true jobs: test: name: Specs ${{ matrix.ruby }}@${{ matrix.appraisal }} if: "!contains(github.event.commits[0].message, '[ci skip]') && !contains(github.event.commits[0].message, '[skip ci]')" runs-on: ubuntu-latest continue-on-error: ${{ matrix.experimental || endsWith(matrix.ruby, 'head') }} env: # $BUNDLE_GEMFILE must be set at job level, so it is set for all steps BUNDLE_GEMFILE: ${{ github.workspace }}/${{ matrix.gemfile }}.gemfile strategy: matrix: include: # Ruby 3.4 - ruby: "ruby" appraisal: "current" exec_cmd: "rake spec" gemfile: "Appraisal.root" rubygems: latest bundler: latest # truffleruby-24.1 # (according to documentation: targets Ruby 3.3 compatibility) # (according to runtime: targets Ruby 3.2 compatibility) - ruby: "truffleruby" appraisal: "current" exec_cmd: "rake spec" gemfile: "Appraisal.root" rubygems: default bundler: default # jruby-10.0 (targets Ruby 3.4 compatibility) - ruby: "jruby" appraisal: "current" exec_cmd: "rake spec" gemfile: "Appraisal.root" rubygems: default bundler: default steps: - name: Checkout uses: actions/checkout@v4 - name: Setup Ruby & RubyGems uses: ruby/setup-ruby@v1 with: ruby-version: ${{ matrix.ruby }} rubygems: ${{ matrix.rubygems }} bundler: ${{ matrix.bundler }} bundler-cache: false # Raw `bundle` will use the BUNDLE_GEMFILE set to matrix.gemfile (i.e. Appraisal.root) # We need to do this first to get appraisal installed. # NOTE: This does not use the main Gemfile at all. - name: Install Root Appraisal run: bundle - name: Appraisal for ${{ matrix.ruby }}@${{ matrix.appraisal }} run: bundle exec appraisal ${{ matrix.appraisal }} bundle - name: Tests for ${{ matrix.ruby }}@${{ matrix.appraisal }} via ${{ matrix.exec_cmd }} run: bundle exec appraisal ${{ matrix.appraisal }} bundle exec ${{ matrix.exec_cmd }} rspec-stubbed_env-1.0.4/.github/workflows/dependency-review.yml000077500000000000000000000015651504431001300246640ustar00rootroot00000000000000# Dependency Review Action # # This Action will scan dependency manifest files that change as part of a Pull Request, surfacing known-vulnerable versions of the packages declared or updated in the PR. Once installed, if the workflow run is marked as required, PRs introducing known-vulnerable packages will be blocked from merging. # # Source repository: https://github.com/actions/dependency-review-action # Public documentation: https://docs.github.com/en/code-security/supply-chain-security/understanding-your-software-supply-chain/about-dependency-review#dependency-review-enforcement name: 'Dependency Review' on: [pull_request] permissions: contents: read jobs: dependency-review: runs-on: ubuntu-latest steps: - name: 'Checkout Repository' uses: actions/checkout@v4 - name: 'Dependency Review' uses: actions/dependency-review-action@v4 rspec-stubbed_env-1.0.4/.github/workflows/deps_locked.yml000066400000000000000000000044321504431001300235140ustar00rootroot00000000000000--- # Lock/Unlock Deps Pattern # # Two often conflicting goals resolved! # # - deps_unlocked.yml # - All runtime & dev dependencies, but does not have a `gemfiles/*.gemfile.lock` committed # - Uses an Appraisal2 "deps_unlocked" gemfile, and the current MRI Ruby release # - Know when new dependency releases will break local dev with unlocked dependencies # - Broken workflow indicates that new releases of dependencies may not work # # - deps_locked.yml # - All runtime & dev dependencies, and has a `Gemfile.lock` committed # - Uses the project's main Gemfile, and the current MRI Ruby release # - Matches what contributors and maintainers use locally for development # - Broken workflow indicates that a new contributor will have a bad time # name: Deps Locked permissions: contents: read env: KITCHEN_SINK: true on: push: branches: - 'main' - '*-stable' tags: - '!*' # Do not execute on tags pull_request: branches: - '*' # Allow manually triggering the workflow. workflow_dispatch: # Cancels all previous workflow runs for the same branch that have not yet completed. concurrency: # The concurrency group contains the workflow name and the branch name. group: "${{ github.workflow }}-${{ github.ref }}" cancel-in-progress: true jobs: test: name: Default rake task w/ main Gemfile.lock ${{ matrix.name_extra || '' }} if: ${{ !contains(github.event.commits[0].message, '[ci skip]') && !contains(github.event.commits[0].message, '[skip ci]') }} runs-on: ubuntu-latest continue-on-error: ${{ matrix.experimental }} strategy: fail-fast: false matrix: include: # Ruby - ruby: "ruby" exec_cmd: "rake" rubygems: latest bundler: latest experimental: false steps: - name: Checkout uses: actions/checkout@v4 - name: Setup Ruby & RubyGems uses: ruby/setup-ruby@v1 with: ruby-version: ${{ matrix.ruby }} rubygems: ${{ matrix.rubygems }} bundler: ${{ matrix.bundler }} bundler-cache: true - name: Checks the kitchen sink via ${{ matrix.exec_cmd }} run: bundle exec ${{ matrix.exec_cmd }} rspec-stubbed_env-1.0.4/.github/workflows/deps_unlocked.yml000066400000000000000000000057331504431001300240640ustar00rootroot00000000000000--- # Lock/Unlock Deps Pattern # # Two often conflicting goals resolved! # # - deps_unlocked.yml # - All runtime & dev dependencies, but does not have a `gemfiles/*.gemfile.lock` committed # - Uses an Appraisal2 "deps_unlocked" gemfile, and the current MRI Ruby release # - Know when new dependency releases will break local dev with unlocked dependencies # - Broken workflow indicates that new releases of dependencies may not work # # - deps_locked.yml # - All runtime & dev dependencies, and has a `Gemfile.lock` committed # - Uses the project's main Gemfile, and the current MRI Ruby release # - Matches what contributors and maintainers use locally for development # - Broken workflow indicates that a new contributor will have a bad time # name: Deps Unlocked permissions: contents: read env: K_SOUP_COV_DO: false on: push: branches: - 'main' - "*-stable" tags: - '!*' # Do not execute on tags pull_request: branches: - '*' # Allow manually triggering the workflow. workflow_dispatch: # Cancels all previous workflow runs for the same branch that have not yet completed. concurrency: # The concurrency group contains the workflow name and the branch name. group: "${{ github.workflow }}-${{ github.ref }}" cancel-in-progress: true jobs: test: name: Default rake task w/ unlocked deps ${{ matrix.name_extra || '' }} if: "!contains(github.event.commits[0].message, '[ci skip]') && !contains(github.event.commits[0].message, '[skip ci]')" runs-on: ubuntu-latest continue-on-error: ${{ matrix.experimental || endsWith(matrix.ruby, 'head') }} env: # $BUNDLE_GEMFILE must be set at job level, so it is set for all steps BUNDLE_GEMFILE: ${{ github.workspace }}/${{ matrix.gemfile }}.gemfile strategy: matrix: include: # Ruby - ruby: "ruby" appraisal_name: "deps_unlocked" exec_cmd: "rake" gemfile: "Appraisal.root" rubygems: latest bundler: latest steps: - name: Checkout uses: actions/checkout@v4 - name: Setup Ruby & RubyGems uses: ruby/setup-ruby@v1 with: ruby-version: ${{ matrix.ruby }} rubygems: ${{ matrix.rubygems }} bundler: ${{ matrix.bundler }} bundler-cache: false # Raw `bundle` will use the BUNDLE_GEMFILE set to matrix.gemfile (i.e. Appraisal.root) # We need to do this first to get appraisal installed. # NOTE: This does not use the main Gemfile at all. - name: Install Root Appraisal run: bundle - name: Appraisal for ${{ matrix.ruby }}@${{ matrix.appraisal_name }} run: bundle exec appraisal ${{ matrix.appraisal_name }} bundle - name: Run ${{ matrix.exec_cmd }} on ${{ matrix.ruby }}@${{ matrix.appraisal_name }} run: bundle exec appraisal ${{ matrix.appraisal_name }} bundle exec ${{ matrix.exec_cmd }} rspec-stubbed_env-1.0.4/.github/workflows/discord-notifier.yml000066400000000000000000000016431504431001300245050ustar00rootroot00000000000000name: Discord Notify on: check_run: types: [completed] discussion: types: [ created ] discussion_comment: types: [ created ] fork: gollum: issues: types: [ opened ] issue_comment: types: [ created ] pull_request: types: [ opened, reopened, closed ] release: types: [ published ] watch: types: [ started ] # A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: # This workflow contains a single job called "build" notify: # The type of runner that the job will run on runs-on: ubuntu-latest # Steps represent a sequence of tasks that will be executed as part of the job steps: - name: Actions Status Discord uses: sarisia/actions-status-discord@v1 if: always() with: webhook: ${{ secrets.DISCORD_WEBHOOK }} status: ${{ job.status }} username: GitHub Actionsrspec-stubbed_env-1.0.4/.github/workflows/heads.yml000077500000000000000000000053211504431001300223250ustar00rootroot00000000000000name: Heads env: K_SOUP_COV_DO: false on: push: branches: - 'main' tags: - '!*' # Do not execute on tags pull_request: branches: - '*' # Allow manually triggering the workflow. workflow_dispatch: permissions: contents: read # Cancels all previous workflow runs for the same branch that have not yet completed. concurrency: # The concurrency group contains the workflow name and the branch name. group: "${{ github.workflow }}-${{ github.ref }}" cancel-in-progress: true jobs: test: name: Specs ${{ matrix.ruby }}@${{ matrix.appraisal }}${{ matrix.name_extra || '' }} if: "!contains(github.event.commits[0].message, '[ci skip]') && !contains(github.event.commits[0].message, '[skip ci]')" runs-on: ubuntu-latest continue-on-error: ${{ matrix.experimental || endsWith(matrix.ruby, 'head') }} env: # $BUNDLE_GEMFILE must be set at job level, so it is set for all steps BUNDLE_GEMFILE: ${{ github.workspace }}/${{ matrix.gemfile }}.gemfile strategy: fail-fast: true matrix: include: # NOTE: Heads use default rubygems / bundler; their defaults are custom, unreleased, and from the future! # ruby-head - ruby: "ruby-head" appraisal: "head" exec_cmd: "rake spec" gemfile: "Appraisal.root" rubygems: default bundler: default # # truffleruby-head # - ruby: "truffleruby-head" # appraisal: "head" # exec_cmd: "rake spec" # gemfile: "Appraisal.root" # rubygems: default # bundler: default # jruby-head - ruby: "jruby-head" appraisal: "head" exec_cmd: "rake spec" gemfile: "Appraisal.root" rubygems: default bundler: default steps: - name: Checkout uses: actions/checkout@v4 - name: Setup Ruby & RubyGems uses: ruby/setup-ruby@v1 with: ruby-version: ${{ matrix.ruby }} rubygems: ${{ matrix.rubygems }} bundler: ${{ matrix.bundler }} bundler-cache: false # Raw `bundle` will use the BUNDLE_GEMFILE set to matrix.gemfile (i.e. Appraisal.root) # We need to do this first to get appraisal installed. # NOTE: This does not use the main Gemfile at all. - name: Install Root Appraisal run: bundle - name: Appraisal for ${{ matrix.ruby }}@${{ matrix.appraisal }} run: bundle exec appraisal ${{ matrix.appraisal }} bundle - name: Tests for ${{ matrix.ruby }}@${{ matrix.appraisal }} via ${{ matrix.exec_cmd }} run: bundle exec appraisal ${{ matrix.appraisal }} bundle exec ${{ matrix.exec_cmd }} rspec-stubbed_env-1.0.4/.github/workflows/jruby.yml000077500000000000000000000057401504431001300224010ustar00rootroot00000000000000name: JRuby env: K_SOUP_COV_DO: false on: push: branches: - 'main' tags: - '!*' # Do not execute on tags pull_request: branches: - '*' # Allow manually triggering the workflow. workflow_dispatch: permissions: contents: read # Cancels all previous workflow runs for the same branch that have not yet completed. concurrency: # The concurrency group contains the workflow name and the branch name. group: "${{ github.workflow }}-${{ github.ref }}" cancel-in-progress: true jobs: test: name: Specs ${{ matrix.ruby }} ${{ matrix.appraisal }}${{ matrix.name_extra || '' }} if: "!contains(github.event.commits[0].message, '[ci skip]') && !contains(github.event.commits[0].message, '[skip ci]')" runs-on: ubuntu-22.04 continue-on-error: ${{ matrix.experimental || endsWith(matrix.ruby, 'head') }} env: # $BUNDLE_GEMFILE must be set at job level, so it is set for all steps BUNDLE_GEMFILE: ${{ github.workspace }}/${{ matrix.gemfile }}.gemfile strategy: matrix: include: # TODO: truffleruby does not support upgrading rubygems; VALIDATE ASSUMPTION that same applies to JRuby # jruby-9.1 (targets Ruby 2.3 compatibility) - ruby: "jruby-9.1" appraisal: "ruby-2-3" exec_cmd: "rake spec" gemfile: "Appraisal.root" rubygems: default bundler: default # jruby-9.2 (targets Ruby 2.5 compatibility) - ruby: "jruby-9.2" appraisal: "ruby-2-5" exec_cmd: "rake spec" gemfile: "Appraisal.root" rubygems: default bundler: default # jruby-9.3 (targets Ruby 2.6 compatibility) - ruby: "jruby-9.3" appraisal: "ruby-2-6" exec_cmd: "rake spec" gemfile: "Appraisal.root" rubygems: default bundler: default # jruby-9.4 (targets Ruby 3.1 compatibility) - ruby: "jruby-9.4" appraisal: "ruby-3-1" exec_cmd: "rake spec" gemfile: "Appraisal.root" rubygems: default bundler: default steps: - name: Checkout uses: actions/checkout@v4 - name: Setup Ruby & RubyGems uses: ruby/setup-ruby@v1 with: ruby-version: ${{ matrix.ruby }} rubygems: ${{ matrix.rubygems }} bundler: ${{ matrix.bundler }} bundler-cache: false # Raw `bundle` will use the BUNDLE_GEMFILE set to matrix.gemfile (i.e. Appraisal.root) # We need to do this first to get appraisal installed. # NOTE: This does not use the main Gemfile at all. - name: Install Root Appraisal run: bundle - name: Appraisal for ${{ matrix.appraisal }} run: bundle exec appraisal ${{ matrix.appraisal }} bundle - name: Tests for ${{ matrix.ruby }} via ${{ matrix.exec_cmd }} run: bundle exec appraisal ${{ matrix.appraisal }} bundle exec ${{ matrix.exec_cmd }} rspec-stubbed_env-1.0.4/.github/workflows/legacy.yml000077500000000000000000000041731504431001300225110ustar00rootroot00000000000000name: MRI 3.0 (EOL) env: K_SOUP_COV_DO: false on: push: branches: - 'main' tags: - '!*' # Do not execute on tags pull_request: branches: - '*' # Allow manually triggering the workflow. workflow_dispatch: permissions: contents: read # Cancels all previous workflow runs for the same branch that have not yet completed. concurrency: # The concurrency group contains the workflow name and the branch name. group: "${{ github.workflow }}-${{ github.ref }}" cancel-in-progress: true jobs: test: name: Specs ${{ matrix.ruby }} ${{ matrix.appraisal }}${{ matrix.name_extra || '' }} if: "!contains(github.event.commits[0].message, '[ci skip]') && !contains(github.event.commits[0].message, '[skip ci]')" runs-on: ubuntu-22.04 continue-on-error: ${{ matrix.experimental || endsWith(matrix.ruby, 'head') }} env: # $BUNDLE_GEMFILE must be set at job level, so it is set for all steps BUNDLE_GEMFILE: ${{ github.workspace }}/${{ matrix.gemfile }}.gemfile strategy: fail-fast: false matrix: include: # Ruby 3.0 - ruby: "ruby-3.0" appraisal: "ruby-3-0" exec_cmd: "rake spec" gemfile: "Appraisal.root" rubygems: '3.5.23' bundler: '2.5.23' steps: - name: Checkout uses: actions/checkout@v4 - name: Setup Ruby & RubyGems uses: ruby/setup-ruby@v1 with: ruby-version: ${{ matrix.ruby }} rubygems: ${{ matrix.rubygems }} bundler: ${{ matrix.bundler }} bundler-cache: false # Raw `bundle` will use the BUNDLE_GEMFILE set to matrix.gemfile (i.e. Appraisal.root) # We need to do this first to get appraisal installed. # NOTE: This does not use the main Gemfile at all. - name: Install Root Appraisal run: bundle - name: Appraisal for ${{ matrix.appraisal }} run: bundle exec appraisal ${{ matrix.appraisal }} bundle - name: Tests for ${{ matrix.ruby }} via ${{ matrix.exec_cmd }} run: bundle exec appraisal ${{ matrix.appraisal }} bundle exec ${{ matrix.exec_cmd }} rspec-stubbed_env-1.0.4/.github/workflows/style.yml000077500000000000000000000040701504431001300224010ustar00rootroot00000000000000name: Style on: push: branches: - 'main' tags: - '!*' # Do not execute on tags pull_request: branches: - '*' # Allow manually triggering the workflow. workflow_dispatch: permissions: contents: read # Cancels all previous workflow runs for the same branch that have not yet completed. concurrency: # The concurrency group contains the workflow name and the branch name. group: "${{ github.workflow }}-${{ github.ref }}" cancel-in-progress: true jobs: rubocop: name: Style on ${{ matrix.ruby }}@current if: "!contains(github.event.commits[0].message, '[ci skip]') && !contains(github.event.commits[0].message, '[skip ci]')" runs-on: ubuntu-latest continue-on-error: ${{ matrix.experimental || endsWith(matrix.ruby, 'head') }} env: # $BUNDLE_GEMFILE must be set at job level, so it is set for all steps BUNDLE_GEMFILE: ${{ github.workspace }}/${{ matrix.gemfile }}.gemfile strategy: fail-fast: false matrix: include: # Style - ruby: "ruby" appraisal: "style" exec_cmd: "rake rubocop_gradual:check" gemfile: "Appraisal.root" rubygems: latest bundler: latest steps: - name: Checkout uses: actions/checkout@v4 - name: Setup Ruby & RubyGems uses: ruby/setup-ruby@v1 with: ruby-version: ${{ matrix.ruby }} rubygems: ${{ matrix.rubygems }} bundler: ${{ matrix.bundler }} bundler-cache: false # Raw `bundle` will use the BUNDLE_GEMFILE set to matrix.gemfile (i.e. Appraisal.root) # We need to do this first to get appraisal installed. # NOTE: This does not use the main Gemfile at all. - name: Install Root Appraisal run: bundle - name: Appraisal for ${{ matrix.appraisal }} 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 }} rspec-stubbed_env-1.0.4/.github/workflows/supported.yml000077500000000000000000000050661504431001300232740ustar00rootroot00000000000000name: MRI Non-EOL env: K_SOUP_COV_DO: false on: push: branches: - 'main' tags: - '!*' # Do not execute on tags pull_request: branches: - '*' # Allow manually triggering the workflow. workflow_dispatch: permissions: contents: read # Cancels all previous workflow runs for the same branch that have not yet completed. concurrency: # The concurrency group contains the workflow name and the branch name. group: "${{ github.workflow }}-${{ github.ref }}" cancel-in-progress: true jobs: test: name: Specs ${{ matrix.ruby }} ${{ matrix.appraisal }}${{ matrix.name_extra || '' }} if: "!contains(github.event.commits[0].message, '[ci skip]') && !contains(github.event.commits[0].message, '[skip ci]')" runs-on: ubuntu-latest continue-on-error: ${{ matrix.experimental || endsWith(matrix.ruby, 'head') }} env: # $BUNDLE_GEMFILE must be set at job level, so it is set for all steps BUNDLE_GEMFILE: ${{ github.workspace }}/${{ matrix.gemfile }}.gemfile strategy: matrix: include: # Ruby 3.1 - ruby: "ruby-3.1" appraisal: "ruby-3-1" exec_cmd: "rake spec" gemfile: "Appraisal.root" rubygems: latest bundler: latest # Ruby 3.2 - ruby: "ruby-3.2" appraisal: "ruby-3-2" exec_cmd: "rake spec" gemfile: "Appraisal.root" rubygems: latest bundler: latest # Ruby 3.3 - ruby: "ruby-3.3" appraisal: "ruby-3-3" exec_cmd: "rake spec" gemfile: "Appraisal.root" rubygems: latest bundler: latest steps: - name: Checkout uses: actions/checkout@v4 - name: Setup Ruby & RubyGems uses: ruby/setup-ruby@v1 with: ruby-version: ${{ matrix.ruby }} rubygems: ${{ matrix.rubygems }} bundler: ${{ matrix.bundler }} bundler-cache: false # Raw `bundle` will use the BUNDLE_GEMFILE set to matrix.gemfile (i.e. Appraisal.root) # We need to do this first to get appraisal installed. # NOTE: This does not use the main Gemfile at all. - name: Install Root Appraisal run: bundle - name: Appraisal for ${{ matrix.ruby }} ${{ matrix.appraisal }} run: bundle exec appraisal ${{ matrix.appraisal }} bundle - name: Tests for ${{ matrix.ruby }} ${{ matrix.appraisal }} via ${{ matrix.exec_cmd }} run: bundle exec appraisal ${{ matrix.appraisal }} bundle exec ${{ matrix.exec_cmd }} rspec-stubbed_env-1.0.4/.github/workflows/truffle.yml000077500000000000000000000053421504431001300227130ustar00rootroot00000000000000name: Truffle env: K_SOUP_COV_DO: false on: push: branches: - 'main' tags: - '!*' # Do not execute on tags pull_request: branches: - '*' # Allow manually triggering the workflow. workflow_dispatch: permissions: contents: read # Cancels all previous workflow runs for the same branch that have not yet completed. concurrency: # The concurrency group contains the workflow name and the branch name. group: "${{ github.workflow }}-${{ github.ref }}" cancel-in-progress: true jobs: test: name: Specs ${{ matrix.ruby }} ${{ matrix.appraisal }}${{ matrix.name_extra || '' }} if: "!contains(github.event.commits[0].message, '[ci skip]') && !contains(github.event.commits[0].message, '[skip ci]')" runs-on: ubuntu-22.04 continue-on-error: ${{ matrix.experimental || endsWith(matrix.ruby, 'head') }} env: # $BUNDLE_GEMFILE must be set at job level, so it is set for all steps BUNDLE_GEMFILE: ${{ github.workspace }}/${{ matrix.gemfile }}.gemfile strategy: matrix: include: # NOTE: truffleruby does not support upgrading rubygems. # truffleruby-22.3 (targets Ruby 3.0 compatibility) - ruby: "truffleruby-22.3" appraisal: "ruby-3-0" exec_cmd: "rake spec" gemfile: "Appraisal.root" rubygems: default bundler: default # truffleruby-23.0 (targets Ruby 3.1 compatibility) - ruby: "truffleruby-23.0" appraisal: "ruby-3-1" exec_cmd: "rake spec" gemfile: "Appraisal.root" rubygems: default bundler: default # truffleruby-23.1 (targets Ruby 3.2 compatibility) - ruby: "truffleruby-23.1" appraisal: "ruby-3-2" exec_cmd: "rake spec" gemfile: "Appraisal.root" rubygems: default bundler: default steps: - name: Checkout uses: actions/checkout@v4 - name: Setup Ruby & RubyGems uses: ruby/setup-ruby@v1 with: ruby-version: ${{ matrix.ruby }} rubygems: ${{ matrix.rubygems }} bundler: ${{ matrix.bundler }} bundler-cache: false # Raw `bundle` will use the BUNDLE_GEMFILE set to matrix.gemfile (i.e. Appraisal.root) # We need to do this first to get appraisal installed. # NOTE: This does not use the main Gemfile at all. - name: Install Root Appraisal run: bundle - name: Appraisal for ${{ matrix.appraisal }} run: bundle exec appraisal ${{ matrix.appraisal }} bundle - name: Tests for ${{ matrix.ruby }} via ${{ matrix.exec_cmd }} run: bundle exec appraisal ${{ matrix.appraisal }} bundle exec ${{ matrix.exec_cmd }} rspec-stubbed_env-1.0.4/.github/workflows/unsupported.yml000077500000000000000000000045331504431001300236350ustar00rootroot00000000000000name: MRI 2.6 & 2.7 (EOL) env: K_SOUP_COV_DO: false on: push: branches: - 'main' tags: - '!*' # Do not execute on tags pull_request: branches: - '*' # Allow manually triggering the workflow. workflow_dispatch: permissions: contents: read # Cancels all previous workflow runs for the same branch that have not yet completed. concurrency: # The concurrency group contains the workflow name and the branch name. group: "${{ github.workflow }}-${{ github.ref }}" cancel-in-progress: true jobs: test: name: Specs ${{ matrix.ruby }} ${{ matrix.appraisal }}${{ matrix.name_extra || '' }} if: "!contains(github.event.commits[0].message, '[ci skip]') && !contains(github.event.commits[0].message, '[skip ci]')" runs-on: ubuntu-22.04 continue-on-error: ${{ matrix.experimental || endsWith(matrix.ruby, 'head') }} env: # $BUNDLE_GEMFILE must be set at job level, so it is set for all steps BUNDLE_GEMFILE: ${{ github.workspace }}/${{ matrix.gemfile }}.gemfile strategy: fail-fast: false matrix: include: # Ruby 2.6 - ruby: "ruby-2.6" appraisal: "ruby-2-6" exec_cmd: "rake spec" gemfile: "Appraisal.root" rubygems: '3.4.22' bundler: '2.4.22' # Ruby 2.7 - ruby: "ruby-2.7" appraisal: "ruby-2-7" exec_cmd: "rake spec" gemfile: "Appraisal.root" rubygems: '3.4.22' bundler: '2.4.22' steps: - name: Checkout uses: actions/checkout@v4 - name: Setup Ruby & RubyGems uses: ruby/setup-ruby@v1 with: ruby-version: ${{ matrix.ruby }} rubygems: ${{ matrix.rubygems }} bundler: ${{ matrix.bundler }} bundler-cache: false # Raw `bundle` will use the BUNDLE_GEMFILE set to matrix.gemfile (i.e. Appraisal.root) # We need to do this first to get appraisal installed. # NOTE: This does not use the main Gemfile at all. - name: Install Root Appraisal run: bundle - name: Appraisal for ${{ matrix.appraisal }} run: bundle exec appraisal ${{ matrix.appraisal }} bundle - name: Tests for ${{ matrix.ruby }} via ${{ matrix.exec_cmd }} run: bundle exec appraisal ${{ matrix.appraisal }} bundle exec ${{ matrix.exec_cmd }} rspec-stubbed_env-1.0.4/.gitignore000066400000000000000000000010421504431001300171020ustar00rootroot00000000000000# Build Artifacts /pkg/ /tmp/ *.gem # Bundler /.bundle/ /gemfiles/*.lock /gemfiles/.bundle/ /gemfiles/.bundle/config /gemfiles/vendor/ Appraisal.*.gemfile.lock # Specs .rspec_status /coverage/ /spec/reports/ /results/ # Documentation /.yardoc/ /_yardoc/ /rdoc/ /doc/ # Ruby Version Managers (RVM, rbenv, etc) # Ignored because we currently use .tool-versions .rvmrc .ruby-version .ruby-gemset # Benchmarking /measurement/ # Debugger detritus .byebug_history # direnv - brew install direnv .env.local # OS Detritus .DS_Store # Editors *~ rspec-stubbed_env-1.0.4/.gitlab-ci.yml000077500000000000000000000022331504431001300175540ustar00rootroot00000000000000default: image: ruby variables: BUNDLE_INSTALL_FLAGS: "--quiet --jobs=$(nproc) --retry=3" BUNDLE_FROZEN: "false" # No lockfile! BUNDLE_GEMFILE: gemfiles/current.gemfile 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_VERBOSE: true K_SOUP_COV_FORMATTERS: "html,xml,rcov,lcov,json,tty" K_SOUP_COV_MULTI_FORMATTERS: true K_SOUP_COV_COMMAND_NAME: "RSpec Coverage" workflow: rules: # For merge requests, create a pipeline. - if: '$CI_MERGE_REQUEST_IID' # For the ` main ` branch, create a pipeline (this includes on schedules, pushes, merges, etc.). - if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH' # For tags, create a pipeline. - if: '$CI_COMMIT_TAG' .current_ruby_template: ¤t_ruby_template image: ruby:${RUBY_VERSION} stage: test script: - gem update --system > /dev/null 2>&1 - bundle config --local path vendor - bundle - bundle exec rake cache: key: ${CI_JOB_IMAGE} paths: - vendor/ruby current-ruby: <<: *current_ruby_template parallel: matrix: - RUBY_VERSION: ["3.2", "3.3", "3.4"] rspec-stubbed_env-1.0.4/.idea/000077500000000000000000000000001504431001300160755ustar00rootroot00000000000000rspec-stubbed_env-1.0.4/.idea/.gitignore000066400000000000000000000003331504431001300200640ustar00rootroot00000000000000# Default ignored files /shelf/ /workspace.xml # Editor-based HTTP Client requests /httpRequests/ # Datasource local storage ignored files /dataSources/ /dataSources.local.xml # CodeStream ignored files /codestream.xml rspec-stubbed_env-1.0.4/.idea/GitLink.xml000066400000000000000000000003331504431001300201570ustar00rootroot00000000000000 rspec-stubbed_env-1.0.4/.idea/dbnavigator.xml000066400000000000000000000523461504431001300211310ustar00rootroot00000000000000 rspec-stubbed_env-1.0.4/.idea/dictionaries/000077500000000000000000000000001504431001300205525ustar00rootroot00000000000000rspec-stubbed_env-1.0.4/.idea/dictionaries/project.xml000066400000000000000000000002171504431001300227420ustar00rootroot00000000000000 rubo rspec-stubbed_env-1.0.4/.idea/git_toolbox_prj.xml000066400000000000000000000007401504431001300220240ustar00rootroot00000000000000 rspec-stubbed_env-1.0.4/.idea/misc.xml000066400000000000000000000002701504431001300175510ustar00rootroot00000000000000 rspec-stubbed_env-1.0.4/.idea/modules.xml000066400000000000000000000004361504431001300202720ustar00rootroot00000000000000 rspec-stubbed_env-1.0.4/.idea/rspec-stubbed_env.iml000066400000000000000000000272251504431001300222220ustar00rootroot00000000000000 rspec-stubbed_env-1.0.4/.idea/vcs.xml000066400000000000000000000003731504431001300174150ustar00rootroot00000000000000 rspec-stubbed_env-1.0.4/.pryrc000066400000000000000000000005701504431001300162570ustar00rootroot00000000000000# frozen_string_literal: true if defined?(PryByebug) Pry.commands.alias_command("c", "continue") Pry.commands.alias_command("s", "step") Pry.commands.alias_command("n", "next") Pry.commands.alias_command("trace", "backtrace") end # Hit Enter to repeat last command Pry::Commands.command(/^$/, "repeat last command") do _pry_.run_command(Pry.history.to_a.last) end rspec-stubbed_env-1.0.4/.qlty/000077500000000000000000000000001504431001300161645ustar00rootroot00000000000000rspec-stubbed_env-1.0.4/.qlty/qlty.toml000066400000000000000000000024461504431001300200600ustar00rootroot00000000000000# For a guide to configuration, visit https://qlty.sh/d/config # Or for a full reference, visit https://qlty.sh/d/qlty-toml config_version = "0" exclude_patterns = [ "*_min.*", "*-min.*", "*.min.*", "**/.yarn/**", "**/*.d.ts", "**/assets/**", "**/bin/**", "**/bower_components/**", "**/build/**", "**/cache/**", "**/config/**", "**/.devcontainer", "**/db/**", "**/deps/**", "**/dist/**", "**/doc/**", "**/docs/**", "**/extern/**", "**/external/**", "**/generated/**", "**/Godeps/**", "**/gradlew/**", "**/mvnw/**", "**/node_modules/**", "**/protos/**", "**/seed/**", "**/target/**", "**/templates/**", "**/testdata/**", "**/vendor/**", ".github/workflows/codeql-analysis.yml" ] test_patterns = [ "**/test/**", "**/spec/**", "**/*.test.*", "**/*.spec.*", "**/*_test.*", "**/*_spec.*", "**/test_*.*", "**/spec_*.*", ] [smells] mode = "comment" [smells.boolean_logic] threshold = 4 enabled = true [smells.file_complexity] threshold = 55 enabled = false [smells.return_statements] threshold = 4 enabled = true [smells.nested_control_flow] threshold = 4 enabled = true [smells.function_parameters] threshold = 4 enabled = true [smells.function_complexity] threshold = 5 enabled = true [smells.duplication] enabled = true threshold = 20rspec-stubbed_env-1.0.4/.rspec000066400000000000000000000002441504431001300162320ustar00rootroot00000000000000--format progress --color --require spec_helper --warnings --format html --out results/test_results.html --format RspecJunitFormatter --out results/test_results.xmlrspec-stubbed_env-1.0.4/.rubocop.yml000066400000000000000000000005461504431001300173740ustar00rootroot00000000000000inherit_gem: rubocop-lts: rubocop-lts.yml AllCops: Exclude: # the cache path in .gitlab-ci.yml is vendor/ruby # and it uses a gemfile in gemfiles/, so it is relative - "gemfiles/vendor/ruby/**/*" # Metrics cops are disabled in Standard by default Metrics: Enabled: true Layout/LineLength: Max: 120 RSpec/NestedGroups: Enabled: falserspec-stubbed_env-1.0.4/.rubocop_gradual.lock000066400000000000000000000004401504431001300212130ustar00rootroot00000000000000{ "bin/bundle:875899265": [ [66, 5, 20, "ThreadSafety/ClassInstanceVariable: Avoid class instance variables.", 2485198147] ], "rspec-stubbed_env.gemspec:2420633014": [ [4, 6, 12, "Gemspec/RubyVersionGlobalsUsage: Do not use `RUBY_VERSION` in gemspec file.", 31296028] ] } rspec-stubbed_env-1.0.4/.ruby-version000066400000000000000000000000131504431001300175540ustar00rootroot00000000000000ruby-3.4.5 rspec-stubbed_env-1.0.4/.simplecov000077500000000000000000000000641504431001300171220ustar00rootroot00000000000000require "kettle/soup/cover/config" SimpleCov.start rspec-stubbed_env-1.0.4/.tool-versions000066400000000000000000000000121504431001300177320ustar00rootroot00000000000000ruby 3.4.5rspec-stubbed_env-1.0.4/.yard_gfm_support.rb000066400000000000000000000016021504431001300211030ustar00rootroot00000000000000# Gratefully and liberally taken from the MIT-licensed https://github.com/bensheldon/good_job/pull/113/files require "kramdown" require "kramdown-parser-gfm" # Custom markup provider class that always renders Kramdown using GFM (Github Flavored Markdown). # GFM is needed to render markdown tables and fenced code blocks in the README. class KramdownGfmDocument < Kramdown::Document def initialize(source, options = {}) options[:input] = "GFM" unless options.key?(:input) super(source, options) end end # Insert the new provider as the highest priority option for Markdown. # See: # - https://github.com/lsegal/yard/issues/1157 # - https://github.com/lsegal/yard/issues/1017 # - https://github.com/lsegal/yard/blob/main/lib/yard/templates/helpers/markup_helper.rb YARD::Templates::Helpers::MarkupHelper::MARKUP_PROVIDERS[:markdown].insert( 0, {:const => "KramdownGfmDocument"}, ) rspec-stubbed_env-1.0.4/.yardopts000066400000000000000000000002541504431001300167640ustar00rootroot00000000000000--plugin junk --plugin relative_markdown_links --readme README.md --charset utf-8 --markup markdown --output docs --load .yard_gfm_support.rb 'lib/**/*.rb' - '*.md' '*.txt'rspec-stubbed_env-1.0.4/Appraisal.root.gemfile000077500000000000000000000006001504431001300213440ustar00rootroot00000000000000# frozen_string_literal: true git_source(:github) { |repo_name| "https://github.com/#{repo_name}" } source "https://rubygems.org" # Appraisal Root Gemfile is for running appraisal to generate the Appraisal Gemfiles # in gemfiles/*gemfile. # On CI, we use it for the Appraisal-based builds. # We do not load the standard Gemfile, as it is tailored for local development. gemspec rspec-stubbed_env-1.0.4/Appraisals000066400000000000000000000053211504431001300171400ustar00rootroot00000000000000# frozen_string_literal: true # HOW TO UPDATE APPRAISALS: # BUNDLE_GEMFILE=Appraisal.root.gemfile bundle # BUNDLE_GEMFILE=Appraisal.root.gemfile bundle exec appraisal update # bundle exec rake rubocop_gradual:autocorrect # Lock/Unlock Deps Pattern # # Two often conflicting goals resolved! # # - deps_unlocked.yml # - All runtime & dev dependencies, but does not have a `gemfiles/*.gemfile.lock` committed # - Uses an Appraisal2 "deps_unlocked" gemfile, and the current MRI Ruby release # - Know when new dependency releases will break local dev with unlocked dependencies # - Broken workflow indicates that new releases of dependencies may not work # # - deps_locked.yml # - All runtime & dev dependencies, and has a `Gemfile.lock` committed # - Uses the project's main Gemfile, and the current MRI Ruby release # - Matches what contributors and maintainers use locally for development # - Broken workflow indicates that a new contributor will have a bad time # appraise "deps_unlocked" do eval_gemfile("modular/audit.gemfile") eval_gemfile("modular/coverage.gemfile") eval_gemfile("modular/documentation.gemfile") eval_gemfile("modular/style.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 gem "mutex_m", ">= 0.2" gem "stringio", ">= 3.0" 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 gem "mutex_m", ">= 0.2" gem "stringio", ">= 3.0" end appraise "ruby-2-3" do end appraise "ruby-2-4" do end appraise "ruby-2-5" do end appraise "ruby-2-6" do gem "mutex_m", "~> 0.2" gem "stringio", "~> 3.0" end appraise "ruby-2-7" do gem "mutex_m", "~> 0.2" gem "stringio", "~> 3.0" end appraise "ruby-3-0" do gem "mutex_m", "~> 0.2" gem "stringio", "~> 3.0" end appraise "ruby-3-1" do gem "mutex_m", "~> 0.2" gem "stringio", "~> 3.0" end appraise "ruby-3-2" do gem "mutex_m", "~> 0.2" gem "stringio", "~> 3.0" end appraise "ruby-3-3" do gem "mutex_m", "~> 0.2" gem "stringio", "~> 3.0" end # Only run security audit on latest Ruby version appraise "audit" do gem "mutex_m", "~> 0.2" gem "stringio", "~> 3.0" eval_gemfile "modular/audit.gemfile" end # Only run coverage on latest Ruby version appraise "coverage" do gem "mutex_m", "~> 0.2" gem "stringio", "~> 3.0" eval_gemfile "modular/coverage.gemfile" end # Only run linter on latest Ruby version (but, in support of oldest supported Ruby version) appraise "style" do gem "mutex_m", "~> 0.2" gem "stringio", "~> 3.0" eval_gemfile "modular/style.gemfile" end rspec-stubbed_env-1.0.4/CHANGELOG.md000066400000000000000000000067361504431001300167420ustar00rootroot00000000000000# Changelog All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog v1](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning v2](https://semver.org/spec/v2.0.0.html). ## [Unreleased] ### Added ### Changed ### Deprecated ### Removed ### Fixed ### Security ## [1.0.4] - 2025-08-04 - TAG: [v1.0.4][1.0.4t] - COVERAGE: 100.00% -- 73/73 lines in 5 files - BRANCH COVERAGE: 100.00% -- 10/10 branches in 5 files - 85.71% documented ### Added - Discord notifications for CI, issues, pulls, etc ### Changed - Ownership transfer from pboling to galtzo-floss - gemspec metadata (homepage, funding, etc) ## [1.0.3] - 2025-07-28 - TAG: [v1.0.3][1.0.3t] - COVERAGE: 100.00% -- 73/73 lines in 5 files - BRANCH COVERAGE: 100.00% -- 10/10 branches in 5 files - 85.71% documented ### Added - More documentation - Tracking maintainability and coverage with QLTY.sh - Documentation site - https://rspec-stubbed-env.galtzo.com ### Changed - gemspec metadata ## [1.0.2] - 2025-05-06 - TAG: [v1.0.2][1.0.2t] - COVERAGE: 100.00% -- 73/73 lines in 5 files - BRANCH COVERAGE: 100.00% -- 10/10 branches in 5 files - 85.71% documented ### Added - `hide_env` - `include_context "with hidden env", "FOO"` - Allow providing the env key/value pairs to be stubbed to `include_context` (@darhazer) - `include_context "with stubbed env", "FOO" => "is bar"` - Security policy (SECURITY.md) - Random ordering of test suite - 20 year signing cert expires 2045-04-29 - dev container config for development - Added appraisals to test on many supported Rubies - Ruby 2.3+, including head - JRuby 9.1+, including head - Truffleruby 22.3+, including head - Added CITATION.cff - Upgraded Code of Conduct based on Contributor Covenant v2.1 - New pattern for loading version.rb in gemspec allows (real) 100% code coverage ## [1.0.1] - 2023-04-01 - TAG: [v1.0.1][1.0.1t] ### Added - support for values_at (@darhazer) - support for symbol keys (@hosamaly) - Structured gemfiles - Rubocop with standard, gradual, & more - Releases are now signed - Releases now have checksums ### Changed - Required ruby version in gemspec >= 1.8.7 - not bumping major version, because this was already the de-facto minimum - TravisCI => GitHub Actions - CODE_OF_CONDUCT.md upgraded to v2.0 - Moved from master to main default branch ### Fixed - README Badges (CI status) ## [1.0.0] - 2018-10-06 - TAG: [v1.0.0][1.0.0t] ### Added - negated matchers - rubocop config [@darhazer]: https://github.com/darhazer [@hosamaly]: https://github.com/hosamaly [Unreleased]: https://gitlab.com/galtzo-floss/rspec-stubbed_env/-/compare/v1.0.4...main [1.0.4]: https://gitlab.com/galtzo-floss/rspec-stubbed_env/-/compare/v1.0.3...v1.0.4 [1.0.4t]: https://gitlab.com/galtzo-floss/rspec-stubbed_env/-/tags/v1.0.4 [1.0.3]: https://gitlab.com/galtzo-floss/rspec-stubbed_env/-/compare/v1.0.2...v1.0.3 [1.0.3t]: https://gitlab.com/galtzo-floss/rspec-stubbed_env/-/tags/v1.0.3 [1.0.2]: https://gitlab.com/galtzo-floss/rspec-stubbed_env/-/compare/v1.0.1...v1.0.2 [1.0.2t]: https://gitlab.com/galtzo-floss/rspec-stubbed_env/-/tags/v1.0.2 [1.0.1]: https://gitlab.com/galtzo-floss/rspec-stubbed_env/-/compare/v1.0.0...v1.0.1 [1.0.1t]: https://gitlab.com/galtzo-floss/rspec-stubbed_env/-/tags/v1.0.1 [1.0.0]: https://gitlab.com/galtzo-floss/rspec-stubbed_env/-/compare/a3055964517c159bf214712940982034b75264be...v1.0.0 [1.0.0t]: https://gitlab.com/galtzo-floss/rspec-stubbed_env/-/tags/v1.0.0 rspec-stubbed_env-1.0.4/CITATION.cff000066400000000000000000000011271504431001300170100ustar00rootroot00000000000000cff-version: 1.2.0 title: RSpec::StubbedEnv message: >- If you use this work and you want to cite it, then you can use the metadata from this file. type: software authors: - given-names: Peter Hurn family-names: Boling email: peter@railsbling.com affiliation: railsbling.com orcid: 'https://orcid.org/0009-0008-8519-441X' identifiers: - type: url value: 'https://github.com/galtzo-floss/rspec-stubbed_env/' description: RSpec::StubbedEnv repository-code: 'https://github.com/galtzo-floss/rspec-stubbed_env/' abstract: >- RSpec::StubbedEnv license: See license file rspec-stubbed_env-1.0.4/CODE_OF_CONDUCT.md000066400000000000000000000130771504431001300177240ustar00rootroot00000000000000 # Contributor Covenant Code of Conduct ## Our Pledge We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, caste, color, religion, or sexual identity and orientation. We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community. ## Our Standards Examples of behavior that contributes to a positive environment for our community include: * Demonstrating empathy and kindness toward other people * Being respectful of differing opinions, viewpoints, and experiences * Giving and gracefully accepting constructive feedback * Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience * Focusing on what is best not just for us as individuals, but for the overall community Examples of unacceptable behavior include: * The use of sexualized language or imagery, and sexual attention or advances of any kind * Trolling, insulting or derogatory comments, and personal or political attacks * Public or private harassment * Publishing others' private information, such as a physical or email address, without their explicit permission * Other conduct which could reasonably be considered inappropriate in a professional setting ## Enforcement Responsibilities Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful. Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate. ## Scope This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official email address, posting via an official social media account, or acting as an appointed representative at an online or offline event. ## Enforcement Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at [![Contact BDFL][🚂bdfl-contact-img]][🚂bdfl-contact]. All complaints will be reviewed and investigated promptly and fairly. All community leaders are obligated to respect the privacy and security of the reporter of any incident. ## Enforcement Guidelines Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct: ### 1. Correction **Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community. **Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested. ### 2. Warning **Community Impact**: A violation through a single incident or series of actions. **Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban. ### 3. Temporary Ban **Community Impact**: A serious violation of community standards, including sustained inappropriate behavior. **Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban. ### 4. Permanent Ban **Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals. **Consequence**: A permanent ban from any sort of public interaction within the community. ## Attribution This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.1, available at [https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1]. Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder][Mozilla CoC]. For answers to common questions about this code of conduct, see the FAQ at [https://www.contributor-covenant.org/faq][FAQ]. Translations are available at [https://www.contributor-covenant.org/translations][translations]. [homepage]: https://www.contributor-covenant.org [v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html [Mozilla CoC]: https://github.com/mozilla/diversity [FAQ]: https://www.contributor-covenant.org/faq [translations]: https://www.contributor-covenant.org/translations [🚂bdfl-contact]: http://www.railsbling.com/contact [🚂bdfl-contact-img]: https://img.shields.io/badge/Contact-BDFL-0093D0.svg?style=flat&logo=rubyonrails&logoColor=red rspec-stubbed_env-1.0.4/CONTRIBUTING.md000066400000000000000000000130401504431001300173440ustar00rootroot00000000000000# Contributing Bug reports and pull requests are welcome on GitHub, CodeBerg, or [GitLab][🚎src-main]. This project should be a safe, welcoming space for collaboration, so contributors agree to adhere to the [code of conduct][🤝conduct]. To submit a patch, please fork the project, create a patch with tests, and send a pull request. Remember to [![Keep A Changelog][📗keep-changelog-img]][📗keep-changelog]. ## Help out! Take a look at the `reek` list which is the file called `REEK` and find something to improve. Follow these instructions: 1. Fork the repository 2. Create a feature branch (`git checkout -b my-new-feature`) 3. Make some fixes. 4. Commit changes (`git commit -am 'Added some feature'`) 5. Push to the branch (`git push origin my-new-feature`) 6. Make sure to add tests for it. This is important, so it doesn't break in a future release. 7. Create new Pull Request. ## Appraisals From time to time the Appraisal2 gemfiles in `gemfiles/` will need to be updated. They are created and updated with the commands: ```console BUNDLE_GEMFILE=Appraisal.root.gemfile bundle BUNDLE_GEMFILE=Appraisal.root.gemfile bundle exec appraisal update bundle exec rake rubocop_gradual:autocorrect ``` When adding an appraisal to CI check the [runner tool cache][đŸƒâ€â™‚ī¸runner-tool-cache] to see which runner to use. ## The Reek List Take a look at the `reek` list which is the file called `REEK` and find something to improve. To refresh the `reek` list: ```console bundle exec reek > REEK ``` ## Run Tests To run all tests ```console bundle exec rake test ``` ## Lint It Run all the default tasks, which includes running the gradually autocorrecting linter, `rubocop-gradual`. ```console bundle exec rake ``` Or just run the linter. ```console bundle exec rake rubocop_gradual:autocorrect ``` ## Contributors Your picture could be here! [![Contributors][🖐contributors-img]][🖐contributors] Made with [contributors-img][🖐contrib-rocks]. Also see GitLab Contributors: [https://gitlab.com/galtzo-floss/rspec-stubbed_env/-/graphs/main][🚎contributors-gl] ## For Maintainers ### One-time, Per-maintainer, Setup **IMPORTANT**: If you want to sign the build you create, your public key for signing gems will need to be picked up by the line in the `gemspec` defining the `spec.cert_chain` (check the relevant ENV variables there). All releases to RubyGems.org will be signed. See: [RubyGems Security Guide][đŸ”’ī¸rubygems-security-guide] NOTE: To build without signing the gem you must set `SKIP_GEM_SIGNING` to some value in your environment. ### To release a new version: 1. Run `bin/setup && bin/rake` as a "test, coverage, & linting" sanity check 2. Update the version number in `version.rb`, and ensure `CHANGELOG.md` reflects changes 3. Run `bin/setup && bin/rake` again as a secondary check, and to update `Gemfile.lock` 4. Run `git commit -am "🔖 Prepare release v"` to commit the changes 5. Run `git push` to trigger the final CI pipeline before release, and merge PRs - NOTE: Remember to [check the build][đŸ§Ēbuild]. 6. Run `export GIT_TRUNK_BRANCH_NAME="$(git remote show origin | grep 'HEAD branch' | cut -d ' ' -f5)" && echo $GIT_TRUNK_BRANCH_NAME` 7. Run `git checkout $GIT_TRUNK_BRANCH_NAME` 8. Run `git pull origin $GIT_TRUNK_BRANCH_NAME` to ensure latest trunk code 9. Set `SOURCE_DATE_EPOCH` so `rake build` and `rake release` use same timestamp, and generate same checksums - Run `export SOURCE_DATE_EPOCH=$EPOCHSECONDS && echo $SOURCE_DATE_EPOCH` - If the echo above has no output, then it didn't work. - Note: `zsh/datetime` module is needed, if running `zsh`. - In older versions of `bash` you can use `date +%s` instead, i.e. `export SOURCE_DATE_EPOCH=$(date +%s) && echo $SOURCE_DATE_EPOCH` 10. Run `bundle exec rake build` 11. Run `bin/gem_checksums` (more context [1][đŸ”’ī¸rubygems-checksums-pr], [2][đŸ”’ī¸rubygems-guides-pr]) to create SHA-256 and SHA-512 checksums. This functionality is provided by the `stone_checksums` [gem][💎stone_checksums]. - The script automatically commits but does not push the checksums 12. Run `bundle exec rake release` which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org][💎rubygems] [🚎src-main]: https://gitlab.com/galtzo-floss/rspec-stubbed_env [đŸ§Ēbuild]: https://github.com/galtzo-floss/rspec-stubbed_env/actions [🤝conduct]: https://gitlab.com/galtzo-floss/rspec-stubbed_env/-/blob/main/CODE_OF_CONDUCT.md [🖐contrib-rocks]: https://contrib.rocks [🖐contributors]: https://github.com/galtzo-floss/rspec-stubbed_env/graphs/contributors [🚎contributors-gl]: https://gitlab.com/galtzo-floss/rspec-stubbed_env/-/graphs/main [🖐contributors-img]: https://contrib.rocks/image?repo=galtzo-floss/rspec-stubbed_env [💎rubygems]: https://rubygems.org [đŸ”’ī¸rubygems-security-guide]: https://guides.rubygems.org/security/#building-gems [đŸ”’ī¸rubygems-checksums-pr]: https://github.com/rubygems/rubygems/pull/6022 [đŸ”’ī¸rubygems-guides-pr]: https://github.com/rubygems/guides/pull/325 [💎stone_checksums]: https://github.com/galtzo-floss/stone_checksums [📗keep-changelog]: https://keepachangelog.com/en/1.0.0/ [📗keep-changelog-img]: https://img.shields.io/badge/keep--a--changelog-1.0.0-FFDD67.svg?style=flat [📌semver-breaking]: https://github.com/semver/semver/issues/716#issuecomment-869336139 [📌major-versions-not-sacred]: https://tom.preston-werner.com/2022/05/23/major-version-numbers-are-not-sacred.html [đŸƒâ€â™‚ī¸runner-tool-cache]: https://github.com/ruby/ruby-builder/releases/tag/toolcache rspec-stubbed_env-1.0.4/Gemfile000066400000000000000000000021021504431001300164030ustar00rootroot00000000000000# frozen_string_literal: true source "https://rubygems.org" git_source(:github) { |repo_name| "https://github.com/#{repo_name}" } git_source(:gitlab) { |repo_name| "https://gitlab.com/#{repo_name}" } #### IMPORTANT ####################################################### # Gemfile is for local development ONLY; Gemfile is NOT loaded in CI # ####################################################### IMPORTANT #### # Include dependencies from .gemspec gemspec platform :mri do # Debugging - Ensure ENV["DEBUG"] == "true" to use debuggers within spec suite # Use binding.break, binding.b, or debugger in code gem "debug", ">= 1.0.0" # ruby >= 2.7 gem "gem_bench", "~> 2.0", ">= 2.0.5" # Dev Console - Binding.pry - Irb replacement gem "pry", "~> 0.14" # ruby >= 2.0 end # Security Audit eval_gemfile "gemfiles/modular/audit.gemfile" # Code Coverage eval_gemfile "gemfiles/modular/coverage.gemfile" # Linting eval_gemfile "gemfiles/modular/style.gemfile" # Documentation eval_gemfile "gemfiles/modular/documentation.gemfile" rspec-stubbed_env-1.0.4/Gemfile.lock000066400000000000000000000162761504431001300173530ustar00rootroot00000000000000GIT remote: https://github.com/pboling/yard-junk revision: 54ccebabbfa9a9cd44d0b991687ebbfd22c32b55 branch: next specs: yard-junk (0.0.10) backports (>= 3.18) benchmark ostruct rainbow yard PATH remote: . specs: rspec-stubbed_env (1.0.4) GEM remote: https://rubygems.org/ specs: ansi (1.5.0) appraisal2 (3.0.0) bundler (>= 1.17.3) rake (>= 10) thor (>= 0.14) ast (2.4.3) backports (3.25.1) benchmark (0.4.1) bigdecimal (3.2.2) bundler-audit (0.9.2) bundler (>= 1.2.0, < 3) thor (~> 1.0) coderay (1.1.3) concurrent-ruby (1.3.5) date (3.4.1) debug (1.11.0) irb (~> 1.10) reline (>= 0.3.8) diff-lcs (1.6.2) diffy (3.4.4) docile (1.4.1) dry-configurable (1.3.0) dry-core (~> 1.1) zeitwerk (~> 2.6) dry-core (1.1.0) concurrent-ruby (~> 1.0) logger zeitwerk (~> 2.6) dry-inflector (1.2.0) dry-initializer (3.2.0) dry-logic (1.6.0) bigdecimal concurrent-ruby (~> 1.0) dry-core (~> 1.1) zeitwerk (~> 2.6) dry-schema (1.14.1) concurrent-ruby (~> 1.0) dry-configurable (~> 1.0, >= 1.0.1) dry-core (~> 1.1) dry-initializer (~> 3.2) dry-logic (~> 1.5) dry-types (~> 1.8) zeitwerk (~> 2.6) dry-types (1.8.3) bigdecimal (~> 3.0) concurrent-ruby (~> 1.0) dry-core (~> 1.0) dry-inflector (~> 1.0) dry-logic (~> 1.4) zeitwerk (~> 2.6) erb (5.0.2) gem_bench (2.0.5) bundler (>= 1.14) version_gem (~> 1.1, >= 1.1.4) io-console (0.8.1) irb (1.15.2) pp (>= 0.6.0) rdoc (>= 4.0.0) reline (>= 0.4.2) json (2.13.2) kettle-soup-cover (1.0.10) simplecov (~> 0.22) simplecov-cobertura (~> 3.0) simplecov-console (~> 0.9, >= 0.9.3) simplecov-html (~> 0.13, >= 0.13.1) simplecov-lcov (~> 0.8) simplecov-rcov (~> 0.3, >= 0.3.7) simplecov_json_formatter (~> 0.1, >= 0.1.4) version_gem (~> 1.1, >= 1.1.8) kramdown (2.5.1) rexml (>= 3.3.9) kramdown-parser-gfm (1.1.0) kramdown (~> 2.0) language_server-protocol (3.17.0.5) lint_roller (1.1.0) logger (1.7.0) method_source (1.1.0) nokogiri (1.18.9-arm64-darwin) racc (~> 1.4) nokogiri (1.18.9-x86_64-linux-gnu) racc (~> 1.4) ostruct (0.6.3) parallel (1.27.0) parser (3.3.9.0) ast (~> 2.4.1) racc pp (0.6.2) prettyprint prettyprint (0.2.0) prism (1.4.0) pry (0.15.2) coderay (~> 1.1) method_source (~> 1.0) psych (5.2.6) date stringio racc (1.8.1) rainbow (3.1.1) rake (13.3.0) rdoc (6.14.2) erb psych (>= 4.0.0) reek (6.5.0) dry-schema (~> 1.13) logger (~> 1.6) parser (~> 3.3.0) rainbow (>= 2.0, < 4.0) rexml (~> 3.1) regexp_parser (2.10.0) reline (0.6.2) io-console (~> 0.5) rexml (3.4.1) rspec (3.13.1) rspec-core (~> 3.13.0) rspec-expectations (~> 3.13.0) rspec-mocks (~> 3.13.0) rspec-block_is_expected (1.0.6) rspec-core (3.13.5) rspec-support (~> 3.13.0) rspec-expectations (3.13.5) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.13.0) rspec-mocks (3.13.5) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.13.0) rspec-support (3.13.4) rspec_junit_formatter (0.6.0) rspec-core (>= 2, < 4, != 2.12.0) rubocop (1.75.8) json (~> 2.3) language_server-protocol (~> 3.17.0.2) lint_roller (~> 1.1.0) parallel (~> 1.10) parser (>= 3.3.0.2) rainbow (>= 2.2.2, < 4.0) regexp_parser (>= 2.9.3, < 3.0) rubocop-ast (>= 1.44.0, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 2.4.0, < 4.0) rubocop-ast (1.46.0) parser (>= 3.3.7.2) prism (~> 1.4) rubocop-gradual (0.3.6) diff-lcs (>= 1.2.0, < 2.0) diffy (~> 3.0) parallel (~> 1.10) rainbow (>= 2.2.2, < 4.0) rubocop (~> 1.0) rubocop-lts (0.1.1) rubocop-ruby1_8 (>= 1.0.5, < 2) standard-rubocop-lts (>= 1.0.3, < 3) version_gem (>= 1.1.2, < 3) rubocop-md (1.2.4) rubocop (>= 1.45) rubocop-packaging (0.6.0) lint_roller (~> 1.1.0) rubocop (>= 1.72.1, < 2.0) rubocop-performance (1.25.0) lint_roller (~> 1.1) rubocop (>= 1.75.0, < 2.0) rubocop-ast (>= 1.38.0, < 2.0) rubocop-rake (0.7.1) lint_roller (~> 1.1) rubocop (>= 1.72.1) rubocop-rspec (3.6.0) lint_roller (~> 1.1) rubocop (~> 1.72, >= 1.72.1) rubocop-ruby1_8 (1.0.7) rubocop-gradual (~> 0.3, >= 0.3.1) rubocop-md (~> 1.2) rubocop-rake (~> 0.6) rubocop-shopify (~> 2.14) rubocop-thread_safety (~> 0.5, >= 0.5.1) standard-rubocop-lts (~> 1.0, >= 1.0.7) version_gem (>= 1.1.3, < 3) rubocop-shopify (2.17.1) rubocop (~> 1.62) rubocop-thread_safety (0.7.3) lint_roller (~> 1.1) rubocop (~> 1.72, >= 1.72.1) rubocop-ast (>= 1.44.0, < 2.0) ruby-progressbar (1.13.0) simplecov (0.22.0) docile (~> 1.1) simplecov-html (~> 0.11) simplecov_json_formatter (~> 0.1) simplecov-cobertura (3.0.0) rexml simplecov (~> 0.19) simplecov-console (0.9.4) ansi simplecov terminal-table simplecov-html (0.13.2) simplecov-lcov (0.8.0) simplecov-rcov (0.3.7) simplecov (>= 0.4.1) simplecov_json_formatter (0.1.4) standard (1.50.0) language_server-protocol (~> 3.17.0.2) lint_roller (~> 1.0) rubocop (~> 1.75.5) standard-custom (~> 1.0.0) standard-performance (~> 1.8) standard-custom (1.0.2) lint_roller (~> 1.0) rubocop (~> 1.50) standard-performance (1.8.0) lint_roller (~> 1.1) rubocop-performance (~> 1.25.0) standard-rubocop-lts (1.0.10) rspec-block_is_expected (~> 1.0, >= 1.0.5) standard (>= 1.35.1, < 2) standard-custom (>= 1.0.2, < 2) standard-performance (>= 1.3.1, < 2) version_gem (>= 1.1.4, < 3) stone_checksums (1.0.0) version_gem (>= 1.1.5, < 3) stringio (3.1.7) terminal-table (4.0.0) unicode-display_width (>= 1.1.1, < 4) thor (1.4.0) unicode-display_width (3.1.4) unicode-emoji (~> 4.0, >= 4.0.4) unicode-emoji (4.0.4) version_gem (1.1.8) yard (0.9.37) yard-relative_markdown_links (0.5.0) nokogiri (>= 1.14.3, < 2) zeitwerk (2.7.3) PLATFORMS arm64-darwin-22 x86_64-linux DEPENDENCIES appraisal2 (~> 3.0) benchmark (~> 0.4, >= 0.4.1) bundler-audit (~> 0.9.2) debug (>= 1.0.0) gem_bench (~> 2.0, >= 2.0.5) kettle-soup-cover (~> 1.0, >= 1.0.6) kramdown (~> 2.5, >= 2.5.1) kramdown-parser-gfm (~> 1.1) pry (~> 0.14) rake (~> 13.0) rdoc (~> 6.11) reek (~> 6.4) rspec (~> 3.13) rspec-block_is_expected (~> 1.0) rspec-stubbed_env! rspec_junit_formatter (~> 0.6) rubocop (~> 1.73, >= 1.73.2) rubocop-lts (~> 0.1, >= 0.1.1) rubocop-packaging (~> 0.6, >= 0.6.0) rubocop-rspec (~> 3.2) standard (>= 1.50) stone_checksums (~> 1.0) yard (~> 0.9, >= 0.9.37) yard-junk (~> 0.0, >= 0.0.10)! yard-relative_markdown_links (~> 0.5.0) BUNDLED WITH 2.7.1 rspec-stubbed_env-1.0.4/LICENSE.txt000066400000000000000000000021431504431001300167400ustar00rootroot00000000000000Copyright Š 2014 LittlOwlLabs Copyright Š 2018-2020, 2023 - 2025 Peter Boling of railsbling.com 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. rspec-stubbed_env-1.0.4/README.md000066400000000000000000001062751504431001300164070ustar00rootroot00000000000000[![Galtzo FLOSS Logo by Aboling0, CC BY-SA 4.0][đŸ–ŧī¸galtzo-i]][đŸ–ŧī¸logos] [![rspec Logo by Ninefold, a Macquarie Telecom company, CC BY-NC-SA 4.0][đŸ–ŧī¸rspec-i]][đŸ–ŧī¸rspec] [![ruby-lang Logo, Yukihiro Matsumoto, Ruby Visual Identity Team, CC BY-SA 2.5][đŸ–ŧī¸ruby-lang-i]][đŸ–ŧī¸ruby-lang] [![rspec-stubbed_env Logo by Aboling0, CC BY-SA 4.0][đŸ–ŧī¸rspec-stubbed_env-i]][đŸ–ŧī¸rspec-stubbed_env] [đŸ–ŧī¸galtzo-i]: https://logos.galtzo.com/assets/images/galtzo-floss/avatar-192px.svg [đŸ–ŧī¸logos]: https://github.com/galtzo-floss [đŸ–ŧī¸rspec-i]: https://logos.galtzo.com/assets/images/rspec/avatar-192px.svg [đŸ–ŧī¸rspec]: https://github.com/rspec [đŸ–ŧī¸ruby-lang-i]: https://logos.galtzo.com/assets/images/ruby-lang/avatar-192px.svg [đŸ–ŧī¸ruby-lang]: https://github.com/ruby-lang [đŸ–ŧī¸rspec-stubbed_env-i]: https://logos.galtzo.com/assets/images/galtzo-floss/rspec-stubbed_env/avatar-192px.svg [đŸ–ŧī¸rspec-stubbed_env]: https://github.com/galtzo-floss/rspec-stubbed_env # đŸĢĨ RSpec::StubbedEnv [![Version][đŸ‘Ŋversioni]][đŸ‘Ŋversion] [![License: MIT][📄license-img]][📄license-ref] [![Downloads Rank][đŸ‘Ŋdl-ranki]][đŸ‘Ŋdl-rank] [![Open Source Helpers][đŸ‘Ŋoss-helpi]][đŸ‘Ŋoss-help] [![Depfu][🔑depfuiâ™ģī¸]][🔑depfu] [![Coveralls Test Coverage][🔑coveralls-img]][🔑coveralls] [![CodeCov Test Coverage][🔑codecoviâ™ģī¸]][🔑codecov] [![QLTY Test Coverage][🔑qlty-covi]][🔑qlty-cov] [![QLTY Maintainability][🔑qlty-mnti]][🔑qlty-mnt] [![CI Heads][🚎3-hd-wfi]][🚎3-hd-wf] [![CI Current][🚎11-c-wfi]][🚎11-c-wf] [![CI Truffle Ruby][🚎9-t-wfi]][🚎9-t-wf] [![CI JRuby][🚎10-j-wfi]][🚎10-j-wf] [![Deps Locked][🚎13-đŸ”’ī¸-wfi]][🚎13-đŸ”’ī¸-wf] [![Deps Unlocked][🚎14-đŸ”“ī¸-wfi]][🚎14-đŸ”“ī¸-wf] [![CI Supported][🚎6-s-wfi]][🚎6-s-wf] [![CI Legacy][🚎4-lg-wfi]][🚎4-lg-wf] [![CI Unsupported][🚎7-us-wfi]][🚎7-us-wf] [![CI Ancient][🚎1-an-wfi]][🚎1-an-wf] [![CI Test Coverage][🚎2-cov-wfi]][🚎2-cov-wf] [![CI Style][🚎5-st-wfi]][🚎5-st-wf] --- [![Liberapay Goal Progress][â›ŗliberapay-img]][â›ŗliberapay] [![Sponsor Me on Github][🖇sponsor-img]][🖇sponsor] [![Buy me a coffee][🖇buyme-small-img]][🖇buyme] [![Donate on Polar][🖇polar-img]][🖇polar] [![Donate to my FLOSS or refugee efforts at ko-fi.com][🖇kofi-img]][🖇kofi] [![Donate to my FLOSS or refugee efforts using Patreon][🖇patreon-img]][🖇patreon] ## đŸŒģ Synopsis An `ENV` stubbing / hiding library for sophisticated RSpec test suites. * ENV stubbing and hiding via shared contexts for more powerful tests * ENV hiding via `hide_env("FOO")` was added in v1.0.2 * No need to add `dotenv` just for the spec suite ```ruby describe "my stubbed test" do include_context "with stubbed env" include_context "with hidden env" context "with FOO=is bar" do before do stub_env("FOO" => "is bar") end it "has a value" do expect(ENV.fetch("FOO", nil)).to(eq("is bar")) expect(ENV.fetch("FOO")).to(eq("is bar")) expect(ENV["FOO"]).to(eq("is bar")) end end context "without BAR set" do before do hide_env("BAR") end it "is nil" do expect(ENV.fetch("BAR", nil)).to(be_nil) expect(ENV["BAR"]).to(be_nil) end it "raises error" do expect { ENV.fetch("BAR") }.to(raise_error(KeyNotFound)) end end end ``` This gem has no runtime dependencies. ## 💡 Info you can shake a stick at ### Federated DVCS
Find this repo on other forges | Federated [DVCS][💎d-in-dvcs] Repository | Status | Issues | PRs | Wiki | CI | Discussions | |--------------------------------------------------------|-------------------------------------------------------------------|---------------------------|--------------------------|---------------------------|--------------------------|------------------------------| | đŸ§Ē [galtzo-floss/rspec-stubbed_env on GitLab][📜src-gl] | The Truth | [💚][🤝gl-issues] | [💚][🤝gl-pulls] | [💚][📜wiki] | 🏀 Tiny Matrix | ➖ | | 🧊 [galtzo-floss/rspec-stubbed_env on CodeBerg][📜src-cb] | An Ethical Mirror ([Donate][🤝cb-donate]) | [💚][🤝cb-issues] | [💚][🤝cb-pulls] | ➖ | â­•ī¸ No Matrix | ➖ | | 🐙 [galtzo-floss/rspec-stubbed_env on GitHub][📜src-gh] | A Dirty Mirror | [💚][🤝gh-issues] | [💚][🤝gh-pulls] | ➖ | đŸ’¯ Full Matrix | [💚][gh-discussions] | | đŸŽŽī¸ [Discord Server][âœ‰ī¸discord-invite] | [![Live Chat on Discord][âœ‰ī¸discord-invite-img]][âœ‰ī¸discord-invite] | [Let's][âœ‰ī¸discord-invite] | [talk][âœ‰ī¸discord-invite] | [about][âœ‰ī¸discord-invite] | [this][âœ‰ī¸discord-invite] | [library!][âœ‰ī¸discord-invite] |
[gh-discussions]: https://github.com/galtzo-floss/rspec-stubbed_env/discussions ### Enterprise Support
Need enterprise-level guarantees? [![Get help from me on Tidelift][đŸ™ī¸entsup-tidelift-img]][đŸ™ī¸entsup-tidelift] - 💡Subscribe for support guarantees covering _all_ FLOSS dependencies - 💡Tidelift is part of [Sonar][đŸ™ī¸entsup-tidelift-sonar] - 💡Tidelift pays maintainers to maintain the software you depend on!
📊`@`Pointy Haired Boss: An [enterprise support][đŸ™ī¸entsup-tidelift] subscription is "[never gonna let you down][🧮kloc]", and *supports* open source maintainers Alternatively: - [![Live Chat on Discord][âœ‰ī¸discord-invite-img]][âœ‰ī¸discord-invite] - [![Get help from me on Upwork][👨đŸŧ‍đŸĢexpsup-upwork-img]][👨đŸŧ‍đŸĢexpsup-upwork] - [![Get help from me on Codementor][👨đŸŧ‍đŸĢexpsup-codementor-img]][👨đŸŧ‍đŸĢexpsup-codementor]
| Tokens to Remember | [![Gem name][â›ŗī¸name-img]][â›ŗī¸gem-name] [![Gem namespace][â›ŗī¸namespace-img]][â›ŗī¸gem-namespace] | |-------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | Works with JRuby | [![JRuby 9.1 Compat][💎jruby-9.1i]][🚎10-j-wf] [![JRuby 9.2 Compat][💎jruby-9.2i]][🚎10-j-wf] [![JRuby 9.3 Compat][💎jruby-9.3i]][🚎10-j-wf] [![JRuby 9.4 Compat][💎jruby-9.4i]][🚎10-j-wf] [![JRuby 10.0 Compat][💎jruby-c-i]][🚎11-c-wf] [![JRuby HEAD Compat][💎jruby-headi]][🚎3-hd-wf] | | Works with Truffle Ruby | [![Truffle Ruby 22.3 Compat][💎truby-22.3i]][🚎9-t-wf] [![Truffle Ruby 23.0 Compat][💎truby-23.0i]][🚎9-t-wf] [![Truffle Ruby 23.1 Compat][💎truby-23.1i]][🚎9-t-wf] [![Truffle Ruby 24.1 Compat][💎truby-c-i]][🚎11-c-wf] | | Works with MRI Ruby 3 | [![Ruby 3.0 Compat][💎ruby-3.0i]][🚎4-lg-wf] [![Ruby 3.1 Compat][💎ruby-3.1i]][🚎6-s-wf] [![Ruby 3.2 Compat][💎ruby-3.2i]][🚎6-s-wf] [![Ruby 3.3 Compat][💎ruby-3.3i]][🚎6-s-wf] [![Ruby 3.4 Compat][💎ruby-c-i]][🚎11-c-wf] [![Ruby HEAD Compat][💎ruby-headi]][🚎3-hd-wf] | | Works with MRI Ruby 2 | [![Ruby 2.3 Compat][💎ruby-2.3i]][🚎1-an-wf] [![Ruby 2.4 Compat][💎ruby-2.4i]][🚎1-an-wf] [![Ruby 2.5 Compat][💎ruby-2.5i]][🚎1-an-wf] [![Ruby 2.6 Compat][💎ruby-2.6i]][🚎7-us-wf] [![Ruby 2.7 Compat][💎ruby-2.7i]][🚎7-us-wf] | | Source | [![Source on GitLab.com][📜src-gl-img]][📜src-gl] [![Source on CodeBerg.org][📜src-cb-img]][📜src-cb] [![Source on Github.com][📜src-gh-img]][📜src-gh] [![The best SHA: dQw4w9WgXcQ!][🧮kloc-img]][🧮kloc] | | Documentation | [![Current release on RubyDoc.info][📜docs-cr-rd-img]][🚎yard-current] [![YARD on Galtzo.com][📜docs-head-rd-img]][🚎yard-head] [![BDFL Blog][🚂bdfl-blog-img]][🚂bdfl-blog] [![Wiki][📜wiki-img]][📜wiki] | | Compliance | [![License: MIT][📄license-img]][📄license-ref] [![📄ilo-declaration-img]][📄ilo-declaration] [![Security Policy][🔐security-img]][🔐security] [![Contributor Covenant 2.1][đŸĒ‡conduct-img]][đŸĒ‡conduct] [![SemVer 2.0.0][📌semver-img]][📌semver] | | Style | [![Enforced Code Style Linter][💎rlts-img]][💎rlts] [![Keep-A-Changelog 1.0.0][📗keep-changelog-img]][📗keep-changelog] [![Gitmoji Commits][📌gitmoji-img]][📌gitmoji] | | Support | [![Live Chat on Discord][âœ‰ī¸discord-invite-img]][âœ‰ī¸discord-invite] [![Get help from me on Upwork][👨đŸŧ‍đŸĢexpsup-upwork-img]][👨đŸŧ‍đŸĢexpsup-upwork] [![Get help from me on Codementor][👨đŸŧ‍đŸĢexpsup-codementor-img]][👨đŸŧ‍đŸĢexpsup-codementor] | | Comrade BDFL đŸŽ–ī¸ | [![Follow Me on LinkedIn][💖🖇linkedin-img]][💖🖇linkedin] [![Follow Me on Ruby.Social][💖🐘ruby-mast-img]][💖🐘ruby-mast] [![Follow Me on Bluesky][💖đŸĻ‹bluesky-img]][💖đŸĻ‹bluesky] [![Contact BDFL][🚂bdfl-contact-img]][🚂bdfl-contact] [![My technical writing][💖💁đŸŧâ€â™‚ī¸devto-img]][💖💁đŸŧâ€â™‚ī¸devto] | | `...` 💖 | [![Find Me on WellFound:][đŸ’–âœŒī¸wellfound-img]][đŸ’–âœŒī¸wellfound] [![Find Me on CrunchBase][💖💲crunchbase-img]][💖💲crunchbase] [![My LinkTree][đŸ’–đŸŒŗlinktree-img]][đŸ’–đŸŒŗlinktree] [![More About Me][💖💁đŸŧâ€â™‚ī¸aboutme-img]][💖💁đŸŧâ€â™‚ī¸aboutme] [🧊][💖🧊berg] [🐙][💖🐙hub] [🛖][💖🛖hut] [đŸ§Ē][💖đŸ§Ēlab] | ## ✨ Installation Install the gem and add to the application's Gemfile by executing: $ bundle add rspec-stubbed_env If bundler is not being used to manage dependencies, install the gem by executing: $ gem install rspec-stubbed_env ### 🔒 Secure Installation
For Medium or High Security Installations `rspec-stubbed_env` is cryptographically signed, and has verifiable [SHA-256 and SHA-512][💎SHA_checksums] checksums by [stone_checksums][💎stone_checksums]. Be sure the gem you install hasn’t been tampered with by following the instructions below. Add my public key (if you haven’t already, expires 2045-04-29) as a trusted certificate: ```console 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: ```console gem install rspec-stubbed_env -P HighSecurity ``` 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: ```console bundle config set --global trust-policy MediumSecurity ``` `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.
## 🔧 Basic Usage You must configure RSpec to use the `:expect` syntax, or some compatible alternative. ```ruby RSpec.configure do |config| config.expect_with(:rspec) do |c| c.syntax = :expect end end ``` Require the library in your spec/test helper somewhere: ```ruby require "rspec/stubbed_env" ``` ### ENV stubbing - is opt-in, via a shared context, rather than global. - *does not* affect the real ENV at all. It is a true stub. - has the same scope as a `before`, `subject`, or `let` at the same level. See the spec suite for detailed examples. ```ruby # This is normal, without stubbing, ENV is not set describe "vanilla" do it "has no ENV stub" do expect(ENV.fetch("FOO", nil)).to(be_nil) expect(ENV["FOO"]).to(be_nil) end end # With a stubbed ENV! describe "my stubbed test" do include_context "with stubbed env" before do stub_env("FOO" => "is bar") end it "has a value" do expect(ENV.fetch("FOO", nil)).to(eq("is bar")) expect(ENV["FOO"]).to(eq("is bar")) end end ``` ENV can be stubbed trough the `stub_env` method, or key/value pairs to be stubbed can be provided directly to the `include_context` call: ```ruby describe "my stubbed test" do include_context "with stubbed env", "FOO" => "is bar" it "has a value" do expect(ENV.fetch("FOO", nil)).to(eq("is bar")) expect(ENV["FOO"]).to(eq("is bar")) end end ``` If you want to make `stub_env` method available globally (without the `include_context` call), you can add in the `spec_helper`. I do not recommend the _global_ approach, as it results in a loss of clarity on which tests are testing ENV-based behaviors. Here's a foot-gun if you want it. ```ruby RSpec.configure do |config| config.include(RSpec::StubbedEnv::StubHelpers) # Or you could include the context globally # config.include_context "with stubbed env" end ``` ### ENV hiding - is opt-in, via a shared context, rather than global. - *does not* affect the real ENV at all. It is a true stub. - has the same scope as a `before`, `subject`, or `let` at the same level. See the spec suite for detailed examples. ```ruby # This is normal, without hiding, ENV is set ENV["MY_PATH"] = "/home/doodle" describe "vanilla" do it "has ENV with nothing hidden" do expect(ENV.fetch("MY_PATH", nil)).to("/home/doodle") expect(ENV["MY_PATH"]).to("/home/doodle") end end # With a hidden ENV variable! describe "my hidden test" do include_context "with hidden env" before do hide_env("MY_PATH") end it "MY_PATH is not set" do expect(ENV.fetch("MY_PATH", nil)).to(be_nil) expect(ENV["MY_PATH"]).to(be_nil) end end ``` ENV variables can be hidden trough the `hide_env` method, or variable names to be hidden can be provided directly to the `include_context` call: ```ruby describe "my hidden test" do include_context "with hidden env", "MY_PATH" it "MY_PATH is not set" do expect(ENV.fetch("MY_PATH", nil)).to(be_nil) expect(ENV["MY_PATH"]).to(be_nil) end end ``` If you want to make `hide_env` method available globally (without the `include_context` call), you can add in the `spec_helper`: I do not recommend the _global_ approach, as it results in a loss of clarity on which tests are testing ENV-based behaviors. Here's a foot-gun if you want it. ```ruby RSpec.configure do |config| config.include(RSpec::StubbedEnv::HideHelpers) # Or you could include the context globally # config.include_context "with hidden env" end ``` ## 🚚 Switch to `main` branch We migrated from `master` to `main` as the default branch. If this affected your local checkout: ```console git branch -m master main git fetch origin git branch -u origin/main main git remote set-head origin -a ``` ### 🚀 Release Instructions See [CONTRIBUTING.md][🤝contributing]. ## 🔐 Security See [SECURITY.md][🔐security]. ## 🤝 Contributing If you need some ideas of where to help, you could work on adding more code coverage, or if it is already đŸ’¯ (see [below](#code-coverage)) check [issues][🤝gh-issues], or [PRs][🤝gh-pulls], or use the gem and think about how it could be better. We [![Keep A Changelog][📗keep-changelog-img]][📗keep-changelog] so if you make changes, remember to update it. See [CONTRIBUTING.md][🤝contributing] for more detailed instructions. ### Code Coverage [![Coverage Graph][🔑codecov-gâ™ģī¸]][🔑codecov] [![Coveralls Test Coverage][🔑coveralls-img]][🔑coveralls] ### đŸĒ‡ Code of Conduct Everyone interacting in this project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [![Contributor Covenant 2.1][đŸĒ‡conduct-img]][đŸĒ‡conduct]. ## 🌈 Contributors [![Contributors][🖐contributors-img]][🖐contributors] Made with [contributors-img][🖐contrib-rocks]. Also see GitLab Contributors: [https://gitlab.com/galtzo-floss/rspec-stubbed_env/-/graphs/main][🚎contributors-gl] ## â­ī¸ Star History Star History Chart ## 📌 Versioning This Library adheres to [![Semantic Versioning 2.0.0][📌semver-img]][📌semver]. Violations of this scheme should be reported as bugs. Specifically, if a minor or patch version is released that breaks backward compatibility, a new version should be immediately released that restores compatibility. Breaking changes to the public API will only be introduced with new major versions. ### 📌 Is "Platform Support" part of the public API? Yes. But I'm obligated to include notes... SemVer should, but doesn't explicitly, say that dropping support for specific Platforms is a *breaking change* to an API. It is obvious to many, but not all, and since the spec is silent, the bike shedding is endless. > dropping support for a platform is both obviously and objectively a breaking change - Jordan Harband (@ljharb, maintainer of SemVer) [in SemVer issue 716][📌semver-breaking] To get a better understanding of how SemVer is intended to work over a project's lifetime, read this article from the creator of SemVer: - ["Major Version Numbers are Not Sacred"][📌major-versions-not-sacred] As a result of this policy, and the interpretive lens used by the maintainer, you can (and should) specify a dependency on these libraries using the [Pessimistic Version Constraint][📌pvc] with two digits of precision. For example: ```ruby spec.add_dependency("rspec-stubbed_env", "~> 1.0") ``` See [CHANGELOG.md][📌changelog] for list of releases. ## 📄 License The gem is available as open source under the terms of the [MIT License][📄license] [![License: MIT][📄license-img]][📄license-ref]. See [LICENSE.txt][📄license] for the official [Copyright Notice][📄copyright-notice-explainer]. ### Š Copyright
  • Copyright (c) 2018-2020, 2024-2025 Peter H. Boling, of Galtzo.com Galtzo.com Logo (Wordless) by Aboling0, CC BY-SA 4.0 , and rspec-stubbed_env contributors
## 🤑 One more thing Having arrived at the bottom of the page, please endure a final supplication. The primary maintainer of this gem, Peter Boling, wants Ruby to be a great place for people to solve problems, big and small. Please consider supporting his efforts via the giant yellow link below, or one of smaller ones, depending on button size preference. [![Buy me a latte][🖇buyme-img]][🖇buyme] [![Liberapay Goal Progress][â›ŗliberapay-img]][â›ŗliberapay] [![Sponsor Me on Github][🖇sponsor-img]][🖇sponsor] [![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] P.S. If you need helpī¸, or want to say thanks, 👇 Join the Discord. [![Live Chat on Discord][âœ‰ī¸discord-invite-img]][âœ‰ī¸discord-invite] [â›ŗliberapay-img]: https://img.shields.io/liberapay/goal/pboling.svg?logo=liberapay [â›ŗliberapay]: https://liberapay.com/pboling/donate [🖇sponsor-img]: https://img.shields.io/badge/Sponsor_Me!-pboling.svg?style=social&logo=github [🖇sponsor]: https://github.com/sponsors/pboling [🖇polar-img]: https://img.shields.io/badge/polar-donate-yellow.svg [🖇polar]: https://polar.sh/pboling [🖇kofi-img]: https://img.shields.io/badge/a_more_different_coffee-✓-yellow.svg [🖇kofi]: https://ko-fi.com/O5O86SNP4 [🖇patreon-img]: https://img.shields.io/badge/patreon-donate-yellow.svg [🖇patreon]: https://patreon.com/galtzo [🖇buyme-small-img]: https://img.shields.io/badge/buy_me_a_coffee-✓-yellow.svg?style=flat [🖇buyme-img]: https://img.buymeacoffee.com/button-api/?text=Buy%20me%20a%20latte&emoji=&slug=pboling&button_colour=FFDD00&font_colour=000000&font_family=Cookie&outline_colour=000000&coffee_colour=ffffff [🖇buyme]: https://www.buymeacoffee.com/pboling [âœ‰ī¸discord-invite]: https://discord.gg/3qme4XHNKN [âœ‰ī¸discord-invite-img]: https://img.shields.io/discord/1373797679469170758?style=for-the-badge [✇bundle-group-pattern]: https://gist.github.com/pboling/4564780 [â›ŗī¸gem-namespace]: https://github.com/galtzo-floss/rspec-stubbed_env [â›ŗī¸namespace-img]: https://img.shields.io/badge/namespace-RSpec%3A%3AStubbedEnv-brightgreen.svg?style=flat&logo=ruby&logoColor=white [â›ŗī¸gem-name]: https://rubygems.org/gems/rspec-stubbed_env [â›ŗī¸name-img]: https://img.shields.io/badge/name-rspec--stubbed__env-brightgreen.svg?style=flat&logo=rubygems&logoColor=red [🚂bdfl-blog]: http://www.railsbling.com/tags/rspec-stubbed_env [🚂bdfl-blog-img]: https://img.shields.io/badge/blog-railsbling-0093D0.svg?style=for-the-badge&logo=rubyonrails&logoColor=orange [🚂bdfl-contact]: http://www.railsbling.com/contact [🚂bdfl-contact-img]: https://img.shields.io/badge/Contact-BDFL-0093D0.svg?style=flat&logo=rubyonrails&logoColor=red [💖🖇linkedin]: http://www.linkedin.com/in/peterboling [💖🖇linkedin-img]: https://img.shields.io/badge/PeterBoling-LinkedIn-0B66C2?style=flat&logo=newjapanprowrestling [đŸ’–âœŒī¸wellfound]: https://angel.co/u/peter-boling [đŸ’–âœŒī¸wellfound-img]: https://img.shields.io/badge/peter--boling-orange?style=flat&logo=wellfound [💖💲crunchbase]: https://www.crunchbase.com/person/peter-boling [💖💲crunchbase-img]: https://img.shields.io/badge/peter--boling-purple?style=flat&logo=crunchbase [💖🐘ruby-mast]: https://ruby.social/@galtzo [💖🐘ruby-mast-img]: https://img.shields.io/mastodon/follow/109447111526622197?domain=https%3A%2F%2Fruby.social&style=flat&logo=mastodon&label=Ruby%20%40galtzo [💖đŸĻ‹bluesky]: https://bsky.app/profile/galtzo.com [💖đŸĻ‹bluesky-img]: https://img.shields.io/badge/@galtzo.com-0285FF?style=flat&logo=bluesky&logoColor=white [đŸ’–đŸŒŗlinktree]: https://linktr.ee/galtzo [đŸ’–đŸŒŗlinktree-img]: https://img.shields.io/badge/galtzo-purple?style=flat&logo=linktree [💖💁đŸŧâ€â™‚ī¸devto]: https://dev.to/galtzo [💖💁đŸŧâ€â™‚ī¸devto-img]: https://img.shields.io/badge/dev.to-0A0A0A?style=flat&logo=devdotto&logoColor=white [💖💁đŸŧâ€â™‚ī¸aboutme]: https://about.me/peter.boling [💖💁đŸŧâ€â™‚ī¸aboutme-img]: https://img.shields.io/badge/about.me-0A0A0A?style=flat&logo=aboutme&logoColor=white [💖🧊berg]: https://codeberg.org/pboling [💖🐙hub]: https://github.org/pboling [💖🛖hut]: https://sr.ht/~galtzo/ [💖đŸ§Ēlab]: https://gitlab.com/pboling [👨đŸŧ‍đŸĢexpsup-upwork]: https://www.upwork.com/freelancers/~014942e9b056abdf86?mp_source=share [👨đŸŧ‍đŸĢexpsup-upwork-img]: https://img.shields.io/badge/UpWork-13544E?style=for-the-badge&logo=Upwork&logoColor=white [👨đŸŧ‍đŸĢexpsup-codementor]: https://www.codementor.io/peterboling?utm_source=github&utm_medium=button&utm_term=peterboling&utm_campaign=github [👨đŸŧ‍đŸĢexpsup-codementor-img]: https://img.shields.io/badge/CodeMentor-Get_Help-1abc9c?style=for-the-badge&logo=CodeMentor&logoColor=white [đŸ™ī¸entsup-tidelift]: https://tidelift.com/subscription [đŸ™ī¸entsup-tidelift-img]: https://img.shields.io/badge/Tidelift_and_Sonar-Enterprise_Support-FD3456?style=for-the-badge&logo=sonar&logoColor=white [đŸ™ī¸entsup-tidelift-sonar]: https://blog.tidelift.com/tidelift-joins-sonar [💁đŸŧâ€â™‚ī¸peterboling]: http://www.peterboling.com [🚂railsbling]: http://www.railsbling.com [📜src-gl-img]: https://img.shields.io/badge/GitLab-FBA326?style=for-the-badge&logo=Gitlab&logoColor=orange [📜src-gl]: https://gitlab.com/galtzo-floss/rspec-stubbed_env/ [📜src-cb-img]: https://img.shields.io/badge/CodeBerg-4893CC?style=for-the-badge&logo=CodeBerg&logoColor=blue [📜src-cb]: https://codeberg.org/galtzo-floss/rspec-stubbed_env [📜src-gh-img]: https://img.shields.io/badge/GitHub-238636?style=for-the-badge&logo=Github&logoColor=green [📜src-gh]: https://github.com/galtzo-floss/rspec-stubbed_env [📜docs-cr-rd-img]: https://img.shields.io/badge/RubyDoc-Current_Release-943CD2?style=for-the-badge&logo=readthedocs&logoColor=white [📜docs-head-rd-img]: https://img.shields.io/badge/YARD_on_Galtzo.com-HEAD-943CD2?style=for-the-badge&logo=readthedocs&logoColor=white [📜wiki]: https://gitlab.com/galtzo-floss/rspec-stubbed_env/-/wikis/home [📜wiki-img]: https://img.shields.io/badge/wiki-examples-943CD2.svg?style=for-the-badge&logo=Wiki&logoColor=white [đŸ‘Ŋdl-rank]: https://rubygems.org/gems/rspec-stubbed_env [đŸ‘Ŋdl-ranki]: https://img.shields.io/gem/rd/rspec-stubbed_env.svg [đŸ‘Ŋoss-help]: https://www.codetriage.com/galtzo-floss/rspec-stubbed_env [đŸ‘Ŋoss-helpi]: https://www.codetriage.com/galtzo-floss/rspec-stubbed_env/badges/users.svg [đŸ‘Ŋversion]: https://rubygems.org/gems/rspec-stubbed_env [đŸ‘Ŋversioni]: https://img.shields.io/gem/v/rspec-stubbed_env.svg [🔑qlty-mnt]: https://qlty.sh/gh/galtzo-floss/projects/rspec-stubbed_env [🔑qlty-mnti]: https://qlty.sh/gh/galtzo-floss/projects/rspec-stubbed_env/maintainability.svg [🔑qlty-cov]: https://qlty.sh/gh/galtzo-floss/projects/rspec-stubbed_env/metrics/code?sort=coverageRating [🔑qlty-covi]: https://qlty.sh/gh/galtzo-floss/projects/rspec-stubbed_env/coverage.svg [🔑codecov]: https://codecov.io/gh/galtzo-floss/rspec-stubbed_env [🔑codecoviâ™ģī¸]: https://codecov.io/gh/galtzo-floss/rspec-stubbed_env/graph/badge.svg?token=hRnUCPqxMu [🔑coveralls]: https://coveralls.io/github/galtzo-floss/rspec-stubbed_env?branch=main [🔑coveralls-img]: https://coveralls.io/repos/github/galtzo-floss/rspec-stubbed_env/badge.svg?branch=main [🔑depfu]: https://depfu.com/github/galtzo-floss/rspec-stubbed_env?project_id=5884 [🔑depfuiâ™ģī¸]: https://badges.depfu.com/badges/a48948dd503f23a440f2c17910563f43/count.svg [🖐codeQL]: https://github.com/galtzo-floss/rspec-stubbed_env/security/code-scanning [🖐codeQL-img]: https://github.com/galtzo-floss/rspec-stubbed_env/actions/workflows/codeql-analysis.yml/badge.svg [🚎1-an-wf]: https://github.com/galtzo-floss/rspec-stubbed_env/actions/workflows/ancient.yml [🚎1-an-wfi]: https://github.com/galtzo-floss/rspec-stubbed_env/actions/workflows/ancient.yml/badge.svg [🚎2-cov-wf]: https://github.com/galtzo-floss/rspec-stubbed_env/actions/workflows/coverage.yml [🚎2-cov-wfi]: https://github.com/galtzo-floss/rspec-stubbed_env/actions/workflows/coverage.yml/badge.svg [🚎3-hd-wf]: https://github.com/galtzo-floss/rspec-stubbed_env/actions/workflows/heads.yml [🚎3-hd-wfi]: https://github.com/galtzo-floss/rspec-stubbed_env/actions/workflows/heads.yml/badge.svg [🚎4-lg-wf]: https://github.com/galtzo-floss/rspec-stubbed_env/actions/workflows/legacy.yml [🚎4-lg-wfi]: https://github.com/galtzo-floss/rspec-stubbed_env/actions/workflows/legacy.yml/badge.svg [🚎5-st-wf]: https://github.com/galtzo-floss/rspec-stubbed_env/actions/workflows/style.yml [🚎5-st-wfi]: https://github.com/galtzo-floss/rspec-stubbed_env/actions/workflows/style.yml/badge.svg [🚎6-s-wf]: https://github.com/galtzo-floss/rspec-stubbed_env/actions/workflows/supported.yml [🚎6-s-wfi]: https://github.com/galtzo-floss/rspec-stubbed_env/actions/workflows/supported.yml/badge.svg [🚎7-us-wf]: https://github.com/galtzo-floss/rspec-stubbed_env/actions/workflows/unsupported.yml [🚎7-us-wfi]: https://github.com/galtzo-floss/rspec-stubbed_env/actions/workflows/unsupported.yml/badge.svg [🚎8-ho-wf]: https://github.com/galtzo-floss/rspec-stubbed_env/actions/workflows/hoary.yml [🚎8-ho-wfi]: https://github.com/galtzo-floss/rspec-stubbed_env/actions/workflows/hoary.yml/badge.svg [🚎9-t-wf]: https://github.com/galtzo-floss/rspec-stubbed_env/actions/workflows/truffle.yml [🚎9-t-wfi]: https://github.com/galtzo-floss/rspec-stubbed_env/actions/workflows/truffle.yml/badge.svg [🚎10-j-wf]: https://github.com/galtzo-floss/rspec-stubbed_env/actions/workflows/jruby.yml [🚎10-j-wfi]: https://github.com/galtzo-floss/rspec-stubbed_env/actions/workflows/jruby.yml/badge.svg [🚎11-c-wf]: https://github.com/galtzo-floss/rspec-stubbed_env/actions/workflows/current.yml [🚎11-c-wfi]: https://github.com/galtzo-floss/rspec-stubbed_env/actions/workflows/current.yml/badge.svg [🚎13-đŸ”’ī¸-wf]: https://github.com/galtzo-floss/rspec-stubbed_env/actions/workflows/deps_locked.yml [🚎13-đŸ”’ī¸-wfi]: https://github.com/galtzo-floss/rspec-stubbed_env/actions/workflows/deps_locked.yml/badge.svg [🚎14-đŸ”“ī¸-wf]: https://github.com/galtzo-floss/rspec-stubbed_env/actions/workflows/deps_unlocked.yml [🚎14-đŸ”“ī¸-wfi]: https://github.com/galtzo-floss/rspec-stubbed_env/actions/workflows/deps_unlocked.yml/badge.svg [💎ruby-2.3i]: https://img.shields.io/badge/Ruby-2.3-DF00CA?style=for-the-badge&logo=ruby&logoColor=white [💎ruby-2.4i]: https://img.shields.io/badge/Ruby-2.4-DF00CA?style=for-the-badge&logo=ruby&logoColor=white [💎ruby-2.5i]: https://img.shields.io/badge/Ruby-2.5-DF00CA?style=for-the-badge&logo=ruby&logoColor=white [💎ruby-2.6i]: https://img.shields.io/badge/Ruby-2.6-DF00CA?style=for-the-badge&logo=ruby&logoColor=white [💎ruby-2.7i]: https://img.shields.io/badge/Ruby-2.7-DF00CA?style=for-the-badge&logo=ruby&logoColor=white [💎ruby-3.0i]: https://img.shields.io/badge/Ruby-3.0-CC342D?style=for-the-badge&logo=ruby&logoColor=white [💎ruby-3.1i]: https://img.shields.io/badge/Ruby-3.1-CC342D?style=for-the-badge&logo=ruby&logoColor=white [💎ruby-3.2i]: https://img.shields.io/badge/Ruby-3.2-CC342D?style=for-the-badge&logo=ruby&logoColor=white [💎ruby-3.3i]: https://img.shields.io/badge/Ruby-3.3-CC342D?style=for-the-badge&logo=ruby&logoColor=white [💎ruby-c-i]: https://img.shields.io/badge/Ruby-current-CC342D?style=for-the-badge&logo=ruby&logoColor=green [💎ruby-headi]: https://img.shields.io/badge/Ruby-HEAD-CC342D?style=for-the-badge&logo=ruby&logoColor=blue [💎truby-22.3i]: https://img.shields.io/badge/Truffle_Ruby-22.3-34BCB1?style=for-the-badge&logo=ruby&logoColor=pink [💎truby-23.0i]: https://img.shields.io/badge/Truffle_Ruby-23.0-34BCB1?style=for-the-badge&logo=ruby&logoColor=pink [💎truby-23.1i]: https://img.shields.io/badge/Truffle_Ruby-23.1-34BCB1?style=for-the-badge&logo=ruby&logoColor=pink [💎truby-c-i]: https://img.shields.io/badge/Truffle_Ruby-current-34BCB1?style=for-the-badge&logo=ruby&logoColor=green [💎truby-headi]: https://img.shields.io/badge/Truffle_Ruby-HEAD-34BCB1?style=for-the-badge&logo=ruby&logoColor=blue [💎jruby-9.1i]: https://img.shields.io/badge/JRuby-9.1-FBE742?style=for-the-badge&logo=ruby&logoColor=red [💎jruby-9.2i]: https://img.shields.io/badge/JRuby-9.2-FBE742?style=for-the-badge&logo=ruby&logoColor=red [💎jruby-9.3i]: https://img.shields.io/badge/JRuby-9.3-FBE742?style=for-the-badge&logo=ruby&logoColor=red [💎jruby-9.4i]: https://img.shields.io/badge/JRuby-9.4-FBE742?style=for-the-badge&logo=ruby&logoColor=red [💎jruby-c-i]: https://img.shields.io/badge/JRuby-current-FBE742?style=for-the-badge&logo=ruby&logoColor=green [💎jruby-headi]: https://img.shields.io/badge/JRuby-HEAD-FBE742?style=for-the-badge&logo=ruby&logoColor=blue [🤝gh-issues]: https://github.com/galtzo-floss/rspec-stubbed_env/issues [🤝gh-pulls]: https://github.com/galtzo-floss/rspec-stubbed_env/pulls [🤝gh-issues]: https://github.com/galtzo-floss/rspec-stubbed_env/issues [🤝gh-pulls]: https://github.com/galtzo-floss/rspec-stubbed_env/pulls [🤝gl-issues]: https://gitlab.com/galtzo-floss/rspec-stubbed_env/-/issues [🤝gl-pulls]: https://gitlab.com/galtzo-floss/rspec-stubbed_env/-/merge_requests [🤝cb-issues]: https://codeberg.org/galtzo-floss/rspec-stubbed_env/issues [🤝cb-pulls]: https://codeberg.org/galtzo-floss/rspec-stubbed_env/pulls [🤝cb-donate]: https://donate.codeberg.org/ [🤝contributing]: CONTRIBUTING.md [🔑codecov-gâ™ģī¸]: https://codecov.io/gh/galtzo-floss/rspec-stubbed_env/graphs/tree.svg?token=hRnUCPqxMu [🖐contrib-rocks]: https://contrib.rocks [🖐contributors]: https://github.com/galtzo-floss/rspec-stubbed_env/graphs/contributors [🖐contributors-img]: https://contrib.rocks/image?repo=galtzo-floss/rspec-stubbed_env [🚎contributors-gl]: https://gitlab.com/galtzo-floss/rspec-stubbed_env/-/graphs/main [đŸĒ‡conduct]: CODE_OF_CONDUCT.md [đŸĒ‡conduct-img]: https://img.shields.io/badge/Contributor_Covenant-2.1-259D6C.svg [📌pvc]: http://guides.rubygems.org/patterns/#pessimistic-version-constraint [📌semver]: https://semver.org/spec/v2.0.0.html [📌semver-img]: https://img.shields.io/badge/semver-2.0.0-259D6C.svg?style=flat [📌semver-breaking]: https://github.com/semver/semver/issues/716#issuecomment-869336139 [📌major-versions-not-sacred]: https://tom.preston-werner.com/2022/05/23/major-version-numbers-are-not-sacred.html [📌changelog]: CHANGELOG.md [📗keep-changelog]: https://keepachangelog.com/en/1.0.0/ [📗keep-changelog-img]: https://img.shields.io/badge/keep--a--changelog-1.0.0-34495e.svg?style=flat [📌gitmoji]:https://gitmoji.dev [📌gitmoji-img]:https://img.shields.io/badge/gitmoji_commits-%20😜%20😍-34495e.svg?style=flat-square [🧮kloc]: https://www.youtube.com/watch?v=dQw4w9WgXcQ [🧮kloc-img]: https://img.shields.io/badge/KLOC-0.073-FFDD67.svg?style=for-the-badge&logo=YouTube&logoColor=blue [🔐security]: SECURITY.md [🔐security-img]: https://img.shields.io/badge/security-policy-259D6C.svg?style=flat [📄copyright-notice-explainer]: https://opensource.stackexchange.com/questions/5778/why-do-licenses-such-as-the-mit-license-specify-a-single-year [📄license]: LICENSE.txt [📄license-ref]: https://opensource.org/licenses/MIT [📄license-img]: https://img.shields.io/badge/License-MIT-259D6C.svg [📄ilo-declaration]: https://www.ilo.org/declaration/lang--en/index.htm [📄ilo-declaration-img]: https://img.shields.io/badge/ILO_Fundamental_Principles-✓-259D6C.svg?style=flat [🚎yard-current]: http://rubydoc.info/gems/rspec-stubbed_env [🚎yard-head]: https://rspec-stubbed-env.galtzo.com [💎stone_checksums]: https://github.com/galtzo-floss/stone_checksums [💎SHA_checksums]: https://gitlab.com/galtzo-floss/rspec-stubbed_env/-/tree/main/checksums [💎rlts]: https://github.com/rubocop-lts/rubocop-lts [💎rlts-img]: https://img.shields.io/badge/code_style_%26_linting-rubocop--lts-34495e.svg?plastic&logo=ruby&logoColor=white [💎d-in-dvcs]: https://railsbling.com/posts/dvcs/put_the_d_in_dvcs/ rspec-stubbed_env-1.0.4/REEK000066400000000000000000000041361504431001300155720ustar00rootroot00000000000000lib/rspec/stubbed_env/hide_helpers.rb -- 3 warnings: [60, 63]:DuplicateMethodCall: RSpec::StubbedEnv::HideHelpers#hide_fetch calls 'allow(ENV)' 2 times [https://github.com/troessner/reek/blob/v6.5.0/docs/Duplicate-Method-Call.md] [60, 63]:DuplicateMethodCall: RSpec::StubbedEnv::HideHelpers#hide_fetch calls 'receive(:fetch)' 2 times [https://github.com/troessner/reek/blob/v6.5.0/docs/Duplicate-Method-Call.md] [71]:NestedIterators: RSpec::StubbedEnv::HideHelpers#hide_values_at contains iterators nested 2 deep [https://github.com/troessner/reek/blob/v6.5.0/docs/Nested-Iterators.md] lib/rspec/stubbed_env/stub_helpers.rb -- 8 warnings: [53, 60, 64]:DataClump: RSpec::StubbedEnv::StubHelpers takes parameters ['key', 'value'] to 3 methods [https://github.com/troessner/reek/blob/v6.5.0/docs/Data-Clump.md] [65, 66]:DuplicateMethodCall: RSpec::StubbedEnv::StubHelpers#allow_fetch calls 'allow(ENV)' 2 times [https://github.com/troessner/reek/blob/v6.5.0/docs/Duplicate-Method-Call.md] [65, 66]:DuplicateMethodCall: RSpec::StubbedEnv::StubHelpers#allow_fetch calls 'receive(:fetch)' 2 times [https://github.com/troessner/reek/blob/v6.5.0/docs/Duplicate-Method-Call.md] [83, 84, 85]:DuplicateMethodCall: RSpec::StubbedEnv::StubHelpers#init_stub calls 'allow(ENV)' 3 times [https://github.com/troessner/reek/blob/v6.5.0/docs/Duplicate-Method-Call.md] [74]:NestedIterators: RSpec::StubbedEnv::StubHelpers#allow_values_at contains iterators nested 2 deep [https://github.com/troessner/reek/blob/v6.5.0/docs/Nested-Iterators.md] [43]:UncommunicativeVariableName: RSpec::StubbedEnv::StubHelpers#stub_env has the variable name 'k' [https://github.com/troessner/reek/blob/v6.5.0/docs/Uncommunicative-Variable-Name.md] [43]:UncommunicativeVariableName: RSpec::StubbedEnv::StubHelpers#stub_env has the variable name 'v' [https://github.com/troessner/reek/blob/v6.5.0/docs/Uncommunicative-Variable-Name.md] [78]:UtilityFunction: RSpec::StubbedEnv::StubHelpers#env_stubbed? doesn't depend on instance state (maybe move it to another class?) [https://github.com/troessner/reek/blob/v6.5.0/docs/Utility-Function.md] 11 total warnings rspec-stubbed_env-1.0.4/Rakefile000066400000000000000000000060561504431001300165710ustar00rootroot00000000000000# frozen_string_literal: true require "bundler/gem_tasks" defaults = [] is_ci = ENV.fetch("CI", "false").casecmp("true") == 0 ### DEVELOPMENT TASKS # Setup Kettle Soup Cover begin require "kettle-soup-cover" Kettle::Soup::Cover.install_tasks # NOTE: Coverage on CI is configured independent of this task. # This task is for local development, as it opens results in browser defaults << "coverage" unless Kettle::Soup::Cover::IS_CI rescue LoadError desc("(stub) coverage is unavailable") task("coverage") do warn("NOTE: kettle-soup-cover isn't installed, or is disabled for #{RUBY_VERSION} in the current environment") end end # Setup Bundle Audit begin require "bundler/audit/task" Bundler::Audit::Task.new defaults.push("bundle:audit:update", "bundle:audit") rescue LoadError desc("(stub) bundle:audit is unavailable") task("bundle:audit") do warn("NOTE: bundler-audit isn't installed, or is disabled for #{RUBY_VERSION} in the current environment") end desc("(stub) bundle:audit:update is unavailable") task("bundle:audit:update") do warn("NOTE: bundler-audit isn't installed, or is disabled for #{RUBY_VERSION} in the current environment") end end begin require "rspec/core/rake_task" RSpec::Core::RakeTask.new(:spec) # This takes the place of `coverage` task when running as CI=true defaults << "spec" if !defined?(Kettle::Soup::Cover) || Kettle::Soup::Cover::IS_CI rescue LoadError desc("spec task stub") task(:spec) do warn("NOTE: rspec isn't installed, or is disabled for #{RUBY_VERSION} in the current environment") end end desc "run spec task with test task" task :test => :spec # Setup RuboCop-LTS begin require "rubocop/lts" Rubocop::Lts.install_tasks defaults << "rubocop_gradual" rescue LoadError desc("(stub) rubocop_gradual is unavailable") task(:rubocop_gradual) do warn("NOTE: rubocop-lts isn't installed, or is disabled for #{RUBY_VERSION} in the current environment") end end # Setup Yard begin require "yard" YARD::Rake::YardocTask.new(:yard) do |t| t.files = [ # Splats (alphabetical) "lib/**/*.rb", ] end defaults << "yard" rescue LoadError desc("(stub) yard is unavailable") task(:yard) do warn("NOTE: yard isn't installed, or is disabled for #{RUBY_VERSION} in the current environment") end end # Setup Reek begin require "reek/rake/task" Reek::Rake::Task.new do |t| t.fail_on_error = true t.verbose = false t.source_files = "{lib,spec}/**/*.rb" end defaults << "reek" unless is_ci rescue LoadError desc("(stub) reek is unavailable") task(:reek) do warn("NOTE: reek isn't installed, or is disabled for #{RUBY_VERSION} in the current environment") end end ### RELEASE TASKS # Setup stone_checksums begin require "stone_checksums" GemChecksums.install_tasks rescue LoadError desc("(stub) build:generate_checksums is unavailable") task("build:generate_checksums") do warn("NOTE: stone_checksums isn't installed, or is disabled for #{RUBY_VERSION} in the current environment") end end task :default => defaults rspec-stubbed_env-1.0.4/SECURITY.md000077500000000000000000000011001504431001300167010ustar00rootroot00000000000000# Security Policy ## Supported Versions | Version | Supported | |----------|-----------| | 1.latest | ✅ | ## Security contact information To report a security vulnerability, please use the [Tidelift security contact](https://tidelift.com/security). Tidelift will coordinate the fix and disclosure. ## Additional Support If you are interested in support for versions older than the latest release, please consider sponsoring the project / maintainer @ https://liberapay.com/pboling/donate, or find other sponsorship links in the [README]. [README]: README.md rspec-stubbed_env-1.0.4/bin/000077500000000000000000000000001504431001300156655ustar00rootroot00000000000000rspec-stubbed_env-1.0.4/bin/appraisal000077500000000000000000000013651504431001300175740ustar00rootroot00000000000000#!/usr/bin/env ruby # frozen_string_literal: true # # This file was generated by Bundler. # # The application 'appraisal' is installed as part of a gem, and # this file is here to facilitate running it. # ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__) bundle_binstub = File.expand_path("bundle", __dir__) if File.file?(bundle_binstub) if File.read(bundle_binstub, 300).include?("This file was generated by Bundler") load(bundle_binstub) else abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run. Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.") end end require "rubygems" require "bundler/setup" load Gem.bin_path("appraisal", "appraisal") rspec-stubbed_env-1.0.4/bin/bundle000077500000000000000000000057001504431001300170660ustar00rootroot00000000000000#!/usr/bin/env ruby # frozen_string_literal: true # # This file was generated by Bundler. # # The application 'bundle' is installed as part of a gem, and # this file is here to facilitate running it. # require "rubygems" m = Module.new do module_function def invoked_as_script? File.expand_path($PROGRAM_NAME) == File.expand_path(__FILE__) end def env_var_version ENV.fetch("BUNDLER_VERSION", nil) end def cli_arg_version return unless invoked_as_script? # don't want to hijack other binstubs return unless "update".start_with?(ARGV.first || " ") # must be running `bundle update` bundler_version = nil update_index = nil ARGV.each_with_index do |a, i| bundler_version = a if update_index && update_index.succ == i && a =~ Gem::Version::ANCHORED_VERSION_PATTERN next unless a =~ /\A--bundler(?:[= ](#{Gem::Version::VERSION_PATTERN}))?\z/o bundler_version = Regexp.last_match(1) update_index = i end bundler_version end def gemfile gemfile = ENV.fetch("BUNDLE_GEMFILE", nil) return gemfile if gemfile && !gemfile.empty? File.expand_path("../Gemfile", __dir__) end def lockfile lockfile = case File.basename(gemfile) when "gems.rb" then gemfile.sub(/\.rb$/, gemfile) else "#{gemfile}.lock" end File.expand_path(lockfile) end def lockfile_version return unless File.file?(lockfile) lockfile_contents = File.read(lockfile) return unless lockfile_contents =~ /\n\nBUNDLED WITH\n\s{2,}(#{Gem::Version::VERSION_PATTERN})\n/o Regexp.last_match(1) end def bundler_requirement @bundler_requirement ||= env_var_version || cli_arg_version || bundler_requirement_for(lockfile_version) end def bundler_requirement_for(version) return "#{Gem::Requirement.default}.a" unless version bundler_gem_version = Gem::Version.new(version) requirement = bundler_gem_version.approximate_recommendation return requirement if Gem.rubygems_version >= Gem::Version.new("2.7.0") requirement += ".a" if bundler_gem_version.prerelease? requirement end def load_bundler! ENV["BUNDLE_GEMFILE"] ||= gemfile activate_bundler end def activate_bundler gem_error = activation_error_handling do gem("bundler", bundler_requirement) end return if gem_error.nil? require_error = activation_error_handling do require "bundler/version" end if require_error.nil? && Gem::Requirement.new(bundler_requirement).satisfied_by?(Gem::Version.new(Bundler::VERSION)) return end warn("Activating bundler (#{bundler_requirement}) failed:\n#{gem_error.message}\n\nTo install the version of bundler this project requires, run `gem install bundler -v '#{bundler_requirement}'`") exit(42) end def activation_error_handling yield nil rescue StandardError, LoadError => e e end end m.load_bundler! load Gem.bin_path("bundler", "bundle") if m.invoked_as_script? rspec-stubbed_env-1.0.4/bin/bundle-audit000077500000000000000000000013771504431001300202000ustar00rootroot00000000000000#!/usr/bin/env ruby # frozen_string_literal: true # # This file was generated by Bundler. # # The application 'bundle-audit' is installed as part of a gem, and # this file is here to facilitate running it. # ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__) bundle_binstub = File.expand_path("bundle", __dir__) if File.file?(bundle_binstub) if File.read(bundle_binstub, 300).include?("This file was generated by Bundler") load(bundle_binstub) else abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run. Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.") end end require "rubygems" require "bundler/setup" load Gem.bin_path("bundler-audit", "bundle-audit") rspec-stubbed_env-1.0.4/bin/bundler-audit000077500000000000000000000014011504431001300203460ustar00rootroot00000000000000#!/usr/bin/env ruby # frozen_string_literal: true # # This file was generated by Bundler. # # The application 'bundler-audit' is installed as part of a gem, and # this file is here to facilitate running it. # ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__) bundle_binstub = File.expand_path("bundle", __dir__) if File.file?(bundle_binstub) if File.read(bundle_binstub, 300).include?("This file was generated by Bundler") load(bundle_binstub) else abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run. Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.") end end require "rubygems" require "bundler/setup" load Gem.bin_path("bundler-audit", "bundler-audit") rspec-stubbed_env-1.0.4/bin/code_climate_reek000077500000000000000000000014001504431001300212240ustar00rootroot00000000000000#!/usr/bin/env ruby # frozen_string_literal: true # # This file was generated by Bundler. # # The application 'code_climate_reek' is installed as part of a gem, and # this file is here to facilitate running it. # ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__) bundle_binstub = File.expand_path("bundle", __dir__) if File.file?(bundle_binstub) if File.read(bundle_binstub, 300).include?("This file was generated by Bundler") load(bundle_binstub) else abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run. Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.") end end require "rubygems" require "bundler/setup" load Gem.bin_path("reek", "code_climate_reek") rspec-stubbed_env-1.0.4/bin/coderay000077500000000000000000000013571504431001300172470ustar00rootroot00000000000000#!/usr/bin/env ruby # frozen_string_literal: true # # This file was generated by Bundler. # # The application 'coderay' is installed as part of a gem, and # this file is here to facilitate running it. # ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__) bundle_binstub = File.expand_path("bundle", __dir__) if File.file?(bundle_binstub) if File.read(bundle_binstub, 300).include?("This file was generated by Bundler") load(bundle_binstub) else abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run. Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.") end end require "rubygems" require "bundler/setup" load Gem.bin_path("coderay", "coderay") rspec-stubbed_env-1.0.4/bin/console000077500000000000000000000011271504431001300172560ustar00rootroot00000000000000#!/usr/bin/env ruby # frozen_string_literal: true require "bundler/setup" # NOTE: loading rspec/stubbed_env/config in the console doesn't make sense, # since we don't have RSpec in the console. require "rspec/stubbed_env/version" require "rspec/stubbed_env/hide_helpers" require "rspec/stubbed_env/stub_helpers" # You can add fixtures and/or initialization code here to make experimenting # with your gem easier. You can also use a different console, if you like. # (If you use this, don't forget to add pry to your Gemfile!) # require "pry" # Pry.start require "irb" IRB.start(__FILE__) rspec-stubbed_env-1.0.4/bin/gem_checksums000077500000000000000000000014031504431001300204260ustar00rootroot00000000000000#!/usr/bin/env ruby # frozen_string_literal: true # # This file was generated by Bundler. # # The application 'gem_checksums' is installed as part of a gem, and # this file is here to facilitate running it. # ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__) bundle_binstub = File.expand_path("bundle", __dir__) if File.file?(bundle_binstub) if File.read(bundle_binstub, 300).include?("This file was generated by Bundler") load(bundle_binstub) else abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run. Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.") end end require "rubygems" require "bundler/setup" load Gem.bin_path("stone_checksums", "gem_checksums") rspec-stubbed_env-1.0.4/bin/github-markup000077500000000000000000000014011504431001300203660ustar00rootroot00000000000000#!/usr/bin/env ruby # frozen_string_literal: true # # This file was generated by Bundler. # # The application 'github-markup' is installed as part of a gem, and # this file is here to facilitate running it. # ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__) bundle_binstub = File.expand_path("bundle", __dir__) if File.file?(bundle_binstub) if File.read(bundle_binstub, 300).include?("This file was generated by Bundler") load(bundle_binstub) else abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run. Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.") end end require "rubygems" require "bundler/setup" load Gem.bin_path("github-markup", "github-markup") rspec-stubbed_env-1.0.4/bin/htmldiff000077500000000000000000000013621504431001300174120ustar00rootroot00000000000000#!/usr/bin/env ruby # frozen_string_literal: true # # This file was generated by Bundler. # # The application 'htmldiff' is installed as part of a gem, and # this file is here to facilitate running it. # ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__) bundle_binstub = File.expand_path("bundle", __dir__) if File.file?(bundle_binstub) if File.read(bundle_binstub, 300).include?("This file was generated by Bundler") load(bundle_binstub) else abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run. Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.") end end require "rubygems" require "bundler/setup" load Gem.bin_path("diff-lcs", "htmldiff") rspec-stubbed_env-1.0.4/bin/irb000077500000000000000000000013431504431001300163700ustar00rootroot00000000000000#!/usr/bin/env ruby # frozen_string_literal: true # # This file was generated by Bundler. # # The application 'irb' is installed as part of a gem, and # this file is here to facilitate running it. # ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__) bundle_binstub = File.expand_path("bundle", __dir__) if File.file?(bundle_binstub) if File.read(bundle_binstub, 300).include?("This file was generated by Bundler") load(bundle_binstub) else abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run. Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.") end end require "rubygems" require "bundler/setup" load Gem.bin_path("irb", "irb") rspec-stubbed_env-1.0.4/bin/ldiff000077500000000000000000000013541504431001300167020ustar00rootroot00000000000000#!/usr/bin/env ruby # frozen_string_literal: true # # This file was generated by Bundler. # # The application 'ldiff' is installed as part of a gem, and # this file is here to facilitate running it. # ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__) bundle_binstub = File.expand_path("bundle", __dir__) if File.file?(bundle_binstub) if File.read(bundle_binstub, 300).include?("This file was generated by Bundler") load(bundle_binstub) else abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run. Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.") end end require "rubygems" require "bundler/setup" load Gem.bin_path("diff-lcs", "ldiff") rspec-stubbed_env-1.0.4/bin/pry000077500000000000000000000013431504431001300164260ustar00rootroot00000000000000#!/usr/bin/env ruby # frozen_string_literal: true # # This file was generated by Bundler. # # The application 'pry' is installed as part of a gem, and # this file is here to facilitate running it. # ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__) bundle_binstub = File.expand_path("bundle", __dir__) if File.file?(bundle_binstub) if File.read(bundle_binstub, 300).include?("This file was generated by Bundler") load(bundle_binstub) else abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run. Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.") end end require "rubygems" require "bundler/setup" load Gem.bin_path("pry", "pry") rspec-stubbed_env-1.0.4/bin/racc000077500000000000000000000013461504431001300165270ustar00rootroot00000000000000#!/usr/bin/env ruby # frozen_string_literal: true # # This file was generated by Bundler. # # The application 'racc' is installed as part of a gem, and # this file is here to facilitate running it. # ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__) bundle_binstub = File.expand_path("bundle", __dir__) if File.file?(bundle_binstub) if File.read(bundle_binstub, 300).include?("This file was generated by Bundler") load(bundle_binstub) else abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run. Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.") end end require "rubygems" require "bundler/setup" load Gem.bin_path("racc", "racc") rspec-stubbed_env-1.0.4/bin/rake000077500000000000000000000013461504431001300165410ustar00rootroot00000000000000#!/usr/bin/env ruby # frozen_string_literal: true # # This file was generated by Bundler. # # The application 'rake' is installed as part of a gem, and # this file is here to facilitate running it. # ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__) bundle_binstub = File.expand_path("bundle", __dir__) if File.file?(bundle_binstub) if File.read(bundle_binstub, 300).include?("This file was generated by Bundler") load(bundle_binstub) else abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run. Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.") end end require "rubygems" require "bundler/setup" load Gem.bin_path("rake", "rake") rspec-stubbed_env-1.0.4/bin/rdbg000077500000000000000000000013471504431001300165360ustar00rootroot00000000000000#!/usr/bin/env ruby # frozen_string_literal: true # # This file was generated by Bundler. # # The application 'rdbg' is installed as part of a gem, and # this file is here to facilitate running it. # ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__) bundle_binstub = File.expand_path("bundle", __dir__) if File.file?(bundle_binstub) if File.read(bundle_binstub, 300).include?("This file was generated by Bundler") load(bundle_binstub) else abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run. Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.") end end require "rubygems" require "bundler/setup" load Gem.bin_path("debug", "rdbg") rspec-stubbed_env-1.0.4/bin/rdoc000077500000000000000000000013461504431001300165460ustar00rootroot00000000000000#!/usr/bin/env ruby # frozen_string_literal: true # # This file was generated by Bundler. # # The application 'rdoc' is installed as part of a gem, and # this file is here to facilitate running it. # ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__) bundle_binstub = File.expand_path("bundle", __dir__) if File.file?(bundle_binstub) if File.read(bundle_binstub, 300).include?("This file was generated by Bundler") load(bundle_binstub) else abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run. Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.") end end require "rubygems" require "bundler/setup" load Gem.bin_path("rdoc", "rdoc") rspec-stubbed_env-1.0.4/bin/redcarpet000077500000000000000000000013651504431001300175710ustar00rootroot00000000000000#!/usr/bin/env ruby # frozen_string_literal: true # # This file was generated by Bundler. # # The application 'redcarpet' is installed as part of a gem, and # this file is here to facilitate running it. # ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__) bundle_binstub = File.expand_path("bundle", __dir__) if File.file?(bundle_binstub) if File.read(bundle_binstub, 300).include?("This file was generated by Bundler") load(bundle_binstub) else abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run. Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.") end end require "rubygems" require "bundler/setup" load Gem.bin_path("redcarpet", "redcarpet") rspec-stubbed_env-1.0.4/bin/reek000077500000000000000000000013461504431001300165450ustar00rootroot00000000000000#!/usr/bin/env ruby # frozen_string_literal: true # # This file was generated by Bundler. # # The application 'reek' is installed as part of a gem, and # this file is here to facilitate running it. # ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__) bundle_binstub = File.expand_path("bundle", __dir__) if File.file?(bundle_binstub) if File.read(bundle_binstub, 300).include?("This file was generated by Bundler") load(bundle_binstub) else abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run. Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.") end end require "rubygems" require "bundler/setup" load Gem.bin_path("reek", "reek") rspec-stubbed_env-1.0.4/bin/ri000077500000000000000000000013421504431001300162250ustar00rootroot00000000000000#!/usr/bin/env ruby # frozen_string_literal: true # # This file was generated by Bundler. # # The application 'ri' is installed as part of a gem, and # this file is here to facilitate running it. # ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__) bundle_binstub = File.expand_path("bundle", __dir__) if File.file?(bundle_binstub) if File.read(bundle_binstub, 300).include?("This file was generated by Bundler") load(bundle_binstub) else abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run. Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.") end end require "rubygems" require "bundler/setup" load Gem.bin_path("rdoc", "ri") rspec-stubbed_env-1.0.4/bin/rspec000077500000000000000000000013561504431001300167340ustar00rootroot00000000000000#!/usr/bin/env ruby # frozen_string_literal: true # # This file was generated by Bundler. # # The application 'rspec' is installed as part of a gem, and # this file is here to facilitate running it. # ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__) bundle_binstub = File.expand_path("bundle", __dir__) if File.file?(bundle_binstub) if File.read(bundle_binstub, 300).include?("This file was generated by Bundler") load(bundle_binstub) else abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run. Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.") end end require "rubygems" require "bundler/setup" load Gem.bin_path("rspec-core", "rspec") rspec-stubbed_env-1.0.4/bin/rubocop000077500000000000000000000013571504431001300172720ustar00rootroot00000000000000#!/usr/bin/env ruby # frozen_string_literal: true # # This file was generated by Bundler. # # The application 'rubocop' is installed as part of a gem, and # this file is here to facilitate running it. # ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__) bundle_binstub = File.expand_path("bundle", __dir__) if File.file?(bundle_binstub) if File.read(bundle_binstub, 300).include?("This file was generated by Bundler") load(bundle_binstub) else abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run. Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.") end end require "rubygems" require "bundler/setup" load Gem.bin_path("rubocop", "rubocop") rspec-stubbed_env-1.0.4/bin/rubocop-gradual000077500000000000000000000014071504431001300207030ustar00rootroot00000000000000#!/usr/bin/env ruby # frozen_string_literal: true # # This file was generated by Bundler. # # The application 'rubocop-gradual' is installed as part of a gem, and # this file is here to facilitate running it. # ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__) bundle_binstub = File.expand_path("bundle", __dir__) if File.file?(bundle_binstub) if File.read(bundle_binstub, 300).include?("This file was generated by Bundler") load(bundle_binstub) else abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run. Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.") end end require "rubygems" require "bundler/setup" load Gem.bin_path("rubocop-gradual", "rubocop-gradual") rspec-stubbed_env-1.0.4/bin/ruby-parse000077500000000000000000000013641504431001300177100ustar00rootroot00000000000000#!/usr/bin/env ruby # frozen_string_literal: true # # This file was generated by Bundler. # # The application 'ruby-parse' is installed as part of a gem, and # this file is here to facilitate running it. # ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__) bundle_binstub = File.expand_path("bundle", __dir__) if File.file?(bundle_binstub) if File.read(bundle_binstub, 300).include?("This file was generated by Bundler") load(bundle_binstub) else abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run. Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.") end end require "rubygems" require "bundler/setup" load Gem.bin_path("parser", "ruby-parse") rspec-stubbed_env-1.0.4/bin/ruby-rewrite000077500000000000000000000013701504431001300202540ustar00rootroot00000000000000#!/usr/bin/env ruby # frozen_string_literal: true # # This file was generated by Bundler. # # The application 'ruby-rewrite' is installed as part of a gem, and # this file is here to facilitate running it. # ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__) bundle_binstub = File.expand_path("bundle", __dir__) if File.file?(bundle_binstub) if File.read(bundle_binstub, 300).include?("This file was generated by Bundler") load(bundle_binstub) else abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run. Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.") end end require "rubygems" require "bundler/setup" load Gem.bin_path("parser", "ruby-rewrite") rspec-stubbed_env-1.0.4/bin/setup000077500000000000000000000002031504431001300167460ustar00rootroot00000000000000#!/usr/bin/env bash set -euo pipefail IFS=$'\n\t' set -vx bundle install # Do any other automated setup that you need to do here rspec-stubbed_env-1.0.4/bin/standardrb000077500000000000000000000013661504431001300177450ustar00rootroot00000000000000#!/usr/bin/env ruby # frozen_string_literal: true # # This file was generated by Bundler. # # The application 'standardrb' is installed as part of a gem, and # this file is here to facilitate running it. # ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__) bundle_binstub = File.expand_path("bundle", __dir__) if File.file?(bundle_binstub) if File.read(bundle_binstub, 300).include?("This file was generated by Bundler") load(bundle_binstub) else abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run. Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.") end end require "rubygems" require "bundler/setup" load Gem.bin_path("standard", "standardrb") rspec-stubbed_env-1.0.4/bin/thor000077500000000000000000000013461504431001300165730ustar00rootroot00000000000000#!/usr/bin/env ruby # frozen_string_literal: true # # This file was generated by Bundler. # # The application 'thor' is installed as part of a gem, and # this file is here to facilitate running it. # ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__) bundle_binstub = File.expand_path("bundle", __dir__) if File.file?(bundle_binstub) if File.read(bundle_binstub, 300).include?("This file was generated by Bundler") load(bundle_binstub) else abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run. Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.") end end require "rubygems" require "bundler/setup" load Gem.bin_path("thor", "thor") rspec-stubbed_env-1.0.4/bin/yard000077500000000000000000000013461504431001300165560ustar00rootroot00000000000000#!/usr/bin/env ruby # frozen_string_literal: true # # This file was generated by Bundler. # # The application 'yard' is installed as part of a gem, and # this file is here to facilitate running it. # ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__) bundle_binstub = File.expand_path("bundle", __dir__) if File.file?(bundle_binstub) if File.read(bundle_binstub, 300).include?("This file was generated by Bundler") load(bundle_binstub) else abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run. Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.") end end require "rubygems" require "bundler/setup" load Gem.bin_path("yard", "yard") rspec-stubbed_env-1.0.4/bin/yard-junk000077500000000000000000000013651504431001300175240ustar00rootroot00000000000000#!/usr/bin/env ruby # frozen_string_literal: true # # This file was generated by Bundler. # # The application 'yard-junk' is installed as part of a gem, and # this file is here to facilitate running it. # ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__) bundle_binstub = File.expand_path("bundle", __dir__) if File.file?(bundle_binstub) if File.read(bundle_binstub, 300).include?("This file was generated by Bundler") load(bundle_binstub) else abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run. Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.") end end require "rubygems" require "bundler/setup" load Gem.bin_path("yard-junk", "yard-junk") rspec-stubbed_env-1.0.4/bin/yardoc000077500000000000000000000013521504431001300170750ustar00rootroot00000000000000#!/usr/bin/env ruby # frozen_string_literal: true # # This file was generated by Bundler. # # The application 'yardoc' is installed as part of a gem, and # this file is here to facilitate running it. # ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__) bundle_binstub = File.expand_path("bundle", __dir__) if File.file?(bundle_binstub) if File.read(bundle_binstub, 300).include?("This file was generated by Bundler") load(bundle_binstub) else abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run. Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.") end end require "rubygems" require "bundler/setup" load Gem.bin_path("yard", "yardoc") rspec-stubbed_env-1.0.4/bin/yri000077500000000000000000000013441504431001300164200ustar00rootroot00000000000000#!/usr/bin/env ruby # frozen_string_literal: true # # This file was generated by Bundler. # # The application 'yri' is installed as part of a gem, and # this file is here to facilitate running it. # ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__) bundle_binstub = File.expand_path("bundle", __dir__) if File.file?(bundle_binstub) if File.read(bundle_binstub, 300).include?("This file was generated by Bundler") load(bundle_binstub) else abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run. Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.") end end require "rubygems" require "bundler/setup" load Gem.bin_path("yard", "yri") rspec-stubbed_env-1.0.4/certs/000077500000000000000000000000001504431001300162355ustar00rootroot00000000000000rspec-stubbed_env-1.0.4/certs/pboling.pem000066400000000000000000000031271504431001300203750ustar00rootroot00000000000000-----BEGIN CERTIFICATE----- MIIEgDCCAuigAwIBAgIBATANBgkqhkiG9w0BAQsFADBDMRUwEwYDVQQDDAxwZXRl ci5ib2xpbmcxFTATBgoJkiaJk/IsZAEZFgVnbWFpbDETMBEGCgmSJomT8ixkARkW A2NvbTAeFw0yNTA1MDQxNTMzMDlaFw00NTA0MjkxNTMzMDlaMEMxFTATBgNVBAMM DHBldGVyLmJvbGluZzEVMBMGCgmSJomT8ixkARkWBWdtYWlsMRMwEQYKCZImiZPy LGQBGRYDY29tMIIBojANBgkqhkiG9w0BAQEFAAOCAY8AMIIBigKCAYEAruUoo0WA uoNuq6puKWYeRYiZekz/nsDeK5x/0IEirzcCEvaHr3Bmz7rjo1I6On3gGKmiZs61 LRmQ3oxy77ydmkGTXBjruJB+pQEn7UfLSgQ0xa1/X3kdBZt6RmabFlBxnHkoaGY5 mZuZ5+Z7walmv6sFD9ajhzj+oIgwWfnEHkXYTR8I6VLN7MRRKGMPoZ/yvOmxb2DN coEEHWKO9CvgYpW7asIihl/9GMpKiRkcYPm9dGQzZc6uTwom1COfW0+ZOFrDVBuV FMQRPswZcY4Wlq0uEBLPU7hxnCL9nKK6Y9IhdDcz1mY6HZ91WImNslOSI0S8hRpj yGOWxQIhBT3fqCBlRIqFQBudrnD9jSNpSGsFvbEijd5ns7Z9ZMehXkXDycpGAUj1 to/5cuTWWw1JqUWrKJYoifnVhtE1o1DZ+LkPtWxHtz5kjDG/zR3MG0Ula0UOavlD qbnbcXPBnwXtTFeZ3C+yrWpE4pGnl3yGkZj9SMTlo9qnTMiPmuWKQDatAgMBAAGj fzB9MAkGA1UdEwQCMAAwCwYDVR0PBAQDAgSwMB0GA1UdDgQWBBQE8uWvNbPVNRXZ HlgPbc2PCzC4bjAhBgNVHREEGjAYgRZwZXRlci5ib2xpbmdAZ21haWwuY29tMCEG A1UdEgQaMBiBFnBldGVyLmJvbGluZ0BnbWFpbC5jb20wDQYJKoZIhvcNAQELBQAD ggGBAJbnUwfJQFPkBgH9cL7hoBfRtmWiCvdqdjeTmi04u8zVNCUox0A4gT982DE9 wmuN12LpdajxZONqbXuzZvc+nb0StFwmFYZG6iDwaf4BPywm2e/Vmq0YG45vZXGR L8yMDSK1cQXjmA+ZBKOHKWavxP6Vp7lWvjAhz8RFwqF9GuNIdhv9NpnCAWcMZtpm GUPyIWw/Cw/2wZp74QzZj6Npx+LdXoLTF1HMSJXZ7/pkxLCsB8m4EFVdb/IrW/0k kNSfjtAfBHO8nLGuqQZVH9IBD1i9K6aSs7pT6TW8itXUIlkIUI2tg5YzW6OFfPzq QekSkX3lZfY+HTSp/o+YvKkqWLUV7PQ7xh1ZYDtocpaHwgxe/j3bBqHE+CUPH2vA 0V/FwdTRWcwsjVoOJTrYcff8pBZ8r2MvtAc54xfnnhGFzeRHfcltobgFxkAXdE6p DVjBtqT23eugOqQ73umLcYDZkc36vnqGxUBSsXrzY9pzV5gGr2I8YUxMqf6ATrZt L9nRqA== -----END CERTIFICATE----- rspec-stubbed_env-1.0.4/checksums/000077500000000000000000000000001504431001300171025ustar00rootroot00000000000000rspec-stubbed_env-1.0.4/checksums/rspec-stubbed_env-1.0.1.gem.sha256000066400000000000000000000001001504431001300246370ustar00rootroot000000000000004e9bfe3138cb15cc90c8d08ae06965b3c90b70c08e0b5c418c7be9f02e5e6735rspec-stubbed_env-1.0.4/checksums/rspec-stubbed_env-1.0.1.gem.sha512000066400000000000000000000002001504431001300246330ustar00rootroot000000000000006b83656456c4109e132c3444a70f19b57c03f60a7f0ca6db459d54ee78ba56436ff9caa3f68943cf029e8e700e69a0ad32e11eeb66ccc8c0fb378b9b0d75dba3rspec-stubbed_env-1.0.4/checksums/rspec-stubbed_env-1.0.2.gem.sha256000066400000000000000000000001001504431001300246400ustar00rootroot00000000000000836623d72a3919e54b75d36fe9a8b9e9e6ef1fd79b8ab953471cd908b0b389f3rspec-stubbed_env-1.0.4/checksums/rspec-stubbed_env-1.0.2.gem.sha512000066400000000000000000000002001504431001300246340ustar00rootroot00000000000000afdf8fac103be7d8063898095e0d0b26dcd0a2d1fc52f9954119ad761fa6999160aef34bbcaf1b29df29355e7f363298b5a76782e284d30165ff4f3ae19c6635rspec-stubbed_env-1.0.4/checksums/rspec-stubbed_env-1.0.3.gem.sha256000066400000000000000000000001001504431001300246410ustar00rootroot000000000000004f7201031ce57e0e92700460056ff5008e0d8a0525b174e8e345a35d9b98361arspec-stubbed_env-1.0.4/checksums/rspec-stubbed_env-1.0.3.gem.sha512000066400000000000000000000002001504431001300246350ustar00rootroot000000000000002f307a0f7e660113f33a075b6a17f0518978c80caaaa256a649b30aa40d6664eeabb19407ce78947e302149a0b514ff50a44ddea1f35901a461df0f8a9637f0erspec-stubbed_env-1.0.4/checksums/rspec-stubbed_env-1.0.4.gem.sha256000066400000000000000000000001001504431001300246420ustar00rootroot00000000000000647886e16338bc4028fd18dde07944c945f773cc65afaa258930196da780e70frspec-stubbed_env-1.0.4/checksums/rspec-stubbed_env-1.0.4.gem.sha512000066400000000000000000000002001504431001300246360ustar00rootroot0000000000000065836cc0a275be83cac82a03ecdf327d58e900beb7546207975cc820cf4f51ca6b45ab5637f2719c25c12393dcea1ab6de31b6d67d88711d578c3e5c51cc1e19rspec-stubbed_env-1.0.4/docs/000077500000000000000000000000001504431001300160455ustar00rootroot00000000000000rspec-stubbed_env-1.0.4/docs/CNAME000066400000000000000000000000341504431001300166100ustar00rootroot00000000000000rspec-stubbed-env.galtzo.comrspec-stubbed_env-1.0.4/docs/RSpec.html000066400000000000000000000060611504431001300177520ustar00rootroot00000000000000 Module: RSpec — Documentation by YARD 0.9.37

Module: RSpec

Defined in:
lib/rspec/stubbed_env.rb,
lib/rspec/stubbed_env/version.rb,
lib/rspec/stubbed_env/hide_helpers.rb,
lib/rspec/stubbed_env/stub_helpers.rb

Overview

ENV stubbing is opt-in, via a shared context, rather than global

Usage:

describe ‘my stubbed test’ do
include_context ‘with stubbed env’
before do
stub_env(‘FOO’ => ‘is bar’)
# or, equivalently:
stub_env(FOO: ‘is bar’)
# or, equivalently:
stub_env(‘FOO’, ‘is bar’)
# or, equivalently:
stub_env(FOO: ‘is bar’)
end
it ‘does a thing’ do
expect(ENV[‘FOO’]).to eq(‘is bar’)
end
end

NOTE: This file was originally written by Liam Bennet (https://github.com/ljkbennett)
as part of the stub_env library (https://github.com/ljkbennett/stub_env).
It has evolved since then.

Defined Under Namespace

Modules: StubbedEnv

rspec-stubbed_env-1.0.4/docs/RSpec/000077500000000000000000000000001504431001300170615ustar00rootroot00000000000000rspec-stubbed_env-1.0.4/docs/RSpec/StubbedEnv.html000066400000000000000000000061111504431001300220070ustar00rootroot00000000000000 Module: RSpec::StubbedEnv — Documentation by YARD 0.9.37

Module: RSpec::StubbedEnv

Defined in:
lib/rspec/stubbed_env.rb,
lib/rspec/stubbed_env/version.rb,
lib/rspec/stubbed_env/hide_helpers.rb,
lib/rspec/stubbed_env/stub_helpers.rb

Overview

Gem Namespace

Defined Under Namespace

Modules: HideHelpers, StubHelpers

Constant Summary collapse

VERSION =
"1.0.4"
rspec-stubbed_env-1.0.4/docs/RSpec/StubbedEnv/000077500000000000000000000000001504431001300211225ustar00rootroot00000000000000rspec-stubbed_env-1.0.4/docs/RSpec/StubbedEnv/HideHelpers.html000066400000000000000000000153341504431001300242120ustar00rootroot00000000000000 Module: RSpec::StubbedEnv::HideHelpers — Documentation by YARD 0.9.37

Module: RSpec::StubbedEnv::HideHelpers

Includes:
StubHelpers
Defined in:
lib/rspec/stubbed_env/hide_helpers.rb

Overview

Helpers to unobtrusively stub ENV

Instance Method Summary collapse

Methods included from StubHelpers

#stub_env

Instance Method Details

#hide_env(*keys) ⇒ Object

Can be called with an array of ENV keys to hide:

hide_env('FOO', 'BAR', 'BAZ') # Preferred

Alternatively can be called once per ENV key to hide:

stub_env('A') # NOT
stub_env('C') # AS
stub_env('E') # GOOD (creates redundant stubs on values_at)


39
40
41
42
43
44
# File 'lib/rspec/stubbed_env/hide_helpers.rb', line 39

def hide_env(*keys)
  init_stub unless env_stubbed?
  keys.each do |key|
    add_hidden_key(key)
  end
end
rspec-stubbed_env-1.0.4/docs/RSpec/StubbedEnv/StubHelpers.html000066400000000000000000000204741504431001300242570ustar00rootroot00000000000000 Module: RSpec::StubbedEnv::StubHelpers — Documentation by YARD 0.9.37

Module: RSpec::StubbedEnv::StubHelpers

Included in:
HideHelpers
Defined in:
lib/rspec/stubbed_env/stub_helpers.rb

Overview

Helpers to unobtrusively stub ENV

Instance Method Summary collapse

Instance Method Details

#stub_env(key_or_hash, value = nil) ⇒ Object

Can be called with all key value pairs to be stubbed as a hash:

stub_env('A' => 'B', 'C' => 'D', 'E' => 'F') # Preferred

Alternatively can be called one per ENV key-value pair to stub:

stub_env('A', 'B') # NOT
stub_env('C', 'D') # AS
stub_env('E', 'F') # GOOD (Creates redundant stubs on values_at)


40
41
42
43
44
45
46
47
# File 'lib/rspec/stubbed_env/stub_helpers.rb', line 40

def stub_env(key_or_hash, value = nil)
  init_stub unless env_stubbed?
  if key_or_hash.is_a?(Hash)
    key_or_hash.each { |k, v| add_stubbed_value(k, v) }
  else
    add_stubbed_value(key_or_hash, value)
  end
end
rspec-stubbed_env-1.0.4/docs/_index.html000066400000000000000000000074701504431001300202110ustar00rootroot00000000000000 Documentation by YARD 0.9.37

Documentation by YARD 0.9.37

Alphabetic Index

File Listing

Namespace Listing A-Z

rspec-stubbed_env-1.0.4/docs/class_list.html000066400000000000000000000060251504431001300210760ustar00rootroot00000000000000 Class List

Class List

rspec-stubbed_env-1.0.4/docs/css/000077500000000000000000000000001504431001300166355ustar00rootroot00000000000000rspec-stubbed_env-1.0.4/docs/css/common.css000066400000000000000000000000521504431001300206340ustar00rootroot00000000000000/* Override this file with custom rules */rspec-stubbed_env-1.0.4/docs/css/full_list.css000066400000000000000000000127661504431001300213600ustar00rootroot00000000000000body { margin: 0; font-family: "Lucida Sans", "Lucida Grande", Verdana, Arial, sans-serif; font-size: 13px; height: 101%; overflow-x: hidden; background: #fafafa; } h1 { padding: 12px 10px; padding-bottom: 0; margin: 0; font-size: 1.4em; } .clear { clear: both; } .fixed_header { position: fixed; background: #fff; width: 100%; padding-bottom: 10px; margin-top: 0; top: 0; z-index: 9999; height: 70px; } #search { position: absolute; right: 5px; top: 9px; padding-left: 24px; } #content.insearch #search, #content.insearch #noresults { background: url(data:image/gif;base64,R0lGODlhEAAQAPYAAP///wAAAPr6+pKSkoiIiO7u7sjIyNjY2J6engAAAI6OjsbGxjIyMlJSUuzs7KamppSUlPLy8oKCghwcHLKysqSkpJqamvT09Pj4+KioqM7OzkRERAwMDGBgYN7e3ujo6Ly8vCoqKjY2NkZGRtTU1MTExDw8PE5OTj4+PkhISNDQ0MrKylpaWrS0tOrq6nBwcKysrLi4uLq6ul5eXlxcXGJiYoaGhuDg4H5+fvz8/KKiohgYGCwsLFZWVgQEBFBQUMzMzDg4OFhYWBoaGvDw8NbW1pycnOLi4ubm5kBAQKqqqiQkJCAgIK6urnJyckpKSjQ0NGpqatLS0sDAwCYmJnx8fEJCQlRUVAoKCggICLCwsOTk5ExMTPb29ra2tmZmZmhoaNzc3KCgoBISEiIiIgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh/hpDcmVhdGVkIHdpdGggYWpheGxvYWQuaW5mbwAh+QQJCAAAACwAAAAAEAAQAAAHaIAAgoMgIiYlg4kACxIaACEJCSiKggYMCRselwkpghGJBJEcFgsjJyoAGBmfggcNEx0flBiKDhQFlIoCCA+5lAORFb4AJIihCRbDxQAFChAXw9HSqb60iREZ1omqrIPdJCTe0SWI09GBACH5BAkIAAAALAAAAAAQABAAAAdrgACCgwc0NTeDiYozCQkvOTo9GTmDKy8aFy+NOBA7CTswgywJDTIuEjYFIY0JNYMtKTEFiRU8Pjwygy4ws4owPyCKwsMAJSTEgiQlgsbIAMrO0dKDGMTViREZ14kYGRGK38nHguHEJcvTyIEAIfkECQgAAAAsAAAAABAAEAAAB2iAAIKDAggPg4iJAAMJCRUAJRIqiRGCBI0WQEEJJkWDERkYAAUKEBc4Po1GiKKJHkJDNEeKig4URLS0ICImJZAkuQAhjSi/wQyNKcGDCyMnk8u5rYrTgqDVghgZlYjcACTA1sslvtHRgQAh+QQJCAAAACwAAAAAEAAQAAAHZ4AAgoOEhYaCJSWHgxGDJCQARAtOUoQRGRiFD0kJUYWZhUhKT1OLhR8wBaaFBzQ1NwAlkIszCQkvsbOHL7Y4q4IuEjaqq0ZQD5+GEEsJTDCMmIUhtgk1lo6QFUwJVDKLiYJNUd6/hoEAIfkECQgAAAAsAAAAABAAEAAAB2iAAIKDhIWGgiUlh4MRgyQkjIURGRiGGBmNhJWHm4uen4ICCA+IkIsDCQkVACWmhwSpFqAABQoQF6ALTkWFnYMrVlhWvIKTlSAiJiVVPqlGhJkhqShHV1lCW4cMqSkAR1ofiwsjJyqGgQAh+QQJCAAAACwAAAAAEAAQAAAHZ4AAgoOEhYaCJSWHgxGDJCSMhREZGIYYGY2ElYebi56fhyWQniSKAKKfpaCLFlAPhl0gXYNGEwkhGYREUywag1wJwSkHNDU3D0kJYIMZQwk8MjPBLx9eXwuETVEyAC/BOKsuEjYFhoEAIfkECQgAAAAsAAAAABAAEAAAB2eAAIKDhIWGgiUlh4MRgyQkjIURGRiGGBmNhJWHm4ueICImip6CIQkJKJ4kigynKaqKCyMnKqSEK05StgAGQRxPYZaENqccFgIID4KXmQBhXFkzDgOnFYLNgltaSAAEpxa7BQoQF4aBACH5BAkIAAAALAAAAAAQABAAAAdogACCg4SFggJiPUqCJSWGgkZjCUwZACQkgxGEXAmdT4UYGZqCGWQ+IjKGGIUwPzGPhAc0NTewhDOdL7Ykji+dOLuOLhI2BbaFETICx4MlQitdqoUsCQ2vhKGjglNfU0SWmILaj43M5oEAOwAAAAAAAAAAAA==) no-repeat center left; } #full_list { padding: 0; list-style: none; margin-left: 0; margin-top: 80px; font-size: 1.1em; } #full_list ul { padding: 0; } #full_list li { padding: 0; margin: 0; list-style: none; } #full_list li .item { padding: 5px 5px 5px 12px; } #noresults { padding: 7px 12px; background: #fff; } #content.insearch #noresults { margin-left: 7px; } li.collapsed ul { display: none; } li a.toggle { cursor: default; position: relative; left: -5px; top: 4px; text-indent: -999px; width: 10px; height: 9px; margin-left: -10px; display: block; float: left; background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAASCAYAAABb0P4QAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAK8AAACvABQqw0mAAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTM5jWRgMAAAAVdEVYdENyZWF0aW9uIFRpbWUAMy8xNC8wOeNZPpQAAAE2SURBVDiNrZTBccIwEEXfelIAHUA6CZ24BGaWO+FuzZAK4k6gg5QAdGAq+Bxs2Yqx7BzyL7Llp/VfzZeQhCTc/ezuGzKKnKSzpCxXJM8fwNXda3df5RZETlIt6YUzSQDs93sl8w3wBZxCCE10GM1OcWbWjB2mWgEH4Mfdyxm3PSepBHibgQE2wLe7r4HjEidpnXMYdQPKEMJcsZ4zs2POYQOcaPfwMVOo58zsAdMt18BuoVDPxUJRacELbXv3hUIX2vYmOUvi8C8ydz/ThjXrqKqqLbDIAdsCKBd+Wo7GWa7o9qzOQHVVVXeAbs+yHHCH4aTsaCOQqunmUy1yBUAXkdMIfMlgF5EXLo2OpV/c/Up7jG4hhHcYLgWzAZXUc2b2ixsfvc/RmNNfOXD3Q/oeL9axJE1yT9IOoUu6MGUkAAAAAElFTkSuQmCC) no-repeat bottom left; } li.collapsed a.toggle { cursor: default; background-position: top left; } li { color: #666; cursor: pointer; } li.deprecated { text-decoration: line-through; font-style: italic; } li.odd { background: #f0f0f0; } li.even { background: #fafafa; } .item:hover { background: #ddd; } li small:before { content: "("; } li small:after { content: ")"; } li small.search_info { display: none; } a, a:visited { text-decoration: none; color: #05a; } li.clicked > .item { background: #05a; color: #ccc; } li.clicked > .item a, li.clicked > .item a:visited { color: #eee; } li.clicked > .item a.toggle { opacity: 0.5; background-position: bottom right; } li.collapsed.clicked a.toggle { background-position: top right; } #search input { border: 1px solid #bbb; border-radius: 3px; } #full_list_nav { margin-left: 10px; font-size: 0.9em; display: block; color: #aaa; } #full_list_nav a, #nav a:visited { color: #358; } #full_list_nav a:hover { background: transparent; color: #5af; } #full_list_nav span:after { content: ' | '; } #full_list_nav span:last-child:after { content: ''; } #content h1 { margin-top: 0; } li { white-space: nowrap; cursor: normal; } li small { display: block; font-size: 0.8em; } li small:before { content: ""; } li small:after { content: ""; } li small.search_info { display: none; } #search { width: 170px; position: static; margin: 3px; margin-left: 10px; font-size: 0.9em; color: #666; padding-left: 0; padding-right: 24px; } #content.insearch #search { background-position: center right; } #search input { width: 110px; } #full_list.insearch ul { display: block; } #full_list.insearch .item { display: none; } #full_list.insearch .found { display: block; padding-left: 11px !important; } #full_list.insearch li a.toggle { display: none; } #full_list.insearch li small.search_info { display: block; } rspec-stubbed_env-1.0.4/docs/css/style.css000066400000000000000000000510551504431001300205150ustar00rootroot00000000000000html { width: 100%; height: 100%; } body { font-family: "Lucida Sans", "Lucida Grande", Verdana, Arial, sans-serif; font-size: 13px; width: 100%; margin: 0; padding: 0; display: flex; display: -webkit-flex; display: -ms-flexbox; } #nav { position: relative; width: 100%; height: 100%; border: 0; border-right: 1px dotted #eee; overflow: auto; } .nav_wrap { margin: 0; padding: 0; width: 20%; height: 100%; position: relative; display: flex; display: -webkit-flex; display: -ms-flexbox; flex-shrink: 0; -webkit-flex-shrink: 0; -ms-flex: 1 0; } #resizer { position: absolute; right: -5px; top: 0; width: 10px; height: 100%; cursor: col-resize; z-index: 9999; } #main { flex: 5 1; -webkit-flex: 5 1; -ms-flex: 5 1; outline: none; position: relative; background: #fff; padding: 1.2em; padding-top: 0.2em; box-sizing: border-box; } @media (max-width: 920px) { .nav_wrap { width: 100%; top: 0; right: 0; overflow: visible; position: absolute; } #resizer { display: none; } #nav { z-index: 9999; background: #fff; display: none; position: absolute; top: 40px; right: 12px; width: 500px; max-width: 80%; height: 80%; overflow-y: scroll; border: 1px solid #999; border-collapse: collapse; box-shadow: -7px 5px 25px #aaa; border-radius: 2px; } } @media (min-width: 920px) { body { height: 100%; overflow: hidden; } #main { height: 100%; overflow: auto; } #search { display: none; } } @media (max-width: 320px) { body { height: 100%; overflow: hidden; overflow-wrap: break-word; } #main { height: 100%; overflow: auto; } } #main img { max-width: 100%; } h1 { font-size: 25px; margin: 1em 0 0.5em; padding-top: 4px; border-top: 1px dotted #d5d5d5; } h1.noborder { border-top: 0px; margin-top: 0; padding-top: 4px; } h1.title { margin-bottom: 10px; } h1.alphaindex { margin-top: 0; font-size: 22px; } h2 { padding: 0; padding-bottom: 3px; border-bottom: 1px #aaa solid; font-size: 1.4em; margin: 1.8em 0 0.5em; position: relative; } h2 small { font-weight: normal; font-size: 0.7em; display: inline; position: absolute; right: 0; } h2 small a { display: block; height: 20px; border: 1px solid #aaa; border-bottom: 0; border-top-left-radius: 5px; background: #f8f8f8; position: relative; padding: 2px 7px; } a { font-weight: 550; } .clear { clear: both; } .inline { display: inline; } .inline p:first-child { display: inline; } .docstring, .tags, #filecontents { font-size: 15px; line-height: 1.5145em; } .docstring p > code, .docstring p > tt, .tags p > code, .tags p > tt { color: #c7254e; background: #f9f2f4; padding: 2px 4px; font-size: 1em; border-radius: 4px; } .docstring h1, .docstring h2, .docstring h3, .docstring h4 { padding: 0; border: 0; border-bottom: 1px dotted #bbb; } .docstring h1 { font-size: 1.2em; } .docstring h2 { font-size: 1.1em; } .docstring h3, .docstring h4 { font-size: 1em; border-bottom: 0; padding-top: 10px; } .summary_desc .object_link a, .docstring .object_link a { font-family: monospace; font-size: 1.05em; color: #05a; background: #EDF4FA; padding: 2px 4px; font-size: 1em; border-radius: 4px; } .rdoc-term { padding-right: 25px; font-weight: bold; } .rdoc-list p { margin: 0; padding: 0; margin-bottom: 4px; } .summary_desc pre.code .object_link a, .docstring pre.code .object_link a { padding: 0px; background: inherit; color: inherit; border-radius: inherit; } /* style for */ #filecontents table, .docstring table { border-collapse: collapse; } #filecontents table th, #filecontents table td, .docstring table th, .docstring table td { border: 1px solid #ccc; padding: 8px; padding-right: 17px; } #filecontents table tr:nth-child(odd), .docstring table tr:nth-child(odd) { background: #eee; } #filecontents table tr:nth-child(even), .docstring table tr:nth-child(even) { background: #fff; } #filecontents table th, .docstring table th { background: #fff; } /* style for
    */ #filecontents li > p, .docstring li > p { margin: 0px; } #filecontents ul, .docstring ul { padding-left: 20px; } /* style for
    */ #filecontents dl, .docstring dl { border: 1px solid #ccc; } #filecontents dt, .docstring dt { background: #ddd; font-weight: bold; padding: 3px 5px; } #filecontents dd, .docstring dd { padding: 5px 0px; margin-left: 18px; } #filecontents dd > p, .docstring dd > p { margin: 0px; } .note { color: #222; margin: 20px 0; padding: 10px; border: 1px solid #eee; border-radius: 3px; display: block; } .docstring .note { border-left-color: #ccc; border-left-width: 5px; } .note.todo { background: #ffffc5; border-color: #ececaa; } .note.returns_void { background: #efefef; } .note.deprecated { background: #ffe5e5; border-color: #e9dada; } .note.title.deprecated { background: #ffe5e5; border-color: #e9dada; } .note.private { background: #ffffc5; border-color: #ececaa; } .note.title { padding: 3px 6px; font-size: 0.9em; font-family: "Lucida Sans", "Lucida Grande", Verdana, Arial, sans-serif; display: inline; } .summary_signature + .note.title { margin-left: 7px; } h1 .note.title { font-size: 0.5em; font-weight: normal; padding: 3px 5px; position: relative; top: -3px; text-transform: capitalize; } .note.title { background: #efefef; } .note.title.constructor { color: #fff; background: #6a98d6; border-color: #6689d6; } .note.title.writeonly { color: #fff; background: #45a638; border-color: #2da31d; } .note.title.readonly { color: #fff; background: #6a98d6; border-color: #6689d6; } .note.title.private { background: #d5d5d5; border-color: #c5c5c5; } .note.title.not_defined_here { background: transparent; border: none; font-style: italic; } .discussion .note { margin-top: 6px; } .discussion .note:first-child { margin-top: 0; } h3.inherited { font-style: italic; font-family: "Lucida Sans", "Lucida Grande", Verdana, Arial, sans-serif; font-weight: normal; padding: 0; margin: 0; margin-top: 12px; margin-bottom: 3px; font-size: 13px; } p.inherited { padding: 0; margin: 0; margin-left: 25px; } .box_info dl { margin: 0; border: 0; width: 100%; font-size: 1em; display: flex; display: -webkit-flex; display: -ms-flexbox; } .box_info dl dt { flex-shrink: 0; -webkit-flex-shrink: 1; -ms-flex-shrink: 1; width: 100px; text-align: right; font-weight: bold; border: 1px solid #aaa; border-width: 1px 0px 0px 1px; padding: 6px 0; padding-right: 10px; } .box_info dl dd { flex-grow: 1; -webkit-flex-grow: 1; -ms-flex: 1; max-width: 420px; padding: 6px 0; padding-right: 20px; border: 1px solid #aaa; border-width: 1px 1px 0 0; overflow: hidden; position: relative; } .box_info dl:last-child > * { border-bottom: 1px solid #aaa; } .box_info dl:nth-child(odd) > * { background: #eee; } .box_info dl:nth-child(even) > * { background: #fff; } .box_info dl > * { margin: 0; } ul.toplevel { list-style: none; padding-left: 0; font-size: 1.1em; } .index_inline_list { padding-left: 0; font-size: 1.1em; } .index_inline_list li { list-style: none; display: inline-block; padding: 0 12px; line-height: 30px; margin-bottom: 5px; } dl.constants { margin-left: 10px; } dl.constants dt { font-weight: bold; font-size: 1.1em; margin-bottom: 5px; } dl.constants.compact dt { display: inline-block; font-weight: normal } dl.constants dd { width: 75%; white-space: pre; font-family: monospace; margin-bottom: 18px; } dl.constants .docstring .note:first-child { margin-top: 5px; } .summary_desc { margin-left: 32px; display: block; font-family: sans-serif; font-size: 1.1em; margin-top: 8px; line-height: 1.5145em; margin-bottom: 0.8em; } .summary_desc tt { font-size: 0.9em; } dl.constants .note { padding: 2px 6px; padding-right: 12px; margin-top: 6px; } dl.constants .docstring { margin-left: 32px; font-size: 0.9em; font-weight: normal; } dl.constants .tags { padding-left: 32px; font-size: 0.9em; line-height: 0.8em; } dl.constants .discussion *:first-child { margin-top: 0; } dl.constants .discussion *:last-child { margin-bottom: 0; } .method_details { border-top: 1px dotted #ccc; margin-top: 25px; padding-top: 0; } .method_details.first { border: 0; margin-top: 5px; } .method_details.first h3.signature { margin-top: 1em; } p.signature, h3.signature { font-size: 1.1em; font-weight: normal; font-family: Monaco, Consolas, Courier, monospace; padding: 6px 10px; margin-top: 1em; background: #E8F4FF; border: 1px solid #d8d8e5; border-radius: 5px; } p.signature tt, h3.signature tt { font-family: Monaco, Consolas, Courier, monospace; } p.signature .overload, h3.signature .overload { display: block; } p.signature .extras, h3.signature .extras { font-weight: normal; font-family: sans-serif; color: #444; font-size: 1em; } p.signature .not_defined_here, h3.signature .not_defined_here, p.signature .aliases, h3.signature .aliases { display: block; font-weight: normal; font-size: 0.9em; font-family: sans-serif; margin-top: 0px; color: #555; } p.signature .aliases .names, h3.signature .aliases .names { font-family: Monaco, Consolas, Courier, monospace; font-weight: bold; color: #000; font-size: 1.2em; } .tags .tag_title { font-size: 1.05em; margin-bottom: 0; font-weight: bold; } .tags .tag_title tt { color: initial; padding: initial; background: initial; } .tags ul { margin-top: 5px; padding-left: 30px; list-style: square; } .tags ul li { margin-bottom: 3px; } .tags ul .name { font-family: monospace; font-weight: bold; } .tags ul .note { padding: 3px 6px; } .tags { margin-bottom: 12px; } .tags .examples .tag_title { margin-bottom: 10px; font-weight: bold; } .tags .examples .inline p { padding: 0; margin: 0; font-weight: bold; font-size: 1em; } .tags .examples .inline p:before { content: "▸"; font-size: 1em; margin-right: 5px; } .tags .overload .overload_item { list-style: none; margin-bottom: 25px; } .tags .overload .overload_item .signature { padding: 2px 8px; background: #F1F8FF; border: 1px solid #d8d8e5; border-radius: 3px; } .tags .overload .signature { margin-left: -15px; font-family: monospace; display: block; font-size: 1.1em; } .tags .overload .docstring { margin-top: 15px; } .defines { display: none; } #method_missing_details .notice.this { position: relative; top: -8px; color: #888; padding: 0; margin: 0; } .showSource { font-size: 0.9em; } .showSource a, .showSource a:visited { text-decoration: none; color: #666; } #content a, #content a:visited { text-decoration: none; color: #05a; } #content a:hover { background: #ffffa5; } ul.summary { list-style: none; font-family: monospace; font-size: 1em; line-height: 1.5em; padding-left: 0px; } ul.summary a, ul.summary a:visited { text-decoration: none; font-size: 1.1em; } ul.summary li { margin-bottom: 5px; } .summary_signature { padding: 4px 8px; background: #f8f8f8; border: 1px solid #f0f0f0; border-radius: 5px; } .summary_signature:hover { background: #CFEBFF; border-color: #A4CCDA; cursor: pointer; } .summary_signature.deprecated { background: #ffe5e5; border-color: #e9dada; } ul.summary.compact li { display: inline-block; margin: 0px 5px 0px 0px; line-height: 2.6em;} ul.summary.compact .summary_signature { padding: 5px 7px; padding-right: 4px; } #content .summary_signature:hover a, #content .summary_signature:hover a:visited { background: transparent; color: #049; } p.inherited a { font-family: monospace; font-size: 0.9em; } p.inherited { word-spacing: 5px; font-size: 1.2em; } p.children { font-size: 1.2em; } p.children a { font-size: 0.9em; } p.children strong { font-size: 0.8em; } p.children strong.modules { padding-left: 5px; } ul.fullTree { display: none; padding-left: 0; list-style: none; margin-left: 0; margin-bottom: 10px; } ul.fullTree ul { margin-left: 0; padding-left: 0; list-style: none; } ul.fullTree li { text-align: center; padding-top: 18px; padding-bottom: 12px; background: url(data:image/gif;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRByAgTYSHaiAFiilgjjggXmYX4IcFIBBKLJCDJiBRRIkuRNUgxUopUIFVIHfI9cgI5h1xGupE7yAAygvyGvEcxlIGyUT3UDLVDuag3GoRGogvQZHQxmo8WoJvQcrQaPYw2oefQq2gP2o8+Q8cwwOgYBzPEbDAuxsNCsTgsCZNjy7EirAyrxhqwVqwDu4n1Y8+xdwQSgUXACTYEd0IgYR5BSFhMWE7YSKggHCQ0EdoJNwkDhFHCJyKTqEu0JroR+cQYYjIxh1hILCPWEo8TLxB7iEPENyQSiUMyJ7mQAkmxpFTSEtJG0m5SI+ksqZs0SBojk8naZGuyBzmULCAryIXkneTD5DPkG+Qh8lsKnWJAcaT4U+IoUspqShnlEOU05QZlmDJBVaOaUt2ooVQRNY9aQq2htlKvUYeoEzR1mjnNgxZJS6WtopXTGmgXaPdpr+h0uhHdlR5Ol9BX0svpR+iX6AP0dwwNhhWDx4hnKBmbGAcYZxl3GK+YTKYZ04sZx1QwNzHrmOeZD5lvVVgqtip8FZHKCpVKlSaVGyovVKmqpqreqgtV81XLVI+pXlN9rkZVM1PjqQnUlqtVqp1Q61MbU2epO6iHqmeob1Q/pH5Z/YkGWcNMw09DpFGgsV/jvMYgC2MZs3gsIWsNq4Z1gTXEJrHN2Xx2KruY/R27iz2qqaE5QzNKM1ezUvOUZj8H45hx+Jx0TgnnKKeX836K3hTvKeIpG6Y0TLkxZVxrqpaXllirSKtRq0frvTau7aedpr1Fu1n7gQ5Bx0onXCdHZ4/OBZ3nU9lT3acKpxZNPTr1ri6qa6UbobtEd79up+6Ynr5egJ5Mb6feeb3n+hx9L/1U/W36p/VHDFgGswwkBtsMzhg8xTVxbzwdL8fb8VFDXcNAQ6VhlWGX4YSRudE8o9VGjUYPjGnGXOMk423GbcajJgYmISZLTepN7ppSTbmmKaY7TDtMx83MzaLN1pk1mz0x1zLnm+eb15vft2BaeFostqi2uGVJsuRaplnutrxuhVo5WaVYVVpds0atna0l1rutu6cRp7lOk06rntZnw7Dxtsm2qbcZsOXYBtuutm22fWFnYhdnt8Wuw+6TvZN9un2N/T0HDYfZDqsdWh1+c7RyFDpWOt6azpzuP33F9JbpL2dYzxDP2DPjthPLKcRpnVOb00dnF2e5c4PziIuJS4LLLpc+Lpsbxt3IveRKdPVxXeF60vWdm7Obwu2o26/uNu5p7ofcn8w0nymeWTNz0MPIQ+BR5dE/C5+VMGvfrH5PQ0+BZ7XnIy9jL5FXrdewt6V3qvdh7xc+9j5yn+M+4zw33jLeWV/MN8C3yLfLT8Nvnl+F30N/I/9k/3r/0QCngCUBZwOJgUGBWwL7+Hp8Ib+OPzrbZfay2e1BjKC5QRVBj4KtguXBrSFoyOyQrSH355jOkc5pDoVQfujW0Adh5mGLw34MJ4WHhVeGP45wiFga0TGXNXfR3ENz30T6RJZE3ptnMU85ry1KNSo+qi5qPNo3ujS6P8YuZlnM1VidWElsSxw5LiquNm5svt/87fOH4p3iC+N7F5gvyF1weaHOwvSFpxapLhIsOpZATIhOOJTwQRAqqBaMJfITdyWOCnnCHcJnIi/RNtGI2ENcKh5O8kgqTXqS7JG8NXkkxTOlLOW5hCepkLxMDUzdmzqeFpp2IG0yPTq9MYOSkZBxQqohTZO2Z+pn5mZ2y6xlhbL+xW6Lty8elQfJa7OQrAVZLQq2QqboVFoo1yoHsmdlV2a/zYnKOZarnivN7cyzytuQN5zvn//tEsIS4ZK2pYZLVy0dWOa9rGo5sjxxedsK4xUFK4ZWBqw8uIq2Km3VT6vtV5eufr0mek1rgV7ByoLBtQFr6wtVCuWFfevc1+1dT1gvWd+1YfqGnRs+FYmKrhTbF5cVf9go3HjlG4dvyr+Z3JS0qavEuWTPZtJm6ebeLZ5bDpaql+aXDm4N2dq0Dd9WtO319kXbL5fNKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAgY0hSTQAAeiUAAICDAAD5/wAAgOkAAHUwAADqYAAAOpgAABdvkl/FRgAAAHtJREFUeNqMzrEJAkEURdGzuhgZbSoYWcAWoBVsB4JgZAGmphsZCZYzTQgWNCYrDN9RvMmHx+X916SUBFbo8CzD1idXrLErw1mQttgXtyrOcQ/Ny5p4Qh+2XqLYYazsPWNTiuMkRxa4vcV+evuNAUOLIx5+c2hyzv7hNQC67Q+/HHmlEwAAAABJRU5ErkJggg==) no-repeat top center; } ul.fullTree li:first-child { padding-top: 0; background: transparent; } ul.fullTree li:last-child { padding-bottom: 0; } .showAll ul.fullTree { display: block; } .showAll .inheritName { display: none; } #search { position: absolute; right: 12px; top: 0px; z-index: 9000; } #search a { display: block; float: left; padding: 4px 8px; text-decoration: none; color: #05a; fill: #05a; border: 1px solid #d8d8e5; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; background: #F1F8FF; box-shadow: -1px 1px 3px #ddd; } #search a:hover { background: #f5faff; color: #06b; fill: #06b; } #search a.active { background: #568; padding-bottom: 20px; color: #fff; fill: #fff; border: 1px solid #457; border-top-left-radius: 5px; border-top-right-radius: 5px; } #search a.inactive { color: #999; fill: #999; } .inheritanceTree, .toggleDefines { float: right; border-left: 1px solid #aaa; position: absolute; top: 0; right: 0; height: 100%; background: #f6f6f6; padding: 5px; min-width: 55px; text-align: center; } #menu { font-size: 1.3em; color: #bbb; } #menu .title, #menu a { font-size: 0.7em; } #menu .title a { font-size: 1em; } #menu .title { color: #555; } #menu a, #menu a:visited { color: #333; text-decoration: none; border-bottom: 1px dotted #bbd; } #menu a:hover { color: #05a; } #footer { margin-top: 15px; border-top: 1px solid #ccc; text-align: center; padding: 7px 0; color: #999; } #footer a, #footer a:visited { color: #444; text-decoration: none; border-bottom: 1px dotted #bbd; } #footer a:hover { color: #05a; } #listing ul.alpha { font-size: 1.1em; } #listing ul.alpha { margin: 0; padding: 0; padding-bottom: 10px; list-style: none; } #listing ul.alpha li.letter { font-size: 1.4em; padding-bottom: 10px; } #listing ul.alpha ul { margin: 0; padding-left: 15px; } #listing ul small { color: #666; font-size: 0.7em; } li.r1 { background: #f0f0f0; } li.r2 { background: #fafafa; } #content ul.summary li.deprecated .summary_signature a, #content ul.summary li.deprecated .summary_signature a:visited { text-decoration: line-through; font-style: italic; } #toc { position: relative; float: right; overflow-x: auto; right: -3px; margin-left: 20px; margin-bottom: 20px; padding: 20px; padding-right: 30px; max-width: 300px; z-index: 5000; background: #fefefe; border: 1px solid #ddd; box-shadow: -2px 2px 6px #bbb; } #toc .title { margin: 0; } #toc ol { padding-left: 1.8em; } #toc li { font-size: 1.1em; line-height: 1.7em; } #toc > ol > li { font-size: 1.1em; font-weight: bold; } #toc ol > li > ol { font-size: 0.9em; } #toc ol ol > li > ol { padding-left: 2.3em; } #toc ol + li { margin-top: 0.3em; } #toc.hidden { padding: 10px; background: #fefefe; box-shadow: none; } #toc.hidden:hover { background: #fafafa; } #filecontents h1 + #toc.nofloat { margin-top: 0; } @media (max-width: 560px) { #toc { margin-left: 0; margin-top: 16px; float: none; max-width: none; } } /* syntax highlighting */ .source_code { display: none; padding: 3px 8px; border-left: 8px solid #ddd; margin-top: 5px; } #filecontents pre.code, .docstring pre.code, .source_code pre { font-family: monospace; } #filecontents pre.code, .docstring pre.code { display: block; } .source_code .lines { padding-right: 12px; color: #555; text-align: right; } #filecontents pre.code, .docstring pre.code, .tags pre.example { padding: 9px 14px; margin-top: 4px; border: 1px solid #e1e1e8; background: #f7f7f9; border-radius: 4px; font-size: 1em; overflow-x: auto; line-height: 1.2em; } pre.code { color: #000; tab-size: 2; } pre.code .info.file { color: #555; } pre.code .val { color: #036A07; } pre.code .tstring_content, pre.code .heredoc_beg, pre.code .heredoc_end, pre.code .qwords_beg, pre.code .qwords_end, pre.code .qwords_sep, pre.code .words_beg, pre.code .words_end, pre.code .words_sep, pre.code .qsymbols_beg, pre.code .qsymbols_end, pre.code .qsymbols_sep, pre.code .symbols_beg, pre.code .symbols_end, pre.code .symbols_sep, pre.code .tstring, pre.code .dstring { color: #036A07; } pre.code .fid, pre.code .rubyid_new, pre.code .rubyid_to_s, pre.code .rubyid_to_sym, pre.code .rubyid_to_f, pre.code .dot + pre.code .id, pre.code .rubyid_to_i pre.code .rubyid_each { color: #0085FF; } pre.code .comment { color: #0066FF; } pre.code .const, pre.code .constant { color: #585CF6; } pre.code .label, pre.code .symbol { color: #C5060B; } pre.code .kw, pre.code .rubyid_require, pre.code .rubyid_extend, pre.code .rubyid_include { color: #0000FF; } pre.code .ivar { color: #318495; } pre.code .gvar, pre.code .rubyid_backref, pre.code .rubyid_nth_ref { color: #6D79DE; } pre.code .regexp, .dregexp { color: #036A07; } pre.code a { border-bottom: 1px dotted #bbf; } /* inline code */ *:not(pre) > code { padding: 1px 3px 1px 3px; border: 1px solid #E1E1E8; background: #F7F7F9; border-radius: 4px; } /* Color fix for links */ #content .summary_desc pre.code .id > .object_link a, /* identifier */ #content .docstring pre.code .id > .object_link a { color: #0085FF; } #content .summary_desc pre.code .const > .object_link a, /* constant */ #content .docstring pre.code .const > .object_link a { color: #585CF6; } rspec-stubbed_env-1.0.4/docs/file.CHANGELOG.html000066400000000000000000000143601504431001300211440ustar00rootroot00000000000000 File: CHANGELOG — Documentation by YARD 0.9.37

    Changelog

    All notable changes to this project will be documented in this file.

    The format is based on Keep a Changelog v1,
    and this project adheres to Semantic Versioning v2.

    Unreleased

    Added

    Changed

    Deprecated

    Removed

    Fixed

    Security

    1.0.4 - 2025-08-04

    • TAG: v1.0.4
    • COVERAGE: 100.00% – 73/73 lines in 5 files
    • BRANCH COVERAGE: 100.00% – 10/10 branches in 5 files
    • 85.71% documented

      Added

    • Discord notifications for CI, issues, pulls, etc

      Changed

    • Ownership transfer from pboling to galtzo-floss
    • gemspec metadata (homepage, funding, etc)

    1.0.3 - 2025-07-28

    • TAG: v1.0.3
    • COVERAGE: 100.00% – 73/73 lines in 5 files
    • BRANCH COVERAGE: 100.00% – 10/10 branches in 5 files
    • 85.71% documented

      Added

    • More documentation
    • Tracking maintainability and coverage with QLTY.sh
    • Documentation site
      • https://rspec-stubbed-env.galtzo.com

        Changed

    • gemspec metadata

    1.0.2 - 2025-05-06

    • TAG: v1.0.2
    • COVERAGE: 100.00% – 73/73 lines in 5 files
    • BRANCH COVERAGE: 100.00% – 10/10 branches in 5 files
    • 85.71% documented

      Added

    • hide_env
      • include_context "with hidden env", "FOO"
    • Allow providing the env key/value pairs to be stubbed to include_context (@darhazer)
      • include_context "with stubbed env", "FOO" => "is bar"
    • Security policy (SECURITY.md)
    • Random ordering of test suite
    • 20 year signing cert expires 2045-04-29
    • dev container config for development
    • Added appraisals to test on many supported Rubies
      • Ruby 2.3+, including head
      • JRuby 9.1+, including head
      • Truffleruby 22.3+, including head
    • Added CITATION.cff
    • Upgraded Code of Conduct based on Contributor Covenant v2.1
    • New pattern for loading version.rb in gemspec allows (real) 100% code coverage

    1.0.1 - 2023-04-01

    • TAG: v1.0.1

      Added

    • support for values_at (@darhazer)
    • support for symbol keys (@hosamaly)
    • Structured gemfiles
    • Rubocop with standard, gradual, & more
    • Releases are now signed
    • Releases now have checksums

      Changed

    • Required ruby version in gemspec >= 1.8.7
      • not bumping major version, because this was already the de-facto minimum
    • TravisCI => GitHub Actions
    • CODE_OF_CONDUCT.md upgraded to v2.0
    • Moved from master to main default branch

      Fixed

    • README Badges (CI status)

    1.0.0 - 2018-10-06

    • TAG: v1.0.0

      Added

    • negated matchers
    • rubocop config
    rspec-stubbed_env-1.0.4/docs/file.CODE_OF_CONDUCT.html000066400000000000000000000177271504431001300221440ustar00rootroot00000000000000 File: CODE_OF_CONDUCT — Documentation by YARD 0.9.37

    Contributor Covenant Code of Conduct

    Our Pledge

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

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

    Our Standards

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

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

    Examples of unacceptable behavior include:

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

    Enforcement Responsibilities

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

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

    Scope

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

    Enforcement

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

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

    Enforcement Guidelines

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

    1. Correction

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

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

    2. Warning

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

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

    3. Temporary Ban

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

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

    4. Permanent Ban

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

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

    Attribution

    This Code of Conduct is adapted from the Contributor Covenant,
    version 2.1, available at
    https://www.contributor-covenant.org/version/2/1/code_of_conduct.html.

    Community Impact Guidelines were inspired by
    Mozilla’s code of conduct enforcement ladder.

    For answers to common questions about this code of conduct, see the FAQ at
    https://www.contributor-covenant.org/faq. Translations are available at
    https://www.contributor-covenant.org/translations.

    rspec-stubbed_env-1.0.4/docs/file.CONTRIBUTING.html000066400000000000000000000177321504431001300215720ustar00rootroot00000000000000 File: CONTRIBUTING — Documentation by YARD 0.9.37

    Contributing

    Bug reports and pull requests are welcome on GitHub, CodeBerg, or GitLab.
    This project should be a safe, welcoming space for collaboration, so contributors agree to adhere to
    the code of conduct.

    To submit a patch, please fork the project, create a patch with tests, and send a pull request.

    Remember to Keep A Changelog.

    Help out!

    Take a look at the reek list which is the file called REEK and find something to improve.

    Follow these instructions:

    1. Fork the repository
    2. Create a feature branch (git checkout -b my-new-feature)
    3. Make some fixes.
    4. Commit changes (git commit -am 'Added some feature')
    5. Push to the branch (git push origin my-new-feature)
    6. Make sure to add tests for it. This is important, so it doesn’t break in a future release.
    7. Create new Pull Request.

    Appraisals

    From time to time the Appraisal2 gemfiles in gemfiles/ will need to be updated.
    They are created and updated with the commands:

    BUNDLE_GEMFILE=Appraisal.root.gemfile bundle
    BUNDLE_GEMFILE=Appraisal.root.gemfile bundle exec appraisal update
    bundle exec rake rubocop_gradual:autocorrect
    

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

    The Reek List

    Take a look at the reek list which is the file called REEK and find something to improve.

    To refresh the reek list:

    bundle exec reek > REEK
    

    Run Tests

    To run all tests

    bundle exec rake test
    

    Lint It

    Run all the default tasks, which includes running the gradually autocorrecting linter, rubocop-gradual.

    bundle exec rake
    

    Or just run the linter.

    bundle exec rake rubocop_gradual:autocorrect
    

    Contributors

    Your picture could be here!

    Contributors

    Made with contributors-img.

    Also see GitLab Contributors: https://gitlab.com/galtzo-floss/rspec-stubbed_env/-/graphs/main

    For Maintainers

    One-time, Per-maintainer, Setup

    IMPORTANT: If you want to sign the build you create,
    your public key for signing gems will need to be picked up by the line in the
    gemspec defining the spec.cert_chain (check the relevant ENV variables there).
    All releases to RubyGems.org will be signed.
    See: RubyGems Security Guide

    NOTE: To build without signing the gem you must set SKIP_GEM_SIGNING to some value in your environment.

    To release a new version:

    1. Run bin/setup && bin/rake as a “test, coverage, & linting” sanity check
    2. Update the version number in version.rb, and ensure CHANGELOG.md reflects changes
    3. Run bin/setup && bin/rake again as a secondary check, and to update Gemfile.lock
    4. Run git commit -am "🔖 Prepare release v<VERSION>" to commit the changes
    5. Run git push to trigger the final CI pipeline before release, and merge PRs
    6. Run export GIT_TRUNK_BRANCH_NAME="$(git remote show origin | grep 'HEAD branch' | cut -d ' ' -f5)" && echo $GIT_TRUNK_BRANCH_NAME
    7. Run git checkout $GIT_TRUNK_BRANCH_NAME
    8. Run git pull origin $GIT_TRUNK_BRANCH_NAME to ensure latest trunk code
    9. Set SOURCE_DATE_EPOCH so rake build and rake release use same timestamp, and generate same checksums
      • Run export SOURCE_DATE_EPOCH=$EPOCHSECONDS && echo $SOURCE_DATE_EPOCH
      • If the echo above has no output, then it didn’t work.
      • Note: zsh/datetime module is needed, if running zsh.
      • In older versions of bash you can use date +%s instead, i.e. export SOURCE_DATE_EPOCH=$(date +%s) && echo $SOURCE_DATE_EPOCH
    10. Run bundle exec rake build
    11. Run bin/gem_checksums (more context 1, 2)
      to create SHA-256 and SHA-512 checksums. This functionality is provided by the stone_checksums
      gem.
      • The script automatically commits but does not push the checksums
    12. Run bundle exec rake release which will create a git tag for the version,
      push git commits and tags, and push the .gem file to rubygems.org
    rspec-stubbed_env-1.0.4/docs/file.LICENSE.html000066400000000000000000000053451504431001300207420ustar00rootroot00000000000000 File: LICENSE — Documentation by YARD 0.9.37
    Copyright Š 2014 LittlOwlLabs
    Copyright Š 2018-2020, 2023 - 2025 Peter Boling of railsbling.com

    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.
    rspec-stubbed_env-1.0.4/docs/file.README.html000066400000000000000000001133521504431001300206130ustar00rootroot00000000000000 File: README — Documentation by YARD 0.9.37

    Galtzo FLOSS Logo by Aboling0, CC BY-SA 4.0 rspec Logo by Ninefold, a Macquarie Telecom company, CC BY-NC-SA 4.0 ruby-lang Logo, Yukihiro Matsumoto, Ruby Visual Identity Team, CC BY-SA 2.5 rspec-stubbed_env Logo by Aboling0, CC BY-SA 4.0

    đŸĢĨ RSpec::StubbedEnv

    Version License: MIT Downloads Rank Open Source Helpers Depfu Coveralls Test Coverage CodeCov Test Coverage QLTY Test Coverage QLTY Maintainability CI Heads CI Current CI Truffle Ruby CI JRuby Deps Locked Deps Unlocked CI Supported CI Legacy CI Unsupported CI Ancient CI Test Coverage CI Style


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

    đŸŒģ Synopsis

    An ENV stubbing / hiding library for sophisticated RSpec test suites.

    • ENV stubbing and hiding via shared contexts for more powerful tests
      • ENV hiding via hide_env("FOO") was added in v1.0.2
    • No need to add dotenv just for the spec suite
    describe "my stubbed test" do
      include_context "with stubbed env"
      include_context "with hidden env"
      context "with FOO=is bar" do
        before do
          stub_env("FOO" => "is bar")
        end
        it "has a value" do
          expect(ENV.fetch("FOO", nil)).to(eq("is bar"))
          expect(ENV.fetch("FOO")).to(eq("is bar"))
          expect(ENV["FOO"]).to(eq("is bar"))
        end
      end
      context "without BAR set" do
        before do
          hide_env("BAR")
        end
        it "is nil" do
          expect(ENV.fetch("BAR", nil)).to(be_nil)
          expect(ENV["BAR"]).to(be_nil)
        end
        it "raises error" do
          expect { ENV.fetch("BAR") }.to(raise_error(KeyNotFound))
        end
      end
    end
    

    This gem has no runtime dependencies.

    💡 Info you can shake a stick at

    Federated DVCS

    Find this repo on other forges | Federated [DVCS][💎d-in-dvcs] Repository | Status | Issues | PRs | Wiki | CI | Discussions | |--------------------------------------------------------|-------------------------------------------------------------------|---------------------------|--------------------------|---------------------------|--------------------------|------------------------------| | đŸ§Ē [galtzo-floss/rspec-stubbed_env on GitLab][📜src-gl] | The Truth | [💚][🤝gl-issues] | [💚][🤝gl-pulls] | [💚][📜wiki] | 🏀 Tiny Matrix | ➖ | | 🧊 [galtzo-floss/rspec-stubbed_env on CodeBerg][📜src-cb] | An Ethical Mirror ([Donate][🤝cb-donate]) | [💚][🤝cb-issues] | [💚][🤝cb-pulls] | ➖ | â­•ī¸ No Matrix | ➖ | | 🐙 [galtzo-floss/rspec-stubbed_env on GitHub][📜src-gh] | A Dirty Mirror | [💚][🤝gh-issues] | [💚][🤝gh-pulls] | ➖ | đŸ’¯ Full Matrix | [💚][gh-discussions] | | đŸŽŽī¸ [Discord Server][âœ‰ī¸discord-invite] | [![Live Chat on Discord][âœ‰ī¸discord-invite-img]][âœ‰ī¸discord-invite] | [Let's][âœ‰ī¸discord-invite] | [talk][âœ‰ī¸discord-invite] | [about][âœ‰ī¸discord-invite] | [this][âœ‰ī¸discord-invite] | [library!][âœ‰ī¸discord-invite] |

    Enterprise Support

    Need enterprise-level guarantees? [![Get help from me on Tidelift][đŸ™ī¸entsup-tidelift-img]][đŸ™ī¸entsup-tidelift] - 💡Subscribe for support guarantees covering _all_ FLOSS dependencies - 💡Tidelift is part of [Sonar][đŸ™ī¸entsup-tidelift-sonar] - 💡Tidelift pays maintainers to maintain the software you depend on!
    📊`@`Pointy Haired Boss: An [enterprise support][đŸ™ī¸entsup-tidelift] subscription is "[never gonna let you down][🧮kloc]", and *supports* open source maintainers Alternatively: - [![Live Chat on Discord][âœ‰ī¸discord-invite-img]][âœ‰ī¸discord-invite] - [![Get help from me on Upwork][👨đŸŧ‍đŸĢexpsup-upwork-img]][👨đŸŧ‍đŸĢexpsup-upwork] - [![Get help from me on Codementor][👨đŸŧ‍đŸĢexpsup-codementor-img]][👨đŸŧ‍đŸĢexpsup-codementor]
Tokens to Remember Gem name Gem namespace
Works with JRuby JRuby 9.1 Compat JRuby 9.2 Compat JRuby 9.3 Compat JRuby 9.4 Compat JRuby 10.0 Compat JRuby HEAD Compat
Works with Truffle Ruby Truffle Ruby 22.3 Compat Truffle Ruby 23.0 Compat Truffle Ruby 23.1 Compat Truffle Ruby 24.1 Compat
Works with MRI Ruby 3 Ruby 3.0 Compat Ruby 3.1 Compat Ruby 3.2 Compat Ruby 3.3 Compat Ruby 3.4 Compat Ruby HEAD Compat
Works with MRI Ruby 2 Ruby 2.3 Compat Ruby 2.4 Compat Ruby 2.5 Compat Ruby 2.6 Compat Ruby 2.7 Compat
Source Source on GitLab.com Source on CodeBerg.org Source on Github.com The best SHA: dQw4w9WgXcQ!
Documentation Current release on RubyDoc.info YARD on Galtzo.com BDFL Blog Wiki
Compliance License: MIT 📄ilo-declaration-img Security Policy Contributor Covenant 2.1 SemVer 2.0.0
Style Enforced Code Style Linter Keep-A-Changelog 1.0.0 Gitmoji Commits
Support Live Chat on Discord Get help from me on Upwork Get help from me on Codementor
Comrade BDFL đŸŽ–ī¸ Follow Me on LinkedIn Follow Me on Ruby.Social Follow Me on Bluesky Contact BDFL My technical writing
... 💖 Find Me on WellFound: Find Me on CrunchBase My LinkTree More About Me 🧊 🐙 🛖 đŸ§Ē

✨ Installation

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

$ bundle add rspec-stubbed_env

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

$ gem install rspec-stubbed_env

🔒 Secure Installation

For Medium or High Security Installations `rspec-stubbed_env` is cryptographically signed, and has verifiable [SHA-256 and SHA-512][💎SHA_checksums] checksums by [stone_checksums][💎stone_checksums]. Be sure the gem you install hasn’t been tampered with by following the instructions below. Add my public key (if you haven’t already, expires 2045-04-29) as a trusted certificate: ```console 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: ```console gem install rspec-stubbed_env -P HighSecurity ``` 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: ```console bundle config set --global trust-policy MediumSecurity ``` `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.

🔧 Basic Usage

You must configure RSpec to use the :expect syntax, or some compatible alternative.

RSpec.configure do |config|
  config.expect_with(:rspec) do |c|
    c.syntax = :expect
  end
end

Require the library in your spec/test helper somewhere:

require "rspec/stubbed_env"

ENV stubbing

  • is opt-in, via a shared context, rather than global.
  • does not affect the real ENV at all. It is a true stub.
  • has the same scope as a before, subject, or let at the same level.

See the spec suite for detailed examples.

# This is normal, without stubbing, ENV is not set
describe "vanilla" do
  it "has no ENV stub" do
    expect(ENV.fetch("FOO", nil)).to(be_nil)
    expect(ENV["FOO"]).to(be_nil)
  end
end

# With a stubbed ENV!
describe "my stubbed test" do
  include_context "with stubbed env"
  before do
    stub_env("FOO" => "is bar")
  end
  it "has a value" do
    expect(ENV.fetch("FOO", nil)).to(eq("is bar"))
    expect(ENV["FOO"]).to(eq("is bar"))
  end
end

ENV can be stubbed trough the stub_env method, or key/value pairs to be stubbed can be
provided directly to the include_context call:

describe "my stubbed test" do
  include_context "with stubbed env", "FOO" => "is bar"

  it "has a value" do
    expect(ENV.fetch("FOO", nil)).to(eq("is bar"))
    expect(ENV["FOO"]).to(eq("is bar"))
  end
end

If you want to make stub_env method available globally (without the include_context call),
you can add in the spec_helper.

I do not recommend the global approach, as it results in a loss of clarity
on which tests are testing ENV-based behaviors. Here’s a foot-gun if you want it.

RSpec.configure do |config|
  config.include(RSpec::StubbedEnv::StubHelpers)
  # Or you could include the context globally
  # config.include_context "with stubbed env"
end

ENV hiding

  • is opt-in, via a shared context, rather than global.
  • does not affect the real ENV at all. It is a true stub.
  • has the same scope as a before, subject, or let at the same level.

See the spec suite for detailed examples.

# This is normal, without hiding, ENV is set
ENV["MY_PATH"] = "/home/doodle"
describe "vanilla" do
  it "has ENV with nothing hidden" do
    expect(ENV.fetch("MY_PATH", nil)).to("/home/doodle")
    expect(ENV["MY_PATH"]).to("/home/doodle")
  end
end

# With a hidden ENV variable!
describe "my hidden test" do
  include_context "with hidden env"
  before do
    hide_env("MY_PATH")
  end
  it "MY_PATH is not set" do
    expect(ENV.fetch("MY_PATH", nil)).to(be_nil)
    expect(ENV["MY_PATH"]).to(be_nil)
  end
end

ENV variables can be hidden trough the hide_env method, or variable names to be hidden can be
provided directly to the include_context call:

describe "my hidden test" do
  include_context "with hidden env", "MY_PATH"

  it "MY_PATH is not set" do
    expect(ENV.fetch("MY_PATH", nil)).to(be_nil)
    expect(ENV["MY_PATH"]).to(be_nil)
  end
end

If you want to make hide_env method available globally (without the include_context call),
you can add in the spec_helper:

I do not recommend the global approach, as it results in a loss of clarity
on which tests are testing ENV-based behaviors. Here’s a foot-gun if you want it.

RSpec.configure do |config|
  config.include(RSpec::StubbedEnv::HideHelpers)
  # Or you could include the context globally
  # config.include_context "with hidden env"
end

🚚 Switch to main branch

We migrated from master to main as the default branch. If this affected your local checkout:

git branch -m master main
git fetch origin
git branch -u origin/main main
git remote set-head origin -a

🚀 Release Instructions

See CONTRIBUTING.md.

🔐 Security

See SECURITY.md.

🤝 Contributing

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

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

See CONTRIBUTING.md for more detailed instructions.

Code Coverage

Coverage Graph

Coveralls Test Coverage

đŸĒ‡ Code of Conduct

Everyone interacting in this project’s codebases, issue trackers,
chat rooms and mailing lists is expected to follow the Contributor Covenant 2.1.

🌈 Contributors

Contributors

Made with contributors-img.

Also see GitLab Contributors: https://gitlab.com/galtzo-floss/rspec-stubbed_env/-/graphs/main

â­ī¸ Star History

Star History Chart

</a>

📌 Versioning

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

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

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

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

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

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

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

For example:

spec.add_dependency("rspec-stubbed_env", "~> 1.0")

See CHANGELOG.md for list of releases.

📄 License

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

  • Copyright (c) 2018-2020, 2024-2025 Peter H. Boling, of Galtzo.com Galtzo.com Logo (Wordless) by Aboling0, CC BY-SA 4.0 , and rspec-stubbed_env contributors

🤑 One more thing

Having arrived at the bottom of the page, please endure a final supplication.
The primary maintainer of this gem, Peter Boling, wants
Ruby to be a great place for people to solve problems, big and small.
Please consider supporting his efforts via the giant yellow link below,
or one of smaller ones, depending on button size preference.

Buy me a latte

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

P.S. If you need helpī¸, or want to say thanks, 👇 Join the Discord.

Live Chat on Discord

rspec-stubbed_env-1.0.4/docs/file.SECURITY.html000066400000000000000000000047331504431001300211270ustar00rootroot00000000000000 File: SECURITY — Documentation by YARD 0.9.37

Security Policy

Supported Versions

Version Supported
1.latest ✅

Security contact information

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

Additional Support

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

rspec-stubbed_env-1.0.4/docs/file_list.html000066400000000000000000000045771504431001300207220ustar00rootroot00000000000000 File List rspec-stubbed_env-1.0.4/docs/frames.html000066400000000000000000000010731504431001300202110ustar00rootroot00000000000000 Documentation by YARD 0.9.37 rspec-stubbed_env-1.0.4/docs/index.html000066400000000000000000001133531504431001300200500ustar00rootroot00000000000000 File: README — Documentation by YARD 0.9.37

Galtzo FLOSS Logo by Aboling0, CC BY-SA 4.0 rspec Logo by Ninefold, a Macquarie Telecom company, CC BY-NC-SA 4.0 ruby-lang Logo, Yukihiro Matsumoto, Ruby Visual Identity Team, CC BY-SA 2.5 rspec-stubbed_env Logo by Aboling0, CC BY-SA 4.0

đŸĢĨ RSpec::StubbedEnv

Version License: MIT Downloads Rank Open Source Helpers Depfu Coveralls Test Coverage CodeCov Test Coverage QLTY Test Coverage QLTY Maintainability CI Heads CI Current CI Truffle Ruby CI JRuby Deps Locked Deps Unlocked CI Supported CI Legacy CI Unsupported CI Ancient CI Test Coverage CI Style


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

đŸŒģ Synopsis

An ENV stubbing / hiding library for sophisticated RSpec test suites.

  • ENV stubbing and hiding via shared contexts for more powerful tests
    • ENV hiding via hide_env("FOO") was added in v1.0.2
  • No need to add dotenv just for the spec suite
describe "my stubbed test" do
  include_context "with stubbed env"
  include_context "with hidden env"
  context "with FOO=is bar" do
    before do
      stub_env("FOO" => "is bar")
    end
    it "has a value" do
      expect(ENV.fetch("FOO", nil)).to(eq("is bar"))
      expect(ENV.fetch("FOO")).to(eq("is bar"))
      expect(ENV["FOO"]).to(eq("is bar"))
    end
  end
  context "without BAR set" do
    before do
      hide_env("BAR")
    end
    it "is nil" do
      expect(ENV.fetch("BAR", nil)).to(be_nil)
      expect(ENV["BAR"]).to(be_nil)
    end
    it "raises error" do
      expect { ENV.fetch("BAR") }.to(raise_error(KeyNotFound))
    end
  end
end

This gem has no runtime dependencies.

💡 Info you can shake a stick at

Federated DVCS

Find this repo on other forges | Federated [DVCS][💎d-in-dvcs] Repository | Status | Issues | PRs | Wiki | CI | Discussions | |--------------------------------------------------------|-------------------------------------------------------------------|---------------------------|--------------------------|---------------------------|--------------------------|------------------------------| | đŸ§Ē [galtzo-floss/rspec-stubbed_env on GitLab][📜src-gl] | The Truth | [💚][🤝gl-issues] | [💚][🤝gl-pulls] | [💚][📜wiki] | 🏀 Tiny Matrix | ➖ | | 🧊 [galtzo-floss/rspec-stubbed_env on CodeBerg][📜src-cb] | An Ethical Mirror ([Donate][🤝cb-donate]) | [💚][🤝cb-issues] | [💚][🤝cb-pulls] | ➖ | â­•ī¸ No Matrix | ➖ | | 🐙 [galtzo-floss/rspec-stubbed_env on GitHub][📜src-gh] | A Dirty Mirror | [💚][🤝gh-issues] | [💚][🤝gh-pulls] | ➖ | đŸ’¯ Full Matrix | [💚][gh-discussions] | | đŸŽŽī¸ [Discord Server][âœ‰ī¸discord-invite] | [![Live Chat on Discord][âœ‰ī¸discord-invite-img]][âœ‰ī¸discord-invite] | [Let's][âœ‰ī¸discord-invite] | [talk][âœ‰ī¸discord-invite] | [about][âœ‰ī¸discord-invite] | [this][âœ‰ī¸discord-invite] | [library!][âœ‰ī¸discord-invite] |

Enterprise Support

Need enterprise-level guarantees? [![Get help from me on Tidelift][đŸ™ī¸entsup-tidelift-img]][đŸ™ī¸entsup-tidelift] - 💡Subscribe for support guarantees covering _all_ FLOSS dependencies - 💡Tidelift is part of [Sonar][đŸ™ī¸entsup-tidelift-sonar] - 💡Tidelift pays maintainers to maintain the software you depend on!
📊`@`Pointy Haired Boss: An [enterprise support][đŸ™ī¸entsup-tidelift] subscription is "[never gonna let you down][🧮kloc]", and *supports* open source maintainers Alternatively: - [![Live Chat on Discord][âœ‰ī¸discord-invite-img]][âœ‰ī¸discord-invite] - [![Get help from me on Upwork][👨đŸŧ‍đŸĢexpsup-upwork-img]][👨đŸŧ‍đŸĢexpsup-upwork] - [![Get help from me on Codementor][👨đŸŧ‍đŸĢexpsup-codementor-img]][👨đŸŧ‍đŸĢexpsup-codementor]
Tokens to Remember Gem name Gem namespace
Works with JRuby JRuby 9.1 Compat JRuby 9.2 Compat JRuby 9.3 Compat JRuby 9.4 Compat JRuby 10.0 Compat JRuby HEAD Compat
Works with Truffle Ruby Truffle Ruby 22.3 Compat Truffle Ruby 23.0 Compat Truffle Ruby 23.1 Compat Truffle Ruby 24.1 Compat
Works with MRI Ruby 3 Ruby 3.0 Compat Ruby 3.1 Compat Ruby 3.2 Compat Ruby 3.3 Compat Ruby 3.4 Compat Ruby HEAD Compat
Works with MRI Ruby 2 Ruby 2.3 Compat Ruby 2.4 Compat Ruby 2.5 Compat Ruby 2.6 Compat Ruby 2.7 Compat
Source Source on GitLab.com Source on CodeBerg.org Source on Github.com The best SHA: dQw4w9WgXcQ!
Documentation Current release on RubyDoc.info YARD on Galtzo.com BDFL Blog Wiki
Compliance License: MIT 📄ilo-declaration-img Security Policy Contributor Covenant 2.1 SemVer 2.0.0
Style Enforced Code Style Linter Keep-A-Changelog 1.0.0 Gitmoji Commits
Support Live Chat on Discord Get help from me on Upwork Get help from me on Codementor
Comrade BDFL đŸŽ–ī¸ Follow Me on LinkedIn Follow Me on Ruby.Social Follow Me on Bluesky Contact BDFL My technical writing
... 💖 Find Me on WellFound: Find Me on CrunchBase My LinkTree More About Me 🧊 🐙 🛖 đŸ§Ē

✨ Installation

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

$ bundle add rspec-stubbed_env

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

$ gem install rspec-stubbed_env

🔒 Secure Installation

For Medium or High Security Installations `rspec-stubbed_env` is cryptographically signed, and has verifiable [SHA-256 and SHA-512][💎SHA_checksums] checksums by [stone_checksums][💎stone_checksums]. Be sure the gem you install hasn’t been tampered with by following the instructions below. Add my public key (if you haven’t already, expires 2045-04-29) as a trusted certificate: ```console 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: ```console gem install rspec-stubbed_env -P HighSecurity ``` 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: ```console bundle config set --global trust-policy MediumSecurity ``` `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.

🔧 Basic Usage

You must configure RSpec to use the :expect syntax, or some compatible alternative.

RSpec.configure do |config|
  config.expect_with(:rspec) do |c|
    c.syntax = :expect
  end
end

Require the library in your spec/test helper somewhere:

require "rspec/stubbed_env"

ENV stubbing

  • is opt-in, via a shared context, rather than global.
  • does not affect the real ENV at all. It is a true stub.
  • has the same scope as a before, subject, or let at the same level.

See the spec suite for detailed examples.

# This is normal, without stubbing, ENV is not set
describe "vanilla" do
  it "has no ENV stub" do
    expect(ENV.fetch("FOO", nil)).to(be_nil)
    expect(ENV["FOO"]).to(be_nil)
  end
end

# With a stubbed ENV!
describe "my stubbed test" do
  include_context "with stubbed env"
  before do
    stub_env("FOO" => "is bar")
  end
  it "has a value" do
    expect(ENV.fetch("FOO", nil)).to(eq("is bar"))
    expect(ENV["FOO"]).to(eq("is bar"))
  end
end

ENV can be stubbed trough the stub_env method, or key/value pairs to be stubbed can be
provided directly to the include_context call:

describe "my stubbed test" do
  include_context "with stubbed env", "FOO" => "is bar"

  it "has a value" do
    expect(ENV.fetch("FOO", nil)).to(eq("is bar"))
    expect(ENV["FOO"]).to(eq("is bar"))
  end
end

If you want to make stub_env method available globally (without the include_context call),
you can add in the spec_helper.

I do not recommend the global approach, as it results in a loss of clarity
on which tests are testing ENV-based behaviors. Here’s a foot-gun if you want it.

RSpec.configure do |config|
  config.include(RSpec::StubbedEnv::StubHelpers)
  # Or you could include the context globally
  # config.include_context "with stubbed env"
end

ENV hiding

  • is opt-in, via a shared context, rather than global.
  • does not affect the real ENV at all. It is a true stub.
  • has the same scope as a before, subject, or let at the same level.

See the spec suite for detailed examples.

# This is normal, without hiding, ENV is set
ENV["MY_PATH"] = "/home/doodle"
describe "vanilla" do
  it "has ENV with nothing hidden" do
    expect(ENV.fetch("MY_PATH", nil)).to("/home/doodle")
    expect(ENV["MY_PATH"]).to("/home/doodle")
  end
end

# With a hidden ENV variable!
describe "my hidden test" do
  include_context "with hidden env"
  before do
    hide_env("MY_PATH")
  end
  it "MY_PATH is not set" do
    expect(ENV.fetch("MY_PATH", nil)).to(be_nil)
    expect(ENV["MY_PATH"]).to(be_nil)
  end
end

ENV variables can be hidden trough the hide_env method, or variable names to be hidden can be
provided directly to the include_context call:

describe "my hidden test" do
  include_context "with hidden env", "MY_PATH"

  it "MY_PATH is not set" do
    expect(ENV.fetch("MY_PATH", nil)).to(be_nil)
    expect(ENV["MY_PATH"]).to(be_nil)
  end
end

If you want to make hide_env method available globally (without the include_context call),
you can add in the spec_helper:

I do not recommend the global approach, as it results in a loss of clarity
on which tests are testing ENV-based behaviors. Here’s a foot-gun if you want it.

RSpec.configure do |config|
  config.include(RSpec::StubbedEnv::HideHelpers)
  # Or you could include the context globally
  # config.include_context "with hidden env"
end

🚚 Switch to main branch

We migrated from master to main as the default branch. If this affected your local checkout:

git branch -m master main
git fetch origin
git branch -u origin/main main
git remote set-head origin -a

🚀 Release Instructions

See CONTRIBUTING.md.

🔐 Security

See SECURITY.md.

🤝 Contributing

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

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

See CONTRIBUTING.md for more detailed instructions.

Code Coverage

Coverage Graph

Coveralls Test Coverage

đŸĒ‡ Code of Conduct

Everyone interacting in this project’s codebases, issue trackers,
chat rooms and mailing lists is expected to follow the Contributor Covenant 2.1.

🌈 Contributors

Contributors

Made with contributors-img.

Also see GitLab Contributors: https://gitlab.com/galtzo-floss/rspec-stubbed_env/-/graphs/main

â­ī¸ Star History

Star History Chart

</a>

📌 Versioning

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

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

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

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

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

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

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

For example:

spec.add_dependency("rspec-stubbed_env", "~> 1.0")

See CHANGELOG.md for list of releases.

📄 License

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

  • Copyright (c) 2018-2020, 2024-2025 Peter H. Boling, of Galtzo.com Galtzo.com Logo (Wordless) by Aboling0, CC BY-SA 4.0 , and rspec-stubbed_env contributors

🤑 One more thing

Having arrived at the bottom of the page, please endure a final supplication.
The primary maintainer of this gem, Peter Boling, wants
Ruby to be a great place for people to solve problems, big and small.
Please consider supporting his efforts via the giant yellow link below,
or one of smaller ones, depending on button size preference.

Buy me a latte

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

P.S. If you need helpī¸, or want to say thanks, 👇 Join the Discord.

Live Chat on Discord

rspec-stubbed_env-1.0.4/docs/js/000077500000000000000000000000001504431001300164615ustar00rootroot00000000000000rspec-stubbed_env-1.0.4/docs/js/app.js000066400000000000000000000242461504431001300176070ustar00rootroot00000000000000(function () { var localStorage = {}, sessionStorage = {}; try { localStorage = window.localStorage; } catch (e) {} try { sessionStorage = window.sessionStorage; } catch (e) {} function createSourceLinks() { $(".method_details_list .source_code").before( "[View source]" ); $(".toggleSource").toggle( function () { $(this).parent().nextAll(".source_code").slideDown(100); $(this).text("Hide source"); }, function () { $(this).parent().nextAll(".source_code").slideUp(100); $(this).text("View source"); } ); } function createDefineLinks() { var tHeight = 0; $(".defines").after(" more..."); $(".toggleDefines").toggle( function () { tHeight = $(this).parent().prev().height(); $(this).prev().css("display", "inline"); $(this).parent().prev().height($(this).parent().height()); $(this).text("(less)"); }, function () { $(this).prev().hide(); $(this).parent().prev().height(tHeight); $(this).text("more..."); } ); } function createFullTreeLinks() { var tHeight = 0; $(".inheritanceTree").toggle( function () { tHeight = $(this).parent().prev().height(); $(this).parent().toggleClass("showAll"); $(this).text("(hide)"); $(this).parent().prev().height($(this).parent().height()); }, function () { $(this).parent().toggleClass("showAll"); $(this).parent().prev().height(tHeight); $(this).text("show all"); } ); } function searchFrameButtons() { $(".full_list_link").click(function () { toggleSearchFrame(this, $(this).attr("href")); return false; }); window.addEventListener("message", function (e) { if (e.data === "navEscape") { $("#nav").slideUp(100); $("#search a").removeClass("active inactive"); $(window).focus(); } }); $(window).resize(function () { if ($("#search:visible").length === 0) { $("#nav").removeAttr("style"); $("#search a").removeClass("active inactive"); $(window).focus(); } }); } function toggleSearchFrame(id, link) { var frame = $("#nav"); $("#search a").removeClass("active").addClass("inactive"); if (frame.attr("src") === link && frame.css("display") !== "none") { frame.slideUp(100); $("#search a").removeClass("active inactive"); } else { $(id).addClass("active").removeClass("inactive"); if (frame.attr("src") !== link) frame.attr("src", link); frame.slideDown(100); } } function linkSummaries() { $(".summary_signature").click(function () { document.location = $(this).find("a").attr("href"); }); } function summaryToggle() { $(".summary_toggle").click(function (e) { e.preventDefault(); localStorage.summaryCollapsed = $(this).text(); $(".summary_toggle").each(function () { $(this).text($(this).text() == "collapse" ? "expand" : "collapse"); var next = $(this).parent().parent().nextAll("ul.summary").first(); if (next.hasClass("compact")) { next.toggle(); next.nextAll("ul.summary").first().toggle(); } else if (next.hasClass("summary")) { var list = $('
    '); list.html(next.html()); list.find(".summary_desc, .note").remove(); list.find("a").each(function () { $(this).html($(this).find("strong").html()); $(this).parent().html($(this)[0].outerHTML); }); next.before(list); next.toggle(); } }); return false; }); if (localStorage.summaryCollapsed == "collapse") { $(".summary_toggle").first().click(); } else { localStorage.summaryCollapsed = "expand"; } } function constantSummaryToggle() { $(".constants_summary_toggle").click(function (e) { e.preventDefault(); localStorage.summaryCollapsed = $(this).text(); $(".constants_summary_toggle").each(function () { $(this).text($(this).text() == "collapse" ? "expand" : "collapse"); var next = $(this).parent().parent().nextAll("dl.constants").first(); if (next.hasClass("compact")) { next.toggle(); next.nextAll("dl.constants").first().toggle(); } else if (next.hasClass("constants")) { var list = $('
    '); list.html(next.html()); list.find("dt").each(function () { $(this).addClass("summary_signature"); $(this).text($(this).text().split("=")[0]); if ($(this).has(".deprecated").length) { $(this).addClass("deprecated"); } }); // Add the value of the constant as "Tooltip" to the summary object list.find("pre.code").each(function () { console.log($(this).parent()); var dt_element = $(this).parent().prev(); var tooltip = $(this).text(); if (dt_element.hasClass("deprecated")) { tooltip = "Deprecated. " + tooltip; } dt_element.attr("title", tooltip); }); list.find(".docstring, .tags, dd").remove(); next.before(list); next.toggle(); } }); return false; }); if (localStorage.summaryCollapsed == "collapse") { $(".constants_summary_toggle").first().click(); } else { localStorage.summaryCollapsed = "expand"; } } function generateTOC() { if ($("#filecontents").length === 0) return; var _toc = $('
      '); var show = false; var toc = _toc; var counter = 0; var tags = ["h2", "h3", "h4", "h5", "h6"]; var i; var curli; if ($("#filecontents h1").length > 1) tags.unshift("h1"); for (i = 0; i < tags.length; i++) { tags[i] = "#filecontents " + tags[i]; } var lastTag = parseInt(tags[0][1], 10); $(tags.join(", ")).each(function () { if ($(this).parents(".method_details .docstring").length != 0) return; if (this.id == "filecontents") return; show = true; var thisTag = parseInt(this.tagName[1], 10); if (this.id.length === 0) { var proposedId = $(this).attr("toc-id"); if (typeof proposedId != "undefined") this.id = proposedId; else { var proposedId = $(this) .text() .replace(/[^a-z0-9-]/gi, "_"); if ($("#" + proposedId).length > 0) { proposedId += counter; counter++; } this.id = proposedId; } } if (thisTag > lastTag) { for (i = 0; i < thisTag - lastTag; i++) { if (typeof curli == "undefined") { curli = $("
    1. "); toc.append(curli); } toc = $("
        "); curli.append(toc); curli = undefined; } } if (thisTag < lastTag) { for (i = 0; i < lastTag - thisTag; i++) { toc = toc.parent(); toc = toc.parent(); } } var title = $(this).attr("toc-title"); if (typeof title == "undefined") title = $(this).text(); curli = $('
      1. ' + title + "
      2. "); toc.append(curli); lastTag = thisTag; }); if (!show) return; html = ''; $("#content").prepend(html); $("#toc").append(_toc); $("#toc .hide_toc").toggle( function () { $("#toc .top").slideUp("fast"); $("#toc").toggleClass("hidden"); $("#toc .title small").toggle(); }, function () { $("#toc .top").slideDown("fast"); $("#toc").toggleClass("hidden"); $("#toc .title small").toggle(); } ); } function navResizeFn(e) { if (e.which !== 1) { navResizeFnStop(); return; } sessionStorage.navWidth = e.pageX.toString(); $(".nav_wrap").css("width", e.pageX); $(".nav_wrap").css("-ms-flex", "inherit"); } function navResizeFnStop() { $(window).unbind("mousemove", navResizeFn); window.removeEventListener("message", navMessageFn, false); } function navMessageFn(e) { if (e.data.action === "mousemove") navResizeFn(e.data.event); if (e.data.action === "mouseup") navResizeFnStop(); } function navResizer() { $("#resizer").mousedown(function (e) { e.preventDefault(); $(window).mousemove(navResizeFn); window.addEventListener("message", navMessageFn, false); }); $(window).mouseup(navResizeFnStop); if (sessionStorage.navWidth) { navResizeFn({ which: 1, pageX: parseInt(sessionStorage.navWidth, 10) }); } } function navExpander() { if (typeof pathId === "undefined") return; var done = false, timer = setTimeout(postMessage, 500); function postMessage() { if (done) return; clearTimeout(timer); var opts = { action: "expand", path: pathId }; document.getElementById("nav").contentWindow.postMessage(opts, "*"); done = true; } window.addEventListener( "message", function (event) { if (event.data === "navReady") postMessage(); return false; }, false ); } function mainFocus() { var hash = window.location.hash; if (hash !== "" && $(hash)[0]) { $(hash)[0].scrollIntoView(); } setTimeout(function () { $("#main").focus(); }, 10); } function navigationChange() { // This works around the broken anchor navigation with the YARD template. window.onpopstate = function () { var hash = window.location.hash; if (hash !== "" && $(hash)[0]) { $(hash)[0].scrollIntoView(); } }; } $(document).ready(function () { navResizer(); navExpander(); createSourceLinks(); createDefineLinks(); createFullTreeLinks(); searchFrameButtons(); linkSummaries(); summaryToggle(); constantSummaryToggle(); generateTOC(); mainFocus(); navigationChange(); }); })(); rspec-stubbed_env-1.0.4/docs/js/full_list.js000066400000000000000000000147021504431001300210200ustar00rootroot00000000000000(function() { var $clicked = $(null); var searchTimeout = null; var searchCache = []; var caseSensitiveMatch = false; var ignoreKeyCodeMin = 8; var ignoreKeyCodeMax = 46; var commandKey = 91; RegExp.escape = function(text) { return text.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"); } function escapeShortcut() { $(document).keydown(function(evt) { if (evt.which == 27) { window.parent.postMessage('navEscape', '*'); } }); } function navResizer() { $(window).mousemove(function(e) { window.parent.postMessage({ action: 'mousemove', event: {pageX: e.pageX, which: e.which} }, '*'); }).mouseup(function(e) { window.parent.postMessage({action: 'mouseup'}, '*'); }); window.parent.postMessage("navReady", "*"); } function clearSearchTimeout() { clearTimeout(searchTimeout); searchTimeout = null; } function enableLinks() { // load the target page in the parent window $('#full_list li').on('click', function(evt) { $('#full_list li').removeClass('clicked'); $clicked = $(this); $clicked.addClass('clicked'); evt.stopPropagation(); if (evt.target.tagName === 'A') return true; var elem = $clicked.find('> .item .object_link a')[0]; var e = evt.originalEvent; var newEvent = new MouseEvent(evt.originalEvent.type); newEvent.initMouseEvent(e.type, e.canBubble, e.cancelable, e.view, e.detail, e.screenX, e.screenY, e.clientX, e.clientY, e.ctrlKey, e.altKey, e.shiftKey, e.metaKey, e.button, e.relatedTarget); elem.dispatchEvent(newEvent); evt.preventDefault(); return false; }); } function enableToggles() { // show/hide nested classes on toggle click $('#full_list a.toggle').on('click', function(evt) { evt.stopPropagation(); evt.preventDefault(); $(this).parent().parent().toggleClass('collapsed'); $(this).attr('aria-expanded', function (i, attr) { return attr == 'true' ? 'false' : 'true' }); highlight(); }); // navigation of nested classes using keyboard $('#full_list a.toggle').on('keypress',function(evt) { // enter key is pressed if (evt.which == 13) { evt.stopPropagation(); evt.preventDefault(); $(this).parent().parent().toggleClass('collapsed'); $(this).attr('aria-expanded', function (i, attr) { return attr == 'true' ? 'false' : 'true' }); highlight(); } }); } function populateSearchCache() { $('#full_list li .item').each(function() { var $node = $(this); var $link = $node.find('.object_link a'); if ($link.length > 0) { searchCache.push({ node: $node, link: $link, name: $link.text(), fullName: $link.attr('title').split(' ')[0] }); } }); } function enableSearch() { $('#search input').keyup(function(event) { if (ignoredKeyPress(event)) return; if (this.value === "") { clearSearch(); } else { performSearch(this.value); } }); $('#full_list').after(""); } function ignoredKeyPress(event) { if ( (event.keyCode > ignoreKeyCodeMin && event.keyCode < ignoreKeyCodeMax) || (event.keyCode == commandKey) ) { return true; } else { return false; } } function clearSearch() { clearSearchTimeout(); $('#full_list .found').removeClass('found').each(function() { var $link = $(this).find('.object_link a'); $link.text($link.text()); }); $('#full_list, #content').removeClass('insearch'); $clicked.parents().removeClass('collapsed'); highlight(); } function performSearch(searchString) { clearSearchTimeout(); $('#full_list, #content').addClass('insearch'); $('#noresults').text('').hide(); partialSearch(searchString, 0); } function partialSearch(searchString, offset) { var lastRowClass = ''; var i = null; for (i = offset; i < Math.min(offset + 50, searchCache.length); i++) { var item = searchCache[i]; var searchName = (searchString.indexOf('::') != -1 ? item.fullName : item.name); var matchString = buildMatchString(searchString); var matchRegexp = new RegExp(matchString, caseSensitiveMatch ? "" : "i"); if (searchName.match(matchRegexp) == null) { item.node.removeClass('found'); item.link.text(item.link.text()); } else { item.node.addClass('found'); item.node.removeClass(lastRowClass).addClass(lastRowClass == 'r1' ? 'r2' : 'r1'); lastRowClass = item.node.hasClass('r1') ? 'r1' : 'r2'; item.link.html(item.name.replace(matchRegexp, "$&")); } } if(i == searchCache.length) { searchDone(); } else { searchTimeout = setTimeout(function() { partialSearch(searchString, i); }, 0); } } function searchDone() { searchTimeout = null; highlight(); var found = $('#full_list li:visible').size(); if (found === 0) { $('#noresults').text('No results were found.'); } else { // This is read out to screen readers $('#noresults').text('There are ' + found + ' results.'); } $('#noresults').show(); $('#content').removeClass('insearch'); } function buildMatchString(searchString, event) { caseSensitiveMatch = searchString.match(/[A-Z]/) != null; var regexSearchString = RegExp.escape(searchString); if (caseSensitiveMatch) { regexSearchString += "|" + $.map(searchString.split(''), function(e) { return RegExp.escape(e); }). join('.+?'); } return regexSearchString; } function highlight() { $('#full_list li:visible').each(function(n) { $(this).removeClass('even odd').addClass(n % 2 == 0 ? 'odd' : 'even'); }); } /** * Expands the tree to the target element and its immediate * children. */ function expandTo(path) { var $target = $(document.getElementById('object_' + path)); $target.addClass('clicked'); $target.removeClass('collapsed'); $target.parentsUntil('#full_list', 'li').removeClass('collapsed'); $target.find('a.toggle').attr('aria-expanded', 'true') $target.parentsUntil('#full_list', 'li').each(function(i, el) { $(el).find('> div > a.toggle').attr('aria-expanded', 'true'); }); if($target[0]) { window.scrollTo(window.scrollX, $target.offset().top - 250); highlight(); } } function windowEvents(event) { var msg = event.data; if (msg.action === "expand") { expandTo(msg.path); } return false; } window.addEventListener("message", windowEvents, false); $(document).ready(function() { escapeShortcut(); navResizer(); enableLinks(); enableToggles(); populateSearchCache(); enableSearch(); }); })(); rspec-stubbed_env-1.0.4/docs/js/jquery.js000066400000000000000000002672541504431001300203560ustar00rootroot00000000000000/*! jQuery v1.7.1 jquery.com | jquery.org/license */ (function(a,b){function cy(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cv(a){if(!ck[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){cl||(cl=c.createElement("iframe"),cl.frameBorder=cl.width=cl.height=0),b.appendChild(cl);if(!cm||!cl.createElement)cm=(cl.contentWindow||cl.contentDocument).document,cm.write((c.compatMode==="CSS1Compat"?"":"")+""),cm.close();d=cm.createElement(a),cm.body.appendChild(d),e=f.css(d,"display"),b.removeChild(cl)}ck[a]=e}return ck[a]}function cu(a,b){var c={};f.each(cq.concat.apply([],cq.slice(0,b)),function(){c[this]=a});return c}function ct(){cr=b}function cs(){setTimeout(ct,0);return cr=f.now()}function cj(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ci(){try{return new a.XMLHttpRequest}catch(b){}}function cc(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;g0){if(c!=="border")for(;g=0===c})}function S(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function K(){return!0}function J(){return!1}function n(a,b,c){var d=b+"defer",e=b+"queue",g=b+"mark",h=f._data(a,d);h&&(c==="queue"||!f._data(a,e))&&(c==="mark"||!f._data(a,g))&&setTimeout(function(){!f._data(a,e)&&!f._data(a,g)&&(f.removeData(a,d,!0),h.fire())},0)}function m(a){for(var b in a){if(b==="data"&&f.isEmptyObject(a[b]))continue;if(b!=="toJSON")return!1}return!0}function l(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(k,"-$1").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:f.isNumeric(d)?parseFloat(d):j.test(d)?f.parseJSON(d):d}catch(g){}f.data(a,c,d)}else d=b}return d}function h(a){var b=g[a]={},c,d;a=a.split(/\s+/);for(c=0,d=a.length;c)[^>]*$|#([\w\-]*)$)/,j=/\S/,k=/^\s+/,l=/\s+$/,m=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,n=/^[\],:{}\s]*$/,o=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,p=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,q=/(?:^|:|,)(?:\s*\[)+/g,r=/(webkit)[ \/]([\w.]+)/,s=/(opera)(?:.*version)?[ \/]([\w.]+)/,t=/(msie) ([\w.]+)/,u=/(mozilla)(?:.*? rv:([\w.]+))?/,v=/-([a-z]|[0-9])/ig,w=/^-ms-/,x=function(a,b){return(b+"").toUpperCase()},y=d.userAgent,z,A,B,C=Object.prototype.toString,D=Object.prototype.hasOwnProperty,E=Array.prototype.push,F=Array.prototype.slice,G=String.prototype.trim,H=Array.prototype.indexOf,I={};e.fn=e.prototype={constructor:e,init:function(a,d,f){var g,h,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a==="body"&&!d&&c.body){this.context=c,this[0]=c.body,this.selector=a,this.length=1;return this}if(typeof a=="string"){a.charAt(0)!=="<"||a.charAt(a.length-1)!==">"||a.length<3?g=i.exec(a):g=[null,a,null];if(g&&(g[1]||!d)){if(g[1]){d=d instanceof e?d[0]:d,k=d?d.ownerDocument||d:c,j=m.exec(a),j?e.isPlainObject(d)?(a=[c.createElement(j[1])],e.fn.attr.call(a,d,!0)):a=[k.createElement(j[1])]:(j=e.buildFragment([g[1]],[k]),a=(j.cacheable?e.clone(j.fragment):j.fragment).childNodes);return e.merge(this,a)}h=c.getElementById(g[2]);if(h&&h.parentNode){if(h.id!==g[2])return f.find(a);this.length=1,this[0]=h}this.context=c,this.selector=a;return this}return!d||d.jquery?(d||f).find(a):this.constructor(d).find(a)}if(e.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return e.makeArray(a,this)},selector:"",jquery:"1.7.1",length:0,size:function(){return this.length},toArray:function(){return F.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=this.constructor();e.isArray(a)?E.apply(d,a):e.merge(d,a),d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")");return d},each:function(a,b){return e.each(this,a,b)},ready:function(a){e.bindReady(),A.add(a);return this},eq:function(a){a=+a;return a===-1?this.slice(a):this.slice(a,a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(F.apply(this,arguments),"slice",F.call(arguments).join(","))},map:function(a){return this.pushStack(e.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:E,sort:[].sort,splice:[].splice},e.fn.init.prototype=e.fn,e.extend=e.fn.extend=function(){var a,c,d,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i=="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!="object"&&!e.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j0)return;A.fireWith(c,[e]),e.fn.trigger&&e(c).trigger("ready").off("ready")}},bindReady:function(){if(!A){A=e.Callbacks("once memory");if(c.readyState==="complete")return setTimeout(e.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",B,!1),a.addEventListener("load",e.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",B),a.attachEvent("onload",e.ready);var b=!1;try{b=a.frameElement==null}catch(d){}c.documentElement.doScroll&&b&&J()}}},isFunction:function(a){return e.type(a)==="function"},isArray:Array.isArray||function(a){return e.type(a)==="array"},isWindow:function(a){return a&&typeof a=="object"&&"setInterval"in a},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)},type:function(a){return a==null?String(a):I[C.call(a)]||"object"},isPlainObject:function(a){if(!a||e.type(a)!=="object"||a.nodeType||e.isWindow(a))return!1;try{if(a.constructor&&!D.call(a,"constructor")&&!D.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||D.call(a,d)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw new Error(a)},parseJSON:function(b){if(typeof b!="string"||!b)return null;b=e.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(n.test(b.replace(o,"@").replace(p,"]").replace(q,"")))return(new Function("return "+b))();e.error("Invalid JSON: "+b)},parseXML:function(c){var d,f;try{a.DOMParser?(f=new DOMParser,d=f.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(g){d=b}(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&e.error("Invalid XML: "+c);return d},noop:function(){},globalEval:function(b){b&&j.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(w,"ms-").replace(v,x)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var f,g=0,h=a.length,i=h===b||e.isFunction(a);if(d){if(i){for(f in a)if(c.apply(a[f],d)===!1)break}else for(;g0&&a[0]&&a[j-1]||j===0||e.isArray(a));if(k)for(;i1?i.call(arguments,0):b,j.notifyWith(k,e)}}function l(a){return function(c){b[a]=arguments.length>1?i.call(arguments,0):c,--g||j.resolveWith(j,b)}}var b=i.call(arguments,0),c=0,d=b.length,e=Array(d),g=d,h=d,j=d<=1&&a&&f.isFunction(a.promise)?a:f.Deferred(),k=j.promise();if(d>1){for(;c
        a",d=q.getElementsByTagName("*"),e=q.getElementsByTagName("a")[0];if(!d||!d.length||!e)return{};g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=q.getElementsByTagName("input")[0],b={leadingWhitespace:q.firstChild.nodeType===3,tbody:!q.getElementsByTagName("tbody").length,htmlSerialize:!!q.getElementsByTagName("link").length,style:/top/.test(e.getAttribute("style")),hrefNormalized:e.getAttribute("href")==="/a",opacity:/^0.55/.test(e.style.opacity),cssFloat:!!e.style.cssFloat,checkOn:i.value==="on",optSelected:h.selected,getSetAttribute:q.className!=="t",enctype:!!c.createElement("form").enctype,html5Clone:c.createElement("nav").cloneNode(!0).outerHTML!=="<:nav>",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0},i.checked=!0,b.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,b.optDisabled=!h.disabled;try{delete q.test}catch(s){b.deleteExpando=!1}!q.addEventListener&&q.attachEvent&&q.fireEvent&&(q.attachEvent("onclick",function(){b.noCloneEvent=!1}),q.cloneNode(!0).fireEvent("onclick")),i=c.createElement("input"),i.value="t",i.setAttribute("type","radio"),b.radioValue=i.value==="t",i.setAttribute("checked","checked"),q.appendChild(i),k=c.createDocumentFragment(),k.appendChild(q.lastChild),b.checkClone=k.cloneNode(!0).cloneNode(!0).lastChild.checked,b.appendChecked=i.checked,k.removeChild(i),k.appendChild(q),q.innerHTML="",a.getComputedStyle&&(j=c.createElement("div"),j.style.width="0",j.style.marginRight="0",q.style.width="2px",q.appendChild(j),b.reliableMarginRight=(parseInt((a.getComputedStyle(j,null)||{marginRight:0}).marginRight,10)||0)===0);if(q.attachEvent)for(o in{submit:1,change:1,focusin:1})n="on"+o,p=n in q,p||(q.setAttribute(n,"return;"),p=typeof q[n]=="function"),b[o+"Bubbles"]=p;k.removeChild(q),k=g=h=j=q=i=null,f(function(){var a,d,e,g,h,i,j,k,m,n,o,r=c.getElementsByTagName("body")[0];!r||(j=1,k="position:absolute;top:0;left:0;width:1px;height:1px;margin:0;",m="visibility:hidden;border:0;",n="style='"+k+"border:5px solid #000;padding:0;'",o="
        "+""+"
        ",a=c.createElement("div"),a.style.cssText=m+"width:0;height:0;position:static;top:0;margin-top:"+j+"px",r.insertBefore(a,r.firstChild),q=c.createElement("div"),a.appendChild(q),q.innerHTML="
        t
        ",l=q.getElementsByTagName("td"),p=l[0].offsetHeight===0,l[0].style.display="",l[1].style.display="none",b.reliableHiddenOffsets=p&&l[0].offsetHeight===0,q.innerHTML="",q.style.width=q.style.paddingLeft="1px",f.boxModel=b.boxModel=q.offsetWidth===2,typeof q.style.zoom!="undefined"&&(q.style.display="inline",q.style.zoom=1,b.inlineBlockNeedsLayout=q.offsetWidth===2,q.style.display="",q.innerHTML="
        ",b.shrinkWrapBlocks=q.offsetWidth!==2),q.style.cssText=k+m,q.innerHTML=o,d=q.firstChild,e=d.firstChild,h=d.nextSibling.firstChild.firstChild,i={doesNotAddBorder:e.offsetTop!==5,doesAddBorderForTableAndCells:h.offsetTop===5},e.style.position="fixed",e.style.top="20px",i.fixedPosition=e.offsetTop===20||e.offsetTop===15,e.style.position=e.style.top="",d.style.overflow="hidden",d.style.position="relative",i.subtractsBorderForOverflowNotVisible=e.offsetTop===-5,i.doesNotIncludeMarginInBodyOffset=r.offsetTop!==j,r.removeChild(a),q=a=null,f.extend(b,i))});return b}();var j=/^(?:\{.*\}|\[.*\])$/,k=/([A-Z])/g;f.extend({cache:{},uuid:0,expando:"jQuery"+(f.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?f.cache[a[f.expando]]:a[f.expando];return!!a&&!m(a)},data:function(a,c,d,e){if(!!f.acceptData(a)){var g,h,i,j=f.expando,k=typeof c=="string",l=a.nodeType,m=l?f.cache:a,n=l?a[j]:a[j]&&j,o=c==="events";if((!n||!m[n]||!o&&!e&&!m[n].data)&&k&&d===b)return;n||(l?a[j]=n=++f.uuid:n=j),m[n]||(m[n]={},l||(m[n].toJSON=f.noop));if(typeof c=="object"||typeof c=="function")e?m[n]=f.extend(m[n],c):m[n].data=f.extend(m[n].data,c);g=h=m[n],e||(h.data||(h.data={}),h=h.data),d!==b&&(h[f.camelCase(c)]=d);if(o&&!h[c])return g.events;k?(i=h[c],i==null&&(i=h[f.camelCase(c)])):i=h;return i}},removeData:function(a,b,c){if(!!f.acceptData(a)){var d,e,g,h=f.expando,i=a.nodeType,j=i?f.cache:a,k=i?a[h]:h;if(!j[k])return;if(b){d=c?j[k]:j[k].data;if(d){f.isArray(b)||(b in d?b=[b]:(b=f.camelCase(b),b in d?b=[b]:b=b.split(" ")));for(e=0,g=b.length;e-1)return!0;return!1},val:function(a){var c,d,e,g=this[0];{if(!!arguments.length){e=f.isFunction(a);return this.each(function(d){var g=f(this),h;if(this.nodeType===1){e?h=a.call(this,d,g.val()):h=a,h==null?h="":typeof h=="number"?h+="":f.isArray(h)&&(h=f.map(h,function(a){return a==null?"":a+""})),c=f.valHooks[this.nodeName.toLowerCase()]||f.valHooks[this.type];if(!c||!("set"in c)||c.set(this,h,"value")===b)this.value=h}})}if(g){c=f.valHooks[g.nodeName.toLowerCase()]||f.valHooks[g.type];if(c&&"get"in c&&(d=c.get(g,"value"))!==b)return d;d=g.value;return typeof d=="string"?d.replace(q,""):d==null?"":d}}}}),f.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c,d,e,g=a.selectedIndex,h=[],i=a.options,j=a.type==="select-one";if(g<0)return null;c=j?g:0,d=j?g+1:i.length;for(;c=0}),c.length||(a.selectedIndex=-1);return c}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attr:function(a,c,d,e){var g,h,i,j=a.nodeType;if(!!a&&j!==3&&j!==8&&j!==2){if(e&&c in f.attrFn)return f(a)[c](d);if(typeof a.getAttribute=="undefined")return f.prop(a,c,d);i=j!==1||!f.isXMLDoc(a),i&&(c=c.toLowerCase(),h=f.attrHooks[c]||(u.test(c)?x:w));if(d!==b){if(d===null){f.removeAttr(a,c);return}if(h&&"set"in h&&i&&(g=h.set(a,d,c))!==b)return g;a.setAttribute(c,""+d);return d}if(h&&"get"in h&&i&&(g=h.get(a,c))!==null)return g;g=a.getAttribute(c);return g===null?b:g}},removeAttr:function(a,b){var c,d,e,g,h=0;if(b&&a.nodeType===1){d=b.toLowerCase().split(p),g=d.length;for(;h=0}})});var z=/^(?:textarea|input|select)$/i,A=/^([^\.]*)?(?:\.(.+))?$/,B=/\bhover(\.\S+)?\b/,C=/^key/,D=/^(?:mouse|contextmenu)|click/,E=/^(?:focusinfocus|focusoutblur)$/,F=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,G=function(a){var b=F.exec(a);b&&(b[1]=(b[1]||"").toLowerCase(),b[3]=b[3]&&new RegExp("(?:^|\\s)"+b[3]+"(?:\\s|$)"));return b},H=function(a,b){var c=a.attributes||{};return(!b[1]||a.nodeName.toLowerCase()===b[1])&&(!b[2]||(c.id||{}).value===b[2])&&(!b[3]||b[3].test((c["class"]||{}).value))},I=function(a){return f.event.special.hover?a:a.replace(B,"mouseenter$1 mouseleave$1")}; f.event={add:function(a,c,d,e,g){var h,i,j,k,l,m,n,o,p,q,r,s;if(!(a.nodeType===3||a.nodeType===8||!c||!d||!(h=f._data(a)))){d.handler&&(p=d,d=p.handler),d.guid||(d.guid=f.guid++),j=h.events,j||(h.events=j={}),i=h.handle,i||(h.handle=i=function(a){return typeof f!="undefined"&&(!a||f.event.triggered!==a.type)?f.event.dispatch.apply(i.elem,arguments):b},i.elem=a),c=f.trim(I(c)).split(" ");for(k=0;k=0&&(h=h.slice(0,-1),k=!0),h.indexOf(".")>=0&&(i=h.split("."),h=i.shift(),i.sort());if((!e||f.event.customEvent[h])&&!f.event.global[h])return;c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.isTrigger=!0,c.exclusive=k,c.namespace=i.join("."),c.namespace_re=c.namespace?new RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\\.|$)"):null,o=h.indexOf(":")<0?"on"+h:"";if(!e){j=f.cache;for(l in j)j[l].events&&j[l].events[h]&&f.event.trigger(c,d,j[l].handle.elem,!0);return}c.result=b,c.target||(c.target=e),d=d!=null?f.makeArray(d):[],d.unshift(c),p=f.event.special[h]||{};if(p.trigger&&p.trigger.apply(e,d)===!1)return;r=[[e,p.bindType||h]];if(!g&&!p.noBubble&&!f.isWindow(e)){s=p.delegateType||h,m=E.test(s+h)?e:e.parentNode,n=null;for(;m;m=m.parentNode)r.push([m,s]),n=m;n&&n===e.ownerDocument&&r.push([n.defaultView||n.parentWindow||a,s])}for(l=0;le&&i.push({elem:this,matches:d.slice(e)});for(j=0;j0?this.on(b,null,a,c):this.trigger(b)},f.attrFn&&(f.attrFn[b]=!0),C.test(b)&&(f.event.fixHooks[b]=f.event.keyHooks),D.test(b)&&(f.event.fixHooks[b]=f.event.mouseHooks)}),function(){function x(a,b,c,e,f,g){for(var h=0,i=e.length;h0){k=j;break}}j=j[a]}e[h]=k}}}function w(a,b,c,e,f,g){for(var h=0,i=e.length;h+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,d="sizcache"+(Math.random()+"").replace(".",""),e=0,g=Object.prototype.toString,h=!1,i=!0,j=/\\/g,k=/\r\n/g,l=/\W/;[0,0].sort(function(){i=!1;return 0});var m=function(b,d,e,f){e=e||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!="string")return e;var i,j,k,l,n,q,r,t,u=!0,v=m.isXML(d),w=[],x=b;do{a.exec(""),i=a.exec(x);if(i){x=i[3],w.push(i[1]);if(i[2]){l=i[3];break}}}while(i);if(w.length>1&&p.exec(b))if(w.length===2&&o.relative[w[0]])j=y(w[0]+w[1],d,f);else{j=o.relative[w[0]]?[d]:m(w.shift(),d);while(w.length)b=w.shift(),o.relative[b]&&(b+=w.shift()),j=y(b,j,f)}else{!f&&w.length>1&&d.nodeType===9&&!v&&o.match.ID.test(w[0])&&!o.match.ID.test(w[w.length-1])&&(n=m.find(w.shift(),d,v),d=n.expr?m.filter(n.expr,n.set)[0]:n.set[0]);if(d){n=f?{expr:w.pop(),set:s(f)}:m.find(w.pop(),w.length===1&&(w[0]==="~"||w[0]==="+")&&d.parentNode?d.parentNode:d,v),j=n.expr?m.filter(n.expr,n.set):n.set,w.length>0?k=s(j):u=!1;while(w.length)q=w.pop(),r=q,o.relative[q]?r=w.pop():q="",r==null&&(r=d),o.relative[q](k,r,v)}else k=w=[]}k||(k=j),k||m.error(q||b);if(g.call(k)==="[object Array]")if(!u)e.push.apply(e,k);else if(d&&d.nodeType===1)for(t=0;k[t]!=null;t++)k[t]&&(k[t]===!0||k[t].nodeType===1&&m.contains(d,k[t]))&&e.push(j[t]);else for(t=0;k[t]!=null;t++)k[t]&&k[t].nodeType===1&&e.push(j[t]);else s(k,e);l&&(m(l,h,e,f),m.uniqueSort(e));return e};m.uniqueSort=function(a){if(u){h=i,a.sort(u);if(h)for(var b=1;b0},m.find=function(a,b,c){var d,e,f,g,h,i;if(!a)return[];for(e=0,f=o.order.length;e":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!l.test(b)){b=b.toLowerCase();for(;e=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(j,"")},TAG:function(a,b){return a[1].replace(j,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||m.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&m.error(a[0]);a[0]=e++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(j,"");!f&&o.attrMap[g]&&(a[1]=o.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(j,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=m(b[3],null,null,c);else{var g=m.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(o.match.POS.test(b[0])||o.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!m(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return a.nodeName.toLowerCase()==="input"&&"text"===c&&(b===c||b===null)},radio:function(a){return a.nodeName.toLowerCase()==="input"&&"radio"===a.type},checkbox:function(a){return a.nodeName.toLowerCase()==="input"&&"checkbox"===a.type},file:function(a){return a.nodeName.toLowerCase()==="input"&&"file"===a.type},password:function(a){return a.nodeName.toLowerCase()==="input"&&"password"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"submit"===a.type},image:function(a){return a.nodeName.toLowerCase()==="input"&&"image"===a.type},reset:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"reset"===a.type},button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&"button"===a.type||b==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},focus:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return bc[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=o.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||n([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||!!a.nodeName&&a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=m.attr?m.attr(a,c):o.attrHandle[c]?o.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":!f&&m.attr?d!=null:f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=o.setFilters[e];if(f)return f(a,c,b,d)}}},p=o.match.POS,q=function(a,b){return"\\"+(b-0+1)};for(var r in o.match)o.match[r]=new RegExp(o.match[r].source+/(?![^\[]*\])(?![^\(]*\))/.source),o.leftMatch[r]=new RegExp(/(^(?:.|\r|\n)*?)/.source+o.match[r].source.replace(/\\(\d+)/g,q));var s=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(t){s=function(a,b){var c=0,d=b||[];if(g.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length=="number")for(var e=a.length;c",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(o.find.ID=function(a,c,d){if(typeof c.getElementById!="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},o.filter.ID=function(a,b){var c=typeof a.getAttributeNode!="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(o.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="",a.firstChild&&typeof a.firstChild.getAttribute!="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(o.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=m,b=c.createElement("div"),d="__sizzle__";b.innerHTML="

        ";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){m=function(b,e,f,g){e=e||c;if(!g&&!m.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return s(e.getElementsByTagName(b),f);if(h[2]&&o.find.CLASS&&e.getElementsByClassName)return s(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return s([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return s([],f);if(i.id===h[3])return s([i],f)}try{return s(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var k=e,l=e.getAttribute("id"),n=l||d,p=e.parentNode,q=/^\s*[+~]/.test(b);l?n=n.replace(/'/g,"\\$&"):e.setAttribute("id",n),q&&p&&(e=e.parentNode);try{if(!q||p)return s(e.querySelectorAll("[id='"+n+"'] "+b),f)}catch(r){}finally{l||k.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)m[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b.call(c.createElement("div"),"div"),e=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(f){e=!0}m.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!m.isXML(a))try{if(e||!o.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return m(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement("div");a.innerHTML="
        ";if(!!a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;o.order.splice(1,0,"CLASS"),o.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?m.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?m.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:m.contains=function(){return!1},m.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var y=function(a,b,c){var d,e=[],f="",g=b.nodeType?[b]:b;while(d=o.match.PSEUDO.exec(a))f+=d[0],a=a.replace(o.match.PSEUDO,"");a=o.relative[a]?a+"*":a;for(var h=0,i=g.length;h0)for(h=g;h=0:f.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c=[],d,e,g=this[0];if(f.isArray(a)){var h=1;while(g&&g.ownerDocument&&g!==b){for(d=0;d-1:f.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b||g.nodeType===11)break}}c=c.length>1?f.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a)return this[0]&&this[0].parentNode?this.prevAll().length:-1;if(typeof a=="string")return f.inArray(this[0],f(a));return f.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a=="string"?f(a,b):f.makeArray(a&&a.nodeType?[a]:a),d=f.merge(this.get(),c);return this.pushStack(S(c[0])||S(d[0])?d:f.unique(d))},andSelf:function(){return this.add(this.prevObject)}}),f.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return f.dir(a,"parentNode")},parentsUntil:function(a,b,c){return f.dir(a,"parentNode",c)},next:function(a){return f.nth(a,2,"nextSibling")},prev:function(a){return f.nth(a,2,"previousSibling")},nextAll:function(a){return f.dir(a,"nextSibling")},prevAll:function(a){return f.dir(a,"previousSibling")},nextUntil:function(a,b,c){return f.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return f.dir(a,"previousSibling",c)},siblings:function(a){return f.sibling(a.parentNode.firstChild,a)},children:function(a){return f.sibling(a.firstChild)},contents:function(a){return f.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:f.makeArray(a.childNodes)}},function(a,b){f.fn[a]=function(c,d){var e=f.map(this,b,c);L.test(a)||(d=c),d&&typeof d=="string"&&(e=f.filter(d,e)),e=this.length>1&&!R[a]?f.unique(e):e,(this.length>1||N.test(d))&&M.test(a)&&(e=e.reverse());return this.pushStack(e,a,P.call(arguments).join(","))}}),f.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?f.find.matchesSelector(b[0],a)?[b[0]]:[]:f.find.matches(a,b)},dir:function(a,c,d){var e=[],g=a[c];while(g&&g.nodeType!==9&&(d===b||g.nodeType!==1||!f(g).is(d)))g.nodeType===1&&e.push(g),g=g[c];return e},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var V="abbr|article|aside|audio|canvas|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",W=/ jQuery\d+="(?:\d+|null)"/g,X=/^\s+/,Y=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,Z=/<([\w:]+)/,$=/",""],legend:[1,"
        ","
        "],thead:[1,"","
        "],tr:[2,"","
        "],td:[3,"","
        "],col:[2,"","
        "],area:[1,"",""],_default:[0,"",""]},bh=U(c);bg.optgroup=bg.option,bg.tbody=bg.tfoot=bg.colgroup=bg.caption=bg.thead,bg.th=bg.td,f.support.htmlSerialize||(bg._default=[1,"div
        ","
        "]),f.fn.extend({text:function(a){if(f.isFunction(a))return this.each(function(b){var c=f(this);c.text(a.call(this,b,c.text()))});if(typeof a!="object"&&a!==b)return this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a));return f.text(this)},wrapAll:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapAll(a.call(this,b))});if(this[0]){var b=f(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapInner(a.call(this,b))});return this.each(function(){var b=f(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=f.isFunction(a);return this.each(function(c){f(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){f.nodeName(this,"body")||f(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=f.clean(arguments);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,f.clean(arguments));return a}},remove:function(a,b){for(var c=0,d;(d=this[c])!=null;c++)if(!a||f.filter(a,[d]).length)!b&&d.nodeType===1&&(f.cleanData(d.getElementsByTagName("*")),f.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d);return this},empty:function() {for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&f.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!1:a,b=b==null?a:b;return this.map(function(){return f.clone(this,a,b)})},html:function(a){if(a===b)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(W,""):null;if(typeof a=="string"&&!ba.test(a)&&(f.support.leadingWhitespace||!X.test(a))&&!bg[(Z.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Y,"<$1>");try{for(var c=0,d=this.length;c1&&l0?this.clone(!0):this).get();f(e[h])[b](j),d=d.concat(j)}return this.pushStack(d,a,e.selector)}}),f.extend({clone:function(a,b,c){var d,e,g,h=f.support.html5Clone||!bc.test("<"+a.nodeName)?a.cloneNode(!0):bo(a);if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!f.isXMLDoc(a)){bk(a,h),d=bl(a),e=bl(h);for(g=0;d[g];++g)e[g]&&bk(d[g],e[g])}if(b){bj(a,h);if(c){d=bl(a),e=bl(h);for(g=0;d[g];++g)bj(d[g],e[g])}}d=e=null;return h},clean:function(a,b,d,e){var g;b=b||c,typeof b.createElement=="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);var h=[],i;for(var j=0,k;(k=a[j])!=null;j++){typeof k=="number"&&(k+="");if(!k)continue;if(typeof k=="string")if(!_.test(k))k=b.createTextNode(k);else{k=k.replace(Y,"<$1>");var l=(Z.exec(k)||["",""])[1].toLowerCase(),m=bg[l]||bg._default,n=m[0],o=b.createElement("div");b===c?bh.appendChild(o):U(b).appendChild(o),o.innerHTML=m[1]+k+m[2];while(n--)o=o.lastChild;if(!f.support.tbody){var p=$.test(k),q=l==="table"&&!p?o.firstChild&&o.firstChild.childNodes:m[1]===""&&!p?o.childNodes:[];for(i=q.length-1;i>=0;--i)f.nodeName(q[i],"tbody")&&!q[i].childNodes.length&&q[i].parentNode.removeChild(q[i])}!f.support.leadingWhitespace&&X.test(k)&&o.insertBefore(b.createTextNode(X.exec(k)[0]),o.firstChild),k=o.childNodes}var r;if(!f.support.appendChecked)if(k[0]&&typeof (r=k.length)=="number")for(i=0;i=0)return b+"px"}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return br.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=f.isNumeric(b)?"alpha(opacity="+b*100+")":"",g=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&f.trim(g.replace(bq,""))===""){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bq.test(g)?g.replace(bq,e):g+" "+e}}),f(function(){f.support.reliableMarginRight||(f.cssHooks.marginRight={get:function(a,b){var c;f.swap(a,{display:"inline-block"},function(){b?c=bz(a,"margin-right","marginRight"):c=a.style.marginRight});return c}})}),c.defaultView&&c.defaultView.getComputedStyle&&(bA=function(a,b){var c,d,e;b=b.replace(bs,"-$1").toLowerCase(),(d=a.ownerDocument.defaultView)&&(e=d.getComputedStyle(a,null))&&(c=e.getPropertyValue(b),c===""&&!f.contains(a.ownerDocument.documentElement,a)&&(c=f.style(a,b)));return c}),c.documentElement.currentStyle&&(bB=function(a,b){var c,d,e,f=a.currentStyle&&a.currentStyle[b],g=a.style;f===null&&g&&(e=g[b])&&(f=e),!bt.test(f)&&bu.test(f)&&(c=g.left,d=a.runtimeStyle&&a.runtimeStyle.left,d&&(a.runtimeStyle.left=a.currentStyle.left),g.left=b==="fontSize"?"1em":f||0,f=g.pixelLeft+"px",g.left=c,d&&(a.runtimeStyle.left=d));return f===""?"auto":f}),bz=bA||bB,f.expr&&f.expr.filters&&(f.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!f.support.reliableHiddenOffsets&&(a.style&&a.style.display||f.css(a,"display"))==="none"},f.expr.filters.visible=function(a){return!f.expr.filters.hidden(a)});var bD=/%20/g,bE=/\[\]$/,bF=/\r?\n/g,bG=/#.*$/,bH=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bI=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bJ=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,bK=/^(?:GET|HEAD)$/,bL=/^\/\//,bM=/\?/,bN=/)<[^<]*)*<\/script>/gi,bO=/^(?:select|textarea)/i,bP=/\s+/,bQ=/([?&])_=[^&]*/,bR=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,bS=f.fn.load,bT={},bU={},bV,bW,bX=["*/"]+["*"];try{bV=e.href}catch(bY){bV=c.createElement("a"),bV.href="",bV=bV.href}bW=bR.exec(bV.toLowerCase())||[],f.fn.extend({load:function(a,c,d){if(typeof a!="string"&&bS)return bS.apply(this,arguments);if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var g=a.slice(e,a.length);a=a.slice(0,e)}var h="GET";c&&(f.isFunction(c)?(d=c,c=b):typeof c=="object"&&(c=f.param(c,f.ajaxSettings.traditional),h="POST"));var i=this;f.ajax({url:a,type:h,dataType:"html",data:c,complete:function(a,b,c){c=a.responseText,a.isResolved()&&(a.done(function(a){c=a}),i.html(g?f("
        ").append(c.replace(bN,"")).find(g):c)),d&&i.each(d,[c,b,a])}});return this},serialize:function(){return f.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?f.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||bO.test(this.nodeName)||bI.test(this.type))}).map(function(a,b){var c=f(this).val();return c==null?null:f.isArray(c)?f.map(c,function(a,c){return{name:b.name,value:a.replace(bF,"\r\n")}}):{name:b.name,value:c.replace(bF,"\r\n")}}).get()}}),f.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){f.fn[b]=function(a){return this.on(b,a)}}),f.each(["get","post"],function(a,c){f[c]=function(a,d,e,g){f.isFunction(d)&&(g=g||e,e=d,d=b);return f.ajax({type:c,url:a,data:d,success:e,dataType:g})}}),f.extend({getScript:function(a,c){return f.get(a,b,c,"script")},getJSON:function(a,b,c){return f.get(a,b,c,"json")},ajaxSetup:function(a,b){b?b_(a,f.ajaxSettings):(b=a,a=f.ajaxSettings),b_(a,b);return a},ajaxSettings:{url:bV,isLocal:bJ.test(bW[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":bX},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":f.parseJSON,"text xml":f.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:bZ(bT),ajaxTransport:bZ(bU),ajax:function(a,c){function w(a,c,l,m){if(s!==2){s=2,q&&clearTimeout(q),p=b,n=m||"",v.readyState=a>0?4:0;var o,r,u,w=c,x=l?cb(d,v,l):b,y,z;if(a>=200&&a<300||a===304){if(d.ifModified){if(y=v.getResponseHeader("Last-Modified"))f.lastModified[k]=y;if(z=v.getResponseHeader("Etag"))f.etag[k]=z}if(a===304)w="notmodified",o=!0;else try{r=cc(d,x),w="success",o=!0}catch(A){w="parsererror",u=A}}else{u=w;if(!w||a)w="error",a<0&&(a=0)}v.status=a,v.statusText=""+(c||w),o?h.resolveWith(e,[r,w,v]):h.rejectWith(e,[v,w,u]),v.statusCode(j),j=b,t&&g.trigger("ajax"+(o?"Success":"Error"),[v,d,o?r:u]),i.fireWith(e,[v,w]),t&&(g.trigger("ajaxComplete",[v,d]),--f.active||f.event.trigger("ajaxStop"))}}typeof a=="object"&&(c=a,a=b),c=c||{};var d=f.ajaxSetup({},c),e=d.context||d,g=e!==d&&(e.nodeType||e instanceof f)?f(e):f.event,h=f.Deferred(),i=f.Callbacks("once memory"),j=d.statusCode||{},k,l={},m={},n,o,p,q,r,s=0,t,u,v={readyState:0,setRequestHeader:function(a,b){if(!s){var c=a.toLowerCase();a=m[c]=m[c]||a,l[a]=b}return this},getAllResponseHeaders:function(){return s===2?n:null},getResponseHeader:function(a){var c;if(s===2){if(!o){o={};while(c=bH.exec(n))o[c[1].toLowerCase()]=c[2]}c=o[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){s||(d.mimeType=a);return this},abort:function(a){a=a||"abort",p&&p.abort(a),w(0,a);return this}};h.promise(v),v.success=v.done,v.error=v.fail,v.complete=i.add,v.statusCode=function(a){if(a){var b;if(s<2)for(b in a)j[b]=[j[b],a[b]];else b=a[v.status],v.then(b,b)}return this},d.url=((a||d.url)+"").replace(bG,"").replace(bL,bW[1]+"//"),d.dataTypes=f.trim(d.dataType||"*").toLowerCase().split(bP),d.crossDomain==null&&(r=bR.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]==bW[1]&&r[2]==bW[2]&&(r[3]||(r[1]==="http:"?80:443))==(bW[3]||(bW[1]==="http:"?80:443)))),d.data&&d.processData&&typeof d.data!="string"&&(d.data=f.param(d.data,d.traditional)),b$(bT,d,c,v);if(s===2)return!1;t=d.global,d.type=d.type.toUpperCase(),d.hasContent=!bK.test(d.type),t&&f.active++===0&&f.event.trigger("ajaxStart");if(!d.hasContent){d.data&&(d.url+=(bM.test(d.url)?"&":"?")+d.data,delete d.data),k=d.url;if(d.cache===!1){var x=f.now(),y=d.url.replace(bQ,"$1_="+x);d.url=y+(y===d.url?(bM.test(d.url)?"&":"?")+"_="+x:"")}}(d.data&&d.hasContent&&d.contentType!==!1||c.contentType)&&v.setRequestHeader("Content-Type",d.contentType),d.ifModified&&(k=k||d.url,f.lastModified[k]&&v.setRequestHeader("If-Modified-Since",f.lastModified[k]),f.etag[k]&&v.setRequestHeader("If-None-Match",f.etag[k])),v.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+(d.dataTypes[0]!=="*"?", "+bX+"; q=0.01":""):d.accepts["*"]);for(u in d.headers)v.setRequestHeader(u,d.headers[u]);if(d.beforeSend&&(d.beforeSend.call(e,v,d)===!1||s===2)){v.abort();return!1}for(u in{success:1,error:1,complete:1})v[u](d[u]);p=b$(bU,d,c,v);if(!p)w(-1,"No Transport");else{v.readyState=1,t&&g.trigger("ajaxSend",[v,d]),d.async&&d.timeout>0&&(q=setTimeout(function(){v.abort("timeout")},d.timeout));try{s=1,p.send(l,w)}catch(z){if(s<2)w(-1,z);else throw z}}return v},param:function(a,c){var d=[],e=function(a,b){b=f.isFunction(b)?b():b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=f.ajaxSettings.traditional);if(f.isArray(a)||a.jquery&&!f.isPlainObject(a))f.each(a,function(){e(this.name,this.value)});else for(var g in a)ca(g,a[g],c,e);return d.join("&").replace(bD,"+")}}),f.extend({active:0,lastModified:{},etag:{}});var cd=f.now(),ce=/(\=)\?(&|$)|\?\?/i;f.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return f.expando+"_"+cd++}}),f.ajaxPrefilter("json jsonp",function(b,c,d){var e=b.contentType==="application/x-www-form-urlencoded"&&typeof b.data=="string";if(b.dataTypes[0]==="jsonp"||b.jsonp!==!1&&(ce.test(b.url)||e&&ce.test(b.data))){var g,h=b.jsonpCallback=f.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,i=a[h],j=b.url,k=b.data,l="$1"+h+"$2";b.jsonp!==!1&&(j=j.replace(ce,l),b.url===j&&(e&&(k=k.replace(ce,l)),b.data===k&&(j+=(/\?/.test(j)?"&":"?")+b.jsonp+"="+h))),b.url=j,b.data=k,a[h]=function(a){g=[a]},d.always(function(){a[h]=i,g&&f.isFunction(i)&&a[h](g[0])}),b.converters["script json"]=function(){g||f.error(h+" was not called");return g[0]},b.dataTypes[0]="json";return"script"}}),f.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){f.globalEval(a);return a}}}),f.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),f.ajaxTransport("script",function(a){if(a.crossDomain){var d,e=c.head||c.getElementsByTagName("head")[0]||c.documentElement;return{send:function(f,g){d=c.createElement("script"),d.async="async",a.scriptCharset&&(d.charset=a.scriptCharset),d.src=a.url,d.onload=d.onreadystatechange=function(a,c){if(c||!d.readyState||/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,e&&d.parentNode&&e.removeChild(d),d=b,c||g(200,"success")},e.insertBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var cf=a.ActiveXObject?function(){for(var a in ch)ch[a](0,1)}:!1,cg=0,ch;f.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&ci()||cj()}:ci,function(a){f.extend(f.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(f.ajaxSettings.xhr()),f.support.ajax&&f.ajaxTransport(function(c){if(!c.crossDomain||f.support.cors){var d;return{send:function(e,g){var h=c.xhr(),i,j;c.username?h.open(c.type,c.url,c.async,c.username,c.password):h.open(c.type,c.url,c.async);if(c.xhrFields)for(j in c.xhrFields)h[j]=c.xhrFields[j];c.mimeType&&h.overrideMimeType&&h.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(j in e)h.setRequestHeader(j,e[j])}catch(k){}h.send(c.hasContent&&c.data||null),d=function(a,e){var j,k,l,m,n;try{if(d&&(e||h.readyState===4)){d=b,i&&(h.onreadystatechange=f.noop,cf&&delete ch[i]);if(e)h.readyState!==4&&h.abort();else{j=h.status,l=h.getAllResponseHeaders(),m={},n=h.responseXML,n&&n.documentElement&&(m.xml=n),m.text=h.responseText;try{k=h.statusText}catch(o){k=""}!j&&c.isLocal&&!c.crossDomain?j=m.text?200:404:j===1223&&(j=204)}}}catch(p){e||g(-1,p)}m&&g(j,k,m,l)},!c.async||h.readyState===4?d():(i=++cg,cf&&(ch||(ch={},f(a).unload(cf)),ch[i]=d),h.onreadystatechange=d)},abort:function(){d&&d(0,1)}}}});var ck={},cl,cm,cn=/^(?:toggle|show|hide)$/,co=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,cp,cq=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],cr;f.fn.extend({show:function(a,b,c){var d,e;if(a||a===0)return this.animate(cu("show",3),a,b,c);for(var g=0,h=this.length;g=i.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),i.animatedProperties[this.prop]=!0;for(b in i.animatedProperties)i.animatedProperties[b]!==!0&&(g=!1);if(g){i.overflow!=null&&!f.support.shrinkWrapBlocks&&f.each(["","X","Y"],function(a,b){h.style["overflow"+b]=i.overflow[a]}),i.hide&&f(h).hide();if(i.hide||i.show)for(b in i.animatedProperties)f.style(h,b,i.orig[b]),f.removeData(h,"fxshow"+b,!0),f.removeData(h,"toggle"+b,!0);d=i.complete,d&&(i.complete=!1,d.call(h))}return!1}i.duration==Infinity?this.now=e:(c=e-this.startTime,this.state=c/i.duration,this.pos=f.easing[i.animatedProperties[this.prop]](this.state,c,0,1,i.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update();return!0}},f.extend(f.fx,{tick:function(){var a,b=f.timers,c=0;for(;c-1,k={},l={},m,n;j?(l=e.position(),m=l.top,n=l.left):(m=parseFloat(h)||0,n=parseFloat(i)||0),f.isFunction(b)&&(b=b.call(a,c,g)),b.top!=null&&(k.top=b.top-g.top+m),b.left!=null&&(k.left=b.left-g.left+n),"using"in b?b.using.call(a,k):e.css(k)}},f.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),d=cx.test(b[0].nodeName)?{top:0,left:0}:b.offset();c.top-=parseFloat(f.css(a,"marginTop"))||0,c.left-=parseFloat(f.css(a,"marginLeft"))||0,d.top+=parseFloat(f.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(f.css(b[0],"borderLeftWidth"))||0;return{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;while(a&&!cx.test(a.nodeName)&&f.css(a,"position")==="static")a=a.offsetParent;return a})}}),f.each(["Left","Top"],function(a,c){var d="scroll"+c;f.fn[d]=function(c){var e,g;if(c===b){e=this[0];if(!e)return null;g=cy(e);return g?"pageXOffset"in g?g[a?"pageYOffset":"pageXOffset"]:f.support.boxModel&&g.document.documentElement[d]||g.document.body[d]:e[d]}return this.each(function(){g=cy(this),g?g.scrollTo(a?f(g).scrollLeft():c,a?c:f(g).scrollTop()):this[d]=c})}}),f.each(["Height","Width"],function(a,c){var d=c.toLowerCase();f.fn["inner"+c]=function(){var a=this[0];return a?a.style?parseFloat(f.css(a,d,"padding")):this[d]():null},f.fn["outer"+c]=function(a){var b=this[0];return b?b.style?parseFloat(f.css(b,d,a?"margin":"border")):this[d]():null},f.fn[d]=function(a){var e=this[0];if(!e)return a==null?null:this;if(f.isFunction(a))return this.each(function(b){var c=f(this);c[d](a.call(this,b,c[d]()))});if(f.isWindow(e)){var g=e.document.documentElement["client"+c],h=e.document.body;return e.document.compatMode==="CSS1Compat"&&g||h&&h["client"+c]||g}if(e.nodeType===9)return Math.max(e.documentElement["client"+c],e.body["scroll"+c],e.documentElement["scroll"+c],e.body["offset"+c],e.documentElement["offset"+c]);if(a===b){var i=f.css(e,d),j=parseFloat(i);return f.isNumeric(j)?j:i}return this.css(d,typeof a=="string"?a:a+"px")}}),a.jQuery=a.$=f,typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return f})})(window);rspec-stubbed_env-1.0.4/docs/method_list.html000066400000000000000000000036571504431001300212610ustar00rootroot00000000000000 Method List

        Method List

        rspec-stubbed_env-1.0.4/docs/top-level-namespace.html000066400000000000000000000036441504431001300226030ustar00rootroot00000000000000 Top Level Namespace — Documentation by YARD 0.9.37

        Top Level Namespace

        Defined Under Namespace

        Modules: RSpec

        rspec-stubbed_env-1.0.4/gemfiles/000077500000000000000000000000001504431001300167105ustar00rootroot00000000000000rspec-stubbed_env-1.0.4/gemfiles/audit.gemfile000066400000000000000000000002701504431001300213470ustar00rootroot00000000000000# This file was generated by Appraisal2 source "https://rubygems.org" gem "mutex_m", "~> 0.2" gem "stringio", "~> 3.0" gemspec :path => "../" eval_gemfile("modular/audit.gemfile") rspec-stubbed_env-1.0.4/gemfiles/coverage.gemfile000066400000000000000000000002731504431001300220370ustar00rootroot00000000000000# This file was generated by Appraisal2 source "https://rubygems.org" gem "mutex_m", "~> 0.2" gem "stringio", "~> 3.0" gemspec :path => "../" eval_gemfile("modular/coverage.gemfile") rspec-stubbed_env-1.0.4/gemfiles/current.gemfile000066400000000000000000000002211504431001300217170ustar00rootroot00000000000000# This file was generated by Appraisal2 source "https://rubygems.org" gem "mutex_m", ">= 0.2" gem "stringio", ">= 3.0" gemspec :path => "../" rspec-stubbed_env-1.0.4/gemfiles/deps_unlocked.gemfile000066400000000000000000000004061504431001300230610ustar00rootroot00000000000000# This file was generated by Appraisal2 source "https://rubygems.org" gemspec :path => "../" eval_gemfile("modular/audit.gemfile") eval_gemfile("modular/coverage.gemfile") eval_gemfile("modular/documentation.gemfile") eval_gemfile("modular/style.gemfile") rspec-stubbed_env-1.0.4/gemfiles/head.gemfile000066400000000000000000000002211504431001300211360ustar00rootroot00000000000000# This file was generated by Appraisal2 source "https://rubygems.org" gem "mutex_m", ">= 0.2" gem "stringio", ">= 3.0" gemspec :path => "../" rspec-stubbed_env-1.0.4/gemfiles/modular/000077500000000000000000000000001504431001300203535ustar00rootroot00000000000000rspec-stubbed_env-1.0.4/gemfiles/modular/audit.gemfile000077500000000000000000000002551504431001300230200ustar00rootroot00000000000000# frozen_string_literal: true # Many gems are dropping support for Ruby < 3, # so we only want to run our security audit in CI on Ruby 3+ gem "bundler-audit", "~> 0.9.2" rspec-stubbed_env-1.0.4/gemfiles/modular/coverage.gemfile000077500000000000000000000002471504431001300235060ustar00rootroot00000000000000# frozen_string_literal: true # We run code coverage on the latest version of Ruby only. # Coverage gem "kettle-soup-cover", "~> 1.0", ">= 1.0.6", :require => false rspec-stubbed_env-1.0.4/gemfiles/modular/documentation.gemfile000077500000000000000000000006221504431001300245610ustar00rootroot00000000000000# 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 "yard", "~> 0.9", ">= 0.9.37", :require => false gem "yard-junk", "~> 0.0", ">= 0.0.10", :github => "pboling/yard-junk", :branch => "next", :require => false gem "yard-relative_markdown_links", "~> 0.5.0" # Std Lib extractions gem "rdoc", "~> 6.11" rspec-stubbed_env-1.0.4/gemfiles/modular/style.gemfile000077500000000000000000000007161504431001300230540ustar00rootroot00000000000000# frozen_string_literal: true # We run rubocop on the latest version of Ruby, # but in support of the oldest supported version of Ruby gem "reek", "~> 6.4" gem "rubocop", "~> 1.73", ">= 1.73.2" gem "rubocop-lts", "~> 0.1", ">= 0.1.1" # Linting for Ruby >= 1.8 gem "rubocop-packaging", "~> 0.6", ">= 0.6.0" gem "rubocop-rspec", "~> 3.2" gem "standard", ">= 1.50" # Std Lib extractions gem "benchmark", "~> 0.4", ">= 0.4.1" # Removed from Std Lib in Ruby 3.5 rspec-stubbed_env-1.0.4/gemfiles/ruby_2_3.gemfile000066400000000000000000000001371504431001300216670ustar00rootroot00000000000000# This file was generated by Appraisal2 source "https://rubygems.org" gemspec :path => "../" rspec-stubbed_env-1.0.4/gemfiles/ruby_2_4.gemfile000066400000000000000000000001371504431001300216700ustar00rootroot00000000000000# This file was generated by Appraisal2 source "https://rubygems.org" gemspec :path => "../" rspec-stubbed_env-1.0.4/gemfiles/ruby_2_5.gemfile000066400000000000000000000001371504431001300216710ustar00rootroot00000000000000# This file was generated by Appraisal2 source "https://rubygems.org" gemspec :path => "../" rspec-stubbed_env-1.0.4/gemfiles/ruby_2_6.gemfile000066400000000000000000000002211504431001300216640ustar00rootroot00000000000000# This file was generated by Appraisal2 source "https://rubygems.org" gem "mutex_m", "~> 0.2" gem "stringio", "~> 3.0" gemspec :path => "../" rspec-stubbed_env-1.0.4/gemfiles/ruby_2_7.gemfile000066400000000000000000000002211504431001300216650ustar00rootroot00000000000000# This file was generated by Appraisal2 source "https://rubygems.org" gem "mutex_m", "~> 0.2" gem "stringio", "~> 3.0" gemspec :path => "../" rspec-stubbed_env-1.0.4/gemfiles/ruby_3_0.gemfile000066400000000000000000000002211504431001300216570ustar00rootroot00000000000000# This file was generated by Appraisal2 source "https://rubygems.org" gem "mutex_m", "~> 0.2" gem "stringio", "~> 3.0" gemspec :path => "../" rspec-stubbed_env-1.0.4/gemfiles/ruby_3_1.gemfile000066400000000000000000000002211504431001300216600ustar00rootroot00000000000000# This file was generated by Appraisal2 source "https://rubygems.org" gem "mutex_m", "~> 0.2" gem "stringio", "~> 3.0" gemspec :path => "../" rspec-stubbed_env-1.0.4/gemfiles/ruby_3_2.gemfile000066400000000000000000000002211504431001300216610ustar00rootroot00000000000000# This file was generated by Appraisal2 source "https://rubygems.org" gem "mutex_m", "~> 0.2" gem "stringio", "~> 3.0" gemspec :path => "../" rspec-stubbed_env-1.0.4/gemfiles/ruby_3_3.gemfile000066400000000000000000000002211504431001300216620ustar00rootroot00000000000000# This file was generated by Appraisal2 source "https://rubygems.org" gem "mutex_m", "~> 0.2" gem "stringio", "~> 3.0" gemspec :path => "../" rspec-stubbed_env-1.0.4/gemfiles/style.gemfile000066400000000000000000000002701504431001300214010ustar00rootroot00000000000000# This file was generated by Appraisal2 source "https://rubygems.org" gem "mutex_m", "~> 0.2" gem "stringio", "~> 3.0" gemspec :path => "../" eval_gemfile("modular/style.gemfile") rspec-stubbed_env-1.0.4/lib/000077500000000000000000000000001504431001300156635ustar00rootroot00000000000000rspec-stubbed_env-1.0.4/lib/rspec/000077500000000000000000000000001504431001300167775ustar00rootroot00000000000000rspec-stubbed_env-1.0.4/lib/rspec/stubbed_env.rb000066400000000000000000000013241504431001300216240ustar00rootroot00000000000000# frozen_string_literal: true # This Gem require "rspec/stubbed_env/version" require "rspec/stubbed_env/hide_helpers" require "rspec/stubbed_env/stub_helpers" require "rspec/stubbed_env/config" # # ENV stubbing is opt-in, via a shared context, rather than global # # describe 'my stubbed test' do # include_context 'with stubbed env' # before do # stub_env('FOO' => 'is bar') # end # it 'does a thing' do # expect(ENV['FOO']).to eq('is bar') # end # end # # describe 'my hidden test' do # include_context 'with hidden env' # before do # hide_env('FOO') # end # it 'does a thing' do # expect(ENV['FOO']).to be_nil # end # end module RSpec # Gem Namespace module StubbedEnv end end rspec-stubbed_env-1.0.4/lib/rspec/stubbed_env/000077500000000000000000000000001504431001300212775ustar00rootroot00000000000000rspec-stubbed_env-1.0.4/lib/rspec/stubbed_env/config.rb000066400000000000000000000027311504431001300230740ustar00rootroot00000000000000# frozen_string_literal: true # # ENV stubbing is opt-in, via a shared context, rather than global # # Usage: # # describe 'my stubbed test' do # include_context 'with stubbed env' # before do # stub_env('FOO' => 'is bar') # end # it 'does a thing' do # expect(ENV['FOO']).to eq('is bar') # end # end # # Alternative usage: # # describe 'another stubbed test' do # include_context 'with stubbed env', 'FOO' => 'is_bar' # it 'also does a thing' do # expect(ENV['FOO']).to eq('is bar') # end # end RSpec.shared_context("with stubbed env") do |args| include RSpec::StubbedEnv::StubHelpers # TODO: Switch `length > 0` => `any?` after Ruby 1.8 support is dropped if args.is_a?(Hash) && args.keys.length > 0 before { stub_env(args) } end end # # ENV hiding is opt-in, via a shared context, rather than global # # Usage: # # describe 'my hidden test' do # include_context 'with hidden env' # before do # hide_env('FOO', 'BAR') # end # it 'does a thing' do # expect(ENV['FOO']).to be_nil # end # end # # Alternative usage: # # describe 'another stubbed test' do # include_context 'with stubbed env', 'FOO', 'BAR' # it 'also does a thing' do # expect(ENV['BAR']).to be_nil # end # end RSpec.shared_context("with hidden env") do |*args| include RSpec::StubbedEnv::HideHelpers # TODO: Switch `length > 0` => `any?` after Ruby 1.8 support is dropped if args.is_a?(Array) && args.length > 0 before { hide_env(*args) } end end rspec-stubbed_env-1.0.4/lib/rspec/stubbed_env/hide_helpers.rb000066400000000000000000000034561504431001300242670ustar00rootroot00000000000000# frozen_string_literal: true require "rspec/stubbed_env/stub_helpers" # # ENV hiding is opt-in, via a shared context, rather than global # # Usage: # # describe 'my hidden ENV test' do # include_context 'with hidden env' # before do # ENV["FOO"] = "is bar" # hide_env('FOO') # end # it 'is nil' do # expect(ENV['FOO']).to be_nil # end # it 'raises KeyError on fetch' do # expect { ENV.fetch('FOO') }.to raise_error(KeyError) # end # end module RSpec module StubbedEnv # Helpers to unobtrusively stub ENV module HideHelpers include StubHelpers # Can be called with an array of ENV keys to hide: # # hide_env('FOO', 'BAR', 'BAZ') # Preferred # # Alternatively can be called once per ENV key to hide: # # stub_env('A') # NOT # stub_env('C') # AS # stub_env('E') # GOOD (creates redundant stubs on values_at) def hide_env(*keys) init_stub unless env_stubbed? keys.each do |key| add_hidden_key(key) end end private def add_hidden_key(key) key = key.to_s # Support symbols by forcing to string hide_brackets(key) hide_fetch(key) hide_values_at end def hide_brackets(key) allow(ENV).to(receive(:[]).with(key).and_return(nil)) end def hide_fetch(key) allow(ENV).to(receive(:fetch).with(key)) do |_| raise KeyError, "key not found: \"#{key}\"" end allow(ENV).to(receive(:fetch).with(key, anything)) do |_, default_val| default_val end end # Rides on the fetch hider! def hide_values_at allow(ENV).to(receive(:values_at)) do |*args| args.map { |arg| ENV.fetch(arg, nil) } end end end end end rspec-stubbed_env-1.0.4/lib/rspec/stubbed_env/stub_helpers.rb000066400000000000000000000050041504431001300243220ustar00rootroot00000000000000# frozen_string_literal: true # # ENV stubbing is opt-in, via a shared context, rather than global # # Usage: # # describe 'my stubbed test' do # include_context 'with stubbed env' # before do # stub_env('FOO' => 'is bar') # # or, equivalently: # stub_env(FOO: 'is bar') # # or, equivalently: # stub_env('FOO', 'is bar') # # or, equivalently: # stub_env(FOO: 'is bar') # end # it 'does a thing' do # expect(ENV['FOO']).to eq('is bar') # end # end # # NOTE: This file was originally written by Liam Bennet (https://github.com/ljkbennett) # as part of the stub_env library (https://github.com/ljkbennett/stub_env). # It has evolved since then. module RSpec module StubbedEnv # Helpers to unobtrusively stub ENV module StubHelpers # Can be called with all key value pairs to be stubbed as a hash: # # stub_env('A' => 'B', 'C' => 'D', 'E' => 'F') # Preferred # # Alternatively can be called one per ENV key-value pair to stub: # # stub_env('A', 'B') # NOT # stub_env('C', 'D') # AS # stub_env('E', 'F') # GOOD (Creates redundant stubs on values_at) def stub_env(key_or_hash, value = nil) init_stub unless env_stubbed? if key_or_hash.is_a?(Hash) key_or_hash.each { |k, v| add_stubbed_value(k, v) } else add_stubbed_value(key_or_hash, value) end end private STUBBED_KEY = "__STUBBED__" def add_stubbed_value(key, value) key = key.to_s # Support symbols by forcing to string allow_brackets(key, value) allow_fetch(key, value) allow_values_at end def allow_brackets(key, value) allow(ENV).to(receive(:[]).with(key).and_return(value)) end def allow_fetch(key, value) allow(ENV).to(receive(:fetch).with(key).and_return(value)) allow(ENV).to(receive(:fetch).with(key, anything)) do |_, default_val| value || default_val end end # Rides on the fetch stub! def allow_values_at allow(ENV).to(receive(:values_at)) do |*args| args.map { |arg| ENV.fetch(arg, nil) } end end def env_stubbed? ENV.fetch(STUBBED_KEY, nil) end def init_stub allow(ENV).to(receive(:[]).and_call_original) allow(ENV).to(receive(:fetch).and_call_original) allow(ENV).to(receive(:values_at).and_call_original) add_stubbed_value(STUBBED_KEY, true) end end end end rspec-stubbed_env-1.0.4/lib/rspec/stubbed_env/version.rb000066400000000000000000000001401504431001300233040ustar00rootroot00000000000000# frozen_string_literal: true module RSpec module StubbedEnv VERSION = "1.0.4" end end rspec-stubbed_env-1.0.4/rspec-stubbed_env.gemspec000066400000000000000000000113701504431001300220760ustar00rootroot00000000000000# frozen_string_literal: true gem_version = if RUBY_VERSION >= "3.1" # Loading Version into an anonymous module allows version.rb to get code coverage from SimpleCov! # See: https://github.com/simplecov-ruby/simplecov/issues/557#issuecomment-2630782358 Module.new.tap { |mod| Kernel.load("lib/rspec/stubbed_env/version.rb", mod) }::RSpec::StubbedEnv::VERSION else lib = File.expand_path("lib", __dir__) $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) require "rspec/stubbed_env/version" RSpec::StubbedEnv::VERSION end Gem::Specification.new do |spec| spec.name = "rspec-stubbed_env" spec.version = gem_version spec.authors = ["Peter Boling", "Liam Bennett"] spec.email = ["floss@galtzo.com"] # Linux distros often package gems and securely certify them independent # of the official RubyGem certification process. Allowed via ENV["SKIP_GEM_SIGNING"] # Ref: https://gitlab.com/oauth-xx/version_gem/-/issues/3 # Hence, only enable signing if `SKIP_GEM_SIGNING` is not set in ENV. # See CONTRIBUTING.md unless ENV.include?("SKIP_GEM_SIGNING") user_cert = "certs/#{ENV.fetch("GEM_CERT_USER", ENV["USER"])}.pem" cert_file_path = File.join(__dir__, user_cert) cert_chain = cert_file_path.split(",") cert_chain.select! { |fp| File.exist?(fp) } if cert_file_path && cert_chain.any? spec.cert_chain = cert_chain if $PROGRAM_NAME.end_with?("gem") && ARGV[0] == "build" spec.signing_key = File.join(Gem.user_home, ".ssh", "gem-private_key.pem") end end end spec.summary = "Unobtrusively stub ENV keys and values during testing" spec.description = %[Stub or hide environment variables in a scoped context for testing stub_env('REDIS_URL' => 'redis://localhost:6379/') hide_env('SESSION_SECRET') ] spec.homepage = "https://github.com/galtzo-floss/#{spec.name}" spec.license = "MIT" spec.required_ruby_version = ">= 1.8.7" spec.metadata["homepage_uri"] = "https://#{spec.name.tr("_", "-")}.galtzo.com/" spec.metadata["source_code_uri"] = "#{spec.homepage}/tree/v#{spec.version}" spec.metadata["changelog_uri"] = "#{spec.homepage}/blob/v#{spec.version}/CHANGELOG.md" spec.metadata["bug_tracker_uri"] = "#{spec.homepage}/issues" spec.metadata["documentation_uri"] = "https://www.rubydoc.info/gems/#{spec.name}/#{spec.version}" spec.metadata["funding_uri"] = "https://github.com/sponsors/pboling" spec.metadata["wiki_uri"] = "#{spec.homepage}/wiki" spec.metadata["news_uri"] = "https://www.railsbling.com/tags/#{spec.name}" spec.metadata["discord_uri"] = "https://discord.gg/3qme4XHNKN" spec.metadata["rubygems_mfa_required"] = "true" # Specify which files are part of each release. spec.files = Dir[ # Splats (alphabetical) "lib/**/*.rb", ] # Automatically included with gem package, no need to list again in files. spec.extra_rdoc_files = Dir[ # Files (alphabetical) "CHANGELOG.md", "CODE_OF_CONDUCT.md", "CONTRIBUTING.md", "LICENSE.txt", "README.md", "SECURITY.md", ] spec.rdoc_options += [ "--title", "#{spec.name} - #{spec.summary}", "--main", "CHANGELOG.md", "CODE_OF_CONDUCT.md", "CONTRIBUTING.md", "LICENSE.txt", "README.md", "SECURITY.md", "--line-numbers", "--inline-source", "--quiet", ] spec.require_paths = ["lib"] spec.bindir = "exe" spec.executables = [] # NOTE: It is preferable to list development dependencies in the gemspec due to increased # visibility and discoverability on RubyGems.org. # However, development dependencies in gemspec will install on # all versions of Ruby that will run in CI. # This gem, and its runtime dependencies, will install on Ruby down to 1.8.7. # This gem, and its development dependencies, will install on Ruby down to 2.3.x. # This is because in CI easy installation of Ruby, via setup-ruby, is for >= 2.3. # Thus, dev dependencies in gemspec must have # # required_ruby_version ">= 2.3" (or lower) # # Development dependencies that require strictly newer Ruby versions should be in a "gemfile", # and preferably a modular one (see gemfiles/modular/*.gemfile). # Release Tasks spec.add_development_dependency("stone_checksums", "~> 1.0") # Ruby >= 2.2.0 ### Testing spec.add_development_dependency("appraisal2", "~> 3.0") # ruby >= 1.8.7 spec.add_development_dependency("rspec", "~> 3.13") # ruby >= 0 spec.add_development_dependency("rspec-block_is_expected", "~> 1.0") # ruby >= 1.8.7 spec.add_development_dependency("rspec_junit_formatter", "~> 0.6") # Ruby >= 2.3.0, for GitLab Test Result Parsing # Development tasks spec.add_development_dependency("rake", "~> 13.0") # ruby >= 2.2 end rspec-stubbed_env-1.0.4/rubocop/000077500000000000000000000000001504431001300165665ustar00rootroot00000000000000rspec-stubbed_env-1.0.4/rubocop/strict_rspec.yml000066400000000000000000000007761504431001300220270ustar00rootroot00000000000000# These Cops Must Always Be Enabled! # These Cops check for things that are *literally* bugs, # and no code should ever be released that fails these cops. # # The Exclude: [] is crucial here: # even if our .rubocop_todo.yml contained exclusions for strict cops, we nullify them here, # thus, re-activating these cops for all the files. # # These settings must be loaded after any files of "TODOs" that instruct RuboCop to ignore errors. # RSpec/Focus: # run ALL tests on CI Enabled: true Exclude: [] rspec-stubbed_env-1.0.4/rubocop/strict_ruby.yml000066400000000000000000000010041504431001300216550ustar00rootroot00000000000000# These Cops Must Always Be Enabled! # These Cops check for things that are *literally* bugs, # and no code should ever be released that fails these cops. # # The Exclude: [] is crucial here: # even if our .rubocop_todo.yml contained exclusions for strict cops, we nullify them here, # thus, re-activating these cops for all the files. # # These settings must be loaded after any files of "TODOs" that instruct RuboCop to ignore errors. # Lint/Debugger: # don't leave binding.pry Enabled: true Exclude: [] rspec-stubbed_env-1.0.4/spec/000077500000000000000000000000001504431001300160475ustar00rootroot00000000000000rspec-stubbed_env-1.0.4/spec/rspec/000077500000000000000000000000001504431001300171635ustar00rootroot00000000000000rspec-stubbed_env-1.0.4/spec/rspec/stubbed_env/000077500000000000000000000000001504431001300214635ustar00rootroot00000000000000rspec-stubbed_env-1.0.4/spec/rspec/stubbed_env/hide_helpers_spec.rb000066400000000000000000000121101504431001300254500ustar00rootroot00000000000000# frozen_string_literal: true require "spec_helper" RSpec.describe(RSpec::StubbedEnv::HideHelpers) do describe "hide_env" do context "when no hiding" do subject(:myenv) { FooByEnv.new } it "is test env" do expect(myenv.env).to(eq("test")) end it "has 2 localhost settings" do expect(myenv.array.grep(/localhost:\d{3}\Z/).length).to(eq(2)) end it "has size 2" do expect(myenv.size).to(eq(2)) end end context "when development environment" do subject(:myenv) { FooByEnv.new } include_context "with hidden env" let(:environment) { "development" } before do ENV["MEDIUM_1"] = "datastore-01.example.org" ENV["MEDIUM_2"] = "datastore-02.example.org" ENV["IRRELEVANT_3"] = "datastore-03.example.org" allow(Rails).to(receive(:env).and_return(environment)) end after do ENV.delete("MEDIUM_1") ENV.delete("MEDIUM_2") ENV.delete("IRRELEVANT_3") end it "is development env" do expect(myenv.env).to(eq(environment)) end it "has 2 example.org settings" do expect(myenv.array.grep(/datastore-\d{2}\.example\.org\Z/).length).to(eq(2)) end it "has size 2" do expect(myenv.size).to(eq(2)) end context "when hiding" do before do hide_env("MEDIUM_2") end it "has 2 example.org settings" do expect(myenv.array.grep(/datastore-\d{2}\.example\.org\Z/).length).to(eq(1)) end it "has size 1" do expect(myenv.size).to(eq(1)) end end end context "when production environment" do subject(:myenv) { FooByEnv.new } include_context "with hidden env" let(:environment) { "production" } before do ENV["BIG_1"] = "datastore-01.example.org" ENV["BIG_2"] = "datastore-02.example.org" ENV["BIG_3"] = "datastore-03.example.org" ENV["BIG_4"] = "datastore-04.example.org" ENV["IRRELEVANT_5"] = "datastore-03.example.org" allow(Rails).to(receive(:env).and_return(environment)) end after do ENV.delete("BIG_1") ENV.delete("BIG_2") ENV.delete("BIG_3") ENV.delete("BIG_4") ENV.delete("IRRELEVANT_5") end it "is production env" do expect(myenv.env).to(eq(environment)) end it "has 4 example.org settings" do expect(myenv.array.grep(/datastore-\d{2}\.example\.org\Z/).length).to(eq(4)) end it "has size 4" do expect(myenv.size).to(eq(4)) end context "when hiding via single call" do before do hide_env("BIG_2", "BIG_4") end it "has 2 example.org settings" do expect(myenv.array.grep(/datastore-\d{2}\.example\.org\Z/).length).to(eq(2)) end it "has size 2" do expect(myenv.size).to(eq(2)) end end context "when hiding via multiple calls" do before do hide_env("BIG_1") hide_env("BIG_3") end it "has 2 example.org settings" do expect(myenv.array.grep(/datastore-\d{2}\.example\.org\Z/).length).to(eq(2)) end it "has size 2" do expect(myenv.size).to(eq(2)) end end end end describe "#values_at" do include_context "with hidden env" before do ENV["TO_BE_HIDDEN"] = "to_be_hidden" ENV["NOT_HIDDEN"] = "not_hidden" end after do ENV.delete("TO_BE_HIDDEN") ENV.delete("NOT_HIDDEN") end context "when not hidden" do it "returns original" do expect(ENV.values_at("TO_BE_HIDDEN", "NOT_HIDDEN")).to(contain_exactly("to_be_hidden", "not_hidden")) end end context "when hidden" do it "returns no hidden values" do hide_env("TO_BE_HIDDEN") expect(ENV.values_at("TO_BE_HIDDEN", "NOT_HIDDEN")).to(contain_exactly(nil, "not_hidden")) end end end describe "stubbing" do subject(:do_stub) { hide_env("STAR") } include_context "with hidden env" before do ENV["STAR"] = "BURN" ENV["MAG"] = "NET" end after do ENV.delete("STAR") ENV.delete("MAG") end it "does not raise error" do block_is_expected.to(not_raise_error) end it "hides a key that was previously set" do block_is_expected.to(change { ENV["STAR"] }.from("BURN").to(nil)) end it "does not modify other keys" do block_is_expected.to(not_change { ENV["MAG"] }.from("NET")) end end describe "hiding trough context arguments" do include_context "with hidden env", "FAFF", "DANK" before do ENV["FAFF"] = "BURN" ENV["DANK"] = "NET" end after do ENV.delete("FAFF") ENV.delete("DANK") end it "hides all keys provided in the arguments" do ["FAFF", "DANK"].each do |key| expect(ENV[key]).to(be_nil) end end it "hides them so well" do ["FAFF", "DANK"].each do |key| expect { ENV.fetch(key) }.to raise_error(KeyError) end end end end rspec-stubbed_env-1.0.4/spec/rspec/stubbed_env/stub_helpers_spec.rb000066400000000000000000000120261504431001300255220ustar00rootroot00000000000000# frozen_string_literal: true require "spec_helper" RSpec.describe(RSpec::StubbedEnv::StubHelpers) do describe "stub_env" do context "when no stubbing" do subject(:myenv) { FooByEnv.new } it "is test env" do expect(myenv.env).to(eq("test")) end it "has 2 localhost settings" do expect(myenv.array.grep(/localhost:\d{3}\Z/).length).to(eq(2)) end it "has size 2" do expect(myenv.size).to(eq(2)) end end context "when hash signature with development environment" do subject(:myenv) { FooByEnv.new } include_context "with stubbed env" let(:environment) { "development" } before do stub_env( "MEDIUM_1" => "datastore-01.example.org", "MEDIUM_2" => "datastore-02.example.org", "IRRELEVANT_3" => "datastore-03.example.org", ) allow(Rails).to(receive(:env).and_return(environment)) end it "is development env" do expect(myenv.env).to(eq(environment)) end it "has 2 example.org settings" do expect(myenv.array.grep(/datastore-\d{2}\.example\.org\Z/).length).to(eq(2)) end it "has size 2" do expect(myenv.size).to(eq(2)) end end context "when hash signature with production environment" do subject(:myenv) { FooByEnv.new } include_context "with stubbed env" let(:environment) { "production" } before do stub_env( "BIG_1" => "datastore-01.example.org", "BIG_2" => "datastore-02.example.org", "BIG_3" => "datastore-03.example.org", "BIG_4" => "datastore-04.example.org", "IRRELEVANT_5" => "datastore-03.example.org", ) allow(Rails).to(receive(:env).and_return(environment)) end it "is production env" do expect(myenv.env).to(eq(environment)) end it "has 4 example.org settings" do expect(myenv.array.grep(/datastore-\d{2}\.example\.org\Z/).length).to(eq(4)) end it "has size 4" do expect(myenv.size).to(eq(4)) end end context "when key/value signature with development environment" do subject(:myenv) { FooByEnv.new } include_context "with stubbed env" let(:environment) { "development" } before do stub_env("MEDIUM_1", "datastore-01.example.org") stub_env("MEDIUM_2", "datastore-02.example.org") stub_env("IRRELEVANT_3", "datastore-03.example.org") allow(Rails).to(receive(:env).and_return(environment)) end it "is development env" do expect(myenv.env).to(eq(environment)) end it "has 2 example.org settings" do expect(myenv.array.grep(/datastore-\d{2}\.example\.org\Z/).length).to(eq(2)) end it "has size 2" do expect(myenv.size).to(eq(2)) end end context "when key/value signature with production environment" do subject(:myenv) { FooByEnv.new } include_context "with stubbed env" let(:environment) { "production" } before do stub_env("BIG_1", "datastore-01.example.org") stub_env("BIG_2", "datastore-02.example.org") stub_env("BIG_3", "datastore-03.example.org") stub_env("BIG_4", "datastore-04.example.org") stub_env("IRRELEVANT_5", "datastore-05.example.org") allow(Rails).to(receive(:env).and_return(environment)) end it "is production env" do expect(myenv.env).to(eq(environment)) end it "has 4 example.org settings" do expect(myenv.array.grep(/datastore-\d{2}\.example\.org\Z/).length).to(eq(4)) end it "has size 4" do expect(myenv.size).to(eq(4)) end end end describe "#values_at" do include_context "with stubbed env" before do ENV["TO_BE_STUBBED"] = "to_be_stubbed" ENV["NOT_STUBBED"] = "not_stubbed" end after do ENV.delete("TO_BE_STUBBED") ENV.delete("NOT_STUBBED") end context "when not stubbed" do it "returns original" do expect(ENV.values_at("TO_BE_STUBBED", "NOT_STUBBED")).to(contain_exactly("to_be_stubbed", "not_stubbed")) end end context "when stubbed" do it "returns stubbed values if stubbed" do stub_env("TO_BE_STUBBED", "horsehair") expect(ENV.values_at("TO_BE_STUBBED", "NOT_STUBBED")).to(contain_exactly("horsehair", "not_stubbed")) end end end describe "stubbing" do subject(:do_stub) { stub_env("STAR", "ships") } include_context "with stubbed env" it "does not raise error" do block_is_expected.to(not_raise_error) end it "stubs a key that wasn't previously set" do block_is_expected.to(change { ENV["STAR"] }.from(nil).to("ships")) end end describe "stubbing trough context arguments" do include_context "with stubbed env", "STAR" => "ships", "META" => true it "stubs all keys provided in the arguments" do {"STAR" => "ships", "META" => true}.each do |key, value| expect(ENV[key]).to(eq(value)) end end end end rspec-stubbed_env-1.0.4/spec/rspec/stubbed_env_spec.rb000066400000000000000000000002431504431001300230210ustar00rootroot00000000000000# frozen_string_literal: true RSpec.describe(RSpec::StubbedEnv) do it "has a version number" do expect(RSpec::StubbedEnv::VERSION).not_to(be_nil) end end rspec-stubbed_env-1.0.4/spec/spec_helper.rb000066400000000000000000000021711504431001300206660ustar00rootroot00000000000000# frozen_string_literal: true # External gems require "rspec/block_is_expected" require "rspec/block_is_expected/matchers/not" # Helpers # We can use require_relative here because we are only running specs against Ruby 2.3+ # The runtime gem still supports Ruby 1..8.7+, so we can't use it there. require_relative "support/fake_rails" require_relative "support/foo_by_env" RSpec.configure do |config| # Enable flags like --only-failures and --next-failure config.example_status_persistence_file_path = ".rspec_status" # Disable RSpec exposing methods globally on `Module` and `main` config.disable_monkey_patching! config.expect_with(:rspec) do |c| c.syntax = :expect end end # NOTE: Gemfiles for older rubies won't have kettle-soup-cover. # The rescue LoadError handles that scenario. begin require "kettle-soup-cover" require "simplecov" if Kettle::Soup::Cover::DO_COV # `.simplecov` is run here! rescue LoadError => error # check the error message, if you are so inclined, and re-raise if not what is expected raise error unless error.message.include?("kettle") end # This gem require "rspec/stubbed_env" rspec-stubbed_env-1.0.4/spec/support/000077500000000000000000000000001504431001300175635ustar00rootroot00000000000000rspec-stubbed_env-1.0.4/spec/support/fake_rails.rb000066400000000000000000000001641504431001300222110ustar00rootroot00000000000000# frozen_string_literal: true # Test Helper class Rails class << self def env "test" end end end rspec-stubbed_env-1.0.4/spec/support/foo_by_env.rb000066400000000000000000000010201504431001300222260ustar00rootroot00000000000000# frozen_string_literal: true # Class to help with testing class FooByEnv attr_reader :array, :size, :env def initialize @env = Rails.env.to_s @array = case @env when "test" then ["localhost:123", "localhost:124"] when "development" then [ENV.fetch("MEDIUM_1", nil), ENV.fetch("MEDIUM_2", nil)] when "production" then [ ENV.fetch("BIG_1", nil), ENV.fetch("BIG_2", nil), ENV.fetch("BIG_3", nil), ENV.fetch("BIG_4", nil), ] end.compact @size = @array.length end end