Commit Graph

34117 Commits

Author SHA1 Message Date
Daniel Choi
e8fe1d1a20 Add periodical-style TOC and navigation to Kindle version of guides 2012-12-01 18:08:10 -05:00
Carlos Antonio da Silva
daa7b4e2f0 Use "refute" instead of "assert !"
Remove FIXME tag from abstract adapter test.
2012-11-27 21:15:53 -02:00
Xavier Noria
46ebce6b49 prevent Dependencies#remove_const from autoloading parents [fixes #8301] 2012-11-28 00:13:14 +01:00
Rafael Mendonça França
5aade8245a Merge pull request #8318 from Empact/fixture-file
Use File.join to better integrate fixture_path in fixture_file_upload.
2012-11-27 13:06:04 -08:00
Rafael Mendonça França
6c0ea8875f Merge pull request #8339 from latortuga/cache-digest-opt-out-cleanup
Cache digest opt out cleanup
2012-11-27 10:19:55 -08:00
Drew Ulmer
e105adc240 Cleanup CacheHelper changes allowing opt-out of cache digests
Instead of deleting the skip_digest option flag, this changes the method to merely check the
key. This change is because of a discussion in this thread:

https://github.com/rails/rails/pull/8317

This commit also makes #fragment_name_with_digest private due to its
functionality being subsumed by #cache_fragment_name.
2012-11-27 12:16:25 -06:00
Drew Ulmer
e969ba955d Add CHANGELOG entry for opt-out option of automatic template digesting 2012-11-27 12:14:03 -06:00
Rafael Mendonça França
5b9c9026c4 Revert "Merge pull request #8341 from amatsuda/bundle_source_rubygems"
This reverts commit 33b29e0112db62d3a8c798bb58f51c0a839d9e26, reversing
changes made to ac8c729342e6b020a57d0d6887c8a8d5b39f96e0.

Reason:

https://github.com/rails/rails/pull/4684#commitcomment-920313
2012-11-27 14:59:58 -02:00
Rafael Mendonça França
33b29e0112 Merge pull request #8341 from amatsuda/bundle_source_rubygems
default source in Gemfiles to :rubygems rather than hardcoding the URL
2012-11-27 08:35:26 -08:00
Rafael Mendonça França
ac8c729342 Merge pull request #8340 from skojin/grouped_options_for_select_without_hash_sort
No sort Hash options in #grouped_options_for_select
2012-11-27 08:20:30 -08:00
Akira Matsuda
4ed645b37e default source in Gemfiles to :rubygems rather than hardcoding the URL
* I guess this would be the preferrable default for Bundler
* current version of Bundler converts :rubygems into 'http://rubygems.org', not https://,
  and that will help those who are working on a very poor network environment that doesn't allow SSL
2012-11-28 01:15:02 +09:00
Sergey Kojin
0195d6138b No sort Hash options in #grouped_options_for_select 2012-11-27 20:04:37 +04:00
Carlos Antonio da Silva
0be0a978ef Merge pull request #8338 from ugisozols/master
Fix Strong Parameters docs [ci skip]
2012-11-27 05:16:52 -08:00
Uģis Ozols
9fb4803016 Fix Strong Parameters docs.
It's only possible to inherit from ActiveRecord::Base and not include
it.
2012-11-27 15:11:30 +02:00
Rafael Mendonça França
d7f8aabf71 Merge pull request #8337 from amatsuda/unshift_html_scanner
unshift html-scanner into $LOAD_PATH rather than append
2012-11-27 04:19:10 -08:00
Carlos Antonio da Silva
56aba69c34 Merge pull request #8336 from rashmi14yadav/warning_removed
Unused variable warning removed
2012-11-27 02:46:25 -08:00
Akira Matsuda
919cec823a unshift html-scanner into $LOAD_PATH rather than append 2012-11-27 19:32:30 +09:00
Rashmi Yadav
585e64fb14 Unused variable warning removed 2012-11-27 15:24:25 +05:30
José Valim
1f29aba10e Merge pull request #8333 from amatsuda/rails_gem_empty_require_path
empty rails gem's require_paths
2012-11-27 00:26:58 -08:00
Akira Matsuda
6bcbd6046f rails gem has no lib directory to require 2012-11-27 17:14:14 +09:00
Rafael Mendonça França
80b8df5f3d Remove warning of circular require
This file was using mime_types before load the Mime::Type class.
When trying to register first Mime::Type it load mime_type that loads
mime_types in the end.

Requiring mime_type ensure that we have the class definition and the
mime types
2012-11-27 02:37:24 -02:00
Carlos Antonio da Silva
462a90565c Remove useless check of AR being defined from teardown fixtures
We are already in the AR namespace, there's no way for it to be
undefined. See the cousin commit 13e72db77063f57c3028a906690d42fb068845bb

Refactor a bit teardown fixtures to avoid two conditionals.
2012-11-27 00:19:26 -02:00
Carlos Antonio da Silva
8df46eac76 Refactor generators tests to include test helpers in the parent class 2012-11-27 00:07:48 -02:00
Ben Woosley
8b104e2f0c Use File.join to better integrate fixture_path in fixture_file_upload. 2012-11-26 17:50:57 -06:00
Carlos Antonio da Silva
fe4571259d Merge pull request #8329 from elia/fix-send-data-disposition-with-symbols-master
Accept symbols as #send_data :disposition value
2012-11-26 15:34:09 -08:00
Elia Schito
5d8faa683e Accept symbols as #send_data :disposition value 2012-11-27 00:21:12 +01:00
Rafael Mendonça França
5658923daa Merge pull request #7282 from xHire/validates_length_of_fix
Length validation handles correctly nil. Fix #7180

