user_stamp 3.0.2 → 4.0.0

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 (128) hide show
  1. checksums.yaml +4 -4
  2. data/MIT-LICENSE +2 -2
  3. data/README.rdoc +3 -3
  4. data/Rakefile +6 -9
  5. data/config/routes.rb +22 -21
  6. data/lib/generators/user_stamp/USAGE +5 -6
  7. data/lib/generators/user_stamp/templates/user_stamp.template +16 -21
  8. data/lib/generators/user_stamp/user_stamp_generator.rb +23 -23
  9. data/lib/user_stamp.rb +23 -22
  10. data/lib/user_stamp/app_controller.rb +22 -24
  11. data/lib/user_stamp/config.rb +29 -33
  12. data/lib/user_stamp/engine.rb +27 -28
  13. data/lib/user_stamp/user.rb +23 -24
  14. data/lib/user_stamp/user_stamp.rb +33 -35
  15. data/lib/user_stamp/version.rb +23 -22
  16. data/test/dummy/README.rdoc +15 -248
  17. data/test/dummy/Rakefile +1 -2
  18. data/test/dummy/app/assets/javascripts/application.js +4 -6
  19. data/test/dummy/app/assets/stylesheets/application.css +6 -4
  20. data/test/dummy/app/assets/stylesheets/scaffold.css +56 -0
  21. data/test/dummy/app/controllers/application_controller.rb +5 -30
  22. data/test/dummy/app/controllers/materials_controller.rb +27 -51
  23. data/test/dummy/app/controllers/products_controller.rb +27 -51
  24. data/test/dummy/app/helpers/application_helper.rb +0 -26
  25. data/test/dummy/app/helpers/materials_helper.rb +0 -26
  26. data/test/dummy/app/helpers/products_helper.rb +0 -26
  27. data/test/dummy/app/models/material.rb +2 -33
  28. data/test/dummy/app/models/product.rb +3 -30
  29. data/test/dummy/app/models/user.rb +0 -30
  30. data/test/dummy/app/views/layouts/application.html.erb +2 -2
  31. data/test/dummy/app/views/materials/_form.html.erb +9 -9
  32. data/test/dummy/app/views/materials/edit.html.erb +2 -2
  33. data/test/dummy/app/views/materials/index.html.erb +27 -23
  34. data/test/dummy/app/views/materials/new.html.erb +1 -2
  35. data/test/dummy/app/views/materials/show.html.erb +4 -8
  36. data/test/dummy/app/views/products/_form.html.erb +6 -6
  37. data/test/dummy/app/views/products/edit.html.erb +1 -1
  38. data/test/dummy/app/views/products/index.html.erb +26 -22
  39. data/test/dummy/app/views/products/new.html.erb +1 -1
  40. data/test/dummy/app/views/products/show.html.erb +4 -5
  41. data/test/dummy/bin/bundle +3 -0
  42. data/test/dummy/bin/rails +4 -0
  43. data/test/dummy/bin/rake +4 -0
  44. data/test/dummy/bin/setup +29 -0
  45. data/test/dummy/config.ru +2 -2
  46. data/test/dummy/config/application.rb +2 -35
  47. data/test/dummy/config/boot.rb +4 -9
  48. data/test/dummy/config/database.yml +8 -8
  49. data/test/dummy/config/environment.rb +3 -3
  50. data/test/dummy/config/environments/development.rb +22 -18
  51. data/test/dummy/config/environments/production.rb +46 -34
  52. data/test/dummy/config/environments/test.rb +19 -14
  53. data/test/dummy/config/initializers/assets.rb +11 -0
  54. data/test/dummy/config/initializers/cookies_serializer.rb +3 -0
  55. data/test/dummy/config/initializers/devise.rb +5 -5
  56. data/test/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  57. data/test/dummy/config/initializers/inflections.rb +6 -5
  58. data/test/dummy/config/initializers/mime_types.rb +0 -1
  59. data/test/dummy/config/initializers/session_store.rb +1 -6
  60. data/test/dummy/config/initializers/user_stamp.rb +16 -21
  61. data/test/dummy/config/initializers/wrap_parameters.rb +6 -6
  62. data/test/dummy/config/locales/en.yml +20 -2
  63. data/test/dummy/config/routes.rb +56 -4
  64. data/test/dummy/config/secrets.yml +22 -0
  65. data/test/dummy/db/development.sqlite3 +0 -0
  66. data/test/dummy/db/migrate/{20150418012302_devise_create_users.rb → 20150427152452_devise_create_users.rb} +1 -1
  67. data/test/dummy/db/migrate/{20150420023321_create_materials.rb → 20150427153058_create_materials.rb} +2 -2
  68. data/test/dummy/db/migrate/{20150418013334_create_products.rb → 20150427153126_create_products.rb} +5 -5
  69. data/test/dummy/db/schema.rb +19 -19
  70. data/test/dummy/db/test.sqlite3 +0 -0
  71. data/test/dummy/public/404.html +54 -13
  72. data/test/dummy/public/422.html +54 -13
  73. data/test/dummy/public/500.html +53 -12
  74. data/test/dummy/test/{functional → controllers}/materials_controller_test.rb +6 -36
  75. data/test/dummy/test/{functional → controllers}/products_controller_test.rb +9 -39
  76. data/test/dummy/test/models/material_test.rb +7 -0
  77. data/test/dummy/test/models/product_test.rb +7 -0
  78. data/test/dummy/test/models/user_test.rb +7 -0
  79. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/-uBri7P4oa8-cPDbuxBzrBh6f_6YgmRETeF1cPQ98BI.cache +2 -0
  80. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/0HaE6Po_aJLoGCREH2pm0GVz0rQO2AnHYN5WxfxRAdk.cache +2 -0
  81. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/4WkO5ZKNyqFfwe0aMDO40zL7WuG01_LUMIo_Z1VIwIM.cache +2 -0
  82. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/6sjvyZUWlu55-3XP-5yZfxjfXvbrvxsg-E3Q7B_t8pk.cache +1 -0
  83. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/8Z_hEjtyPSQN4opQbT6RkcCNBCF-CFQybzoSs5Aq6KI.cache +2 -0
  84. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/9-HUlJkF3jRyupEtKfWn1dlmpPkguFR6iptppjOucgg.cache +1 -0
  85. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/A7WZdZGirgPer7eGsq2mJfHio6N9R9HJJxM4hkuItJo.cache +1 -0
  86. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/DzCB5KQSlVUBNf_tlBgnzTbS3b_pMkzkuqihSfNHe4s.cache +2 -0
  87. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/GIw-liLL0pp9xX_VtZkZToKgqPr4koaqbpG9bROGWQQ.cache +0 -0
  88. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/IgADW9PKfRr6TSWEm1ipKSMaJ4DwdbJMYiKMXWP2qvw.cache +0 -0
  89. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/MEs_AIdrjZ9MYzLES9uOroxBGNjY9Stpe19ohy0z1lA.cache +0 -0
  90. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/SDZR43ZDx01ZzCRNeIhjSx_9kJO78HCK8YMJAKnWIaI.cache +0 -0
  91. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/U2SInYmDs_pipNOzdogCHPXzyUyc1h5jAls6xbWSGs4.cache +1 -0
  92. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/UL1xczCpSxV6CONGlfaMEdE5KwKA9o56RLp2QZxGstA.cache +2 -0
  93. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/UReuCl2zv3Z3nGvte7lUGu7979JxkuCRbDNv6-HtTZU.cache +1 -0
  94. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/WT1n2kS2FLNKA6DHRX7THVlGIGzgTC8je4MMzBQtSmg.cache +1 -0
  95. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/XgTwbFt01e5bfNNba5Gr83GNRea9MoFlqP2rJGW_rjk.cache +0 -0
  96. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/ZAc9zFuIs2cKSfQZVtEkV3u4_RLFxLSP55C0RqqhZ1w.cache +2 -0
  97. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/Zea97tHycA5aXYbZ9DHtFHTu4bhAZcIhb0RlckVvzXI.cache +1 -0
  98. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/ZwP9zS5ft5ww816BPhmhQPqMPKbbgPdjBrz5VnSZ5oo.cache +2 -0
  99. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/hwZcJkZ_YQ4hjBA1FzHIvGWudWHtQDZW7h8zUJslBQM.cache +1 -0
  100. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/iqtLgHvtAikgr0-aW1Vqy4KeUsVmzgOz9YVG2_2RVeY.cache +1 -0
  101. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/jpKzE4ZVMG4ynSLgDB76TOPEZbHNqYF8BQRy94ioeQE.cache +2 -0
  102. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/kM0liVKuJ_BZI9HenUEa6OO9pOnT4KuC-zzXot34reU.cache +2 -0
  103. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/nGfH8igMEHxuQWcDKD23EjWqmSvgxI2sVXhNOC5wE8I.cache +1 -0
  104. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/ni5fBgQoTXajLTgoWS8nd8LoiucG5krt3YIpbrx1mIY.cache +2 -0
  105. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/oVvP3smTURXlapOzr_iUN4Ew_m3EEy3CQ4M0cOkTsm0.cache +1 -0
  106. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/oX6WZjQtAOkKXBohDgfcjs0cda8wFDGnkwJDGkJoytI.cache +0 -0
  107. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/oeTdUtI5qsh1Nn2Hy6_wmjtPV25O-RCQPcNjCwoSCKA.cache +0 -0
  108. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/ov953wmqzp_9OaWCaoMLlOSWzHeF9kLApt4aCcW-Bgk.cache +1 -0
  109. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/sg6mpEMI9L65gEc7QFaXG534feyjIGE29SE7B_RTQNY.cache +1 -0
  110. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/uJ8m6b9jypIn4pSuuaKkFBW9E2Ifcx2ulcERIa1q1dA.cache +1 -0
  111. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/uYPgal6XAaVE9q7oz6jQS5nmQKM3IwZ8tnsE-__Oweo.cache +1 -0
  112. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/vXJI-yUwt8d552Mj63nmnTx46YY7-GUrYuFzLUT9hMI.cache +0 -0
  113. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/xs2cSdXmo8vitmiaAo7fhDSGbrVPUKN17Ue3aTCUseE.cache +1 -0
  114. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/yCPG4xJ4TDzj7Mbcm2B0wDN_Jqlu2dKg8bFLKqW-pBI.cache +0 -0
  115. data/test/fixtures/materials.yml +1 -1
  116. data/test/fixtures/products.yml +1 -1
  117. data/test/fixtures/users.yml +5 -26
  118. data/test/test_helper.rb +7 -33
  119. data/test/user_stamp_test.rb +0 -26
  120. metadata +124 -40
  121. data/test/dummy/config/initializers/secret_token.rb +0 -7
  122. data/test/dummy/log/test.log +0 -414
  123. data/test/dummy/script/rails +0 -6
  124. data/test/dummy/test/unit/helpers/materials_helper_test.rb +0 -30
  125. data/test/dummy/test/unit/helpers/products_helper_test.rb +0 -30
  126. data/test/dummy/test/unit/material_test.rb +0 -33
  127. data/test/dummy/test/unit/product_test.rb +0 -33
  128. data/test/dummy/test/unit/user_test.rb +0 -33
