aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test
Commit message (Collapse)AuthorAgeFilesLines
* Override Time.at to work with Time-like valuesAndrew White2013-06-081-0/+22
| | | | | | | Time.at allows passing a single Time argument which is then converted to an integer. The conversion code since 1.9.3r429 explicitly checks for an instance of Time so we need to override it to allow DateTime and ActiveSupport::TimeWithZone values.
* Fix test to ruby 2.0Rafael Mendonça França2013-05-101-2/+9
| | | | The default enconding changed on Ruby 2.0
* Revert "Remove unicode character encoding from ActiveSupport::JSON.encode"Rafael Mendonça França2013-05-081-15/+9
| | | | | | | | | | | | This reverts commit 815a9431ab61376a7e8e1bdff21f87bc557992f8. Conflicts: activesupport/test/json/encoding_test.rb Reason: This was causing a regression where the resulting string is always returning UTF-8. Also it changes the behavior of this method on a stable release. Fixes #9498.
* Fix method name indent [ci skip]Carlos Antonio da Silva2013-03-181-1/+1
|
* Merge branch '3-2-13' into 3-2-stableAaron Patterson2013-03-184-3/+39
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 3-2-13: bumping to 3.2.13 fix protocol checking in sanitization [CVE-2013-1857] JDOM XXE Protection [CVE-2013-1856] fix incorrect ^$ usage leading to XSS in sanitize_css [CVE-2013-1855] stop calling to_sym when building arel nodes [CVE-2013-1854] Merge pull request #9616 from exviva/multiple_select_name_double_square_brackets bumping to rc2 Revert "Merge pull request #8209 from senny/backport_8176" Freeze columns only once per Result Preparing for 3.2.13.rc1 release Update CHANGELOGs for 3.2.13 release. Conflicts: actionmailer/CHANGELOG.md actionpack/CHANGELOG.md activemodel/CHANGELOG.md activeresource/CHANGELOG.md activesupport/CHANGELOG.md railties/CHANGELOG.md
| * JDOM XXE Protection [CVE-2013-1856]Ben Murphy2013-03-154-3/+39
| | | | | | | | | | Conflicts: activesupport/test/xml_mini/jdom_engine_test.rb
* | Fix `ActiveSupport::TimeZone.parse` when time is a local DST jumpAndrew White2013-03-131-0/+56
|/ | | | | | | | | | | | | The previous implementation `ActiveSupport::TimeZone.parse` used `Time.parse` which applies the system time DST rules to the parsed time. Instead we now use `Time.utc` and manually apply the offset. Backport tests from: 005d910624bbfa724b638426a000c8074d4201a2 c89b6c4cdce7ee55ed3665c099d914222fe0344a 03becb13099c439f6aea5058546bc8b0b19b8db8 Fixes #9678.
* Do not redirect cache logger to /dev/null in testPrem Sichanugrist2013-02-241-1/+0
| | | | | | | | | | For some reason, redirecting cache's logger to '/dev/null' resulting in a test failures and LoadError. I think it's because of Thread issue. Instead of trying to make every logger threadsafe for Rails 3.2, I think it's better to just don't set the logger for now. (Note: resetting the logger back to original value in the teardown block didn't fix the problem.)
* Ruby 2 compat. Hash[] now raises on bad elements rather than ignoring them. ↵Jeremy Kemper2013-02-241-1/+0
| | | | No sense over-testing this MRI-specific behavior. See ruby/ruby@8d6add973ebcb3b4c1efbfaf07786550a3e219af
* Make the tests pass with minitest 4.2Rafael Mendonça França2013-02-241-0/+3
|
* Test to allow Range including DateTime and DateTime::Infinitygsphanikumar2013-01-131-0/+6
| | | | Closes #8587
* Merge branch '3-2-sec' into 3-2-secmergeAaron Patterson2013-01-081-6/+22
|\ | | | | | | | | | | | | | | | | | | | | | | | | * 3-2-sec: bumping version CVE-2013-0156: Safe XML params parsing. Doesn't allow symbols or yaml. * Strip nils from collections on JSON and XML posts. [CVE-2013-0155] * dealing with empty hashes. Thanks Damien Mathieu Avoid Rack security warning no secret provided Conflicts: actionpack/CHANGELOG.md activerecord/CHANGELOG.md activesupport/CHANGELOG.md
| * CVE-2013-0156: Safe XML params parsing. Doesn't allow symbols or yaml.Jeremy Kemper2013-01-081-6/+22
| |
* | Wrap time ranges with timezones, closes #8807Vasiliy Ermolovich2013-01-083-32/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | (cherry picked from commit e2e513621d732abb8efff9120bd9a444836720d6) (cherry picked from commit dcdde7da481e11660634278a8004175a1ce20f39) Backport of #6183, original issue was #6179 Conflicts: activesupport/lib/active_support/core_ext/time/calculations.rb activesupport/test/core_ext/time_ext_test Signed-off-by: Andrew White <andyw@pixeltrix.co.uk>
* | Use 1.8 style hash in json encoding testCarlos Antonio da Silva2012-12-141-1/+1
| |
* | Remove unicode character encoding from ActiveSupport::JSON.encodeBrett Carter2012-12-141-3/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The encoding scheme (e.g. ☠ -> "\u2620") was broken for characters not in the Basic Multilingual Plane. It is possible to escape them for json using the weird encoding scheme of a twelve-character sequence representing the UTF-16 surrogate pair (e.g. '𠜎' -> "\u270e\u263a") but this wasn't properly handled in the escaping code. Since raw UTF-8 is allowed in json, it was decided to simply pass through the raw bytes rather than attempt to escape them. Backport of https://github.com/zbskii/rails/commit/9ace3a8820a5270f9b3f37b593f8bbea3e940f73 Conflicts: activesupport/CHANGELOG.md activesupport/lib/active_support/json/encoding.rb activesupport/test/json/encoding_test.rb
* | Add :nsec format only for Ruby 1.9Carlos Antonio da Silva2012-12-111-9/+9
| | | | | | | | | | | | Ruby 1.8 does not support this format in Time, so the format will only be added to the available date formats on Ruby 1.9. Changelog entry was changed to explain that as well.
* | Merge pull request #6376 from jgaskins/timestamp-microsecondsJeremy Kemper2012-12-101-1/+3
| | | | | | | | | | | | Increase numeric-timestamp precision to nanoseconds Conflicts: activesupport/lib/active_support/core_ext/time/conversions.rb
* | Update mocha version to 0.13.0 and change requiresCarlos Antonio da Silva2012-11-131-1/+1
| |
* | Fix json encoding test with ruby 1.8.7 and random hash orderCarlos Antonio da Silva2012-11-131-1/+2
| | | | | | | | Introduced in 3e53fe6.
* | backport #8185, `#as_json` isolates options when encoding a hash.Yves Senn2012-11-131-0/+18
|/ | | | | | | | | | Setting options in a custom `#as_json` method had side effects. Modifications of the `options` hash leaked outside and influenced the conversion of other objects contained in the hash. Conflicts: activesupport/CHANGELOG.md
* Add logger.push_tags and .pop_tags to complement logger.taggedJeremy Kemper2012-09-271-0/+27
| | | | | | | | | Avoid memory leak from unflushed logs on other threads leaving tags behind. Conflicts: activesupport/CHANGELOG.md activesupport/lib/active_support/tagged_logging.rb activesupport/test/tagged_logging_test.rb
* Fix #6962. AS::TimeWithZone#strftime responds incorrectly to %:z and %::z ↵kennyj2012-09-201-0/+8
| | | | format strings.
* Fix AS tests due to builder change with nil values / empty stringsCarlos Antonio da Silva2012-09-071-2/+2
| | | | | Check 0180e090ab6cbe66f7b521a0c03e278a0463accd for more reasoning about that.
* html_escape should escape single quotesSantiago Pastorino2012-08-021-2/+2
| | | | | | | | | | | | https://www.owasp.org/index.php/XSS_%28Cross_Site_Scripting%29_Prevention_Cheat_Sheet#RULE_.231_-_HTML_Escape_Before_Inserting_Untrusted_Data_into_HTML_Element_Content Closes #7215 Conflicts: actionpack/test/template/erb_util_test.rb actionpack/test/template/form_tag_helper_test.rb actionpack/test/template/text_helper_test.rb actionpack/test/template/url_helper_test.rb activesupport/lib/active_support/core_ext/string/output_safety.rb
* Revert "Deprecate ActiveSupport::JSON::Variable"Rafael Mendonça França2012-08-011-8/+3
| | | | This reverts commit bcfa013399fd2c5b5d25c38912cba3560de1cc57.
* buffered logger is initialized with the log level passed trough the initializerNiranjan Paranjape2012-06-091-0/+5
|
* Deprecate ActiveSupport::JSON::VariableErich Menge2012-05-301-3/+8
|
* True, False, and Nil should be represented in as_json as themselves.Erich Menge2012-05-301-0/+6
| | | | | | | Conflicts: activesupport/lib/active_support/json/encoding.rb activesupport/test/json/encoding_test.rb
* Exceptions like Interrupt should not be rescued in tests.James Mead2012-05-291-2/+42
| | | | | This is a back-port of rails/rails#6525. See the commit notes there for details.
* added beginning_of_hour support to core_ext calculations for Time and DateTimeMark J. Titorenko2012-05-043-0/+30
|
* bigdecimal can be duped on Ruby 2.0Aaron Patterson2012-04-101-2/+10
| | | | | | Conflicts: activesupport/test/core_ext/duplicable_test.rb
* add the class name to the assertion messageAaron Patterson2012-04-101-1/+1
|
* Ensure load hooks can be called more than once with different contexts.José Valim2012-03-171-0/+29
|
* Merge branch '3-2-stable-security' into 3-2-2Aaron Patterson2012-03-011-9/+38
|\ | | | | | | | | | | | | | | | | * 3-2-stable-security: Ensure [] respects the status of the buffer. delete vulnerable AS::SafeBuffer#[] use AS::SafeBuffer#clone_empty for flushing the output_buffer add AS::SafeBuffer#clone_empty fix output safety issue with select options
| * Ensure [] respects the status of the buffer.José Valim2012-02-291-5/+31
| |
| * delete vulnerable AS::SafeBuffer#[]Akira Matsuda2012-02-201-6/+0
| |
| * add AS::SafeBuffer#clone_emptyAkira Matsuda2012-02-201-0/+9
| |
* | Fix some warnings on 3-2-stablekennyj2012-02-211-1/+1
|/
* Fixes failing test with ruby 1.8.7-p358Arun Agrawal2012-02-171-2/+2
| | | Same as 91a9b2441783de118a2f9ec11b0aa3ae80133d91
* GH #4883. Optional start_day argument for Time#all_weekkennyj2012-02-051-0/+1
|
* Fix GH #4760. A Block was not evaluated.kennyj2012-01-311-0/+8
|
* Revert "Fix expanding cache key for single element arrays"David Heinemeier Hansson2012-01-271-15/+7
| | | | | | This reverts commit abe915f23777efe10f17d611bf5718ca855a0704. This broke all existing keys and it's wrong anyway. The array is just there as a convenience option for building the string. It's intentional that [ "stuff"] and "stuff" generates the same key.
* safe_constantize should handle wrong constant name NameErrors Fixes #4710Alex Tambellini2012-01-261-2/+3
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* global variables may not be set depending on the match. fixes #4703Aaron Patterson2012-01-261-0/+4
|
* Fix GH #4344. A defined callback in extended module is called too.kennyj2012-01-241-4/+61
| | | | | | Conflicts: activesupport/test/callbacks_test.rb
* test base64 encode and decodeVijay Dev2012-01-231-0/+9
|
* Remove deprecation warning from console output when runningWaseem Ahmad2012-01-221-1/+3
| | | | activesupport tests.
* Fix GH #4580. Rails 3.2: uninitialized constant ↵kennyj2012-01-221-0/+4
| | | | ActiveSupport::TaggedLogging::ERROR
* deprecate ActiveSupport::Base64Sergey Nartimov2012-01-032-5/+7
| | | | extend and define ::Base64 if needed