routespec 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (177) hide show
  1. data/README.txt +66 -0
  2. data/Rakefile +26 -0
  3. data/bin/routespec +29 -0
  4. data/lib/routespec.rb +22 -0
  5. data/lib/routespec/builder.rb +111 -0
  6. data/lib/routespec/dyr.rb +50 -0
  7. data/lib/routespec/fyle.rb +72 -0
  8. data/lib/routespec/parser.rb +143 -0
  9. data/lib/routespec/railtie.rb +7 -0
  10. data/lib/routespec/routespec/requests/.gitkeep +0 -0
  11. data/lib/routespec/routespec/support/.gitkeep +0 -0
  12. data/lib/routespec/routespec/templates/default_spec.erb +24 -0
  13. data/lib/routespec/tasks.rb +18 -0
  14. data/lib/routespec/tasks/routespec.rake +22 -0
  15. data/lib/routespec/template_vars.rb +7 -0
  16. data/lib/routespec/version.rb +3 -0
  17. data/test/files/awesome.yml +1 -0
  18. data/test/files/response_code_vcr_spec.erb +24 -0
  19. data/test/files/routes.txt +12 -0
  20. data/test/files/routes.yml +193 -0
  21. data/test/files/routes_hash.rb +159 -0
  22. data/test/files/routes_hash_2.rb +153 -0
  23. data/test/files/routes_hash_3.rb +1 -0
  24. data/test/files/tasks_routes.txt +21 -0
  25. data/test/files/template_spec.erb +13 -0
  26. data/test/files/unclean.txt +11 -0
  27. data/test/rails311/Gemfile +4 -0
  28. data/test/rails311/Gemfile.lock +90 -0
  29. data/test/rails311/README +261 -0
  30. data/test/rails311/Rakefile +7 -0
  31. data/test/rails311/app/assets/images/rails.png +0 -0
  32. data/test/rails311/app/assets/javascripts/application.js +9 -0
  33. data/test/rails311/app/assets/javascripts/beers.js +2 -0
  34. data/test/rails311/app/assets/javascripts/chips.js +2 -0
  35. data/test/rails311/app/assets/javascripts/sports.js +2 -0
  36. data/test/rails311/app/assets/stylesheets/application.css +7 -0
  37. data/test/rails311/app/assets/stylesheets/beers.css +4 -0
  38. data/test/rails311/app/assets/stylesheets/chips.css +4 -0
  39. data/test/rails311/app/assets/stylesheets/scaffold.css +56 -0
  40. data/test/rails311/app/assets/stylesheets/sports.css +4 -0
  41. data/test/rails311/app/controllers/application_controller.rb +3 -0
  42. data/test/rails311/app/controllers/beers_controller.rb +83 -0
  43. data/test/rails311/app/controllers/chips_controller.rb +83 -0
  44. data/test/rails311/app/controllers/sports_controller.rb +83 -0
  45. data/test/rails311/app/helpers/application_helper.rb +2 -0
  46. data/test/rails311/app/helpers/beers_helper.rb +2 -0
  47. data/test/rails311/app/helpers/chips_helper.rb +2 -0
  48. data/test/rails311/app/helpers/sports_helper.rb +2 -0
  49. data/test/rails311/app/models/beer.rb +2 -0
  50. data/test/rails311/app/models/chip.rb +2 -0
  51. data/test/rails311/app/models/sport.rb +2 -0
  52. data/test/rails311/app/views/beers/_form.html.erb +17 -0
  53. data/test/rails311/app/views/beers/edit.html.erb +6 -0
  54. data/test/rails311/app/views/beers/index.html.erb +21 -0
  55. data/test/rails311/app/views/beers/new.html.erb +5 -0
  56. data/test/rails311/app/views/beers/show.html.erb +5 -0
  57. data/test/rails311/app/views/chips/_form.html.erb +17 -0
  58. data/test/rails311/app/views/chips/edit.html.erb +6 -0
  59. data/test/rails311/app/views/chips/index.html.erb +21 -0
  60. data/test/rails311/app/views/chips/new.html.erb +5 -0
  61. data/test/rails311/app/views/chips/show.html.erb +5 -0
  62. data/test/rails311/app/views/layouts/application.html.erb +14 -0
  63. data/test/rails311/app/views/sports/_form.html.erb +17 -0
  64. data/test/rails311/app/views/sports/edit.html.erb +6 -0
  65. data/test/rails311/app/views/sports/index.html.erb +21 -0
  66. data/test/rails311/app/views/sports/new.html.erb +5 -0
  67. data/test/rails311/app/views/sports/show.html.erb +5 -0
  68. data/test/rails311/config.ru +4 -0
  69. data/test/rails311/config/application.rb +48 -0
  70. data/test/rails311/config/boot.rb +6 -0
  71. data/test/rails311/config/database.yml +25 -0
  72. data/test/rails311/config/environment.rb +5 -0
  73. data/test/rails311/config/environments/development.rb +30 -0
  74. data/test/rails311/config/environments/production.rb +60 -0
  75. data/test/rails311/config/environments/test.rb +39 -0
  76. data/test/rails311/config/initializers/backtrace_silencers.rb +7 -0
  77. data/test/rails311/config/initializers/inflections.rb +10 -0
  78. data/test/rails311/config/initializers/mime_types.rb +5 -0
  79. data/test/rails311/config/initializers/secret_token.rb +7 -0
  80. data/test/rails311/config/initializers/session_store.rb +8 -0
  81. data/test/rails311/config/initializers/wrap_parameters.rb +14 -0
  82. data/test/rails311/config/locales/en.yml +5 -0
  83. data/test/rails311/config/routes.rb +64 -0
  84. data/test/rails311/db/development.sqlite3 +0 -0
  85. data/test/rails311/db/migrate/20111227222038_create_beers.rb +8 -0
  86. data/test/rails311/db/migrate/20111227222056_create_chips.rb +8 -0
  87. data/test/rails311/db/migrate/20111227222113_create_sports.rb +8 -0
  88. data/test/rails311/db/schema.rb +31 -0
  89. data/test/rails311/db/seeds.rb +7 -0
  90. data/test/rails311/db/test.sqlite3 +0 -0
  91. data/test/rails311/doc/README_FOR_APP +2 -0
  92. data/test/rails311/log/development.log +28 -0
  93. data/test/rails311/log/test.log +0 -0
  94. data/test/rails311/public/404.html +26 -0
  95. data/test/rails311/public/422.html +26 -0
  96. data/test/rails311/public/500.html +26 -0
  97. data/test/rails311/public/favicon.ico +0 -0
  98. data/test/rails311/public/index.html +241 -0
  99. data/test/rails311/public/robots.txt +5 -0
  100. data/test/rails311/script/rails +6 -0
  101. data/test/rails311/spec/routespec/requests/beers/beers_spec.rb +74 -0
  102. data/test/rails311/spec/routespec/requests/chips/chips_spec.rb +74 -0
  103. data/test/rails311/spec/routespec/requests/sports/sports_spec.rb +74 -0
  104. data/test/rails311/spec/routespec/support/routes.txt +21 -0
  105. data/test/rails311/spec/routespec/support/routes.yml +322 -0
  106. data/test/rails311/spec/routespec/templates/default_spec.erb +24 -0
  107. data/test/rails311/test/fixtures/beers.yml +11 -0
  108. data/test/rails311/test/fixtures/chips.yml +11 -0
  109. data/test/rails311/test/fixtures/sports.yml +11 -0
  110. data/test/rails311/test/functional/beers_controller_test.rb +49 -0
  111. data/test/rails311/test/functional/chips_controller_test.rb +49 -0
  112. data/test/rails311/test/functional/sports_controller_test.rb +49 -0
  113. data/test/rails311/test/performance/browsing_test.rb +12 -0
  114. data/test/rails311/test/test_helper.rb +13 -0
  115. data/test/rails311/test/unit/beer_test.rb +7 -0
  116. data/test/rails311/test/unit/chip_test.rb +7 -0
  117. data/test/rails311/test/unit/helpers/beers_helper_test.rb +4 -0
  118. data/test/rails311/test/unit/helpers/chips_helper_test.rb +4 -0
  119. data/test/rails311/test/unit/helpers/sports_helper_test.rb +4 -0
  120. data/test/rails311/test/unit/sport_test.rb +7 -0
  121. data/test/rails311/vendor/cache/actionmailer-3.1.1.gem +0 -0
  122. data/test/rails311/vendor/cache/actionpack-3.1.1.gem +0 -0
  123. data/test/rails311/vendor/cache/activemodel-3.1.1.gem +0 -0
  124. data/test/rails311/vendor/cache/activerecord-3.1.1.gem +0 -0
  125. data/test/rails311/vendor/cache/activeresource-3.1.1.gem +0 -0
  126. data/test/rails311/vendor/cache/activesupport-3.1.1.gem +0 -0
  127. data/test/rails311/vendor/cache/arel-2.2.1.gem +0 -0
  128. data/test/rails311/vendor/cache/builder-3.0.0.gem +0 -0
  129. data/test/rails311/vendor/cache/erubis-2.7.0.gem +0 -0
  130. data/test/rails311/vendor/cache/hike-1.2.1.gem +0 -0
  131. data/test/rails311/vendor/cache/i18n-0.6.0.gem +0 -0
  132. data/test/rails311/vendor/cache/json-1.6.4.gem +0 -0
  133. data/test/rails311/vendor/cache/mail-2.3.0.gem +0 -0
  134. data/test/rails311/vendor/cache/mime-types-1.17.2.gem +0 -0
  135. data/test/rails311/vendor/cache/multi_json-1.0.4.gem +0 -0
  136. data/test/rails311/vendor/cache/polyglot-0.3.3.gem +0 -0
  137. data/test/rails311/vendor/cache/rack-1.3.5.gem +0 -0
  138. data/test/rails311/vendor/cache/rack-cache-1.1.gem +0 -0
  139. data/test/rails311/vendor/cache/rack-mount-0.8.3.gem +0 -0
  140. data/test/rails311/vendor/cache/rack-ssl-1.3.2.gem +0 -0
  141. data/test/rails311/vendor/cache/rack-test-0.6.1.gem +0 -0
  142. data/test/rails311/vendor/cache/rails-3.1.1.gem +0 -0
  143. data/test/rails311/vendor/cache/railties-3.1.1.gem +0 -0
  144. data/test/rails311/vendor/cache/rake-0.9.2.2.gem +0 -0
  145. data/test/rails311/vendor/cache/rdoc-3.12.gem +0 -0
  146. data/test/rails311/vendor/cache/sprockets-2.0.3.gem +0 -0
  147. data/test/rails311/vendor/cache/sqlite3-1.3.5.gem +0 -0
  148. data/test/rails311/vendor/cache/thor-0.14.6.gem +0 -0
  149. data/test/rails311/vendor/cache/tilt-1.3.3.gem +0 -0
  150. data/test/rails311/vendor/cache/treetop-1.4.10.gem +0 -0
  151. data/test/rails311/vendor/cache/tzinfo-0.3.31.gem +0 -0
  152. data/test/sandbox/awsome.txt +1 -0
  153. data/test/sandbox/cerveja/muito_legal/cool/cool_spec.rb +1 -0
  154. data/test/sandbox/cerveja/rad/rad_spec.rb +1 -0
  155. data/test/sandbox/cool.txt +4 -0
  156. data/test/sandbox/rails_root/routespec/templates/default_spec.erb +24 -0
  157. data/test/sandbox/requests/dynamic/dynamic_spec.rb +17 -0
  158. data/test/sandbox/requests/errors/errors_spec.rb +36 -0
  159. data/test/sandbox/requests/info_panel/info_panel_spec.rb +16 -0
  160. data/test/sandbox/requests/legacy/legacy_spec.rb +26 -0
  161. data/test/sandbox/requests2/dynamic/dynamic_spec.rb +17 -0
  162. data/test/sandbox/requests2/errors/errors_spec.rb +36 -0
  163. data/test/sandbox/requests2/info_panel/info_panel_spec.rb +16 -0
  164. data/test/sandbox/requests2/legacy/legacy_spec.rb +26 -0
  165. data/test/sandbox/routes.txt +21 -0
  166. data/test/sandbox/routes.yml +193 -0
  167. data/test/sandbox/seu_jorge.yml +3 -0
  168. data/test/test_builder.rb +118 -0
  169. data/test/test_config.rb +5 -0
  170. data/test/test_dyr.rb +56 -0
  171. data/test/test_fyle.rb +59 -0
  172. data/test/test_parser.rb +84 -0
  173. data/test/test_rails311.rb +15 -0
  174. data/test/test_routespec.rb +8 -0
  175. data/test/test_tasks.rb +26 -0
  176. data/test/test_template_vars.rb +18 -0
  177. metadata +382 -0