@@ -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
@@ -11,16 +11,6 @@ module Dummy
11
11
  # Application configuration should go into files in config/initializers
12
12
  # -- all .rb files in that directory are automatically loaded.
13
13
 
14
- # Custom directories with classes and modules you want to be autoloadable.
15
- # config.autoload_paths += %W(#{config.root}/extras)
16
-
17
- # Only load the plugins named here, in the order given (default is alphabetical).
18
- # :all can be used as a placeholder for all plugins not explicitly named.
19
- # config.plugins = [ :exception_notification, :ssl_requirement, :all ]
20
-
21
- # Activate observers that should always be running.
22
- # config.active_record.observers = :cacher, :garbage_collector, :forum_observer
23
-
24
14
  # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
25
15
  # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
26
16
  # config.time_zone = 'Central Time (US & Canada)'
@@ -29,31 +19,8 @@ module Dummy
29
19
  # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
30
20
  # config.i18n.default_locale = :de
31
21
 
32
- # Configure the default encoding used in templates for Ruby 1.9.
33
- config.encoding = "utf-8"
34
-
35
- # Configure sensitive parameters which will be filtered from the log file.
36
- config.filter_parameters += [:password]
37
-
38
- # Enable escaping HTML in JSON.
39
- config.active_support.escape_html_entities_in_json = true
40
-
41
- # Use SQL instead of Active Record's schema dumper when creating the database.
42
- # This is necessary if your schema can't be completely dumped by the schema dumper,
43
- # like if you have constraints or database-specific column types
44
- # config.active_record.schema_format = :sql
45
-
46
- # Enforce whitelist mode for mass assignment.
47
- # This will create an empty whitelist of attributes available for mass-assignment for all models
48
- # in your app. As such, your models will need to explicitly whitelist or blacklist accessible
49
- # parameters by using an attr_accessible or attr_protected declaration.
50
- config.active_record.whitelist_attributes = true
51
-
52
- # Enable the asset pipeline
53
- config.assets.enabled = true
54
-
55
- # Version of your assets, change this if you want to expire all your assets
56
- 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
57
24
  end
