ratchetio 0.4.2 → 0.4.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (82) hide show
  1. data/.gitignore +1 -0
  2. data/CHANGELOG.md +6 -0
  3. data/README.md +2 -0
  4. data/Rakefile +7 -1
  5. data/lib/generators/ratchetio/ratchetio_generator.rb +1 -1
  6. data/lib/ratchetio/configuration.rb +9 -10
  7. data/lib/ratchetio/rails/controller_methods.rb +3 -3
  8. data/lib/ratchetio/rails/middleware/exception_catcher.rb +2 -4
  9. data/lib/ratchetio/version.rb +1 -1
  10. data/lib/ratchetio.rb +87 -60
  11. data/ratchetio.gemspec +16 -1
  12. data/spec/controllers/home_controller_spec.rb +41 -0
  13. data/spec/dummyapp/.gitignore +74 -0
  14. data/spec/dummyapp/Gemfile +19 -0
  15. data/spec/dummyapp/README +19 -0
  16. data/spec/dummyapp/README.textile +80 -0
  17. data/spec/dummyapp/Rakefile +7 -0
  18. data/spec/dummyapp/app/assets/javascripts/application.js +15 -0
  19. data/spec/dummyapp/app/assets/javascripts/home.js.coffee +3 -0
  20. data/spec/dummyapp/app/assets/stylesheets/application.css.scss +37 -0
  21. data/spec/dummyapp/app/assets/stylesheets/home.css.scss +3 -0
  22. data/spec/dummyapp/app/controllers/application_controller.rb +3 -0
  23. data/spec/dummyapp/app/controllers/home_controller.rb +21 -0
  24. data/spec/dummyapp/app/controllers/users_controller.rb +12 -0
  25. data/spec/dummyapp/app/helpers/application_helper.rb +2 -0
  26. data/spec/dummyapp/app/helpers/home_helper.rb +2 -0
  27. data/spec/dummyapp/app/mailers/.gitkeep +0 -0
  28. data/spec/dummyapp/app/models/.gitkeep +0 -0
  29. data/spec/dummyapp/app/models/user.rb +11 -0
  30. data/spec/dummyapp/app/views/devise/registrations/edit.html.erb +27 -0
  31. data/spec/dummyapp/app/views/devise/registrations/new.html.erb +20 -0
  32. data/spec/dummyapp/app/views/devise/shared/_links.html.erb +25 -0
  33. data/spec/dummyapp/app/views/home/cause_exception.html.erb +1 -0
  34. data/spec/dummyapp/app/views/home/index.html.erb +4 -0
  35. data/spec/dummyapp/app/views/home/report_exception.html.erb +1 -0
  36. data/spec/dummyapp/app/views/layouts/_messages.html.erb +5 -0
  37. data/spec/dummyapp/app/views/layouts/_navigation.html.erb +21 -0
  38. data/spec/dummyapp/app/views/layouts/application.html.erb +25 -0
  39. data/spec/dummyapp/app/views/users/index.html.erb +8 -0
  40. data/spec/dummyapp/app/views/users/show.html.erb +3 -0
  41. data/spec/dummyapp/config/application.rb +76 -0
  42. data/spec/dummyapp/config/boot.rb +6 -0
  43. data/spec/dummyapp/config/cucumber.yml +8 -0
  44. data/spec/dummyapp/config/environment.rb +5 -0
  45. data/spec/dummyapp/config/environments/development.rb +54 -0
  46. data/spec/dummyapp/config/environments/production.rb +87 -0
  47. data/spec/dummyapp/config/environments/test.rb +41 -0
  48. data/spec/dummyapp/config/initializers/backtrace_silencers.rb +7 -0
  49. data/spec/dummyapp/config/initializers/devise.rb +233 -0
  50. data/spec/dummyapp/config/initializers/generators.rb +2 -0
  51. data/spec/dummyapp/config/initializers/inflections.rb +15 -0
  52. data/spec/dummyapp/config/initializers/mime_types.rb +5 -0
  53. data/spec/dummyapp/config/initializers/ratchetio.rb +20 -0
  54. data/spec/dummyapp/config/initializers/secret_token.rb +7 -0
  55. data/spec/dummyapp/config/initializers/session_store.rb +8 -0
  56. data/spec/dummyapp/config/initializers/wrap_parameters.rb +14 -0
  57. data/spec/dummyapp/config/locales/devise.en.yml +58 -0
  58. data/spec/dummyapp/config/locales/en.yml +5 -0
  59. data/spec/dummyapp/config/routes.rb +11 -0
  60. data/spec/dummyapp/config.ru +4 -0
  61. data/spec/dummyapp/db/migrate/20121121184652_devise_create_users.rb +46 -0
  62. data/spec/dummyapp/db/migrate/20121121184654_add_name_to_users.rb +5 -0
  63. data/spec/dummyapp/db/schema.rb +35 -0
  64. data/spec/dummyapp/db/seeds.rb +12 -0
  65. data/spec/dummyapp/lib/assets/.gitkeep +0 -0
  66. data/spec/dummyapp/lib/tasks/.gitkeep +0 -0
  67. data/spec/dummyapp/lib/tasks/cucumber.rake +65 -0
  68. data/spec/dummyapp/public/404.html +26 -0
  69. data/spec/dummyapp/public/422.html +26 -0
  70. data/spec/dummyapp/public/500.html +25 -0
  71. data/spec/dummyapp/public/favicon.ico +0 -0
  72. data/spec/dummyapp/public/humans.txt +20 -0
  73. data/spec/dummyapp/public/robots.txt +5 -0
  74. data/spec/dummyapp/script/cucumber +10 -0
  75. data/spec/dummyapp/script/rails +6 -0
  76. data/spec/dummyapp/vendor/assets/javascripts/.gitkeep +0 -0
  77. data/spec/dummyapp/vendor/assets/stylesheets/.gitkeep +0 -0
  78. data/spec/dummyapp/vendor/plugins/.gitkeep +0 -0
  79. data/spec/ratchetio_spec.rb +233 -1
  80. data/spec/spec_helper.rb +36 -0
  81. data/spec/support/devise.rb +3 -0
  82. metadata +350 -3