@@ -0,0 +1,5 @@
1
+ <h1>New beer</h1>
2
+
3
+ <%= render 'form' %>
4
+
5
+ <%= link_to 'Back', beers_path %>
@@ -0,0 +1,5 @@
1
+ <p id="notice"><%= notice %></p>
2
+
3
+
4
+ <%= link_to 'Edit', edit_beer_path(@beer) %> |
5
+ <%= link_to 'Back', beers_path %>
@@ -0,0 +1,17 @@
1
+ <%= form_for(@chip) do |f| %>
2
+ <% if @chip.errors.any? %>
3
+ <div id="error_explanation">
4
+ <h2><%= pluralize(@chip.errors.count, "error") %> prohibited this chip from being saved:</h2>
5
+
6
+ <ul>
7
+ <% @chip.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 chip</h1>
2
+
3
+ <%= render 'form' %>
4
+
5
+ <%= link_to 'Show', @chip %> |
6
+ <%= link_to 'Back', chips_path %>
@@ -0,0 +1,21 @@
1
+ <h1>Listing chips</h1>
2
+
3
+ <table>
4
+ <tr>
5
+ <th></th>
6
+ <th></th>
7
+ <th></th>
8
+ </tr>
9
+
10
+ <% @chips.each do |chip| %>
11
+ <tr>
12
+ <td><%= link_to 'Show', chip %></td>
13
+ <td><%= link_to 'Edit', edit_chip_path(chip) %></td>
14
+ <td><%= link_to 'Destroy', chip, confirm: 'Are you sure?', method: :delete %></td>
15
+ </tr>
16
+ <% end %>
17
+ </table>
18
+
19
+ <br />
20
+
21
+ <%= link_to 'New Chip', new_chip_path %>
@@ -0,0 +1,5 @@
1
+ <h1>New chip</h1>
2
+
3
+ <%= render 'form' %>
4
+
5
+ <%= link_to 'Back', chips_path %>
@@ -0,0 +1,5 @@
1
+ <p id="notice"><%= notice %></p>
2
+
3
+
4
+ <%= link_to 'Edit', edit_chip_path(@chip) %> |
5
+ <%= link_to 'Back', chips_path %>
@@ -0,0 +1,14 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>Rails311</title>
5
+ <%= stylesheet_link_tag "application" %>
6
+ <%= javascript_include_tag "application" %>
7
+ <%= csrf_meta_tags %>
8
+ </head>
9
+ <body>
10
+
11
+ <%= yield %>
12
+
13
+ </body>
14
+ </html>
@@ -0,0 +1,17 @@
1
+ <%= form_for(@sport) do |f| %>
2
+ <% if @sport.errors.any? %>
3
+ <div id="error_explanation">
4
+ <h2><%= pluralize(@sport.errors.count, "error") %> prohibited this sport from being saved:</h2>
5
+
6
+ <ul>
7
+ <% @sport.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 sport</h1>
2
+
3
+ <%= render 'form' %>
4
+
5
+ <%= link_to 'Show', @sport %> |
6
+ <%= link_to 'Back', sports_path %>
@@ -0,0 +1,21 @@
1
+ <h1>Listing sports</h1>
2
+
3
+ <table>
4
+ <tr>
5
+ <th></th>
6
+ <th></th>
7
+ <th></th>
8
+ </tr>
9
+
10
+ <% @sports.each do |sport| %>
11
+ <tr>
12
+ <td><%= link_to 'Show', sport %></td>
13
+ <td><%= link_to 'Edit', edit_sport_path(sport) %></td>
14
+ <td><%= link_to 'Destroy', sport, confirm: 'Are you sure?', method: :delete %></td>
15
+ </tr>
16
+ <% end %>
17
+ </table>
18
+
19
+ <br />
20
+
21
+ <%= link_to 'New Sport', new_sport_path %>
@@ -0,0 +1,5 @@
1
+ <h1>New sport</h1>
2
+
3
+ <%= render 'form' %>
4
+
5
+ <%= link_to 'Back', sports_path %>
@@ -0,0 +1,5 @@
1
+ <p id="notice"><%= notice %></p>
2
+
3
+
4
+ <%= link_to 'Edit', edit_sport_path(@sport) %> |
5
+ <%= link_to 'Back', sports_path %>
@@ -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 Rails311::Application
@@ -0,0 +1,48 @@
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 Rails311
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
+ # Enable the asset pipeline
43
+ config.assets.enabled = true
44
+
45
+ # Version of your assets, change this if you want to expire all your assets
46
+ config.assets.version = '1.0'
47
+ end
48
+ 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,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
+ Rails311::Application.initialize!
@@ -0,0 +1,30 @@
1
+ Rails311::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
+ # Do not compress assets
26
+ config.assets.compress = false
27
+
28
+ # Expands the lines which load the assets
29
+ config.assets.debug = true
30
+ end
@@ -0,0 +1,60 @@
1
+ Rails311::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
+ # Use a different logger for distributed setups
37
+ # config.logger = SyslogLogger.new
38
+
39
+ # Use a different cache store in production
40
+ # config.cache_store = :mem_cache_store
41
+
42
+ # Enable serving of images, stylesheets, and JavaScripts from an asset server
43
+ # config.action_controller.asset_host = "http://assets.example.com"
44
+
45
+ # Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added)
46
+ # config.assets.precompile += %w( search.js )
47
+
48
+ # Disable delivery errors, bad email addresses will be ignored
49
+ # config.action_mailer.raise_delivery_errors = false
50
+
51
+ # Enable threaded mode
52
+ # config.threadsafe!
53
+
54
+ # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
55
+ # the I18n.default_locale when a translation can not be found)
56
+ config.i18n.fallbacks = true
57
+
58
+ # Send deprecation notices to registered listeners
59
+ config.active_support.deprecation = :notify
60
+ end
@@ -0,0 +1,39 @@
1
+ Rails311::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
+ # Use SQL instead of Active Record's schema dumper when creating the test database.
33
+ # This is necessary if your schema can't be completely dumped by the schema dumper,
34
+ # like if you have constraints or database-specific column types
35
+ # config.active_record.schema_format = :sql
36
+
37
+ # Print deprecation notices to the stderr
38
+ config.active_support.deprecation = :stderr
39
+ 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!
@@ -0,0 +1,10 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Add new inflection rules using the following format
4
+ # (all these examples are active by default):
5
+ # ActiveSupport::Inflector.inflections do |inflect|
6
+ # inflect.plural /^(ox)$/i, '\1en'
7
+ # inflect.singular /^(ox)en/i, '\1'
8
+ # inflect.irregular 'person', 'people'
9
+ # inflect.uncountable %w( fish sheep )
10
+ # end
@@ -0,0 +1,5 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Add new mime types for use in respond_to blocks:
4
+ # Mime::Type.register "text/richtext", :rtf
5
+ # Mime::Type.register_alias "text/html", :iphone
@@ -0,0 +1,7 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Your secret key for verifying the integrity of signed cookies.
4
+ # If you change this key, all old signed cookies will become invalid!
5
+ # Make sure the secret is at least 30 characters and all random,
6
+ # no regular words or you'll be exposed to dictionary attacks.
7
+ Rails311::Application.config.secret_token = '52eca98e68db1c0bd90168feab60d3bf5c0f6c6286072e06840ccc489531c28ee67243c4b3872d31e4194dd33fb3f0687cf87f29af0be81324aca2aa63c4399a'
@@ -0,0 +1,8 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ Rails311::Application.config.session_store :cookie_store, key: '_rails311_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
+ # Rails311::Application.config.session_store :active_record_store
@@ -0,0 +1,14 @@
1
+ # Be sure to restart your server when you modify this file.
2
+ #
3
+ # This file contains settings for ActionController::ParamsWrapper which
4
+ # is enabled by default.
5
+
6
+ # Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
7
+ ActiveSupport.on_load(:action_controller) do
8
+ wrap_parameters format: [:json]
9
+ end
10
+
11
+ # Disable root element in JSON by default.
12
+ ActiveSupport.on_load(:active_record) do
13
+ self.include_root_in_json = false
14
+ end