outdatedbrowser_rails 1.1.0 → 1.1.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (106) hide show
  1. checksums.yaml +4 -4
  2. data/MIT-LICENSE +1 -1
  3. data/app/assets/javascripts/outdatedbrowser/outdatedBrowser.js +64 -59
  4. data/app/assets/javascripts/outdatedbrowser_rails/application.js +13 -0
  5. data/app/assets/stylesheets/outdatedbrowser/outdatedBrowser.css +1 -1
  6. data/app/assets/stylesheets/outdatedbrowser_rails/application.css +6 -4
  7. data/app/controllers/outdatedbrowser_rails/application_controller.rb +5 -0
  8. data/app/helpers/outdatedbrowser_rails/application_helper.rb +4 -0
  9. data/app/views/layouts/outdatedbrowser_rails/application.html.erb +1 -1
  10. data/app/views/outdatedbrowser/lang/{cz.html → cs.html} +1 -1
  11. data/app/views/outdatedbrowser/lang/da.html +3 -0
  12. data/app/views/outdatedbrowser/lang/de.html +0 -0
  13. data/app/views/outdatedbrowser/lang/el.html +3 -0
  14. data/app/views/outdatedbrowser/lang/en.html +1 -1
  15. data/app/views/outdatedbrowser/lang/es-pe.html +3 -0
  16. data/app/views/outdatedbrowser/lang/es.html +0 -0
  17. data/app/views/outdatedbrowser/lang/{ee.html → et.html} +1 -1
  18. data/app/views/outdatedbrowser/lang/fa.html +0 -0
  19. data/app/views/outdatedbrowser/lang/fi.html +1 -1
  20. data/app/views/outdatedbrowser/lang/fr.html +0 -0
  21. data/app/views/outdatedbrowser/lang/hu.html +1 -1
  22. data/app/views/outdatedbrowser/lang/id.html +0 -0
  23. data/app/views/outdatedbrowser/lang/it.html +0 -0
  24. data/app/views/outdatedbrowser/lang/ja.html +3 -0
  25. data/app/views/outdatedbrowser/lang/ko.html +3 -0
  26. data/app/views/outdatedbrowser/lang/lt.html +0 -0
  27. data/app/views/outdatedbrowser/lang/nb.html +4 -0
  28. data/app/views/outdatedbrowser/lang/nl.html +1 -1
  29. data/app/views/outdatedbrowser/lang/pl.html +0 -0
  30. data/app/views/outdatedbrowser/lang/{br.html → pt-br.html} +1 -1
  31. data/app/views/outdatedbrowser/lang/pt.html +0 -0
  32. data/app/views/outdatedbrowser/lang/ro.html +0 -0
  33. data/app/views/outdatedbrowser/lang/ru.html +2 -2
  34. data/app/views/outdatedbrowser/lang/{si.html → sl.html} +1 -1
  35. data/app/views/outdatedbrowser/lang/sv.html +3 -0
  36. data/app/views/outdatedbrowser/lang/tr.html +3 -0
  37. data/app/views/outdatedbrowser/lang/{ua.html → uk.html} +1 -1
  38. data/app/views/outdatedbrowser/lang/{cn.html → zh-cn.html} +1 -1
  39. data/app/views/outdatedbrowser/lang/zh-tw.html +3 -0
  40. data/lib/outdatedbrowser_rails/version.rb +1 -1
  41. data/spec/dummy/README.rdoc +15 -248
  42. data/spec/dummy/Rakefile +1 -2
  43. data/spec/dummy/app/assets/javascripts/application.js +5 -7
  44. data/spec/dummy/app/assets/stylesheets/application.css +7 -5
  45. data/spec/dummy/app/controllers/application_controller.rb +3 -1
  46. data/spec/dummy/app/views/layouts/application.html.erb +2 -2
  47. data/spec/dummy/bin/bundle +3 -0
  48. data/spec/dummy/bin/rails +4 -0
  49. data/spec/dummy/bin/rake +4 -0
  50. data/spec/dummy/bin/setup +29 -0
  51. data/spec/dummy/config.ru +2 -2
  52. data/spec/dummy/config/application.rb +5 -44
  53. data/spec/dummy/config/boot.rb +4 -9
  54. data/spec/dummy/config/database.yml +8 -8
  55. data/spec/dummy/config/environment.rb +3 -3
  56. data/spec/dummy/config/environments/development.rb +22 -18
  57. data/spec/dummy/config/environments/production.rb +46 -34
  58. data/spec/dummy/config/environments/test.rb +19 -14
  59. data/spec/dummy/config/initializers/assets.rb +12 -0
  60. data/spec/dummy/config/initializers/cookies_serializer.rb +3 -0
  61. data/spec/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  62. data/spec/dummy/config/initializers/inflections.rb +6 -5
  63. data/spec/dummy/config/initializers/mime_types.rb +0 -1
  64. data/spec/dummy/config/initializers/session_store.rb +1 -6
  65. data/spec/dummy/config/initializers/wrap_parameters.rb +6 -6
  66. data/spec/dummy/config/locales/en.yml +20 -2
  67. data/spec/dummy/config/routes.rb +54 -0
  68. data/spec/dummy/config/secrets.yml +22 -0
  69. data/spec/dummy/public/404.html +54 -13
  70. data/spec/dummy/public/422.html +54 -13
  71. data/spec/dummy/public/500.html +53 -12
  72. data/spec/features/asset_integration_spec.rb +2 -2
  73. metadata +52 -110
  74. data/spec/dummy/db/development.sqlite3 +0 -0
  75. data/spec/dummy/db/test.sqlite3 +0 -0
  76. data/spec/dummy/log/development.log +0 -2335
  77. data/spec/dummy/log/test.log +0 -25
  78. data/spec/dummy/tmp/cache/assets/C0B/6C0/sprockets%2F32ba372100048e769a8961c142010d29 +0 -0
  79. data/spec/dummy/tmp/cache/assets/C55/A90/sprockets%2Fc867534061993dd00f01965a87c8451a +0 -0
  80. data/spec/dummy/tmp/cache/assets/C66/070/sprockets%2F25064892e3836bb657e5d6446b86574e +0 -0
  81. data/spec/dummy/tmp/cache/assets/C76/D90/sprockets%2F317679c439a52430e7a01408fab2166e +0 -0
  82. data/spec/dummy/tmp/cache/assets/C85/6B0/sprockets%2F19e3c3829361ad685564711217e9d1dc +0 -0
  83. data/spec/dummy/tmp/cache/assets/CB7/D90/sprockets%2F324258d96111fb8a7ad85897701e41fc +0 -0
  84. data/spec/dummy/tmp/cache/assets/CCE/9C0/sprockets%2Fbe5308ba0221fb7e0f54652c6014e097 +0 -0
  85. data/spec/dummy/tmp/cache/assets/CD8/370/sprockets%2F357970feca3ac29060c1e3861e2c0953 +0 -0
  86. data/spec/dummy/tmp/cache/assets/CE9/850/sprockets%2F4a767a0e4b8d87e90e7d1b126c379724 +0 -0
  87. data/spec/dummy/tmp/cache/assets/CEF/8E0/sprockets%2Fee75db26e457cb225a52664757fc7845 +0 -0
  88. data/spec/dummy/tmp/cache/assets/D32/A10/sprockets%2F13fe41fee1fe35b49d145bcc06610705 +0 -0
  89. data/spec/dummy/tmp/cache/assets/D3C/810/sprockets%2Ff2abbf8c661ed6993fb163338c024f20 +0 -0
  90. data/spec/dummy/tmp/cache/assets/D42/CC0/sprockets%2Fc193ff3495a3beb1c539e1bd3425d759 +0 -0
  91. data/spec/dummy/tmp/cache/assets/D45/7D0/sprockets%2Ff6e3c118bd192d82fe3896e9b116dd21 +0 -0
  92. data/spec/dummy/tmp/cache/assets/D4A/C40/sprockets%2Fdfdafc62f1e86575d880bdb131079486 +0 -0
  93. data/spec/dummy/tmp/cache/assets/D4E/1B0/sprockets%2Ff7cbd26ba1d28d48de824f0e94586655 +0 -0
  94. data/spec/dummy/tmp/cache/assets/D5A/EA0/sprockets%2Fd771ace226fc8215a3572e0aa35bb0d6 +0 -0
  95. data/spec/dummy/tmp/cache/assets/D60/9D0/sprockets%2F9afc50a2bc1969a7205225d2d2ae6bd5 +0 -0
  96. data/spec/dummy/tmp/cache/assets/D67/190/sprockets%2Fba2a601dadba4b704f5a79199892fc60 +0 -0
  97. data/spec/dummy/tmp/cache/assets/D68/B30/sprockets%2Fe066c701face5c4fa3b7227c6b87b614 +0 -0
  98. data/spec/dummy/tmp/cache/assets/D78/CF0/sprockets%2F8e5507fc15ad9329b90be288f0f27acf +0 -0
  99. data/spec/dummy/tmp/cache/assets/D83/C10/sprockets%2F0c972efe069c3bf7390c2959fb7ee3e5 +0 -0
  100. data/spec/dummy/tmp/cache/assets/D95/AD0/sprockets%2F33ea8a386351bf5a9815f4bedaba53d0 +0 -0
  101. data/spec/dummy/tmp/cache/assets/D95/BD0/sprockets%2Fd0cd11b5ffec05bed60ce336858a3464 +0 -0
  102. data/spec/dummy/tmp/cache/assets/DDC/400/sprockets%2Fcffd775d018f68ce5dba1ee0d951a994 +0 -0
  103. data/spec/dummy/tmp/cache/assets/DE8/EC0/sprockets%2F1bb2ad094ca709e48c46adabe3a028bd +0 -0
  104. data/spec/dummy/tmp/cache/assets/E03/580/sprockets%2F03b5636ba83de65f19fc8f8cd3ba0fdf +0 -0
  105. data/spec/dummy/tmp/cache/assets/E04/890/sprockets%2F2f5173deea6c795b8fdde723bb4b63af +0 -0
  106. data/spec/dummy/tmp/pids/server.pid +0 -1
