qlive-rspec 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (132) hide show
  1. data/.gitignore +9 -0
  2. data/Gemfile +4 -0
  3. data/LICENSE +22 -0
  4. data/README.md +77 -0
  5. data/Rakefile +2 -0
  6. data/lib/qlive-rspec.rb +12 -0
  7. data/lib/qlive-rspec/version.rb +3 -0
  8. data/lib/qlive/matchers.rb +28 -0
  9. data/lib/qlive/rspec.rb +74 -0
  10. data/qlive-rspec.gemspec +24 -0
  11. data/spec/dummy/Gemfile +29 -0
  12. data/spec/dummy/README.md +19 -0
  13. data/spec/dummy/Rakefile +7 -0
  14. data/spec/dummy/app/assets/images/rails.png +0 -0
  15. data/spec/dummy/app/assets/javascripts/application.js +25 -0
  16. data/spec/dummy/app/assets/javascripts/backbone_on_rails_todo.js.coffee +11 -0
  17. data/spec/dummy/app/assets/javascripts/collections/todos.js.coffee +5 -0
  18. data/spec/dummy/app/assets/javascripts/models/todo.js.coffee +3 -0
  19. data/spec/dummy/app/assets/javascripts/routers/todo_app_router.js.coffee +14 -0
  20. data/spec/dummy/app/assets/javascripts/views/todo_app/todo_app.js.coffee +29 -0
  21. data/spec/dummy/app/assets/javascripts/views/todos/todo.js.coffee +12 -0
  22. data/spec/dummy/app/assets/stylesheets/application.css +13 -0
  23. data/spec/dummy/app/assets/stylesheets/todos.scss +45 -0
  24. data/spec/dummy/app/assets/templates/todo_list/index.jst.eco +11 -0
  25. data/spec/dummy/app/assets/templates/todos/index.jst.eco +1 -0
  26. data/spec/dummy/app/controllers/application_controller.rb +10 -0
  27. data/spec/dummy/app/controllers/todo_list_controller.rb +11 -0
  28. data/spec/dummy/app/controllers/todos_controller.rb +18 -0
  29. data/spec/dummy/app/helpers/application_helper.rb +2 -0
  30. data/spec/dummy/app/helpers/todos_helper.rb +2 -0
  31. data/spec/dummy/app/mailers/.gitkeep +0 -0
  32. data/spec/dummy/app/models/todo.rb +12 -0
  33. data/spec/dummy/app/models/todo_list.rb +9 -0
  34. data/spec/dummy/app/views/layouts/application.html.erb +19 -0
  35. data/spec/dummy/app/views/todo_list/index.html.erb +11 -0
  36. data/spec/dummy/app/views/todos/create.html.erb +2 -0
  37. data/spec/dummy/app/views/todos/index.html.erb +2 -0
  38. data/spec/dummy/app/views/todos/new.html.erb +2 -0
  39. data/spec/dummy/config.ru +4 -0
  40. data/spec/dummy/config/application.rb +59 -0
  41. data/spec/dummy/config/boot.rb +6 -0
  42. data/spec/dummy/config/database.yml +20 -0
  43. data/spec/dummy/config/environment.rb +5 -0
  44. data/spec/dummy/config/environments/development.rb +37 -0
  45. data/spec/dummy/config/environments/production.rb +67 -0
  46. data/spec/dummy/config/environments/test.rb +37 -0
  47. data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
  48. data/spec/dummy/config/initializers/inflections.rb +15 -0
  49. data/spec/dummy/config/initializers/mime_types.rb +5 -0
  50. data/spec/dummy/config/initializers/secret_token.rb +7 -0
  51. data/spec/dummy/config/initializers/session_store.rb +8 -0
  52. data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
  53. data/spec/dummy/config/locales/en.yml +5 -0
  54. data/spec/dummy/config/routes.rb +15 -0
  55. data/spec/dummy/db/development.sqlite3 +0 -0
  56. data/spec/dummy/db/migrate/20120317122010_create_todos.rb +14 -0
  57. data/spec/dummy/db/schema.rb +29 -0
  58. data/spec/dummy/db/seeds.rb +7 -0
  59. data/spec/dummy/db/test.sqlite3 +0 -0
  60. data/spec/dummy/doc/README_FOR_APP +2 -0
  61. data/spec/dummy/lib/assets/.gitkeep +0 -0
  62. data/spec/dummy/lib/tasks/.gitkeep +0 -0
  63. data/spec/dummy/log/.gitkeep +0 -0
  64. data/spec/dummy/log/development.log +7086 -0
  65. data/spec/dummy/log/test.log +460 -0
  66. data/spec/dummy/public/404.html +26 -0
  67. data/spec/dummy/public/422.html +26 -0
  68. data/spec/dummy/public/500.html +25 -0
  69. data/spec/dummy/public/favicon.ico +0 -0
  70. data/spec/dummy/public/robots.txt +5 -0
  71. data/spec/dummy/script/rails +6 -0
  72. data/spec/dummy/script/test +1 -0
  73. data/spec/dummy/spec/factories/todo_lists.rb +7 -0
  74. data/spec/dummy/spec/factories/todos.rb +14 -0
  75. data/spec/dummy/spec/qunits/.DS_Store +0 -0
  76. data/spec/dummy/spec/qunits/adding_todos/adding_todos_qlive.rb +13 -0
  77. data/spec/dummy/spec/qunits/adding_todos/ajax-creation.js +18 -0
  78. data/spec/dummy/spec/qunits/qunit_support/qlive_helper.rb +0 -0
  79. data/spec/dummy/spec/qunits/qunit_support/qunit-starter.js +6 -0
  80. data/spec/dummy/spec/qunits/qunit_support/wait-for.js +24 -0
  81. data/spec/dummy/tmp/cache/assets/C5B/9C0/sprockets%2Faa69c6a6967552862782c17a264616f0 +0 -0
  82. data/spec/dummy/tmp/cache/assets/C85/B80/sprockets%2F98af874023c7cc2924ae87e605711532 +0 -0
  83. data/spec/dummy/tmp/cache/assets/C9A/C40/sprockets%2F729f761526e6c21ed96511f7277fe982 +0 -0
  84. data/spec/dummy/tmp/cache/assets/C9F/9A0/sprockets%2F1db451c19d955625f00aa51437df3152 +0 -0
  85. data/spec/dummy/tmp/cache/assets/CA5/800/sprockets%2F353700484461b1229e7cfb7b7c0ce640 +0 -0
  86. data/spec/dummy/tmp/cache/assets/CAB/1F0/sprockets%2F5bc32b49750b54325270c34377ede81e +0 -0
  87. data/spec/dummy/tmp/cache/assets/CAF/6B0/sprockets%2F2b7b92f831e2b43c590ca91b62708395 +0 -0
  88. data/spec/dummy/tmp/cache/assets/CBB/2E0/sprockets%2F9f57f2f115170a931f96bdb689312b94 +0 -0
  89. data/spec/dummy/tmp/cache/assets/CC1/EC0/sprockets%2Fe6256cd8969bf71b9e18729e631072a2 +0 -0
  90. data/spec/dummy/tmp/cache/assets/CD4/C30/sprockets%2Fd166012e1da02d12697c2ee0f574f690 +0 -0
  91. data/spec/dummy/tmp/cache/assets/CD8/370/sprockets%2F357970feca3ac29060c1e3861e2c0953 +0 -0
  92. data/spec/dummy/tmp/cache/assets/CDC/F50/sprockets%2F614a5858458b9422d8e266fbaa6310ab +0 -0
  93. data/spec/dummy/tmp/cache/assets/CDF/CB0/sprockets%2Fd6f984ec9cf105b484172a66c00f0561 +0 -0
  94. data/spec/dummy/tmp/cache/assets/CFF/170/sprockets%2F4af4a5f916847c198f92a79e8f04287f +0 -0
  95. data/spec/dummy/tmp/cache/assets/D0D/830/sprockets%2F15213ba08baca38d909585e736bb9f44 +0 -0
  96. data/spec/dummy/tmp/cache/assets/D10/F10/sprockets%2F349a7d73940a1643fb3de693ca7cd244 +0 -0
  97. data/spec/dummy/tmp/cache/assets/D11/2F0/sprockets%2F36fc2e765d9cc09c50c0e55b1933a737 +0 -0
  98. data/spec/dummy/tmp/cache/assets/D26/620/sprockets%2F6926777d652a664ceb5aa28666efa7c9 +0 -0
  99. data/spec/dummy/tmp/cache/assets/D32/A10/sprockets%2F13fe41fee1fe35b49d145bcc06610705 +0 -0
  100. data/spec/dummy/tmp/cache/assets/D3E/F10/sprockets%2F75dd8ecd20427d22139517ae9f25ee2a +0 -0
  101. data/spec/dummy/tmp/cache/assets/D4E/1B0/sprockets%2Ff7cbd26ba1d28d48de824f0e94586655 +0 -0
  102. data/spec/dummy/tmp/cache/assets/D4E/F70/sprockets%2Fcf5cf57efa2c53a409b80285278e5f77 +0 -0
  103. data/spec/dummy/tmp/cache/assets/D52/090/sprockets%2F826a9bb15e4093dd94d248d9f90f9ed2 +0 -0
  104. data/spec/dummy/tmp/cache/assets/D53/7D0/sprockets%2F43c0246147f6192dfffbf8f68d793a6e +0 -0
  105. data/spec/dummy/tmp/cache/assets/D53/E30/sprockets%2Fffde997b0d35826e3175caa159968dc4 +0 -0
  106. data/spec/dummy/tmp/cache/assets/D5A/EA0/sprockets%2Fd771ace226fc8215a3572e0aa35bb0d6 +0 -0
  107. data/spec/dummy/tmp/cache/assets/D5B/1B0/sprockets%2F36c7e9792a69fd67c686a16e382b5ffa +0 -0
  108. data/spec/dummy/tmp/cache/assets/D68/7D0/sprockets%2Fde9b9f45d0b5fa19cf672371102a1f0f +0 -0
  109. data/spec/dummy/tmp/cache/assets/D6F/C80/sprockets%2F69d138071bef8c9a34324bfdf2fd530d +0 -0
  110. data/spec/dummy/tmp/cache/assets/D71/020/sprockets%2Fe303c90d58293dcd7eb29d633c9cb54a +0 -0
  111. data/spec/dummy/tmp/cache/assets/D76/C40/sprockets%2F5dc3f2334568fee3c23c086463fefa8c +0 -0
  112. data/spec/dummy/tmp/cache/assets/D82/AD0/sprockets%2F042cc68bc2ce132b356c704abfaf107a +0 -0
  113. data/spec/dummy/tmp/cache/assets/D89/0B0/sprockets%2F7c8dc9875c0c22e89fdc595cdd9605f2 +0 -0
  114. data/spec/dummy/tmp/cache/assets/D8E/A00/sprockets%2Ff89d78b78be9a45cf7e944a57c82b26c +0 -0
  115. data/spec/dummy/tmp/cache/assets/D90/690/sprockets%2Fce78782d3fc61622015a80c2acc6cdba +0 -0
  116. data/spec/dummy/tmp/cache/assets/D99/330/sprockets%2Fe2a2a8724fee0fb701e358ee266cda62 +0 -0
  117. data/spec/dummy/tmp/cache/assets/D99/B80/sprockets%2Fc608b81fe3a10ffee85e0b63e9ca9201 +0 -0
  118. data/spec/dummy/tmp/cache/assets/DB0/B80/sprockets%2F96f6192adc54bf98a98d6fa190ebb74b +0 -0
  119. data/spec/dummy/tmp/cache/assets/DC6/AD0/sprockets%2Fcfcccca451e28002deb96721d94e25ce +0 -0
  120. data/spec/dummy/tmp/cache/assets/DDC/400/sprockets%2Fcffd775d018f68ce5dba1ee0d951a994 +0 -0
  121. data/spec/dummy/tmp/cache/assets/DE6/CE0/sprockets%2F6fda7e975c6df54bffda6598f431e5d1 +0 -0
  122. data/spec/dummy/tmp/cache/assets/DFD/350/sprockets%2Fdbea6b4a1f0b88258c29c6836bcca6ed +0 -0
  123. data/spec/dummy/tmp/cache/assets/E04/890/sprockets%2F2f5173deea6c795b8fdde723bb4b63af +0 -0
  124. data/spec/dummy/tmp/cache/assets/E39/3B0/sprockets%2F9ae1c4c883d1dd6fc84cdbf1ff55d44f +0 -0
  125. data/spec/dummy/tmp/cache/sass/3a7aef2f892362e6596155ab72cedacbd9a1a7ed/todos.scssc +0 -0
  126. data/spec/dummy/tmp/cache/sass/3ac4a8f3985b4a79a98fc03388b5ded5e9bdc4aa/todos.scssc +0 -0
  127. data/spec/dummy/vendor/assets/javascripts/.gitkeep +0 -0
  128. data/spec/dummy/vendor/assets/stylesheets/.gitkeep +0 -0
  129. data/spec/dummy/vendor/plugins/.gitkeep +0 -0
  130. data/spec/qunits_spec.rb +7 -0
  131. data/spec/spec_helper.rb +14 -0
  132. metadata +365 -0