Conflicts:
	activemodel/CHANGELOG.md
2012-11-26 18:44:07 -02:00
Rafael Mendonça França
b3660ac335 Merge pull request #8324 from steveklabnik/changelog_7997
@steveklabnik can't spell 'distance.'
2012-11-26 10:52:18 -08:00
Steve Klabnik
aa996c3c07 @steveklabnik can't spell 'distance.' 2012-11-26 10:51:08 -08:00
Rafael Mendonça França
586bc593c7 Merge pull request #8323 from steveklabnik/changelog_7997
Add changelog for #7997.
2012-11-26 10:49:24 -08:00
Steve Klabnik
512a8c7363 Add changelog for #7997.
This was forgotten when we did the merge.
2012-11-26 10:47:42 -08:00
Carlos Antonio da Silva
2cab6a1b5a Merge pull request #8319 from alindeman/typo
Corrects typo in test name [ci skip]
2012-11-26 09:39:06 -08:00
Carlos Antonio da Silva
26a3b70cc4 Merge pull request #8320 from senny/active_model_log_folder
Log output from activemodel's railtie_test directly to STDOUT.

There's no logging going on here, but since we initialize the app, the
logger is set and the folder is automatically created. With this change,
the default logger is not created, so there is no logging folder anymore.

Conflicts:
	activemodel/test/cases/railtie_test.rb
2012-11-26 15:32:25 -02:00
Yves Senn
6fc83201db log output from activemodel's railtie_test directly to STDOUT
after this patch, running the tests in activemodel will no longer
create an untracked log/ folder inside of activemodel
2012-11-26 17:23:20 +01:00
Xavier Noria
296412ffa6 Merge pull request #6197 from blakesmith/connection_adapters_without_explain_support
Don't run explain on slow queries for database adapters that don't support it
2012-11-26 07:43:43 -08:00
Blake Smith
50e8613528 Don't run explain on slow queries for database adapters that don't support it 2012-11-26 09:36:04 -06:00
Andy Lindeman
4ac92c6560 Corrects typo in test name 2012-11-26 09:22:28 -05:00
Rafael Mendonça França
3ec443086b Merge pull request #8312 from senny/make_active_model_parts_individually_loadable
make sure that individual parts `ActiveModel` can be required by itself
2012-11-26 04:11:17 -08:00
Michal Zima
ea76e9a312 Length validation handles correctly nil. Fix #7180
When nil or empty string are not allowed, they are not valid.
2012-11-26 12:34:32 +01:00
Andrew White
be2a3b0a93 Improve clarity of routing tests
Move the routes for each test inside the test method so that
it's easier to see which routes are applicable to which test.

To ensure that each test wasn't invalidated the changes were
done by first removing all of the routes, ensuring that all
of the tests failed and then adding the routes back to each
test one by one. One test for `assert_recognizes` was
removed as it wasn't actually testing the defined routes and
is now tested more thoroughly in routing_assertions_test.rb.

One downside is that the test suite takes about 1s longer
due to having to using `method_missing` for handling the url
helpers as using `include url_helpers` isn't isolated
for each test.
2012-11-26 11:28:05 +00:00
Carlos Antonio da Silva
3da1649828 Require active_model/railtie directly instead of rails/all
Use Class.new with a block instead of tap to configure it.
2012-11-26 09:19:57 -02:00
Carlos Antonio da Silva
02c30c6426 Merge pull request #8316 from roberto/assert_template_validate_options
assert_template: validating option keys

It only handles the keys locals, partial, layout and count.

    assert_template(foo: "bar") # raises ArgumentError
    assert_template(leiaute: "test") # raises ArgumentError
2012-11-26 02:41:45 -08:00
David Heinemeier Hansson
1081ae20fb Merge pull request #8317 from latortuga/cache-digest-opt-out
Add explicit opt-out for fragment cache digesting
2012-11-26 00:59:48 -08:00
Aaron Patterson
dc973e7856 schema cache already has the columns as a hash, so use that 2012-11-25 22:53:46 -08:00
Aaron Patterson
c99e34e90d speed up fixture loading by querying the schema cache for column names 2012-11-25 22:49:48 -08:00
Drew Ulmer
7fb8c67047 Add explicit opt-out for fragment cache digesting
This add support for sending an explicit opt-out of the "Russian-doll"
cache digest feature on a case-by-case basis. This is useful when cache-
expiration needs to be performed manually and it would be otherwise
difficult to know the exact name of a digested cache key.

More information: https://github.com/rails/cache_digests/pull/16
2012-11-25 22:10:44 -06:00
Roberto Soares
3f2c011d31 assert_template: validating option keys 2012-11-25 23:39:08 -03:00
Carlos Antonio da Silva
4d0dc53249 Merge pull request #8302 from roberto/assert_template_empty_string
assert_template("") will now fail no matter whether a template has been rendered or not.
2012-11-25 16:45:55 -08:00
Carlos Antonio da Silva
0a7ba19dcc Merge pull request #8311 from alisdair/dirty-nullable-datetime
Don't call will_change! for datetime nil->"".
2012-11-25 14:29:34 -08:00
Yves Senn
22598ee599 cleanup, removed dispensable require statements from ActiveModel 2012-11-25 17:08:57 +01:00