data/spec/dummy/Rakefile CHANGED
@@ -1,7 +1,6 @@
1
- #!/usr/bin/env rake
2
1
  # Add your own tasks in files placed in lib/tasks ending in .rake,
3
2
  # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
4
3
 
5
4
  require File.expand_path('../config/application', __FILE__)
6
5
 
7
- Dummy::Application.load_tasks
6
+ Rails.application.load_tasks
@@ -2,15 +2,13 @@
2
2
  // listed below.
3
3
  //
4
4
  // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
5
- // or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
5
+ // or any plugin's vendor/assets/javascripts directory can be referenced here using a relative path.
6
6
  //
7
7
  // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
8
- // the compiled file.
8
+ // compiled file.
9
9
  //
10
- // WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD
11
- // GO AFTER THE REQUIRES BELOW.
10
+ // Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details
11
+ // about supported directives.
12
12
  //
13
- //= require jquery
14
- //= require jquery_ujs
15
13
  //= require_tree .
16
- //= require outdatedbrowser/outdatedBrowser
14
+ //= require outdatedbrowser/outdatedbrowser
@@ -3,12 +3,14 @@
3
3
  * listed below.
4
4
  *
5
5
  * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
6
- * or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
6
+ * or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path.
7
7
  *
8
- * You're free to add application-wide styles to this file and they'll appear at the top of the
9
- * compiled file, but it's generally better to create a new file per style scope.
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.
10
12
  *
