rails_refactor 1.3 → 1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (111) hide show
  1. checksums.yaml +7 -0
  2. data/CHANGELOG +1 -0
  3. data/Gemfile +3 -3
  4. data/Gemfile.lock +105 -69
  5. data/Manifest +61 -20
  6. data/bin/rails_refactor.rb +7 -7
  7. data/dummy/Gemfile +42 -25
  8. data/dummy/Gemfile.lock +173 -77
  9. data/dummy/README.rdoc +28 -0
  10. data/dummy/Rakefile +1 -2
  11. data/dummy/app/assets/javascripts/application.js +16 -0
  12. data/dummy/app/assets/stylesheets/application.css +15 -0
  13. data/dummy/app/controllers/application_controller.rb +3 -1
  14. data/dummy/app/controllers/dummies_controller.rb +0 -1
  15. data/dummy/app/views/dummies/index.html.erb +1 -2
  16. data/dummy/app/views/layouts/application.html.erb +3 -3
  17. data/dummy/bin/bundle +3 -0
  18. data/dummy/bin/rails +9 -0
  19. data/dummy/bin/rake +9 -0
  20. data/dummy/bin/setup +29 -0
  21. data/dummy/bin/spring +17 -0
  22. data/dummy/config.ru +2 -2
  23. data/dummy/config/application.rb +4 -20
  24. data/dummy/config/boot.rb +2 -12
  25. data/dummy/config/database.yml +12 -9
  26. data/dummy/config/environment.rb +3 -3
  27. data/dummy/config/environments/development.rb +28 -13
  28. data/dummy/config/environments/production.rb +58 -28
  29. data/dummy/config/environments/test.rb +22 -15
  30. data/dummy/config/initializers/assets.rb +11 -0
  31. data/dummy/config/initializers/cookies_serializer.rb +3 -0
  32. data/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  33. data/dummy/config/initializers/inflections.rb +9 -3
  34. data/dummy/config/initializers/mime_types.rb +0 -1
  35. data/dummy/config/initializers/session_store.rb +1 -6
  36. data/dummy/config/initializers/wrap_parameters.rb +14 -0
  37. data/dummy/config/locales/en.yml +20 -2
  38. data/dummy/config/routes.rb +24 -26
  39. data/dummy/config/secrets.yml +22 -0
  40. data/dummy/db/development.sqlite3 +0 -0
  41. data/dummy/db/migrate/{20101230081247_create_dummy_models.rb → 20170214234158_create_dummy_models.rb} +2 -6
  42. data/dummy/db/schema.rb +21 -0
  43. data/dummy/db/seeds.rb +2 -2
  44. data/dummy/db/test.sqlite3 +0 -0
  45. data/dummy/public/404.html +54 -13
  46. data/dummy/public/422.html +54 -13
  47. data/dummy/public/500.html +53 -13
  48. data/dummy/public/robots.txt +2 -2
  49. data/dummy/spec/controllers/dummies_controller_spec.rb +2 -2
  50. data/dummy/spec/helpers/dummies_helper_spec.rb +3 -3
  51. data/dummy/spec/models/dummy_model_spec.rb +2 -2
  52. data/dummy/test/{functional → controllers}/dummies_controller_test.rb +3 -5
  53. data/dummy/test/test_helper.rb +2 -5
  54. data/dummy/tmp/cache/assets/sprockets/v3.0/0J/0J8Y06zzUR0l-98gVnUiZSMLWIcgvag6JZrSQ-GmMkE.cache +1 -0
  55. data/dummy/tmp/cache/assets/sprockets/v3.0/5L/5Lly_CA8DZvPhQV2jDQx-Y6P_y3Ygra9t5jfSlGhHDA.cache +2 -0
  56. data/dummy/tmp/cache/assets/sprockets/v3.0/5_/5_pSHecLeN6enAq048bTQIyPEeerwPmymDDBzkkUPh8.cache +3 -0
  57. data/dummy/tmp/cache/assets/sprockets/v3.0/6g/6gIGeJ7YOb0mGXuJl0wUP4DKR_t_JayqkocSgkH1juA.cache +3 -0
  58. data/dummy/tmp/cache/assets/sprockets/v3.0/7R/7Ro3YPQDojP1-t-d3Z7XH5fud5RudfD-VykLAH2ryrI.cache +1 -0
  59. data/dummy/tmp/cache/assets/sprockets/v3.0/AP/APY89OAPJx9A3D3xcCoktvEvQUs7NcWChYXnjjjPzz0.cache +2 -0
  60. data/dummy/tmp/cache/assets/sprockets/v3.0/B1/B1GAmsRS-7nrUGTtmGdBxR-f9gl5kBZFy8p3kxTwSTs.cache +0 -0
  61. data/dummy/tmp/cache/assets/sprockets/v3.0/DS/DSOLSc6A5RVSmvM415eEWAWG_AgOvZcLZOXQjsXyWQA.cache +2 -0
  62. data/dummy/tmp/cache/assets/sprockets/v3.0/EB/EBtbhweQl74JQNkwFL3ahZH_9x44ceqa9hOT8lQ_SfM.cache +2 -0
  63. data/dummy/tmp/cache/assets/sprockets/v3.0/EQ/EQMU7OcCaRj7JaYia8OeWraimRFV08I3NajpxItPr_w.cache +0 -0
  64. data/dummy/tmp/cache/assets/sprockets/v3.0/Ei/Eiaf8C3zv64tXNf5ivlq4Xt_e2Y7Qogp6h6u_m4wrf4.cache +3 -0
  65. data/dummy/tmp/cache/assets/sprockets/v3.0/F0/F0RI4bpYPGBeSWP4Z-xOqkBXUDDtYfPU5kjPmlh_vTA.cache +1 -0
  66. data/dummy/tmp/cache/assets/sprockets/v3.0/Fn/FnLIvSU0P0Rr-3KeF2pL7CxFqJ4KOhpvlvlng0Q7scA.cache +1 -0
  67. data/dummy/tmp/cache/assets/sprockets/v3.0/If/If2pWtLkR3jpGhpRfDHDv6Ualti_bgfhSuuBXfpEETU.cache +1 -0
  68. data/dummy/tmp/cache/assets/sprockets/v3.0/J3/J3DjyBJAVYBXic6ylywPlr9zf2GJoNPO4vlBarB0tYE.cache +1 -0
  69. data/dummy/tmp/cache/assets/sprockets/v3.0/JV/JVm8t7ehDHucqDbG2dnfRUSvxgaWqFAtRuaH5MRIFfQ.cache +1 -0
  70. data/dummy/tmp/cache/assets/sprockets/v3.0/NO/NO-TZrEcLyQuB-5piSqbSbplmk8woO8-MItXY1xhQ1o.cache +1 -0
  71. data/dummy/tmp/cache/assets/sprockets/v3.0/OI/OI6uxGcnsKavdWTtwDAasU3wPx8QXhzBgV0X2n1KjMQ.cache +2 -0
  72. data/dummy/tmp/cache/assets/sprockets/v3.0/Ob/ObPHFplxs2zahTFNBoOE3MyzhbEa02fTq6kHwrF_99k.cache +0 -0
  73. data/dummy/tmp/cache/assets/sprockets/v3.0/P-/P-XWFt9GTflkbs5BRhEjQR24IST4x2rHkKKFWEpkzlQ.cache +0 -0
  74. data/dummy/tmp/cache/assets/sprockets/v3.0/P-/P-oAGmeqPPkPtepd3yRW1xcBAyZ9PQCknUSTP_1fTrQ.cache +1 -0
  75. data/dummy/tmp/cache/assets/sprockets/v3.0/UM/UM_H6cyEQXE2u2lO-7guFFdIyuBjYw5RW21t4QuycQA.cache +1 -0
  76. data/dummy/tmp/cache/assets/sprockets/v3.0/Uw/UwU65qhibWAQvgqfEfTBcPEM0bLevORl9_crJGs9V8Q.cache +2 -0
  77. data/dummy/tmp/cache/assets/sprockets/v3.0/Wc/Wcbt_SUiw7SB3-AFGrGfobJl1pJ2v7hh6d-EHtIDyjw.cache +1 -0
  78. data/dummy/tmp/cache/assets/sprockets/v3.0/YI/YI7HlLnxIPnVWHFYzsD15uJqjPns27jfpxmBzrGXxgg.cache +1 -0
  79. data/dummy/tmp/cache/assets/sprockets/v3.0/dc/dck2gjYqgYSFSeqIOUXeSgSL3egPgMN2G3DLwJasyB8.cache +1 -0
  80. data/dummy/tmp/cache/assets/sprockets/v3.0/ee/ee1zuHshHLX_IASgBziKkg4IG8hJbCkDVmtfRAHAsNU.cache +1 -0
  81. data/dummy/tmp/cache/assets/sprockets/v3.0/f3/f3o9-VEcurfcZdAMlf8m6cdb1opLEn0eccuxSGKbKiE.cache +1 -0
  82. data/dummy/tmp/cache/assets/sprockets/v3.0/fA/fAE09zGXw4wj48ZxewRL1pMf7NkgZC7cKMZuVWl5sMI.cache +0 -0
  83. data/dummy/tmp/cache/assets/sprockets/v3.0/fF/fF_7i0aX5AmlsztdZHN_NUINWYFOJy1w-ZP8LtWLpTU.cache +1 -0
  84. data/dummy/tmp/cache/assets/sprockets/v3.0/fi/fiz6eKj5NRr_-GdbbbAjV6KkXc_Z1IRsnmf5Mh1qXSs.cache +0 -0
  85. data/dummy/tmp/cache/assets/sprockets/v3.0/hW/hWIGlqeCSpLpGwWWM2JfMoV_54nmyCWCrsmaoy69rK8.cache +0 -0
  86. data/dummy/tmp/cache/assets/sprockets/v3.0/jf/jfwq8sz6kKFZaz8rPixf5j_e1hZo7_q2QVsfLDzDLNc.cache +0 -0
  87. data/dummy/tmp/cache/assets/sprockets/v3.0/jj/jjUB1ir1Vdt5WLpR9DWUSfHdRTL_Fsfq3nTAf7fJkYg.cache +0 -0
  88. data/dummy/tmp/cache/assets/sprockets/v3.0/kS/kSkCWaAJCcTgZ_AhrRCjZhNtkE12cubiq70uNtditqk.cache +2 -0
  89. data/dummy/tmp/cache/assets/sprockets/v3.0/lp/lp9jvq-ApxVb7qJI6YEaanVXs5zA1rivibtabrOo-D4.cache +0 -0
  90. data/dummy/tmp/cache/assets/sprockets/v3.0/me/meI7L0bxT8qSUwyhKKtPL2OQLGljXQzVkmOSsHwujxI.cache +1 -0
  91. data/dummy/tmp/cache/assets/sprockets/v3.0/wJ/wJC8Mf7f7BE92W-e0i-JuoqCScHOc4XstbsSr49xX5I.cache +1 -0
  92. data/dummy/tmp/cache/assets/sprockets/v3.0/xE/xEWmch8fg9JmWdSpRS-FmtBQvGStIC5iK-luzXf_yiw.cache +1 -0
  93. data/dummy/tmp/cache/assets/sprockets/v3.0/xS/xSlHR2-kW_8ofNDd-wHO3YbK8NBn-Rq--Wkk6SwFQcc.cache +1 -0
  94. data/rails_refactor.gemspec +7 -15
  95. metadata +69 -32
  96. data/dummy/README +0 -256
  97. data/dummy/autotest/discover.rb +0 -2
  98. data/dummy/config/initializers/secret_token.rb +0 -7
  99. data/dummy/doc/README_FOR_APP +0 -2
  100. data/dummy/public/images/rails.png +0 -0
  101. data/dummy/public/index.html +0 -239
  102. data/dummy/public/javascripts/application.js +0 -2
  103. data/dummy/public/javascripts/controls.js +0 -965
  104. data/dummy/public/javascripts/dragdrop.js +0 -974
  105. data/dummy/public/javascripts/effects.js +0 -1123
  106. data/dummy/public/javascripts/prototype.js +0 -6001
  107. data/dummy/public/javascripts/rails.js +0 -175
  108. data/dummy/script/rails +0 -6
  109. data/dummy/spec/spec_helper.rb +0 -27
  110. data/dummy/test/performance/browsing_test.rb +0 -9
  111. data/dummy/test/unit/helpers/dummies_helper_test.rb +0 -4
