Created
March 15, 2017 15:56
-
-
Save dskecse/2745b468c95300c0a08466df115dddb6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/.gitignore b/.gitignore | |
index 48fb168..16ffc48 100644 | |
--- a/.gitignore | |
+++ b/.gitignore | |
@@ -1,17 +1,6 @@ | |
-# See https://help.github.com/articles/ignoring-files for more about ignoring files. | |
-# | |
-# If you find yourself ignoring temporary files generated by your text editor | |
-# or operating system, you probably want to add a global ignore instead: | |
-# git config --global core.excludesfile '~/.gitignore_global' | |
- | |
-# Ignore bundler config. | |
/.bundle | |
- | |
-# Ignore all logfiles and tempfiles. | |
/log/* | |
/tmp/* | |
!/log/.keep | |
!/tmp/.keep | |
- | |
-# Ignore Byebug command history file. | |
.byebug_history | |
diff --git a/Gemfile b/Gemfile | |
index cc6ecac..66e1972 100644 | |
--- a/Gemfile | |
+++ b/Gemfile | |
@@ -1,53 +1,28 @@ | |
source 'https://rubygems.org' | |
git_source(:github) do |repo_name| | |
- repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?("/") | |
+ repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?('/') | |
"https://github.com/#{repo_name}.git" | |
end | |
- | |
-# Bundle edge Rails instead: gem 'rails', github: 'rails/rails' | |
gem 'rails', '~> 5.0.2' | |
-# Use postgresql as the database for Active Record | |
gem 'pg', '~> 0.18' | |
-# Use Puma as the app server | |
gem 'puma', '~> 3.0' | |
-# Use SCSS for stylesheets | |
gem 'sass-rails', '~> 5.0' | |
-# Use Uglifier as compressor for JavaScript assets | |
gem 'uglifier', '>= 1.3.0' | |
-# Use CoffeeScript for .coffee assets and views | |
gem 'coffee-rails', '~> 4.2' | |
-# See https://github.com/rails/execjs#readme for more supported runtimes | |
-# gem 'therubyracer', platforms: :ruby | |
-# Use jquery as the JavaScript library | |
gem 'jquery-rails' | |
-# Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks | |
gem 'turbolinks', '~> 5' | |
-# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder | |
gem 'jbuilder', '~> 2.5' | |
-# Use Redis adapter to run Action Cable in production | |
-# gem 'redis', '~> 3.0' | |
-# Use ActiveModel has_secure_password | |
-# gem 'bcrypt', '~> 3.1.7' | |
- | |
-# Use Capistrano for deployment | |
-# gem 'capistrano-rails', group: :development | |
group :development, :test do | |
- # Call 'byebug' anywhere in the code to stop execution and get a debugger console | |
gem 'byebug', platform: :mri | |
end | |
group :development do | |
- # Access an IRB console on exception pages or by using <%= console %> anywhere in the code. | |
gem 'web-console', '>= 3.3.0' | |
gem 'listen', '~> 3.0.5' | |
- # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring | |
gem 'spring' | |
gem 'spring-watcher-listen', '~> 2.0.0' | |
end | |
- | |
-# Windows does not include zoneinfo files, so bundle the tzinfo-data gem | |
-gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby] | |
diff --git a/README.md b/README.md | |
index 7db80e4..913bfd9 100644 | |
--- a/README.md | |
+++ b/README.md | |
@@ -1,24 +1,7 @@ | |
-# README | |
+# App | |
-This README would normally document whatever steps are necessary to get the | |
-application up and running. | |
+## Installation | |
-Things you may want to cover: | |
+ bin/setup | |
-* Ruby version | |
- | |
-* System dependencies | |
- | |
-* Configuration | |
- | |
-* Database creation | |
- | |
-* Database initialization | |
- | |
-* How to run the test suite | |
- | |
-* Services (job queues, cache servers, search engines, etc.) | |
- | |
-* Deployment instructions | |
- | |
-* ... | |
+## Testing | |
diff --git a/Rakefile b/Rakefile | |
index e85f913..ed646b6 100644 | |
--- a/Rakefile | |
+++ b/Rakefile | |
@@ -1,6 +1,3 @@ | |
-# Add your own tasks in files placed in lib/tasks ending in .rake, | |
-# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. | |
- | |
require_relative 'config/application' | |
Rails.application.load_tasks | |
diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js | |
index b12018d..d787f6b 100644 | |
--- a/app/assets/javascripts/application.js | |
+++ b/app/assets/javascripts/application.js | |
@@ -1,15 +1,3 @@ | |
-// This is a manifest file that'll be compiled into application.js, which will include all the files | |
-// listed below. | |
-// | |
-// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts, | |
-// or any plugin's vendor/assets/javascripts directory can be referenced here using a relative path. | |
-// | |
-// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the | |
-// compiled file. JavaScript code in this file should be added after the last require_* statement. | |
-// | |
-// Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details | |
-// about supported directives. | |
-// | |
//= require jquery | |
//= require jquery_ujs | |
//= require turbolinks | |
diff --git a/app/assets/javascripts/cable.js b/app/assets/javascripts/cable.js | |
index 71ee1e6..dc21442 100644 | |
--- a/app/assets/javascripts/cable.js | |
+++ b/app/assets/javascripts/cable.js | |
@@ -1,13 +1,9 @@ | |
-// Action Cable provides the framework to deal with WebSockets in Rails. | |
-// You can generate new channels where WebSocket features live using the rails generate channel command. | |
-// | |
//= require action_cable | |
//= require_self | |
//= require_tree ./channels | |
(function() { | |
- this.App || (this.App = {}); | |
- | |
- App.cable = ActionCable.createConsumer(); | |
+ this.App || (this.App = {}); | |
+ App.cable = ActionCable.createConsumer(); | |
}).call(this); | |
diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb | |
index 37a706e..01a499b 100644 | |
--- a/app/views/layouts/application.html.erb | |
+++ b/app/views/layouts/application.html.erb | |
@@ -1,9 +1,10 @@ | |
<!DOCTYPE html> | |
<html> | |
<head> | |
+ <meta charset="utf-8"> | |
<title>RailsFiveApp</title> | |
+ <meta name="viewport" content="width=device-width, initial-scale=1"> | |
<%= csrf_meta_tags %> | |
- | |
<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %> | |
<%= javascript_include_tag 'application', 'data-turbolinks-track': 'reload' %> | |
</head> | |
diff --git a/app/views/layouts/mailer.html.erb b/app/views/layouts/mailer.html.erb | |
index cbd34d2..9ca003f 100644 | |
--- a/app/views/layouts/mailer.html.erb | |
+++ b/app/views/layouts/mailer.html.erb | |
@@ -1,7 +1,7 @@ | |
<!DOCTYPE html> | |
<html> | |
<head> | |
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
+ <meta charset="utf-8"> | |
<style> | |
/* Email styles need to be inline */ | |
</style> | |
diff --git a/bin/setup b/bin/setup | |
index e620b4d..ce40445 100755 | |
--- a/bin/setup | |
+++ b/bin/setup | |
@@ -3,7 +3,6 @@ require 'pathname' | |
require 'fileutils' | |
include FileUtils | |
-# path to your application root. | |
APP_ROOT = Pathname.new File.expand_path('../../', __FILE__) | |
def system!(*args) | |
@@ -11,17 +10,9 @@ def system!(*args) | |
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') | |
- | |
- # puts "\n== Copying sample files ==" | |
- # unless File.exist?('config/database.yml') | |
- # cp 'config/database.yml.sample', 'config/database.yml' | |
- # end | |
+ system('bundle check') || system!('bundle install --without production') | |
puts "\n== Preparing database ==" | |
system! 'bin/rails db:setup' | |
diff --git a/config.ru b/config.ru | |
index f7ba0b5..b5f2923 100644 | |
--- a/config.ru | |
+++ b/config.ru | |
@@ -1,5 +1,3 @@ | |
-# This file is used by Rack-based servers to start the application. | |
- | |
require_relative 'config/environment' | |
run Rails.application | |
diff --git a/config/application.rb b/config/application.rb | |
index 41464e3..0c60e18 100644 | |
--- a/config/application.rb | |
+++ b/config/application.rb | |
@@ -2,14 +2,9 @@ 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(*Rails.groups) | |
module RailsFiveApp | |
class Application < Rails::Application | |
- # 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. | |
end | |
end | |
diff --git a/config/boot.rb b/config/boot.rb | |
index 30f5120..5cea2ab 100644 | |
--- a/config/boot.rb | |
+++ b/config/boot.rb | |
@@ -1,3 +1,3 @@ | |
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__) | |
-require 'bundler/setup' # Set up gems listed in the Gemfile. | |
+require 'bundler/setup' | |
diff --git a/config/database.yml b/config/database.yml | |
index 0204e91..661e265 100644 | |
--- a/config/database.yml | |
+++ b/config/database.yml | |
@@ -1,85 +1,25 @@ | |
-# PostgreSQL. Versions 9.1 and up are supported. | |
-# | |
-# Install the pg driver: | |
-# gem install pg | |
-# On OS X with Homebrew: | |
-# gem install pg -- --with-pg-config=/usr/local/bin/pg_config | |
-# On OS X 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 | |
- # http://guides.rubyonrails.org/configuring.html#database-pooling | |
- pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %> | |
+ pool: 5 | |
development: | |
<<: *default | |
database: rails_five_app_development | |
+ # username: rails_five_app | |
+ # password: | |
+ # host: localhost | |
+ # port: 5432 | |
+ # schema_search_path: myapp,sharedapp,public | |
+ # min_messages: notice | |
- # 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 that initialized the database. | |
- #username: rails_five_app | |
- | |
- # 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: rails_five_app_test | |
-# As with config/secrets.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 as a unix environment variable when you boot | |
-# the app. Read http://guides.rubyonrails.org/configuring.html#configuring-a-database | |
-# for a full rundown on how to provide these environment variables in a | |
-# production deployment. | |
-# | |
-# On Heroku and other platform providers, you may have a full connection URL | |
-# available as an environment variable. For example: | |
-# | |
-# DATABASE_URL="postgres://myuser:mypass@localhost/somedatabase" | |
-# | |
-# You can use this database configuration with: | |
-# | |
-# production: | |
-# url: <%= ENV['DATABASE_URL'] %> | |
-# | |
production: | |
<<: *default | |
database: rails_five_app_production | |
username: rails_five_app | |
password: <%= ENV['RAILS_FIVE_APP_DATABASE_PASSWORD'] %> | |
+ # url: <%= ENV['DATABASE_URL'] %> | |
diff --git a/config/environment.rb b/config/environment.rb | |
index 426333b..875ab0f 100644 | |
--- a/config/environment.rb | |
+++ b/config/environment.rb | |
@@ -1,5 +1,3 @@ | |
-# Load the Rails application. | |
require_relative 'application' | |
-# Initialize the Rails application. | |
Rails.application.initialize! | |
diff --git a/config/environments/development.rb b/config/environments/development.rb | |
index 6f71970..24d875e 100644 | |
--- a/config/environments/development.rb | |
+++ b/config/environments/development.rb | |
@@ -1,18 +1,10 @@ | |
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 | |
- # every request. This slows down response time but is perfect for development | |
- # since you don't have to restart the web server when you make code changes. | |
config.cache_classes = false | |
- # Do not eager load code on boot. | |
config.eager_load = false | |
- # Show full error reports. | |
config.consider_all_requests_local = true | |
- # Enable/disable caching. By default caching is disabled. | |
if Rails.root.join('tmp/caching-dev.txt').exist? | |
config.action_controller.perform_caching = true | |
@@ -26,29 +18,20 @@ Rails.application.configure do | |
config.cache_store = :null_store | |
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. | |
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/config/environments/production.rb b/config/environments/production.rb | |
index f2e61df..798c2fa 100644 | |
--- a/config/environments/production.rb | |
+++ b/config/environments/production.rb | |
@@ -1,32 +1,18 @@ | |
Rails.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 threaded 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 | |
- # Disable serving static files from the `/public` folder by default since | |
- # Apache or NGINX already handles this. | |
config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present? | |
- # 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 | |
- # `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb | |
- | |
# Enable serving of images, stylesheets, and JavaScripts from an asset server. | |
# config.action_controller.asset_host = 'http://assets.example.com' | |
@@ -42,11 +28,8 @@ Rails.application.configure do | |
# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. | |
# config.force_ssl = true | |
- # Use the lowest log level to ensure availability of diagnostic information | |
- # when problems arise. | |
config.log_level = :debug | |
- # Prepend all log lines with the following tags. | |
config.log_tags = [ :request_id ] | |
# Use a different cache store in production. | |
@@ -55,32 +38,28 @@ Rails.application.configure do | |
# Use a real queuing backend for Active Job (and separate queues per environment) | |
# config.active_job.queue_adapter = :resque | |
# config.active_job.queue_name_prefix = "rails_five_app_#{Rails.env}" | |
+ | |
config.action_mailer.perform_caching = false | |
# 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 cannot be found). | |
config.i18n.fallbacks = true | |
- # Send deprecation notices to registered listeners. | |
config.active_support.deprecation = :notify | |
- # Use default logging formatter so that PID and timestamp are not suppressed. | |
config.log_formatter = ::Logger::Formatter.new | |
# Use a different logger for distributed setups. | |
# require 'syslog/logger' | |
# config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new 'app-name') | |
- if ENV["RAILS_LOG_TO_STDOUT"].present? | |
+ if ENV['RAILS_LOG_TO_STDOUT'].present? | |
logger = ActiveSupport::Logger.new(STDOUT) | |
logger.formatter = config.log_formatter | |
config.logger = ActiveSupport::TaggedLogging.new(logger) | |
end | |
- # Do not dump schema after migrations. | |
config.active_record.dump_schema_after_migration = false | |
end | |
diff --git a/config/environments/test.rb b/config/environments/test.rb | |
index 30587ef..dee2d58 100644 | |
--- a/config/environments/test.rb | |
+++ b/config/environments/test.rb | |
@@ -1,40 +1,23 @@ | |
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 | |
- # test suite. You never need to work with it otherwise. Remember that | |
- # your test database is "scratch space" for the test suite and is wiped | |
- # and recreated between test runs. Don't rely on the data there! | |
config.cache_classes = true | |
- # Do not eager load code on boot. This avoids loading your whole application | |
- # just for the purpose of running a single test. If you are using a tool that | |
- # preloads Rails for running tests, you may have to set it to true. | |
config.eager_load = false | |
- # 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=3600' | |
} | |
- # Show full error reports and disable caching. | |
config.consider_all_requests_local = true | |
config.action_controller.perform_caching = false | |
- # Raise exceptions instead of rendering exception templates. | |
config.action_dispatch.show_exceptions = false | |
- # Disable request forgery protection in test environment. | |
config.action_controller.allow_forgery_protection = false | |
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. | |
config.action_mailer.delivery_method = :test | |
- # Print deprecation notices to the stderr. | |
config.active_support.deprecation = :stderr | |
# Raises error for missing translations | |
diff --git a/config/initializers/application_controller_renderer.rb b/config/initializers/application_controller_renderer.rb | |
index 51639b6..58d1035 100644 | |
--- a/config/initializers/application_controller_renderer.rb | |
+++ b/config/initializers/application_controller_renderer.rb | |
@@ -1,5 +1,3 @@ | |
-# Be sure to restart your server when you modify this file. | |
- | |
# ApplicationController.renderer.defaults.merge!( | |
# http_host: 'example.org', | |
# https: false | |
diff --git a/config/initializers/assets.rb b/config/initializers/assets.rb | |
index 01ef3e6..bf5eb82 100644 | |
--- a/config/initializers/assets.rb | |
+++ b/config/initializers/assets.rb | |
@@ -1,5 +1,3 @@ | |
-# 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' | |
diff --git a/config/initializers/backtrace_silencers.rb b/config/initializers/backtrace_silencers.rb | |
index 59385cd..b6fbfde 100644 | |
--- a/config/initializers/backtrace_silencers.rb | |
+++ b/config/initializers/backtrace_silencers.rb | |
@@ -1,5 +1,3 @@ | |
-# Be sure to restart your server when you modify this file. | |
- | |
# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces. | |
# Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ } | |
diff --git a/config/initializers/cookies_serializer.rb b/config/initializers/cookies_serializer.rb | |
index 5a6a32d..d6ddeb1 100644 | |
--- a/config/initializers/cookies_serializer.rb | |
+++ b/config/initializers/cookies_serializer.rb | |
@@ -1,5 +1,3 @@ | |
-# 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/config/initializers/filter_parameter_logging.rb b/config/initializers/filter_parameter_logging.rb | |
index 4a994e1..e203fce 100644 | |
--- a/config/initializers/filter_parameter_logging.rb | |
+++ b/config/initializers/filter_parameter_logging.rb | |
@@ -1,4 +1,2 @@ | |
-# Be sure to restart your server when you modify this file. | |
- | |
# Configure sensitive parameters which will be filtered from the log file. | |
Rails.application.config.filter_parameters += [:password] | |
diff --git a/config/initializers/inflections.rb b/config/initializers/inflections.rb | |
index ac033bf..1d5fa98 100644 | |
--- a/config/initializers/inflections.rb | |
+++ b/config/initializers/inflections.rb | |
@@ -1,5 +1,3 @@ | |
-# Be sure to restart your server when you modify this file. | |
- | |
# Add new inflection rules using the following format. Inflections | |
# are locale specific, and you may define rules for as many different | |
# locales as you wish. All of these examples are active by default: | |
diff --git a/config/initializers/mime_types.rb b/config/initializers/mime_types.rb | |
index dc18996..1a52c0b 100644 | |
--- a/config/initializers/mime_types.rb | |
+++ b/config/initializers/mime_types.rb | |
@@ -1,4 +1,2 @@ | |
-# Be sure to restart your server when you modify this file. | |
- | |
# Add new mime types for use in respond_to blocks: | |
# Mime::Type.register "text/richtext", :rtf | |
diff --git a/config/initializers/new_framework_defaults.rb b/config/initializers/new_framework_defaults.rb | |
index 671abb6..0a1aef3 100644 | |
--- a/config/initializers/new_framework_defaults.rb | |
+++ b/config/initializers/new_framework_defaults.rb | |
@@ -1,9 +1,3 @@ | |
-# Be sure to restart your server when you modify this file. | |
-# | |
-# This file contains migration options to ease your Rails 5.0 upgrade. | |
-# | |
-# Read the Guide for Upgrading Ruby on Rails for more info on each option. | |
- | |
# Enable per-form CSRF tokens. Previous versions had false. | |
Rails.application.config.action_controller.per_form_csrf_tokens = true | |
diff --git a/config/initializers/session_store.rb b/config/initializers/session_store.rb | |
index b8e6372..12f4502 100644 | |
--- a/config/initializers/session_store.rb | |
+++ b/config/initializers/session_store.rb | |
@@ -1,3 +1 @@ | |
-# Be sure to restart your server when you modify this file. | |
- | |
Rails.application.config.session_store :cookie_store, key: '_rails_five_app_session' | |
diff --git a/config/initializers/wrap_parameters.rb b/config/initializers/wrap_parameters.rb | |
index bbfc396..4ea577a 100644 | |
--- a/config/initializers/wrap_parameters.rb | |
+++ b/config/initializers/wrap_parameters.rb | |
@@ -1,8 +1,3 @@ | |
-# Be sure to restart your server when you modify this file. | |
- | |
-# This file contains settings for ActionController::ParamsWrapper which | |
-# is enabled by default. | |
- | |
# 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] | |
diff --git a/config/locales/en.yml b/config/locales/en.yml | |
index 0653957..a9f72ec 100644 | |
--- a/config/locales/en.yml | |
+++ b/config/locales/en.yml | |
@@ -1,23 +1,2 @@ | |
-# Files in the config/locales directory are used for internationalization | |
-# and are automatically loaded by Rails. If you want to use locales other | |
-# than English, add the necessary files in this directory. | |
-# | |
-# To use the locales, use `I18n.t`: | |
-# | |
-# I18n.t 'hello' | |
-# | |
-# In views, this is aliased to just `t`: | |
-# | |
-# <%= t('hello') %> | |
-# | |
-# To use a different locale, set it with `I18n.locale`: | |
-# | |
-# I18n.locale = :es | |
-# | |
-# This would use the information in config/locales/es.yml. | |
-# | |
-# To learn more, please read the Rails Internationalization guide | |
-# available at http://guides.rubyonrails.org/i18n.html. | |
- | |
en: | |
hello: "Hello world" | |
diff --git a/config/puma.rb b/config/puma.rb | |
index c7f311f..8f98c7a 100644 | |
--- a/config/puma.rb | |
+++ b/config/puma.rb | |
@@ -1,43 +1,17 @@ | |
-# 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 }.to_i | |
+threads_count = ENV.fetch('RAILS_MAX_THREADS') { 5 }.to_i | |
threads threads_count, threads_count | |
-# Specifies the `port` that Puma will listen on to receive requests, default is 3000. | |
-# | |
-port ENV.fetch("PORT") { 3000 } | |
+port ENV.fetch('PORT') { 3000 } | |
-# Specifies the `environment` that Puma will run in. | |
-# | |
-environment ENV.fetch("RAILS_ENV") { "development" } | |
+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 } | |
+# 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! | |
# 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 `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, Ruby | |
-# cannot share connections between processes. | |
+# clustered mode by specifying a number of `workers`. | |
# | |
# on_worker_boot do | |
# ActiveRecord::Base.establish_connection if defined?(ActiveRecord) | |
diff --git a/config/routes.rb b/config/routes.rb | |
index 787824f..1daf9a4 100644 | |
--- a/config/routes.rb | |
+++ b/config/routes.rb | |
@@ -1,3 +1,2 @@ | |
Rails.application.routes.draw do | |
- # For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html | |
end | |
diff --git a/config/secrets.yml b/config/secrets.yml | |
index c3b2ee1..fcec330 100644 | |
--- a/config/secrets.yml | |
+++ b/config/secrets.yml | |
@@ -1,22 +1,8 @@ | |
-# 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 `rails secret` to generate a secure secret key. | |
- | |
-# Make sure the secrets in this file are kept private | |
-# if you're sharing your code publicly. | |
- | |
development: | |
secret_key_base: 3fad9e9092a2f4d07ff8af19e844e080305b5422ba8b4046e5994404c8abf1744804a7a0c5f374813a0f33f5d88233007d2f4d49d19773c27869e98f4447341f | |
test: | |
secret_key_base: f9ac07916b79e18a9b2832eb108b3ce78d55bd38be0929d14ce7b426570ac7429635d69863d1bc3505d6994deb773a39e4cbaa3d298c9281538a38da2f6fadd9 | |
-# Do not keep production secrets in the repository, | |
-# instead read values from the environment. | |
production: | |
- secret_key_base: <%= ENV["SECRET_KEY_BASE"] %> | |
+ secret_key_base: <%= ENV['SECRET_KEY_BASE'] %> | |
diff --git a/db/seeds.rb b/db/seeds.rb | |
index 1beea2a..e69de29 100644 | |
--- a/db/seeds.rb | |
+++ b/db/seeds.rb | |
@@ -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 rails db:seed command (or created alongside the database with db:setup). | |
-# | |
-# Examples: | |
-# | |
-# movies = Movie.create([{ name: 'Star Wars' }, { name: 'Lord of the Rings' }]) | |
-# Character.create(name: 'Luke', movie: movies.first) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment