Commit Graph

10028 Commits

Author SHA1 Message Date
Rafael Mendonça França 80990e2a0b rails-html-sanitizer is now the default
Also add to upgrading guide a notice about the deprecated sanitizers
2014-09-25 16:45:45 -03:00
Rafael Mendonça França 64fc8963b9 Remove unused code 2014-09-25 16:20:31 -03:00
Rafael Mendonça França 2922f63039 💅 the CSS 2014-09-25 16:09:43 -03:00
Rafael Mendonça França 89307fe2ce Merge pull request #17024 from buddhamagnet/amend-welcome-page
Amend welcome page
2014-09-25 16:07:19 -03:00
Godfrey Chan b008e4bd8a Use released rails-html-sanitizer and rails-deprecated_sanitizer 2014-09-26 01:37:05 +09:00
buddhamagnet be0206e4e2 Improve welcome page css and table cell aignments. 2014-09-25 11:59:13 -04:00
Rafael Mendonça França 478ad3f930 Use release web-console 2014-09-25 12:35:06 -03:00
Dan Olson 8e9bc11d22 Remove --skip-action-view option from application generator 2014-09-24 10:25:59 -05:00
Grzesiek Kolodziejczyk 95e3e42b87 Fix loading fixtures in engine tests
fixture_path is a class attribute of ActiveSupport::TestCase, so
ActiveSupport::TestCase.method_defined?(:fixture_path=) would always
return false.

This should fix #4971
2014-09-23 11:50:10 +02:00
Yuki Nishijima f8e26c8014 Fix another false assertions
* The assertions in AS::Duration don't actually assert.
 * The assertion in Railtie will pass even when `eager_load_namespaces`
   doesn't include `AppTemplate::Application` if `Rails.application` is
   truthy.

For more details, see here:

 * https://github.com/rails/rails/pull/16998
 * https://github.com/rails/rails/pull/17000
2014-09-21 17:16:21 -07:00
Godfrey Chan 3e27a03fe4 Merge pull request #16984 from chancancode/fix_16578
Document that the default for `rails server -b` has changed
2014-09-22 01:08:19 +09:00
Godfrey Chan 5919cce0de Document that the default for `rails server -b` has changed
Fixes #16578
2014-09-22 01:04:42 +09:00
Tamir Duberstein 994d3ebe9b Standardize on `Rails.application` [ci skip]
This seems to be the style settled on in most of the templates.
2014-09-19 10:42:58 -07:00
Rafael Mendonça França c2dfc31691 Merge pull request #16936 from untidy-hair/plugin_test_db_migrate_path
Specify dummy app's db migrate path in plugin's test_helper.rb

Conflicts:
	railties/CHANGELOG.md
2014-09-18 18:39:44 -03:00
Xavier Noria 112077c255 inject Rack::Lock if config.eager_load is false
If code is not eager loaded constants are loaded on demand. Constant
autoloading is not thread-safe, so if eager loading is not enabled
multi-threading should not be allowed.

This showed up in certain Capybara scenarios: Most Capybara drivers
other than Rack::Test need a web server. In particular, drivers for
JavaScript support. Capybara launches WEBrick in its own thread for
those but that per se is fine, because the spec thread and the server
thread are coordinated.

Problem comes if the page being served in the spec makes Ajax calls.
Those may hit WEBrick in parallel, and since WEBrick is multi-threaded
and allow_concurrency? returns true in the test environment before
this patch, threads are spawned to serve those parallel requests. On
the other hand, since eager_load is false by default in the test
environment, constants are not preloaded.

So the suite is autoloading constants in a multi-threaded set. That's
a receipt for paracetamol. The symptom is random obscure errors whose
messages point somehow to constant autoloading.

As a consequence of this fix for allow_concurrency? WEBrick in
Capybara scenarios no longer runs in multi-threaded mode.

Fixes #15089.
2014-09-18 23:04:08 +02:00
Yukio Mizuta 7137c6b775 Specify dummy app's db migrate path in plugin's test_helper.rb 2014-09-16 20:21:17 -07:00
Thibault Jouan c9213e1033 Improve environment config templates consistency:
* Fix long lines;
* Use simple quotes for string literals when interpolation is not used.
2014-09-16 16:07:59 -03:00
Rafael Mendonça França 6e4aa9d5ea Merge pull request #16914 from untidy-hair/fix_plugin_dummy_path_error
Use dynamic path for dummy app location in plugin's test_helper.rb
2014-09-16 10:51:29 -03:00
yuuji.yaginuma 14f07fdc07 Add `test:jobs` task 2014-09-15 09:43:02 +09:00
Yukio Mizuta 8c9b347342 Use dynamic path for dummy app location in plugin's test_helper.rb 2014-09-14 10:55:19 -07:00
yuuji.yaginuma b3c9d3e6fa Change ActiveJob test directory to "test/jobs" 2014-09-13 12:54:55 +09:00
Rafael Mendonça França 1245a9e06c Always define capture to remove the deprecation message 2014-09-11 00:55:05 -03:00
Rafael Mendonça França 53e877f7d9 Define the configuration at Active Support 2014-09-11 00:54:43 -03:00
Rafael Mendonça França 8edb5eeb36 Set test order in ActiveSupport::TestCase of isolation/abstract_unit 2014-09-10 22:42:15 -03:00
Rafael Mendonça França e4c529ea1d Set the test order to be random in the generated app
This will avoid the warning in our tests. We delete all the
config/environments/ files in the test app so our default code will not
work.
2014-09-10 22:34:55 -03:00
Rafael Mendonça França 412f651665 Merge pull request #16839 from chancancode/default_test_order
Default to sorting user's test cases for now
2014-09-10 22:34:06 -03:00
Akira Matsuda ed9d220cd1 Tell the user which file is missing when config/database.yml was not found
Since cc03675d30b58e28f585720dad14e947a57ff5b the error message became like
"Could not load database configuration. No such file -"
which doesn't really tell what's actually missing.
2014-09-10 19:25:01 +09:00
Sahil Lavingia f234d1f07e Removed any default margin from body. 2014-09-09 13:38:53 -07:00
yuuji.yaginuma ce39d735d0 Remove extra newline from ActiveJob test template 2014-09-09 16:37:28 +09:00
Godfrey Chan 2b41343c34 Default to sorting user's test cases for now
Goals:

1. Default to :random for newly generated applications
2. Default to :sorted for existing applications with a warning
3. Only show the warning once
4. Only show the warning if the app actually uses AS::TestCase

Fixes #16769
2014-09-08 05:32:16 -07:00
Godfrey Chan 381f9931ec Dependencies: bump to jquery-rails 4.0.0.beta2 2014-09-05 20:20:26 -07:00
Godfrey Chan b1bc95bfa5 Use the released jquery-rails gem 2014-09-05 17:55:45 -07:00
Peter Schröder d69e0ad39a world writable might be a bit too open... 2014-09-05 16:44:41 +02:00
Kale Worsley 39fc362b9b Change "For not..." to "Do not...". 2014-09-04 15:08:36 -06:00
Yves Senn 316962d092 build fix, we have to reset the RACK_ENV as well.
This is a follow-up to ded17a4 to get the build passing on Travis.
As Travis has `ENV["RACK_ENV"]` set to `test` we need to reset that as well.
2014-09-04 07:54:30 +02:00
Rafael Mendonça França 5db4e7f0ec Merge pull request #16775 from kaspth/ship-secure-sanitizer
Ship with rails-html-sanitizer instead.
2014-09-03 16:59:58 -03:00
Rafael Mendonça França 66c9d31c2b Merge pull request #16756 from huoxito/dont-mess-railties-default-order
Dont mess with default order engines load (4.1.6.rc1 regression)
2014-09-03 16:28:33 -03:00
Kasper Timm Hansen 28eecd934b Ship with rails-html-sanitizer instead. 2014-09-03 20:27:59 +02:00
Yves Senn ded17a498a schema loading rake tasks maintain database connection for current env.
[Joshua Cody & Yves Senn]

Closes #16757.

Prior to this patch schema loading rake tasks had the potential to leak a
connection to a different database. This had side-effects when rake tasks
operating on the current connection (like `db:seed`) were chained.
2014-09-03 18:02:44 +02:00
Washington Luiz 435e8d719c Dont mess with default order engines load
When copying migrations some engines might depend on schema from other
engine so we can't blindly reverse all railties collection as that would
affect the order they were originally loaded. This patch helps to only
apply the order from engines specified in `railties_order`
2014-09-02 22:50:50 -03:00
Rafael Mendonça França 2e500e5c93 Merge pull request #16724 from seuros/testcase
[ActiveJob] TestCase
2014-09-02 11:31:08 -03:00
Matthew Draper 2f52f96988 Leave all our tests as order_dependent! for now
We're seeing too many failures to believe otherwise.

This reverts commits bc116a55ca,
cbde413df3,
bf0a67931d, and
2440933fe2.
2014-09-02 23:55:34 +09:30
Abdelkader Boudih fccf3d0b63 [ActiveJob] TestCase 2014-09-02 07:50:16 +00:00
Abdelkader Boudih eb4245dd17 [ActiveJob] TestCase 2014-09-02 07:50:16 +00:00
Rafael Mendonça França c6f9cec1be Add test to assert the right sanitizer vendor is being used 2014-09-01 22:46:05 -03:00
Rafael Mendonça França 2fc6d41670 Try with web-console master 2014-09-01 21:46:56 -03:00
Rafael Mendonça França dd1fb2d769 Use jquery-rails master 2014-09-01 21:41:48 -03:00
Godfrey Chan 0db179a998 Keep it closer to the original wording [ci skip] 2014-08-31 12:23:05 -07:00
Rhett Sutphin fc23ff64f8 Since /console is an optional feature, mention <%= console %> instead.
(/console is not mounted by default with web-console 2.0.)
2014-08-31 13:15:13 -05:00
David Heinemeier Hansson 7475b43cdb Merge branch 'master' of github.com:rails/rails 2014-08-29 14:54:08 -07:00