data/dummy/README.rdoc ADDED
@@ -0,0 +1,28 @@
1
+ == README
2
+
3
+ This README would normally document whatever steps are necessary to get the
4
+ application up and running.
5
+
6
+ Things you may want to cover:
7
+
8
+ * Ruby version
9
+
10
+ * System dependencies
11
+
12
+ * Configuration
13
+
14
+ * Database creation
15
+
16
+ * Database initialization
17
+
18
+ * How to run the test suite
19
+
20
+ * Services (job queues, cache servers, search engines, etc.)
21
+
22
+ * Deployment instructions
23
+
24
+ * ...
25
+
26
+
27
+ Please feel free to use a different markup language if you do not plan to run
28
+ <tt>rake doc:app</tt>.
data/dummy/Rakefile CHANGED
@@ -2,6 +2,5 @@
2
2
  # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
3
3
 
4
4
  require File.expand_path('../config/application', __FILE__)
5
- require 'rake'
6
5
 
7
- Dummy::Application.load_tasks
6
+ Rails.application.load_tasks
@@ -0,0 +1,16 @@
1
+ // This is a manifest file that'll be compiled into application.js, which will include all the files
2
+ // listed below.
3
+ //
4
+ // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
5
+ // or any plugin's vendor/assets/javascripts directory can be referenced here using a relative path.
6
+ //
7
+ // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
8
+ // compiled file.
9
+ //
10
+ // Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details
11
+ // about supported directives.
12
+ //
13
+ //= require jquery
14
+ //= require jquery_ujs
15
+ //= require turbolinks
16
+ //= require_tree .
@@ -0,0 +1,15 @@
1
+ /*
2
+ * This is a manifest file that'll be compiled into application.css, which will include all the files
3
+ * listed below.
4
+ *
5
+ * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
6
+ * or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path.
7
+ *
8
+ * You're free to add application-wide styles to this file and they'll appear at the bottom of the
9
+ * compiled file so the styles you add here take precedence over styles defined in any styles
10
+ * defined in the other CSS/SCSS files in this directory. It is generally better to create a new
11
+ * file per style scope.
12
+ *
13
+ *= require_tree .
14
+ *= require_self
15
+ */
@@ -1,3 +1,5 @@
1
1
  class ApplicationController < ActionController::Base
