aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test
Commit message (Collapse)AuthorAgeFilesLines
* Expose MiddlewareStack#unshift to environment configuration.Ben Pickles2013-10-091-0/+6
|
* Merge branch 'fix-ip-spoof-errors' of https://github.com/tamird/rails into ↵Andrew White2013-09-301-0/+10
|\ | | | | | | tamird-fix-ip-spoof-errors
| * make sure both headers are set before checking for ip spoofingTamir Duberstein2013-06-041-0/+10
| |
* | Only output Server logs in Developmentschneems2013-09-221-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Right now when you start a server via `rails s`, the logger gets extended so that it logs to the file system and also to stdout. This extension behavior is not "intelligent" and if the default logger is already set to output to stdout, then the contents will be received twice. To capture logs in accordance with http://www.12factor.net/logs some platforms require the logs to be sent to standard out. If a logger is set to stdout, and the server is started using `rails server` instead of another method (i.e. `thin start` etc.) then the app will produce double logs. This PR fixes the issue by only extending the logger to standard out in the development environment. So that in production you don't get double logs like this: ``` ActionView::Template::Error (wrong number of arguments (5 for 4)): 1: <% lang_index = 0 %> 2: <div class="row"> 3: <ul class="nav nav-tabs nav-stacked span2" data-tabs="tabs" id="repo-tabs"> 4: <% repos.group_by(&:language).each do |lang, repos| %> 5: <% unless lang == nil %> 6: <li><a href="#<%= "#{lang.parameterize}#{lang.hash}" %>" data-toggle="tab"><%= lang %></a></li> 7: <% end -%> app/views/shared/_repos.html.erb:4:in `_app_views_shared__repos_html_erb___1685450633638247395_70300668607000' app/views/pages/index.html.erb:13:in `_app_views_pages_index_html_erb__2084723628308867770_70300687584880' ActionView::Template::Error (wrong number of arguments (5 for 4)): 1: <% lang_index = 0 %> 2: <div class="row"> 3: <ul class="nav nav-tabs nav-stacked span2" data-tabs="tabs" id="repo-tabs"> 4: <% repos.group_by(&:language).each do |lang, repos| %> 5: <% unless lang == nil %> 6: <li><a href="#<%= "#{lang.parameterize}#{lang.hash}" %>" data-toggle="tab"><%= lang %></a></li> 7: <% end -%> app/views/shared/_repos.html.erb:4:in `_app_views_shared__repos_html_erb___1685450633638247395_70300668607000' app/views/pages/index.html.erb:13:in `_app_views_pages_index_html_erb__2084723628308867770_70300687584880' ``` ATP Railties. Opened against master in favor of #10999
* | Don't require using application_name before optionsPiotr Sarnacki2013-09-131-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | Before this commit options for `rails new` and `rails plugin new` had to be passed in a strict order, trying to execute a following command: rails new -J path/to/app resulted in an error. This commit fixes the situation and allows to pass path to app anywhere after `new`
* | Merge pull request #12216 from suginoy/a-anRafael Mendonça França2013-09-133-4/+4
|\ \ | | | | | | Fix typos: the indefinite articles(a -> an).
| * | Fix typos: the indefinite articles(a -> an)SUGINO Yasuhiro2013-09-133-4/+4
| | |
* | | Remove BasicRendering testsJosé Valim2013-09-091-62/+0
|/ /
* | Merge pull request #11912 from jonkessler/respond-to-signature-fixesRafael Mendonça França2013-08-311-0/+7
|\ \ | | | | | | Update Rails::Railtie::Configuration and ActionDispatch::Response#respond_to? to accept include_private argument
| * | update Rails::Railtie::Configuration and ↵Jon Kessler2013-08-161-0/+7
| | | | | | | | | | | | ActionDispatch::Response#respond_to? to accept include_private argument
* | | Fix typo in generators test helpr -> helper [ci skip]Prathamesh Sonpatki2013-08-301-1/+1
| | |
* | | Extend basic rendering, test it in railtiesŁukasz Strzałkowski2013-08-252-0/+68
| | |
* | | Add --skip-action-view to app generatorŁukasz Strzałkowski2013-08-251-0/+5
| | |
* | | Missing AV requires in railties testsŁukasz Strzałkowski2013-08-252-0/+2
| | |
* | | Include AV railtie in railties isolation testsŁukasz Strzałkowski2013-08-251-0/+1
| | |
* | | Add AV as development dependency for railtiesŁukasz Strzałkowski2013-08-251-0/+1
| | | | | | | | | | | | It's needed for tests
* | | Fix railtie testsŁukasz Strzałkowski2013-08-251-0/+2
| | |
* | | Fix the indentation on the from template of the scaffold generatorRafael Mendonça França2013-08-191-2/+2
|/ /
* | fix build error caused by #11900.Yves Senn2013-08-151-1/+1
| |
* | Adding LESS to rake notesJosh Crowder2013-08-151-0/+2
| |
* | Generate namespaced routes correctly for generators. Fix for #11532Prathamesh Sonpatki2013-08-141-0/+5
| |
* | "Naked" rescue clauses only catch StandardError subclasses.thedarkone2013-08-061-2/+5
| | | | | | | | Similar to #11497.
* | Add a missing require.thedarkone2013-08-061-0/+1
| | | | | | | | This makes the rack_logger_test.rb runnable by itself (outside of the `rake test` suite).
* | Use the right instrumentation nameRafael Mendonça França2013-08-051-1/+1
| | | | | | | | | | | | | | | | | | The pattern is event.component Closes #11769 Conflicts: railties/CHANGELOG.md
* | Rails.logger should have level specified by config.log_level. Max Shytikov2013-07-301-0/+8
| | | | | | Fix bug when log level of Rails.logger (which was set via config.logger) does not match the config.log_level.
* | Privatize non-test methodAkira Matsuda2013-07-251-0/+1
| |
* | Use GeneratedAttribute#column_name if #reference? scaffold_generator in ↵Zachary Scott2013-07-231-0/+24
| | | | | | | | _form view [Fixes #11573]
* | Stop reading the same file twice for testing different contentCarlos Antonio da Silva2013-07-221-8/+4
| | | | | | | | | | assert_file already gives this functionality for free by passing multiple contents.
* | Revert "Match Dev/Prod parity for Index Page"Piotr Sarnacki2013-07-221-1/+1
| | | | | | | | | | | | | | | | Showing welcome page in production can expose information, which should not be visible on production if people don't override the default root route. This reverts commit b0caea29c2da9f4c8bb958019813482da297067d.
* | Merge pull request #11514 from schneems/schneems/dev-prod-parity-indexPiotr Sarnacki2013-07-221-1/+1
|\ \ | | | | | | Match Dev/Prod parity for Index Page
| * | Match Dev/Prod parity for Index Pageschneems2013-07-201-1/+1
| | | | | | | | | | | | | | | | | | | | | With Rails 4 the default index page was moved from a static file `index.html` inside the `public/` folder to an internal controller/view inside of the railties gem. This was to allow use of erb in the default index page and to remove the requirement that new apps must delete a static file to make their index pages work. While this was a good change, the functionality was unexpected to developers who wish to get their apps running in production ASAP. They will create a new app `rails new my app`, start a server to verify it works, then immediately deploy the app to verify that it can start working in production. Unfortunately locally they see a page when they visit `localhost:3000` when they visit their production app they get an error page. We initially anticipated this problem in the original pull request, but did not properly anticipate the severity or quantity of people who would like this functionality. Having a default index page serves as an excellent litmus test for a passed deploy on default apps, and it is very unexpected to have a page work locally, but not on production. This change makes the default index page available in production if the developer has not over-written it by defining their own `root` path inside of routes.
* | | Clear named routes when routes.rb is reloadedAndrew White2013-07-211-0/+45
|/ / | | | | | | | | | | | | | | Fix an issue where Journey was failing to clear the named routes hash when the routes were reloaded and since it doesn't overwrite existing routes then if a route changed but wasn't renamed it kept the old definition. This was being masked by the optimised url helpers so it only became apparent when passing an options hash to the url helper.
* | Added generated unit test for generator generator and new test:generators ↵Josef Šimánek2013-07-161-0/+16
| | | | | | | | rake task included in test:all rake task.
* | Added CheckPending middleware in defaultArun Agrawal2013-07-151-0/+4
| | | | | | | | | | | | | | | | | | As this middleware comes by default in a new rails app Added test to check omit for CheckPending when Active Record is not included.
* | No need to add config for x_sendfile_headerArun Agrawal2013-07-151-2/+0
| | | | | | | | Rack::Sendfile is loaded by default now
* | Rack::Sendfile is now included in middleware by default, change tests to ↵Guillermo Iguaran2013-07-151-10/+4
| | | | | | | | reflect that
* | #11381: Ignore config.eager_load=true for rakePaul Nikitochkin2013-07-102-18/+20
| | | | | | | | Closes #11381
* | handle notes in *.sass filesYuri Artemev2013-07-081-1/+3
| |
* | Removed deprecated `Rails.application.railties.engines`.Arun Agrawal2013-07-041-6/+0
| |
* | build fix: railties tests used deprecated `SchemaCache` methods.Yves Senn2013-07-041-2/+2
| |
* | Use block instead passing as argumentRafael Mendonça França2013-07-021-1/+1
| |
* | Merge pull request #11203 from schneems/schneems/plugin_new-pluginRafael Mendonça França2013-07-012-3/+3
|\ \ | | | | | | s/plugin_new/plugin
| * | s/plugin_new/pluginschneems2013-06-302-3/+3
| | | | | | | | | | | | | | | There are historical reasons that the `plugin` command was `plugin_new`, now those are no longer applicable, we should remove the naming edge case from the project. This PR is based off of comments from #11176 ATP Railties
* | | Allowing multiple rails applications in the same ruby instance.wangjohn2013-06-301-0/+148
|/ / | | | | | | | | This change provides the ability to create a new application with a configuration which can be specified.
* | Omit turbolinks configuration completely on skip_javascript generator optionNikita Fedyashev2013-06-281-3/+8
| |
* | Removing deprecated rake tasks.wangjohn2013-06-241-39/+0
| | | | | | | | | | The `rake test:recent` and `rake test:uncommitted` tasks were deprecated and are now being removed.
* | Merge pull request #10537 from ↵Guillermo Iguaran2013-06-211-0/+23
|\ \ | | | | | | | | | | | | jetthoughts/10428_bug_with_config_assets_precompile #10428: Added tests for config.assets.precompile
| * | #10428: Added tests for config.assets.precompilePaul Nikitochkin2013-06-211-0/+23
| | | | | | | | | | | | | | | | | | Tests for bug in sprocket-rails: do not use value of configuration options which changed after environment loaded
* | | Change from 'actionpack' to 'actionview' for locales pathŁukasz Strzałkowski2013-06-201-1/+1
|/ /
* | Merge pull request #10902 from wangjohn/removing_application_singleton_callsSantiago Pastorino2013-06-1712-23/+23
|\ \ | | | | | | Calls to the application constant have been refactored