@@ -0,0 +1,13 @@
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
+ */
@@ -0,0 +1,45 @@
1
+ body {
2
+ background-color: #f7f7f7;
3
+ font-family: helvetica,sans-serif;
4
+ line-height: 1.4em;
5
+ color: #333;
6
+ }
7
+
8
+ ol, ul {
9
+ list-style: none;
10
+ }
11
+
12
+ #todoapp {
13
+ margin: 0 auto 40px;
14
+ background-color: white;
15
+ width: 800px;
16
+ padding: 10px;
17
+ }
18
+
19
+ #title h1 {
20
+ text-align: center;
21
+ }
22
+
23
+ #todo-list li {
24
+ padding: 12px 20px 11px 0;
25
+ position: relative;
26
+ font-size: 24px;
27
+ line-height: 1.1em;
28
+ border-bottom: 1px solid #CCC;
29
+ }
30
+
31
+ #create-todo {
32
+ position: relative;
33
+ margin-left: 60px;
34
+ }
35
+
36
+ #create-todo input {
37
+ width: 666px;
38
+ font-size: 24px;
39
+ font-family: inherit;
40
+ line-height: 1.4em;
41
+ border: 0;
42
+ outline: none;
43
+ padding: 6px;
44
+ border: 1px solid #999;
45
+ }
@@ -0,0 +1,11 @@
1
+
2
+ <form id="new-todo">
3
+ <input type="text" name="name" id="new-todo-content">
4
+ <input type="submit" value="Add">
5
+ </form>
6
+
7
+ <ul>
8
+ <% for todo in @todo_list.models: %>
9
+ <li><%= todo.get('content') %></li>
10
+ <% end %>
11
+ </ul>
@@ -0,0 +1 @@
1
+ <%= @todo.get('content') %>
@@ -0,0 +1,10 @@
1
+ class ApplicationController < ActionController::Base
2
+ protect_from_forgery
3
+
4
+ protected
5
+
6
+ def main_list
7
+ TodoList.first || TodoList.create!(:name => 'My ToDo List')
8
+ end
9
+
10
+ end
@@ -0,0 +1,11 @@
1
+ class TodoListController < ApplicationController
2
+
3
+ respond_to :html, :json
4
+
5
+ def index
6
+ @todo_list = main_list
7
+ respond_with(@todo_list.to_hash)
8
+ end
9
+
10
+
11
+ end
@@ -0,0 +1,18 @@
1
+ class TodosController < ApplicationController
2
+
3
+ respond_to :html, :json
4
+
5
+ def index
6
+ @todo_list = main_list
7
+ respond_with(@todo_list.to_hash)
8
+ end
9
+
10
+ def new
11
+ end
12
+
13
+ def create
14
+ @todo = main_list.todos.create!(
15
+ :content => params[:content]
16
+ )
17
+ end
18
+ end
@@ -0,0 +1,2 @@
1
+ module ApplicationHelper
2
+ end
@@ -0,0 +1,2 @@
1
+ module TodosHelper
2
+ end
File without changes
@@ -0,0 +1,12 @@
1
+ class Todo < ActiveRecord::Base
2
+
3
+ belongs_to :todo_list
4
+ attr_accessible :content, :due_date
5
+
6
+
7
+ def to_hash(options={})
8
+ serializable_hash(:only => [ :content ])
9
+ end
10
+
11
+
12
+ end
@@ -0,0 +1,9 @@
1
+ class TodoList < ActiveRecord::Base
2
+
3
+ has_many :todos
4
+
5
+ def to_hash(options={})
6
+ self.todos.map(&:to_hash)
7
+ end
8
+
9
+ end
@@ -0,0 +1,19 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>BackboneOnRailsTodo</title>
5
+ <%= stylesheet_link_tag "application", :media => "all" %>
6
+ <%= javascript_include_tag "application" %>
7
+ <%= csrf_meta_tags %>
8
+ </head>
9
+ <body>
10
+
11
+ <div id="title">
12
+ <h1>TodoList Dummy App</h1>
13
+ <h3>I didn't create this app. It was just the first <a href="https://github.com/mulderp/Backbone-on-Rails-todoDemo">rails/backbone demo</a> that I found.</h3>
14
+ </div>
15
+
16
+ <%= yield %>
17
+
18
+ </body>
19
+ </html>
@@ -0,0 +1,11 @@
1
+ <div id="todoapp">
2
+ <div id="create-todo">
3
+ <%= text_field_tag "new-todo", "new todo" %>
4
+ </div>
5
+
6
+ <div id="main">
7
+ <ul id="todo-list">
8
+ </ul>
9
+ </div>
10
+
11
+ </div>
@@ -0,0 +1,2 @@
1
+ <h1>Todos#create</h1>
2
+ <p>Find me in app/views/todos/create.html.erb</p>
@@ -0,0 +1,2 @@
1
+ <h1>Todos#index</h1>
2
+ <p>Find me in app/views/todos/index.html.erb</p>
@@ -0,0 +1,2 @@
1
+ <h1>Todos#new</h1>
2
+ <p>Find me in app/views/todos/new.html.erb</p>
@@ -0,0 +1,4 @@
1
+ # This file is used by Rack-based servers to start the application.
2
+
3
+ require ::File.expand_path('../config/environment', __FILE__)
4
+ run BackboneOnRailsTodo::Application
@@ -0,0 +1,59 @@
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 BackboneOnRailsTodo
13
+ class Application < Rails::Application
14
+ # Settings in config/environments/* take precedence over those specified here.
15
+ # Application configuration should go into files in config/initializers
16
+ # -- all .rb files in that directory are automatically loaded.
17
+
18
+ # Custom directories with classes and modules you want to be autoloadable.
19
+ # config.autoload_paths += %W(#{config.root}/extras)
20
+
21
+ # Only load the plugins named here, in the order given (default is alphabetical).
22
+ # :all can be used as a placeholder for all plugins not explicitly named.
23
+ # config.plugins = [ :exception_notification, :ssl_requirement, :all ]
24
+
25
+ # Activate observers that should always be running.
26
+ # config.active_record.observers = :cacher, :garbage_collector, :forum_observer
27
+
28
+ # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
29
+ # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
30
+ # config.time_zone = 'Central Time (US & Canada)'
31
+
32
+ # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
33
+ # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
34
+ # config.i18n.default_locale = :de
35
+
36
+ # Configure the default encoding used in templates for Ruby 1.9.
37
+ config.encoding = "utf-8"
38
+
39
+ # Configure sensitive parameters which will be filtered from the log file.
40
+ config.filter_parameters += [:password]
41
+
42
+ # Use SQL instead of Active Record's schema dumper when creating the database.
43
+ # This is necessary if your schema can't be completely dumped by the schema dumper,
44
+ # like if you have constraints or database-specific column types
45
+ # config.active_record.schema_format = :sql
46
+
47
+ # Enforce whitelist mode for mass assignment.
48
+ # This will create an empty whitelist of attributes available for mass-assignment for all models
49
+ # in your app. As such, your models will need to explicitly whitelist or blacklist accessible
50
+ # parameters by using an attr_accessible or attr_protected declaration.
51
+ # config.active_record.whitelist_attributes = true
52
+
53
+ # Enable the asset pipeline
54
+ config.assets.enabled = true
55
+
56
+ # Version of your assets, change this if you want to expire all your assets
57
+ config.assets.version = '1.0'
58
+ end
59
+ 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,20 @@
1
+ development:
2
+ adapter: sqlite3
3
+ database: db/development.sqlite3
4
+ pool: 5
5
+ timeout: 5000
6
+
7
+ # Warning: The database defined as "test" will be erased and
8
+ # re-generated from your development database when you run "rake".
9
+ # Do not set this db to the same as development or production.
10
+ test:
11
+ adapter: sqlite3
12
+ database: db/test.sqlite3
13
+ pool: 5
14
+ timeout: 5000
15
+
16
+ production:
17
+ adapter: sqlite3
18
+ database: db/production.sqlite3
19
+ pool: 5
20
+ 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
+ BackboneOnRailsTodo::Application.initialize!
@@ -0,0 +1,37 @@
1
+ BackboneOnRailsTodo::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
+ BackboneOnRailsTodo::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,37 @@
1
+ BackboneOnRailsTodo::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
+ end