2
- protect_from_forgery
2
+ # Prevent CSRF attacks by raising an exception.
3
+ # For APIs, you may want to use :null_session instead.
4
+ protect_from_forgery with: :exception
3
5
  end
@@ -1,5 +1,4 @@
1
1
  class DummiesController < ApplicationController
2
2
  def index
3
3
  end
4
-
5
4
  end
@@ -1,2 +1 @@
1
- <h1>The view</h1>
2
- <p>Welcome</p>
1
+ Sample index
@@ -2,9 +2,9 @@
2
2
  <html>
3
3
  <head>
4
4
  <title>Dummy</title>
5
- <%= stylesheet_link_tag :all %>
6
- <%= javascript_include_tag :defaults %>
7
- <%= csrf_meta_tag %>
5
+ <%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true %>
6
+ <%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>
7
+ <%= csrf_meta_tags %>
8
8
  </head>
9
9
  <body>
10
10
 
data/dummy/bin/bundle ADDED
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby
2
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
3
+ load Gem.bin_path('bundler', 'bundle')
data/dummy/bin/rails ADDED
@@ -0,0 +1,9 @@
1
+ #!/usr/bin/env ruby
2
+ begin
3
+ load File.expand_path('../spring', __FILE__)
4
+ rescue LoadError => e
5
+ raise unless e.message.include?('spring')
6
+ end
7
+ APP_PATH = File.expand_path('../../config/application', __FILE__)
8
+ require_relative '../config/boot'
9
+ require 'rails/commands'
data/dummy/bin/rake ADDED
@@ -0,0 +1,9 @@
1
+ #!/usr/bin/env ruby
2
+ begin
3
+ load File.expand_path('../spring', __FILE__)
4
+ rescue LoadError => e
5
+ raise unless e.message.include?('spring')
6
+ end
7
+ require_relative '../config/boot'
8
+ require 'rake'
9
+ Rake.application.run
data/dummy/bin/setup ADDED
@@ -0,0 +1,29 @@
1
+ #!/usr/bin/env ruby
2
+ require 'pathname'
3
+
4
+ # path to your application root.
5
+ APP_ROOT = Pathname.new File.expand_path('../../', __FILE__)
6
+
7
+ Dir.chdir APP_ROOT do
8
+ # This script is a starting point to setup your application.
9
+ # Add necessary setup steps to this file:
10
+
11
+ puts "== Installing dependencies =="
12
+ system "gem install bundler --conservative"
13
+ system "bundle check || bundle install"
14
+
15
+ # puts "\n== Copying sample files =="
16
+ # unless File.exist?("config/database.yml")
17
+ # system "cp config/database.yml.sample config/database.yml"
18
+ # end
19
+
20
+ puts "\n== Preparing database =="
21
+ system "bin/rake db:setup"
22
+
23
+ puts "\n== Removing old logs and tempfiles =="
24
+ system "rm -f log/*"
25
+ system "rm -rf tmp/cache"
26
+
27
+ puts "\n== Restarting application server =="
28
+ system "touch tmp/restart.txt"
29
+ end
data/dummy/bin/spring ADDED
@@ -0,0 +1,17 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ # This file loads spring without using Bundler, in order to be fast.
4
+ # It gets overwritten when you run the `spring binstub` command.
5
+
6
+ unless defined?(Spring)
7
+ require 'rubygems'
8
+ require 'bundler'
9
+
10
+ lockfile = Bundler::LockfileParser.new(Bundler.default_lockfile.read)
11
+ spring = lockfile.specs.detect { |spec| spec.name == "spring" }
12
+ if spring
13
+ Gem.use_paths Gem.dir, Bundler.bundle_path.to_s, *Gem.path
14
+ gem 'spring', spring.version
15
+ require 'spring/binstub'
16
+ end
17
+ end
data/dummy/config.ru CHANGED
@@ -1,4 +1,4 @@
1
1
  # This file is used by Rack-based servers to start the application.