58
25
  end
59
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
@@ -0,0 +1,11 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Version of your assets, change this if you want to expire all your assets.
4
+ Rails.application.config.assets.version = '1.0'
5
+
6
+ # Add additional assets to the asset load path
7
+ # Rails.application.config.assets.paths << Emoji.images_path
8
+
9
+ # Precompile additional assets.
10
+ # application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
11
+ # Rails.application.config.assets.precompile += %w( search.js )
@@ -0,0 +1,3 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ Rails.application.config.action_dispatch.cookies_serializer = :json
@@ -4,7 +4,7 @@ Devise.setup do |config|
4
4
  # The secret key used by Devise. Devise uses this key to generate
5
5
  # random tokens. Changing this key will render invalid all existing
6
6
  # confirmation, reset password and unlock tokens in the database.
7
- config.secret_key = 'f536763f540d8604d6cd10322a9acc292bfa4e6a398d699505dcf5c71f39ce2e5d2af2c9b5c4386cd144aa762f979047cfef2aa3e13dc10b1a3308107a542766'
7
+ # config.secret_key = '508384b8a21379a95501ffc9faae3ea80fd6e2ebe0a3bf6f151dbd4123ba6bccb6706603c373146450a6e90943ebe68ee8288d00630ae8b5e8658013094b01a3'
8
8
 
