blamestamp 0.9.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (102) hide show
  1. data/MIT-LICENSE +20 -0
  2. data/README.md +137 -0
  3. data/Rakefile +38 -0
  4. data/lib/blamestamp/action_controller.rb +24 -0
  5. data/lib/blamestamp/active_record.rb +84 -0
  6. data/lib/blamestamp/schema.rb +37 -0
  7. data/lib/blamestamp/version.rb +3 -0
  8. data/lib/blamestamp.rb +26 -0
  9. data/lib/tasks/blamestamp_tasks.rake +4 -0
  10. data/test/alligators_controller_test.rb +60 -0
  11. data/test/blameable_test.rb +114 -0
  12. data/test/blamestamp_test.rb +7 -0
  13. data/test/devise_works_test.rb +20 -0
  14. data/test/dummy/README.rdoc +261 -0
  15. data/test/dummy/Rakefile +7 -0
  16. data/test/dummy/app/assets/javascripts/application.js +13 -0
  17. data/test/dummy/app/assets/javascripts/home.js +2 -0
  18. data/test/dummy/app/assets/stylesheets/application.css +13 -0
  19. data/test/dummy/app/assets/stylesheets/home.css +4 -0
  20. data/test/dummy/app/controllers/alligators_controller.rb +83 -0
  21. data/test/dummy/app/controllers/application_controller.rb +3 -0
  22. data/test/dummy/app/controllers/flags_controller.rb +83 -0
  23. data/test/dummy/app/controllers/home_controller.rb +4 -0
  24. data/test/dummy/app/controllers/projects_controller.rb +83 -0
  25. data/test/dummy/app/helpers/alligators_helper.rb +2 -0
  26. data/test/dummy/app/helpers/application_helper.rb +2 -0
  27. data/test/dummy/app/helpers/flags_helper.rb +2 -0
  28. data/test/dummy/app/helpers/home_helper.rb +2 -0
  29. data/test/dummy/app/helpers/projects_helper.rb +2 -0
  30. data/test/dummy/app/models/alligator.rb +6 -0
  31. data/test/dummy/app/models/flag.rb +12 -0
  32. data/test/dummy/app/models/project.rb +6 -0
  33. data/test/dummy/app/models/user.rb +10 -0
  34. data/test/dummy/app/views/alligators/_form.html.erb +17 -0
  35. data/test/dummy/app/views/alligators/edit.html.erb +6 -0
  36. data/test/dummy/app/views/alligators/index.html.erb +21 -0
  37. data/test/dummy/app/views/alligators/new.html.erb +5 -0
  38. data/test/dummy/app/views/alligators/show.html.erb +5 -0
  39. data/test/dummy/app/views/devise/_links.erb +25 -0
  40. data/test/dummy/app/views/devise/confirmations/new.html.erb +12 -0
  41. data/test/dummy/app/views/devise/mailer/confirmation_instructions.html.erb +5 -0
  42. data/test/dummy/app/views/devise/mailer/reset_password_instructions.html.erb +8 -0
  43. data/test/dummy/app/views/devise/mailer/unlock_instructions.html.erb +7 -0
  44. data/test/dummy/app/views/devise/passwords/edit.html.erb +16 -0
  45. data/test/dummy/app/views/devise/passwords/new.html.erb +12 -0
  46. data/test/dummy/app/views/devise/registrations/edit.html.erb +25 -0
  47. data/test/dummy/app/views/devise/registrations/new.html.erb +18 -0
  48. data/test/dummy/app/views/devise/sessions/new.html.erb +17 -0
  49. data/test/dummy/app/views/devise/unlocks/new.html.erb +12 -0
  50. data/test/dummy/app/views/flags/_form.html.erb +17 -0
  51. data/test/dummy/app/views/flags/edit.html.erb +6 -0
  52. data/test/dummy/app/views/flags/index.html.erb +21 -0
  53. data/test/dummy/app/views/flags/new.html.erb +5 -0
  54. data/test/dummy/app/views/flags/show.html.erb +5 -0
  55. data/test/dummy/app/views/home/index.html.erb +8 -0
  56. data/test/dummy/app/views/layouts/application.html.erb +17 -0
  57. data/test/dummy/app/views/projects/_form.html.erb +17 -0
  58. data/test/dummy/app/views/projects/edit.html.erb +6 -0
  59. data/test/dummy/app/views/projects/index.html.erb +21 -0
  60. data/test/dummy/app/views/projects/new.html.erb +5 -0
  61. data/test/dummy/app/views/projects/show.html.erb +5 -0
  62. data/test/dummy/config/application.rb +57 -0
  63. data/test/dummy/config/boot.rb +10 -0
  64. data/test/dummy/config/database.yml +25 -0
  65. data/test/dummy/config/environment.rb +5 -0
  66. data/test/dummy/config/environments/development.rb +37 -0
  67. data/test/dummy/config/environments/production.rb +67 -0
  68. data/test/dummy/config/environments/test.rb +38 -0
  69. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  70. data/test/dummy/config/initializers/devise.rb +223 -0
  71. data/test/dummy/config/initializers/inflections.rb +15 -0
  72. data/test/dummy/config/initializers/mime_types.rb +5 -0
  73. data/test/dummy/config/initializers/secret_token.rb +7 -0
  74. data/test/dummy/config/initializers/session_store.rb +8 -0
  75. data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
  76. data/test/dummy/config/locales/devise.en.yml +57 -0
  77. data/test/dummy/config/locales/en.yml +5 -0
  78. data/test/dummy/config/routes.rb +14 -0
  79. data/test/dummy/config.ru +4 -0
  80. data/test/dummy/db/development.sqlite3 +0 -0
  81. data/test/dummy/db/migrate/20120420004117_devise_create_users.rb +49 -0
  82. data/test/dummy/db/migrate/20120420005606_create_projects.rb +10 -0
  83. data/test/dummy/db/migrate/20120504022124_create_alligators.rb +11 -0
  84. data/test/dummy/db/migrate/20120504025050_create_flags.rb +15 -0
  85. data/test/dummy/db/schema.rb +62 -0
  86. data/test/dummy/db/test.sqlite3 +0 -0
  87. data/test/dummy/log/development.log +780 -0
  88. data/test/dummy/log/test.log +32640 -0
  89. data/test/dummy/public/404.html +26 -0
  90. data/test/dummy/public/422.html +26 -0
  91. data/test/dummy/public/500.html +25 -0
  92. data/test/dummy/public/favicon.ico +0 -0
  93. data/test/dummy/script/rails +6 -0
  94. data/test/fixtures/alligators.yml +9 -0
  95. data/test/fixtures/flags.yml +12 -0
  96. data/test/fixtures/projects.yml +9 -0
  97. data/test/fixtures/users.yml +6 -0
  98. data/test/flags_controller_test.rb +72 -0
  99. data/test/migration_test.rb +24 -0
  100. data/test/projects_controller_test.rb +65 -0
  101. data/test/test_helper.rb +23 -0
  102. metadata +318 -0