2
2
 
3
- require ::File.expand_path('../config/environment', __FILE__)
4
- run Dummy::Application
3
+ require ::File.expand_path('../config/environment', __FILE__)
4
+ run Rails.application
@@ -2,9 +2,9 @@ require File.expand_path('../boot', __FILE__)
2
2
 
3
3
  require 'rails/all'
4
4
 
5
- # If you have a Gemfile, require the gems listed there, including any gems
5
+ # Require the gems listed in Gemfile, including any gems
6
6
  # you've limited to :test, :development, or :production.
7
- Bundler.require(:default, Rails.env) if defined?(Bundler)
7
+ Bundler.require(*Rails.groups)
8
8
 
9
9
  module Dummy
10
10
  class Application < Rails::Application
@@ -12,16 +12,6 @@ module Dummy
12
12
  # Application configuration should go into files in config/initializers
13
13
  # -- all .rb files in that directory are automatically loaded.
14
14
 
15
- # Custom directories with classes and modules you want to be autoloadable.
16
- # config.autoload_paths += %W(#{config.root}/extras)
17
-
18
- # Only load the plugins named here, in the order given (default is alphabetical).
19
- # :all can be used as a placeholder for all plugins not explicitly named.
20
- # config.plugins = [ :exception_notification, :ssl_requirement, :all ]
21
-
22
- # Activate observers that should always be running.
23
- # config.active_record.observers = :cacher, :garbage_collector, :forum_observer
24
-
25
15
  # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