9
9
  # ==> Mailer Configuration
10
10
  # Configure the e-mail address which will be shown in Devise::Mailer,
@@ -29,7 +29,7 @@ Devise.setup do |config|
29
29
  # session. If you need permissions, you should implement that in a before filter.
30
30
  # You can also supply a hash where the value is a boolean determining whether
31
31
  # or not authentication should be aborted when the value is not present.
32
- config.authentication_keys = [ :login_name ]
32
+ # config.authentication_keys = [ :email ]
33
33
 
34
34
  # Configure parameters from the request object used for authentication. Each entry
35
35
  # given should be a request method and it will automatically be passed to the
@@ -41,12 +41,12 @@ Devise.setup do |config|
41
41
  # Configure which authentication keys should be case-insensitive.
42
42
  # These keys will be downcased upon creating or modifying a user and when used
43
43
  # to authenticate or find a user. Default is :email.
44
- config.case_insensitive_keys = [ :email ]
44
+ config.case_insensitive_keys = [ :login_name, :email ]
45
45
 
46
46
  # Configure which authentication keys should have whitespace stripped.
47
47
  # These keys will have whitespace before and after removed upon creating or
48
48
  # modifying a user and when used to authenticate or find a user. Default is :email.
49
- config.strip_whitespace_keys = [ :email ]
49
+ config.strip_whitespace_keys = [ :login_name, :email ]
50
50
 
51
51
  # Tell if authentication through request.params is enabled. True by default.
52
52
  # It can be set to an array that will enable params authentication only for the
@@ -97,7 +97,7 @@ Devise.setup do |config|
97
97
  config.stretches = Rails.env.test? ? 1 : 10
98
98
 
99
99
  # Setup a pepper to generate the encrypted password.
100
- # config.pepper = 'd2a90974dbe66d597db63ef3c00f02be2fe74e97b76e1a92ff92b4edc1c70c1021b9d52cb81aa97434314d39c15d3085d148cda3ce743be7a1df840852371762'
100
+ # config.pepper = '0d4d8fad3968da86cdf26ed92781101e1996aa3910043b31dce9be014053af7f310e5cbd1f673107fc187e18784163f7be7132f3be80cc57fc06599e5bee3f40'
101
101
 
102
102
  # ==> Configuration for :confirmable
103
103
  # A period that the user is allowed to access the website even without
@@ -0,0 +1,4 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Configure sensitive parameters which will be filtered from the log file.
4
+ Rails.application.config.filter_parameters += [:password]
@@ -1,15 +1,16 @@
1
1
  # Be sure to restart your server when you modify this file.
2
2
 
3
- # Add new inflection rules using the following format
4
- # (all these examples are active by default):
5
- # ActiveSupport::Inflector.inflections do |inflect|
3
+ # Add new inflection rules using the following format. Inflections
4
+ # are locale specific, and you may define rules for as many different
5
+ # locales as you wish. All of these examples are active by default:
6
+ # ActiveSupport::Inflector.inflections(:en) do |inflect|
6
7
  # inflect.plural /^(ox)$/i, '\1en'
7
8
  # inflect.singular /^(ox)en/i, '\1'
8
9
  # inflect.irregular 'person', 'people'
9
10
  # inflect.uncountable %w( fish sheep )
10
11
  # end
11
- #
12
+
12
13
  # These inflection rules are supported but not enabled by default:
13
- # ActiveSupport::Inflector.inflections do |inflect|
14
+ # ActiveSupport::Inflector.inflections(:en) do |inflect|
14
15
  # inflect.acronym 'RESTful'
15
16
  # end
@@ -2,4 +2,3 @@
2
2
 
3
3
  # Add new mime types for use in respond_to blocks:
4
4
  # Mime::Type.register "text/richtext", :rtf
5
- # Mime::Type.register_alias "text/html", :iphone
@@ -1,8 +1,3 @@
1
1
  # Be sure to restart your server when you modify this file.
2
2
 
3
- Dummy::Application.config.session_store :cookie_store, key: '_dummy_session'
4
-
5
- # Use the database for sessions instead of the cookie-based default,
6
- # which shouldn't be used to store highly confidential information
7
- # (create the session table with "rails generate session_migration")
8
- # Dummy::Application.config.session_store :active_record_store
3
+ Rails.application.config.session_store :cookie_store, key: '_dummy_session'