diff --git a/spec/dummy/.gitignore b/spec/dummy/.gitignore index e16dc71d2..3d30682d1 100644 --- a/spec/dummy/.gitignore +++ b/spec/dummy/.gitignore @@ -29,3 +29,7 @@ # Ignore master key for decrypting credentials and more. /config/master.key + +# Ignores for working with manageiq-schema plugin +/config/database.yml +/db/schema.rb diff --git a/spec/dummy/.ruby-version b/spec/dummy/.ruby-version deleted file mode 100644 index 36415f724..000000000 --- a/spec/dummy/.ruby-version +++ /dev/null @@ -1 +0,0 @@ -ruby-3.1.5 diff --git a/spec/dummy/Gemfile b/spec/dummy/Gemfile deleted file mode 100644 index 5a02bb418..000000000 --- a/spec/dummy/Gemfile +++ /dev/null @@ -1,69 +0,0 @@ -source "https://rubygems.org" -git_source(:github) { |repo| "https://github.com/#{repo}.git" } - -ruby "3.1.5" - -# Bundle edge Rails instead: gem "rails", github: "rails/rails", branch: "main" -gem "rails", "~> 7.0.8", ">= 7.0.8.4" - -# The original asset pipeline for Rails [https://github.com/rails/sprockets-rails] -gem "sprockets-rails" - -# Use postgresql as the database for Active Record -gem "pg", "~> 1.1" - -# Use the Puma web server [https://github.com/puma/puma] -gem "puma", "~> 5.0" - -# Use JavaScript with ESM import maps [https://github.com/rails/importmap-rails] -gem "importmap-rails" - -# Hotwire's SPA-like page accelerator [https://turbo.hotwired.dev] -gem "turbo-rails" - -# Hotwire's modest JavaScript framework [https://stimulus.hotwired.dev] -gem "stimulus-rails" - -# Build JSON APIs with ease [https://github.com/rails/jbuilder] -gem "jbuilder" - -# Use Redis adapter to run Action Cable in production -# gem "redis", "~> 4.0" - -# Use Kredis to get higher-level data types in Redis [https://github.com/rails/kredis] -# gem "kredis" - -# Use Active Model has_secure_password [https://guides.rubyonrails.org/active_model_basics.html#securepassword] -# gem "bcrypt", "~> 3.1.7" - -# Windows does not include zoneinfo files, so bundle the tzinfo-data gem -gem "tzinfo-data", platforms: %i[ mingw mswin x64_mingw jruby ] - -# Use Sass to process CSS -# gem "sassc-rails" - -# 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 mingw x64_mingw ] -end - -group :development do - # Use console on exceptions pages [https://github.com/rails/web-console] - gem "web-console" - - # Add speed badges [https://github.com/MiniProfiler/rack-mini-profiler] - # gem "rack-mini-profiler" - - # Speed up commands on slow machines / big apps [https://github.com/rails/spring] - # gem "spring" -end - -group :test do - # Use system testing [https://guides.rubyonrails.org/testing.html#system-testing] - gem "capybara" - gem "selenium-webdriver" - -end diff --git a/spec/dummy/certs/v2_key b/spec/dummy/certs/v2_key new file mode 100644 index 000000000..ad7bc69c3 --- /dev/null +++ b/spec/dummy/certs/v2_key @@ -0,0 +1,5 @@ +--- +:EZCRYPTO KEY FILE: KEEP THIS SECURE ! +:created: 2014-02-28 09:59:47 -0500 +:algorithm: aes-256-cbc +:key: uXfIgSAUq5Oz8goc/zI8HOOo0SI++Sd9mfpgBanYIM4= diff --git a/spec/dummy/config/application.rb b/spec/dummy/config/application.rb index 9b9479e61..90bfac17d 100644 --- a/spec/dummy/config/application.rb +++ b/spec/dummy/config/application.rb @@ -18,5 +18,11 @@ class Application < Rails::Application # # config.time_zone = "Central Time (US & Canada)" # config.eager_load_paths << Rails.root.join("extras") + + # HACK: Temporary override of the default setting until we can update the + # migration specs to honor it. + config.active_record.belongs_to_required_by_default = false + + config.active_record.use_yaml_unsafe_load = true end end diff --git a/spec/dummy/config/boot.rb b/spec/dummy/config/boot.rb index 282011619..4cdfdda2a 100644 --- a/spec/dummy/config/boot.rb +++ b/spec/dummy/config/boot.rb @@ -1,3 +1,3 @@ -ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__) +ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../../Gemfile", __dir__) require "bundler/setup" # Set up gems listed in the Gemfile. diff --git a/spec/dummy/config/database.tmpl.yml b/spec/dummy/config/database.tmpl.yml new file mode 100644 index 000000000..cf3f1057b --- /dev/null +++ b/spec/dummy/config/database.tmpl.yml @@ -0,0 +1,23 @@ +--- +base: &base + adapter: postgresql + encoding: utf8 + username: root + password: smartvm + pool: 5 + wait_timeout: 5 + min_messages: warning + +development: + <<: *base + database: dummy_development + min_messages: notice + +production: + <<: *base + database: dummy_production + +test: &test + <<: *base + pool: 3 + database: dummy_test diff --git a/spec/dummy/config/database.yml b/spec/dummy/config/database.yml deleted file mode 100644 index 8d927df05..000000000 --- a/spec/dummy/config/database.yml +++ /dev/null @@ -1,86 +0,0 @@ -# PostgreSQL. Versions 9.3 and up are supported. -# -# Install the pg driver: -# gem install pg -# On macOS with Homebrew: -# gem install pg -- --with-pg-config=/usr/local/bin/pg_config -# On macOS with MacPorts: -# gem install pg -- --with-pg-config=/opt/local/lib/postgresql84/bin/pg_config -# On Windows: -# gem install pg -# Choose the win32 build. -# Install PostgreSQL and put its /bin directory on your path. -# -# Configure Using Gemfile -# gem "pg" -# -default: &default - adapter: postgresql - encoding: unicode - # For details on connection pooling, see Rails configuration guide - # https://guides.rubyonrails.org/configuring.html#database-pooling - pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %> - -development: - <<: *default - database: dummy_development - - # The specified database role being used to connect to postgres. - # To create additional roles in postgres see `$ createuser --help`. - # When left blank, postgres will use the default role. This is - # the same name as the operating system user running Rails. - #username: dummy - - # The password associated with the postgres role (username). - #password: - - # Connect on a TCP socket. Omitted by default since the client uses a - # domain socket that doesn't need configuration. Windows does not have - # domain sockets, so uncomment these lines. - #host: localhost - - # The TCP port the server listens on. Defaults to 5432. - # If your server runs on a different port number, change accordingly. - #port: 5432 - - # Schema search path. The server defaults to $user,public - #schema_search_path: myapp,sharedapp,public - - # Minimum log levels, in increasing order: - # debug5, debug4, debug3, debug2, debug1, - # log, notice, warning, error, fatal, and panic - # Defaults to warning. - #min_messages: notice - -# Warning: The database defined as "test" will be erased and -# re-generated from your development database when you run "rake". -# Do not set this db to the same as development or production. -test: - <<: *default - database: dummy_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 -# ever seen by anyone, they now have access to your database. -# -# Instead, provide the password or a full connection URL as an environment -# variable when you boot the app. For example: -# -# DATABASE_URL="postgres://myuser:mypass@localhost/somedatabase" -# -# If the connection URL is provided in the special DATABASE_URL environment -# variable, Rails will automatically merge its configuration values on top of -# the values provided in this file. Alternatively, you can specify a connection -# URL environment variable explicitly: -# -# production: -# url: <%= ENV["MY_APP_DATABASE_URL"] %> -# -# Read https://guides.rubyonrails.org/configuring.html#configuring-a-database -# for a full overview on how database connection configuration can be specified. -# -production: - <<: *default - database: dummy_production - username: dummy - password: <%= ENV["DUMMY_DATABASE_PASSWORD"] %> diff --git a/spec/dummy/config/environments/development.rb b/spec/dummy/config/environments/development.rb index 8500f459a..fc7f82b56 100644 --- a/spec/dummy/config/environments/development.rb +++ b/spec/dummy/config/environments/development.rb @@ -56,9 +56,6 @@ # Highlight code that triggered database queries in logs. config.active_record.verbose_query_logs = true - # Suppress logger output for asset requests. - config.assets.quiet = true - # Raises error for missing translations. # config.i18n.raise_on_missing_translations = true diff --git a/spec/dummy/config/environments/production.rb b/spec/dummy/config/environments/production.rb index 8e989b5fa..83a5a16ee 100644 --- a/spec/dummy/config/environments/production.rb +++ b/spec/dummy/config/environments/production.rb @@ -24,12 +24,6 @@ # Apache or NGINX already handles this. config.public_file_server.enabled = ENV["RAILS_SERVE_STATIC_FILES"].present? - # Compress CSS using a preprocessor. - # config.assets.css_compressor = :sass - - # Do not fallback to assets pipeline if a precompiled asset is missed. - config.assets.compile = false - # Enable serving of images, stylesheets, and JavaScripts from an asset server. # config.asset_host = "http://assets.example.com" diff --git a/spec/dummy/config/initializers/assets.rb b/spec/dummy/config/initializers/assets.rb deleted file mode 100644 index 2eeef966f..000000000 --- a/spec/dummy/config/initializers/assets.rb +++ /dev/null @@ -1,12 +0,0 @@ -# Be sure to restart your server when you modify this file. - -# Version of your assets, change this if you want to expire all your assets. -Rails.application.config.assets.version = "1.0" - -# Add additional assets to the asset load path. -# Rails.application.config.assets.paths << Emoji.images_path - -# Precompile additional assets. -# application.js, application.css, and all non-JS/CSS in the app/assets -# folder are already added. -# Rails.application.config.assets.precompile += %w( admin.js admin.css )