To require and use:
require 'debug/prelude'
# Then to use...
debugger
# STAGE 1: Initial setup | |
FROM ruby:2.6.10 as base | |
WORKDIR /app | |
# Use a bundler version that works for both this version of Ruby and (if applicable) the version of Rails being used | |
# NOTE: The RubyGems version that comes with Ruby 2.6 contains a bug and must be updated to v3.2.3. | |
# Use a bundler version that works for both this version of Ruby and (if applicable) the version of Rails being used | |
# NOTE: Bundler v2.4.22 is the last version that works with Ruby 2.6. | |
# RubyGems v3.4.22 is the last version that works with Ruby 2.6. |
# FILE: .github/workflows/upload-artifacts.yml | |
name: Upload artifacts on failure | |
on: | |
push: | |
branches: | |
- main | |
- master | |
- develop |
# FILE: .github/workflows/lint-shell-scripts.yml | |
# SOURCE: https://github.com/koalaman/shellcheck/wiki/GitHub-Actions | |
name: Lint shell scripts | |
on: | |
push: | |
branches: | |
- main | |
- master | |
- develop |
# More info on Redocly config: https://redocly.com/docs/cli/configuration/ | |
# Redocly API guidelines builder: https://redocly.com/api-governance/ | |
# List of Redocly built-in linting rules: https://redocly.com/docs/cli/rules/built-in-rules/ | |
# Redocly comparison to Spectral (another popular OpenAPI linter): https://redocly.com/docs/cli/guides/migrate-from-spectral/ | |
apis: | |
perks@v1: | |
root: optum-perks-online-care-api-spec.yml | |
extends: | |
- recommended-strict | |
rules: |
before(:example) do | |
time = Time.new(2024, 3, 18, 17, 0, 0) | |
allow(Time).to receive(:now).and_return(time) | |
allow(Date).to receive(:today).and_return(time.to_date) | |
end |
let
is not available in the scope of the shared example group definition, but only in the example (it, specify, scenario) scope.
To pass cassette_name
to the shared examples, you can use a method argument instead of let
. Here's how you can modify your shared examples and usage:
RSpec.shared_examples 'a vehicle' do |opts|
use_vcr_cassette(opts[:cassette_name])
end
docker run -it --rm -v .:/app ruby:3.2.2 bash |
# STEP 1: Find the latest commit in the branch you want to grab a file from | |
git log <other-branch> | |
# STEP 2: | |
# Option 1: Get 1 file from another branch (preserves author info) | |
git format-patch -o patches ..<other-branch-latest-commit> -- <path-to-file> | |
git am patches/*.patch | |
# This will automatically add commit(s) onto your branch. Squash those commits with: | |
git rebase -i HEAD~3 # e.g. for 3 commits | |
# If multiple authors then the author of the earliest commit will become the new author |
/ # FILE: views/api/keys/index.html.slim.rb | |
h1 API Keys | |
table class="table" | |
thead | |
tr | |
th Key | |
th User | |
th Description |