@@ -0,0 +1,37 @@
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 vendor/assets/stylesheets of plugins, if any, 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 top of the
9
+ * compiled file, but it's generally better to create a new file per style scope.
10
+ *
11
+ *= require_self
12
+ *= require_tree .
13
+ */
14
+ .brand {
15
+ float: left;
16
+ padding-right: 8px;
17
+ }
18
+ ul.nav {
19
+ list-style: none;
20
+ margin: 0 0 2em;
21
+ padding: 0;
22
+ }
23
+ ul.nav li {
24
+ display: inline;
25
+ }
26
+ #flash_notice, #flash_alert {
27
+ padding: 5px 8px;
28
+ margin: 10px 0;
29
+ }
30
+ #flash_notice {
31
+ background-color: #CFC;
32
+ border: solid 1px #6C6;
33
+ }
34
+ #flash_alert {
35
+ background-color: #FCC;
36
+ border: solid 1px #C66;
37
+ }
@@ -0,0 +1,3 @@
1
+ // Place all the styles related to the home controller here.
2
+ // They will automatically be included in application.css.
3
+ // You can use Sass (SCSS) here: http://sass-lang.com/
@@ -0,0 +1,3 @@
1
+ class ApplicationController < ActionController::Base
2
+ protect_from_forgery
3
+ end
@@ -0,0 +1,21 @@
1
+ class HomeController < ApplicationController
2
+ def index
3
+ @users = User.all
4
+
5
+ Ratchetio.report_message("Test message from controller with no data", "debug")
6
+ Ratchetio.report_message("Test message from controller with extra data", "debug",
7
+ :foo => "bar", :num_users => @users.length)
8
+ end
9
+
10
+ def report_exception
11
+ begin
12
+ foo = bar
13
+ rescue => e
14
+ Ratchetio.report_exception(e, ratchetio_request_data, ratchetio_person_data)
15
+ end
16
+ end
17
+
18
+ def cause_exception
19
+ foo = bar
20
+ end
21
+ end
@@ -0,0 +1,12 @@
1
+ class UsersController < ApplicationController
2
+ before_filter :authenticate_user!
3
+
4
+ def index
5
+ @users = User.all
6
+ end
7
+
8
+ def show
9
+ @user = User.find(params[:id])
10
+ end
11
+
12
+ end
@@ -0,0 +1,2 @@
1
+ module ApplicationHelper
2
+ end
@@ -0,0 +1,2 @@
1
+ module HomeHelper
2
+ end
File without changes
File without changes
@@ -0,0 +1,11 @@
1
+ class User < ActiveRecord::Base
2
+ # Include default devise modules. Others available are:
3
+ # :token_authenticatable, :confirmable,
4
+ # :lockable, :timeoutable and :omniauthable
5
+ devise :database_authenticatable, :registerable,
6
+ :recoverable, :rememberable, :trackable, :validatable
7
+
8
+ # Setup accessible (or protected) attributes for your model
9
+ attr_accessible :name, :email, :password, :password_confirmation, :remember_me
10
+
11
+ end
@@ -0,0 +1,27 @@
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
+ <p><%= f.label :name %><br />
6
+ <%= f.text_field :name %></p>
7
+
8
+ <div><%= f.label :email %><br />
9
+ <%= f.email_field :email %></div>
10
+
11
+ <div><%= f.label :password %> <i>(leave blank if you don't want to change it)</i><br />
12
+ <%= f.password_field :password, :autocomplete => "off" %></div>
13
+
14
+ <div><%= f.label :password_confirmation %><br />
15
+ <%= f.password_field :password_confirmation %></div>
16
+
17
+ <div><%= f.label :current_password %> <i>(we need your current password to confirm your changes)</i><br />
18
+ <%= f.password_field :current_password %></div>
19
+
20
+ <div><%= f.submit "Update" %></div>
21
+ <% end %>
22
+
23
+ <h3>Cancel my account</h3>
24
+
25
+ <p>Unhappy? <%= link_to "Cancel my account", registration_path(resource_name), :data => { :confirm => "Are you sure?" }, :method => :delete %>.</p>
26
+
27
+ <%= link_to "Back", :back %>
@@ -0,0 +1,20 @@
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
+ <p><%= f.label :name %><br />
6
+ <%= f.text_field :name %></p>
7
+
8
+ <div><%= f.label :email %><br />
9
+ <%= f.email_field :email %></div>
10
+
11
+ <div><%= f.label :password %><br />
12
+ <%= f.password_field :password %></div>
13
+
14
+ <div><%= f.label :password_confirmation %><br />
15
+ <%= f.password_field :password_confirmation %></div>
16
+
17
+ <div><%= f.submit "Sign up" %></div>
18
+ <% end %>
19
+
20
+ <%= render "devise/shared/links" %>
@@ -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 @@
1
+ This page won't be reached, since the controller method will raise a NameError.
@@ -0,0 +1,4 @@
1
+ <h3>Home</h3>
2
+ <% @users.each do |user| %>
3
+ <p>User: <%=link_to user.name, user %></p>
4
+ <% end %>
@@ -0,0 +1 @@
1
+ Reported an exception.
@@ -0,0 +1,5 @@
1
+ <% flash.each do |name, msg| %>
2
+ <% if msg.is_a?(String) %>
3
+ <%= content_tag :div, msg, :id => "flash_#{name}" %>
4
+ <% end %>
5
+ <% end %>
@@ -0,0 +1,21 @@
1
+ <%= link_to "Dummyapp", root_path, :class => 'brand' %>
2
+ <ul class="nav">
3
+ <% if user_signed_in? %>
4
+ <li>
5
+ <%= link_to 'Logout', destroy_user_session_path, :method=>'delete' %>
6
+ </li>
7
+ <% else %>
8
+ <li>
9
+ <%= link_to 'Login', new_user_session_path %>
10
+ </li>
11
+ <% end %>
12
+ <% if user_signed_in? %>
13
+ <li>
14
+ <%= link_to 'Edit account', edit_user_registration_path %>
15
+ </li>
16
+ <% else %>
17
+ <li>
18
+ <%= link_to 'Sign up', new_user_registration_path %>
19
+ </li>
20
+ <% end %>
21
+ </ul>
@@ -0,0 +1,25 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
5
+ <title><%= content_for?(:title) ? yield(:title) : "Dummyapp" %></title>
6
+ <meta name="description" content="<%= content_for?(:description) ? yield(:description) : "Dummyapp" %>">
7
+ <%= stylesheet_link_tag "application", :media => "all" %>
8
+ <%= javascript_include_tag "application" %>
9
+ <%= csrf_meta_tags %>
10
+ <%= yield(:head) %>
11
+ </head>
12
+ <body class="<%= controller_name %> <%= action_name %>">
13
+ <div id="container" class="container">
14
+ <header>
15
+ <%= render 'layouts/navigation' %>
16
+ <%= render 'layouts/messages' %>
17
+ </header>
18
+ <div id="main" role="main">
19
+ <%= yield %>
20
+ </div>
21
+ <footer>
22
+ </footer>
23
+ </div> <!--! end of #container -->
24
+ </body>
25
+ </html>
@@ -0,0 +1,8 @@
1
+ <h3>Users</h3>
2
+ <ul class="users">
3
+ <% @users.each do |user| %>
4
+ <li>
5
+ <%= link_to user.name, user %> signed up <%= user.created_at.to_date %>
6
+ </li>
7
+ <% end %>
8
+ </ul>
@@ -0,0 +1,3 @@
1
+ <h3>User</h3>
2
+ <p>User: <%= @user.name %></p>
3
+ <p>Email: <%= @user.email if @user.email %></p>
@@ -0,0 +1,76 @@
1
+ require File.expand_path('../boot', __FILE__)
2
+
3
+ require 'rails/all'
4
+
5
+ if defined?(Bundler)
6
+ # If you precompile assets before deploying to production, use this line
7
+ #Bundler.require(*Rails.groups(:assets => %w(development test)))
8
+ # If you want your assets lazily compiled in production, use this line
9
+ # Bundler.require(:default, :assets, Rails.env)
10
+ end
11
+
12
+ module Dummyapp
13
+ class Application < Rails::Application
14
+
15
+ # don't generate RSpec tests for views and helpers
16
+ config.generators do |g|
17
+
18
+ g.test_framework :rspec, fixture: true
19
+ g.fixture_replacement :factory_girl
20
+
21
+
22
+ g.view_specs false
23
+ g.helper_specs false
24
+ end
25
+
26
+ # Settings in config/environments/* take precedence over those specified here.
27
+ # Application configuration should go into files in config/initializers
28
+ # -- all .rb files in that directory are automatically loaded.
29
+
30
+ # Custom directories with classes and modules you want to be autoloadable.
31
+ # config.autoload_paths += %W(#{config.root}/extras)
32
+ config.autoload_paths += %W(#{config.root}/lib)
33
+
34
+
35
+ # Only load the plugins named here, in the order given (default is alphabetical).
36
+ # :all can be used as a placeholder for all plugins not explicitly named.
37
+ # config.plugins = [ :exception_notification, :ssl_requirement, :all ]
38
+
39
+ # Activate observers that should always be running.
40
+ # config.active_record.observers = :cacher, :garbage_collector, :forum_observer
41
+
42
+ # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
43
+ # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
44
+ # config.time_zone = 'Central Time (US & Canada)'
45
+
46
+ # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
47
+ # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
48
+ # config.i18n.default_locale = :de
49
+
50
+ # Configure the default encoding used in templates for Ruby 1.9.
51
+ config.encoding = "utf-8"
52
+
53
+ # Configure sensitive parameters which will be filtered from the log file.
54
+ config.filter_parameters += [:password, :password_confirmation]
55
+
56
+ # Enable escaping HTML in JSON.
57
+ config.active_support.escape_html_entities_in_json = true
58
+
59
+ # Use SQL instead of Active Record's schema dumper when creating the database.
60
+ # This is necessary if your schema can't be completely dumped by the schema dumper,
61
+ # like if you have constraints or database-specific column types
62
+ # config.active_record.schema_format = :sql
63
+
64
+ # Enforce whitelist mode for mass assignment.
65
+ # This will create an empty whitelist of attributes available for mass-assignment for all models
66
+ # in your app. As such, your models will need to explicitly whitelist or blacklist accessible
67
+ # parameters by using an attr_accessible or attr_protected declaration.
68
+ config.active_record.whitelist_attributes = true
69
+
70
+ # Enable the asset pipeline
71
+ config.assets.enabled = true
72
+
73
+ # Version of your assets, change this if you want to expire all your assets
74
+ config.assets.version = '1.0'
75
+ end
76
+ end
@@ -0,0 +1,6 @@
1
+ require 'rubygems'
2
+
3
+ # Set up gems listed in the Gemfile.
4
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
5
+
6
+ require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE'])
@@ -0,0 +1,8 @@
1
+ <%
2
+ rerun = File.file?('rerun.txt') ? IO.read('rerun.txt') : ""
3
+ rerun_opts = rerun.to_s.strip.empty? ? "--format #{ENV['CUCUMBER_FORMAT'] || 'progress'} features" : "--format #{ENV['CUCUMBER_FORMAT'] || 'pretty'} #{rerun}"
4
+ std_opts = "-r features/support/ -r features/step_definitions --format #{ENV['CUCUMBER_FORMAT'] || 'pretty'} --strict --tags ~@wip"
5
+ %>
6
+ default: <%= std_opts %> features
7
+ wip: --tags @wip:3 --wip features
8
+ rerun: <%= rerun_opts %> --format rerun --out rerun.txt --strict --tags ~@wip
@@ -0,0 +1,5 @@
1
+ # Load the rails application
2
+ require File.expand_path('../application', __FILE__)
3
+
4
+ # Initialize the rails application
5
+ Dummyapp::Application.initialize!
@@ -0,0 +1,54 @@
1
+ Dummyapp::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
+ # ActionMailer Config
17
+ config.action_mailer.default_url_options = { :host => 'localhost:3000' }
18
+ config.action_mailer.delivery_method = :smtp
19
+ # change to true to allow email to be sent during development
20
+ config.action_mailer.perform_deliveries = false
21
+ config.action_mailer.raise_delivery_errors = true
22
+ config.action_mailer.default :charset => "utf-8"
23
+
24
+ config.action_mailer.smtp_settings = {
25
+ address: "smtp.gmail.com",
26
+ port: 587,
27
+ domain: "example.com",
28
+ authentication: "plain",
29
+ enable_starttls_auto: true,
30
+ user_name: ENV["GMAIL_USERNAME"],
31
+ password: ENV["GMAIL_PASSWORD"]
32
+ }
33
+
34
+
35
+
36
+ # Print deprecation notices to the Rails logger
37
+ config.active_support.deprecation = :log
38
+
39
+ # Only use best-standards-support built into browsers
40
+ config.action_dispatch.best_standards_support = :builtin
41
+
42
+ # Raise exception on mass assignment protection for Active Record models
43
+ config.active_record.mass_assignment_sanitizer = :strict
44
+
45
+ # Log the query plan for queries taking more than this (works
46
+ # with SQLite, MySQL, and PostgreSQL)
47
+ config.active_record.auto_explain_threshold_in_seconds = 0.5
48
+
49
+ # Do not compress assets
50
+ config.assets.compress = false
51
+
52
+ # Expands the lines which load the assets
53
+ config.assets.debug = true
54
+ end
@@ -0,0 +1,87 @@
1
+ Dummyapp::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 nil and saved in location specified by config.assets.prefix
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
+ config.action_mailer.default_url_options = { :host => 'example.com' }
65
+ # ActionMailer Config
66
+ # Setup for production - deliveries, no errors raised
67
+ config.action_mailer.delivery_method = :smtp
68
+ config.action_mailer.perform_deliveries = true
69
+ config.action_mailer.raise_delivery_errors = false
70
+ config.action_mailer.default :charset => "utf-8"
71
+
72
+ config.action_mailer.smtp_settings = {
73
+ address: "smtp.gmail.com",
74
+ port: 587,
75
+ domain: "example.com",
76
+ authentication: "plain",
77
+ enable_starttls_auto: true,
78
+ user_name: ENV["GMAIL_USERNAME"],
79
+ password: ENV["GMAIL_PASSWORD"]
80
+ }
81
+
82
+
83
+
84
+ # Log the query plan for queries taking more than this (works
85
+ # with SQLite, MySQL, and PostgreSQL)
86
+ # config.active_record.auto_explain_threshold_in_seconds = 0.5
87
+ end
@@ -0,0 +1,41 @@
1
+ Dummyapp::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
+
32
+ # Raise exception on mass assignment protection for Active Record models
33
+ config.active_record.mass_assignment_sanitizer = :strict
34
+
35
+ # Print deprecation notices to the stderr
36
+ config.active_support.deprecation = :stderr
37
+
38
+ # ActionMailer Config
39
+ config.action_mailer.default_url_options = { :host => 'example.com' }
40
+
41
+ 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!