11
- *= require_self
12
13
  *= require_tree .
13
- *= require outdatedbrowser/outdatedBrowser
14
+ *= require outdatedbrowser/outdatedbrowser
15
+ *= require_self
14
16
  */
@@ -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
@@ -2,8 +2,8 @@
2
2
  <html>
3
3
  <head>
4
4
  <title>Dummy</title>
5
- <%= stylesheet_link_tag "application", :media => "all" %>
6
- <%= javascript_include_tag "application" %>
5
+ <%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true %>
6
+ <%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>
7
7
  <%= csrf_meta_tags %>
8
8
  </head>
9
9
  <body>
@@ -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')
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env ruby
2
+ APP_PATH = File.expand_path('../../config/application', __FILE__)
3
+ require_relative '../config/boot'
4
+ require 'rails/commands'
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env ruby
2
+ require_relative '../config/boot'
3
+ require 'rake'
4
+ Rake.application.run
@@ -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/spec/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
@@ -1,12 +1,6 @@
1
1
  require File.expand_path('../boot', __FILE__)
2
2
 
3
- # Pick the frameworks you want:
4
- require "active_record/railtie"
5
- require "action_controller/railtie"
6
- require "action_mailer/railtie"
7
- require "active_resource/railtie"
8
- require "sprockets/railtie"
9
- # require "rails/test_unit/railtie"
3
+ require 'rails/all'
10
4
 
