Skip to content

Commit

Permalink
Restore changes needed to run the schema plugin in the dummy app
Browse files Browse the repository at this point in the history
Cherry picked from commit b15f5f5:
- Remove the .ruby-version restriction
- Load the manageiq-schema Gemfile instead of the dummy app Gemfile
- Delete the generated database.yml in favor of database.tmpl.yml
- Ignore the db/schema.rb that is generated
- Restore the v2_key

Cherry picked from commit 8529571:
- Drop config.assets since sprockets-rails isn't in rail 7

Cherry picked from commit c716815:
- Temporary override of the belongs_to_required_by_default setting

Cherry picked from commit 6b7d6fd:
- Update the dummy app to use_yaml_unsafe_load in rails 6.0.5.1
  • Loading branch information
Fryguy committed Aug 30, 2024
1 parent ee2b361 commit bb3d41a
Show file tree
Hide file tree
Showing 11 changed files with 39 additions and 178 deletions.
4 changes: 4 additions & 0 deletions spec/dummy/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 0 additions & 1 deletion spec/dummy/.ruby-version

This file was deleted.

69 changes: 0 additions & 69 deletions spec/dummy/Gemfile

This file was deleted.

5 changes: 5 additions & 0 deletions spec/dummy/certs/v2_key
Original file line number Diff line number Diff line change
@@ -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=
6 changes: 6 additions & 0 deletions spec/dummy/config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion spec/dummy/config/boot.rb
Original file line number Diff line number Diff line change
@@ -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.
23 changes: 23 additions & 0 deletions spec/dummy/config/database.tmpl.yml
Original file line number Diff line number Diff line change
@@ -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
86 changes: 0 additions & 86 deletions spec/dummy/config/database.yml

This file was deleted.

3 changes: 0 additions & 3 deletions spec/dummy/config/environments/development.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
6 changes: 0 additions & 6 deletions spec/dummy/config/environments/production.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
12 changes: 0 additions & 12 deletions spec/dummy/config/initializers/assets.rb

This file was deleted.

0 comments on commit bb3d41a

Please sign in to comment.