To require and use:
require 'debug/prelude'
# Then to use...
debugger| class MyClass | |
| attr_reader :my_var | |
| def initialize | |
| @my_var = "initial value" | |
| end | |
| def demonstrate | |
| # IMPORTANT: `self` is OPTIONAL for getters but MANDATORY for setters | |
| puts "1. Reading with 'my_var': #{my_var}" # Calls the getter |
| # Pull in changes | |
| # NOTE: This is what will cause the merge conflicts | |
| git pull --rebase origin develop | |
| # Force resolve dist/ conflicts by using "ours" | |
| git checkout --ours dist | |
| git add dist | |
| git rebase --continue | |
| # Regenerate dist/ files |
| <!-- Pass hidden params to the button_to --> | |
| <%= button_to "Buy Now", stripe_embedded_checkout_path, params: { price_id: price.id }, method: :get, data: { turbo: false } %> | |
| <!-- Pass query params to the link_to --> | |
| <%= link_to "Buy Now", stripe_embedded_checkout_path(price_id: price.id), method: :get, data: { turbo: false } %> | |
| <!-- both methods allow you to access params[:price_id] in the controller --> |
| NAME=my-app-name && docker build -t $NAME -f .devcontainer/docker/Dockerfile . && docker run -it --rm $NAME bash |
| alias dbfg="docker rm -f \$(docker ps -aq); docker system prune -f" |
| # NOTE: THE FOLLOWING IS FOR *NON-FORKED* REPOS ONLY. | |
| # "origin" WILL REFER TO THE *MAIN* REPO, NOT A FORK. | |
| # AND THERE IS NO "upstream". | |
| # Prep... | |
| git fetch origin | |
| # DEVELOP | |
| git checkout develop | |
| git pull --rebase origin develop # (1.) pull in latest changes from remote "develop" |
| # 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 |