├── .ruby-version ├── .ruby-gemset ├── .github ├── FUNDING.yml ├── dependabot.yml └── workflows │ ├── rubocop.yml │ └── ci.yml ├── err_now.png ├── err_was.png ├── to_niceql.png ├── lib ├── rails_sql_prettifier │ ├── version.rb │ ├── postgres_adapter_nice_ql.rb │ ├── niceql_error.rb │ ├── protected_env.rb │ ├── abstract_adapter_log_prettifier.rb │ ├── ar_extensions.rb │ └── nice_ql_config_ext.rb ├── generators │ ├── niceql │ │ └── install_generator.rb │ └── templates │ │ └── niceql_initializer.rb └── rails_sql_prettifier.rb ├── gemfiles ├── rails_7.2.gemfile ├── rails_7.gemfile ├── rails_8.gemfile ├── rails_8.gemfile.lock ├── rails_7.2.gemfile.lock └── rails_7.gemfile.lock ├── bin ├── setup └── console ├── Gemfile ├── .gitignore ├── Appraisals ├── Rakefile ├── test ├── test_helper.rb └── rails_sql_prettifier │ ├── ar_test.rb │ └── niceql_test.rb ├── CHANGELOG.md ├── Dockerfile_3_1 ├── Dockerfile ├── Dockerfile_30 ├── docker-compose.yml ├── Dockerfile_apprsl ├── LICENSE.txt ├── rails_sql_prettifier.gemspec ├── .rubocop.yml └── README.md /.ruby-version: -------------------------------------------------------------------------------- 1 | ruby-2.7.2 -------------------------------------------------------------------------------- /.ruby-gemset: -------------------------------------------------------------------------------- 1 | rails_sql_prettifier -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | buy_me_a_coffee: alekseyl -------------------------------------------------------------------------------- /err_now.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alekseyl/rails_sql_prettifier/HEAD/err_now.png -------------------------------------------------------------------------------- /err_was.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alekseyl/rails_sql_prettifier/HEAD/err_was.png -------------------------------------------------------------------------------- /to_niceql.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alekseyl/rails_sql_prettifier/HEAD/to_niceql.png -------------------------------------------------------------------------------- /lib/rails_sql_prettifier/version.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module RailsSQLPrettifier 4 | VERSION = "7.0.7" 5 | end 6 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | - package-ecosystem: "github-actions" 4 | directory: "/" 5 | schedule: 6 | interval: "weekly" 7 | -------------------------------------------------------------------------------- /gemfiles/rails_7.2.gemfile: -------------------------------------------------------------------------------- 1 | # This file was generated by Appraisal 2 | 3 | source "https://rubygems.org" 4 | 5 | gem "rails", "~> 7.1" 6 | 7 | gemspec path: "../" 8 | -------------------------------------------------------------------------------- /gemfiles/rails_7.gemfile: -------------------------------------------------------------------------------- 1 | # This file was generated by Appraisal 2 | 3 | source "https://rubygems.org" 4 | 5 | gem "rails", "~> 7.1" 6 | 7 | gemspec path: "../" 8 | -------------------------------------------------------------------------------- /gemfiles/rails_8.gemfile: -------------------------------------------------------------------------------- 1 | # This file was generated by Appraisal 2 | 3 | source "https://rubygems.org" 4 | 5 | gem "rails", ">= 8" 6 | 7 | gemspec path: "../" 8 | -------------------------------------------------------------------------------- /bin/setup: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -euo pipefail 3 | IFS=$'\n\t' 4 | set -vx 5 | 6 | bundle install 7 | 8 | # Do any other automated setup that you need to do here 9 | -------------------------------------------------------------------------------- /Gemfile: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | source "https://rubygems.org" 4 | 5 | git_source(:github) { |repo_name| "https://github.com/#{repo_name}" } 6 | 7 | gemspec 8 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /.bundle/ 2 | /.yardoc 3 | /Gemfile.lock 4 | /_yardoc/ 5 | /coverage/ 6 | /doc/ 7 | /pkg/ 8 | /spec/reports/ 9 | /tmp/ 10 | /inspectionProfiles/ 11 | .idea 12 | .byebug_history -------------------------------------------------------------------------------- /Appraisals: -------------------------------------------------------------------------------- 1 | appraise "rails-7" do 2 | gem "rails", "~> 7.1" 3 | end 4 | 5 | appraise "rails-7.2" do 6 | gem "rails", "~> 7.1" 7 | end 8 | 9 | appraise "rails-8" do 10 | gem "rails", ">= 8" 11 | end -------------------------------------------------------------------------------- /Rakefile: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require "bundler/gem_tasks" 4 | require "rake/testtask" 5 | 6 | Rake::TestTask.new(:test) do |t| 7 | t.libs << "test" 8 | t.libs << "lib" 9 | t.test_files = FileList["test/**/*_test.rb"] 10 | end 11 | 12 | task default: :test 13 | -------------------------------------------------------------------------------- /lib/rails_sql_prettifier/postgres_adapter_nice_ql.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module RailsSQLPrettifier 4 | module PostgresAdapterNiceQL 5 | def exec_query(sql, *args, **kwargs, &block) 6 | # replacing sql with prettified sql, that's all 7 | super(Niceql::Prettifier.prettify_sql(sql, false), *args, **kwargs, &block) 8 | end 9 | end 10 | end 11 | -------------------------------------------------------------------------------- /.github/workflows/rubocop.yml: -------------------------------------------------------------------------------- 1 | name: RuboCop 2 | 3 | on: [push] 4 | 5 | jobs: 6 | build: 7 | runs-on: ubuntu-latest 8 | 9 | steps: 10 | - uses: actions/checkout@v4 11 | - name: Set up Ruby 12 | uses: ruby/setup-ruby@v1 13 | with: 14 | ruby-version: 2.7 15 | bundler-cache: true # 'bundle install' and cache 16 | - name: Run RuboCop 17 | run: bundle exec rubocop --parallel 18 | -------------------------------------------------------------------------------- /bin/console: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | # frozen_string_literal: true 3 | 4 | require "bundler/setup" 5 | require "rails_sql_prettifier" 6 | 7 | # You can add fixtures and/or initialization code here to make experimenting 8 | # with your gem easier. You can also use a different console, if you like. 9 | 10 | # (If you use this, don't forget to add pry to your Gemfile!) 11 | # require "pry" 12 | # Pry.start 13 | 14 | require "irb" 15 | IRB.start(__FILE__) 16 | -------------------------------------------------------------------------------- /lib/rails_sql_prettifier/niceql_error.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module RailsSQLPrettifier 4 | module NiceqlError 5 | def to_s 6 | # older rails version do not provide sql as a standalone query, instead they 7 | # deliver joined message, and try(:sql) will set prettify_err with nil in that case 8 | Niceql.config.prettify_pg_errors ? Niceql::Prettifier.prettify_err(super, try(:sql)) : super 9 | end 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /lib/rails_sql_prettifier/protected_env.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module RailsSQLPrettifier 4 | module ProtectedEnv 5 | def protected_env? 6 | migration_context = ActiveRecord::Base.connection.try(:migration_context) || 7 | ActiveRecord::Base.connection.try(:pool)&.migration_context # rails 7.2+ 8 | 9 | migration_context&.protected_environment? || 10 | defined?(Rails) && !(Rails.env.test? || Rails.env.development?) 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /lib/generators/niceql/install_generator.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module Niceql 4 | module Generators 5 | class InstallGenerator < Rails::Generators::Base 6 | source_root File.expand_path("../../templates", __FILE__) 7 | desc "Creates Niceql initializer for your application" 8 | 9 | def copy_initializer 10 | template("niceql_initializer.rb", "config/initializers/niceql.rb") 11 | 12 | puts "Install complete!" 13 | end 14 | end 15 | end 16 | end 17 | -------------------------------------------------------------------------------- /lib/generators/templates/niceql_initializer.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | Niceql.configure do |c| 4 | # You can adjust pg_adapter in production at your own risk! 5 | # If you need it in production use exec_niceql 6 | # default: false 7 | # c.pg_adapter_with_nicesql = Rails.env.development? 8 | 9 | # this are default settings, change it to your project needs 10 | # c.indentation_base = 2 11 | # c.open_bracket_is_newliner = false 12 | # c.prettify_active_record_log_output = false 13 | end 14 | -------------------------------------------------------------------------------- /test/test_helper.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | $LOAD_PATH.unshift(File.expand_path("../lib", __dir__)) 4 | $LOAD_PATH.unshift(File.expand_path("../test/rails_sql_prettifier", __dir__)) 5 | 6 | require "minitest/autorun" 7 | require "minitest/assertions" 8 | require "byebug" 9 | require "active_record" 10 | require "stubberry" 11 | require "pg" 12 | require "active_support/testing/declarative" 13 | require "active_support/testing/assertions" 14 | require "rails_sql_prettifier" 15 | require "awesome_print" 16 | -------------------------------------------------------------------------------- /lib/rails_sql_prettifier/abstract_adapter_log_prettifier.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module RailsSQLPrettifier 4 | module AbstractAdapterLogPrettifier 5 | private 6 | 7 | def log(sql, *args, **kwargs, &block) 8 | # \n need to be placed because AR log will start with action description + time info. 9 | # rescue sql - just to be sure Prettifier wouldn't break production 10 | formatted_sql = "\n" + Niceql::Prettifier.prettify_sql(sql) rescue sql 11 | 12 | super(formatted_sql, *args, **kwargs, &block) 13 | end 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /lib/rails_sql_prettifier/ar_extensions.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module RailsSQLPrettifier 4 | module ArExtentions 5 | def exec_niceql(reraise = false) 6 | connection.execute(to_niceql) 7 | rescue StandardError => e 8 | puts Niceql::Prettifier.prettify_pg_err(e.message, to_niceql) 9 | raise if reraise 10 | end 11 | 12 | def to_niceql 13 | Niceql::Prettifier.prettify_sql(to_sql, false) 14 | end 15 | 16 | def niceql(colorize = true) 17 | puts Niceql::Prettifier.prettify_sql(to_sql, colorize) 18 | end 19 | end 20 | end 21 | -------------------------------------------------------------------------------- /lib/rails_sql_prettifier.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require "rails_sql_prettifier/version" 4 | require "rails_sql_prettifier/abstract_adapter_log_prettifier" 5 | require "rails_sql_prettifier/ar_extensions" 6 | require "rails_sql_prettifier/niceql_error" 7 | require "rails_sql_prettifier/nice_ql_config_ext" 8 | require "rails_sql_prettifier/postgres_adapter_nice_ql" 9 | require "rails_sql_prettifier/protected_env" 10 | 11 | require "active_record" 12 | require "niceql" 13 | 14 | module RailsSQLPrettifier 15 | ::ActiveRecord::Relation.include(ArExtentions) 16 | ::Arel::TreeManager.include(ArExtentions) 17 | ::Arel::Nodes::Node.include(ArExtentions) 18 | 19 | Niceql::NiceQLConfig.include(NiceQLConfigExt) 20 | Niceql.extend(ProtectedEnv) 21 | end 22 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # 7.0.7 2 | * restored >= 7 versioning for activerecord 3 | * added appraisal, including CI 4 | 5 | # 7.0.6 6 | * Fixed issue with protected_env for a 7.2 rails 7 | * github CI is working 8 | * rubocoped a little 9 | 10 | # 7.0.5 11 | * Fixed tests 12 | * Restructured code properly 13 | * Fixed issue with exec_niceql over relation with error, now error will be prettified properly 14 | 15 | # 7.0.4 16 | * pg_adapter_with_nicesql setting will not be set to action for protected_env 17 | * niceql version set to ~> 0.6 (fixed https://github.com/alekseyl/niceql/issues/16 !) 18 | 19 | #7.0.3 20 | * fixed issue [#20](https://github.com/alekseyl/niceql/issues/20) 21 | * adding support for multiple ruby versions testing using docker-compose 22 | 23 | #7.0.2 24 | * active record versioning is properly aligned now 25 | 26 | #7.0.0 27 | * current master branch -------------------------------------------------------------------------------- /Dockerfile_3_1: -------------------------------------------------------------------------------- 1 | FROM ruby:3.1-bullseye 2 | 3 | WORKDIR /app 4 | RUN apt-get update && apt-get -y install lsb-release 5 | # 6 | RUN wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - && \ 7 | sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list' && \ 8 | apt-get update && apt-get -y install postgresql postgresql-client-14 9 | 10 | RUN sh -c 'echo "local all all trust" > /etc/postgresql/$(ls /etc/postgresql)/main/pg_hba.conf' && \ 11 | service postgresql start && \ 12 | psql -U postgres -c 'CREATE DATABASE "niceql-test"' 13 | 14 | RUN gem install bundler 15 | 16 | COPY lib/rails_sql_prettifier/version.rb /app/lib/rails_sql_prettifier/version.rb 17 | COPY rails_sql_prettifier.gemspec /app/ 18 | COPY Gemfil* /app/ 19 | # 20 | RUN bundle install -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ruby:2.7.5-bullseye 2 | 3 | WORKDIR /app 4 | RUN apt-get update && apt-get -y install lsb-release 5 | # 6 | RUN wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - && \ 7 | sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list' && \ 8 | apt-get update && apt-get -y install postgresql postgresql-client-14 9 | 10 | RUN sh -c 'echo "local all all trust" > /etc/postgresql/$(ls /etc/postgresql)/main/pg_hba.conf' && \ 11 | service postgresql start && \ 12 | psql -U postgres -c 'CREATE DATABASE "niceql-test"' 13 | 14 | RUN gem install bundler -v 2.4.22 15 | 16 | COPY lib/rails_sql_prettifier/version.rb /app/lib/rails_sql_prettifier/version.rb 17 | COPY rails_sql_prettifier.gemspec /app/ 18 | COPY Gemfil* /app/ 19 | # 20 | RUN bundle install -------------------------------------------------------------------------------- /Dockerfile_30: -------------------------------------------------------------------------------- 1 | FROM ruby:3.0.3-bullseye 2 | 3 | WORKDIR /app 4 | RUN apt-get update && apt-get -y install lsb-release 5 | # 6 | RUN wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - && \ 7 | sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list' && \ 8 | apt-get update && apt-get -y install postgresql postgresql-client-14 9 | 10 | RUN sh -c 'echo "local all all trust" > /etc/postgresql/$(ls /etc/postgresql)/main/pg_hba.conf' && \ 11 | service postgresql start && \ 12 | psql -U postgres -c 'CREATE DATABASE "niceql-test"' 13 | 14 | RUN gem install bundler -v 2.4.22 15 | 16 | COPY lib/rails_sql_prettifier/version.rb /app/lib/rails_sql_prettifier/version.rb 17 | COPY rails_sql_prettifier.gemspec /app/ 18 | COPY Gemfil* /app/ 19 | # 20 | RUN bundle install -------------------------------------------------------------------------------- /docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: "3.7" 2 | 3 | services: 4 | test: 5 | build: . 6 | image: niceql 7 | command: /bin/bash -c 'service postgresql start && rake test' 8 | volumes: 9 | - '.:/app' 10 | 11 | test_3_0: 12 | build: 13 | context: . 14 | dockerfile: Dockerfile_30 15 | image: niceql_3_0 16 | command: /bin/bash -c 'service postgresql start && rake test' 17 | volumes: 18 | - '.:/app' 19 | 20 | test_3_1: 21 | build: 22 | context: . 23 | dockerfile: Dockerfile_3_1 24 | image: niceql_3_1 25 | command: /bin/bash -c 'service postgresql start && rake test' 26 | volumes: 27 | - '.:/app' 28 | 29 | appraisal: 30 | build: 31 | context: . 32 | dockerfile: Dockerfile_apprsl 33 | image: niceql_appr 34 | command: /bin/bash -c 'service postgresql start && appraisal rake test' 35 | volumes: 36 | - '.:/app' 37 | -------------------------------------------------------------------------------- /Dockerfile_apprsl: -------------------------------------------------------------------------------- 1 | FROM ruby:3.2-bullseye 2 | 3 | WORKDIR /app 4 | RUN apt-get update && apt-get -y install lsb-release 5 | # 6 | RUN wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - && \ 7 | sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list' && \ 8 | apt-get update && apt-get -y install postgresql postgresql-client-14 9 | 10 | RUN sh -c 'echo "local all all trust" > /etc/postgresql/$(ls /etc/postgresql)/main/pg_hba.conf' && \ 11 | service postgresql start && \ 12 | psql -U postgres -c 'CREATE DATABASE "niceql-test"' 13 | 14 | RUN gem install bundler 15 | 16 | COPY lib/rails_sql_prettifier/version.rb /app/lib/rails_sql_prettifier/version.rb 17 | COPY rails_sql_prettifier.gemspec /app/ 18 | COPY Gemfil* /app/ 19 | COPY Appraisals /app/ 20 | # 21 | RUN bundle install 22 | RUN bundle exec appraisal install -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2017 alekseyl 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /lib/rails_sql_prettifier/nice_ql_config_ext.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module RailsSQLPrettifier 4 | module NiceQLConfigExt 5 | extend ActiveSupport::Concern 6 | 7 | included do 8 | attr_accessor :pg_adapter_with_nicesql, 9 | :prettify_active_record_log_output, 10 | :prettify_pg_errors 11 | 12 | # we need to use a prepend otherwise it's not preceding Niceql.configure in a lookup chain 13 | Niceql.singleton_class.prepend(Configure) 14 | end 15 | 16 | def ar_using_pg_adapter? 17 | ActiveRecord::Base.connection_db_config.adapter == "postgresql" 18 | end 19 | 20 | def initialize 21 | super 22 | self.pg_adapter_with_nicesql = false 23 | self.prettify_active_record_log_output = false 24 | self.prettify_pg_errors = ar_using_pg_adapter? 25 | end 26 | 27 | module Configure 28 | def configure 29 | super 30 | 31 | if config.pg_adapter_with_nicesql && 32 | defined?(::ActiveRecord::ConnectionAdapters::PostgreSQLAdapter) && !protected_env? 33 | 34 | ::ActiveRecord::ConnectionAdapters::PostgreSQLAdapter.include(PostgresAdapterNiceQL) 35 | end 36 | 37 | if config.prettify_active_record_log_output 38 | ::ActiveRecord::ConnectionAdapters::AbstractAdapter.prepend(AbstractAdapterLogPrettifier) 39 | end 40 | 41 | if config.prettify_pg_errors && config.ar_using_pg_adapter? 42 | ::ActiveRecord::StatementInvalid.include(NiceqlError) 43 | end 44 | end 45 | end 46 | end 47 | end 48 | -------------------------------------------------------------------------------- /.github/workflows/ci.yml: -------------------------------------------------------------------------------- 1 | name: CI 2 | 3 | on: [push, pull_request] 4 | 5 | jobs: 6 | test: 7 | runs-on: ubuntu-latest 8 | 9 | strategy: 10 | fail-fast: false 11 | matrix: 12 | ruby: ["3.2", "3.3", "3.4"] 13 | 14 | # Service containers to run with `container-job` 15 | services: 16 | # Label used to access the service container 17 | # more about postgres image can be read here: https://hub.docker.com/_/postgres 18 | # more about using pg image in CI: https://docs.github.com/en/actions/use-cases-and-examples/using-containerized-services/creating-postgresql-service-containers 19 | postgres: 20 | # Docker Hub image 21 | image: postgres 22 | # Provide the password for postgres 23 | env: 24 | POSTGRES_PASSWORD: postgres 25 | POSTGRES_DB: niceql-test 26 | POSTGRES_USER: postgres 27 | # this options should be kept, otherwise pg container will not be waited 28 | options: >- 29 | --health-cmd pg_isready 30 | --health-interval 10s 31 | --health-timeout 5s 32 | --health-retries 5 33 | --network-alias postgres 34 | ports: 35 | # Maps tcp port 5432 on service container to the host 36 | - 5432:5432 37 | 38 | steps: 39 | - uses: actions/checkout@v4 40 | - name: Set up Ruby 41 | uses: ruby/setup-ruby@v1 42 | with: 43 | bundler-cache: true # 'bundle install' and cache gems 44 | ruby-version: ${{ matrix.ruby }} 45 | - name: install appraisal 46 | run: bundle exec appraisal install 47 | - name: Run tests 48 | run: bundle exec appraisal rake test 49 | env: 50 | POSTGRES_HOST: localhost -------------------------------------------------------------------------------- /rails_sql_prettifier.gemspec: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | lib = File.expand_path("lib", __dir__) 4 | $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) 5 | require "rails_sql_prettifier/version" 6 | 7 | Gem::Specification.new do |spec| 8 | spec.name = "rails_sql_prettifier" 9 | spec.version = RailsSQLPrettifier::VERSION 10 | spec.authors = ["alekseyl"] 11 | spec.email = ["leshchuk@gmail.com"] 12 | 13 | spec.summary = "This is an ActiveRecord integration for the SQL prettifier gem niceql. " 14 | spec.description = "This is an ActiveRecord integration for the SQL prettifier gem niceql. " 15 | spec.homepage = "https://github.com/alekseyl/rails_sql_prettifier" 16 | spec.license = "MIT" 17 | 18 | # Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host' 19 | # to allow pushing to a single host or delete this section to allow pushing to any host. 20 | if spec.respond_to?(:metadata) 21 | spec.metadata["allowed_push_host"] = "https://rubygems.org" 22 | else 23 | raise "RubyGems 2.0 or newer is required to protect against " \ 24 | "public gem pushes." 25 | end 26 | 27 | spec.files = %x(git ls-files -z).split("\x0").reject do |f| 28 | f.match(%r{^(test|spec|features)/}) 29 | end 30 | spec.bindir = "exe" 31 | spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) } 32 | spec.require_paths = ["lib"] 33 | 34 | # for rails 7 you cannot use ruby below 2.7 35 | spec.required_ruby_version = ">= 2.7" 36 | spec.add_dependency("activerecord", ">= 7") 37 | spec.add_dependency("niceql", "~> 0.6") 38 | 39 | spec.add_development_dependency("bundler", ">= 1") 40 | spec.add_development_dependency("minitest", "~> 5.0") 41 | spec.add_development_dependency("rake", ">= 12.3.3") 42 | 43 | spec.add_development_dependency("awesome_print") 44 | spec.add_development_dependency("differ", "~> 0.1") 45 | spec.add_development_dependency("pg", "~> 1") 46 | spec.add_development_dependency("pry-byebug", "~> 3.9") 47 | spec.add_development_dependency("rubocop-shopify") 48 | spec.add_development_dependency("appraisal") 49 | 50 | spec.add_development_dependency("stubberry", "~> 0.2") 51 | end 52 | -------------------------------------------------------------------------------- /test/rails_sql_prettifier/ar_test.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require_relative "../test_helper" 4 | 5 | db_connection = { 6 | adapter: "postgresql", 7 | database: "niceql-test", 8 | user: "postgres", 9 | password: "postgres", 10 | host: ENV["POSTGRES_HOST"], 11 | } 12 | 13 | puts db_connection 14 | 15 | ActiveRecord::Base.establish_connection(db_connection) 16 | 17 | # "postgres://myuser:mypass@localhost/somedatabase" 18 | 19 | Niceql.configure do |config| 20 | config.pg_adapter_with_nicesql = false 21 | config.prettify_active_record_log_output = false 22 | end 23 | 24 | ActiveRecord::Migration.create_table(:users, force: true) 25 | ActiveRecord::Migration.create_table(:comments, force: true) do |t| 26 | t.belongs_to(:user) 27 | end 28 | 29 | class User < ActiveRecord::Base 30 | has_many :comments 31 | end 32 | 33 | class Comment < ActiveRecord::Base 34 | end 35 | 36 | class ARTest < ActiveSupport::TestCase 37 | extend ::ActiveSupport::Testing::Declarative 38 | include Stubberry::Assertions 39 | # include ::ActiveSupport::Testing::Assertions 40 | 41 | test "ar_using_pg_adapter? whenever AR is not defined will be false" do 42 | assert_equal(ActiveRecord::Base.connection_db_config.adapter, "postgresql") 43 | assert(Niceql::NiceQLConfig.new.ar_using_pg_adapter?) 44 | end 45 | 46 | test "ar_using_pg_adapter? should be true whenever connection_db_config.adapter is postgresql" do 47 | ActiveRecord::Base.connection_db_config.stub(:adapter, "sqlite3") do 48 | assert(!Niceql::NiceQLConfig.new.ar_using_pg_adapter?) 49 | end 50 | end 51 | 52 | test "accessible through ActiveRecord and Arel" do 53 | User.create 54 | assert(!User.respond_to?(:to_niceql)) # ActiveRecord::Base 55 | assert(User.all.to_niceql.is_a?(String)) # ActiveRecord::Relation 56 | assert(User.last.comments.to_niceql.is_a?(String)) # ActiveRecord::Associations::CollectionProxy 57 | assert(User.all.arel.to_niceql.is_a?(String)) # Arel::TreeManager 58 | assert(User.all.arel.source.to_niceql.is_a?(String)) # Arel::Nodes::Node 59 | end 60 | 61 | test "log got called and then prettifier got called" do 62 | assert_method_called(ActiveRecord::Base.connection, :log) do 63 | Niceql::Prettifier.stub_must_not(:prettify_sql) { User.where(id: 1).load } 64 | end 65 | 66 | Niceql.configure { |config| config.prettify_active_record_log_output = true } 67 | 68 | assert_method_called(ActiveRecord::Base.connection, :log) do 69 | Niceql::Prettifier.stub_must(:prettify_sql, ->(sql) { 70 | assert_equal(sql, 'SELECT "users".* FROM "users" WHERE "users"."id" = $1') 71 | sql 72 | }) { User.where(id: 1).load } 73 | end 74 | end 75 | end 76 | -------------------------------------------------------------------------------- /.rubocop.yml: -------------------------------------------------------------------------------- 1 | inherit_gem: 2 | rubocop-shopify: rubocop.yml 3 | 4 | AllCops: 5 | Exclude: 6 | - "./lib/templates/active_record/model/model.rb" 7 | - "./lib/modules/flea.rb" 8 | 9 | Style/SingleLineMethods: 10 | Description: 'Avoid single-line methods.' 11 | StyleGuide: '#no-single-line-methods' 12 | Enabled: false 13 | VersionAdded: '0.9' 14 | VersionChanged: '1.8' 15 | AllowIfMethodIsEmpty: true 16 | 17 | Style/AsciiComments: 18 | Description: 'Use only ascii symbols in comments.' 19 | StyleGuide: '#english-comments' 20 | Enabled: false 21 | VersionAdded: '0.9' 22 | VersionChanged: '1.21' 23 | AllowedChars: 24 | - © 25 | 26 | Layout/LineLength: 27 | Description: 'Checks that line length does not exceed the configured limit.' 28 | StyleGuide: '#max-line-length' 29 | Enabled: true 30 | VersionAdded: '0.25' 31 | VersionChanged: '1.4' 32 | Max: 120 33 | # To make it possible to copy or click on URIs in the code, we allow lines 34 | # containing a URI to be longer than Max. 35 | AllowHeredoc: true 36 | AllowURI: true 37 | URISchemes: 38 | - http 39 | - https 40 | # The IgnoreCopDirectives option causes the LineLength rule to ignore cop 41 | # directives like '# rubocop: enable ...' when calculating a line's length. 42 | IgnoreCopDirectives: true 43 | # The AllowedPatterns option is a list of !ruby/regexp and/or string 44 | # elements. Strings will be converted to Regexp objects. A line that matches 45 | # any regular expression listed in this option will be ignored by LineLength. 46 | AllowedPatterns: [] 47 | IgnoredPatterns: [] # deprecated 48 | Exclude: 49 | - "./test/**/**/*" 50 | 51 | Metrics/ClassLength: 52 | Description: 'Avoid classes longer than 100 lines of code.' 53 | Enabled: false 54 | VersionAdded: '0.25' 55 | VersionChanged: '0.87' 56 | CountComments: false # count full line comments? 57 | Max: 100 58 | CountAsOne: [] 59 | 60 | Lint/MissingCopEnableDirective: 61 | Description: 'Checks for a `# rubocop:enable` after `# rubocop:disable`.' 62 | Enabled: true 63 | VersionAdded: '0.52' 64 | # Maximum number of consecutive lines the cop can be disabled for. 65 | # 0 allows only single-line disables 66 | # 1 would mean the maximum allowed is the following: 67 | # # rubocop:disable SomeCop 68 | # a = 1 69 | # # rubocop:enable SomeCop 70 | # .inf for any size 71 | MaximumRangeSize: .inf 72 | 73 | Style/MethodCallWithArgsParentheses: 74 | Enabled: true 75 | IgnoredMethods: 76 | - require 77 | - require_relative 78 | - require_dependency 79 | - yield 80 | - raise 81 | - puts 82 | Exclude: 83 | - "/**/Gemfile" 84 | - "./db/**/*" 85 | 86 | Layout/EmptyLinesAroundBlockBody: 87 | # its more documentation than code, so it should be readable and 88 | # there are huge amount of multiline description, looks nasty without spaces 89 | Exclude: 90 | - "./app_doc/**/*" 91 | 92 | Style/ClassAndModuleChildren: 93 | Enabled: false 94 | 95 | Lint/UnderscorePrefixedVariableName: 96 | Exclude: 97 | - "./test/**/**/*" -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # RailsSQLPrettifier 2 | 3 | This is an ActiveRecord integration for a niceql gem ( niceql is a small, nice, simple and zero dependency solution for the SQL prettifying in ruby ). 4 | Any reasonable suggestions are welcome. 5 | 6 | ## Before/After 7 | 8 | ### SQL prettifier: 9 | ![alt text](https://github.com/alekseyl/niceql/raw/master/to_niceql.png "To_niceql") 10 | 11 | ### PG errors prettifier 12 | 13 | before: 14 | ![alt text](https://github.com/alekseyl/niceql/raw/master/err_was.png "To_niceql") 15 | 16 | after: 17 | ![alt text](https://github.com/alekseyl/niceql/raw/master/err_now.png "To_niceql") 18 | 19 | 20 | ## Installation 21 | 22 | rails_sql_prettifier, has several version compatible with different active_record versions, so pay attention to the right versioning 23 | if whenever you specify versions manually. 24 | 25 | Add this line to your application's Gemfile: 26 | 27 | ```ruby 28 | gem 'rails_sql_prettifier', '~> X.X.X' 29 | ``` 30 | 31 | And then execute: 32 | 33 | $ bundle 34 | # if you are using rails, you may want to install niceql config: 35 | rails g niceql:install 36 | 37 | Or install it yourself as: 38 | 39 | $ gem install niceql 40 | 41 | ## Usage 42 | 43 | ```ruby 44 | # puts colorized and formatted corresponding SQL query 45 | Model.scope.niceql 46 | 47 | # only formatting without colorization, you can run output of to_niceql as a SQL query in connection.execute 48 | Model.scope.to_niceql 49 | 50 | # will run prettified sql and hence will properly prettify PG errors if scope runs with any 51 | Model.scope_with_err.exec_niceql 52 | ``` 53 | 54 | ### Raw usage of niceql 55 | 56 | ```ruby 57 | 58 | puts Niceql::Prettifier.prettify_sql("SELECT * FROM ( VALUES(1), (2) ) AS tmp") 59 | #=> SELECT * 60 | #=> FROM ( VALUES(1), (2) ) AS tmp 61 | 62 | puts Niceql::Prettifier.prettify_multiple("SELECT * FROM ( VALUES(1), (2) ) AS tmp; SELECT * FROM table") 63 | 64 | #=> SELECT * 65 | #=> FROM ( VALUES(1), (2) ) AS tmp; 66 | #=> 67 | #=> SELECT * 68 | #=> FROM table 69 | 70 | 71 | puts Niceql::Prettifier.prettify_pg_err( pg_err_output, sql_query ) 72 | 73 | # to get real nice result you should execute prettified version (i.e. execute( prettified_sql ) !) of query on your DB! 74 | # otherwise you will not get such a nice output 75 | raw_sql = <<~SQL 76 | SELECT err 77 | FROM ( VALUES(1), (2) ) 78 | ORDER BY 1 79 | SQL 80 | 81 | puts Niceql::Prettifier.prettify_pg_err(<<~ERR, raw_sql ) 82 | ERROR: VALUES in FROM must have an alias 83 | LINE 2: FROM ( VALUES(1), (2) ) 84 | ^ 85 | HINT: For example, FROM (VALUES ...) [AS] foo. 86 | ERR 87 | 88 | 89 | # ERROR: VALUES in FROM must have an alias 90 | # LINE 2: FROM ( VALUES(1), (2) ) 91 | # ^ 92 | # HINT: For example, FROM (VALUES ...) [AS] foo. 93 | # SELECT err 94 | # FROM ( VALUES(1), (2) ) 95 | # ^ 96 | # ORDER BY 1 97 | 98 | ``` 99 | ## Configuration 100 | 101 | ```ruby 102 | Niceql.configure do |c| 103 | # Setting pg_adapter_with_nicesql to true will APPLY formatting SQL queries 104 | # before execution. Formatted SQL will lead to much better SQL-query debugging and much more clearer error messages 105 | # if you are using Postgresql as a data source. 106 | # 107 | # BUT even though https://github.com/alekseyl/niceql/issues/16 is resolved, 108 | # there could be other potentially uncovered bugs so its better not to 109 | # adjust pg_adapter in production, currently there is an additional blocker for that module ProtectedEnv 110 | # its will not allow patching PGAdapter for other than test/development envs 111 | # 112 | # If you need to debug SQL queries in production use exec_niceql 113 | # 114 | # default value for pg_adapter_with_nicesql: false 115 | # uncomment next string to enable in development 116 | # c.pg_adapter_with_nicesql = Rails.env.development? 117 | 118 | # uncomment next string if you want to log prettified SQL inside ActiveRecord logging. 119 | # default: false 120 | # c.prettify_active_record_log_output = true 121 | 122 | # Error prettifying is also configurable 123 | # default: defined? ::ActiveRecord::Base && ActiveRecord::Base.configurations[Rails.env]['adapter'] == 'postgresql' 124 | # c.prettify_pg_errors = defined? ::ActiveRecord::Base && ActiveRecord::Base.configurations[Rails.env]['adapter'] == 'postgresql' 125 | 126 | # spaces count for one indentation, default is 2 127 | c.indentation_base = 2 128 | 129 | # setting open_bracket_is_newliner to true will start opening brackets '(' with nested subqueries from new line 130 | # i.e. SELECT * FROM ( SELECT * FROM tags ) tags; will transform to: 131 | # SELECT * 132 | # FROM 133 | # ( 134 | # SELECT * FROM tags 135 | # ) tags; 136 | # when open_bracket_is_newliner is false: 137 | # SELECT * 138 | # FROM ( 139 | # SELECT * FROM tags 140 | # ) tags; 141 | # default: false 142 | c.open_bracket_is_newliner = false 143 | end 144 | ``` 145 | 146 | ## Customizing colors 147 | If your console support more colors or different schemes, or if you prefer different colorization, then you can override ColorizeString methods. 148 | Current colors were selected with dark and white console themes in mind, so a niceql colorization works good for dark, and good enough for white. 149 | 150 | ## Testing 151 | 152 | ```bash 153 | docker compose up 154 | ``` 155 | 156 | ## Contributing 157 | 158 | Bug reports and pull requests are welcome on GitHub at https://github.com/alekseyl/niceql. 159 | 160 | ## License 161 | 162 | The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT). 163 | -------------------------------------------------------------------------------- /test/rails_sql_prettifier/niceql_test.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require "test_helper" 4 | require "differ" 5 | require "byebug" 6 | 7 | # we need to add this cause original include in the configure wants pg to be present 8 | # but that is not an issue for a testing 9 | ActiveRecord::StatementInvalid.include(RailsSQLPrettifier::NiceqlError) 10 | 11 | # activerecord will not include adapter by default, unless we use a pg connection setup 12 | unless defined?(ActiveRecord::ConnectionAdapters::PostgreSQLAdapter) 13 | class ::ActiveRecord::ConnectionAdapters::PostgreSQLAdapter 14 | end 15 | end 16 | 17 | unless defined?(Rails) 18 | module Rails 19 | def self.env; end 20 | end 21 | end 22 | 23 | class NiceQLTest < Minitest::Test 24 | extend ::ActiveSupport::Testing::Declarative 25 | 26 | def self.test(*args, &block) 27 | super(*args) do 28 | Niceql.stub(:config, Niceql::NiceQLConfig.new) do 29 | instance_eval(&block) 30 | end 31 | end 32 | end 33 | 34 | def assert_equal_standard(niceql_result, etalon) 35 | return unless etalon != niceql_result 36 | 37 | puts "ETALON:----------------------------" 38 | puts etalon 39 | puts "Niceql result:---------------------" 40 | puts niceql_result 41 | puts "DIFF:----------------------------" 42 | puts Differ.diff(etalon, niceql_result) 43 | raise "Not equal" 44 | end 45 | 46 | def test_niceql 47 | etalon = <<~PRETTY_RESULT 48 | -- valuable comment first line 49 | SELECT some, 50 | -- valuable comment to inline verb 51 | COUNT(attributes), /* some comment */#{" "} 52 | CASE WHEN some > 10 THEN '[{"attr": 2}]'::jsonb[] ELSE '{}'::jsonb[] END AS combined_attribute, more 53 | -- valuable comment to newline verb 54 | FROM some_table st 55 | RIGHT INNER JOIN some_other so ON so.st_id = st.id 56 | /* multi line with semicolon; 57 | comment */ 58 | WHERE some NOT IN ( 59 | SELECT other_some 60 | FROM other_table 61 | WHERE id IN ARRAY[1,2]::bigint[] 62 | ) 63 | ORDER BY some 64 | GROUP BY some 65 | HAVING 2 > 1; 66 | --comment to second query; 67 | SELECT other 68 | FROM other_table; 69 | PRETTY_RESULT 70 | 71 | prettySQL = Niceql::Prettifier.prettify_multiple(<<~PRETTIFY_ME, false) 72 | -- valuable comment first line 73 | SELECT some, 74 | -- valuable comment to inline verb 75 | COUNT(attributes), /* some comment */ CASE WHEN some > 10 THEN '[{"attr": 2}]'::jsonb[] ELSE '{}'::jsonb[] END AS combined_attribute, more 76 | -- valuable comment to newline verb 77 | FROM some_table st RIGHT INNER JOIN some_other so ON so.st_id = st.id 78 | /* multi line with semicolon; 79 | comment */ 80 | WHERE some NOT IN (SELECT other_some FROM other_table WHERE id IN ARRAY[1,2]::bigint[] ) ORDER BY some GROUP BY some HAVING 2 > 1; 81 | --comment to second query; 82 | SELECT other FROM other_table; 83 | PRETTIFY_ME 84 | 85 | # ETALON goes with \n at the end :( 86 | assert_equal_standard(prettySQL, etalon.chop) 87 | end 88 | 89 | def broken_sql_sample 90 | <<~SQL 91 | SELECT err 92 | FROM ( VALUES(1), (2) ) 93 | WHERE id="100" 94 | ORDER BY 1 95 | SQL 96 | end 97 | 98 | def err_template 99 | <<~ERR 100 | SELECT err 101 | _COLORIZED_ERR_WHERE id="100" 102 | ORDER BY 1 103 | ERR 104 | end 105 | 106 | def prepare_sample_err( base_err, prt_err_sql ) 107 | standard_err = base_err + prt_err_sql.gsub(/#{Niceql::Prettifier::KEYWORDS}/ ) { |verb| Niceql::StringColorize.colorize_keyword(verb) } 108 | .gsub(/#{Niceql::Prettifier::STRINGS }/ ) { |verb| Niceql::StringColorize.colorize_str(verb) } 109 | 110 | standard_err.gsub!("_COLORIZED_ERR_", Niceql::StringColorize.colorize_err("FROM ( VALUES(1), (2) )\n") + 111 | Niceql::StringColorize.colorize_err(" ^\n")) 112 | standard_err 113 | end 114 | 115 | test "Statement Invalid new format" do 116 | err = <<~ERR 117 | ERROR: VALUES in FROM must have an alias 118 | LINE 2: FROM ( VALUES(1), (2) ) 119 | ^ 120 | ERR 121 | si = ActiveRecord::StatementInvalid.new(err, sql: broken_sql_sample) 122 | 123 | Niceql.config.stub(:prettify_pg_errors, true) do 124 | assert_equal_standard(si.to_s, prepare_sample_err(err, err_template)) 125 | end 126 | end 127 | 128 | test "Statement Invalid old format" do 129 | err = <<~ERR 130 | ERROR: VALUES in FROM must have an alias 131 | LINE 2: FROM ( VALUES(1), (2) ) 132 | ^ 133 | ERR 134 | si = ActiveRecord::StatementInvalid.new(err + broken_sql_sample) 135 | 136 | Niceql.config.stub(:prettify_pg_errors, true) do 137 | si.singleton_class.undef_method(:sql) if si.respond_to?(:sql) 138 | assert_raises { si.sql } 139 | assert_equal_standard(si.to_s, prepare_sample_err(err, err_template)) 140 | end 141 | end 142 | 143 | test "PostgreSQLAdapter will include PostgresAdapterNiceQL after config setup" do 144 | Niceql.stub_must(:protected_env?, false) do 145 | ::ActiveRecord::ConnectionAdapters::PostgreSQLAdapter.stub_must(:include, -> ( _module ) { 146 | assert_equal(_module, RailsSQLPrettifier::PostgresAdapterNiceQL) 147 | }) do 148 | Niceql.configure { |c| c.pg_adapter_with_nicesql = true } 149 | end 150 | end 151 | end 152 | 153 | test "PostgreSQLAdapter will not include PostgresAdapterNiceQL if env is protected" do 154 | Niceql.stub_must(:protected_env?, true) do 155 | ::ActiveRecord::ConnectionAdapters::PostgreSQLAdapter.stub_must_not(:include) do 156 | Niceql.configure { |c| c.pg_adapter_with_nicesql = true } 157 | end 158 | end 159 | end 160 | 161 | test "PostgreSQLAdapter will not be updated for Rails production even when pg_adapter_with_nicesql is true" do 162 | Rails.stub_must(:env, ActiveSupport::EnvironmentInquirer.new("production")) do 163 | ::ActiveRecord::ConnectionAdapters::PostgreSQLAdapter.stub_must_not(:include) do 164 | Niceql.configure { |c| c.pg_adapter_with_nicesql = true } 165 | end 166 | end 167 | end 168 | 169 | test "PostgreSQLAdapter will be updated for Rails development env" do 170 | Rails.stub_must(:env, ActiveSupport::EnvironmentInquirer.new("development")) do 171 | ::ActiveRecord::ConnectionAdapters::PostgreSQLAdapter.stub_must(:include, :do_nothing) do 172 | Niceql.configure { |c| c.pg_adapter_with_nicesql = true } 173 | end 174 | end 175 | end 176 | 177 | test "AbstractAdapter will be extended with AbstractAdapterLogPrettifier after config setup" do 178 | ::ActiveRecord::ConnectionAdapters::AbstractAdapter.stub_must(:prepend, lambda { |_module| 179 | assert_equal(_module, RailsSQLPrettifier::AbstractAdapterLogPrettifier) 180 | }) do 181 | Niceql.configure { |c| c.prettify_active_record_log_output = true } 182 | end 183 | end 184 | 185 | test "StatementInvalid will include ErrorExt only when ar_using_pg_adapter? is true and prettify_pg_errors true" do 186 | ActiveRecord::Base.connection_db_config.stub(:adapter, "sqlite3") do 187 | assert(!Niceql::NiceQLConfig.new.ar_using_pg_adapter?) 188 | 189 | ::ActiveRecord::StatementInvalid.stub_must_not(:include) do 190 | Niceql.configure { |c| c.prettify_pg_errors = true } 191 | end 192 | end 193 | 194 | ::ActiveRecord::StatementInvalid.stub_must(:include, lambda { |_module| 195 | assert_equal(_module, RailsSQLPrettifier::NiceqlError) 196 | }) { Niceql.configure { |c| c.prettify_pg_errors = true } } 197 | end 198 | end 199 | -------------------------------------------------------------------------------- /gemfiles/rails_8.gemfile.lock: -------------------------------------------------------------------------------- 1 | PATH 2 | remote: .. 3 | specs: 4 | rails_sql_prettifier (7.0.6) 5 | activerecord (>= 7) 6 | niceql (~> 0.6) 7 | 8 | GEM 9 | remote: https://rubygems.org/ 10 | specs: 11 | actioncable (8.0.1) 12 | actionpack (= 8.0.1) 13 | activesupport (= 8.0.1) 14 | nio4r (~> 2.0) 15 | websocket-driver (>= 0.6.1) 16 | zeitwerk (~> 2.6) 17 | actionmailbox (8.0.1) 18 | actionpack (= 8.0.1) 19 | activejob (= 8.0.1) 20 | activerecord (= 8.0.1) 21 | activestorage (= 8.0.1) 22 | activesupport (= 8.0.1) 23 | mail (>= 2.8.0) 24 | actionmailer (8.0.1) 25 | actionpack (= 8.0.1) 26 | actionview (= 8.0.1) 27 | activejob (= 8.0.1) 28 | activesupport (= 8.0.1) 29 | mail (>= 2.8.0) 30 | rails-dom-testing (~> 2.2) 31 | actionpack (8.0.1) 32 | actionview (= 8.0.1) 33 | activesupport (= 8.0.1) 34 | nokogiri (>= 1.8.5) 35 | rack (>= 2.2.4) 36 | rack-session (>= 1.0.1) 37 | rack-test (>= 0.6.3) 38 | rails-dom-testing (~> 2.2) 39 | rails-html-sanitizer (~> 1.6) 40 | useragent (~> 0.16) 41 | actiontext (8.0.1) 42 | actionpack (= 8.0.1) 43 | activerecord (= 8.0.1) 44 | activestorage (= 8.0.1) 45 | activesupport (= 8.0.1) 46 | globalid (>= 0.6.0) 47 | nokogiri (>= 1.8.5) 48 | actionview (8.0.1) 49 | activesupport (= 8.0.1) 50 | builder (~> 3.1) 51 | erubi (~> 1.11) 52 | rails-dom-testing (~> 2.2) 53 | rails-html-sanitizer (~> 1.6) 54 | activejob (8.0.1) 55 | activesupport (= 8.0.1) 56 | globalid (>= 0.3.6) 57 | activemodel (8.0.1) 58 | activesupport (= 8.0.1) 59 | activerecord (8.0.1) 60 | activemodel (= 8.0.1) 61 | activesupport (= 8.0.1) 62 | timeout (>= 0.4.0) 63 | activestorage (8.0.1) 64 | actionpack (= 8.0.1) 65 | activejob (= 8.0.1) 66 | activerecord (= 8.0.1) 67 | activesupport (= 8.0.1) 68 | marcel (~> 1.0) 69 | activesupport (8.0.1) 70 | base64 71 | benchmark (>= 0.3) 72 | bigdecimal 73 | concurrent-ruby (~> 1.0, >= 1.3.1) 74 | connection_pool (>= 2.2.5) 75 | drb 76 | i18n (>= 1.6, < 2) 77 | logger (>= 1.4.2) 78 | minitest (>= 5.1) 79 | securerandom (>= 0.3) 80 | tzinfo (~> 2.0, >= 2.0.5) 81 | uri (>= 0.13.1) 82 | appraisal (2.5.0) 83 | bundler 84 | rake 85 | thor (>= 0.14.0) 86 | ast (2.4.2) 87 | awesome_print (1.9.2) 88 | base64 (0.2.0) 89 | benchmark (0.4.0) 90 | bigdecimal (3.1.9) 91 | builder (3.3.0) 92 | byebug (11.1.3) 93 | coderay (1.1.3) 94 | concurrent-ruby (1.3.5) 95 | connection_pool (2.5.0) 96 | crass (1.0.6) 97 | date (3.4.1) 98 | differ (0.1.2) 99 | drb (2.2.1) 100 | erubi (1.13.1) 101 | globalid (1.2.1) 102 | activesupport (>= 6.1) 103 | i18n (1.14.7) 104 | concurrent-ruby (~> 1.0) 105 | io-console (0.8.0) 106 | irb (1.15.1) 107 | pp (>= 0.6.0) 108 | rdoc (>= 4.0.0) 109 | reline (>= 0.4.2) 110 | json (2.10.1) 111 | language_server-protocol (3.17.0.4) 112 | lint_roller (1.1.0) 113 | logger (1.6.6) 114 | loofah (2.24.0) 115 | crass (~> 1.0.2) 116 | nokogiri (>= 1.12.0) 117 | mail (2.8.1) 118 | mini_mime (>= 0.1.1) 119 | net-imap 120 | net-pop 121 | net-smtp 122 | marcel (1.0.4) 123 | method_source (1.1.0) 124 | mini_mime (1.1.5) 125 | minitest (5.25.4) 126 | net-imap (0.5.6) 127 | date 128 | net-protocol 129 | net-pop (0.1.2) 130 | net-protocol 131 | net-protocol (0.2.2) 132 | timeout 133 | net-smtp (0.5.1) 134 | net-protocol 135 | niceql (0.6.1) 136 | nio4r (2.7.4) 137 | nokogiri (1.18.3-aarch64-linux-gnu) 138 | racc (~> 1.4) 139 | nokogiri (1.18.3-aarch64-linux-musl) 140 | racc (~> 1.4) 141 | nokogiri (1.18.3-arm-linux-gnu) 142 | racc (~> 1.4) 143 | nokogiri (1.18.3-arm-linux-musl) 144 | racc (~> 1.4) 145 | nokogiri (1.18.3-arm64-darwin) 146 | racc (~> 1.4) 147 | nokogiri (1.18.3-x86_64-darwin) 148 | racc (~> 1.4) 149 | nokogiri (1.18.3-x86_64-linux-gnu) 150 | racc (~> 1.4) 151 | nokogiri (1.18.3-x86_64-linux-musl) 152 | racc (~> 1.4) 153 | parallel (1.26.3) 154 | parser (3.3.7.1) 155 | ast (~> 2.4.1) 156 | racc 157 | pg (1.5.9) 158 | pp (0.6.2) 159 | prettyprint 160 | prettyprint (0.2.0) 161 | pry (0.14.2) 162 | coderay (~> 1.1) 163 | method_source (~> 1.0) 164 | pry-byebug (3.10.1) 165 | byebug (~> 11.0) 166 | pry (>= 0.13, < 0.15) 167 | psych (5.2.3) 168 | date 169 | stringio 170 | racc (1.8.1) 171 | rack (3.1.10) 172 | rack-session (2.1.0) 173 | base64 (>= 0.1.0) 174 | rack (>= 3.0.0) 175 | rack-test (2.2.0) 176 | rack (>= 1.3) 177 | rackup (2.2.1) 178 | rack (>= 3) 179 | rails (8.0.1) 180 | actioncable (= 8.0.1) 181 | actionmailbox (= 8.0.1) 182 | actionmailer (= 8.0.1) 183 | actionpack (= 8.0.1) 184 | actiontext (= 8.0.1) 185 | actionview (= 8.0.1) 186 | activejob (= 8.0.1) 187 | activemodel (= 8.0.1) 188 | activerecord (= 8.0.1) 189 | activestorage (= 8.0.1) 190 | activesupport (= 8.0.1) 191 | bundler (>= 1.15.0) 192 | railties (= 8.0.1) 193 | rails-dom-testing (2.2.0) 194 | activesupport (>= 5.0.0) 195 | minitest 196 | nokogiri (>= 1.6) 197 | rails-html-sanitizer (1.6.2) 198 | loofah (~> 2.21) 199 | 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) 200 | railties (8.0.1) 201 | actionpack (= 8.0.1) 202 | activesupport (= 8.0.1) 203 | irb (~> 1.13) 204 | rackup (>= 1.0.0) 205 | rake (>= 12.2) 206 | thor (~> 1.0, >= 1.2.2) 207 | zeitwerk (~> 2.6) 208 | rainbow (3.1.1) 209 | rake (13.2.1) 210 | rdoc (6.12.0) 211 | psych (>= 4.0.0) 212 | regexp_parser (2.10.0) 213 | reline (0.6.0) 214 | io-console (~> 0.5) 215 | rubocop (1.72.2) 216 | json (~> 2.3) 217 | language_server-protocol (~> 3.17.0.2) 218 | lint_roller (~> 1.1.0) 219 | parallel (~> 1.10) 220 | parser (>= 3.3.0.2) 221 | rainbow (>= 2.2.2, < 4.0) 222 | regexp_parser (>= 2.9.3, < 3.0) 223 | rubocop-ast (>= 1.38.0, < 2.0) 224 | ruby-progressbar (~> 1.7) 225 | unicode-display_width (>= 2.4.0, < 4.0) 226 | rubocop-ast (1.38.0) 227 | parser (>= 3.3.1.0) 228 | rubocop-shopify (2.15.1) 229 | rubocop (~> 1.51) 230 | ruby-progressbar (1.13.0) 231 | securerandom (0.4.1) 232 | stringio (3.1.5) 233 | stubberry (0.3.0) 234 | thor (1.3.2) 235 | timeout (0.4.3) 236 | tzinfo (2.0.6) 237 | concurrent-ruby (~> 1.0) 238 | unicode-display_width (3.1.4) 239 | unicode-emoji (~> 4.0, >= 4.0.4) 240 | unicode-emoji (4.0.4) 241 | uri (1.0.2) 242 | useragent (0.16.11) 243 | websocket-driver (0.7.7) 244 | base64 245 | websocket-extensions (>= 0.1.0) 246 | websocket-extensions (0.1.5) 247 | zeitwerk (2.7.2) 248 | 249 | PLATFORMS 250 | aarch64-linux-gnu 251 | aarch64-linux-musl 252 | arm-linux-gnu 253 | arm-linux-musl 254 | arm64-darwin 255 | x86_64-darwin 256 | x86_64-linux-gnu 257 | x86_64-linux-musl 258 | 259 | DEPENDENCIES 260 | appraisal 261 | awesome_print 262 | bundler (>= 1) 263 | differ (~> 0.1) 264 | minitest (~> 5.0) 265 | pg (~> 1) 266 | pry-byebug (~> 3.9) 267 | rails (>= 8) 268 | rails_sql_prettifier! 269 | rake (>= 12.3.3) 270 | rubocop-shopify 271 | stubberry (~> 0.2) 272 | 273 | BUNDLED WITH 274 | 2.6.5 275 | -------------------------------------------------------------------------------- /gemfiles/rails_7.2.gemfile.lock: -------------------------------------------------------------------------------- 1 | PATH 2 | remote: .. 3 | specs: 4 | rails_sql_prettifier (7.0.6) 5 | activerecord (>= 7) 6 | niceql (~> 0.6) 7 | 8 | GEM 9 | remote: https://rubygems.org/ 10 | specs: 11 | actioncable (7.2.2.1) 12 | actionpack (= 7.2.2.1) 13 | activesupport (= 7.2.2.1) 14 | nio4r (~> 2.0) 15 | websocket-driver (>= 0.6.1) 16 | zeitwerk (~> 2.6) 17 | actionmailbox (7.2.2.1) 18 | actionpack (= 7.2.2.1) 19 | activejob (= 7.2.2.1) 20 | activerecord (= 7.2.2.1) 21 | activestorage (= 7.2.2.1) 22 | activesupport (= 7.2.2.1) 23 | mail (>= 2.8.0) 24 | actionmailer (7.2.2.1) 25 | actionpack (= 7.2.2.1) 26 | actionview (= 7.2.2.1) 27 | activejob (= 7.2.2.1) 28 | activesupport (= 7.2.2.1) 29 | mail (>= 2.8.0) 30 | rails-dom-testing (~> 2.2) 31 | actionpack (7.2.2.1) 32 | actionview (= 7.2.2.1) 33 | activesupport (= 7.2.2.1) 34 | nokogiri (>= 1.8.5) 35 | racc 36 | rack (>= 2.2.4, < 3.2) 37 | rack-session (>= 1.0.1) 38 | rack-test (>= 0.6.3) 39 | rails-dom-testing (~> 2.2) 40 | rails-html-sanitizer (~> 1.6) 41 | useragent (~> 0.16) 42 | actiontext (7.2.2.1) 43 | actionpack (= 7.2.2.1) 44 | activerecord (= 7.2.2.1) 45 | activestorage (= 7.2.2.1) 46 | activesupport (= 7.2.2.1) 47 | globalid (>= 0.6.0) 48 | nokogiri (>= 1.8.5) 49 | actionview (7.2.2.1) 50 | activesupport (= 7.2.2.1) 51 | builder (~> 3.1) 52 | erubi (~> 1.11) 53 | rails-dom-testing (~> 2.2) 54 | rails-html-sanitizer (~> 1.6) 55 | activejob (7.2.2.1) 56 | activesupport (= 7.2.2.1) 57 | globalid (>= 0.3.6) 58 | activemodel (7.2.2.1) 59 | activesupport (= 7.2.2.1) 60 | activerecord (7.2.2.1) 61 | activemodel (= 7.2.2.1) 62 | activesupport (= 7.2.2.1) 63 | timeout (>= 0.4.0) 64 | activestorage (7.2.2.1) 65 | actionpack (= 7.2.2.1) 66 | activejob (= 7.2.2.1) 67 | activerecord (= 7.2.2.1) 68 | activesupport (= 7.2.2.1) 69 | marcel (~> 1.0) 70 | activesupport (7.2.2.1) 71 | base64 72 | benchmark (>= 0.3) 73 | bigdecimal 74 | concurrent-ruby (~> 1.0, >= 1.3.1) 75 | connection_pool (>= 2.2.5) 76 | drb 77 | i18n (>= 1.6, < 2) 78 | logger (>= 1.4.2) 79 | minitest (>= 5.1) 80 | securerandom (>= 0.3) 81 | tzinfo (~> 2.0, >= 2.0.5) 82 | appraisal (2.5.0) 83 | bundler 84 | rake 85 | thor (>= 0.14.0) 86 | ast (2.4.2) 87 | awesome_print (1.9.2) 88 | base64 (0.2.0) 89 | benchmark (0.4.0) 90 | bigdecimal (3.1.9) 91 | builder (3.3.0) 92 | byebug (11.1.3) 93 | coderay (1.1.3) 94 | concurrent-ruby (1.3.5) 95 | connection_pool (2.5.0) 96 | crass (1.0.6) 97 | date (3.4.1) 98 | differ (0.1.2) 99 | drb (2.2.1) 100 | erubi (1.13.1) 101 | globalid (1.2.1) 102 | activesupport (>= 6.1) 103 | i18n (1.14.7) 104 | concurrent-ruby (~> 1.0) 105 | io-console (0.8.0) 106 | irb (1.15.1) 107 | pp (>= 0.6.0) 108 | rdoc (>= 4.0.0) 109 | reline (>= 0.4.2) 110 | json (2.10.1) 111 | language_server-protocol (3.17.0.4) 112 | lint_roller (1.1.0) 113 | logger (1.6.6) 114 | loofah (2.24.0) 115 | crass (~> 1.0.2) 116 | nokogiri (>= 1.12.0) 117 | mail (2.8.1) 118 | mini_mime (>= 0.1.1) 119 | net-imap 120 | net-pop 121 | net-smtp 122 | marcel (1.0.4) 123 | method_source (1.1.0) 124 | mini_mime (1.1.5) 125 | minitest (5.25.4) 126 | net-imap (0.5.6) 127 | date 128 | net-protocol 129 | net-pop (0.1.2) 130 | net-protocol 131 | net-protocol (0.2.2) 132 | timeout 133 | net-smtp (0.5.1) 134 | net-protocol 135 | niceql (0.6.1) 136 | nio4r (2.7.4) 137 | nokogiri (1.18.3-aarch64-linux-gnu) 138 | racc (~> 1.4) 139 | nokogiri (1.18.3-aarch64-linux-musl) 140 | racc (~> 1.4) 141 | nokogiri (1.18.3-arm-linux-gnu) 142 | racc (~> 1.4) 143 | nokogiri (1.18.3-arm-linux-musl) 144 | racc (~> 1.4) 145 | nokogiri (1.18.3-arm64-darwin) 146 | racc (~> 1.4) 147 | nokogiri (1.18.3-x86_64-darwin) 148 | racc (~> 1.4) 149 | nokogiri (1.18.3-x86_64-linux-gnu) 150 | racc (~> 1.4) 151 | nokogiri (1.18.3-x86_64-linux-musl) 152 | racc (~> 1.4) 153 | parallel (1.26.3) 154 | parser (3.3.7.1) 155 | ast (~> 2.4.1) 156 | racc 157 | pg (1.5.9) 158 | pp (0.6.2) 159 | prettyprint 160 | prettyprint (0.2.0) 161 | pry (0.14.2) 162 | coderay (~> 1.1) 163 | method_source (~> 1.0) 164 | pry-byebug (3.10.1) 165 | byebug (~> 11.0) 166 | pry (>= 0.13, < 0.15) 167 | psych (5.2.3) 168 | date 169 | stringio 170 | racc (1.8.1) 171 | rack (3.1.10) 172 | rack-session (2.1.0) 173 | base64 (>= 0.1.0) 174 | rack (>= 3.0.0) 175 | rack-test (2.2.0) 176 | rack (>= 1.3) 177 | rackup (2.2.1) 178 | rack (>= 3) 179 | rails (7.2.2.1) 180 | actioncable (= 7.2.2.1) 181 | actionmailbox (= 7.2.2.1) 182 | actionmailer (= 7.2.2.1) 183 | actionpack (= 7.2.2.1) 184 | actiontext (= 7.2.2.1) 185 | actionview (= 7.2.2.1) 186 | activejob (= 7.2.2.1) 187 | activemodel (= 7.2.2.1) 188 | activerecord (= 7.2.2.1) 189 | activestorage (= 7.2.2.1) 190 | activesupport (= 7.2.2.1) 191 | bundler (>= 1.15.0) 192 | railties (= 7.2.2.1) 193 | rails-dom-testing (2.2.0) 194 | activesupport (>= 5.0.0) 195 | minitest 196 | nokogiri (>= 1.6) 197 | rails-html-sanitizer (1.6.2) 198 | loofah (~> 2.21) 199 | 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) 200 | railties (7.2.2.1) 201 | actionpack (= 7.2.2.1) 202 | activesupport (= 7.2.2.1) 203 | irb (~> 1.13) 204 | rackup (>= 1.0.0) 205 | rake (>= 12.2) 206 | thor (~> 1.0, >= 1.2.2) 207 | zeitwerk (~> 2.6) 208 | rainbow (3.1.1) 209 | rake (13.2.1) 210 | rdoc (6.12.0) 211 | psych (>= 4.0.0) 212 | regexp_parser (2.10.0) 213 | reline (0.6.0) 214 | io-console (~> 0.5) 215 | rubocop (1.72.2) 216 | json (~> 2.3) 217 | language_server-protocol (~> 3.17.0.2) 218 | lint_roller (~> 1.1.0) 219 | parallel (~> 1.10) 220 | parser (>= 3.3.0.2) 221 | rainbow (>= 2.2.2, < 4.0) 222 | regexp_parser (>= 2.9.3, < 3.0) 223 | rubocop-ast (>= 1.38.0, < 2.0) 224 | ruby-progressbar (~> 1.7) 225 | unicode-display_width (>= 2.4.0, < 4.0) 226 | rubocop-ast (1.38.0) 227 | parser (>= 3.3.1.0) 228 | rubocop-shopify (2.15.1) 229 | rubocop (~> 1.51) 230 | ruby-progressbar (1.13.0) 231 | securerandom (0.4.1) 232 | stringio (3.1.5) 233 | stubberry (0.3.0) 234 | thor (1.3.2) 235 | timeout (0.4.3) 236 | tzinfo (2.0.6) 237 | concurrent-ruby (~> 1.0) 238 | unicode-display_width (3.1.4) 239 | unicode-emoji (~> 4.0, >= 4.0.4) 240 | unicode-emoji (4.0.4) 241 | useragent (0.16.11) 242 | websocket-driver (0.7.7) 243 | base64 244 | websocket-extensions (>= 0.1.0) 245 | websocket-extensions (0.1.5) 246 | zeitwerk (2.7.2) 247 | 248 | PLATFORMS 249 | aarch64-linux-gnu 250 | aarch64-linux-musl 251 | arm-linux-gnu 252 | arm-linux-musl 253 | arm64-darwin 254 | x86_64-darwin 255 | x86_64-linux-gnu 256 | x86_64-linux-musl 257 | 258 | DEPENDENCIES 259 | appraisal 260 | awesome_print 261 | bundler (>= 1) 262 | differ (~> 0.1) 263 | minitest (~> 5.0) 264 | pg (~> 1) 265 | pry-byebug (~> 3.9) 266 | rails (~> 7.1) 267 | rails_sql_prettifier! 268 | rake (>= 12.3.3) 269 | rubocop-shopify 270 | stubberry (~> 0.2) 271 | 272 | BUNDLED WITH 273 | 2.6.5 274 | -------------------------------------------------------------------------------- /gemfiles/rails_7.gemfile.lock: -------------------------------------------------------------------------------- 1 | PATH 2 | remote: .. 3 | specs: 4 | rails_sql_prettifier (7.0.6) 5 | activerecord (>= 7) 6 | niceql (~> 0.6) 7 | 8 | GEM 9 | remote: https://rubygems.org/ 10 | specs: 11 | actioncable (7.2.2.1) 12 | actionpack (= 7.2.2.1) 13 | activesupport (= 7.2.2.1) 14 | nio4r (~> 2.0) 15 | websocket-driver (>= 0.6.1) 16 | zeitwerk (~> 2.6) 17 | actionmailbox (7.2.2.1) 18 | actionpack (= 7.2.2.1) 19 | activejob (= 7.2.2.1) 20 | activerecord (= 7.2.2.1) 21 | activestorage (= 7.2.2.1) 22 | activesupport (= 7.2.2.1) 23 | mail (>= 2.8.0) 24 | actionmailer (7.2.2.1) 25 | actionpack (= 7.2.2.1) 26 | actionview (= 7.2.2.1) 27 | activejob (= 7.2.2.1) 28 | activesupport (= 7.2.2.1) 29 | mail (>= 2.8.0) 30 | rails-dom-testing (~> 2.2) 31 | actionpack (7.2.2.1) 32 | actionview (= 7.2.2.1) 33 | activesupport (= 7.2.2.1) 34 | nokogiri (>= 1.8.5) 35 | racc 36 | rack (>= 2.2.4, < 3.2) 37 | rack-session (>= 1.0.1) 38 | rack-test (>= 0.6.3) 39 | rails-dom-testing (~> 2.2) 40 | rails-html-sanitizer (~> 1.6) 41 | useragent (~> 0.16) 42 | actiontext (7.2.2.1) 43 | actionpack (= 7.2.2.1) 44 | activerecord (= 7.2.2.1) 45 | activestorage (= 7.2.2.1) 46 | activesupport (= 7.2.2.1) 47 | globalid (>= 0.6.0) 48 | nokogiri (>= 1.8.5) 49 | actionview (7.2.2.1) 50 | activesupport (= 7.2.2.1) 51 | builder (~> 3.1) 52 | erubi (~> 1.11) 53 | rails-dom-testing (~> 2.2) 54 | rails-html-sanitizer (~> 1.6) 55 | activejob (7.2.2.1) 56 | activesupport (= 7.2.2.1) 57 | globalid (>= 0.3.6) 58 | activemodel (7.2.2.1) 59 | activesupport (= 7.2.2.1) 60 | activerecord (7.2.2.1) 61 | activemodel (= 7.2.2.1) 62 | activesupport (= 7.2.2.1) 63 | timeout (>= 0.4.0) 64 | activestorage (7.2.2.1) 65 | actionpack (= 7.2.2.1) 66 | activejob (= 7.2.2.1) 67 | activerecord (= 7.2.2.1) 68 | activesupport (= 7.2.2.1) 69 | marcel (~> 1.0) 70 | activesupport (7.2.2.1) 71 | base64 72 | benchmark (>= 0.3) 73 | bigdecimal 74 | concurrent-ruby (~> 1.0, >= 1.3.1) 75 | connection_pool (>= 2.2.5) 76 | drb 77 | i18n (>= 1.6, < 2) 78 | logger (>= 1.4.2) 79 | minitest (>= 5.1) 80 | securerandom (>= 0.3) 81 | tzinfo (~> 2.0, >= 2.0.5) 82 | appraisal (2.5.0) 83 | bundler 84 | rake 85 | thor (>= 0.14.0) 86 | ast (2.4.2) 87 | awesome_print (1.9.2) 88 | base64 (0.2.0) 89 | benchmark (0.4.0) 90 | bigdecimal (3.1.9) 91 | builder (3.3.0) 92 | byebug (11.1.3) 93 | coderay (1.1.3) 94 | concurrent-ruby (1.3.5) 95 | connection_pool (2.5.0) 96 | crass (1.0.6) 97 | date (3.4.1) 98 | differ (0.1.2) 99 | drb (2.2.1) 100 | erubi (1.13.1) 101 | globalid (1.2.1) 102 | activesupport (>= 6.1) 103 | i18n (1.14.7) 104 | concurrent-ruby (~> 1.0) 105 | io-console (0.8.0) 106 | irb (1.15.1) 107 | pp (>= 0.6.0) 108 | rdoc (>= 4.0.0) 109 | reline (>= 0.4.2) 110 | json (2.10.1) 111 | language_server-protocol (3.17.0.4) 112 | lint_roller (1.1.0) 113 | logger (1.6.6) 114 | loofah (2.24.0) 115 | crass (~> 1.0.2) 116 | nokogiri (>= 1.12.0) 117 | mail (2.8.1) 118 | mini_mime (>= 0.1.1) 119 | net-imap 120 | net-pop 121 | net-smtp 122 | marcel (1.0.4) 123 | method_source (1.1.0) 124 | mini_mime (1.1.5) 125 | minitest (5.25.4) 126 | net-imap (0.5.6) 127 | date 128 | net-protocol 129 | net-pop (0.1.2) 130 | net-protocol 131 | net-protocol (0.2.2) 132 | timeout 133 | net-smtp (0.5.1) 134 | net-protocol 135 | niceql (0.6.1) 136 | nio4r (2.7.4) 137 | nokogiri (1.18.3-aarch64-linux-gnu) 138 | racc (~> 1.4) 139 | nokogiri (1.18.3-aarch64-linux-musl) 140 | racc (~> 1.4) 141 | nokogiri (1.18.3-arm-linux-gnu) 142 | racc (~> 1.4) 143 | nokogiri (1.18.3-arm-linux-musl) 144 | racc (~> 1.4) 145 | nokogiri (1.18.3-arm64-darwin) 146 | racc (~> 1.4) 147 | nokogiri (1.18.3-x86_64-darwin) 148 | racc (~> 1.4) 149 | nokogiri (1.18.3-x86_64-linux-gnu) 150 | racc (~> 1.4) 151 | nokogiri (1.18.3-x86_64-linux-musl) 152 | racc (~> 1.4) 153 | parallel (1.26.3) 154 | parser (3.3.7.1) 155 | ast (~> 2.4.1) 156 | racc 157 | pg (1.5.9) 158 | pp (0.6.2) 159 | prettyprint 160 | prettyprint (0.2.0) 161 | pry (0.14.2) 162 | coderay (~> 1.1) 163 | method_source (~> 1.0) 164 | pry-byebug (3.10.1) 165 | byebug (~> 11.0) 166 | pry (>= 0.13, < 0.15) 167 | psych (5.2.3) 168 | date 169 | stringio 170 | racc (1.8.1) 171 | rack (3.1.10) 172 | rack-session (2.1.0) 173 | base64 (>= 0.1.0) 174 | rack (>= 3.0.0) 175 | rack-test (2.2.0) 176 | rack (>= 1.3) 177 | rackup (2.2.1) 178 | rack (>= 3) 179 | rails (7.2.2.1) 180 | actioncable (= 7.2.2.1) 181 | actionmailbox (= 7.2.2.1) 182 | actionmailer (= 7.2.2.1) 183 | actionpack (= 7.2.2.1) 184 | actiontext (= 7.2.2.1) 185 | actionview (= 7.2.2.1) 186 | activejob (= 7.2.2.1) 187 | activemodel (= 7.2.2.1) 188 | activerecord (= 7.2.2.1) 189 | activestorage (= 7.2.2.1) 190 | activesupport (= 7.2.2.1) 191 | bundler (>= 1.15.0) 192 | railties (= 7.2.2.1) 193 | rails-dom-testing (2.2.0) 194 | activesupport (>= 5.0.0) 195 | minitest 196 | nokogiri (>= 1.6) 197 | rails-html-sanitizer (1.6.2) 198 | loofah (~> 2.21) 199 | 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) 200 | railties (7.2.2.1) 201 | actionpack (= 7.2.2.1) 202 | activesupport (= 7.2.2.1) 203 | irb (~> 1.13) 204 | rackup (>= 1.0.0) 205 | rake (>= 12.2) 206 | thor (~> 1.0, >= 1.2.2) 207 | zeitwerk (~> 2.6) 208 | rainbow (3.1.1) 209 | rake (13.2.1) 210 | rdoc (6.12.0) 211 | psych (>= 4.0.0) 212 | regexp_parser (2.10.0) 213 | reline (0.6.0) 214 | io-console (~> 0.5) 215 | rubocop (1.72.2) 216 | json (~> 2.3) 217 | language_server-protocol (~> 3.17.0.2) 218 | lint_roller (~> 1.1.0) 219 | parallel (~> 1.10) 220 | parser (>= 3.3.0.2) 221 | rainbow (>= 2.2.2, < 4.0) 222 | regexp_parser (>= 2.9.3, < 3.0) 223 | rubocop-ast (>= 1.38.0, < 2.0) 224 | ruby-progressbar (~> 1.7) 225 | unicode-display_width (>= 2.4.0, < 4.0) 226 | rubocop-ast (1.38.0) 227 | parser (>= 3.3.1.0) 228 | rubocop-shopify (2.15.1) 229 | rubocop (~> 1.51) 230 | ruby-progressbar (1.13.0) 231 | securerandom (0.4.1) 232 | stringio (3.1.5) 233 | stubberry (0.3.0) 234 | thor (1.3.2) 235 | timeout (0.4.3) 236 | tzinfo (2.0.6) 237 | concurrent-ruby (~> 1.0) 238 | unicode-display_width (3.1.4) 239 | unicode-emoji (~> 4.0, >= 4.0.4) 240 | unicode-emoji (4.0.4) 241 | useragent (0.16.11) 242 | websocket-driver (0.7.7) 243 | base64 244 | websocket-extensions (>= 0.1.0) 245 | websocket-extensions (0.1.5) 246 | zeitwerk (2.7.2) 247 | 248 | PLATFORMS 249 | aarch64-linux-gnu 250 | aarch64-linux-musl 251 | arm-linux-gnu 252 | arm-linux-musl 253 | arm64-darwin 254 | x86_64-darwin 255 | x86_64-linux-gnu 256 | x86_64-linux-musl 257 | 258 | DEPENDENCIES 259 | appraisal 260 | awesome_print 261 | bundler (>= 1) 262 | differ (~> 0.1) 263 | minitest (~> 5.0) 264 | pg (~> 1) 265 | pry-byebug (~> 3.9) 266 | rails (~> 7.1) 267 | rails_sql_prettifier! 268 | rake (>= 12.3.3) 269 | rubocop-shopify 270 | stubberry (~> 0.2) 271 | 272 | BUNDLED WITH 273 | 2.6.5 274 | --------------------------------------------------------------------------------