11
5
  Bundler.require(*Rails.groups)
12
6
  require "outdatedbrowser_rails"
@@ -17,49 +11,16 @@ module Dummy
17
11
  # Application configuration should go into files in config/initializers
18
12
  # -- all .rb files in that directory are automatically loaded.
19
13
 
20
- # Custom directories with classes and modules you want to be autoloadable.
21
- # config.autoload_paths += %W(#{config.root}/extras)
22
-
23
- # Only load the plugins named here, in the order given (default is alphabetical).
24
- # :all can be used as a placeholder for all plugins not explicitly named.
25
- # config.plugins = [ :exception_notification, :ssl_requirement, :all ]
26
-
27
- # Activate observers that should always be running.
28
- # config.active_record.observers = :cacher, :garbage_collector, :forum_observer
29
-
30
14
  # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
31
15
  # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
32
16
  # config.time_zone = 'Central Time (US & Canada)'
33
17
 
34
18
  # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
35
19
  # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
36
- config.i18n.default_locale = 'de'
37
- I18n.config.enforce_available_locales = false
38
-
39
- # Configure the default encoding used in templates for Ruby 1.9.
40
- config.encoding = "utf-8"
41
-
42
- # Configure sensitive parameters which will be filtered from the log file.
43
- config.filter_parameters += [:password]
20
+ # config.i18n.default_locale = :de
44
21
 
45
- # Enable escaping HTML in JSON.
46
- config.active_support.escape_html_entities_in_json = true
47
-
48
- # Use SQL instead of Active Record's schema dumper when creating the database.
49
- # This is necessary if your schema can't be completely dumped by the schema dumper,
50
- # like if you have constraints or database-specific column types
51
- # config.active_record.schema_format = :sql
52
-
53
- # Enforce whitelist mode for mass assignment.
54
- # This will create an empty whitelist of attributes available for mass-assignment for all models
55
- # in your app. As such, your models will need to explicitly whitelist or blacklist accessible
56
- # parameters by using an attr_accessible or attr_protected declaration.
57
- config.active_record.whitelist_attributes = true
58
-
59
- # Enable the asset pipeline
60
- config.assets.enabled = true
61
-
62
- # Version of your assets, change this if you want to expire all your assets
63
- config.assets.version = '1.0'
22
+ # Do not swallow errors in after_commit/after_rollback callbacks.
23
+ config.active_record.raise_in_transactional_callbacks = true
64
24
  end
65
25
  end
26
+
@@ -1,10 +1,5 @@
1
- require 'rubygems'
2
- gemfile = File.expand_path('../../../../Gemfile', __FILE__)
1
+ # Set up gems listed in the Gemfile.
2
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../../../Gemfile', __FILE__)
3
3
 
4
- if File.exist?(gemfile)
5
- ENV['BUNDLE_GEMFILE'] = gemfile
6
- require 'bundler'
7
- Bundler.setup
8
- end
9
-
10
- $:.unshift File.expand_path('../../../../lib', __FILE__)
4
+ require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE'])
5
+ $LOAD_PATH.unshift File.expand_path('../../../../lib', __FILE__)
@@ -3,23 +3,23 @@
3
3
  #
4
4
  # Ensure the SQLite 3 gem is defined in your Gemfile
5
5
  # gem 'sqlite3'
6
- development:
6
+ #
7
+ default: &default
7
8
  adapter: sqlite3