26
16
  # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
27
17
  # config.time_zone = 'Central Time (US & Canada)'
@@ -30,13 +20,7 @@ module Dummy
30
20
  # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
31
21
  # config.i18n.default_locale = :de
32
22
 
33
- # JavaScript files you want as :defaults (application.js is always included).
34
- # config.action_view.javascript_expansions[:defaults] = %w(jquery rails)
35
-
36
- # Configure the default encoding used in templates for Ruby 1.9.
37
- config.encoding = "utf-8"
38
-
39
- # Configure sensitive parameters which will be filtered from the log file.
40
- config.filter_parameters += [:password]
23
+ # Do not swallow errors in after_commit/after_rollback callbacks.
24
+ config.active_record.raise_in_transactional_callbacks = true
41
25
  end
42
26
  end
data/dummy/config/boot.rb CHANGED
@@ -1,13 +1,3 @@
1
- require 'rubygems'
1
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
2
2
 
3
- # Set up gems listed in the Gemfile.
4
- gemfile = File.expand_path('../../Gemfile', __FILE__)
5
- begin
6
- ENV['BUNDLE_GEMFILE'] = gemfile
7
- require 'bundler'
8
- Bundler.setup
9
- rescue Bundler::GemNotFound => e
10
- STDERR.puts e.message
11
- STDERR.puts "Try running `bundle install`."
12
- exit!
13
- end if File.exist?(gemfile)
3
+ require 'bundler/setup' # Set up gems listed in the Gemfile.
@@ -1,22 +1,25 @@
1
1
  # SQLite version 3.x