@@ -0,0 +1,5 @@
1
+ <p id="notice"><%= notice %></p>
2
+
3
+
4
+ <%= link_to 'Edit', edit_alligator_path(@alligator) %> |
5
+ <%= link_to 'Back', alligators_path %>
@@ -0,0 +1,25 @@
1
+ <%- if controller_name != 'sessions' %>
2
+ <%= link_to "Sign in", new_session_path(resource_name) %><br />
3
+ <% end -%>
4
+
5
+ <%- if devise_mapping.registerable? && controller_name != 'registrations' %>
6
+ <%= link_to "Sign up", new_registration_path(resource_name) %><br />
7
+ <% end -%>
8
+
9
+ <%- if devise_mapping.recoverable? && controller_name != 'passwords' %>
10
+ <%= link_to "Forgot your password?", new_password_path(resource_name) %><br />
11
+ <% end -%>
12
+
13
+ <%- if devise_mapping.confirmable? && controller_name != 'confirmations' %>
14
+ <%= link_to "Didn't receive confirmation instructions?", new_confirmation_path(resource_name) %><br />
15
+ <% end -%>
16
+
17
+ <%- if devise_mapping.lockable? && resource_class.unlock_strategy_enabled?(:email) && controller_name != 'unlocks' %>
18
+ <%= link_to "Didn't receive unlock instructions?", new_unlock_path(resource_name) %><br />
19
+ <% end -%>
20
+
21
+ <%- if devise_mapping.omniauthable? %>
22
+ <%- resource_class.omniauth_providers.each do |provider| %>
23
+ <%= link_to "Sign in with #{provider.to_s.titleize}", omniauth_authorize_path(resource_name, provider) %><br />
24
+ <% end -%>
25
+ <% end -%>
@@ -0,0 +1,12 @@
1
+ <h2>Resend confirmation instructions</h2>
2
+
3
+ <%= form_for(resource, :as => resource_name, :url => confirmation_path(resource_name), :html => { :method => :post }) do |f| %>
4
+ <%= devise_error_messages! %>
5
+
6
+ <div><%= f.label :email %><br />
7
+ <%= f.email_field :email %></div>
8
+
9
+ <div><%= f.submit "Resend confirmation instructions" %></div>
10
+ <% end %>
11
+
12
+ <%= render "links" %>
@@ -0,0 +1,5 @@
1
+ <p>Welcome <%= @resource.email %>!</p>
2
+
3
+ <p>You can confirm your account email through the link below:</p>
4
+
5
+ <p><%= link_to 'Confirm my account', confirmation_url(@resource, :confirmation_token => @resource.confirmation_token) %></p>
@@ -0,0 +1,8 @@
1
+ <p>Hello <%= @resource.email %>!</p>
2
+
3
+ <p>Someone has requested a link to change your password, and you can do this through the link below.</p>
4
+
5
+ <p><%= link_to 'Change my password', edit_password_url(@resource, :reset_password_token => @resource.reset_password_token) %></p>
6
+
7
+ <p>If you didn't request this, please ignore this email.</p>
8
+ <p>Your password won't change until you access the link above and create a new one.</p>
@@ -0,0 +1,7 @@
1
+ <p>Hello <%= @resource.email %>!</p>
2
+
3
+ <p>Your account has been locked due to an excessive amount of unsuccessful sign in attempts.</p>
4
+
5
+ <p>Click the link below to unlock your account:</p>
6
+
7
+ <p><%= link_to 'Unlock my account', unlock_url(@resource, :unlock_token => @resource.unlock_token) %></p>
@@ -0,0 +1,16 @@
1
+ <h2>Change your password</h2>
2
+
3
+ <%= form_for(resource, :as => resource_name, :url => password_path(resource_name), :html => { :method => :put }) do |f| %>
4
+ <%= devise_error_messages! %>
5
+ <%= f.hidden_field :reset_password_token %>
6
+
7
+ <div><%= f.label :password, "New password" %><br />
8
+ <%= f.password_field :password %></div>
9
+
10
+ <div><%= f.label :password_confirmation, "Confirm new password" %><br />
11
+ <%= f.password_field :password_confirmation %></div>
12
+
13
+ <div><%= f.submit "Change my password" %></div>
14
+ <% end %>
15
+
16
+ <%= render "links" %>
@@ -0,0 +1,12 @@
1
+ <h2>Forgot your password?</h2>
2
+
3
+ <%= form_for(resource, :as => resource_name, :url => password_path(resource_name), :html => { :method => :post }) do |f| %>
4
+ <%= devise_error_messages! %>
5
+
6
+ <div><%= f.label :email %><br />
7
+ <%= f.email_field :email %></div>
8
+
9
+ <div><%= f.submit "Send me reset password instructions" %></div>
10
+ <% end %>
11
+
12
+ <%= render "links" %>
@@ -0,0 +1,25 @@
1
+ <h2>Edit <%= resource_name.to_s.humanize %></h2>
2
+
3
+ <%= form_for(resource, :as => resource_name, :url => registration_path(resource_name), :html => { :method => :put }) do |f| %>
4
+ <%= devise_error_messages! %>
5
+
6
+ <div><%= f.label :email %><br />
7
+ <%= f.email_field :email %></div>
8
+
9
+ <div><%= f.label :password %> <i>(leave blank if you don't want to change it)</i><br />
10
+ <%= f.password_field :password, :autocomplete => "off" %></div>
11
+
12
+ <div><%= f.label :password_confirmation %><br />
13
+ <%= f.password_field :password_confirmation %></div>
14
+
15
+ <div><%= f.label :current_password %> <i>(we need your current password to confirm your changes)</i><br />
16
+ <%= f.password_field :current_password %></div>
17
+
18
+ <div><%= f.submit "Update" %></div>
19
+ <% end %>
20
+
21
+ <h3>Cancel my account</h3>
22
+
23
+ <p>Unhappy? <%= link_to "Cancel my account", registration_path(resource_name), :confirm => "Are you sure?", :method => :delete %>.</p>
24
+
25
+ <%= link_to "Back", :back %>
@@ -0,0 +1,18 @@
1
+ <h2>Sign up</h2>
2
+
3
+ <%= form_for(resource, :as => resource_name, :url => registration_path(resource_name)) do |f| %>
4
+ <%= devise_error_messages! %>
5
+
6
+ <div><%= f.label :email %><br />
7
+ <%= f.email_field :email %></div>
8
+
9
+ <div><%= f.label :password %><br />
10
+ <%= f.password_field :password %></div>
11
+
12
+ <div><%= f.label :password_confirmation %><br />
13
+ <%= f.password_field :password_confirmation %></div>
14
+
15
+ <div><%= f.submit "Sign up" %></div>
16
+ <% end %>
17
+
18
+ <%= render "links" %>
@@ -0,0 +1,17 @@
1
+ <h2>Sign in</h2>
2
+
3
+ <%= form_for(resource, :as => resource_name, :url => session_path(resource_name)) do |f| %>
4
+ <div><%= f.label :email %><br />
5
+ <%= f.email_field :email %></div>
6
+
7
+ <div><%= f.label :password %><br />
8
+ <%= f.password_field :password %></div>
9
+
10
+ <% if devise_mapping.rememberable? -%>
11
+ <div><%= f.check_box :remember_me %> <%= f.label :remember_me %></div>
12
+ <% end -%>
13
+
14
+ <div><%= f.submit "Sign in" %></div>
15
+ <% end %>
16
+
17
+ <%= render "links" %>
@@ -0,0 +1,12 @@
1
+ <h2>Resend unlock instructions</h2>
2
+
3
+ <%= form_for(resource, :as => resource_name, :url => unlock_path(resource_name), :html => { :method => :post }) do |f| %>
4
+ <%= devise_error_messages! %>
5
+
6
+ <div><%= f.label :email %><br />
7
+ <%= f.email_field :email %></div>
8
+
9
+ <div><%= f.submit "Resend unlock instructions" %></div>
10
+ <% end %>
11
+
12
+ <%= render "links" %>
@@ -0,0 +1,17 @@
1
+ <%= form_for(@flag) do |f| %>
2
+ <% if @flag.errors.any? %>
3
+ <div id="error_explanation">
4
+ <h2><%= pluralize(@flag.errors.count, "error") %> prohibited this flag from being saved:</h2>
5
+
6
+ <ul>
7
+ <% @flag.errors.full_messages.each do |msg| %>
8
+ <li><%= msg %></li>
9
+ <% end %>
10
+ </ul>
11
+ </div>
12
+ <% end %>
13
+
14
+ <div class="actions">
15
+ <%= f.submit %>
16
+ </div>
17
+ <% end %>
@@ -0,0 +1,6 @@
1
+ <h1>Editing flag</h1>
2
+
3
+ <%= render 'form' %>
4
+
5
+ <%= link_to 'Show', @flag %> |
6
+ <%= link_to 'Back', flags_path %>
@@ -0,0 +1,21 @@
1
+ <h1>Listing flags</h1>
2
+
3
+ <table>
4
+ <tr>
5
+ <th></th>
6
+ <th></th>
7
+ <th></th>
8
+ </tr>
9
+
10
+ <% @flags.each do |flag| %>
11
+ <tr>
12
+ <td><%= link_to 'Show', flag %></td>
13
+ <td><%= link_to 'Edit', edit_flag_path(flag) %></td>
14
+ <td><%= link_to 'Destroy', flag, confirm: 'Are you sure?', method: :delete %></td>
15
+ </tr>
16
+ <% end %>
17
+ </table>
18
+
19
+ <br />
20
+
21
+ <%= link_to 'New Flag', new_flag_path %>
@@ -0,0 +1,5 @@
1
+ <h1>New flag</h1>
2
+
3
+ <%= render 'form' %>
4
+
5
+ <%= link_to 'Back', flags_path %>
@@ -0,0 +1,5 @@
1
+ <p id="notice"><%= notice %></p>
2
+
3
+
4
+ <%= link_to 'Edit', edit_flag_path(@flag) %> |
5
+ <%= link_to 'Back', flags_path %>
@@ -0,0 +1,8 @@
1
+ <div>
2
+ <h1>Dummy Application</h1>
3
+ <% if signed_in?(:user) %>
4
+ <p id="loggedin">Logged in</p>
5
+ <% else %>
6
+ <p id="loggedout">Logged out</p>
7
+ <% end %>
8
+ </div>
@@ -0,0 +1,17 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>Dummy</title>
5
+ <%= stylesheet_link_tag "application", :media => "all" %>
6
+ <%= javascript_include_tag "application" %>
7
+ <%= csrf_meta_tags %>
8
+ </head>
9
+ <body>
10
+
11
+ <p class="notice"><%= notice %></p>
12
+ <p class="alert"><%= alert %></p>
13
+
14
+ <%= yield %>
15
+
16
+ </body>
17
+ </html>
@@ -0,0 +1,17 @@
1
+ <%= form_for(@project) do |f| %>
2
+ <% if @project.errors.any? %>
3
+ <div id="error_explanation">
4
+ <h2><%= pluralize(@project.errors.count, "error") %> prohibited this project from being saved:</h2>
5
+
6
+ <ul>
7
+ <% @project.errors.full_messages.each do |msg| %>
8
+ <li><%= msg %></li>
9
+ <% end %>
10
+ </ul>
11
+ </div>
12
+ <% end %>
13
+
14
+ <div class="actions">
15
+ <%= f.submit %>
16
+ </div>
17
+ <% end %>
@@ -0,0 +1,6 @@
1
+ <h1>Editing project</h1>
2
+
3
+ <%= render 'form' %>
4
+
5
+ <%= link_to 'Show', @project %> |
6
+ <%= link_to 'Back', projects_path %>
@@ -0,0 +1,21 @@
1
+ <h1>Listing projects</h1>
2
+
3
+ <table>
4
+ <tr>
5
+ <th></th>
6
+ <th></th>
7
+ <th></th>
8
+ </tr>
9
+
10
+ <% @projects.each do |project| %>
11
+ <tr>
12
+ <td><%= link_to 'Show', project %></td>
13
+ <td><%= link_to 'Edit', edit_project_path(project) %></td>
14
+ <td><%= link_to 'Destroy', project, confirm: 'Are you sure?', method: :delete %></td>
15
+ </tr>
16
+ <% end %>
17
+ </table>
18
+
19
+ <br />
20
+
21
+ <%= link_to 'New Project', new_project_path %>
@@ -0,0 +1,5 @@
1
+ <h1>New project</h1>
2
+
3
+ <%= render 'form' %>
4
+
5
+ <%= link_to 'Back', projects_path %>
@@ -0,0 +1,5 @@
1
+ <p id="notice"><%= notice %></p>
2
+
3
+
4
+ <%= link_to 'Edit', edit_project_path(@project) %> |
5
+ <%= link_to 'Back', projects_path %>
@@ -0,0 +1,57 @@
1
+ require File.expand_path('../boot', __FILE__)
2
+
3
+ require 'rails/all'
4
+
5
+ Bundler.require
6
+ require "blamestamp"
7
+ require "devise"
8
+
9
+ module Dummy
10
+ class Application < Rails::Application
11
+ # Settings in config/environments/* take precedence over those specified here.
12
+ # Application configuration should go into files in config/initializers
13
+ # -- all .rb files in that directory are automatically loaded.
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
+ # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
26
+ # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
27
+ # config.time_zone = 'Central Time (US & Canada)'
28
+
29
+ # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
30
+ # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
31
+ # config.i18n.default_locale = :de
32
+
33
+ # Configure the default encoding used in templates for Ruby 1.9.
34
+ config.encoding = "utf-8"
35
+
36
+ # Configure sensitive parameters which will be filtered from the log file.
37
+ config.filter_parameters += [:password]
38
+
39
+ # Use SQL instead of Active Record's schema dumper when creating the database.
40
+ # This is necessary if your schema can't be completely dumped by the schema dumper,
41
+ # like if you have constraints or database-specific column types
42
+ # config.active_record.schema_format = :sql
43
+
44
+ # Enforce whitelist mode for mass assignment.
45
+ # This will create an empty whitelist of attributes available for mass-assignment for all models
46
+ # in your app. As such, your models will need to explicitly whitelist or blacklist accessible
47
+ # parameters by using an attr_accessible or attr_protected declaration.
48
+ config.active_record.whitelist_attributes = true
49
+
50
+ # Enable the asset pipeline
51
+ config.assets.enabled = true
52
+
53
+ # Version of your assets, change this if you want to expire all your assets
54
+ config.assets.version = '1.0'
55
+ end
56
+ end
57
+
@@ -0,0 +1,10 @@
1
+ require 'rubygems'
2
+ gemfile = File.expand_path('../../../../Gemfile', __FILE__)
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__)
@@ -0,0 +1,25 @@
1
+ # SQLite version 3.x
2
+ # gem install sqlite3
3
+ #
4
+ # Ensure the SQLite 3 gem is defined in your Gemfile
5
+ # gem 'sqlite3'
6
+ development:
7
+ adapter: sqlite3
8
+ database: db/development.sqlite3
9
+ pool: 5
10
+ timeout: 5000
11
+
12
+ # Warning: The database defined as "test" will be erased and
13
+ # re-generated from your development database when you run "rake".
14
+ # Do not set this db to the same as development or production.
15
+ test:
16
+ adapter: sqlite3
17
+ database: db/test.sqlite3
18
+ pool: 5
19
+ timeout: 5000
20
+
21
+ production:
22
+ adapter: sqlite3
23
+ database: db/production.sqlite3
24
+ pool: 5
25
+ timeout: 5000
@@ -0,0 +1,5 @@
1
+ # Load the rails application
2
+ require File.expand_path('../application', __FILE__)
3
+
4
+ # Initialize the rails application
5
+ Dummy::Application.initialize!
@@ -0,0 +1,37 @@
1
+ Dummy::Application.configure do
2
+ # Settings specified here will take precedence over those in config/application.rb
3
+
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 web server when you make code changes.
7
+ config.cache_classes = false
8
+
9
+ # Log error messages when you accidentally call methods on nil.
10
+ config.whiny_nils = true
11
+
12
+ # Show full error reports and disable caching
13
+ config.consider_all_requests_local = true
14
+ config.action_controller.perform_caching = false
15
+
16
+ # Don't care if the mailer can't send
17
+ config.action_mailer.raise_delivery_errors = false
18
+
19
+ # Print deprecation notices to the Rails logger
20
+ config.active_support.deprecation = :log
21
+
22
+ # Only use best-standards-support built into browsers
23
+ config.action_dispatch.best_standards_support = :builtin
24
+
25
+ # Raise exception on mass assignment protection for Active Record models
26
+ config.active_record.mass_assignment_sanitizer = :strict
27
+
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
31
+
32
+ # Do not compress assets
33
+ config.assets.compress = false
34
+
35
+ # Expands the lines which load the assets
36
+ config.assets.debug = true
37
+ end
@@ -0,0 +1,67 @@
1
+ Dummy::Application.configure do
2
+ # Settings specified here will take precedence over those in config/application.rb
3
+
4
+ # Code is not reloaded between requests
5
+ config.cache_classes = true
6
+
7
+ # Full error reports are disabled and caching is turned on
8
+ config.consider_all_requests_local = false
9
+ config.action_controller.perform_caching = true
10
+
11
+ # Disable Rails's static asset server (Apache or nginx will already do this)
12
+ config.serve_static_assets = false
13
+
14
+ # Compress JavaScripts and CSS
15
+ config.assets.compress = true
16
+
17
+ # Don't fallback to assets pipeline if a precompiled asset is missed
18
+ config.assets.compile = false
19
+
20
+ # Generate digests for assets URLs
21
+ config.assets.digest = true
22
+
23
+ # Defaults to Rails.root.join("public/assets")
24
+ # config.assets.manifest = YOUR_PATH
25
+
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
29
+
30
+ # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
31
+ # config.force_ssl = true
32
+
33
+ # See everything in the log (default is :info)
34
+ # config.log_level = :debug
35
+
36
+ # Prepend all log lines with the following tags
37
+ # config.log_tags = [ :subdomain, :uuid ]
38
+
39
+ # Use a different logger for distributed setups
40
+ # config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
41
+
42
+ # Use a different cache store in production
43
+ # config.cache_store = :mem_cache_store
44
+
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 )
50
+
51
+ # Disable delivery errors, bad email addresses will be ignored
52
+ # config.action_mailer.raise_delivery_errors = false
53
+
54
+ # Enable threaded mode
55
+ # config.threadsafe!
56
+
57
+ # 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)
59
+ config.i18n.fallbacks = true
60
+
61
+ # Send deprecation notices to registered listeners
62
+ config.active_support.deprecation = :notify
63
+
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
67
+ end
@@ -0,0 +1,38 @@
1
+ Dummy::Application.configure do
2
+ # Settings specified here will take precedence over those in config/application.rb
3
+
4
+ # The test environment is used exclusively to run your application's
5
+ # test suite. You never need to work with it otherwise. Remember that
6
+ # your test database is "scratch space" for the test suite and is wiped
7
+ # and recreated between test runs. Don't rely on the data there!
8
+ config.cache_classes = true
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"
13
+
14
+ # Log error messages when you accidentally call methods on nil
15
+ config.whiny_nils = true
16
+
17
+ # Show full error reports and disable caching
18
+ config.consider_all_requests_local = true
19
+ config.action_controller.perform_caching = false
20
+
21
+ # Raise exceptions instead of rendering exception templates
22
+ config.action_dispatch.show_exceptions = false
23
+
24
+ # Disable request forgery protection in test environment
25
+ config.action_controller.allow_forgery_protection = false
26
+
27
+ # Tell Action Mailer not to deliver emails to the real world.
28
+ # The :test delivery method accumulates sent emails in the
29
+ # ActionMailer::Base.deliveries array.
30
+ config.action_mailer.delivery_method = :test
31
+ config.action_mailer.default_url_options = { :host => 'localhost:3000' }
32
+
33
+ # Raise exception on mass assignment protection for Active Record models
34
+ config.active_record.mass_assignment_sanitizer = :strict
35
+
36
+ # Print deprecation notices to the stderr
37
+ config.active_support.deprecation = :stderr
38
+ end
@@ -0,0 +1,7 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
4
+ # Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
5
+
6
+ # You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
7
+ # Rails.backtrace_cleaner.remove_silencers!