Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Fixed tests for returning an instance of `Time` in the local system timezone. | Paul Nikitochkin | 2013-03-10 | 1 | -5/+5 |
| | |||||
* | Merge pull request #8830 from antoinelyset/master | Xavier Noria | 2013-01-28 | 1 | -3/+4 |
|\ | | | | | Improve String#squish whitespaces matching | ||||
| * | Improve String#squish whitespaces matching | Antoine Lyset | 2013-01-22 | 1 | -3/+4 |
| | | |||||
* | | Use Encoding::UTF_8 constant :do_not_litter: | Akira Matsuda | 2013-01-28 | 1 | -2/+2 |
| | | |||||
* | | Fix some wrong String extensions tests | Akira Matsuda | 2013-01-23 | 1 | -7/+9 |
| | | | | | | | | | | | | * ASCII_STRING was not an ASCII String * BYTE_STRING was not an in valid UTF-8 String * added an assertion for non-UTF-8 String | ||||
* | | Test String#dasherize | Akira Matsuda | 2013-01-23 | 1 | -0/+6 |
|/ | |||||
* | Use `DateTime.parse` inside `String#to_datetime` | Andrew White | 2013-01-21 | 1 | -0/+6 |
| | | | | | | | | | | Use the standard library's `DateTime.parse` because it's marginally faster and supports partial date/time strings. Benchmark: user system total real old 3.980000 0.000000 3.980000 ( 3.987606) new 3.640000 0.010000 3.650000 ( 3.641342) | ||||
* | Standardise the return value of `to_time` | Andrew White | 2013-01-21 | 1 | -8/+39 |
| | | | | | | | | | | | | | | | | | | | | | | This commit standardises the return value of `to_time` to an instance of `Time` in the local system timezone, matching the Ruby core and standard library behavior. The default form for `String#to_time` has been changed from :utc to :local but research seems to suggest the latter is the more common form. Also fix an edge condition with `String#to_time` where the string has a timezone offset in it and the mode is :local. e.g: # Before: >> "2000-01-01 00:00:00 -0500".to_time(:local) => 2000-01-01 05:00:00 -0500 # After: >> "2000-01-01 00:00:00 -0500".to_time(:local) => 2000-01-01 00:00:00 -0500 Closes #2453 | ||||
* | Better error message for String#to_date | Kelly Stannard | 2013-01-04 | 1 | -0/+1 |
| | | | | | | | | | | I did this because to_date gives a very unhelpful error message if you do not pass in a correct date. In the process I think this cleans up the code nicely and even better it tends to be slightly faster than the current implementation. Benchmark https://gist.github.com/4440875 | ||||
* | Deprecate obsolete Time to DateTime fallback methods | Andrew White | 2012-12-11 | 1 | -1/+1 |
| | | | | | | | The Time.time_with_datetime_fallback, Time.utc_time and Time.local_time methods were added to handle the limitations of Ruby's native Time implementation. Those limitations no longer apply so we are deprecating them in 4.0 and they will be removed in 4.1. | ||||
* | Beef up tests for String#in_time_zone and Date#in_time_zone | Andrew White | 2012-12-11 | 1 | -18/+0 |
| | |||||
* | Add String#in_time_zone method | Andrew White | 2012-12-11 | 1 | -24/+44 |
| | | | | | | This commit adds a convenience method for converting a string to an ActiveSupport::TimeWithZone instance using the configured Time.zone or another passed as an argument. | ||||
* | ' dates back to SGML when ' was introduced in HTML 4.0 | Kalys Osmonov | 2012-09-09 | 1 | -1/+1 |
| | |||||
* | defines String#indent [closes #7263] [Xavier Noria & Ace Suares] | Xavier Noria | 2012-08-07 | 1 | -0/+56 |
| | |||||
* | html_escape should escape single quotes | Santiago Pastorino | 2012-07-31 | 1 | -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 | ||||
* | Truncate now has the ability to receive a html option that allows it to call ↵ | Li Ellis Gallardo | 2012-05-26 | 1 | -0/+4 |
| | | | | | | | | | | | | rails helpers. This way if my text is long I don't have to do something like this: .text = truncate(@text, :length => 27) if @text.size >= 27 = link_to "continue", notes_path, ....."") | ||||
* | Fix warning: possibly useless use of % in void context | kennyj | 2012-05-19 | 1 | -1/+1 |
| | |||||
* | doesn't modify params in SafeBuffer#% | Vasiliy Ermolovich | 2012-05-18 | 1 | -0/+7 |
| | |||||
* | fix safe string interpolation with SafeBuffer#%, closes #6352 | Vasiliy Ermolovich | 2012-05-16 | 1 | -0/+24 |
| | |||||
* | Tests for regexp separator in String#truncate | Alexey Gaziev | 2012-04-29 | 1 | -0/+6 |
| | | | | https://github.com/rails/rails/commit/5a7513593f64e0ff7e4de1ee37bac5eeddfae270 | ||||
* | use AS::TestCase as the base class | Aaron Patterson | 2012-01-05 | 1 | -2/+2 |
| | |||||
* | deprecate String#encoding_aware? and remove its usage | Sergey Nartimov | 2011-12-24 | 1 | -1/+3 |
| | |||||
* | Initial pass at removing dead 1.8.x code from Active Support. | José Valim | 2011-12-20 | 1 | -44/+6 |
| | | | | | | There are a bunch of other implicit branches that adds 1.8.x specific code that still needs to be removed. Pull requests for those cases are welcome. | ||||
* | Restore performance of ERB::Util.html_escape | Jon Jensen | 2011-12-03 | 1 | -6/+17 |
| | | | | | | | Revert html_escape to do a single gsub again, but add the "n" flag (no language, i.e. not multi-byte) to protect against XSS via invalid utf8 Signed-off-by: José Valim <jose.valim@gmail.com> | ||||
* | defines Module#qualified_const_(defined?|get|set) and String#deconstantize | Xavier Noria | 2011-10-29 | 1 | -0/+4 |
| | | | | | | | | | | This commit also implements a faster version of #demodulize I was unable to isolate with git add --patch. Not a big fan of the name #deconstantize. It complements #demodulize getting rid of the rightmost constant, hence the name, but it is unrelated to the well-known #constantize. So unsure. Could not come with anything better, please feel free to rename. | ||||
* | Modified String#pluralize to take an optional count parameter. | Ryan Oblak | 2011-09-28 | 1 | -4/+8 |
| | |||||
* | Added ActiveSupport::Inflector.safe_constantize and String#safe_constantize; ↵ | Ryan Oblak | 2011-09-23 | 1 | -1/+22 |
| | | | | refactored common constantize tests into ConstantizeTestCases | ||||
* | properly escape html to avoid invalid utf8 causing XSS attacks | Aaron Patterson | 2011-08-16 | 1 | -0/+7 |
| | |||||
* | Removing extra requires from the test. Already loaded in abstract_unit. | Arun Agrawal | 2011-07-31 | 1 | -1/+0 |
| | |||||
* | Changed the year of a date used in a test which fails when using 1.8.7 on a ↵ | Josh Kalderimis | 2011-07-19 | 1 | -1/+1 |
| | | | | 32bit machine (ArgumentError: time out of range) | ||||
* | Merge pull request #1463 from psanford/master | Santiago Pastorino | 2011-07-06 | 1 | -0/+1 |
|\ | | | | | Fix timezone handling in String.to_time | ||||
| * | Make String.to_time respect timezones | Nate Mueller | 2011-06-02 | 1 | -0/+1 |
| | | |||||
* | | all numerics should be html_safe - Closes #1935 | Damien Mathieu | 2011-07-03 | 1 | -0/+4 |
| | | |||||
* | | Define ActiveSupport#to_param as to_str - closes #1663 | Andrew White | 2011-06-12 | 1 | -1/+7 |
|/ | |||||
* | Revert "Merge pull request #275 from pk-amooma/master" | José Valim | 2011-05-07 | 1 | -12/+0 |
| | | | | | | | Several AP tests fail after this change. This reverts commit aaf01cd53718c8aa5b69ac056b997e6dd9893777, reversing changes made to 9cc18c52faeebaad6a76bd62cdca1c6b9f96afed. | ||||
* | Merge pull request #275 from pk-amooma/master | José Valim | 2011-05-07 | 1 | -0/+12 |
|\ | | | | | properly escape "'" to "'" for XML | ||||
| * | test "Escapes special HTML/XML characters" do ... | Philipp Kempgen | 2011-04-26 | 1 | -0/+12 |
| | | |||||
* | | Merge remote branch 'rolftimmermans/desc_tracker' | José Valim | 2011-05-07 | 1 | -0/+1 |
|\ \ | |||||
| * | | Add missing dependency string inflection test. | Rolf Timmermans | 2011-03-13 | 1 | -0/+1 |
| |/ | |||||
* / | Add String#inquiry as a convenience method for turning a string into a ↵ | David Heinemeier Hansson | 2011-04-18 | 1 | -0/+5 |
|/ | | | | StringInquirer object [DHH] | ||||
* | removes orphan tests, custom String#% was removed from AS in 39d6f9e | Xavier Noria | 2010-11-19 | 1 | -69/+0 |
| | |||||
* | let String#strip_heredoc handle blank lines even if they are not indented | Xavier Noria | 2010-08-30 | 1 | -0/+9 |
| | |||||
* | implements String#strip_heredoc | Xavier Noria | 2010-08-29 | 1 | -0/+23 |
| | |||||
* | Deletes trailing whitespaces (over text files only find * -type f -exec sed ↵ | Santiago Pastorino | 2010-08-14 | 1 | -1/+1 |
| | | | | 's/[ \t]*$//' -i {} \;) | ||||
* | Added getbyte as a core_ext to Ruby < 1.9 | Santiago Pastorino | 2010-06-27 | 1 | -0/+8 |
| | | | | Signed-off-by: José Valim <jose.valim@gmail.com> | ||||
* | Extracted String#truncate from TextHelper#truncate [DHH] | David Heinemeier Hansson | 2010-06-01 | 1 | -0/+29 |
| | |||||
* | Use multibyte proxy class on 1.9, refactor Unicode. | Norman Clarke | 2010-05-21 | 1 | -5/+3 |
| | | | | | | | | | | Makes String#mb_chars on Ruby 1.9 return an instance of ActiveSupport::Multibyte::Chars to work around 1.9's lack of Unicode case folding. Refactors class methods from ActiveSupport::Multibyte::Chars into new Unicode module, adding other related functionality for consistency. [#4594 state:resolved] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net> | ||||
* | Final iteration of use better testing methods | Neeraj Singh | 2010-05-19 | 1 | -7/+7 |
| | | | | | | [#4652 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com> | ||||
* | Revert "Moved encoding work in progress to a feature branch." | wycats | 2010-05-17 | 1 | -0/+8 |
| | | | | This reverts commit ade756fe42423033bae8e5aea8f58782f7a6c517. | ||||
* | Moved encoding work in progress to a feature branch. | Jeremy Kemper | 2010-05-16 | 1 | -8/+0 |
| | | | | This reverts commits af0d1a88157942c6e6398dbf73891cff1e152405 and 64d109e3539ad600f58536d3ecabd2f87b67fd1c. |