+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/test/dummy/bin/bundle b/test/dummy/bin/bundle
index 66e9889e8..f19acf5b5 100755
--- a/test/dummy/bin/bundle
+++ b/test/dummy/bin/bundle
@@ -1,3 +1,3 @@
#!/usr/bin/env ruby
-ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
+ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__)
load Gem.bin_path('bundler', 'bundle')
diff --git a/test/dummy/bin/rails b/test/dummy/bin/rails
index 728cd85aa..073966023 100755
--- a/test/dummy/bin/rails
+++ b/test/dummy/bin/rails
@@ -1,4 +1,4 @@
#!/usr/bin/env ruby
-APP_PATH = File.expand_path('../../config/application', __FILE__)
+APP_PATH = File.expand_path('../config/application', __dir__)
require_relative '../config/boot'
require 'rails/commands'
diff --git a/test/dummy/bin/setup b/test/dummy/bin/setup
new file mode 100755
index 000000000..94fd4d797
--- /dev/null
+++ b/test/dummy/bin/setup
@@ -0,0 +1,36 @@
+#!/usr/bin/env ruby
+require 'fileutils'
+include FileUtils
+
+# path to your application root.
+APP_ROOT = File.expand_path('..', __dir__)
+
+def system!(*args)
+ system(*args) || abort("\n== Command #{args} failed ==")
+end
+
+chdir APP_ROOT do
+ # This script is a starting point to setup your application.
+ # Add necessary setup steps to this file.
+
+ puts '== Installing dependencies =='
+ system! 'gem install bundler --conservative'
+ system('bundle check') || system!('bundle install')
+
+ # Install JavaScript dependencies if using Yarn
+ # system('bin/yarn')
+
+ # puts "\n== Copying sample files =="
+ # unless File.exist?('config/database.yml')
+ # cp 'config/database.yml.sample', 'config/database.yml'
+ # end
+
+ puts "\n== Preparing database =="
+ system! 'bin/rails db:setup'
+
+ puts "\n== Removing old logs and tempfiles =="
+ system! 'bin/rails log:clear tmp:clear'
+
+ puts "\n== Restarting application server =="
+ system! 'bin/rails restart'
+end
diff --git a/test/dummy/bin/update b/test/dummy/bin/update
new file mode 100755
index 000000000..58bfaed51
--- /dev/null
+++ b/test/dummy/bin/update
@@ -0,0 +1,31 @@
+#!/usr/bin/env ruby
+require 'fileutils'
+include FileUtils
+
+# path to your application root.
+APP_ROOT = File.expand_path('..', __dir__)
+
+def system!(*args)
+ system(*args) || abort("\n== Command #{args} failed ==")
+end
+
+chdir APP_ROOT do
+ # This script is a way to update your development environment automatically.
+ # Add necessary update steps to this file.
+
+ puts '== Installing dependencies =='
+ system! 'gem install bundler --conservative'
+ system('bundle check') || system!('bundle install')
+
+ # Install JavaScript dependencies if using Yarn
+ # system('bin/yarn')
+
+ puts "\n== Updating database =="
+ system! 'bin/rails db:migrate'
+
+ puts "\n== Removing old logs and tempfiles =="
+ system! 'bin/rails log:clear tmp:clear'
+
+ puts "\n== Restarting application server =="
+ system! 'bin/rails restart'
+end
diff --git a/test/dummy/bin/yarn b/test/dummy/bin/yarn
new file mode 100755
index 000000000..ec3db7b27
--- /dev/null
+++ b/test/dummy/bin/yarn
@@ -0,0 +1,11 @@
+#!/usr/bin/env ruby
+APP_ROOT = File.expand_path('..', __dir__)
+Dir.chdir(APP_ROOT) do
+ begin
+ exec "yarnpkg #{ARGV.join(' ')}"
+ rescue Errno::ENOENT
+ $stderr.puts "Yarn executable was not detected in the system."
+ $stderr.puts "Download Yarn at https://yarnpkg.com/en/docs/install"
+ exit 1
+ end
+end
diff --git a/test/dummy/config.ru b/test/dummy/config.ru
index 5bc2a619e..f7ba0b527 100644
--- a/test/dummy/config.ru
+++ b/test/dummy/config.ru
@@ -1,4 +1,5 @@
# This file is used by Rack-based servers to start the application.
-require ::File.expand_path('../config/environment', __FILE__)
+require_relative 'config/environment'
+
run Rails.application
diff --git a/test/dummy/config/application.rb b/test/dummy/config/application.rb
index 4cd6683f8..adc98cac0 100644
--- a/test/dummy/config/application.rb
+++ b/test/dummy/config/application.rb
@@ -1,23 +1,24 @@
-require File.expand_path('../boot', __FILE__)
+require_relative 'boot'
require 'rails/all'
-# Require the gems listed in Gemfile, including any gems
-# you've limited to :test, :development, or :production.
-Bundler.require(:default, Rails.env)
+Bundler.require(*Rails.groups)
+require "bootstrap_form"
module Dummy
class Application < Rails::Application
+ # Initialize configuration defaults for originally generated Rails version.
+
+ if config.respond_to?(:load_defaults)
+ config.load_defaults [Rails::VERSION::MAJOR, Rails::VERSION::MINOR].join(".")
+ end
+
+ if config.respond_to?(:secret_key_base)
+ config.secret_key_base = "ignore"
+ end
+
# Settings in config/environments/* take precedence over those specified here.
# Application configuration should go into files in config/initializers
# -- all .rb files in that directory are automatically loaded.
-
- # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
- # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
- # config.time_zone = 'Central Time (US & Canada)'
-
- # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
- # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
- # config.i18n.default_locale = :de
end
end
diff --git a/test/dummy/config/boot.rb b/test/dummy/config/boot.rb
index 5e5f0c1fa..c9aef85d4 100644
--- a/test/dummy/config/boot.rb
+++ b/test/dummy/config/boot.rb
@@ -1,4 +1,5 @@
# Set up gems listed in the Gemfile.
-ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
+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/test/dummy/config/database.yml b/test/dummy/config/database.yml
index 51a4dd459..0d02f2498 100644
--- a/test/dummy/config/database.yml
+++ b/test/dummy/config/database.yml
@@ -3,23 +3,23 @@
#
# Ensure the SQLite 3 gem is defined in your Gemfile
# gem 'sqlite3'
-development:
+#
+default: &default
adapter: sqlite3
- database: db/development.sqlite3
- pool: 5
+ pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
timeout: 5000
+development:
+ <<: *default
+ database: db/development.sqlite3
+
# 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:
- adapter: sqlite3
+ <<: *default
database: db/test.sqlite3
- pool: 5
- timeout: 5000
production:
- adapter: sqlite3
+ <<: *default
database: db/production.sqlite3
- pool: 5
- timeout: 5000
diff --git a/test/dummy/config/environment.rb b/test/dummy/config/environment.rb
index 10e0cadcf..426333bb4 100644
--- a/test/dummy/config/environment.rb
+++ b/test/dummy/config/environment.rb
@@ -1,5 +1,5 @@
# Load the Rails application.
-require File.expand_path('../application', __FILE__)
+require_relative 'application'
# Initialize the Rails application.
-Dummy::Application.initialize!
+Rails.application.initialize!
diff --git a/test/dummy/config/environments/development.rb b/test/dummy/config/environments/development.rb
index 9d26e1250..8a9751305 100644
--- a/test/dummy/config/environments/development.rb
+++ b/test/dummy/config/environments/development.rb
@@ -1,4 +1,4 @@
-Dummy::Application.configure do
+Rails.application.configure do
# Settings specified here will take precedence over those in config/application.rb.
# In the development environment your application's code is reloaded on
@@ -9,21 +9,52 @@
# Do not eager load code on boot.
config.eager_load = false
- # Show full error reports and disable caching.
- config.consider_all_requests_local = true
- config.action_controller.perform_caching = false
+ # Show full error reports.
+ config.consider_all_requests_local = true
+
+ # Enable/disable caching. By default caching is disabled.
+ # Run rails dev:cache to toggle caching.
+ if Rails.root.join('tmp/caching-dev.txt').exist?
+ config.action_controller.perform_caching = true
+
+ config.cache_store = :memory_store
+ config.public_file_server.headers = {
+ 'Cache-Control' => "public, max-age=#{2.days.to_i}"
+ }
+ else
+ config.action_controller.perform_caching = false
+
+ config.cache_store = :null_store
+ end
+
+ # Store uploaded files on the local file system (see config/storage.yml for options)
+ if config.respond_to?(:active_storage)
+ config.active_storage.service = :local
+ end
# Don't care if the mailer can't send.
config.action_mailer.raise_delivery_errors = false
+ config.action_mailer.perform_caching = false
+
# Print deprecation notices to the Rails logger.
config.active_support.deprecation = :log
- # Raise an error on page load if there are pending migrations
+ # Raise an error on page load if there are pending migrations.
config.active_record.migration_error = :page_load
# Debug mode disables concatenation and preprocessing of assets.
# This option may cause significant delays in view rendering with a large
# number of complex assets.
config.assets.debug = true
+
+ # Suppress logger output for asset requests.
+ config.assets.quiet = true
+
+ # Raises error for missing translations
+ # config.action_view.raise_on_missing_translations = true
+
+ # Use an evented file watcher to asynchronously detect changes in source code,
+ # routes, locales, etc. This feature depends on the listen gem.
+ # config.file_watcher = ActiveSupport::EventedFileUpdateChecker
end
diff --git a/test/dummy/config/environments/production.rb b/test/dummy/config/environments/production.rb
deleted file mode 100644
index b690b1cf6..000000000
--- a/test/dummy/config/environments/production.rb
+++ /dev/null
@@ -1,80 +0,0 @@
-Dummy::Application.configure do
- # Settings specified here will take precedence over those in config/application.rb.
-
- # Code is not reloaded between requests.
- config.cache_classes = true
-
- # Eager load code on boot. This eager loads most of Rails and
- # your application in memory, allowing both thread web servers
- # and those relying on copy on write to perform better.
- # Rake tasks automatically ignore this option for performance.
- config.eager_load = true
-
- # Full error reports are disabled and caching is turned on.
- config.consider_all_requests_local = false
- config.action_controller.perform_caching = true
-
- # Enable Rack::Cache to put a simple HTTP cache in front of your application
- # Add `rack-cache` to your Gemfile before enabling this.
- # For large-scale production use, consider using a caching reverse proxy like nginx, varnish or squid.
- # config.action_dispatch.rack_cache = true
-
- # Disable Rails's static asset server (Apache or nginx will already do this).
- config.serve_static_assets = false
-
- # Compress JavaScripts and CSS.
- config.assets.js_compressor = :uglifier
- # config.assets.css_compressor = :sass
-
- # Do not fallback to assets pipeline if a precompiled asset is missed.
- config.assets.compile = false
-
- # Generate digests for assets URLs.
- config.assets.digest = true
-
- # Version of your assets, change this if you want to expire all your assets.
- config.assets.version = '1.0'
-
- # Specifies the header that your server uses for sending files.
- # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache
- # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx
-
- # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
- # config.force_ssl = true
-
- # Set to :debug to see everything in the log.
- config.log_level = :info
-
- # Prepend all log lines with the following tags.
- # config.log_tags = [ :subdomain, :uuid ]
-
- # Use a different logger for distributed setups.
- # config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
-
- # Use a different cache store in production.
- # config.cache_store = :mem_cache_store
-
- # Enable serving of images, stylesheets, and JavaScripts from an asset server.
- # config.action_controller.asset_host = "http://assets.example.com"
-
- # Precompile additional assets.
- # application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
- # config.assets.precompile += %w( search.js )
-
- # 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.
- # config.action_mailer.raise_delivery_errors = false
-
- # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
- # the I18n.default_locale when a translation can not be found).
- config.i18n.fallbacks = true
-
- # Send deprecation notices to registered listeners.
- config.active_support.deprecation = :notify
-
- # Disable automatic flushing of the log to improve performance.
- # config.autoflush_log = false
-
- # Use default logging formatter so that PID and timestamp are not suppressed.
- config.log_formatter = ::Logger::Formatter.new
-end
diff --git a/test/dummy/config/environments/test.rb b/test/dummy/config/environments/test.rb
index aeb6b5550..41c1cacc3 100644
--- a/test/dummy/config/environments/test.rb
+++ b/test/dummy/config/environments/test.rb
@@ -1,4 +1,4 @@
-Dummy::Application.configure do
+Rails.application.configure do
# Settings specified here will take precedence over those in config/application.rb.
# The test environment is used exclusively to run your application's
@@ -12,23 +12,11 @@
# preloads Rails for running tests, you may have to set it to true.
config.eager_load = false
- version = Rails.version.to_f
-
- # Configure static asset server for tests with Cache-Control for performance.
- if version < 4.2
- config.serve_static_assets = true
- elsif version < 5
- config.serve_static_files = true
- end
-
- if version < 5
- config.static_cache_control = "public, max-age=3600"
- else
- config.public_file_server.enabled = true
- config.public_file_server.headers = {
- "Cache-Control" => "public, max-age=3600"
- }
- end
+ # Configure public file server for tests with Cache-Control for performance.
+ config.public_file_server.enabled = true
+ config.public_file_server.headers = {
+ 'Cache-Control' => "public, max-age=#{1.hour.to_i}"
+ }
# Show full error reports and disable caching.
config.consider_all_requests_local = true
@@ -40,6 +28,13 @@
# Disable request forgery protection in test environment.
config.action_controller.allow_forgery_protection = false
+ # Store uploaded files on the local file system in a temporary directory
+ if config.respond_to?(:active_storage)
+ config.active_storage.service = :test
+ end
+
+ config.action_mailer.perform_caching = false
+
# Tell Action Mailer not to deliver emails to the real world.
# The :test delivery method accumulates sent emails in the
# ActionMailer::Base.deliveries array.
@@ -48,6 +43,6 @@
# Print deprecation notices to the stderr.
config.active_support.deprecation = :stderr
- # In Rails 5, the default value of this option will change from `:sorted` to `:random`.
- config.active_support.test_order = :sorted
+ # Raises error for missing translations
+ # config.action_view.raise_on_missing_translations = true
end
diff --git a/test/dummy/config/initializers/application_controller_renderer.rb b/test/dummy/config/initializers/application_controller_renderer.rb
new file mode 100644
index 000000000..89d2efab2
--- /dev/null
+++ b/test/dummy/config/initializers/application_controller_renderer.rb
@@ -0,0 +1,8 @@
+# Be sure to restart your server when you modify this file.
+
+# ActiveSupport::Reloader.to_prepare do
+# ApplicationController.renderer.defaults.merge!(
+# http_host: 'example.org',
+# https: false
+# )
+# end
diff --git a/test/dummy/config/initializers/assets.rb b/test/dummy/config/initializers/assets.rb
new file mode 100644
index 000000000..4b828e80c
--- /dev/null
+++ b/test/dummy/config/initializers/assets.rb
@@ -0,0 +1,14 @@
+# 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
+# Add Yarn node_modules folder to the asset load path.
+Rails.application.config.assets.paths << Rails.root.join('node_modules')
+
+# 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 )
diff --git a/test/dummy/config/initializers/cookies_serializer.rb b/test/dummy/config/initializers/cookies_serializer.rb
new file mode 100644
index 000000000..5a6a32d37
--- /dev/null
+++ b/test/dummy/config/initializers/cookies_serializer.rb
@@ -0,0 +1,5 @@
+# Be sure to restart your server when you modify this file.
+
+# Specify a serializer for the signed and encrypted cookie jars.
+# Valid options are :json, :marshal, and :hybrid.
+Rails.application.config.action_dispatch.cookies_serializer = :json
diff --git a/test/dummy/config/initializers/generic_migration.rb b/test/dummy/config/initializers/generic_migration.rb
deleted file mode 100644
index 6634663f7..000000000
--- a/test/dummy/config/initializers/generic_migration.rb
+++ /dev/null
@@ -1,6 +0,0 @@
-version = Rails.version.to_f
-if version < 5.0
- class GenericMigration < ActiveRecord::Migration; end
-else
- class GenericMigration < ActiveRecord::Migration[5.0]; end
-end
diff --git a/test/dummy/config/initializers/mime_types.rb b/test/dummy/config/initializers/mime_types.rb
index 72aca7e44..dc1899682 100644
--- a/test/dummy/config/initializers/mime_types.rb
+++ b/test/dummy/config/initializers/mime_types.rb
@@ -2,4 +2,3 @@
# Add new mime types for use in respond_to blocks:
# Mime::Type.register "text/richtext", :rtf
-# Mime::Type.register_alias "text/html", :iphone
diff --git a/test/dummy/config/initializers/secret_token.rb b/test/dummy/config/initializers/secret_token.rb
deleted file mode 100644
index 6681ab352..000000000
--- a/test/dummy/config/initializers/secret_token.rb
+++ /dev/null
@@ -1,12 +0,0 @@
-# Be sure to restart your server when you modify this file.
-
-# Your secret key is used for verifying the integrity of signed cookies.
-# If you change this key, all old signed cookies will become invalid!
-
-# Make sure the secret is at least 30 characters and all random,
-# no regular words or you'll be exposed to dictionary attacks.
-# You can use `rake secret` to generate a secure secret key.
-
-# Make sure your secret_key_base is kept private
-# if you're sharing your code publicly.
-Dummy::Application.config.secret_key_base = 'bec72f1ad1c7af22ffaa254b55db3012b074c780aebcb898a763397a82e1ab4514361d1bccd30addb962d142c20e37d0502a9bd0526a76e36135dfd957b50f7d'
diff --git a/test/dummy/config/initializers/session_store.rb b/test/dummy/config/initializers/session_store.rb
deleted file mode 100644
index 155f7b028..000000000
--- a/test/dummy/config/initializers/session_store.rb
+++ /dev/null
@@ -1,3 +0,0 @@
-# Be sure to restart your server when you modify this file.
-
-Dummy::Application.config.session_store :cookie_store, key: '_dummy_session'
diff --git a/test/dummy/config/initializers/wrap_parameters.rb b/test/dummy/config/initializers/wrap_parameters.rb
index 33725e95f..bbfc3961b 100644
--- a/test/dummy/config/initializers/wrap_parameters.rb
+++ b/test/dummy/config/initializers/wrap_parameters.rb
@@ -5,10 +5,10 @@
# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
ActiveSupport.on_load(:action_controller) do
- wrap_parameters format: [:json] if respond_to?(:wrap_parameters)
+ wrap_parameters format: [:json]
end
# To enable root element in JSON for ActiveRecord objects.
# ActiveSupport.on_load(:active_record) do
-# self.include_root_in_json = true
+# self.include_root_in_json = true
# end
diff --git a/test/dummy/config/locales/en.yml b/test/dummy/config/locales/en.yml
index 065395716..decc5a857 100644
--- a/test/dummy/config/locales/en.yml
+++ b/test/dummy/config/locales/en.yml
@@ -16,6 +16,16 @@
#
# This would use the information in config/locales/es.yml.
#
+# The following keys must be escaped otherwise they will not be retrieved by
+# the default I18n backend:
+#
+# true, false, on, off, yes, no
+#
+# Instead, surround them with single quotes.
+#
+# en:
+# 'true': 'foo'
+#
# To learn more, please read the Rails Internationalization guide
# available at http://guides.rubyonrails.org/i18n.html.
diff --git a/test/dummy/config/puma.rb b/test/dummy/config/puma.rb
new file mode 100644
index 000000000..1e19380dc
--- /dev/null
+++ b/test/dummy/config/puma.rb
@@ -0,0 +1,56 @@
+# Puma can serve each request in a thread from an internal thread pool.
+# The `threads` method setting takes two numbers: a minimum and maximum.
+# Any libraries that use thread pools should be configured to match
+# the maximum value specified for Puma. Default is set to 5 threads for minimum
+# and maximum; this matches the default thread size of Active Record.
+#
+threads_count = ENV.fetch("RAILS_MAX_THREADS") { 5 }
+threads threads_count, threads_count
+
+# Specifies the `port` that Puma will listen on to receive requests; default is 3000.
+#
+port ENV.fetch("PORT") { 3000 }
+
+# Specifies the `environment` that Puma will run in.
+#
+environment ENV.fetch("RAILS_ENV") { "development" }
+
+# Specifies the number of `workers` to boot in clustered mode.
+# Workers are forked webserver processes. If using threads and workers together
+# the concurrency of the application would be max `threads` * `workers`.
+# Workers do not work on JRuby or Windows (both of which do not support
+# processes).
+#
+# workers ENV.fetch("WEB_CONCURRENCY") { 2 }
+
+# Use the `preload_app!` method when specifying a `workers` number.
+# This directive tells Puma to first boot the application and load code
+# before forking the application. This takes advantage of Copy On Write
+# process behavior so workers use less memory. If you use this option
+# you need to make sure to reconnect any threads in the `on_worker_boot`
+# block.
+#
+# preload_app!
+
+# If you are preloading your application and using Active Record, it's
+# recommended that you close any connections to the database before workers
+# are forked to prevent connection leakage.
+#
+# before_fork do
+# ActiveRecord::Base.connection_pool.disconnect! if defined?(ActiveRecord)
+# end
+
+# The code in the `on_worker_boot` will be called if you are using
+# clustered mode by specifying a number of `workers`. After each worker
+# process is booted, this block will be run. If you are using the `preload_app!`
+# option, you will want to use this block to reconnect to any threads
+# or connections that may have been created at application boot, as Ruby
+# cannot share connections between processes.
+#
+# on_worker_boot do
+# ActiveRecord::Base.establish_connection if defined?(ActiveRecord)
+# end
+#
+
+# Allow puma to be restarted by `rails restart` command.
+plugin :tmp_restart
diff --git a/test/dummy/config/routes.rb b/test/dummy/config/routes.rb
index 4867764b3..7f9ec0db9 100644
--- a/test/dummy/config/routes.rb
+++ b/test/dummy/config/routes.rb
@@ -1,3 +1,5 @@
Dummy::Application.routes.draw do
resources :users
+
+ root to: "bootstrap#form"
end
diff --git a/test/dummy/config/spring.rb b/test/dummy/config/spring.rb
new file mode 100644
index 000000000..9fa7863f9
--- /dev/null
+++ b/test/dummy/config/spring.rb
@@ -0,0 +1,6 @@
+%w[
+ .ruby-version
+ .rbenv-vars
+ tmp/restart.txt
+ tmp/caching-dev.txt
+].each { |path| Spring.watch(path) }
diff --git a/test/dummy/config/storage.yml b/test/dummy/config/storage.yml
new file mode 100644
index 000000000..388b6e475
--- /dev/null
+++ b/test/dummy/config/storage.yml
@@ -0,0 +1,35 @@
+test:
+ service: Disk
+ root: <%= Rails.root.join("tmp/storage") %>
+
+local:
+ service: Disk
+ root: <%= Rails.root.join("storage") %>
+
+# Use rails credentials:edit to set the AWS secrets (as aws:access_key_id|secret_access_key)
+# amazon:
+# service: S3
+# access_key_id: <%= Rails.application.credentials.dig(:aws, :access_key_id) %>
+# secret_access_key: <%= Rails.application.credentials.dig(:aws, :secret_access_key) %>
+# region: us-east-1
+# bucket: your_own_bucket
+
+# Remember not to checkin your GCS keyfile to a repository
+# google:
+# service: GCS
+# project: your_project
+# keyfile: <%= Rails.root.join("path/to/gcs.keyfile") %>
+# bucket: your_own_bucket
+
+# Use rails credentials:edit to set the Azure Storage secret (as azure_storage:storage_access_key)
+# microsoft:
+# service: AzureStorage
+# path: your_azure_storage_path
+# storage_account_name: your_account_name
+# storage_access_key: <%= Rails.application.credentials.dig(:azure_storage, :storage_access_key) %>
+# container: your_container_name
+
+# mirror:
+# service: Mirror
+# primary: local
+# mirrors: [ amazon, google, microsoft ]
diff --git a/test/dummy/db/migrate/20130703191909_create_users.rb b/test/dummy/db/migrate/20130703191909_create_users.rb
deleted file mode 100644
index 94f264ea1..000000000
--- a/test/dummy/db/migrate/20130703191909_create_users.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-class CreateUsers < GenericMigration
- def change
- create_table :users do |t|
- t.string :email
- t.string :password
- t.text :comments
- t.string :status
- t.string :misc
-
- t.timestamps
- end
- end
-end
diff --git a/test/dummy/db/migrate/20130703191937_create_addresses.rb b/test/dummy/db/migrate/20130703191937_create_addresses.rb
deleted file mode 100644
index 9613a6e37..000000000
--- a/test/dummy/db/migrate/20130703191937_create_addresses.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-class CreateAddresses < GenericMigration
- def change
- create_table :addresses do |t|
- t.integer :user_id
- t.string :street
- t.string :city
- t.string :state
- t.string :zip_code
-
- t.timestamps
- end
- end
-end
diff --git a/test/dummy/db/migrate/20130912171202_add_preferences_to_user.rb b/test/dummy/db/migrate/20130912171202_add_preferences_to_user.rb
deleted file mode 100644
index 8d354faa3..000000000
--- a/test/dummy/db/migrate/20130912171202_add_preferences_to_user.rb
+++ /dev/null
@@ -1,5 +0,0 @@
-class AddPreferencesToUser < GenericMigration
- def change
- add_column :users, :preferences, :text
- end
-end
diff --git a/test/dummy/db/migrate/20140327190145_add_terms_to_user.rb b/test/dummy/db/migrate/20140327190145_add_terms_to_user.rb
deleted file mode 100644
index 2aa04a3ea..000000000
--- a/test/dummy/db/migrate/20140327190145_add_terms_to_user.rb
+++ /dev/null
@@ -1,5 +0,0 @@
-class AddTermsToUser < GenericMigration
- def change
- add_column :users, :terms, :boolean, default: false
- end
-end
diff --git a/test/dummy/db/migrate/20140922133133_add_type_to_users.rb b/test/dummy/db/migrate/20140922133133_add_type_to_users.rb
deleted file mode 100644
index fc2239cd8..000000000
--- a/test/dummy/db/migrate/20140922133133_add_type_to_users.rb
+++ /dev/null
@@ -1,5 +0,0 @@
-class AddTypeToUsers < GenericMigration
- def change
- add_column :users, :type, :string
- end
-end
diff --git a/test/dummy/db/schema.rb b/test/dummy/db/schema.rb
index a072ddbdb..4020137a6 100644
--- a/test/dummy/db/schema.rb
+++ b/test/dummy/db/schema.rb
@@ -1,38 +1,24 @@
-# This file is auto-generated from the current state of the database. Instead
-# of editing this file, please use the migrations feature of Active Record to
-# incrementally modify your database, and then regenerate this schema definition.
-#
-# Note that this schema.rb definition is the authoritative source for your
-# database schema. If you need to create the application database on another
-# system, you should be using db:schema:load, not running all the migrations
-# from scratch. The latter is a flawed and unsustainable approach (the more migrations
-# you'll amass, the slower it'll run and the greater likelihood for issues).
-#
-# It's strongly recommended that you check this file into your version control system.
+ActiveRecord::Schema.define(version: 1) do
-ActiveRecord::Schema.define(version: 20140922133133) do
-
- create_table "addresses", force: :cascade do |t|
- t.integer "user_id"
- t.string "street"
- t.string "city"
- t.string "state"
- t.string "zip_code"
- t.datetime "created_at"
- t.datetime "updated_at"
+ create_table :addresses, force: :cascade do |t|
+ t.integer :user_id
+ t.string :street
+ t.string :city
+ t.string :state
+ t.string :zip_code
+ t.timestamps
end
- create_table "users", force: :cascade do |t|
- t.string "email"
- t.string "password"
- t.text "comments"
- t.string "status"
- t.string "misc"
- t.datetime "created_at"
- t.datetime "updated_at"
- t.text "preferences"
- t.boolean "terms", default: false
- t.string "type"
+ create_table :users, force: :cascade do |t|
+ t.string :email
+ t.string :password
+ t.text :comments
+ t.string :status
+ t.string :misc
+ t.text :preferences
+ t.boolean :terms, default: false
+ t.string :type
+ t.timestamps
end
end
diff --git a/test/dummy/db/seeds.rb b/test/dummy/db/seeds.rb
deleted file mode 100644
index 4edb1e857..000000000
--- a/test/dummy/db/seeds.rb
+++ /dev/null
@@ -1,7 +0,0 @@
-# This file should contain all the record creation needed to seed the database with its default values.
-# The data can then be loaded with the rake db:seed (or created alongside the db with db:setup).
-#
-# Examples:
-#
-# cities = City.create([{ name: 'Chicago' }, { name: 'Copenhagen' }])
-# Mayor.create(name: 'Emanuel', city: cities.first)
diff --git a/test/dummy/lib/assets/.keep b/test/dummy/lib/assets/.keep
deleted file mode 100644
index e69de29bb..000000000
diff --git a/test/dummy/lib/tasks/.keep b/test/dummy/lib/tasks/.keep
deleted file mode 100644
index e69de29bb..000000000
diff --git a/test/dummy/package.json b/test/dummy/package.json
new file mode 100644
index 000000000..caa2d7bb3
--- /dev/null
+++ b/test/dummy/package.json
@@ -0,0 +1,5 @@
+{
+ "name": "dummy",
+ "private": true,
+ "dependencies": {}
+}
diff --git a/test/dummy/public/404.html b/test/dummy/public/404.html
deleted file mode 100644
index a0daa0c15..000000000
--- a/test/dummy/public/404.html
+++ /dev/null
@@ -1,58 +0,0 @@
-
-
-
- The page you were looking for doesn't exist (404)
-
-
-
-
-
-
-
The page you were looking for doesn't exist.
-
You may have mistyped the address or the page may have moved.
-
-
If you are the application owner check the logs for more information.
-
-
diff --git a/test/dummy/public/422.html b/test/dummy/public/422.html
deleted file mode 100644
index fbb4b84d7..000000000
--- a/test/dummy/public/422.html
+++ /dev/null
@@ -1,58 +0,0 @@
-
-
-
- The change you wanted was rejected (422)
-
-
-
-
-
-
-
The change you wanted was rejected.
-
Maybe you tried to change something you didn't have access to.
-
-
If you are the application owner check the logs for more information.