diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f9a9b7ea..cac899a4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,9 +1,9 @@ -name: "CI" +name: CI on: push: - branches: ["master"] + branches: [ master ] pull_request: - branches: ["master"] + branches: [ master ] concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number }} @@ -12,26 +12,18 @@ concurrency: jobs: run_specs: name: Rspec - runs-on: ubuntu-latest + runs-on: blacksmith-4vcpu-ubuntu-2404 timeout-minutes: 10 env: CI: true RAILS_ENV: test steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Install Ruby and gems - uses: ruby/setup-ruby@v1 - with: - bundler-cache: true - - - name: Run specs - run: bundle exec rspec --format documentation --format RspecJunitFormatter --out tmp/rspec.xml - - - name: Publish Rspec Test Results - uses: mikepenz/action-junit-report@v4 + - uses: actions/checkout@v6 + - uses: ruby/setup-ruby@v1 + with: { bundler-cache: true } + - run: bundle exec rspec --format documentation --format RspecJunitFormatter --out tmp/rspec.xml + - uses: mikepenz/action-junit-report@v6 if: success() || failure() with: check_name: Rspec Test Results diff --git a/.gitignore b/.gitignore index a41c71cf..8d57097e 100644 --- a/.gitignore +++ b/.gitignore @@ -19,3 +19,5 @@ log *.gem .history + +.DS_Store diff --git a/Gemfile b/Gemfile index 6d5406cf..a8b4dd98 100644 --- a/Gemfile +++ b/Gemfile @@ -2,7 +2,16 @@ source 'https://rubygems.org' -git_source(:github) { |repo_name| "https://github.com/#{repo_name}" } - -# Specify your gem's dependencies in rolemodel_rails.gemspec +# Specify your gem's dependencies in rolemodel-rails.gemspec. gemspec + +# Gems which are necessary to boot the included test applications, +# but should not be bundled with this gem may be added here. +gem 'pg' +gem 'propshaft' +gem 'puma' +gem 'stimulus-rails' +gem 'turbo-rails' + +# Start debugger with binding.b [https://github.com/ruby/debug] +gem 'debug', '>= 1.0.0' diff --git a/Gemfile.lock b/Gemfile.lock index 9c414f84..680e31c3 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - rolemodel_rails (0.27.2) + rolemodel-rails (1.0.0) rails (> 7.1) GEM @@ -90,7 +90,10 @@ GEM connection_pool (3.0.2) crass (1.0.6) date (3.5.1) - diff-lcs (1.5.0) + debug (1.11.1) + irb (~> 1.10) + reline (>= 0.3.8) + diff-lcs (1.6.2) drb (2.2.3) erb (6.0.1) erubi (1.13.1) @@ -137,17 +140,27 @@ GEM nokogiri (1.19.0) mini_portile2 (~> 2.8.2) racc (~> 1.4) + nokogiri (1.19.0-x86_64-linux-gnu) + racc (~> 1.4) parallel (1.27.0) parser (3.3.8.0) ast (~> 2.4.1) racc + pg (1.6.3) + pg (1.6.3-arm64-darwin) pp (0.6.3) prettyprint prettyprint (0.2.0) prism (1.9.0) + propshaft (1.3.1) + actionpack (>= 7.0.0) + activesupport (>= 7.0.0) + rack psych (5.3.1) date stringio + puma (7.2.0) + nio4r (~> 2.0) racc (1.8.1) rack (3.2.4) rack-session (2.1.1) @@ -196,19 +209,19 @@ GEM regexp_parser (2.10.0) reline (0.6.3) io-console (~> 0.5) - rspec (3.11.0) - rspec-core (~> 3.11.0) - rspec-expectations (~> 3.11.0) - rspec-mocks (~> 3.11.0) - rspec-core (3.11.0) - rspec-support (~> 3.11.0) - rspec-expectations (3.11.1) + rspec (3.13.2) + rspec-core (~> 3.13.0) + rspec-expectations (~> 3.13.0) + rspec-mocks (~> 3.13.0) + rspec-core (3.13.6) + rspec-support (~> 3.13.0) + rspec-expectations (3.13.5) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.11.0) - rspec-mocks (3.11.1) + rspec-support (~> 3.13.0) + rspec-mocks (3.13.8) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.11.0) - rspec-support (3.11.1) + rspec-support (~> 3.13.0) + rspec-support (3.13.7) rspec_junit_formatter (0.6.0) rspec-core (>= 2, < 4, != 2.12.0) rubocop (1.78.0) @@ -232,10 +245,15 @@ GEM rubocop-ast (>= 1.31.1, < 2.0) ruby-progressbar (1.13.0) securerandom (0.4.1) + stimulus-rails (1.3.4) + railties (>= 6.0.0) stringio (3.2.0) thor (1.5.0) timeout (0.6.0) tsort (0.2.0) + turbo-rails (2.0.23) + actionpack (>= 7.1.0) + railties (>= 7.1.0) tzinfo (2.0.6) concurrent-ruby (~> 1.0) unicode-display_width (3.1.4) @@ -250,18 +268,25 @@ GEM zeitwerk (2.7.4) PLATFORMS - ruby + arm64-darwin-25 + x86_64-linux DEPENDENCIES benchmark bundler (~> 4) + debug (>= 1.0.0) generator_spec (~> 0.10) + pg + propshaft + puma rake (~> 13) - rolemodel_rails! + rolemodel-rails! rspec (~> 3) rspec_junit_formatter rubocop rubocop-rails + stimulus-rails + turbo-rails BUNDLED WITH - 4.0.5 + 4.0.8 diff --git a/README.md b/README.md index 320b5278..a076891e 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ Attempts to solve the pain of: ## Precondition -The rolemodel_rails gem expects to be added to an existing Rails project. Typically those are started with: +The rolemodel-rails gem expects to be added to an existing Rails project. Typically those are started with: ```shell rails new --javascript=webpack --database=postgresql --skip-test @@ -28,9 +28,7 @@ rails db:create Add this line to your application's Gemfile: ```ruby -group :development do - gem 'rolemodel_rails', github: 'RoleModel/rolemodel_rails' -end +gem 'rolemodel-rails', group: :development ``` And then execute: @@ -115,7 +113,7 @@ e.g. bin/new_generator testing/fantasitic_specs 'A Fantastic Testing Framework' ``` -We use the embeded Rails apps (`example_rails*`) to test generators against. They reference the rolemodel_rails gem by local path, +We use the embeded Rails apps (`example_rails_current` & `example_rails_legacy`) to test generators against. They reference the rolemodel-rails gem by local path, so you can navigate into one of them and run your generator for immediate feedback while developing. > [!IMPORTANT] @@ -146,6 +144,19 @@ RSpec.describe Rolemodel::Testing::JasminePlaywrightGenerator, type: :generator end ``` +If the generator you're testing depends on being run after another generator, you should run that one first. + +e.g. + +```ruby +RSpec.describe Rolemodel::MyGenerator, type: :generator do + before do + run_generator_against_test_app(generator: ::Rolemodel::PrereqGenerator) + run_generator_against_test_app + end +end +``` + Additional information about testing generators and the available assertions & matchers can be found at the following resources. * [Rails Guide](https://guides.rubyonrails.org/generators.html#testing-generators) diff --git a/bin/bump_version b/bin/bump_version index 3ba1ca6c..b5f991e2 100755 --- a/bin/bump_version +++ b/bin/bump_version @@ -1,7 +1,7 @@ #!/usr/bin/env ruby require 'bundler/setup' -require 'rolemodel_rails/version' +require 'rolemodel/version' require 'rake/file_list' require 'thor' @@ -17,7 +17,7 @@ class VersionBumper < Thor::Group source_root File.expand_path('../', __FILE__) def bump_version - gsub_file 'lib/rolemodel_rails/version.rb', /^ VERSION = .*/, " VERSION = '#{new_version_string}'" + gsub_file 'lib/rolemodel/version.rb', /^ VERSION = .*/, " VERSION = '#{new_version_string}'" end def update_lockfile @@ -25,11 +25,11 @@ class VersionBumper < Thor::Group end def build_gem - run 'gem build rolemodel_rails.gemspec' + run 'gem build rolemodel-rails.gemspec' end def update_current_example_app - Rake::FileList.new('example_rails*').each do |example_path| + Rake::FileList.new('example_rails_*').each do |example_path| inside(example_path) do run_clean_bundle_install end @@ -54,9 +54,9 @@ class VersionBumper < Thor::Group def current_version Gem::Version.new( if options.patch? - RolemodelRails::VERSION + '.0' + Rolemodel::VERSION + '.0' else - options[:version] || RolemodelRails::VERSION + options[:version] || Rolemodel::VERSION end ) end diff --git a/bin/console b/bin/console index 5a8a729a..b80d562f 100755 --- a/bin/console +++ b/bin/console @@ -1,7 +1,7 @@ #!/usr/bin/env ruby require "bundler/setup" -require "rolemodel_rails" +require "rolemodel-rails" # 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. diff --git a/bin/dummy_app_builder.rb b/bin/dummy_app_builder.rb new file mode 100644 index 00000000..aa8b52af --- /dev/null +++ b/bin/dummy_app_builder.rb @@ -0,0 +1,35 @@ +require "rails/generators/rails/app/app_generator" + +Rails::Generators::AppGenerator.define_method(:rails_version_specifier) do + "~> #{RAILS_VERSION}" +end + +class BuilderClass < Rails::AppBuilder + # inherit these from Rolemodel::Rails + def ruby_version = nil + def node_version = nil + + def generate_test_dummy + invoke Rails::Generators::AppGenerator, [ File.expand_path(dummy_path) ], { + dummy_app: true, + force: true, + database: 'postgresql', + javascript: 'webpack', + skip_bootsnap: true, + skip_brakeman: true, + skip_bundler_audit: true, + skip_ci: true, + skip_git: true, + skip_jbuilder: true, + skip_kamal: true, + skip_rubocop: true, + skip_solid: true, + skip_test: true, + skip_thruster: true, + } + end + + def test_dummy_config + template 'boot.rb', "#{dummy_path}/config/boot.rb", force: true + end +end diff --git a/bin/rails b/bin/rails new file mode 100755 index 00000000..82bd143f --- /dev/null +++ b/bin/rails @@ -0,0 +1,14 @@ +#!/usr/bin/env ruby +# This command will automatically be run when you run "rails" with Rails gems +# installed from the root of your application. + +ENGINE_ROOT = File.expand_path("..", __dir__) +ENGINE_PATH = File.expand_path("../lib/rolemodel/engine", __dir__) +APP_PATH = File.expand_path("../example_rails_current/config/application", __dir__) + +# Set up gems listed in the Gemfile. +ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__) +require "bundler/setup" if File.exist?(ENV["BUNDLE_GEMFILE"]) + +require "rails/all" +require "rails/engine/commands" diff --git a/bin/recreate_current_example b/bin/recreate_current_example index 6d17a224..b13a477a 100755 --- a/bin/recreate_current_example +++ b/bin/recreate_current_example @@ -1,25 +1,26 @@ -#!/usr/bin/env bash -RAILS_VERSION=`gem search ^rails$ --remote | grep -oE 'rails \((\d\.[0-9]+\.[0-9]+)\)' | head -1 | cut -d' ' -f2 | tr -d '()'` -MAJOR_VERSION_NUMBER=${RAILS_VERSION%%.*} +#!/usr/bin/env ruby -set -euo pipefail -IFS=$'\n\t' -set -vx +RAILS_VERSION = '8.1.3' -if ! gem list rails -i -v $RAILS_VERSION --silent; then - gem install rails -v $RAILS_VERSION -fi +require_relative 'dummy_app_builder' -rm -fr example_rails$MAJOR_VERSION_NUMBER +class RecreateCurrentExample < Rails::Generators::AppBase + source_root File.expand_path('templates', __dir__) -rails _"$RAILS_VERSION"_ new --skip-keeps --skip-git --skip-jbuilder -j webpack -d postgresql example_rails$MAJOR_VERSION_NUMBER + def recreate_example + shell.mute do + build(:generate_test_dummy) + build(:test_dummy_config) + end + end -cd example_rails$MAJOR_VERSION_NUMBER +private -bundle add --group development --path '..' --version '> 0.20' rolemodel_rails -bundle install + def dummy_path + @dummy_path ||= "./example_rails_current" + end -rm config/credentials.yml.enc -rm config/master.key + def get_builder_class = BuilderClass +end -cd - +RecreateCurrentExample.start(["--app-path=example_rails_current"]) diff --git a/bin/recreate_legacy_example b/bin/recreate_legacy_example index ce4de8e9..05d80698 100755 --- a/bin/recreate_legacy_example +++ b/bin/recreate_legacy_example @@ -9,13 +9,13 @@ if ! gem list rails -i -v $RAILS_VERSION --silent; then gem install rails -v $RAILS_VERSION fi -rm -fr example_rails7 +rm -fr example_rails_legacy -rails _"$RAILS_VERSION"_ new --skip-keeps --skip-git --skip-jbuilder -j webpack -d postgresql example_rails7 +rails _"$RAILS_VERSION"_ new --skip-keeps --skip-git --skip-jbuilder -j webpack -d postgresql example_rails_legacy -cd example_rails7 +cd example_rails_legacy -bundle add --group development --path '..' --version '> 0.20' rolemodel_rails +bundle add --group development --path '..' --version '>= 1.0' rolemodel-rails bundle install rm config/credentials.yml.enc diff --git a/bin/templates/boot.rb.tt b/bin/templates/boot.rb.tt new file mode 100644 index 00000000..6d349b91 --- /dev/null +++ b/bin/templates/boot.rb.tt @@ -0,0 +1,5 @@ +# Set up gems listed in the Gemfile. +ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile", __dir__) + +require "bundler/setup" if File.exist?(ENV["BUNDLE_GEMFILE"]) +$LOAD_PATH.unshift File.expand_path("../../lib", __dir__) diff --git a/example_rails8/.dockerignore b/example_rails8/.dockerignore deleted file mode 100644 index 4bbca18e..00000000 --- a/example_rails8/.dockerignore +++ /dev/null @@ -1,42 +0,0 @@ -# See https://docs.docker.com/engine/reference/builder/#dockerignore-file for more about ignoring files. - -# Ignore git directory. -/.git/ -/.gitignore - -# Ignore bundler config. -/.bundle - -# Ignore all environment files. -/.env* - -# Ignore all default key files. -/config/master.key -/config/credentials/*.key - -# Ignore all logfiles and tempfiles. -/log/* -/tmp/* - -# Ignore storage (uploaded files in development and any SQLite databases). -/storage/* - -# Ignore assets. -/node_modules/ -/app/assets/builds/* -!/app/assets/builds/.keep -/public/assets - -# Ignore CI service files. -/.github - -# Ignore Kamal files. -/config/deploy*.yml -/.kamal - -# Ignore development files -/.devcontainer - -# Ignore Docker-related files -/.dockerignore -/Dockerfile* diff --git a/example_rails8/.github/dependabot.yml b/example_rails8/.github/dependabot.yml deleted file mode 100644 index 83610cfa..00000000 --- a/example_rails8/.github/dependabot.yml +++ /dev/null @@ -1,12 +0,0 @@ -version: 2 -updates: -- package-ecosystem: bundler - directory: "/" - schedule: - interval: weekly - open-pull-requests-limit: 10 -- package-ecosystem: github-actions - directory: "/" - schedule: - interval: weekly - open-pull-requests-limit: 10 diff --git a/example_rails8/.github/workflows/ci.yml b/example_rails8/.github/workflows/ci.yml deleted file mode 100644 index dfd4f95d..00000000 --- a/example_rails8/.github/workflows/ci.yml +++ /dev/null @@ -1,137 +0,0 @@ -name: CI - -on: - pull_request: - push: - branches: [ main ] - -jobs: - scan_ruby: - runs-on: ubuntu-latest - - steps: - - name: Checkout code - uses: actions/checkout@v6 - - - name: Set up Ruby - uses: ruby/setup-ruby@v1 - with: - bundler-cache: true - - - name: Scan for common Rails security vulnerabilities using static analysis - run: bin/brakeman --no-pager - - - name: Scan for known security vulnerabilities in gems used - run: bin/bundler-audit - - lint: - runs-on: ubuntu-latest - env: - RUBOCOP_CACHE_ROOT: tmp/rubocop - steps: - - name: Checkout code - uses: actions/checkout@v6 - - - name: Set up Ruby - uses: ruby/setup-ruby@v1 - with: - bundler-cache: true - - - name: Prepare RuboCop cache - uses: actions/cache@v4 - env: - DEPENDENCIES_HASH: ${{ hashFiles('.ruby-version', '**/.rubocop.yml', '**/.rubocop_todo.yml', 'Gemfile.lock') }} - with: - path: ${{ env.RUBOCOP_CACHE_ROOT }} - key: rubocop-${{ runner.os }}-${{ env.DEPENDENCIES_HASH }}-${{ github.ref_name == github.event.repository.default_branch && github.run_id || 'default' }} - restore-keys: | - rubocop-${{ runner.os }}-${{ env.DEPENDENCIES_HASH }}- - - - name: Lint code for consistent style - run: bin/rubocop -f github - - test: - runs-on: ubuntu-latest - - services: - postgres: - image: postgres - env: - POSTGRES_USER: postgres - POSTGRES_PASSWORD: postgres - ports: - - 5432:5432 - options: --health-cmd="pg_isready" --health-interval=10s --health-timeout=5s --health-retries=3 - - # redis: - # image: valkey/valkey:8 - # ports: - # - 6379:6379 - # options: --health-cmd "redis-cli ping" --health-interval 10s --health-timeout 5s --health-retries 5 - - steps: - - name: Install packages - run: sudo apt-get update && sudo apt-get install --no-install-recommends -y libpq-dev node-gyp - - - name: Checkout code - uses: actions/checkout@v6 - - - name: Set up Ruby - uses: ruby/setup-ruby@v1 - with: - bundler-cache: true - - - name: Run tests - env: - RAILS_ENV: test - DATABASE_URL: postgres://postgres:postgres@localhost:5432 - # RAILS_MASTER_KEY: ${{ secrets.RAILS_MASTER_KEY }} - # REDIS_URL: redis://localhost:6379/0 - run: bin/rails db:test:prepare test - - system-test: - runs-on: ubuntu-latest - - services: - postgres: - image: postgres - env: - POSTGRES_USER: postgres - POSTGRES_PASSWORD: postgres - ports: - - 5432:5432 - options: --health-cmd="pg_isready" --health-interval=10s --health-timeout=5s --health-retries=3 - - # redis: - # image: valkey/valkey:8 - # ports: - # - 6379:6379 - # options: --health-cmd "redis-cli ping" --health-interval 10s --health-timeout 5s --health-retries 5 - - steps: - - name: Install packages - run: sudo apt-get update && sudo apt-get install --no-install-recommends -y libpq-dev node-gyp - - - name: Checkout code - uses: actions/checkout@v6 - - - name: Set up Ruby - uses: ruby/setup-ruby@v1 - with: - bundler-cache: true - - - name: Run System Tests - env: - RAILS_ENV: test - DATABASE_URL: postgres://postgres:postgres@localhost:5432 - # RAILS_MASTER_KEY: ${{ secrets.RAILS_MASTER_KEY }} - # REDIS_URL: redis://localhost:6379/0 - run: bin/rails db:test:prepare test:system - - - name: Keep screenshots from failed system tests - uses: actions/upload-artifact@v4 - if: failure() - with: - name: screenshots - path: ${{ github.workspace }}/tmp/screenshots - if-no-files-found: ignore diff --git a/example_rails8/.kamal/hooks/docker-setup.sample b/example_rails8/.kamal/hooks/docker-setup.sample deleted file mode 100755 index 2fb07d7d..00000000 --- a/example_rails8/.kamal/hooks/docker-setup.sample +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -echo "Docker set up on $KAMAL_HOSTS..." diff --git a/example_rails8/.kamal/hooks/post-app-boot.sample b/example_rails8/.kamal/hooks/post-app-boot.sample deleted file mode 100755 index 70f9c4bc..00000000 --- a/example_rails8/.kamal/hooks/post-app-boot.sample +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -echo "Booted app version $KAMAL_VERSION on $KAMAL_HOSTS..." diff --git a/example_rails8/.kamal/hooks/post-deploy.sample b/example_rails8/.kamal/hooks/post-deploy.sample deleted file mode 100755 index fd364c2a..00000000 --- a/example_rails8/.kamal/hooks/post-deploy.sample +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh - -# A sample post-deploy hook -# -# These environment variables are available: -# KAMAL_RECORDED_AT -# KAMAL_PERFORMER -# KAMAL_VERSION -# KAMAL_HOSTS -# KAMAL_ROLES (if set) -# KAMAL_DESTINATION (if set) -# KAMAL_RUNTIME - -echo "$KAMAL_PERFORMER deployed $KAMAL_VERSION to $KAMAL_DESTINATION in $KAMAL_RUNTIME seconds" diff --git a/example_rails8/.kamal/hooks/post-proxy-reboot.sample b/example_rails8/.kamal/hooks/post-proxy-reboot.sample deleted file mode 100755 index 1435a677..00000000 --- a/example_rails8/.kamal/hooks/post-proxy-reboot.sample +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -echo "Rebooted kamal-proxy on $KAMAL_HOSTS" diff --git a/example_rails8/.kamal/hooks/pre-app-boot.sample b/example_rails8/.kamal/hooks/pre-app-boot.sample deleted file mode 100755 index 45f73550..00000000 --- a/example_rails8/.kamal/hooks/pre-app-boot.sample +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -echo "Booting app version $KAMAL_VERSION on $KAMAL_HOSTS..." diff --git a/example_rails8/.kamal/hooks/pre-build.sample b/example_rails8/.kamal/hooks/pre-build.sample deleted file mode 100755 index c5a55678..00000000 --- a/example_rails8/.kamal/hooks/pre-build.sample +++ /dev/null @@ -1,51 +0,0 @@ -#!/bin/sh - -# A sample pre-build hook -# -# Checks: -# 1. We have a clean checkout -# 2. A remote is configured -# 3. The branch has been pushed to the remote -# 4. The version we are deploying matches the remote -# -# These environment variables are available: -# KAMAL_RECORDED_AT -# KAMAL_PERFORMER -# KAMAL_VERSION -# KAMAL_HOSTS -# KAMAL_ROLES (if set) -# KAMAL_DESTINATION (if set) - -if [ -n "$(git status --porcelain)" ]; then - echo "Git checkout is not clean, aborting..." >&2 - git status --porcelain >&2 - exit 1 -fi - -first_remote=$(git remote) - -if [ -z "$first_remote" ]; then - echo "No git remote set, aborting..." >&2 - exit 1 -fi - -current_branch=$(git branch --show-current) - -if [ -z "$current_branch" ]; then - echo "Not on a git branch, aborting..." >&2 - exit 1 -fi - -remote_head=$(git ls-remote $first_remote --tags $current_branch | cut -f1) - -if [ -z "$remote_head" ]; then - echo "Branch not pushed to remote, aborting..." >&2 - exit 1 -fi - -if [ "$KAMAL_VERSION" != "$remote_head" ]; then - echo "Version ($KAMAL_VERSION) does not match remote HEAD ($remote_head), aborting..." >&2 - exit 1 -fi - -exit 0 diff --git a/example_rails8/.kamal/hooks/pre-connect.sample b/example_rails8/.kamal/hooks/pre-connect.sample deleted file mode 100755 index 77744bdc..00000000 --- a/example_rails8/.kamal/hooks/pre-connect.sample +++ /dev/null @@ -1,47 +0,0 @@ -#!/usr/bin/env ruby - -# A sample pre-connect check -# -# Warms DNS before connecting to hosts in parallel -# -# These environment variables are available: -# KAMAL_RECORDED_AT -# KAMAL_PERFORMER -# KAMAL_VERSION -# KAMAL_HOSTS -# KAMAL_ROLES (if set) -# KAMAL_DESTINATION (if set) -# KAMAL_RUNTIME - -hosts = ENV["KAMAL_HOSTS"].split(",") -results = nil -max = 3 - -elapsed = Benchmark.realtime do - results = hosts.map do |host| - Thread.new do - tries = 1 - - begin - Socket.getaddrinfo(host, 0, Socket::AF_UNSPEC, Socket::SOCK_STREAM, nil, Socket::AI_CANONNAME) - rescue SocketError - if tries < max - puts "Retrying DNS warmup: #{host}" - tries += 1 - sleep rand - retry - else - puts "DNS warmup failed: #{host}" - host - end - end - - tries - end - end.map(&:value) -end - -retries = results.sum - hosts.size -nopes = results.count { |r| r == max } - -puts "Prewarmed %d DNS lookups in %.2f sec: %d retries, %d failures" % [ hosts.size, elapsed, retries, nopes ] diff --git a/example_rails8/.kamal/hooks/pre-deploy.sample b/example_rails8/.kamal/hooks/pre-deploy.sample deleted file mode 100755 index 05b3055b..00000000 --- a/example_rails8/.kamal/hooks/pre-deploy.sample +++ /dev/null @@ -1,122 +0,0 @@ -#!/usr/bin/env ruby - -# A sample pre-deploy hook -# -# Checks the Github status of the build, waiting for a pending build to complete for up to 720 seconds. -# -# Fails unless the combined status is "success" -# -# These environment variables are available: -# KAMAL_RECORDED_AT -# KAMAL_PERFORMER -# KAMAL_VERSION -# KAMAL_HOSTS -# KAMAL_COMMAND -# KAMAL_SUBCOMMAND -# KAMAL_ROLES (if set) -# KAMAL_DESTINATION (if set) - -# Only check the build status for production deployments -if ENV["KAMAL_COMMAND"] == "rollback" || ENV["KAMAL_DESTINATION"] != "production" - exit 0 -end - -require "bundler/inline" - -# true = install gems so this is fast on repeat invocations -gemfile(true, quiet: true) do - source "https://rubygems.org" - - gem "octokit" - gem "faraday-retry" -end - -MAX_ATTEMPTS = 72 -ATTEMPTS_GAP = 10 - -def exit_with_error(message) - $stderr.puts message - exit 1 -end - -class GithubStatusChecks - attr_reader :remote_url, :git_sha, :github_client, :combined_status - - def initialize - @remote_url = github_repo_from_remote_url - @git_sha = `git rev-parse HEAD`.strip - @github_client = Octokit::Client.new(access_token: ENV["GITHUB_TOKEN"]) - refresh! - end - - def refresh! - @combined_status = github_client.combined_status(remote_url, git_sha) - end - - def state - combined_status[:state] - end - - def first_status_url - first_status = combined_status[:statuses].find { |status| status[:state] == state } - first_status && first_status[:target_url] - end - - def complete_count - combined_status[:statuses].count { |status| status[:state] != "pending"} - end - - def total_count - combined_status[:statuses].count - end - - def current_status - if total_count > 0 - "Completed #{complete_count}/#{total_count} checks, see #{first_status_url} ..." - else - "Build not started..." - end - end - - private - def github_repo_from_remote_url - url = `git config --get remote.origin.url`.strip.delete_suffix(".git") - if url.start_with?("https://github.com/") - url.delete_prefix("https://github.com/") - elsif url.start_with?("git@github.com:") - url.delete_prefix("git@github.com:") - else - url - end - end -end - - -$stdout.sync = true - -begin - puts "Checking build status..." - - attempts = 0 - checks = GithubStatusChecks.new - - loop do - case checks.state - when "success" - puts "Checks passed, see #{checks.first_status_url}" - exit 0 - when "failure" - exit_with_error "Checks failed, see #{checks.first_status_url}" - when "pending" - attempts += 1 - end - - exit_with_error "Checks are still pending, gave up after #{MAX_ATTEMPTS * ATTEMPTS_GAP} seconds" if attempts == MAX_ATTEMPTS - - puts checks.current_status - sleep(ATTEMPTS_GAP) - checks.refresh! - end -rescue Octokit::NotFound - exit_with_error "Build status could not be found" -end diff --git a/example_rails8/.kamal/hooks/pre-proxy-reboot.sample b/example_rails8/.kamal/hooks/pre-proxy-reboot.sample deleted file mode 100755 index 061f8059..00000000 --- a/example_rails8/.kamal/hooks/pre-proxy-reboot.sample +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -echo "Rebooting kamal-proxy on $KAMAL_HOSTS..." diff --git a/example_rails8/.kamal/secrets b/example_rails8/.kamal/secrets deleted file mode 100644 index b3089d6f..00000000 --- a/example_rails8/.kamal/secrets +++ /dev/null @@ -1,20 +0,0 @@ -# Secrets defined here are available for reference under registry/password, env/secret, builder/secrets, -# and accessories/*/env/secret in config/deploy.yml. All secrets should be pulled from either -# password manager, ENV, or a file. DO NOT ENTER RAW CREDENTIALS HERE! This file needs to be safe for git. - -# Example of extracting secrets from 1password (or another compatible pw manager) -# SECRETS=$(kamal secrets fetch --adapter 1password --account your-account --from Vault/Item KAMAL_REGISTRY_PASSWORD RAILS_MASTER_KEY) -# KAMAL_REGISTRY_PASSWORD=$(kamal secrets extract KAMAL_REGISTRY_PASSWORD ${SECRETS}) -# RAILS_MASTER_KEY=$(kamal secrets extract RAILS_MASTER_KEY ${SECRETS}) - -# Example of extracting secrets from Rails credentials -# KAMAL_REGISTRY_PASSWORD=$(rails credentials:fetch kamal.registry_password) - -# Use a GITHUB_TOKEN if private repositories are needed for the image -# GITHUB_TOKEN=$(gh config get -h github.com oauth_token) - -# Grab the registry password from ENV -# KAMAL_REGISTRY_PASSWORD=$KAMAL_REGISTRY_PASSWORD - -# Improve security by using a password manager. Never check config/master.key into git! -RAILS_MASTER_KEY=$(cat config/master.key) diff --git a/example_rails8/.node-version b/example_rails8/.node-version deleted file mode 100644 index b8ffd707..00000000 --- a/example_rails8/.node-version +++ /dev/null @@ -1 +0,0 @@ -22.15.0 diff --git a/example_rails8/.rubocop.yml b/example_rails8/.rubocop.yml deleted file mode 100644 index f9d86d4a..00000000 --- a/example_rails8/.rubocop.yml +++ /dev/null @@ -1,8 +0,0 @@ -# Omakase Ruby styling for Rails -inherit_gem: { rubocop-rails-omakase: rubocop.yml } - -# Overwrite or add rules to create your own house style -# -# # Use `[a, [b, c]]` not `[ a, [ b, c ] ]` -# Layout/SpaceInsideArrayLiteralBrackets: -# Enabled: false diff --git a/example_rails8/Dockerfile b/example_rails8/Dockerfile deleted file mode 100644 index 5f9846ce..00000000 --- a/example_rails8/Dockerfile +++ /dev/null @@ -1,91 +0,0 @@ -# syntax=docker/dockerfile:1 -# check=error=true - -# This Dockerfile is designed for production, not development. Use with Kamal or build'n'run by hand: -# docker build -t example_rails8 . -# docker run -d -p 80:80 -e RAILS_MASTER_KEY= --name example_rails8 example_rails8 - -# For a containerized dev environment, see Dev Containers: https://guides.rubyonrails.org/getting_started_with_devcontainer.html - -# Make sure RUBY_VERSION matches the Ruby version in .ruby-version -ARG RUBY_VERSION=4.0.1 -FROM docker.io/library/ruby:$RUBY_VERSION-slim AS base - -# Rails app lives here -WORKDIR /rails - -# Install base packages -RUN apt-get update -qq && \ - apt-get install --no-install-recommends -y curl libjemalloc2 libvips postgresql-client && \ - ln -s /usr/lib/$(uname -m)-linux-gnu/libjemalloc.so.2 /usr/local/lib/libjemalloc.so && \ - rm -rf /var/lib/apt/lists /var/cache/apt/archives - -# Set production environment variables and enable jemalloc for reduced memory usage and latency. -ENV RAILS_ENV="production" \ - BUNDLE_DEPLOYMENT="1" \ - BUNDLE_PATH="/usr/local/bundle" \ - BUNDLE_WITHOUT="development" \ - LD_PRELOAD="/usr/local/lib/libjemalloc.so" - -# Throw-away build stage to reduce size of final image -FROM base AS build - -# Install packages needed to build gems and node modules -RUN apt-get update -qq && \ - apt-get install --no-install-recommends -y build-essential git libpq-dev libyaml-dev node-gyp pkg-config python-is-python3 && \ - rm -rf /var/lib/apt/lists /var/cache/apt/archives - -# Install JavaScript dependencies -ARG NODE_VERSION=22.15.0 -ARG YARN_VERSION=1.22.22 -ENV PATH=/usr/local/node/bin:$PATH -RUN curl -sL https://github.com/nodenv/node-build/archive/master.tar.gz | tar xz -C /tmp/ && \ - /tmp/node-build-master/bin/node-build "${NODE_VERSION}" /usr/local/node && \ - npm install -g yarn@$YARN_VERSION && \ - rm -rf /tmp/node-build-master - -# Install application gems -COPY vendor/* ./vendor/ -COPY Gemfile Gemfile.lock ./ - -RUN bundle install && \ - rm -rf ~/.bundle/ "${BUNDLE_PATH}"/ruby/*/cache "${BUNDLE_PATH}"/ruby/*/bundler/gems/*/.git && \ - # -j 1 disable parallel compilation to avoid a QEMU bug: https://github.com/rails/bootsnap/issues/495 - bundle exec bootsnap precompile -j 1 --gemfile - -# Install node modules -COPY package.json yarn.lock ./ -RUN yarn install --immutable - -# Copy application code -COPY . . - -# Precompile bootsnap code for faster boot times. -# -j 1 disable parallel compilation to avoid a QEMU bug: https://github.com/rails/bootsnap/issues/495 -RUN bundle exec bootsnap precompile -j 1 app/ lib/ - -# Precompiling assets for production without requiring secret RAILS_MASTER_KEY -RUN SECRET_KEY_BASE_DUMMY=1 ./bin/rails assets:precompile - - -RUN rm -rf node_modules - - -# Final stage for app image -FROM base - -# Run and own only the runtime files as a non-root user for security -RUN groupadd --system --gid 1000 rails && \ - useradd rails --uid 1000 --gid 1000 --create-home --shell /bin/bash -USER 1000:1000 - -# Copy built artifacts: gems, application -COPY --chown=rails:rails --from=build "${BUNDLE_PATH}" "${BUNDLE_PATH}" -COPY --chown=rails:rails --from=build /rails /rails - -# Entrypoint prepares the database. -ENTRYPOINT ["/rails/bin/docker-entrypoint"] - -# Start server via Thruster by default, this can be overwritten at runtime -EXPOSE 80 -CMD ["./bin/thrust", "./bin/rails", "server"] diff --git a/example_rails8/Gemfile.lock b/example_rails8/Gemfile.lock deleted file mode 100644 index c30c1aec..00000000 --- a/example_rails8/Gemfile.lock +++ /dev/null @@ -1,564 +0,0 @@ -PATH - remote: .. - specs: - rolemodel_rails (0.27.2) - rails (> 7.1) - -GEM - remote: https://rubygems.org/ - specs: - action_text-trix (2.1.16) - railties - actioncable (8.1.2) - actionpack (= 8.1.2) - activesupport (= 8.1.2) - nio4r (~> 2.0) - websocket-driver (>= 0.6.1) - zeitwerk (~> 2.6) - actionmailbox (8.1.2) - actionpack (= 8.1.2) - activejob (= 8.1.2) - activerecord (= 8.1.2) - activestorage (= 8.1.2) - activesupport (= 8.1.2) - mail (>= 2.8.0) - actionmailer (8.1.2) - actionpack (= 8.1.2) - actionview (= 8.1.2) - activejob (= 8.1.2) - activesupport (= 8.1.2) - mail (>= 2.8.0) - rails-dom-testing (~> 2.2) - actionpack (8.1.2) - actionview (= 8.1.2) - activesupport (= 8.1.2) - nokogiri (>= 1.8.5) - rack (>= 2.2.4) - rack-session (>= 1.0.1) - rack-test (>= 0.6.3) - rails-dom-testing (~> 2.2) - rails-html-sanitizer (~> 1.6) - useragent (~> 0.16) - actiontext (8.1.2) - action_text-trix (~> 2.1.15) - actionpack (= 8.1.2) - activerecord (= 8.1.2) - activestorage (= 8.1.2) - activesupport (= 8.1.2) - globalid (>= 0.6.0) - nokogiri (>= 1.8.5) - actionview (8.1.2) - activesupport (= 8.1.2) - builder (~> 3.1) - erubi (~> 1.11) - rails-dom-testing (~> 2.2) - rails-html-sanitizer (~> 1.6) - activejob (8.1.2) - activesupport (= 8.1.2) - globalid (>= 0.3.6) - activemodel (8.1.2) - activesupport (= 8.1.2) - activerecord (8.1.2) - activemodel (= 8.1.2) - activesupport (= 8.1.2) - timeout (>= 0.4.0) - activestorage (8.1.2) - actionpack (= 8.1.2) - activejob (= 8.1.2) - activerecord (= 8.1.2) - activesupport (= 8.1.2) - marcel (~> 1.0) - activesupport (8.1.2) - base64 - bigdecimal - concurrent-ruby (~> 1.0, >= 1.3.1) - connection_pool (>= 2.2.5) - drb - i18n (>= 1.6, < 2) - json - logger (>= 1.4.2) - minitest (>= 5.1) - securerandom (>= 0.3) - tzinfo (~> 2.0, >= 2.0.5) - uri (>= 0.13.1) - addressable (2.8.8) - public_suffix (>= 2.0.2, < 8.0) - ast (2.4.3) - base64 (0.3.0) - bcrypt_pbkdf (1.1.2) - bigdecimal (4.0.1) - bindex (0.8.1) - bootsnap (1.22.0) - msgpack (~> 1.2) - brakeman (8.0.1) - racc - builder (3.3.0) - bundler-audit (0.9.3) - bundler (>= 1.2.0) - thor (~> 1.0) - capybara (3.40.0) - addressable - matrix - mini_mime (>= 0.1.3) - nokogiri (~> 1.11) - rack (>= 1.6.0) - rack-test (>= 0.6.3) - regexp_parser (>= 1.5, < 3.0) - xpath (~> 3.2) - concurrent-ruby (1.3.6) - connection_pool (3.0.2) - crass (1.0.6) - date (3.5.1) - debug (1.11.1) - irb (~> 1.10) - reline (>= 0.3.8) - dotenv (3.2.0) - drb (2.2.3) - ed25519 (1.4.0) - erb (6.0.1) - erubi (1.13.1) - et-orbi (1.4.0) - tzinfo - ffi (1.17.3-aarch64-linux-gnu) - ffi (1.17.3-aarch64-linux-musl) - ffi (1.17.3-arm-linux-gnu) - ffi (1.17.3-arm-linux-musl) - ffi (1.17.3-arm64-darwin) - ffi (1.17.3-x86_64-linux-gnu) - ffi (1.17.3-x86_64-linux-musl) - fugit (1.12.1) - et-orbi (~> 1.4) - raabro (~> 1.4) - globalid (1.3.0) - activesupport (>= 6.1) - i18n (1.14.8) - concurrent-ruby (~> 1.0) - image_processing (1.14.0) - mini_magick (>= 4.9.5, < 6) - ruby-vips (>= 2.0.17, < 3) - io-console (0.8.2) - irb (1.16.0) - pp (>= 0.6.0) - rdoc (>= 4.0.0) - reline (>= 0.4.2) - jsbundling-rails (1.3.1) - railties (>= 6.0.0) - json (2.18.0) - kamal (2.10.1) - activesupport (>= 7.0) - base64 (~> 0.2) - bcrypt_pbkdf (~> 1.0) - concurrent-ruby (~> 1.2) - dotenv (~> 3.1) - ed25519 (~> 1.4) - net-ssh (~> 7.3) - sshkit (>= 1.23.0, < 2.0) - thor (~> 1.3) - zeitwerk (>= 2.6.18, < 3.0) - language_server-protocol (3.17.0.5) - lint_roller (1.1.0) - logger (1.7.0) - loofah (2.25.0) - crass (~> 1.0.2) - nokogiri (>= 1.12.0) - mail (2.9.0) - logger - mini_mime (>= 0.1.1) - net-imap - net-pop - net-smtp - marcel (1.1.0) - matrix (0.4.3) - mini_magick (5.3.1) - logger - mini_mime (1.1.5) - minitest (6.0.1) - prism (~> 1.5) - msgpack (1.8.0) - net-imap (0.6.2) - date - net-protocol - net-pop (0.1.2) - net-protocol - net-protocol (0.2.2) - timeout - net-scp (4.1.0) - net-ssh (>= 2.6.5, < 8.0.0) - net-sftp (4.0.0) - net-ssh (>= 5.0.0, < 8.0.0) - net-smtp (0.5.1) - net-protocol - net-ssh (7.3.0) - nio4r (2.7.5) - nokogiri (1.19.0-aarch64-linux-gnu) - racc (~> 1.4) - nokogiri (1.19.0-aarch64-linux-musl) - racc (~> 1.4) - nokogiri (1.19.0-arm-linux-gnu) - racc (~> 1.4) - nokogiri (1.19.0-arm-linux-musl) - racc (~> 1.4) - nokogiri (1.19.0-arm64-darwin) - racc (~> 1.4) - nokogiri (1.19.0-x86_64-linux-gnu) - racc (~> 1.4) - nokogiri (1.19.0-x86_64-linux-musl) - racc (~> 1.4) - ostruct (0.6.3) - parallel (1.27.0) - parser (3.3.10.1) - ast (~> 2.4.1) - racc - pg (1.6.3) - pg (1.6.3-aarch64-linux) - pg (1.6.3-aarch64-linux-musl) - pg (1.6.3-arm64-darwin) - pg (1.6.3-x86_64-linux) - pg (1.6.3-x86_64-linux-musl) - pp (0.6.3) - prettyprint - prettyprint (0.2.0) - prism (1.9.0) - propshaft (1.3.1) - actionpack (>= 7.0.0) - activesupport (>= 7.0.0) - rack - psych (5.3.1) - date - stringio - public_suffix (7.0.2) - puma (7.2.0) - nio4r (~> 2.0) - raabro (1.4.0) - racc (1.8.1) - rack (3.2.4) - rack-session (2.1.1) - base64 (>= 0.1.0) - rack (>= 3.0.0) - rack-test (2.2.0) - rack (>= 1.3) - rackup (2.3.1) - rack (>= 3) - rails (8.1.2) - actioncable (= 8.1.2) - actionmailbox (= 8.1.2) - actionmailer (= 8.1.2) - actionpack (= 8.1.2) - actiontext (= 8.1.2) - actionview (= 8.1.2) - activejob (= 8.1.2) - activemodel (= 8.1.2) - activerecord (= 8.1.2) - activestorage (= 8.1.2) - activesupport (= 8.1.2) - bundler (>= 1.15.0) - railties (= 8.1.2) - rails-dom-testing (2.3.0) - activesupport (>= 5.0.0) - minitest - nokogiri (>= 1.6) - rails-html-sanitizer (1.6.2) - loofah (~> 2.21) - nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0) - railties (8.1.2) - actionpack (= 8.1.2) - activesupport (= 8.1.2) - irb (~> 1.13) - rackup (>= 1.0.0) - rake (>= 12.2) - thor (~> 1.0, >= 1.2.2) - tsort (>= 0.2) - zeitwerk (~> 2.6) - rainbow (3.1.1) - rake (13.3.1) - rdoc (7.1.0) - erb - psych (>= 4.0.0) - tsort - regexp_parser (2.11.3) - reline (0.6.3) - io-console (~> 0.5) - rexml (3.4.4) - rubocop (1.84.1) - 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.49.0, < 2.0) - ruby-progressbar (~> 1.7) - unicode-display_width (>= 2.4.0, < 4.0) - rubocop-ast (1.49.0) - parser (>= 3.3.7.2) - prism (~> 1.7) - rubocop-performance (1.26.1) - lint_roller (~> 1.1) - rubocop (>= 1.75.0, < 2.0) - rubocop-ast (>= 1.47.1, < 2.0) - rubocop-rails (2.34.3) - activesupport (>= 4.2.0) - lint_roller (~> 1.1) - rack (>= 1.1) - rubocop (>= 1.75.0, < 2.0) - rubocop-ast (>= 1.44.0, < 2.0) - rubocop-rails-omakase (1.1.0) - rubocop (>= 1.72) - rubocop-performance (>= 1.24) - rubocop-rails (>= 2.30) - ruby-progressbar (1.13.0) - ruby-vips (2.3.0) - ffi (~> 1.12) - logger - rubyzip (3.2.2) - securerandom (0.4.1) - selenium-webdriver (4.40.0) - base64 (~> 0.2) - logger (~> 1.4) - rexml (~> 3.2, >= 3.2.5) - rubyzip (>= 1.2.2, < 4.0) - websocket (~> 1.0) - solid_cable (3.0.12) - actioncable (>= 7.2) - activejob (>= 7.2) - activerecord (>= 7.2) - railties (>= 7.2) - solid_cache (1.0.10) - activejob (>= 7.2) - activerecord (>= 7.2) - railties (>= 7.2) - solid_queue (1.3.1) - activejob (>= 7.1) - activerecord (>= 7.1) - concurrent-ruby (>= 1.3.1) - fugit (~> 1.11) - railties (>= 7.1) - thor (>= 1.3.1) - sshkit (1.25.0) - base64 - logger - net-scp (>= 1.1.2) - net-sftp (>= 2.1.2) - net-ssh (>= 2.8.0) - ostruct - stimulus-rails (1.3.4) - railties (>= 6.0.0) - stringio (3.2.0) - thor (1.5.0) - thruster (0.1.18) - thruster (0.1.18-aarch64-linux) - thruster (0.1.18-arm64-darwin) - thruster (0.1.18-x86_64-linux) - timeout (0.6.0) - tsort (0.2.0) - turbo-rails (2.0.23) - actionpack (>= 7.1.0) - railties (>= 7.1.0) - tzinfo (2.0.6) - concurrent-ruby (~> 1.0) - unicode-display_width (3.2.0) - unicode-emoji (~> 4.1) - unicode-emoji (4.2.0) - uri (1.1.1) - useragent (0.16.11) - web-console (4.2.1) - actionview (>= 6.0.0) - activemodel (>= 6.0.0) - bindex (>= 0.4.0) - railties (>= 6.0.0) - websocket (1.2.11) - websocket-driver (0.8.0) - base64 - websocket-extensions (>= 0.1.0) - websocket-extensions (0.1.5) - xpath (3.2.0) - nokogiri (~> 1.8) - zeitwerk (2.7.4) - -PLATFORMS - aarch64-linux - aarch64-linux-gnu - aarch64-linux-musl - arm-linux-gnu - arm-linux-musl - arm64-darwin-23 - arm64-darwin-24 - arm64-darwin-25 - x86_64-linux - x86_64-linux-gnu - x86_64-linux-musl - -DEPENDENCIES - bootsnap - brakeman - bundler-audit - capybara - debug - image_processing (~> 1.2) - jsbundling-rails - kamal - pg (~> 1.1) - propshaft - puma (>= 5.0) - rails (~> 8.1.2) - rolemodel_rails (> 0.20)! - rubocop-rails-omakase - selenium-webdriver - solid_cable - solid_cache - solid_queue - stimulus-rails - thruster - turbo-rails - tzinfo-data - web-console - -CHECKSUMS - action_text-trix (2.1.16) sha256=f645a2c21821b8449fd1d6770708f4031c91a2eedf9ef476e9be93c64e703a8a - actioncable (8.1.2) sha256=dc31efc34cca9cdefc5c691ddb8b4b214c0ea5cd1372108cbc1377767fb91969 - actionmailbox (8.1.2) sha256=058b2fb1980e5d5a894f675475fcfa45c62631103d5a2596d9610ec81581889b - actionmailer (8.1.2) sha256=f4c1d2060f653bfe908aa7fdc5a61c0e5279670de992146582f2e36f8b9175e9 - actionpack (8.1.2) sha256=ced74147a1f0daafaa4bab7f677513fd4d3add574c7839958f7b4f1de44f8423 - actiontext (8.1.2) sha256=0bf57da22a9c19d970779c3ce24a56be31b51c7640f2763ec64aa72e358d2d2d - actionview (8.1.2) sha256=80455b2588911c9b72cec22d240edacb7c150e800ef2234821269b2b2c3e2e5b - activejob (8.1.2) sha256=908dab3713b101859536375819f4156b07bdf4c232cc645e7538adb9e302f825 - activemodel (8.1.2) sha256=e21358c11ce68aed3f9838b7e464977bc007b4446c6e4059781e1d5c03bcf33e - activerecord (8.1.2) sha256=acfbe0cadfcc50fa208011fe6f4eb01cae682ebae0ef57145ba45380c74bcc44 - activestorage (8.1.2) sha256=8a63a48c3999caeee26a59441f813f94681fc35cc41aba7ce1f836add04fba76 - activesupport (8.1.2) sha256=88842578ccd0d40f658289b0e8c842acfe9af751afee2e0744a7873f50b6fdae - addressable (2.8.8) sha256=7c13b8f9536cf6364c03b9d417c19986019e28f7c00ac8132da4eb0fe393b057 - ast (2.4.3) sha256=954615157c1d6a382bc27d690d973195e79db7f55e9765ac7c481c60bdb4d383 - base64 (0.3.0) sha256=27337aeabad6ffae05c265c450490628ef3ebd4b67be58257393227588f5a97b - bcrypt_pbkdf (1.1.2) sha256=c2414c23ce66869b3eb9f643d6a3374d8322dfb5078125c82792304c10b94cf6 - bigdecimal (4.0.1) sha256=8b07d3d065a9f921c80ceaea7c9d4ae596697295b584c296fe599dd0ad01c4a7 - bindex (0.8.1) sha256=7b1ecc9dc539ed8bccfc8cb4d2732046227b09d6f37582ff12e50a5047ceb17e - bootsnap (1.22.0) sha256=5820c9d42c2efef095bee6565484bdc511f1223bf950140449c9385ae775793e - brakeman (8.0.1) sha256=c68ce0ac35a6295027c4eab8b4ac597d2a0bfc82f0d62dcd334bbf944d352f70 - builder (3.3.0) sha256=497918d2f9dca528fdca4b88d84e4ef4387256d984b8154e9d5d3fe5a9c8835f - bundler-audit (0.9.3) sha256=81c8766c71e47d0d28a0f98c7eed028539f21a6ea3cd8f685eb6f42333c9b4e9 - capybara (3.40.0) sha256=42dba720578ea1ca65fd7a41d163dd368502c191804558f6e0f71b391054aeef - concurrent-ruby (1.3.6) sha256=6b56837e1e7e5292f9864f34b69c5a2cbc75c0cf5338f1ce9903d10fa762d5ab - connection_pool (3.0.2) sha256=33fff5ba71a12d2aa26cb72b1db8bba2a1a01823559fb01d29eb74c286e62e0a - crass (1.0.6) sha256=dc516022a56e7b3b156099abc81b6d2b08ea1ed12676ac7a5657617f012bd45d - date (3.5.1) sha256=750d06384d7b9c15d562c76291407d89e368dda4d4fff957eb94962d325a0dc0 - debug (1.11.1) sha256=2e0b0ac6119f2207a6f8ac7d4a73ca8eb4e440f64da0a3136c30343146e952b6 - dotenv (3.2.0) sha256=e375b83121ea7ca4ce20f214740076129ab8514cd81378161f11c03853fe619d - drb (2.2.3) sha256=0b00d6fdb50995fe4a45dea13663493c841112e4068656854646f418fda13373 - ed25519 (1.4.0) sha256=16e97f5198689a154247169f3453ef4cfd3f7a47481fde0ae33206cdfdcac506 - erb (6.0.1) sha256=28ecdd99c5472aebd5674d6061e3c6b0a45c049578b071e5a52c2a7f13c197e5 - erubi (1.13.1) sha256=a082103b0885dbc5ecf1172fede897f9ebdb745a4b97a5e8dc63953db1ee4ad9 - et-orbi (1.4.0) sha256=6c7e3c90779821f9e3b324c5e96fda9767f72995d6ae435b96678a4f3e2de8bc - ffi (1.17.3-aarch64-linux-gnu) sha256=28ad573df26560f0aedd8a90c3371279a0b2bd0b4e834b16a2baa10bd7a97068 - ffi (1.17.3-aarch64-linux-musl) sha256=020b33b76775b1abacc3b7d86b287cef3251f66d747092deec592c7f5df764b2 - ffi (1.17.3-arm-linux-gnu) sha256=5bd4cea83b68b5ec0037f99c57d5ce2dd5aa438f35decc5ef68a7d085c785668 - ffi (1.17.3-arm-linux-musl) sha256=0d7626bb96265f9af78afa33e267d71cfef9d9a8eb8f5525344f8da6c7d76053 - ffi (1.17.3-arm64-darwin) sha256=0c690555d4cee17a7f07c04d59df39b2fba74ec440b19da1f685c6579bb0717f - ffi (1.17.3-x86_64-linux-gnu) sha256=3746b01f677aae7b16dc1acb7cb3cc17b3e35bdae7676a3f568153fb0e2c887f - ffi (1.17.3-x86_64-linux-musl) sha256=086b221c3a68320b7564066f46fed23449a44f7a1935f1fe5a245bd89d9aea56 - fugit (1.12.1) sha256=5898f478ede9b415f0804e42b8f3fd53f814bd85eebffceebdbc34e1107aaf68 - globalid (1.3.0) sha256=05c639ad6eb4594522a0b07983022f04aa7254626ab69445a0e493aa3786ff11 - i18n (1.14.8) sha256=285778639134865c5e0f6269e0b818256017e8cde89993fdfcbfb64d088824a5 - image_processing (1.14.0) sha256=754cc169c9c262980889bec6bfd325ed1dafad34f85242b5a07b60af004742fb - io-console (0.8.2) sha256=d6e3ae7a7cc7574f4b8893b4fca2162e57a825b223a177b7afa236c5ef9814cc - irb (1.16.0) sha256=2abe56c9ac947cdcb2f150572904ba798c1e93c890c256f8429981a7675b0806 - jsbundling-rails (1.3.1) sha256=0fa03f6d051c694cbf55a022d8be53399879f2c4cf38b2968f86379c62b1c2ca - json (2.18.0) sha256=b10506aee4183f5cf49e0efc48073d7b75843ce3782c68dbeb763351c08fd505 - kamal (2.10.1) sha256=53b7ecb4c33dd83b1aedfc7aacd1c059f835993258a552d70d584c6ce32b6340 - language_server-protocol (3.17.0.5) sha256=fd1e39a51a28bf3eec959379985a72e296e9f9acfce46f6a79d31ca8760803cc - lint_roller (1.1.0) sha256=2c0c845b632a7d172cb849cc90c1bce937a28c5c8ccccb50dfd46a485003cc87 - logger (1.7.0) sha256=196edec7cc44b66cfb40f9755ce11b392f21f7967696af15d274dde7edff0203 - loofah (2.25.0) sha256=df5ed7ac3bac6a4ec802df3877ee5cc86d027299f8952e6243b3dac446b060e6 - mail (2.9.0) sha256=6fa6673ecd71c60c2d996260f9ee3dd387d4673b8169b502134659ece6d34941 - marcel (1.1.0) sha256=fdcfcfa33cc52e93c4308d40e4090a5d4ea279e160a7f6af988260fa970e0bee - matrix (0.4.3) sha256=a0d5ab7ddcc1973ff690ab361b67f359acbb16958d1dc072b8b956a286564c5b - mini_magick (5.3.1) sha256=29395dfd76badcabb6403ee5aff6f681e867074f8f28ce08d78661e9e4a351c4 - mini_mime (1.1.5) sha256=8681b7e2e4215f2a159f9400b5816d85e9d8c6c6b491e96a12797e798f8bccef - minitest (6.0.1) sha256=7854c74f48e2e975969062833adc4013f249a4b212f5e7b9d5c040bf838d54bb - msgpack (1.8.0) sha256=e64ce0212000d016809f5048b48eb3a65ffb169db22238fb4b72472fecb2d732 - net-imap (0.6.2) sha256=08caacad486853c61676cca0c0c47df93db02abc4a8239a8b67eb0981428acc6 - net-pop (0.1.2) sha256=848b4e982013c15b2f0382792268763b748cce91c9e91e36b0f27ed26420dff3 - net-protocol (0.2.2) sha256=aa73e0cba6a125369de9837b8d8ef82a61849360eba0521900e2c3713aa162a8 - net-scp (4.1.0) sha256=a99b0b92a1e5d360b0de4ffbf2dc0c91531502d3d4f56c28b0139a7c093d1a5d - net-sftp (4.0.0) sha256=65bb91c859c2f93b09826757af11b69af931a3a9155050f50d1b06d384526364 - net-smtp (0.5.1) sha256=ed96a0af63c524fceb4b29b0d352195c30d82dd916a42f03c62a3a70e5b70736 - net-ssh (7.3.0) sha256=172076c4b30ce56fb25a03961b0c4da14e1246426401b0f89cba1a3b54bf3ef0 - nio4r (2.7.5) sha256=6c90168e48fb5f8e768419c93abb94ba2b892a1d0602cb06eef16d8b7df1dca1 - nokogiri (1.19.0-aarch64-linux-gnu) sha256=11a97ecc3c0e7e5edcf395720b10860ef493b768f6aa80c539573530bc933767 - nokogiri (1.19.0-aarch64-linux-musl) sha256=eb70507f5e01bc23dad9b8dbec2b36ad0e61d227b42d292835020ff754fb7ba9 - nokogiri (1.19.0-arm-linux-gnu) sha256=572a259026b2c8b7c161fdb6469fa2d0edd2b61cd599db4bbda93289abefbfe5 - nokogiri (1.19.0-arm-linux-musl) sha256=23ed90922f1a38aed555d3de4d058e90850c731c5b756d191b3dc8055948e73c - nokogiri (1.19.0-arm64-darwin) sha256=0811dfd936d5f6dd3f6d32ef790568bf29b2b7bead9ba68866847b33c9cf5810 - nokogiri (1.19.0-x86_64-linux-gnu) sha256=f482b95c713d60031d48c44ce14562f8d2ce31e3a9e8dd0ccb131e9e5a68b58c - nokogiri (1.19.0-x86_64-linux-musl) sha256=1c4ca6b381622420073ce6043443af1d321e8ed93cc18b08e2666e5bd02ffae4 - ostruct (0.6.3) sha256=95a2ed4a4bd1d190784e666b47b2d3f078e4a9efda2fccf18f84ddc6538ed912 - parallel (1.27.0) sha256=4ac151e1806b755fb4e2dc2332cbf0e54f2e24ba821ff2d3dcf86bf6dc4ae130 - parser (3.3.10.1) sha256=06f6a725d2cd91e5e7f2b7c32ba143631e1f7c8ae2fb918fc4cebec187e6a688 - pg (1.6.3) sha256=1388d0563e13d2758c1089e35e973a3249e955c659592d10e5b77c468f628a99 - pg (1.6.3-aarch64-linux) sha256=0698ad563e02383c27510b76bf7d4cd2de19cd1d16a5013f375dd473e4be72ea - pg (1.6.3-aarch64-linux-musl) sha256=06a75f4ea04b05140146f2a10550b8e0d9f006a79cdaf8b5b130cde40e3ecc2c - pg (1.6.3-arm64-darwin) sha256=7240330b572e6355d7c75a7de535edb5dfcbd6295d9c7777df4d9dddfb8c0e5f - pg (1.6.3-x86_64-linux) sha256=5d9e188c8f7a0295d162b7b88a768d8452a899977d44f3274d1946d67920ae8d - pg (1.6.3-x86_64-linux-musl) sha256=9c9c90d98c72f78eb04c0f55e9618fe55d1512128e411035fe229ff427864009 - pp (0.6.3) sha256=2951d514450b93ccfeb1df7d021cae0da16e0a7f95ee1e2273719669d0ab9df6 - prettyprint (0.2.0) sha256=2bc9e15581a94742064a3cc8b0fb9d45aae3d03a1baa6ef80922627a0766f193 - prism (1.9.0) sha256=7b530c6a9f92c24300014919c9dcbc055bf4cdf51ec30aed099b06cd6674ef85 - propshaft (1.3.1) sha256=9acc664ef67e819ffa3d95bd7ad4c3623ea799110c5f4dee67fa7e583e74c392 - psych (5.3.1) sha256=eb7a57cef10c9d70173ff74e739d843ac3b2c019a003de48447b2963d81b1974 - public_suffix (7.0.2) sha256=9114090c8e4e7135c1fd0e7acfea33afaab38101884320c65aaa0ffb8e26a857 - puma (7.2.0) sha256=bf8ef4ab514a4e6d4554cb4326b2004eba5036ae05cf765cfe51aba9706a72a8 - raabro (1.4.0) sha256=d4fa9ff5172391edb92b242eed8be802d1934b1464061ae5e70d80962c5da882 - racc (1.8.1) sha256=4a7f6929691dbec8b5209a0b373bc2614882b55fc5d2e447a21aaa691303d62f - rack (3.2.4) sha256=5d74b6f75082a643f43c1e76b419c40f0e5527fcfee1e669ac1e6b73c0ccb6f6 - rack-session (2.1.1) sha256=0b6dc07dea7e4b583f58a48e8b806d4c9f1c6c9214ebc202ec94562cbea2e4e9 - rack-test (2.2.0) sha256=005a36692c306ac0b4a9350355ee080fd09ddef1148a5f8b2ac636c720f5c463 - rackup (2.3.1) sha256=6c79c26753778e90983761d677a48937ee3192b3ffef6bc963c0950f94688868 - rails (8.1.2) sha256=5069061b23dfa8706b9f0159ae8b9d35727359103178a26962b868a680ba7d95 - rails-dom-testing (2.3.0) sha256=8acc7953a7b911ca44588bf08737bc16719f431a1cc3091a292bca7317925c1d - rails-html-sanitizer (1.6.2) sha256=35fce2ca8242da8775c83b6ba9c1bcaad6751d9eb73c1abaa8403475ab89a560 - railties (8.1.2) sha256=1289ece76b4f7668fc46d07e55cc992b5b8751f2ad85548b7da351b8c59f8055 - rainbow (3.1.1) sha256=039491aa3a89f42efa1d6dec2fc4e62ede96eb6acd95e52f1ad581182b79bc6a - rake (13.3.1) sha256=8c9e89d09f66a26a01264e7e3480ec0607f0c497a861ef16063604b1b08eb19c - rdoc (7.1.0) sha256=494899df0706c178596ca6e1d50f1b7eb285a9b2aae715be5abd742734f17363 - regexp_parser (2.11.3) sha256=ca13f381a173b7a93450e53459075c9b76a10433caadcb2f1180f2c741fc55a4 - reline (0.6.3) sha256=1198b04973565b36ec0f11542ab3f5cfeeec34823f4e54cebde90968092b1835 - rexml (3.4.4) sha256=19e0a2c3425dfbf2d4fc1189747bdb2f849b6c5e74180401b15734bc97b5d142 - rolemodel_rails (0.27.2) - rubocop (1.84.1) sha256=14cc626f355141f5a2ef53c10a68d66b13bb30639b26370a76559096cc6bcc1a - rubocop-ast (1.49.0) sha256=49c3676d3123a0923d333e20c6c2dbaaae2d2287b475273fddee0c61da9f71fd - rubocop-performance (1.26.1) sha256=cd19b936ff196df85829d264b522fd4f98b6c89ad271fa52744a8c11b8f71834 - rubocop-rails (2.34.3) sha256=10d37989024865ecda8199f311f3faca990143fbac967de943f88aca11eb9ad2 - rubocop-rails-omakase (1.1.0) sha256=2af73ac8ee5852de2919abbd2618af9c15c19b512c4cfc1f9a5d3b6ef009109d - ruby-progressbar (1.13.0) sha256=80fc9c47a9b640d6834e0dc7b3c94c9df37f08cb072b7761e4a71e22cff29b33 - ruby-vips (2.3.0) sha256=e685ec02c13969912debbd98019e50492e12989282da5f37d05f5471442f5374 - rubyzip (3.2.2) sha256=c0ed99385f0625415c8f05bcae33fe649ed2952894a95ff8b08f26ca57ea5b3c - securerandom (0.4.1) sha256=cc5193d414a4341b6e225f0cb4446aceca8e50d5e1888743fac16987638ea0b1 - selenium-webdriver (4.40.0) sha256=16ef7aa9853c1d4b9d52eac45aafa916e3934c5c83cb4facb03f250adfd15e5b - solid_cable (3.0.12) sha256=a168a54731a455d5627af48d8441ea3b554b8c1f6e6cd6074109de493e6b0460 - solid_cache (1.0.10) sha256=bc05a2fb3ac78a6f43cbb5946679cf9db67dd30d22939ededc385cb93e120d41 - solid_queue (1.3.1) sha256=d9580111180c339804ff1a810a7768f69f5dc694d31e86cf1535ff2cd7a87428 - sshkit (1.25.0) sha256=c8c6543cdb60f91f1d277306d585dd11b6a064cb44eab0972827e4311ff96744 - stimulus-rails (1.3.4) sha256=765676ffa1f33af64ce026d26b48e8ffb2e0b94e0f50e9119e11d6107d67cb06 - stringio (3.2.0) sha256=c37cb2e58b4ffbd33fe5cd948c05934af997b36e0b6ca6fdf43afa234cf222e1 - thor (1.5.0) sha256=e3a9e55fe857e44859ce104a84675ab6e8cd59c650a49106a05f55f136425e73 - thruster (0.1.18) sha256=f025103bc7c8e6747436bb9de058c366840d2871560574ea7070a9bc8608a889 - thruster (0.1.18-aarch64-linux) sha256=16f3d49468d76a9a5de86b7bdedf535b7b80da7c16495ca8ec96cfdc256870e2 - thruster (0.1.18-arm64-darwin) sha256=8b297797a354ec6a81ea156b44279b66bff8da2404112f70f4ec515c2f276cc2 - thruster (0.1.18-x86_64-linux) sha256=0ec1ff5f12289c1ac10cf8e28ce6b5266f4e73416b34a664b79d037c7d955c40 - timeout (0.6.0) sha256=6d722ad619f96ee383a0c557ec6eb8c4ecb08af3af62098a0be5057bf00de1af - tsort (0.2.0) sha256=9650a793f6859a43b6641671278f79cfead60ac714148aabe4e3f0060480089f - turbo-rails (2.0.23) sha256=ee0d90733aafff056cf51ff11e803d65e43cae258cc55f6492020ec1f9f9315f - tzinfo (2.0.6) sha256=8daf828cc77bcf7d63b0e3bdb6caa47e2272dcfaf4fbfe46f8c3a9df087a829b - unicode-display_width (3.2.0) sha256=0cdd96b5681a5949cdbc2c55e7b420facae74c4aaf9a9815eee1087cb1853c42 - unicode-emoji (4.2.0) sha256=519e69150f75652e40bf736106cfbc8f0f73aa3fb6a65afe62fefa7f80b0f80f - uri (1.1.1) sha256=379fa58d27ffb1387eaada68c749d1426738bd0f654d812fcc07e7568f5c57c6 - useragent (0.16.11) sha256=700e6413ad4bb954bb63547fa098dddf7b0ebe75b40cc6f93b8d54255b173844 - web-console (4.2.1) sha256=e7bcf37a10ea2b4ec4281649d1cee461b32232d0a447e82c786e6841fd22fe20 - websocket (1.2.11) sha256=b7e7a74e2410b5e85c25858b26b3322f29161e300935f70a0e0d3c35e0462737 - websocket-driver (0.8.0) sha256=ed0dba4b943c22f17f9a734817e808bc84cdce6a7e22045f5315aa57676d4962 - websocket-extensions (0.1.5) sha256=1c6ba63092cda343eb53fc657110c71c754c56484aad42578495227d717a8241 - xpath (3.2.0) sha256=6dfda79d91bb3b949b947ecc5919f042ef2f399b904013eb3ef6d20dd3a4082e - zeitwerk (2.7.4) sha256=2bef90f356bdafe9a6c2bd32bcd804f83a4f9b8bc27f3600fff051eb3edcec8b - -BUNDLED WITH - 4.0.5 diff --git a/example_rails8/bin/brakeman b/example_rails8/bin/brakeman deleted file mode 100755 index ace1c9ba..00000000 --- a/example_rails8/bin/brakeman +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env ruby -require "rubygems" -require "bundler/setup" - -ARGV.unshift("--ensure-latest") - -load Gem.bin_path("brakeman", "brakeman") diff --git a/example_rails8/bin/bundler-audit b/example_rails8/bin/bundler-audit deleted file mode 100755 index e2ef2269..00000000 --- a/example_rails8/bin/bundler-audit +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env ruby -require_relative "../config/boot" -require "bundler/audit/cli" - -ARGV.concat %w[ --config config/bundler-audit.yml ] if ARGV.empty? || ARGV.include?("check") -Bundler::Audit::CLI.start diff --git a/example_rails8/bin/docker-entrypoint b/example_rails8/bin/docker-entrypoint deleted file mode 100755 index ed31659f..00000000 --- a/example_rails8/bin/docker-entrypoint +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash -e - -# If running the rails server then create or migrate existing database -if [ "${@: -2:1}" == "./bin/rails" ] && [ "${@: -1:1}" == "server" ]; then - ./bin/rails db:prepare -fi - -exec "${@}" diff --git a/example_rails8/bin/jobs b/example_rails8/bin/jobs deleted file mode 100755 index dcf59f30..00000000 --- a/example_rails8/bin/jobs +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env ruby - -require_relative "../config/environment" -require "solid_queue/cli" - -SolidQueue::Cli.start(ARGV) diff --git a/example_rails8/bin/kamal b/example_rails8/bin/kamal deleted file mode 100755 index d9ba2767..00000000 --- a/example_rails8/bin/kamal +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env ruby -# frozen_string_literal: true - -# -# This file was generated by Bundler. -# -# The application 'kamal' is installed as part of a gem, and -# this file is here to facilitate running it. -# - -ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__) - -require "rubygems" -require "bundler/setup" - -load Gem.bin_path("kamal", "kamal") diff --git a/example_rails8/bin/rubocop b/example_rails8/bin/rubocop deleted file mode 100755 index 5a205047..00000000 --- a/example_rails8/bin/rubocop +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env ruby -require "rubygems" -require "bundler/setup" - -# Explicit RuboCop config increases performance slightly while avoiding config confusion. -ARGV.unshift("--config", File.expand_path("../.rubocop.yml", __dir__)) - -load Gem.bin_path("rubocop", "rubocop") diff --git a/example_rails8/bin/thrust b/example_rails8/bin/thrust deleted file mode 100755 index 36bde2d8..00000000 --- a/example_rails8/bin/thrust +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/env ruby -require "rubygems" -require "bundler/setup" - -load Gem.bin_path("thruster", "thrust") diff --git a/example_rails8/config/boot.rb b/example_rails8/config/boot.rb deleted file mode 100644 index 988a5ddc..00000000 --- a/example_rails8/config/boot.rb +++ /dev/null @@ -1,4 +0,0 @@ -ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__) - -require "bundler/setup" # Set up gems listed in the Gemfile. -require "bootsnap/setup" # Speed up boot time by caching expensive operations. diff --git a/example_rails8/config/bundler-audit.yml b/example_rails8/config/bundler-audit.yml deleted file mode 100644 index e74b3af9..00000000 --- a/example_rails8/config/bundler-audit.yml +++ /dev/null @@ -1,5 +0,0 @@ -# Audit all gems listed in the Gemfile for known security problems by running bin/bundler-audit. -# CVEs that are not relevant to the application can be enumerated on the ignore list below. - -ignore: - - CVE-THAT-DOES-NOT-APPLY diff --git a/example_rails8/config/cable.yml b/example_rails8/config/cable.yml deleted file mode 100644 index b9adc5aa..00000000 --- a/example_rails8/config/cable.yml +++ /dev/null @@ -1,17 +0,0 @@ -# Async adapter only works within the same process, so for manually triggering cable updates from a console, -# and seeing results in the browser, you must do so from the web console (running inside the dev process), -# not a terminal started via bin/rails console! Add "console" to any action or any ERB template view -# to make the web console appear. -development: - adapter: async - -test: - adapter: test - -production: - adapter: solid_cable - connects_to: - database: - writing: cable - polling_interval: 0.1.seconds - message_retention: 1.day diff --git a/example_rails8/config/cache.yml b/example_rails8/config/cache.yml deleted file mode 100644 index 19d49084..00000000 --- a/example_rails8/config/cache.yml +++ /dev/null @@ -1,16 +0,0 @@ -default: &default - store_options: - # Cap age of oldest cache entry to fulfill retention policies - # max_age: <%= 60.days.to_i %> - max_size: <%= 256.megabytes %> - namespace: <%= Rails.env %> - -development: - <<: *default - -test: - <<: *default - -production: - database: cache - <<: *default diff --git a/example_rails8/config/deploy.yml b/example_rails8/config/deploy.yml deleted file mode 100644 index 545025d9..00000000 --- a/example_rails8/config/deploy.yml +++ /dev/null @@ -1,119 +0,0 @@ -# Name of your application. Used to uniquely configure containers. -service: example_rails8 - -# Name of the container image (use your-user/app-name on external registries). -image: example_rails8 - -# Deploy to these servers. -servers: - web: - - 192.168.0.1 - # job: - # hosts: - # - 192.168.0.1 - # cmd: bin/jobs - -# Enable SSL auto certification via Let's Encrypt and allow for multiple apps on a single web server. -# If used with Cloudflare, set encryption mode in SSL/TLS setting to "Full" to enable CF-to-app encryption. -# -# Using an SSL proxy like this requires turning on config.assume_ssl and config.force_ssl in production.rb! -# -# Don't use this when deploying to multiple web servers (then you have to terminate SSL at your load balancer). -# -# proxy: -# ssl: true -# host: app.example.com - -# Where you keep your container images. -registry: - # Alternatives: hub.docker.com / registry.digitalocean.com / ghcr.io / ... - server: localhost:5555 - - # Needed for authenticated registries. - # username: your-user - - # Always use an access token rather than real password when possible. - # password: - # - KAMAL_REGISTRY_PASSWORD - -# Inject ENV variables into containers (secrets come from .kamal/secrets). -env: - secret: - - RAILS_MASTER_KEY - clear: - # Run the Solid Queue Supervisor inside the web server's Puma process to do jobs. - # When you start using multiple servers, you should split out job processing to a dedicated machine. - SOLID_QUEUE_IN_PUMA: true - - # Set number of processes dedicated to Solid Queue (default: 1) - # JOB_CONCURRENCY: 3 - - # Set number of cores available to the application on each server (default: 1). - # WEB_CONCURRENCY: 2 - - # Match this to any external database server to configure Active Record correctly - # Use example_rails8-db for a db accessory server on same machine via local kamal docker network. - # DB_HOST: 192.168.0.2 - - # Log everything from Rails - # RAILS_LOG_LEVEL: debug - -# Aliases are triggered with "bin/kamal ". You can overwrite arguments on invocation: -# "bin/kamal logs -r job" will tail logs from the first server in the job section. -aliases: - console: app exec --interactive --reuse "bin/rails console" - shell: app exec --interactive --reuse "bash" - logs: app logs -f - dbc: app exec --interactive --reuse "bin/rails dbconsole --include-password" - -# Use a persistent storage volume for sqlite database files and local Active Storage files. -# Recommended to change this to a mounted volume path that is backed up off server. -volumes: - - "example_rails8_storage:/rails/storage" - -# Bridge fingerprinted assets, like JS and CSS, between versions to avoid -# hitting 404 on in-flight requests. Combines all files from new and old -# version inside the asset_path. -asset_path: /rails/public/assets - -# Configure the image builder. -builder: - arch: amd64 - - # # Build image via remote server (useful for faster amd64 builds on arm64 computers) - # remote: ssh://docker@docker-builder-server - # - # # Pass arguments and secrets to the Docker build process - # args: - # RUBY_VERSION: 4.0.1 - # secrets: - # - GITHUB_TOKEN - # - RAILS_MASTER_KEY - -# Use a different ssh user than root -# ssh: -# user: app - -# Use accessory services (secrets come from .kamal/secrets). -# accessories: -# db: -# image: mysql:8.0 -# host: 192.168.0.2 -# # Change to 3306 to expose port to the world instead of just local network. -# port: "127.0.0.1:3306:3306" -# env: -# clear: -# MYSQL_ROOT_HOST: '%' -# secret: -# - MYSQL_ROOT_PASSWORD -# files: -# - config/mysql/production.cnf:/etc/mysql/my.cnf -# - db/production.sql:/docker-entrypoint-initdb.d/setup.sql -# directories: -# - data:/var/lib/mysql -# redis: -# image: valkey/valkey:8 -# host: 192.168.0.2 -# port: 6379 -# directories: -# - data:/data diff --git a/example_rails8/config/queue.yml b/example_rails8/config/queue.yml deleted file mode 100644 index 9eace59c..00000000 --- a/example_rails8/config/queue.yml +++ /dev/null @@ -1,18 +0,0 @@ -default: &default - dispatchers: - - polling_interval: 1 - batch_size: 500 - workers: - - queues: "*" - threads: 3 - processes: <%= ENV.fetch("JOB_CONCURRENCY", 1) %> - polling_interval: 0.1 - -development: - <<: *default - -test: - <<: *default - -production: - <<: *default diff --git a/example_rails8/config/recurring.yml b/example_rails8/config/recurring.yml deleted file mode 100644 index b4207f9b..00000000 --- a/example_rails8/config/recurring.yml +++ /dev/null @@ -1,15 +0,0 @@ -# examples: -# periodic_cleanup: -# class: CleanSoftDeletedRecordsJob -# queue: background -# args: [ 1000, { batch_size: 500 } ] -# schedule: every hour -# periodic_cleanup_with_command: -# command: "SoftDeletedRecord.due.delete_all" -# priority: 2 -# schedule: at 5am every day - -production: - clear_solid_queue_finished_jobs: - command: "SolidQueue::Job.clear_finished_in_batches(sleep_between_batches: 0.3)" - schedule: every hour at minute 12 diff --git a/example_rails8/db/cable_schema.rb b/example_rails8/db/cable_schema.rb deleted file mode 100644 index 23666604..00000000 --- a/example_rails8/db/cable_schema.rb +++ /dev/null @@ -1,11 +0,0 @@ -ActiveRecord::Schema[7.1].define(version: 1) do - create_table "solid_cable_messages", force: :cascade do |t| - t.binary "channel", limit: 1024, null: false - t.binary "payload", limit: 536870912, null: false - t.datetime "created_at", null: false - t.integer "channel_hash", limit: 8, null: false - t.index ["channel"], name: "index_solid_cable_messages_on_channel" - t.index ["channel_hash"], name: "index_solid_cable_messages_on_channel_hash" - t.index ["created_at"], name: "index_solid_cable_messages_on_created_at" - end -end diff --git a/example_rails8/db/cache_schema.rb b/example_rails8/db/cache_schema.rb deleted file mode 100644 index 81a410d1..00000000 --- a/example_rails8/db/cache_schema.rb +++ /dev/null @@ -1,12 +0,0 @@ -ActiveRecord::Schema[7.2].define(version: 1) do - create_table "solid_cache_entries", force: :cascade do |t| - t.binary "key", limit: 1024, null: false - t.binary "value", limit: 536870912, null: false - t.datetime "created_at", null: false - t.integer "key_hash", limit: 8, null: false - t.integer "byte_size", limit: 4, null: false - t.index ["byte_size"], name: "index_solid_cache_entries_on_byte_size" - t.index ["key_hash", "byte_size"], name: "index_solid_cache_entries_on_key_hash_and_byte_size" - t.index ["key_hash"], name: "index_solid_cache_entries_on_key_hash", unique: true - end -end diff --git a/example_rails8/db/queue_schema.rb b/example_rails8/db/queue_schema.rb deleted file mode 100644 index 85194b6a..00000000 --- a/example_rails8/db/queue_schema.rb +++ /dev/null @@ -1,129 +0,0 @@ -ActiveRecord::Schema[7.1].define(version: 1) do - create_table "solid_queue_blocked_executions", force: :cascade do |t| - t.bigint "job_id", null: false - t.string "queue_name", null: false - t.integer "priority", default: 0, null: false - t.string "concurrency_key", null: false - t.datetime "expires_at", null: false - t.datetime "created_at", null: false - t.index [ "concurrency_key", "priority", "job_id" ], name: "index_solid_queue_blocked_executions_for_release" - t.index [ "expires_at", "concurrency_key" ], name: "index_solid_queue_blocked_executions_for_maintenance" - t.index [ "job_id" ], name: "index_solid_queue_blocked_executions_on_job_id", unique: true - end - - create_table "solid_queue_claimed_executions", force: :cascade do |t| - t.bigint "job_id", null: false - t.bigint "process_id" - t.datetime "created_at", null: false - t.index [ "job_id" ], name: "index_solid_queue_claimed_executions_on_job_id", unique: true - t.index [ "process_id", "job_id" ], name: "index_solid_queue_claimed_executions_on_process_id_and_job_id" - end - - create_table "solid_queue_failed_executions", force: :cascade do |t| - t.bigint "job_id", null: false - t.text "error" - t.datetime "created_at", null: false - t.index [ "job_id" ], name: "index_solid_queue_failed_executions_on_job_id", unique: true - end - - create_table "solid_queue_jobs", force: :cascade do |t| - t.string "queue_name", null: false - t.string "class_name", null: false - t.text "arguments" - t.integer "priority", default: 0, null: false - t.string "active_job_id" - t.datetime "scheduled_at" - t.datetime "finished_at" - t.string "concurrency_key" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.index [ "active_job_id" ], name: "index_solid_queue_jobs_on_active_job_id" - t.index [ "class_name" ], name: "index_solid_queue_jobs_on_class_name" - t.index [ "finished_at" ], name: "index_solid_queue_jobs_on_finished_at" - t.index [ "queue_name", "finished_at" ], name: "index_solid_queue_jobs_for_filtering" - t.index [ "scheduled_at", "finished_at" ], name: "index_solid_queue_jobs_for_alerting" - end - - create_table "solid_queue_pauses", force: :cascade do |t| - t.string "queue_name", null: false - t.datetime "created_at", null: false - t.index [ "queue_name" ], name: "index_solid_queue_pauses_on_queue_name", unique: true - end - - create_table "solid_queue_processes", force: :cascade do |t| - t.string "kind", null: false - t.datetime "last_heartbeat_at", null: false - t.bigint "supervisor_id" - t.integer "pid", null: false - t.string "hostname" - t.text "metadata" - t.datetime "created_at", null: false - t.string "name", null: false - t.index [ "last_heartbeat_at" ], name: "index_solid_queue_processes_on_last_heartbeat_at" - t.index [ "name", "supervisor_id" ], name: "index_solid_queue_processes_on_name_and_supervisor_id", unique: true - t.index [ "supervisor_id" ], name: "index_solid_queue_processes_on_supervisor_id" - end - - create_table "solid_queue_ready_executions", force: :cascade do |t| - t.bigint "job_id", null: false - t.string "queue_name", null: false - t.integer "priority", default: 0, null: false - t.datetime "created_at", null: false - t.index [ "job_id" ], name: "index_solid_queue_ready_executions_on_job_id", unique: true - t.index [ "priority", "job_id" ], name: "index_solid_queue_poll_all" - t.index [ "queue_name", "priority", "job_id" ], name: "index_solid_queue_poll_by_queue" - end - - create_table "solid_queue_recurring_executions", force: :cascade do |t| - t.bigint "job_id", null: false - t.string "task_key", null: false - t.datetime "run_at", null: false - t.datetime "created_at", null: false - t.index [ "job_id" ], name: "index_solid_queue_recurring_executions_on_job_id", unique: true - t.index [ "task_key", "run_at" ], name: "index_solid_queue_recurring_executions_on_task_key_and_run_at", unique: true - end - - create_table "solid_queue_recurring_tasks", force: :cascade do |t| - t.string "key", null: false - t.string "schedule", null: false - t.string "command", limit: 2048 - t.string "class_name" - t.text "arguments" - t.string "queue_name" - t.integer "priority", default: 0 - t.boolean "static", default: true, null: false - t.text "description" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.index [ "key" ], name: "index_solid_queue_recurring_tasks_on_key", unique: true - t.index [ "static" ], name: "index_solid_queue_recurring_tasks_on_static" - end - - create_table "solid_queue_scheduled_executions", force: :cascade do |t| - t.bigint "job_id", null: false - t.string "queue_name", null: false - t.integer "priority", default: 0, null: false - t.datetime "scheduled_at", null: false - t.datetime "created_at", null: false - t.index [ "job_id" ], name: "index_solid_queue_scheduled_executions_on_job_id", unique: true - t.index [ "scheduled_at", "priority", "job_id" ], name: "index_solid_queue_dispatch_all" - end - - create_table "solid_queue_semaphores", force: :cascade do |t| - t.string "key", null: false - t.integer "value", default: 1, null: false - t.datetime "expires_at", null: false - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.index [ "expires_at" ], name: "index_solid_queue_semaphores_on_expires_at" - t.index [ "key", "value" ], name: "index_solid_queue_semaphores_on_key_and_value" - t.index [ "key" ], name: "index_solid_queue_semaphores_on_key", unique: true - end - - add_foreign_key "solid_queue_blocked_executions", "solid_queue_jobs", column: "job_id", on_delete: :cascade - add_foreign_key "solid_queue_claimed_executions", "solid_queue_jobs", column: "job_id", on_delete: :cascade - add_foreign_key "solid_queue_failed_executions", "solid_queue_jobs", column: "job_id", on_delete: :cascade - add_foreign_key "solid_queue_ready_executions", "solid_queue_jobs", column: "job_id", on_delete: :cascade - add_foreign_key "solid_queue_recurring_executions", "solid_queue_jobs", column: "job_id", on_delete: :cascade - add_foreign_key "solid_queue_scheduled_executions", "solid_queue_jobs", column: "job_id", on_delete: :cascade -end diff --git a/example_rails8/test/test_helper.rb b/example_rails8/test/test_helper.rb deleted file mode 100644 index 0c22470e..00000000 --- a/example_rails8/test/test_helper.rb +++ /dev/null @@ -1,15 +0,0 @@ -ENV["RAILS_ENV"] ||= "test" -require_relative "../config/environment" -require "rails/test_help" - -module ActiveSupport - class TestCase - # Run tests in parallel with specified workers - parallelize(workers: :number_of_processors) - - # Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical order. - fixtures :all - - # Add more helper methods to be used by all tests here... - end -end diff --git a/example_rails_current/.node-version b/example_rails_current/.node-version new file mode 100644 index 00000000..248216ad --- /dev/null +++ b/example_rails_current/.node-version @@ -0,0 +1 @@ +24.12.0 diff --git a/example_rails8/.ruby-version b/example_rails_current/.ruby-version similarity index 100% rename from example_rails8/.ruby-version rename to example_rails_current/.ruby-version diff --git a/example_rails8/Gemfile b/example_rails_current/Gemfile similarity index 55% rename from example_rails8/Gemfile rename to example_rails_current/Gemfile index bf5f8131..3edeff20 100644 --- a/example_rails8/Gemfile +++ b/example_rails_current/Gemfile @@ -1,7 +1,7 @@ source "https://rubygems.org" # Bundle edge Rails instead: gem "rails", github: "rails/rails", branch: "main" -gem "rails", "~> 8.1.2" +gem "rails", "~> 8.1.3" # The modern asset pipeline for Rails [https://github.com/rails/propshaft] gem "propshaft" # Use postgresql as the database for Active Record @@ -14,6 +14,8 @@ gem "jsbundling-rails" gem "turbo-rails" # Hotwire's modest JavaScript framework [https://stimulus.hotwired.dev] gem "stimulus-rails" +# Use Redis adapter to run Action Cable in production +# gem "redis", ">= 4.0.1" # Use Active Model has_secure_password [https://guides.rubyonrails.org/active_model_basics.html#securepassword] # gem "bcrypt", "~> 3.1.7" @@ -21,46 +23,15 @@ gem "stimulus-rails" # Windows does not include zoneinfo files, so bundle the tzinfo-data gem gem "tzinfo-data", platforms: %i[ windows jruby ] -# Use the database-backed adapters for Rails.cache, Active Job, and Action Cable -gem "solid_cache" -gem "solid_queue" -gem "solid_cable" - -# Reduces boot times through caching; required in config/boot.rb -gem "bootsnap", require: false - -# Deploy this application anywhere as a Docker container [https://kamal-deploy.org] -gem "kamal", require: false - -# Add HTTP asset caching/compression and X-Sendfile acceleration to Puma [https://github.com/basecamp/thruster/] -gem "thruster", require: false - # Use Active Storage variants [https://guides.rubyonrails.org/active_storage_overview.html#transforming-images] gem "image_processing", "~> 1.2" group :development, :test do # See https://guides.rubyonrails.org/debugging_rails_applications.html#debugging-with-the-debug-gem gem "debug", platforms: %i[ mri windows ], require: "debug/prelude" - - # Audits gems for known security defects (use config/bundler-audit.yml to ignore issues) - gem "bundler-audit", require: false - - # Static analysis for security vulnerabilities [https://brakemanscanner.org/] - gem "brakeman", require: false - - # Omakase Ruby styling [https://github.com/rails/rubocop-rails-omakase/] - gem "rubocop-rails-omakase", require: false end group :development do # Use console on exceptions pages [https://github.com/rails/web-console] gem "web-console" end - -group :test do - # Use system testing [https://guides.rubyonrails.org/testing.html#system-testing] - gem "capybara" - gem "selenium-webdriver" -end - -gem "rolemodel_rails", "> 0.20", group: :development, path: ".." diff --git a/example_rails_current/Gemfile.lock b/example_rails_current/Gemfile.lock new file mode 100644 index 00000000..029df626 --- /dev/null +++ b/example_rails_current/Gemfile.lock @@ -0,0 +1,379 @@ +GEM + remote: https://rubygems.org/ + specs: + action_text-trix (2.1.17) + railties + actioncable (8.1.3) + actionpack (= 8.1.3) + activesupport (= 8.1.3) + nio4r (~> 2.0) + websocket-driver (>= 0.6.1) + zeitwerk (~> 2.6) + actionmailbox (8.1.3) + actionpack (= 8.1.3) + activejob (= 8.1.3) + activerecord (= 8.1.3) + activestorage (= 8.1.3) + activesupport (= 8.1.3) + mail (>= 2.8.0) + actionmailer (8.1.3) + actionpack (= 8.1.3) + actionview (= 8.1.3) + activejob (= 8.1.3) + activesupport (= 8.1.3) + mail (>= 2.8.0) + rails-dom-testing (~> 2.2) + actionpack (8.1.3) + actionview (= 8.1.3) + activesupport (= 8.1.3) + nokogiri (>= 1.8.5) + rack (>= 2.2.4) + rack-session (>= 1.0.1) + rack-test (>= 0.6.3) + rails-dom-testing (~> 2.2) + rails-html-sanitizer (~> 1.6) + useragent (~> 0.16) + actiontext (8.1.3) + action_text-trix (~> 2.1.15) + actionpack (= 8.1.3) + activerecord (= 8.1.3) + activestorage (= 8.1.3) + activesupport (= 8.1.3) + globalid (>= 0.6.0) + nokogiri (>= 1.8.5) + actionview (8.1.3) + activesupport (= 8.1.3) + builder (~> 3.1) + erubi (~> 1.11) + rails-dom-testing (~> 2.2) + rails-html-sanitizer (~> 1.6) + activejob (8.1.3) + activesupport (= 8.1.3) + globalid (>= 0.3.6) + activemodel (8.1.3) + activesupport (= 8.1.3) + activerecord (8.1.3) + activemodel (= 8.1.3) + activesupport (= 8.1.3) + timeout (>= 0.4.0) + activestorage (8.1.3) + actionpack (= 8.1.3) + activejob (= 8.1.3) + activerecord (= 8.1.3) + activesupport (= 8.1.3) + marcel (~> 1.0) + activesupport (8.1.3) + base64 + bigdecimal + concurrent-ruby (~> 1.0, >= 1.3.1) + connection_pool (>= 2.2.5) + drb + i18n (>= 1.6, < 2) + json + logger (>= 1.4.2) + minitest (>= 5.1) + securerandom (>= 0.3) + tzinfo (~> 2.0, >= 2.0.5) + uri (>= 0.13.1) + base64 (0.3.0) + bigdecimal (4.0.1) + bindex (0.8.1) + builder (3.3.0) + concurrent-ruby (1.3.6) + connection_pool (3.0.2) + crass (1.0.6) + date (3.5.1) + debug (1.11.1) + irb (~> 1.10) + reline (>= 0.3.8) + drb (2.2.3) + erb (6.0.2) + erubi (1.13.1) + ffi (1.17.3-aarch64-linux-gnu) + ffi (1.17.3-aarch64-linux-musl) + ffi (1.17.3-arm-linux-gnu) + ffi (1.17.3-arm-linux-musl) + ffi (1.17.3-arm64-darwin) + ffi (1.17.3-x86_64-darwin) + ffi (1.17.3-x86_64-linux-gnu) + ffi (1.17.3-x86_64-linux-musl) + globalid (1.3.0) + activesupport (>= 6.1) + i18n (1.14.8) + concurrent-ruby (~> 1.0) + image_processing (1.14.0) + mini_magick (>= 4.9.5, < 6) + ruby-vips (>= 2.0.17, < 3) + io-console (0.8.2) + irb (1.17.0) + pp (>= 0.6.0) + prism (>= 1.3.0) + rdoc (>= 4.0.0) + reline (>= 0.4.2) + jsbundling-rails (1.3.1) + railties (>= 6.0.0) + json (2.19.1) + logger (1.7.0) + loofah (2.25.1) + crass (~> 1.0.2) + nokogiri (>= 1.12.0) + mail (2.9.0) + logger + mini_mime (>= 0.1.1) + net-imap + net-pop + net-smtp + marcel (1.1.0) + mini_magick (5.3.1) + logger + mini_mime (1.1.5) + minitest (6.0.2) + drb (~> 2.0) + prism (~> 1.5) + net-imap (0.6.3) + date + net-protocol + net-pop (0.1.2) + net-protocol + net-protocol (0.2.2) + timeout + net-smtp (0.5.1) + net-protocol + nio4r (2.7.5) + nokogiri (1.19.1-aarch64-linux-gnu) + racc (~> 1.4) + nokogiri (1.19.1-aarch64-linux-musl) + racc (~> 1.4) + nokogiri (1.19.1-arm-linux-gnu) + racc (~> 1.4) + nokogiri (1.19.1-arm-linux-musl) + racc (~> 1.4) + nokogiri (1.19.1-arm64-darwin) + racc (~> 1.4) + nokogiri (1.19.1-x86_64-darwin) + racc (~> 1.4) + nokogiri (1.19.1-x86_64-linux-gnu) + racc (~> 1.4) + nokogiri (1.19.1-x86_64-linux-musl) + racc (~> 1.4) + pg (1.6.3) + pg (1.6.3-aarch64-linux) + pg (1.6.3-aarch64-linux-musl) + pg (1.6.3-arm64-darwin) + pg (1.6.3-x86_64-darwin) + pg (1.6.3-x86_64-linux) + pg (1.6.3-x86_64-linux-musl) + pp (0.6.3) + prettyprint + prettyprint (0.2.0) + prism (1.9.0) + propshaft (1.3.1) + actionpack (>= 7.0.0) + activesupport (>= 7.0.0) + rack + psych (5.3.1) + date + stringio + puma (7.2.0) + nio4r (~> 2.0) + racc (1.8.1) + rack (3.2.5) + rack-session (2.1.1) + base64 (>= 0.1.0) + rack (>= 3.0.0) + rack-test (2.2.0) + rack (>= 1.3) + rackup (2.3.1) + rack (>= 3) + rails (8.1.3) + actioncable (= 8.1.3) + actionmailbox (= 8.1.3) + actionmailer (= 8.1.3) + actionpack (= 8.1.3) + actiontext (= 8.1.3) + actionview (= 8.1.3) + activejob (= 8.1.3) + activemodel (= 8.1.3) + activerecord (= 8.1.3) + activestorage (= 8.1.3) + activesupport (= 8.1.3) + bundler (>= 1.15.0) + railties (= 8.1.3) + rails-dom-testing (2.3.0) + activesupport (>= 5.0.0) + minitest + nokogiri (>= 1.6) + rails-html-sanitizer (1.7.0) + loofah (~> 2.25) + nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0) + railties (8.1.3) + actionpack (= 8.1.3) + activesupport (= 8.1.3) + irb (~> 1.13) + rackup (>= 1.0.0) + rake (>= 12.2) + thor (~> 1.0, >= 1.2.2) + tsort (>= 0.2) + zeitwerk (~> 2.6) + rake (13.3.1) + rdoc (7.2.0) + erb + psych (>= 4.0.0) + tsort + reline (0.6.3) + io-console (~> 0.5) + ruby-vips (2.3.0) + ffi (~> 1.12) + logger + securerandom (0.4.1) + stimulus-rails (1.3.4) + railties (>= 6.0.0) + stringio (3.2.0) + thor (1.5.0) + timeout (0.6.1) + tsort (0.2.0) + turbo-rails (2.0.23) + actionpack (>= 7.1.0) + railties (>= 7.1.0) + tzinfo (2.0.6) + concurrent-ruby (~> 1.0) + uri (1.1.1) + useragent (0.16.11) + web-console (4.3.0) + actionview (>= 8.0.0) + bindex (>= 0.4.0) + railties (>= 8.0.0) + websocket-driver (0.8.0) + base64 + websocket-extensions (>= 0.1.0) + websocket-extensions (0.1.5) + zeitwerk (2.7.5) + +PLATFORMS + aarch64-linux + aarch64-linux-gnu + aarch64-linux-musl + arm-linux-gnu + arm-linux-musl + arm64-darwin + x86_64-darwin + x86_64-linux + x86_64-linux-gnu + x86_64-linux-musl + +DEPENDENCIES + debug + image_processing (~> 1.2) + jsbundling-rails + pg (~> 1.1) + propshaft + puma (>= 5.0) + rails (~> 8.1.3) + stimulus-rails + turbo-rails + tzinfo-data + web-console + +CHECKSUMS + action_text-trix (2.1.17) sha256=b44691639d77e67169dc054ceacd1edc04d44dc3e4c6a427aa155a2beb4cc951 + actioncable (8.1.3) sha256=e5bc7f75e44e6a22de29c4f43176927c3a9ce4824464b74ed18d8226e75a80f0 + actionmailbox (8.1.3) sha256=df7da474eaa0e70df4ed5a6fef66eb3b3b0f2dbf7f14518deee8d77f1b4aae59 + actionmailer (8.1.3) sha256=831f724891bb70d0aaa4d76581a6321124b6a752cb655c9346aae5479318448d + actionpack (8.1.3) sha256=af998cae4d47c5d581a2cc363b5c77eb718b7c4b45748d81b1887b25621c29a3 + actiontext (8.1.3) sha256=d291019c00e1ea9e6463011fa214f6081a56d7b9a1d224e7d3f6384c1dafc7d2 + actionview (8.1.3) sha256=1347c88c7f3edb38100c5ce0e9fb5e62d7755f3edc1b61cce2eb0b2c6ea2fd5d + activejob (8.1.3) sha256=a149b1766aa8204c3c3da7309e4becd40fcd5529c348cffbf6c9b16b565fe8d3 + activemodel (8.1.3) sha256=90c05cbe4cef3649b8f79f13016191ea94c4525ce4a5c0fb7ef909c4b91c8219 + activerecord (8.1.3) sha256=8003be7b2466ba0a2a670e603eeb0a61dd66058fccecfc49901e775260ac70ab + activestorage (8.1.3) sha256=0564ce9309143951a67615e1bb4e090ee54b8befed417133cae614479b46384d + activesupport (8.1.3) sha256=21a5e0dfbd4c3ddd9e1317ec6a4d782fa226e7867dc70b0743acda81a1dca20e + base64 (0.3.0) sha256=27337aeabad6ffae05c265c450490628ef3ebd4b67be58257393227588f5a97b + bigdecimal (4.0.1) sha256=8b07d3d065a9f921c80ceaea7c9d4ae596697295b584c296fe599dd0ad01c4a7 + bindex (0.8.1) sha256=7b1ecc9dc539ed8bccfc8cb4d2732046227b09d6f37582ff12e50a5047ceb17e + builder (3.3.0) sha256=497918d2f9dca528fdca4b88d84e4ef4387256d984b8154e9d5d3fe5a9c8835f + concurrent-ruby (1.3.6) sha256=6b56837e1e7e5292f9864f34b69c5a2cbc75c0cf5338f1ce9903d10fa762d5ab + connection_pool (3.0.2) sha256=33fff5ba71a12d2aa26cb72b1db8bba2a1a01823559fb01d29eb74c286e62e0a + crass (1.0.6) sha256=dc516022a56e7b3b156099abc81b6d2b08ea1ed12676ac7a5657617f012bd45d + date (3.5.1) sha256=750d06384d7b9c15d562c76291407d89e368dda4d4fff957eb94962d325a0dc0 + debug (1.11.1) sha256=2e0b0ac6119f2207a6f8ac7d4a73ca8eb4e440f64da0a3136c30343146e952b6 + drb (2.2.3) sha256=0b00d6fdb50995fe4a45dea13663493c841112e4068656854646f418fda13373 + erb (6.0.2) sha256=9fe6264d44f79422c87490a1558479bd0e7dad4dd0e317656e67ea3077b5242b + erubi (1.13.1) sha256=a082103b0885dbc5ecf1172fede897f9ebdb745a4b97a5e8dc63953db1ee4ad9 + ffi (1.17.3-aarch64-linux-gnu) sha256=28ad573df26560f0aedd8a90c3371279a0b2bd0b4e834b16a2baa10bd7a97068 + ffi (1.17.3-aarch64-linux-musl) sha256=020b33b76775b1abacc3b7d86b287cef3251f66d747092deec592c7f5df764b2 + ffi (1.17.3-arm-linux-gnu) sha256=5bd4cea83b68b5ec0037f99c57d5ce2dd5aa438f35decc5ef68a7d085c785668 + ffi (1.17.3-arm-linux-musl) sha256=0d7626bb96265f9af78afa33e267d71cfef9d9a8eb8f5525344f8da6c7d76053 + ffi (1.17.3-arm64-darwin) sha256=0c690555d4cee17a7f07c04d59df39b2fba74ec440b19da1f685c6579bb0717f + ffi (1.17.3-x86_64-darwin) sha256=1f211811eb5cfaa25998322cdd92ab104bfbd26d1c4c08471599c511f2c00bb5 + ffi (1.17.3-x86_64-linux-gnu) sha256=3746b01f677aae7b16dc1acb7cb3cc17b3e35bdae7676a3f568153fb0e2c887f + ffi (1.17.3-x86_64-linux-musl) sha256=086b221c3a68320b7564066f46fed23449a44f7a1935f1fe5a245bd89d9aea56 + globalid (1.3.0) sha256=05c639ad6eb4594522a0b07983022f04aa7254626ab69445a0e493aa3786ff11 + i18n (1.14.8) sha256=285778639134865c5e0f6269e0b818256017e8cde89993fdfcbfb64d088824a5 + image_processing (1.14.0) sha256=754cc169c9c262980889bec6bfd325ed1dafad34f85242b5a07b60af004742fb + io-console (0.8.2) sha256=d6e3ae7a7cc7574f4b8893b4fca2162e57a825b223a177b7afa236c5ef9814cc + irb (1.17.0) sha256=168c4ddb93d8a361a045c41d92b2952c7a118fa73f23fe14e55609eb7a863aae + jsbundling-rails (1.3.1) sha256=0fa03f6d051c694cbf55a022d8be53399879f2c4cf38b2968f86379c62b1c2ca + json (2.19.1) sha256=dd94fdc59e48bff85913829a32350b3148156bc4fd2a95a2568a78b11344082d + logger (1.7.0) sha256=196edec7cc44b66cfb40f9755ce11b392f21f7967696af15d274dde7edff0203 + loofah (2.25.1) sha256=d436c73dbd0c1147b16c4a41db097942d217303e1f7728704b37e4df9f6d2e04 + mail (2.9.0) sha256=6fa6673ecd71c60c2d996260f9ee3dd387d4673b8169b502134659ece6d34941 + marcel (1.1.0) sha256=fdcfcfa33cc52e93c4308d40e4090a5d4ea279e160a7f6af988260fa970e0bee + mini_magick (5.3.1) sha256=29395dfd76badcabb6403ee5aff6f681e867074f8f28ce08d78661e9e4a351c4 + mini_mime (1.1.5) sha256=8681b7e2e4215f2a159f9400b5816d85e9d8c6c6b491e96a12797e798f8bccef + minitest (6.0.2) sha256=db6e57956f6ecc6134683b4c87467d6dd792323c7f0eea7b93f66bd284adbc3d + net-imap (0.6.3) sha256=9bab75f876596d09ee7bf911a291da478e0cd6badc54dfb82874855ccc82f2ad + net-pop (0.1.2) sha256=848b4e982013c15b2f0382792268763b748cce91c9e91e36b0f27ed26420dff3 + net-protocol (0.2.2) sha256=aa73e0cba6a125369de9837b8d8ef82a61849360eba0521900e2c3713aa162a8 + net-smtp (0.5.1) sha256=ed96a0af63c524fceb4b29b0d352195c30d82dd916a42f03c62a3a70e5b70736 + nio4r (2.7.5) sha256=6c90168e48fb5f8e768419c93abb94ba2b892a1d0602cb06eef16d8b7df1dca1 + nokogiri (1.19.1-aarch64-linux-gnu) sha256=cfdb0eafd9a554a88f12ebcc688d2b9005f9fce42b00b970e3dc199587b27f32 + nokogiri (1.19.1-aarch64-linux-musl) sha256=1e2150ab43c3b373aba76cd1190af7b9e92103564063e48c474f7600923620b5 + nokogiri (1.19.1-arm-linux-gnu) sha256=0a39ed59abe3bf279fab9dd4c6db6fe8af01af0608f6e1f08b8ffa4e5d407fa3 + nokogiri (1.19.1-arm-linux-musl) sha256=3a18e559ee499b064aac6562d98daab3d39ba6cbb4074a1542781b2f556db47d + nokogiri (1.19.1-arm64-darwin) sha256=dfe2d337e6700eac47290407c289d56bcf85805d128c1b5a6434ddb79731cb9e + nokogiri (1.19.1-x86_64-darwin) sha256=7093896778cc03efb74b85f915a775862730e887f2e58d6921e3fa3d981e68bf + nokogiri (1.19.1-x86_64-linux-gnu) sha256=1a4902842a186b4f901078e692d12257678e6133858d0566152fe29cdb98456a + nokogiri (1.19.1-x86_64-linux-musl) sha256=4267f38ad4fc7e52a2e7ee28ed494e8f9d8eb4f4b3320901d55981c7b995fc23 + pg (1.6.3) sha256=1388d0563e13d2758c1089e35e973a3249e955c659592d10e5b77c468f628a99 + pg (1.6.3-aarch64-linux) sha256=0698ad563e02383c27510b76bf7d4cd2de19cd1d16a5013f375dd473e4be72ea + pg (1.6.3-aarch64-linux-musl) sha256=06a75f4ea04b05140146f2a10550b8e0d9f006a79cdaf8b5b130cde40e3ecc2c + pg (1.6.3-arm64-darwin) sha256=7240330b572e6355d7c75a7de535edb5dfcbd6295d9c7777df4d9dddfb8c0e5f + pg (1.6.3-x86_64-darwin) sha256=ee2e04a17c0627225054ffeb43e31a95be9d7e93abda2737ea3ce4a62f2729d6 + pg (1.6.3-x86_64-linux) sha256=5d9e188c8f7a0295d162b7b88a768d8452a899977d44f3274d1946d67920ae8d + pg (1.6.3-x86_64-linux-musl) sha256=9c9c90d98c72f78eb04c0f55e9618fe55d1512128e411035fe229ff427864009 + pp (0.6.3) sha256=2951d514450b93ccfeb1df7d021cae0da16e0a7f95ee1e2273719669d0ab9df6 + prettyprint (0.2.0) sha256=2bc9e15581a94742064a3cc8b0fb9d45aae3d03a1baa6ef80922627a0766f193 + prism (1.9.0) sha256=7b530c6a9f92c24300014919c9dcbc055bf4cdf51ec30aed099b06cd6674ef85 + propshaft (1.3.1) sha256=9acc664ef67e819ffa3d95bd7ad4c3623ea799110c5f4dee67fa7e583e74c392 + psych (5.3.1) sha256=eb7a57cef10c9d70173ff74e739d843ac3b2c019a003de48447b2963d81b1974 + puma (7.2.0) sha256=bf8ef4ab514a4e6d4554cb4326b2004eba5036ae05cf765cfe51aba9706a72a8 + racc (1.8.1) sha256=4a7f6929691dbec8b5209a0b373bc2614882b55fc5d2e447a21aaa691303d62f + rack (3.2.5) sha256=4cbd0974c0b79f7a139b4812004a62e4c60b145cba76422e288ee670601ed6d3 + rack-session (2.1.1) sha256=0b6dc07dea7e4b583f58a48e8b806d4c9f1c6c9214ebc202ec94562cbea2e4e9 + rack-test (2.2.0) sha256=005a36692c306ac0b4a9350355ee080fd09ddef1148a5f8b2ac636c720f5c463 + rackup (2.3.1) sha256=6c79c26753778e90983761d677a48937ee3192b3ffef6bc963c0950f94688868 + rails (8.1.3) sha256=6d017ba5348c98fc909753a8169b21d44de14d2a0b92d140d1a966834c3c9cd3 + rails-dom-testing (2.3.0) sha256=8acc7953a7b911ca44588bf08737bc16719f431a1cc3091a292bca7317925c1d + rails-html-sanitizer (1.7.0) sha256=28b145cceaf9cc214a9874feaa183c3acba036c9592b19886e0e45efc62b1e89 + railties (8.1.3) sha256=913eb0e0cb520aac687ffd74916bd726d48fa21f47833c6292576ef6a286de22 + rake (13.3.1) sha256=8c9e89d09f66a26a01264e7e3480ec0607f0c497a861ef16063604b1b08eb19c + rdoc (7.2.0) sha256=8650f76cd4009c3b54955eb5d7e3a075c60a57276766ebf36f9085e8c9f23192 + reline (0.6.3) sha256=1198b04973565b36ec0f11542ab3f5cfeeec34823f4e54cebde90968092b1835 + ruby-vips (2.3.0) sha256=e685ec02c13969912debbd98019e50492e12989282da5f37d05f5471442f5374 + securerandom (0.4.1) sha256=cc5193d414a4341b6e225f0cb4446aceca8e50d5e1888743fac16987638ea0b1 + stimulus-rails (1.3.4) sha256=765676ffa1f33af64ce026d26b48e8ffb2e0b94e0f50e9119e11d6107d67cb06 + stringio (3.2.0) sha256=c37cb2e58b4ffbd33fe5cd948c05934af997b36e0b6ca6fdf43afa234cf222e1 + thor (1.5.0) sha256=e3a9e55fe857e44859ce104a84675ab6e8cd59c650a49106a05f55f136425e73 + timeout (0.6.1) sha256=78f57368a7e7bbadec56971f78a3f5ecbcfb59b7fcbb0a3ed6ddc08a5094accb + tsort (0.2.0) sha256=9650a793f6859a43b6641671278f79cfead60ac714148aabe4e3f0060480089f + turbo-rails (2.0.23) sha256=ee0d90733aafff056cf51ff11e803d65e43cae258cc55f6492020ec1f9f9315f + tzinfo (2.0.6) sha256=8daf828cc77bcf7d63b0e3bdb6caa47e2272dcfaf4fbfe46f8c3a9df087a829b + uri (1.1.1) sha256=379fa58d27ffb1387eaada68c749d1426738bd0f654d812fcc07e7568f5c57c6 + useragent (0.16.11) sha256=700e6413ad4bb954bb63547fa098dddf7b0ebe75b40cc6f93b8d54255b173844 + web-console (4.3.0) sha256=e13b71301cdfc2093f155b5aa3a622db80b4672d1f2f713119cc7ec7ac6a6da4 + websocket-driver (0.8.0) sha256=ed0dba4b943c22f17f9a734817e808bc84cdce6a7e22045f5315aa57676d4962 + websocket-extensions (0.1.5) sha256=1c6ba63092cda343eb53fc657110c71c754c56484aad42578495227d717a8241 + zeitwerk (2.7.5) sha256=d8da92128c09ea6ec62c949011b00ed4a20242b255293dd66bf41545398f73dd + +BUNDLED WITH + 4.0.8 diff --git a/example_rails7/Procfile.dev b/example_rails_current/Procfile.dev similarity index 100% rename from example_rails7/Procfile.dev rename to example_rails_current/Procfile.dev diff --git a/example_rails7/README.md b/example_rails_current/README.md similarity index 100% rename from example_rails7/README.md rename to example_rails_current/README.md diff --git a/example_rails7/Rakefile b/example_rails_current/Rakefile similarity index 100% rename from example_rails7/Rakefile rename to example_rails_current/Rakefile diff --git a/example_rails7/app/assets/builds/.keep b/example_rails_current/app/assets/images/.keep similarity index 100% rename from example_rails7/app/assets/builds/.keep rename to example_rails_current/app/assets/images/.keep diff --git a/example_rails8/app/assets/stylesheets/application.css b/example_rails_current/app/assets/stylesheets/application.css similarity index 100% rename from example_rails8/app/assets/stylesheets/application.css rename to example_rails_current/app/assets/stylesheets/application.css diff --git a/example_rails7/app/controllers/application_controller.rb b/example_rails_current/app/controllers/application_controller.rb similarity index 100% rename from example_rails7/app/controllers/application_controller.rb rename to example_rails_current/app/controllers/application_controller.rb diff --git a/example_rails_current/app/controllers/concerns/.keep b/example_rails_current/app/controllers/concerns/.keep new file mode 100644 index 00000000..e69de29b diff --git a/example_rails7/app/helpers/application_helper.rb b/example_rails_current/app/helpers/application_helper.rb similarity index 100% rename from example_rails7/app/helpers/application_helper.rb rename to example_rails_current/app/helpers/application_helper.rb diff --git a/example_rails7/app/javascript/application.js b/example_rails_current/app/javascript/application.js similarity index 100% rename from example_rails7/app/javascript/application.js rename to example_rails_current/app/javascript/application.js diff --git a/example_rails7/app/javascript/controllers/application.js b/example_rails_current/app/javascript/controllers/application.js similarity index 100% rename from example_rails7/app/javascript/controllers/application.js rename to example_rails_current/app/javascript/controllers/application.js diff --git a/example_rails7/app/javascript/controllers/hello_controller.js b/example_rails_current/app/javascript/controllers/hello_controller.js similarity index 100% rename from example_rails7/app/javascript/controllers/hello_controller.js rename to example_rails_current/app/javascript/controllers/hello_controller.js diff --git a/example_rails7/app/javascript/controllers/index.js b/example_rails_current/app/javascript/controllers/index.js similarity index 100% rename from example_rails7/app/javascript/controllers/index.js rename to example_rails_current/app/javascript/controllers/index.js diff --git a/example_rails7/app/jobs/application_job.rb b/example_rails_current/app/jobs/application_job.rb similarity index 100% rename from example_rails7/app/jobs/application_job.rb rename to example_rails_current/app/jobs/application_job.rb diff --git a/example_rails7/app/mailers/application_mailer.rb b/example_rails_current/app/mailers/application_mailer.rb similarity index 100% rename from example_rails7/app/mailers/application_mailer.rb rename to example_rails_current/app/mailers/application_mailer.rb diff --git a/example_rails7/app/models/application_record.rb b/example_rails_current/app/models/application_record.rb similarity index 100% rename from example_rails7/app/models/application_record.rb rename to example_rails_current/app/models/application_record.rb diff --git a/example_rails_current/app/models/concerns/.keep b/example_rails_current/app/models/concerns/.keep new file mode 100644 index 00000000..e69de29b diff --git a/example_rails8/app/views/layouts/application.html.erb b/example_rails_current/app/views/layouts/application.html.erb similarity index 86% rename from example_rails8/app/views/layouts/application.html.erb rename to example_rails_current/app/views/layouts/application.html.erb index 1e25bc42..3303df49 100644 --- a/example_rails8/app/views/layouts/application.html.erb +++ b/example_rails_current/app/views/layouts/application.html.erb @@ -1,10 +1,10 @@ - <%= content_for(:title) || "Example Rails8" %> + <%= content_for(:title) || "Example Rails Current" %> - + <%= csrf_meta_tags %> <%= csp_meta_tag %> diff --git a/example_rails7/app/views/layouts/mailer.html.erb b/example_rails_current/app/views/layouts/mailer.html.erb similarity index 100% rename from example_rails7/app/views/layouts/mailer.html.erb rename to example_rails_current/app/views/layouts/mailer.html.erb diff --git a/example_rails7/app/views/layouts/mailer.text.erb b/example_rails_current/app/views/layouts/mailer.text.erb similarity index 100% rename from example_rails7/app/views/layouts/mailer.text.erb rename to example_rails_current/app/views/layouts/mailer.text.erb diff --git a/example_rails8/app/views/pwa/manifest.json.erb b/example_rails_current/app/views/pwa/manifest.json.erb similarity index 82% rename from example_rails8/app/views/pwa/manifest.json.erb rename to example_rails_current/app/views/pwa/manifest.json.erb index 34efeaaf..45c23531 100644 --- a/example_rails8/app/views/pwa/manifest.json.erb +++ b/example_rails_current/app/views/pwa/manifest.json.erb @@ -1,5 +1,5 @@ { - "name": "ExampleRails8", + "name": "ExampleRailsCurrent", "icons": [ { "src": "/icon.png", @@ -16,7 +16,7 @@ "start_url": "/", "display": "standalone", "scope": "/", - "description": "ExampleRails8.", + "description": "ExampleRailsCurrent.", "theme_color": "red", "background_color": "red" } diff --git a/example_rails7/app/views/pwa/service-worker.js b/example_rails_current/app/views/pwa/service-worker.js similarity index 100% rename from example_rails7/app/views/pwa/service-worker.js rename to example_rails_current/app/views/pwa/service-worker.js diff --git a/example_rails8/bin/ci b/example_rails_current/bin/ci similarity index 100% rename from example_rails8/bin/ci rename to example_rails_current/bin/ci diff --git a/example_rails7/bin/dev b/example_rails_current/bin/dev similarity index 100% rename from example_rails7/bin/dev rename to example_rails_current/bin/dev diff --git a/example_rails7/bin/rails b/example_rails_current/bin/rails similarity index 100% rename from example_rails7/bin/rails rename to example_rails_current/bin/rails diff --git a/example_rails7/bin/rake b/example_rails_current/bin/rake similarity index 100% rename from example_rails7/bin/rake rename to example_rails_current/bin/rake diff --git a/example_rails8/bin/setup b/example_rails_current/bin/setup similarity index 100% rename from example_rails8/bin/setup rename to example_rails_current/bin/setup diff --git a/example_rails7/config.ru b/example_rails_current/config.ru similarity index 100% rename from example_rails7/config.ru rename to example_rails_current/config.ru diff --git a/example_rails8/config/application.rb b/example_rails_current/config/application.rb similarity index 60% rename from example_rails8/config/application.rb rename to example_rails_current/config/application.rb index 349e8c3c..334ffa95 100644 --- a/example_rails8/config/application.rb +++ b/example_rails_current/config/application.rb @@ -1,15 +1,26 @@ require_relative "boot" -require "rails/all" +require "rails" +# Pick the frameworks you want: +require "active_model/railtie" +require "active_job/railtie" +require "active_record/railtie" +require "active_storage/engine" +require "action_controller/railtie" +require "action_mailer/railtie" +require "action_mailbox/engine" +require "action_text/engine" +require "action_view/railtie" +require "action_cable/engine" +# require "rails/test_unit/railtie" # Require the gems listed in Gemfile, including any gems # you've limited to :test, :development, or :production. Bundler.require(*Rails.groups) -module ExampleRails8 +module ExampleRailsCurrent class Application < Rails::Application - # Initialize configuration defaults for originally generated Rails version. - config.load_defaults 8.1 + config.load_defaults Rails::VERSION::STRING.to_f # Please, add to the `ignore` list any other `lib` subdirectories that do # not contain `.rb` files, or that should not be reloaded or eager loaded. @@ -23,5 +34,8 @@ class Application < Rails::Application # # config.time_zone = "Central Time (US & Canada)" # config.eager_load_paths << Rails.root.join("extras") + + # Don't generate system test files. + config.generators.system_tests = nil end end diff --git a/example_rails_current/config/boot.rb b/example_rails_current/config/boot.rb new file mode 100644 index 00000000..6d349b91 --- /dev/null +++ b/example_rails_current/config/boot.rb @@ -0,0 +1,5 @@ +# Set up gems listed in the Gemfile. +ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile", __dir__) + +require "bundler/setup" if File.exist?(ENV["BUNDLE_GEMFILE"]) +$LOAD_PATH.unshift File.expand_path("../../lib", __dir__) diff --git a/example_rails_current/config/cable.yml b/example_rails_current/config/cable.yml new file mode 100644 index 00000000..62f0ae2f --- /dev/null +++ b/example_rails_current/config/cable.yml @@ -0,0 +1,10 @@ +development: + adapter: async + +test: + adapter: test + +production: + adapter: redis + url: <%= ENV.fetch("REDIS_URL") { "redis://localhost:6379/1" } %> + channel_prefix: example_rails_current_production diff --git a/example_rails8/config/ci.rb b/example_rails_current/config/ci.rb similarity index 55% rename from example_rails8/config/ci.rb rename to example_rails_current/config/ci.rb index ae0ee44d..9fa7522f 100644 --- a/example_rails8/config/ci.rb +++ b/example_rails_current/config/ci.rb @@ -3,16 +3,8 @@ CI.run do step "Setup", "bin/setup --skip-server" - step "Style: Ruby", "bin/rubocop" - - step "Security: Gem audit", "bin/bundler-audit" step "Security: Yarn vulnerability audit", "yarn audit" - step "Security: Brakeman code analysis", "bin/brakeman --quiet --no-pager --exit-on-warn --exit-on-error" - step "Tests: Rails", "bin/rails test" - step "Tests: Seeds", "env RAILS_ENV=test bin/rails db:seed:replant" - # Optional: Run system tests - # step "Tests: System", "bin/rails test:system" # Optional: set a green GitHub commit status to unblock PR merge. # Requires the `gh` CLI and `gh extension install basecamp/gh-signoff`. diff --git a/example_rails8/config/database.yml b/example_rails_current/config/database.yml similarity index 75% rename from example_rails8/config/database.yml rename to example_rails_current/config/database.yml index d3eba883..f23f979b 100644 --- a/example_rails8/config/database.yml +++ b/example_rails_current/config/database.yml @@ -22,13 +22,13 @@ default: &default development: <<: *default - database: example_rails8_development + database: example_rails_current_development # The specified database role being used to connect to PostgreSQL. # To create additional roles in PostgreSQL see `$ createuser --help`. # When left blank, PostgreSQL will use the default role. This is # the same name as the operating system user running Rails. - #username: example_rails8 + #username: example_rails_current # The password associated with the PostgreSQL role (username). #password: @@ -56,7 +56,7 @@ development: # Do not set this db to the same as development or production. test: <<: *default - database: example_rails8_test + database: example_rails_current_test # As with config/credentials.yml, you never want to store sensitive information, # like your database password, in your source code. If your source code is @@ -75,30 +75,11 @@ test: # production: # url: <%= ENV["MY_APP_DATABASE_URL"] %> # -# Connection URLs for non-primary databases can also be configured using -# environment variables. The variable name is formed by concatenating the -# connection name with `_DATABASE_URL`. For example: -# -# CACHE_DATABASE_URL="postgres://cacheuser:cachepass@localhost/cachedatabase" -# # Read https://guides.rubyonrails.org/configuring.html#configuring-a-database # for a full overview on how database connection configuration can be specified. # production: - primary: &primary_production - <<: *default - database: example_rails8_production - username: example_rails8 - password: <%= ENV["EXAMPLE_RAILS8_DATABASE_PASSWORD"] %> - cache: - <<: *primary_production - database: example_rails8_production_cache - migrations_paths: db/cache_migrate - queue: - <<: *primary_production - database: example_rails8_production_queue - migrations_paths: db/queue_migrate - cable: - <<: *primary_production - database: example_rails8_production_cable - migrations_paths: db/cable_migrate + <<: *default + database: example_rails_current_production + username: example_rails_current + password: <%= ENV["EXAMPLE_RAILS_CURRENT_DATABASE_PASSWORD"] %> diff --git a/example_rails7/config/environment.rb b/example_rails_current/config/environment.rb similarity index 100% rename from example_rails7/config/environment.rb rename to example_rails_current/config/environment.rb diff --git a/example_rails8/config/environments/development.rb b/example_rails_current/config/environments/development.rb similarity index 95% rename from example_rails8/config/environments/development.rb rename to example_rails_current/config/environments/development.rb index 75243c3d..35a17d24 100644 --- a/example_rails8/config/environments/development.rb +++ b/example_rails_current/config/environments/development.rb @@ -72,7 +72,4 @@ # Raise error when a before_action's only/except options reference missing actions. config.action_controller.raise_on_missing_callback_actions = true - - # Apply autocorrection by RuboCop to files generated by `bin/rails generate`. - # config.generators.apply_rubocop_autocorrect_after_generate! end diff --git a/example_rails8/config/environments/production.rb b/example_rails_current/config/environments/production.rb similarity index 94% rename from example_rails8/config/environments/production.rb rename to example_rails_current/config/environments/production.rb index f5763e04..90824bc4 100644 --- a/example_rails8/config/environments/production.rb +++ b/example_rails_current/config/environments/production.rb @@ -25,10 +25,10 @@ config.active_storage.service = :local # Assume all access to the app is happening through a SSL-terminating reverse proxy. - # config.assume_ssl = true + config.assume_ssl = true # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. - # config.force_ssl = true + config.force_ssl = true # Skip http-to-https redirect for the default health check endpoint. # config.ssl_options = { redirect: { exclude: ->(request) { request.path == "/up" } } } @@ -47,11 +47,10 @@ config.active_support.report_deprecations = false # Replace the default in-process memory cache store with a durable alternative. - config.cache_store = :solid_cache_store + # config.cache_store = :mem_cache_store # Replace the default in-process and non-durable queuing backend for Active Job. - config.active_job.queue_adapter = :solid_queue - config.solid_queue.connects_to = { database: { writing: :queue } } + # config.active_job.queue_adapter = :resque # Ignore bad email addresses and do not raise email delivery errors. # Set this to true and configure the email server for immediate delivery to raise delivery errors. diff --git a/example_rails8/config/environments/test.rb b/example_rails_current/config/environments/test.rb similarity index 100% rename from example_rails8/config/environments/test.rb rename to example_rails_current/config/environments/test.rb diff --git a/example_rails8/config/initializers/assets.rb b/example_rails_current/config/initializers/assets.rb similarity index 100% rename from example_rails8/config/initializers/assets.rb rename to example_rails_current/config/initializers/assets.rb diff --git a/example_rails8/config/initializers/content_security_policy.rb b/example_rails_current/config/initializers/content_security_policy.rb similarity index 100% rename from example_rails8/config/initializers/content_security_policy.rb rename to example_rails_current/config/initializers/content_security_policy.rb diff --git a/example_rails8/config/initializers/filter_parameter_logging.rb b/example_rails_current/config/initializers/filter_parameter_logging.rb similarity index 100% rename from example_rails8/config/initializers/filter_parameter_logging.rb rename to example_rails_current/config/initializers/filter_parameter_logging.rb diff --git a/example_rails7/config/initializers/inflections.rb b/example_rails_current/config/initializers/inflections.rb similarity index 100% rename from example_rails7/config/initializers/inflections.rb rename to example_rails_current/config/initializers/inflections.rb diff --git a/example_rails7/config/locales/en.yml b/example_rails_current/config/locales/en.yml similarity index 100% rename from example_rails7/config/locales/en.yml rename to example_rails_current/config/locales/en.yml diff --git a/example_rails8/config/puma.rb b/example_rails_current/config/puma.rb similarity index 93% rename from example_rails8/config/puma.rb rename to example_rails_current/config/puma.rb index 38c4b865..1c317b41 100644 --- a/example_rails8/config/puma.rb +++ b/example_rails_current/config/puma.rb @@ -34,9 +34,6 @@ # Allow puma to be restarted by `bin/rails restart` command. plugin :tmp_restart -# Run the Solid Queue supervisor inside of Puma for single-server deployments. -plugin :solid_queue if ENV["SOLID_QUEUE_IN_PUMA"] - # Specify the PID file. Defaults to tmp/pids/server.pid in development. # In other environments, only set the PID file if requested. pidfile ENV["PIDFILE"] if ENV["PIDFILE"] diff --git a/example_rails8/config/routes.rb b/example_rails_current/config/routes.rb similarity index 100% rename from example_rails8/config/routes.rb rename to example_rails_current/config/routes.rb diff --git a/example_rails8/config/storage.yml b/example_rails_current/config/storage.yml similarity index 100% rename from example_rails8/config/storage.yml rename to example_rails_current/config/storage.yml diff --git a/example_rails7/db/seeds.rb b/example_rails_current/db/seeds.rb similarity index 100% rename from example_rails7/db/seeds.rb rename to example_rails_current/db/seeds.rb diff --git a/example_rails_current/lib/tasks/.keep b/example_rails_current/lib/tasks/.keep new file mode 100644 index 00000000..e69de29b diff --git a/example_rails8/package.json b/example_rails_current/package.json similarity index 63% rename from example_rails8/package.json rename to example_rails_current/package.json index bf9f084f..1bd39d96 100644 --- a/example_rails8/package.json +++ b/example_rails_current/package.json @@ -1,10 +1,9 @@ { "name": "app", "private": true, - "packageManager": "yarn@1.22.22+sha1.ac34549e6aa8e7ead463a7407e1c7390f61a6610", "devDependencies": { - "webpack": "^5.104.1", - "webpack-cli": "^6.0.1" + "webpack": "^5.105.4", + "webpack-cli": "^7.0.2" }, "scripts": { "build": "webpack --config webpack.config.js" diff --git a/example_rails8/public/400.html b/example_rails_current/public/400.html similarity index 100% rename from example_rails8/public/400.html rename to example_rails_current/public/400.html diff --git a/example_rails8/public/404.html b/example_rails_current/public/404.html similarity index 100% rename from example_rails8/public/404.html rename to example_rails_current/public/404.html diff --git a/example_rails8/public/406-unsupported-browser.html b/example_rails_current/public/406-unsupported-browser.html similarity index 100% rename from example_rails8/public/406-unsupported-browser.html rename to example_rails_current/public/406-unsupported-browser.html diff --git a/example_rails8/public/422.html b/example_rails_current/public/422.html similarity index 100% rename from example_rails8/public/422.html rename to example_rails_current/public/422.html diff --git a/example_rails8/public/500.html b/example_rails_current/public/500.html similarity index 100% rename from example_rails8/public/500.html rename to example_rails_current/public/500.html diff --git a/example_rails8/public/icon.png b/example_rails_current/public/icon.png similarity index 100% rename from example_rails8/public/icon.png rename to example_rails_current/public/icon.png diff --git a/example_rails8/public/icon.svg b/example_rails_current/public/icon.svg similarity index 100% rename from example_rails8/public/icon.svg rename to example_rails_current/public/icon.svg diff --git a/example_rails7/public/robots.txt b/example_rails_current/public/robots.txt similarity index 100% rename from example_rails7/public/robots.txt rename to example_rails_current/public/robots.txt diff --git a/example_rails_current/storage/.keep b/example_rails_current/storage/.keep new file mode 100644 index 00000000..e69de29b diff --git a/example_rails_current/vendor/.keep b/example_rails_current/vendor/.keep new file mode 100644 index 00000000..e69de29b diff --git a/example_rails7/webpack.config.js b/example_rails_current/webpack.config.js similarity index 100% rename from example_rails7/webpack.config.js rename to example_rails_current/webpack.config.js diff --git a/example_rails8/yarn.lock b/example_rails_current/yarn.lock similarity index 84% rename from example_rails8/yarn.lock rename to example_rails_current/yarn.lock index e5202d40..7832d18d 100644 --- a/example_rails8/yarn.lock +++ b/example_rails_current/yarn.lock @@ -2,10 +2,10 @@ # yarn lockfile v1 -"@discoveryjs/json-ext@^0.6.1": - version "0.6.3" - resolved "https://registry.yarnpkg.com/@discoveryjs/json-ext/-/json-ext-0.6.3.tgz#f13c7c205915eb91ae54c557f5e92bddd8be0e83" - integrity sha512-4B4OijXeVNOPZlYA2oEwWOTkzyltLao+xbotHQeqN++Rv27Y6s818+n2Qkp8q+Fxhn0t/5lA5X1Mxktud8eayQ== +"@discoveryjs/json-ext@^1.0.0": + version "1.0.0" + resolved "https://registry.yarnpkg.com/@discoveryjs/json-ext/-/json-ext-1.0.0.tgz#f75c08f88cfd9eb8d9b062284d5bbcc60c41bf2a" + integrity sha512-dDlz3W405VMFO4w5kIP9DOmELBcvFQGmLoKSdIRstBDubKFYwaNHV1NnlzMCQpXQFGWVALmeMORAuiLx18AvZQ== "@hotwired/stimulus@^3.2.2": version "3.2.2" @@ -91,11 +91,11 @@ integrity sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA== "@types/node@*": - version "25.2.0" - resolved "https://registry.yarnpkg.com/@types/node/-/node-25.2.0.tgz#015b7d228470c1dcbfc17fe9c63039d216b4d782" - integrity sha512-DZ8VwRFUNzuqJ5khrvwMXHmvPe+zGayJhr2CDNiKB1WBE1ST8Djl00D0IC4vvNmHMdj6DlbYRIaFE7WHjlDl5w== + version "25.5.0" + resolved "https://registry.yarnpkg.com/@types/node/-/node-25.5.0.tgz#5c99f37c443d9ccc4985866913f1ed364217da31" + integrity sha512-jp2P3tQMSxWugkCUKLRPVUpGaL5MVFwF8RDuSRztfwgN1wmqJeMSbKlnEtQqU8UrhTmzEmZdu2I6v2dpp7XIxw== dependencies: - undici-types "~7.16.0" + undici-types "~7.18.0" "@webassemblyjs/ast@1.14.1", "@webassemblyjs/ast@^1.14.1": version "1.14.1" @@ -218,21 +218,6 @@ "@webassemblyjs/ast" "1.14.1" "@xtuc/long" "4.2.2" -"@webpack-cli/configtest@^3.0.1": - version "3.0.1" - resolved "https://registry.yarnpkg.com/@webpack-cli/configtest/-/configtest-3.0.1.tgz#76ac285b9658fa642ce238c276264589aa2b6b57" - integrity sha512-u8d0pJ5YFgneF/GuvEiDA61Tf1VDomHHYMjv/wc9XzYj7nopltpG96nXN5dJRstxZhcNpV1g+nT6CydO7pHbjA== - -"@webpack-cli/info@^3.0.1": - version "3.0.1" - resolved "https://registry.yarnpkg.com/@webpack-cli/info/-/info-3.0.1.tgz#3cff37fabb7d4ecaab6a8a4757d3826cf5888c63" - integrity sha512-coEmDzc2u/ffMvuW9aCjoRzNSPDl/XLuhPdlFRpT9tZHmJ/039az33CE7uH+8s0uL1j5ZNtfdv0HkfaKRBGJsQ== - -"@webpack-cli/serve@^3.0.1": - version "3.0.1" - resolved "https://registry.yarnpkg.com/@webpack-cli/serve/-/serve-3.0.1.tgz#bd8b1f824d57e30faa19eb78e4c0951056f72f00" - integrity sha512-sbgw03xQaCLiT6gcY/6u3qBDn01CWw/nbaXl3gTdTFuJJ75Gffv3E3DBpgvY2fkkrdS1fpjaXNOmJlnbtKauKg== - "@xtuc/ieee754@^1.2.0": version "1.2.0" resolved "https://registry.yarnpkg.com/@xtuc/ieee754/-/ieee754-1.2.0.tgz#eef014a3145ae477a1cbc00cd1e552336dceb790" @@ -248,10 +233,10 @@ acorn-import-phases@^1.0.3: resolved "https://registry.yarnpkg.com/acorn-import-phases/-/acorn-import-phases-1.0.4.tgz#16eb850ba99a056cb7cbfe872ffb8972e18c8bd7" integrity sha512-wKmbr/DDiIXzEOiWrTTUcDm24kQ2vGfZQvM2fwg2vXqR5uW6aapr7ObPtj1th32b9u90/Pf4AItvdTh42fBmVQ== -acorn@^8.15.0: - version "8.15.0" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.15.0.tgz#a360898bc415edaac46c8241f6383975b930b816" - integrity sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg== +acorn@^8.15.0, acorn@^8.16.0: + version "8.16.0" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.16.0.tgz#4ce79c89be40afe7afe8f3adb902a1f1ce9ac08a" + integrity sha512-UVJyE9MttOsBQIDKw1skb9nAwQuR5wuGD3+82K6JgJlm/Y+KI92oNsMNGZCYdDsVtRHSak0pcV5Dno5+4jh9sw== ajv-formats@^2.1.1: version "2.1.1" @@ -268,9 +253,9 @@ ajv-keywords@^5.1.0: fast-deep-equal "^3.1.3" ajv@^8.0.0, ajv@^8.9.0: - version "8.17.1" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.17.1.tgz#37d9a5c776af6bc92d7f4f9510eba4c0a60d11a6" - integrity sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g== + version "8.18.0" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.18.0.tgz#8864186b6738d003eb3a933172bb3833e10cefbc" + integrity sha512-PlXPeEWMXMZ7sPYOHqmDyCJzcfNrUr3fGNKtezX14ykXOEIvyK81d+qydx89KY5O71FKMPaQ2vBfBFI5NHR63A== dependencies: fast-deep-equal "^3.1.3" fast-uri "^3.0.1" @@ -278,9 +263,9 @@ ajv@^8.0.0, ajv@^8.9.0: require-from-string "^2.0.2" baseline-browser-mapping@^2.9.0: - version "2.9.19" - resolved "https://registry.yarnpkg.com/baseline-browser-mapping/-/baseline-browser-mapping-2.9.19.tgz#3e508c43c46d961eb4d7d2e5b8d1dd0f9ee4f488" - integrity sha512-ipDqC8FrAl/76p2SSWKSI+H9tFwm7vYqXQrItCuiVPt26Km0jS+NzSsBWAaBusvSbQcfJG+JitdMm+wZAgTYqg== + version "2.10.8" + resolved "https://registry.yarnpkg.com/baseline-browser-mapping/-/baseline-browser-mapping-2.10.8.tgz#23d1cea1a85b181c2b8660b6cfe626dc2fb15630" + integrity sha512-PCLz/LXGBsNTErbtB6i5u4eLpHeMfi93aUv5duMmj6caNu6IphS4q6UevDnL36sZQv9lrP11dbPKGMaXPwMKfQ== browserslist@^4.28.1: version "4.28.1" @@ -299,9 +284,9 @@ buffer-from@^1.0.0: integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ== caniuse-lite@^1.0.30001759: - version "1.0.30001767" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001767.tgz#0279c498e862efb067938bba0a0aabafe8d0b730" - integrity sha512-34+zUAMhSH+r+9eKmYG+k2Rpt8XttfE4yXAjoZvkAPs15xcYQhyBYdalJ65BzivAvGRMViEjy6oKr/S91loekQ== + version "1.0.30001780" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001780.tgz#0e413de292808868a62ed9118822683fa120a110" + integrity sha512-llngX0E7nQci5BPJDqoZSbuZ5Bcs9F5db7EtgfwBerX9XGtkkiO4NwfDDIRzHTTwcYC8vC7bmeUEPGrKlR/TkQ== chrome-trace-event@^1.0.2: version "1.0.4" @@ -317,22 +302,17 @@ clone-deep@^4.0.1: kind-of "^6.0.2" shallow-clone "^3.0.0" -colorette@^2.0.14: - version "2.0.20" - resolved "https://registry.yarnpkg.com/colorette/-/colorette-2.0.20.tgz#9eb793e6833067f7235902fcd3b09917a000a95a" - integrity sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w== - -commander@^12.1.0: - version "12.1.0" - resolved "https://registry.yarnpkg.com/commander/-/commander-12.1.0.tgz#01423b36f501259fdaac4d0e4d60c96c991585d3" - integrity sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA== +commander@^14.0.3: + version "14.0.3" + resolved "https://registry.yarnpkg.com/commander/-/commander-14.0.3.tgz#425d79b48f9af82fcd9e4fc1ea8af6c5ec07bbc2" + integrity sha512-H+y0Jo/T1RZ9qPP4Eh1pkcQcLRglraJaSLoyOtHxu6AapkjWVCy2Sit1QQ4x3Dng8qDlSsZEet7g5Pq06MvTgw== commander@^2.20.0: version "2.20.3" resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== -cross-spawn@^7.0.3: +cross-spawn@^7.0.6: version "7.0.6" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.6.tgz#8a58fe78f00dcd70c370451759dfbfaf03e8ee9f" integrity sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA== @@ -342,17 +322,17 @@ cross-spawn@^7.0.3: which "^2.0.1" electron-to-chromium@^1.5.263: - version "1.5.283" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.5.283.tgz#51d492c37c2d845a0dccb113fe594880c8616de8" - integrity sha512-3vifjt1HgrGW/h76UEeny+adYApveS9dH2h3p57JYzBSXJIKUJAvtmIytDKjcSCt9xHfrNCFJ7gts6vkhuq++w== + version "1.5.321" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.5.321.tgz#57a80554e2e7fd65e3689d320f52a64723472d5d" + integrity sha512-L2C7Q279W2D/J4PLZLk7sebOILDSWos7bMsMNN06rK482umHUrh/3lM8G7IlHFOYip2oAg5nha1rCMxr/rs6ZQ== -enhanced-resolve@^5.17.4: - version "5.18.4" - resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.18.4.tgz#c22d33055f3952035ce6a144ce092447c525f828" - integrity sha512-LgQMM4WXU3QI+SYgEc2liRgznaD5ojbmY3sb8LxyguVkIg5FxdpTkvk72te2R38/TGKxH634oLxXRGY6d7AP+Q== +enhanced-resolve@^5.20.0: + version "5.20.1" + resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.20.1.tgz#eeeb3966bea62c348c40a0cc9e7912e2557d0be0" + integrity sha512-Qohcme7V1inbAfvjItgw0EaxVX5q2rdVEZHRBrEQdRZTssLDGsL8Lwrznl8oQ/6kuTJONLaDcGjkNP247XEhcA== dependencies: graceful-fs "^4.2.4" - tapable "^2.2.0" + tapable "^2.3.0" envinfo@^7.14.0: version "7.21.0" @@ -550,9 +530,9 @@ neo-async@^2.6.2: integrity sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw== node-releases@^2.0.27: - version "2.0.27" - resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.27.tgz#eedca519205cf20f650f61d56b070db111231e4e" - integrity sha512-nmh3lCkYZ3grZvqcCH+fjmQ7X+H0OeZgP40OierEaAptX4XofMh5kwNbWh7lBduUzCcV/8kZ+NDLCwm2iorIlA== + version "2.0.36" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.36.tgz#99fd6552aaeda9e17c4713b57a63964a2e325e9d" + integrity sha512-TdC8FSgHz8Mwtw9g5L4gR/Sh9XhSP/0DEkQxfEFXOpiul5IiHgHan2VhYYb6agDSfp4KuvltmGApc8HMgUrIkA== p-limit@^2.2.0: version "2.3.0" @@ -600,13 +580,6 @@ pkg-dir@^4.2.0: dependencies: find-up "^4.0.0" -randombytes@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a" - integrity sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ== - dependencies: - safe-buffer "^5.1.0" - rechoir@^0.8.0: version "0.8.0" resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.8.0.tgz#49f866e0d32146142da3ad8f0eff352b3215ff22" @@ -640,11 +613,6 @@ resolve@^1.20.0: path-parse "^1.0.7" supports-preserve-symlinks-flag "^1.0.0" -safe-buffer@^5.1.0: - version "5.2.1" - resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" - integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== - schema-utils@^4.3.0, schema-utils@^4.3.3: version "4.3.3" resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-4.3.3.tgz#5b1850912fa31df90716963d45d9121fdfc09f46" @@ -655,13 +623,6 @@ schema-utils@^4.3.0, schema-utils@^4.3.3: ajv-formats "^2.1.1" ajv-keywords "^5.1.0" -serialize-javascript@^6.0.2: - version "6.0.2" - resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-6.0.2.tgz#defa1e055c83bf6d59ea805d8da862254eb6a6c2" - integrity sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g== - dependencies: - randombytes "^2.1.0" - shallow-clone@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/shallow-clone/-/shallow-clone-3.0.1.tgz#8f2981ad92531f55035b01fb230769a40e02efa3" @@ -706,36 +667,35 @@ supports-preserve-symlinks-flag@^1.0.0: resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09" integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== -tapable@^2.2.0, tapable@^2.3.0: +tapable@^2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/tapable/-/tapable-2.3.0.tgz#7e3ea6d5ca31ba8e078b560f0d83ce9a14aa8be6" integrity sha512-g9ljZiwki/LfxmQADO3dEY1CbpmXT5Hm2fJ+QaGKwSXUylMybePR7/67YW7jOrrvjEgL1Fmz5kzyAjWVWLlucg== -terser-webpack-plugin@^5.3.16: - version "5.3.16" - resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-5.3.16.tgz#741e448cc3f93d8026ebe4f7ef9e4afacfd56330" - integrity sha512-h9oBFCWrq78NyWWVcSwZarJkZ01c2AyGrzs1crmHZO3QUg9D61Wu4NPjBy69n7JqylFF5y+CsUZYmYEIZ3mR+Q== +terser-webpack-plugin@^5.3.17: + version "5.4.0" + resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-5.4.0.tgz#95fc4cf4437e587be11ecf37d08636089174d76b" + integrity sha512-Bn5vxm48flOIfkdl5CaD2+1CiUVbonWQ3KQPyP7/EuIl9Gbzq/gQFOzaMFUEgVjB1396tcK0SG8XcNJ/2kDH8g== dependencies: "@jridgewell/trace-mapping" "^0.3.25" jest-worker "^27.4.5" schema-utils "^4.3.0" - serialize-javascript "^6.0.2" terser "^5.31.1" terser@^5.31.1: - version "5.46.0" - resolved "https://registry.yarnpkg.com/terser/-/terser-5.46.0.tgz#1b81e560d584bbdd74a8ede87b4d9477b0ff9695" - integrity sha512-jTwoImyr/QbOWFFso3YoU3ik0jBBDJ6JTOQiy/J2YxVJdZCc+5u7skhNwiOR3FQIygFqVUPHl7qbbxtjW2K3Qg== + version "5.46.1" + resolved "https://registry.yarnpkg.com/terser/-/terser-5.46.1.tgz#40e4b1e35d5f13130f82793a8b3eeb7ec3a92eee" + integrity sha512-vzCjQO/rgUuK9sf8VJZvjqiqiHFaZLnOiimmUuOKODxWL8mm/xua7viT7aqX7dgPY60otQjUotzFMmCB4VdmqQ== dependencies: "@jridgewell/source-map" "^0.3.3" acorn "^8.15.0" commander "^2.20.0" source-map-support "~0.5.20" -undici-types@~7.16.0: - version "7.16.0" - resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-7.16.0.tgz#ffccdff36aea4884cbfce9a750a0580224f58a46" - integrity sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw== +undici-types@~7.18.0: + version "7.18.2" + resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-7.18.2.tgz#29357a89e7b7ca4aef3bf0fd3fd0cd73884229e9" + integrity sha512-AsuCzffGHJybSaRrmr5eHr81mwJU3kjw6M+uprWvCXiNeN9SOGwQ3Jn8jb8m3Z6izVgknn1R0FTCEAP2QrLY/w== update-browserslist-db@^1.2.0: version "1.2.3" @@ -745,7 +705,7 @@ update-browserslist-db@^1.2.0: escalade "^3.2.0" picocolors "^1.1.1" -watchpack@^2.4.4: +watchpack@^2.5.1: version "2.5.1" resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-2.5.1.tgz#dd38b601f669e0cbf567cb802e75cead82cde102" integrity sha512-Zn5uXdcFNIA1+1Ei5McRd+iRzfhENPCe7LeABkJtNulSxjma+l7ltNx55BWZkRlwRnpOgHqxnjyaDgJnNXnqzg== @@ -753,18 +713,14 @@ watchpack@^2.4.4: glob-to-regexp "^0.4.1" graceful-fs "^4.1.2" -webpack-cli@^6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/webpack-cli/-/webpack-cli-6.0.1.tgz#a1ce25da5ba077151afd73adfa12e208e5089207" - integrity sha512-MfwFQ6SfwinsUVi0rNJm7rHZ31GyTcpVE5pgVA3hwFRb7COD4TzjUUwhGWKfO50+xdc2MQPuEBBJoqIMGt3JDw== - dependencies: - "@discoveryjs/json-ext" "^0.6.1" - "@webpack-cli/configtest" "^3.0.1" - "@webpack-cli/info" "^3.0.1" - "@webpack-cli/serve" "^3.0.1" - colorette "^2.0.14" - commander "^12.1.0" - cross-spawn "^7.0.3" +webpack-cli@^7.0.2: + version "7.0.2" + resolved "https://registry.yarnpkg.com/webpack-cli/-/webpack-cli-7.0.2.tgz#c916e324acc7c14f895226ed351020924900db12" + integrity sha512-dB0R4T+C/8YuvM+fabdvil6QE44/ChDXikV5lOOkrUeCkW5hTJv2pGLE3keh+D5hjYw8icBaJkZzpFoaHV4T+g== + dependencies: + "@discoveryjs/json-ext" "^1.0.0" + commander "^14.0.3" + cross-spawn "^7.0.6" envinfo "^7.14.0" fastest-levenshtein "^1.0.12" import-local "^3.0.2" @@ -781,15 +737,15 @@ webpack-merge@^6.0.1: flat "^5.0.2" wildcard "^2.0.1" -webpack-sources@^3.3.3: - version "3.3.3" - resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-3.3.3.tgz#d4bf7f9909675d7a070ff14d0ef2a4f3c982c723" - integrity sha512-yd1RBzSGanHkitROoPFd6qsrxt+oFhg/129YzheDGqeustzX0vTZJZsSsQjVQC4yzBQ56K55XU8gaNCtIzOnTg== +webpack-sources@^3.3.4: + version "3.3.4" + resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-3.3.4.tgz#a338b95eb484ecc75fbb196cbe8a2890618b4891" + integrity sha512-7tP1PdV4vF+lYPnkMR0jMY5/la2ub5Fc/8VQrrU+lXkiM6C4TjVfGw7iKfyhnTQOsD+6Q/iKw0eFciziRgD58Q== -webpack@^5.104.1: - version "5.104.1" - resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.104.1.tgz#94bd41eb5dbf06e93be165ba8be41b8260d4fb1a" - integrity sha512-Qphch25abbMNtekmEGJmeRUhLDbe+QfiWTiqpKYkpCOWY64v9eyl+KRRLmqOFA2AvKPpc9DC6+u2n76tQLBoaA== +webpack@^5.105.4: + version "5.105.4" + resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.105.4.tgz#1b77fcd55a985ac7ca9de80a746caffa38220169" + integrity sha512-jTywjboN9aHxFlToqb0K0Zs9SbBoW4zRUlGzI2tYNxVYcEi/IPpn+Xi4ye5jTLvX2YeLuic/IvxNot+Q1jMoOw== dependencies: "@types/eslint-scope" "^3.7.7" "@types/estree" "^1.0.8" @@ -797,11 +753,11 @@ webpack@^5.104.1: "@webassemblyjs/ast" "^1.14.1" "@webassemblyjs/wasm-edit" "^1.14.1" "@webassemblyjs/wasm-parser" "^1.14.1" - acorn "^8.15.0" + acorn "^8.16.0" acorn-import-phases "^1.0.3" browserslist "^4.28.1" chrome-trace-event "^1.0.2" - enhanced-resolve "^5.17.4" + enhanced-resolve "^5.20.0" es-module-lexer "^2.0.0" eslint-scope "5.1.1" events "^3.2.0" @@ -813,9 +769,9 @@ webpack@^5.104.1: neo-async "^2.6.2" schema-utils "^4.3.3" tapable "^2.3.0" - terser-webpack-plugin "^5.3.16" - watchpack "^2.4.4" - webpack-sources "^3.3.3" + terser-webpack-plugin "^5.3.17" + watchpack "^2.5.1" + webpack-sources "^3.3.4" which@^2.0.1: version "2.0.2" diff --git a/example_rails7/.dockerignore b/example_rails_legacy/.dockerignore similarity index 100% rename from example_rails7/.dockerignore rename to example_rails_legacy/.dockerignore diff --git a/example_rails7/.github/dependabot.yml b/example_rails_legacy/.github/dependabot.yml similarity index 100% rename from example_rails7/.github/dependabot.yml rename to example_rails_legacy/.github/dependabot.yml diff --git a/example_rails7/.github/workflows/ci.yml b/example_rails_legacy/.github/workflows/ci.yml similarity index 100% rename from example_rails7/.github/workflows/ci.yml rename to example_rails_legacy/.github/workflows/ci.yml diff --git a/example_rails7/.node-version b/example_rails_legacy/.node-version similarity index 100% rename from example_rails7/.node-version rename to example_rails_legacy/.node-version diff --git a/example_rails7/.rubocop.yml b/example_rails_legacy/.rubocop.yml similarity index 100% rename from example_rails7/.rubocop.yml rename to example_rails_legacy/.rubocop.yml diff --git a/example_rails7/.ruby-version b/example_rails_legacy/.ruby-version similarity index 100% rename from example_rails7/.ruby-version rename to example_rails_legacy/.ruby-version diff --git a/example_rails7/Dockerfile b/example_rails_legacy/Dockerfile similarity index 100% rename from example_rails7/Dockerfile rename to example_rails_legacy/Dockerfile diff --git a/example_rails7/Gemfile b/example_rails_legacy/Gemfile similarity index 97% rename from example_rails7/Gemfile rename to example_rails_legacy/Gemfile index b236aa64..76695897 100644 --- a/example_rails7/Gemfile +++ b/example_rails_legacy/Gemfile @@ -54,4 +54,4 @@ group :test do gem "selenium-webdriver" end -gem "rolemodel_rails", "> 0.20", group: :development, path: ".." +gem "rolemodel-rails", ">= 1.0", group: :development, path: ".." diff --git a/example_rails7/Gemfile.lock b/example_rails_legacy/Gemfile.lock similarity index 99% rename from example_rails7/Gemfile.lock rename to example_rails_legacy/Gemfile.lock index 600631d8..8c77634d 100644 --- a/example_rails7/Gemfile.lock +++ b/example_rails_legacy/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: .. specs: - rolemodel_rails (0.27.2) + rolemodel-rails (1.0.0) rails (> 7.1) GEM @@ -333,7 +333,7 @@ DEPENDENCIES pg (~> 1.1) puma (>= 5.0) rails (~> 7.2.2, >= 7.2.2.1) - rolemodel_rails (> 0.20)! + rolemodel-rails (>= 1.0)! rubocop-rails-omakase selenium-webdriver sprockets-rails @@ -343,4 +343,4 @@ DEPENDENCIES web-console BUNDLED WITH - 4.0.5 + 4.0.8 diff --git a/example_rails8/Procfile.dev b/example_rails_legacy/Procfile.dev similarity index 100% rename from example_rails8/Procfile.dev rename to example_rails_legacy/Procfile.dev diff --git a/example_rails8/README.md b/example_rails_legacy/README.md similarity index 100% rename from example_rails8/README.md rename to example_rails_legacy/README.md diff --git a/example_rails8/Rakefile b/example_rails_legacy/Rakefile similarity index 100% rename from example_rails8/Rakefile rename to example_rails_legacy/Rakefile diff --git a/example_rails7/app/assets/config/manifest.js b/example_rails_legacy/app/assets/config/manifest.js similarity index 100% rename from example_rails7/app/assets/config/manifest.js rename to example_rails_legacy/app/assets/config/manifest.js diff --git a/example_rails7/app/assets/stylesheets/application.css b/example_rails_legacy/app/assets/stylesheets/application.css similarity index 100% rename from example_rails7/app/assets/stylesheets/application.css rename to example_rails_legacy/app/assets/stylesheets/application.css diff --git a/example_rails7/app/channels/application_cable/channel.rb b/example_rails_legacy/app/channels/application_cable/channel.rb similarity index 100% rename from example_rails7/app/channels/application_cable/channel.rb rename to example_rails_legacy/app/channels/application_cable/channel.rb diff --git a/example_rails7/app/channels/application_cable/connection.rb b/example_rails_legacy/app/channels/application_cable/connection.rb similarity index 100% rename from example_rails7/app/channels/application_cable/connection.rb rename to example_rails_legacy/app/channels/application_cable/connection.rb diff --git a/example_rails8/app/controllers/application_controller.rb b/example_rails_legacy/app/controllers/application_controller.rb similarity index 100% rename from example_rails8/app/controllers/application_controller.rb rename to example_rails_legacy/app/controllers/application_controller.rb diff --git a/example_rails8/app/helpers/application_helper.rb b/example_rails_legacy/app/helpers/application_helper.rb similarity index 100% rename from example_rails8/app/helpers/application_helper.rb rename to example_rails_legacy/app/helpers/application_helper.rb diff --git a/example_rails8/app/javascript/application.js b/example_rails_legacy/app/javascript/application.js similarity index 100% rename from example_rails8/app/javascript/application.js rename to example_rails_legacy/app/javascript/application.js diff --git a/example_rails8/app/javascript/controllers/application.js b/example_rails_legacy/app/javascript/controllers/application.js similarity index 100% rename from example_rails8/app/javascript/controllers/application.js rename to example_rails_legacy/app/javascript/controllers/application.js diff --git a/example_rails8/app/javascript/controllers/hello_controller.js b/example_rails_legacy/app/javascript/controllers/hello_controller.js similarity index 100% rename from example_rails8/app/javascript/controllers/hello_controller.js rename to example_rails_legacy/app/javascript/controllers/hello_controller.js diff --git a/example_rails8/app/javascript/controllers/index.js b/example_rails_legacy/app/javascript/controllers/index.js similarity index 100% rename from example_rails8/app/javascript/controllers/index.js rename to example_rails_legacy/app/javascript/controllers/index.js diff --git a/example_rails8/app/jobs/application_job.rb b/example_rails_legacy/app/jobs/application_job.rb similarity index 100% rename from example_rails8/app/jobs/application_job.rb rename to example_rails_legacy/app/jobs/application_job.rb diff --git a/example_rails8/app/mailers/application_mailer.rb b/example_rails_legacy/app/mailers/application_mailer.rb similarity index 100% rename from example_rails8/app/mailers/application_mailer.rb rename to example_rails_legacy/app/mailers/application_mailer.rb diff --git a/example_rails8/app/models/application_record.rb b/example_rails_legacy/app/models/application_record.rb similarity index 100% rename from example_rails8/app/models/application_record.rb rename to example_rails_legacy/app/models/application_record.rb diff --git a/example_rails7/app/views/layouts/application.html.erb b/example_rails_legacy/app/views/layouts/application.html.erb similarity index 100% rename from example_rails7/app/views/layouts/application.html.erb rename to example_rails_legacy/app/views/layouts/application.html.erb diff --git a/example_rails8/app/views/layouts/mailer.html.erb b/example_rails_legacy/app/views/layouts/mailer.html.erb similarity index 100% rename from example_rails8/app/views/layouts/mailer.html.erb rename to example_rails_legacy/app/views/layouts/mailer.html.erb diff --git a/example_rails8/app/views/layouts/mailer.text.erb b/example_rails_legacy/app/views/layouts/mailer.text.erb similarity index 100% rename from example_rails8/app/views/layouts/mailer.text.erb rename to example_rails_legacy/app/views/layouts/mailer.text.erb diff --git a/example_rails7/app/views/pwa/manifest.json.erb b/example_rails_legacy/app/views/pwa/manifest.json.erb similarity index 100% rename from example_rails7/app/views/pwa/manifest.json.erb rename to example_rails_legacy/app/views/pwa/manifest.json.erb diff --git a/example_rails8/app/views/pwa/service-worker.js b/example_rails_legacy/app/views/pwa/service-worker.js similarity index 100% rename from example_rails8/app/views/pwa/service-worker.js rename to example_rails_legacy/app/views/pwa/service-worker.js diff --git a/example_rails7/bin/brakeman b/example_rails_legacy/bin/brakeman similarity index 100% rename from example_rails7/bin/brakeman rename to example_rails_legacy/bin/brakeman diff --git a/example_rails8/bin/dev b/example_rails_legacy/bin/dev similarity index 100% rename from example_rails8/bin/dev rename to example_rails_legacy/bin/dev diff --git a/example_rails7/bin/docker-entrypoint b/example_rails_legacy/bin/docker-entrypoint similarity index 100% rename from example_rails7/bin/docker-entrypoint rename to example_rails_legacy/bin/docker-entrypoint diff --git a/example_rails8/bin/rails b/example_rails_legacy/bin/rails similarity index 100% rename from example_rails8/bin/rails rename to example_rails_legacy/bin/rails diff --git a/example_rails8/bin/rake b/example_rails_legacy/bin/rake similarity index 100% rename from example_rails8/bin/rake rename to example_rails_legacy/bin/rake diff --git a/example_rails7/bin/rubocop b/example_rails_legacy/bin/rubocop similarity index 100% rename from example_rails7/bin/rubocop rename to example_rails_legacy/bin/rubocop diff --git a/example_rails7/bin/setup b/example_rails_legacy/bin/setup similarity index 100% rename from example_rails7/bin/setup rename to example_rails_legacy/bin/setup diff --git a/example_rails8/config.ru b/example_rails_legacy/config.ru similarity index 100% rename from example_rails8/config.ru rename to example_rails_legacy/config.ru diff --git a/example_rails7/config/application.rb b/example_rails_legacy/config/application.rb similarity index 100% rename from example_rails7/config/application.rb rename to example_rails_legacy/config/application.rb diff --git a/example_rails7/config/boot.rb b/example_rails_legacy/config/boot.rb similarity index 100% rename from example_rails7/config/boot.rb rename to example_rails_legacy/config/boot.rb diff --git a/example_rails7/config/cable.yml b/example_rails_legacy/config/cable.yml similarity index 75% rename from example_rails7/config/cable.yml rename to example_rails_legacy/config/cable.yml index 04c85c31..281ef9b2 100644 --- a/example_rails7/config/cable.yml +++ b/example_rails_legacy/config/cable.yml @@ -7,4 +7,4 @@ test: production: adapter: redis url: <%= ENV.fetch("REDIS_URL") { "redis://localhost:6379/1" } %> - channel_prefix: example_rails7_production + channel_prefix: example_rails_legacy_production diff --git a/example_rails7/config/database.yml b/example_rails_legacy/config/database.yml similarity index 91% rename from example_rails7/config/database.yml rename to example_rails_legacy/config/database.yml index b0f8c734..52b4fe59 100644 --- a/example_rails7/config/database.yml +++ b/example_rails_legacy/config/database.yml @@ -22,13 +22,13 @@ default: &default development: <<: *default - database: example_rails7_development + database: example_rails_legacy_development # The specified database role being used to connect to PostgreSQL. # To create additional roles in PostgreSQL see `$ createuser --help`. # When left blank, PostgreSQL will use the default role. This is # the same name as the operating system user running Rails. - #username: example_rails7 + #username: example_rails_legacy # The password associated with the PostgreSQL role (username). #password: @@ -56,7 +56,7 @@ development: # Do not set this db to the same as development or production. test: <<: *default - database: example_rails7_test + database: example_rails_legacy_test # As with config/credentials.yml, you never want to store sensitive information, # like your database password, in your source code. If your source code is @@ -80,6 +80,6 @@ test: # production: <<: *default - database: example_rails7_production - username: example_rails7 - password: <%= ENV["EXAMPLE_RAILS7_DATABASE_PASSWORD"] %> + database: example_rails_legacy_production + username: example_rails_legacy + password: <%= ENV["EXAMPLE_RAILS_LEGACY_DATABASE_PASSWORD"] %> diff --git a/example_rails8/config/environment.rb b/example_rails_legacy/config/environment.rb similarity index 100% rename from example_rails8/config/environment.rb rename to example_rails_legacy/config/environment.rb diff --git a/example_rails7/config/environments/development.rb b/example_rails_legacy/config/environments/development.rb similarity index 100% rename from example_rails7/config/environments/development.rb rename to example_rails_legacy/config/environments/development.rb diff --git a/example_rails7/config/environments/production.rb b/example_rails_legacy/config/environments/production.rb similarity index 98% rename from example_rails7/config/environments/production.rb rename to example_rails_legacy/config/environments/production.rb index b58d2b4b..449a50c6 100644 --- a/example_rails7/config/environments/production.rb +++ b/example_rails_legacy/config/environments/production.rb @@ -72,7 +72,7 @@ # Use a real queuing backend for Active Job (and separate queues per environment). # config.active_job.queue_adapter = :resque - # config.active_job.queue_name_prefix = "example_rails7_production" + # config.active_job.queue_name_prefix = "example_rails_legacy_production" # Disable caching for Action Mailer templates even if Action Controller # caching is enabled. diff --git a/example_rails7/config/environments/test.rb b/example_rails_legacy/config/environments/test.rb similarity index 100% rename from example_rails7/config/environments/test.rb rename to example_rails_legacy/config/environments/test.rb diff --git a/example_rails7/config/initializers/assets.rb b/example_rails_legacy/config/initializers/assets.rb similarity index 100% rename from example_rails7/config/initializers/assets.rb rename to example_rails_legacy/config/initializers/assets.rb diff --git a/example_rails7/config/initializers/content_security_policy.rb b/example_rails_legacy/config/initializers/content_security_policy.rb similarity index 100% rename from example_rails7/config/initializers/content_security_policy.rb rename to example_rails_legacy/config/initializers/content_security_policy.rb diff --git a/example_rails7/config/initializers/filter_parameter_logging.rb b/example_rails_legacy/config/initializers/filter_parameter_logging.rb similarity index 100% rename from example_rails7/config/initializers/filter_parameter_logging.rb rename to example_rails_legacy/config/initializers/filter_parameter_logging.rb diff --git a/example_rails8/config/initializers/inflections.rb b/example_rails_legacy/config/initializers/inflections.rb similarity index 100% rename from example_rails8/config/initializers/inflections.rb rename to example_rails_legacy/config/initializers/inflections.rb diff --git a/example_rails7/config/initializers/permissions_policy.rb b/example_rails_legacy/config/initializers/permissions_policy.rb similarity index 100% rename from example_rails7/config/initializers/permissions_policy.rb rename to example_rails_legacy/config/initializers/permissions_policy.rb diff --git a/example_rails8/config/locales/en.yml b/example_rails_legacy/config/locales/en.yml similarity index 100% rename from example_rails8/config/locales/en.yml rename to example_rails_legacy/config/locales/en.yml diff --git a/example_rails7/config/puma.rb b/example_rails_legacy/config/puma.rb similarity index 100% rename from example_rails7/config/puma.rb rename to example_rails_legacy/config/puma.rb diff --git a/example_rails7/config/routes.rb b/example_rails_legacy/config/routes.rb similarity index 100% rename from example_rails7/config/routes.rb rename to example_rails_legacy/config/routes.rb diff --git a/example_rails7/config/storage.yml b/example_rails_legacy/config/storage.yml similarity index 100% rename from example_rails7/config/storage.yml rename to example_rails_legacy/config/storage.yml diff --git a/example_rails8/db/seeds.rb b/example_rails_legacy/db/seeds.rb similarity index 100% rename from example_rails8/db/seeds.rb rename to example_rails_legacy/db/seeds.rb diff --git a/example_rails7/package.json b/example_rails_legacy/package.json similarity index 100% rename from example_rails7/package.json rename to example_rails_legacy/package.json diff --git a/example_rails7/public/404.html b/example_rails_legacy/public/404.html similarity index 100% rename from example_rails7/public/404.html rename to example_rails_legacy/public/404.html diff --git a/example_rails7/public/406-unsupported-browser.html b/example_rails_legacy/public/406-unsupported-browser.html similarity index 100% rename from example_rails7/public/406-unsupported-browser.html rename to example_rails_legacy/public/406-unsupported-browser.html diff --git a/example_rails7/public/422.html b/example_rails_legacy/public/422.html similarity index 100% rename from example_rails7/public/422.html rename to example_rails_legacy/public/422.html diff --git a/example_rails7/public/500.html b/example_rails_legacy/public/500.html similarity index 100% rename from example_rails7/public/500.html rename to example_rails_legacy/public/500.html diff --git a/example_rails7/public/icon.png b/example_rails_legacy/public/icon.png similarity index 100% rename from example_rails7/public/icon.png rename to example_rails_legacy/public/icon.png diff --git a/example_rails7/public/icon.svg b/example_rails_legacy/public/icon.svg similarity index 100% rename from example_rails7/public/icon.svg rename to example_rails_legacy/public/icon.svg diff --git a/example_rails8/public/robots.txt b/example_rails_legacy/public/robots.txt similarity index 100% rename from example_rails8/public/robots.txt rename to example_rails_legacy/public/robots.txt diff --git a/example_rails7/test/application_system_test_case.rb b/example_rails_legacy/test/application_system_test_case.rb similarity index 100% rename from example_rails7/test/application_system_test_case.rb rename to example_rails_legacy/test/application_system_test_case.rb diff --git a/example_rails7/test/channels/application_cable/connection_test.rb b/example_rails_legacy/test/channels/application_cable/connection_test.rb similarity index 100% rename from example_rails7/test/channels/application_cable/connection_test.rb rename to example_rails_legacy/test/channels/application_cable/connection_test.rb diff --git a/example_rails7/test/test_helper.rb b/example_rails_legacy/test/test_helper.rb similarity index 100% rename from example_rails7/test/test_helper.rb rename to example_rails_legacy/test/test_helper.rb diff --git a/example_rails8/webpack.config.js b/example_rails_legacy/webpack.config.js similarity index 100% rename from example_rails8/webpack.config.js rename to example_rails_legacy/webpack.config.js diff --git a/example_rails7/yarn.lock b/example_rails_legacy/yarn.lock similarity index 100% rename from example_rails7/yarn.lock rename to example_rails_legacy/yarn.lock diff --git a/lib/generators/rolemodel.rb b/lib/generators/rolemodel.rb deleted file mode 100644 index e6bc5754..00000000 --- a/lib/generators/rolemodel.rb +++ /dev/null @@ -1,25 +0,0 @@ -require 'rails' -require 'pathname' -require 'rails/generators' -require 'rails/generators/bundle_helper' -require_relative 'rolemodel/replace_content_helper' - -module Rolemodel - RUBY_VERSION = Pathname.pwd.join('.ruby-version').read.strip - NODE_VERSION = Pathname.pwd.join('.node-version').read.strip - - class BaseGenerator < Rails::Generators::Base - include Rails::Generators::BundleHelper - include ReplaceContentHelper - - private - # based on https://github.com/rails/rails/blob/main/railties/lib/rails/generators/app_base.rb#L713 - def run_bundle - bundle_command("install --quiet", "BUNDLE_IGNORE_MESSAGES" => "1") - end - end - - Dir['lib/generators/rolemodel/**/*.rb'].each do |file| - load file if file.end_with?('_generator.rb') - end -end diff --git a/lib/generators/rolemodel/base_generator.rb b/lib/generators/rolemodel/base_generator.rb new file mode 100644 index 00000000..ebfe333d --- /dev/null +++ b/lib/generators/rolemodel/base_generator.rb @@ -0,0 +1,16 @@ +# frozen_string_literal: true + +require 'rails/generators/base' +require 'rails/generators/bundle_helper' +require_relative 'replace_content_helper' + +class Rolemodel::BaseGenerator < Rails::Generators::Base + include Rails::Generators::BundleHelper, + Rolemodel::ReplaceContentHelper + + private + # based on https://github.com/rails/rails/blob/main/railties/lib/rails/generators/app_base.rb#L713 + def run_bundle + bundle_command("install --quiet", "BUNDLE_IGNORE_MESSAGES" => "1") + end +end diff --git a/lib/rolemodel-rails.rb b/lib/rolemodel-rails.rb new file mode 100644 index 00000000..d6ccc1df --- /dev/null +++ b/lib/rolemodel-rails.rb @@ -0,0 +1,9 @@ +# frozen_string_literal: true + +module Rolemodel + NODE_VERSION = '24.12.0' + RUBY_VERSION = '4.0.1' +end + +require 'rolemodel/version' +require 'rolemodel/engine' diff --git a/lib/rolemodel/engine.rb b/lib/rolemodel/engine.rb new file mode 100644 index 00000000..d63f12cf --- /dev/null +++ b/lib/rolemodel/engine.rb @@ -0,0 +1,9 @@ +# frozen_string_literal: true + +module Rolemodel + class Engine < ::Rails::Engine + generators do + require 'generators/rolemodel/base_generator' + end + end +end diff --git a/lib/rolemodel/version.rb b/lib/rolemodel/version.rb new file mode 100644 index 00000000..55225818 --- /dev/null +++ b/lib/rolemodel/version.rb @@ -0,0 +1,5 @@ +# frozen_string_literal: true + +module Rolemodel + VERSION = '1.0.0' +end diff --git a/lib/rolemodel_rails.rb b/lib/rolemodel_rails.rb deleted file mode 100644 index 31feaac3..00000000 --- a/lib/rolemodel_rails.rb +++ /dev/null @@ -1,6 +0,0 @@ -require "rolemodel_rails/version" -require "generators/rolemodel" - -module RolemodelRails - # Your code goes here... -end diff --git a/lib/rolemodel_rails/version.rb b/lib/rolemodel_rails/version.rb deleted file mode 100644 index bf9f6c19..00000000 --- a/lib/rolemodel_rails/version.rb +++ /dev/null @@ -1,5 +0,0 @@ -# frozen_string_literal: true - -module RolemodelRails - VERSION = '0.27.2' -end diff --git a/rolemodel_rails.gemspec b/rolemodel-rails.gemspec similarity index 66% rename from rolemodel_rails.gemspec rename to rolemodel-rails.gemspec index d2703617..86b7962e 100644 --- a/rolemodel_rails.gemspec +++ b/rolemodel-rails.gemspec @@ -1,17 +1,13 @@ -# frozen_string_literal: true - -lib = File.expand_path('lib', __dir__) -$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) -require 'rolemodel_rails/version' +require_relative 'lib/rolemodel/version' Gem::Specification.new do |spec| - spec.name = 'rolemodel_rails' - spec.version = RolemodelRails::VERSION + spec.name = 'rolemodel-rails' + spec.version = Rolemodel::VERSION spec.authors = ['RoleModel Software Inc'] spec.email = ['it-support@rolemodelsoftware.com'] - spec.summary = 'Rails generators for RoleModel Software project setup.' - spec.description = 'A collection of Rails generators to set up a Rails project with the recommended configuration for RoleModel Software projects.' + spec.summary = 'The RoleModel Way of building Rails apps.' + spec.description = 'A collection of executable best practices for common aspects of Rails application development.' spec.homepage = 'https://github.com/RoleModel/rolemodel_rails' spec.license = 'MIT' diff --git a/spec/generators/rolemodel/github_generator_spec.rb b/spec/generators/rolemodel/github_generator_spec.rb index fcc22291..6d2497b0 100644 --- a/spec/generators/rolemodel/github_generator_spec.rb +++ b/spec/generators/rolemodel/github_generator_spec.rb @@ -28,7 +28,7 @@ it 'creates github pull request template' do assert_file '.github/pull_request_template.md' do |content| - expect(content).not_to include('Update version number in `lib/rolemodel_rails/version.rb`') + expect(content).not_to include('Update version number in `lib/rolemodel/version.rb`') end assert_file '.github/instructions/css.instructions.md' diff --git a/spec/rolemodel_rails_spec.rb b/spec/rolemodel_rails_spec.rb index e4c4ed1c..d871527a 100644 --- a/spec/rolemodel_rails_spec.rb +++ b/spec/rolemodel_rails_spec.rb @@ -1,5 +1,5 @@ -RSpec.describe RolemodelRails do +RSpec.describe Rolemodel do it "has a version number" do - expect(RolemodelRails::VERSION).not_to be nil + expect(Rolemodel::VERSION).not_to be nil end end diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index a6fa1724..56d7e19f 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -1,7 +1,13 @@ +# frozen_string_literal: true + +require 'rails' require 'bundler/setup' require 'generator_spec' +require 'rolemodel-rails' require_relative 'support/helpers' -require 'generators/rolemodel' + +require 'generators/rolemodel/base_generator' +Dir[File.expand_path('lib/generators/**/*_generator.rb')].each { require it } RSpec.configure do |config| # Enable flags like --only-failures and --next-failure diff --git a/spec/support/helpers/example_app.rb b/spec/support/helpers/example_app.rb index c6c19eab..c173cade 100644 --- a/spec/support/helpers/example_app.rb +++ b/spec/support/helpers/example_app.rb @@ -1,13 +1,17 @@ # frozen_string_literal: true module ExampleApp - TEMPLATE_APP_PATH = File.expand_path Dir.glob('./example_rails?').max # Always test against the most recent example app + # Always test against the most recent example app + TEMPLATE_APP_PATH = File.expand_path('./example_rails_current') def prepare_test_app self.destination_root ||= File.expand_path('spec/tmp') cleanup_test_app FileUtils.cp_r(TEMPLATE_APP_PATH, destination_root) - clean_test_gemfile + end + + def cleanup_test_app + FileUtils.rm_rf(destination_root) end # run_generator already captures stdout @@ -19,15 +23,4 @@ def run_generator_against_test_app(*args, generator: described_class) FileUtils.cd(destination_root) { run_generator(*args) } end end - - def cleanup_test_app - FileUtils.rm_rf(destination_root) - end - - def clean_test_gemfile - gemfile_path = File.join(destination_root, 'Gemfile') - gemfile = File.open(gemfile_path) - - File.write(gemfile_path, gemfile.grep_v(/rolemodel_rails/).join) - end end