2
- # gem install sqlite3-ruby (not necessary on OS X Leopard)
3
- development:
2
+ # gem install sqlite3
3
+ #
4
+ # Ensure the SQLite 3 gem is defined in your Gemfile
5
+ # gem 'sqlite3'
6
+ #
7
+ default: &default
4
8
  adapter: sqlite3
5
- database: db/development.sqlite3
6
9
  pool: 5
7
10
  timeout: 5000
8
11
 
12
+ development:
13
+ <<: *default
14
+ database: db/development.sqlite3
15
+
9
16
  # Warning: The database defined as "test" will be erased and
10
17
  # re-generated from your development database when you run "rake".
11
18
  # Do not set this db to the same as development or production.
12
19
  test:
13
- adapter: sqlite3
20
+ <<: *default
14
21
  database: db/test.sqlite3
15
- pool: 5
16
- timeout: 5000
17
22
 
18
23
  production:
19
- adapter: sqlite3
24
+ <<: *default
20
25
  database: db/production.sqlite3
21
- pool: 5
22
- timeout: 5000
@@ -1,5 +1,5 @@
1
- # Load the rails application
1
+ # Load the Rails application.
2
2
  require File.expand_path('../application', __FILE__)
3
3
 
4
- # Initialize the rails application
5
- Dummy::Application.initialize!
4
+ # Initialize the Rails application.
5
+ Rails.application.initialize!
@@ -1,26 +1,41 @@
1
- Dummy::Application.configure do
2
- # Settings specified here will take precedence over those in config/environment.rb
1
+ Rails.application.configure do
2
+ # Settings specified here will take precedence over those in config/application.rb.
3
3
 
4
4
  # In the development environment your application's code is reloaded on
5
- # every request. This slows down response time but is perfect for development
6
- # since you don't have to restart the webserver when you make code changes.
5
+ # every request. This slows down response time but is perfect for development
6
+ # since you don't have to restart the web server when you make code changes.
7
7
  config.cache_classes = false
8
8
 
9
- # Log error messages when you accidentally call methods on nil.
10
- config.whiny_nils = true
9
+ # Do not eager load code on boot.
10
+ config.eager_load = false
11
11
 
12
- # Show full error reports and disable caching
12
+ # Show full error reports and disable caching.
13
13
  config.consider_all_requests_local = true
14
- config.action_view.debug_rjs = true
15
14
  config.action_controller.perform_caching = false
16
15
 
17
- # Don't care if the mailer can't send
16
+ # Don't care if the mailer can't send.
18
17
  config.action_mailer.raise_delivery_errors = false
19
18
 
20
- # Print deprecation notices to the Rails logger
19
+ # Print deprecation notices to the Rails logger.
21
20
  config.active_support.deprecation = :log
22
21
 
23
- # Only use best-standards-support built into browsers
24
- config.action_dispatch.best_standards_support = :builtin
25
- end
22
+ # Raise an error on page load if there are pending migrations.
23
+ config.active_record.migration_error = :page_load
24
+
25
+ # Debug mode disables concatenation and preprocessing of assets.
26
+ # This option may cause significant delays in view rendering with a large
27
+ # number of complex assets.
28
+ config.assets.debug = true
29
+
30
+ # Asset digests allow you to set far-future HTTP expiration dates on all assets,
31
+ # yet still be able to expire them through the digest params.
32
+ config.assets.digest = true
26
33
 
34
+ # Adds additional error checking when serving assets at runtime.
35
+ # Checks for improperly declared sprockets dependencies.
36
+ # Raises helpful error messages.
37
+ config.assets.raise_runtime_errors = true
38
+
39
+ # Raises error for missing translations
40
+ # config.action_view.raise_on_missing_translations = true
41
+ end
@@ -1,49 +1,79 @@
1
- Dummy::Application.configure do
2
- # Settings specified here will take precedence over those in config/environment.rb
1
+ Rails.application.configure do
2
+ # Settings specified here will take precedence over those in config/application.rb.
3
3
 
4
- # The production environment is meant for finished, "live" apps.
5
- # Code is not reloaded between requests
4
+ # Code is not reloaded between requests.
6
5
  config.cache_classes = true