8
- database: db/development.sqlite3
9
9
  pool: 5
10
10
  timeout: 5000
11
11
 
12
+ development:
13
+ <<: *default
14
+ database: db/development.sqlite3
15
+
12
16
  # Warning: The database defined as "test" will be erased and
13
17
  # re-generated from your development database when you run "rake".
14
18
  # Do not set this db to the same as development or production.
15
19
  test:
16
- adapter: sqlite3
20
+ <<: *default
17
21
  database: db/test.sqlite3
18
- pool: 5
19
- timeout: 5000
20
22
 
21
23
  production:
22
- adapter: sqlite3
24
+ <<: *default
23
25
  database: db/production.sqlite3
24
- pool: 5
25
- 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,37 +1,41 @@
1
- Dummy::Application.configure do
2
- # Settings specified here will take precedence over those in config/application.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
5
  # every request. This slows down response time but is perfect for development
6
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
14
  config.action_controller.perform_caching = false
15
15
 
16
- # Don't care if the mailer can't send
16
+ # Don't care if the mailer can't send.
17
17
  config.action_mailer.raise_delivery_errors = false
18
18
 
19
- # Print deprecation notices to the Rails logger
19
+ # Print deprecation notices to the Rails logger.
20
20
  config.active_support.deprecation = :log
21
21
 
22
- # Only use best-standards-support built into browsers
23
- config.action_dispatch.best_standards_support = :builtin
22
+ # Raise an error on page load if there are pending migrations.
23
+ config.active_record.migration_error = :page_load
24
24
 
25
- # Raise exception on mass assignment protection for Active Record models
26
- config.active_record.mass_assignment_sanitizer = :strict
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
27
29
 
28
- # Log the query plan for queries taking more than this (works
29
- # with SQLite, MySQL, and PostgreSQL)
30
- config.active_record.auto_explain_threshold_in_seconds = 0.5
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
31
33
 
32
- # Do not compress assets
33
- config.assets.compress = false
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
34
38
 
35
- # Expands the lines which load the assets
36
- config.assets.debug = true
39
+ # Raises error for missing translations
40
+ # config.action_view.raise_on_missing_translations = true
37
41
  end
@@ -1,67 +1,79 @@
1
- Dummy::Application.configure do
2
- # Settings specified here will take precedence over those in config/application.rb
1
+ Rails.application.configure do
2
+ # Settings specified here will take precedence over those in config/application.rb.
3
3
 
4
- # Code is not reloaded between requests
4
+ # Code is not reloaded between requests.
5
5
  config.cache_classes = true
6
6
 
7
- # 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.
8
14
  config.consider_all_requests_local = false
9
15
  config.action_controller.perform_caching = true
10
16
 
11
- # Disable Rails's static asset server (Apache or nginx will already do this)
12
- config.serve_static_assets = false
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
22
+
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?
13
26
 
14
- # Compress JavaScripts and CSS
15
- config.assets.compress = true
27
+ # Compress JavaScripts and CSS.
28
+ config.assets.js_compressor = :uglifier
29
+ # config.assets.css_compressor = :sass
16
30
 
17
- # Don't fallback to assets pipeline if a precompiled asset is missed
31
+ # Do not fallback to assets pipeline if a precompiled asset is missed.
18
32
  config.assets.compile = false
19
33
 
20
- # Generate digests for assets URLs
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.
21
36
  config.assets.digest = true
22
37
 
23
- # Defaults to nil and saved in location specified by config.assets.prefix
24
- # config.assets.manifest = YOUR_PATH
38
+ # `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb
25
39
 
26
- # Specifies the header that your server uses for sending files
27
- # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache
28
- # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx
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
29
43
 
30
44
  # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
31
45
  # config.force_ssl = true
32
46
 
33
- # See everything in the log (default is :info)
34
- # config.log_level = :debug
47
+ # Use the lowest log level to ensure availability of diagnostic information
48
+ # when problems arise.
49
+ config.log_level = :debug
35
50
 
36
- # Prepend all log lines with the following tags
51
+ # Prepend all log lines with the following tags.
37
52
  # config.log_tags = [ :subdomain, :uuid ]