7
6
 
8
- # Full error reports are disabled and caching is turned on
7
+ # Eager load code on boot. This eager loads most of Rails and
8
+ # your application in memory, allowing both threaded web servers
9
+ # and those relying on copy on write to perform better.
10
+ # Rake tasks automatically ignore this option for performance.
11
+ config.eager_load = true
12
+
13
+ # Full error reports are disabled and caching is turned on.
9
14
  config.consider_all_requests_local = false
10
15
  config.action_controller.perform_caching = true
11
16
 
12
- # Specifies the header that your server uses for sending files
13
- config.action_dispatch.x_sendfile_header = "X-Sendfile"
17
+ # Enable Rack::Cache to put a simple HTTP cache in front of your application
18
+ # Add `rack-cache` to your Gemfile before enabling this.
19
+ # For large-scale production use, consider using a caching reverse proxy like
20
+ # NGINX, varnish or squid.
21
+ # config.action_dispatch.rack_cache = true
14
22
 
15
- # For nginx:
16
- # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect'
23
+ # Disable serving static files from the `/public` folder by default since
24
+ # Apache or NGINX already handles this.
25
+ config.serve_static_files = ENV['RAILS_SERVE_STATIC_FILES'].present?
17
26
 
18
- # If you have no front-end server that supports something like X-Sendfile,
19
- # just comment this out and Rails will serve the files
27
+ # Compress JavaScripts and CSS.
28
+ config.assets.js_compressor = :uglifier
29
+ # config.assets.css_compressor = :sass
20
30
 
21
- # See everything in the log (default is :info)
22
- # config.log_level = :debug
31
+ # Do not fallback to assets pipeline if a precompiled asset is missed.
32
+ config.assets.compile = false
23
33
 
24
- # Use a different logger for distributed setups
25
- # config.logger = SyslogLogger.new
34
+ # Asset digests allow you to set far-future HTTP expiration dates on all assets,
35
+ # yet still be able to expire them through the digest params.
36
+ config.assets.digest = true
26
37
 
27
- # Use a different cache store in production
28
- # config.cache_store = :mem_cache_store
38
+ # `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb
29
39
 
30
- # Disable Rails's static asset server
31
- # In production, Apache or nginx will already do this
32
- config.serve_static_assets = false
40
+ # Specifies the header that your server uses for sending files.
41
+ # config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache
42
+ # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX
33
43
 
34
- # Enable serving of images, stylesheets, and javascripts from an asset server
35
- # config.action_controller.asset_host = "http://assets.example.com"
44
+ # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
45
+ # config.force_ssl = true
36
46
 
37
- # Disable delivery errors, bad email addresses will be ignored
38
- # config.action_mailer.raise_delivery_errors = false
47
+ # Use the lowest log level to ensure availability of diagnostic information
48
+ # when problems arise.
49
+ config.log_level = :debug
39
50
 
40
- # Enable threaded mode
41
- # config.threadsafe!
51
+ # Prepend all log lines with the following tags.
52
+ # config.log_tags = [ :subdomain, :uuid ]
53
+
54
+ # Use a different logger for distributed setups.
55
+ # config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
56
+
57
+ # Use a different cache store in production.
58
+ # config.cache_store = :mem_cache_store
59
+
60
+ # Enable serving of images, stylesheets, and JavaScripts from an asset server.
61
+ # config.action_controller.asset_host = 'http://assets.example.com'
62
+
63
+ # Ignore bad email addresses and do not raise email delivery errors.
64
+ # Set this to true and configure the email server for immediate delivery to raise delivery errors.
65
+ # config.action_mailer.raise_delivery_errors = false
42
66
 
43
67
  # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
44
- # the I18n.default_locale when a translation can not be found)
68
+ # the I18n.default_locale when a translation cannot be found).
45
69
  config.i18n.fallbacks = true
46
70
 
47
- # Send deprecation notices to registered listeners
71
+ # Send deprecation notices to registered listeners.
48
72
  config.active_support.deprecation = :notify
73
+
74
+ # Use default logging formatter so that PID and timestamp are not suppressed.
75
+ config.log_formatter = ::Logger::Formatter.new
76
+
77
+ # Do not dump schema after migrations.
78
+ config.active_record.dump_schema_after_migration = false
49
79
  end