38
53
 
39
- # Use a different logger for distributed setups
54
+ # Use a different logger for distributed setups.
40
55
  # config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
41
56
 
42
- # Use a different cache store in production
57
+ # Use a different cache store in production.
43
58
  # config.cache_store = :mem_cache_store
44
59
 
45
- # Enable serving of images, stylesheets, and JavaScripts from an asset server
46
- # config.action_controller.asset_host = "http://assets.example.com"
47
-
48
- # Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added)
49
- # config.assets.precompile += %w( search.js )
60
+ # Enable serving of images, stylesheets, and JavaScripts from an asset server.
61
+ # config.action_controller.asset_host = 'http://assets.example.com'
50
62
 
51
- # Disable delivery errors, bad email addresses will be ignored
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.
52
65
  # config.action_mailer.raise_delivery_errors = false
53
66
 
54
- # Enable threaded mode
55
- # config.threadsafe!
56
-
57
67
  # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
58
- # the I18n.default_locale when a translation can not be found)
68
+ # the I18n.default_locale when a translation cannot be found).
59
69
  config.i18n.fallbacks = true
60
70
 
61
- # Send deprecation notices to registered listeners
71
+ # Send deprecation notices to registered listeners.
62
72
  config.active_support.deprecation = :notify
63
73
 
64
- # Log the query plan for queries taking more than this (works
65
- # with SQLite, MySQL, and PostgreSQL)
66
- # config.active_record.auto_explain_threshold_in_seconds = 0.5
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
67
79
  end
@@ -1,5 +1,5 @@
1
- Dummy::Application.configure do
2
- # Settings specified here will take precedence over those in config/application.rb
1
+ Rails.application.configure do
2
+ # Settings specified here will take precedence over those in config/application.rb.
3
3
 
4
4
  # The test environment is used exclusively to run your application's
5
5
  # test suite. You never need to work with it otherwise. Remember that
@@ -7,31 +7,36 @@ Dummy::Application.configure do
7
7
  # and recreated between test runs. Don't rely on the data there!
8
8
  config.cache_classes = true
9
9
 
10
- # Configure static asset server for tests with Cache-Control for performance
11
- config.serve_static_assets = true
12
- config.static_cache_control = "public, max-age=3600"
10
+ # Do not eager load code on boot. This avoids loading your whole application
11
+ # just for the purpose of running a single test. If you are using a tool that
12
+ # preloads Rails for running tests, you may have to set it to true.
13
+ config.eager_load = false
13
14
 
14
- # Log error messages when you accidentally call methods on nil
15
- config.whiny_nils = true
15
+ # Configure static file server for tests with Cache-Control for performance.
16
+ config.serve_static_files = true
17
+ config.static_cache_control = 'public, max-age=3600'
16
18
 
17
- # Show full error reports and disable caching
19
+ # Show full error reports and disable caching.
18
20
  config.consider_all_requests_local = true
19
21
  config.action_controller.perform_caching = false
20
22
 
21
- # Raise exceptions instead of rendering exception templates
23
+ # Raise exceptions instead of rendering exception templates.
22
24
  config.action_dispatch.show_exceptions = false
23
25
 
24
- # Disable request forgery protection in test environment
25
- config.action_controller.allow_forgery_protection = false
26
+ # Disable request forgery protection in test environment.
27
+ config.action_controller.allow_forgery_protection = false
26
28
 
27
29
  # Tell Action Mailer not to deliver emails to the real world.
28
30
  # The :test delivery method accumulates sent emails in the
29
31
  # ActionMailer::Base.deliveries array.
30
32
  config.action_mailer.delivery_method = :test
31
33
 
32
- # Raise exception on mass assignment protection for Active Record models
33
- config.active_record.mass_assignment_sanitizer = :strict
34
+ # Randomize the order test cases are executed.
35
+ config.active_support.test_order = :random
34
36
 
35
- # Print deprecation notices to the stderr
37
+ # Print deprecation notices to the stderr.
36
38
  config.active_support.deprecation = :stderr
39
+
40
+ # Raises error for missing translations
41
+ # config.action_view.raise_on_missing_translations = true
37
42
  end