Commit Graph

3409 Commits

Author SHA1 Message Date
Erich Menge
da0ef60d3b Fix typo [ci skip] 2012-05-30 12:48:57 -05:00
Vijay Dev
ec74763c39 Merge branch 'master' of github.com:lifo/docrails 2012-05-30 22:53:52 +05:30
Vijay Dev
e591b7b4e1 some copy edits [ci skip] 2012-05-30 22:28:58 +05:30
Erich Menge
1e335ad138 True, False, and Nil should be represented in as_json as themselves. 2012-05-29 21:13:03 -05:00
José Valim
6ba93ac6f6 Merge pull request #6525 from freerange/minitest-passthrough-exceptions
Exceptions like Interrupt & NoMemoryError should not be rescued in tests.
2012-05-29 01:35:40 -07:00
James Mead
7d8e5fac75 Avoid dependency on MiniTest::Unit::TestCase::PASSTHROUGH_EXCEPTIONS. 2012-05-29 09:28:22 +01:00
Francesco Rodriguez
5487daba97 fix example format and add markup in Module#mattr_accessor documentation [ci skip] 2012-05-29 00:00:32 -05:00
Andrew Mutz
598f8bdda1 decoupling activesupport performance testing from actionview and adding tests 2012-05-28 21:09:20 -07:00
Carlos Antonio da Silva
400c5fefcf Review requires from number helper
Some of these requires are now only necessary in
ActiveSupport::NumberHelper. Add hash/keys require due to symbolize_keys
usage in number helpers. Also remove some whitespaces.

Closes #6414
2012-05-28 23:55:20 -03:00
James Mead
b057fab638 Exceptions like Interrupt should not be rescued.
Neither Test::Unit nor MiniTest rescue exceptions like Interrupt or
NoMemoryError, but ActiveSupport::Testing::SetupAndTeardown#run which
overrides MiniTest::Unit::TestCase#run rescues them.

Rescuing an Interrupt exception is annoying, because it means when you
are running a lot of tests e.g. when running one of the rake test tasks,
you cannot break out using ctrl-C.

Rescuing exceptions like NoMemoryError is foolish, because the most
sensible thing to happen is for the process to terminate as soon as
possible.

This solution probably needs some finessing e.g. I'm not clear whether
the assumption is that only MiniTest is supported. Also early versions
of MiniTest did not have this behaviour. However, hopefully it's a
start.

Integrating with Test::Unit & MiniTest has always been a pain. It would
be great if both of them provided sensible extension points for the kind
of things that both Rails and Mocha want to do.
2012-05-28 22:44:28 +01:00
Sergey Nartimov
d64b25438a make AS::Multibyte::Chars work w/o multibyte core ext
Use ActiveSupport::Multibyte::Chars.new instead of String#mb_chars.
It allows to use ActiveSupport::Multibyte::Chars without requiring
String multibyte core extension.
2012-05-28 23:32:14 +03:00
Sergey Nartimov
7dd80d68e5 remove unnecessary require
AS::Multibyte are no longer required by access and filters string
core extensions.
2012-05-28 23:32:04 +03:00
Jared Beck
371508c240 Fix handling of negative zero in number_to_currency 2012-05-28 04:42:53 -04:00
Alvaro Pereyra
95fde2c09b Updates Array conversions method documentations and clean ups 2012-05-28 03:24:52 -05:00
Francesco Rodriguez
21fee1b654 add ActiveSupport::JSON.decode documentation [ci skip] 2012-05-28 03:17:41 -05:00
Francesco Rodriguez
070fb46295 add example to ActiveSupport::JSON.encode [ci skip] 2012-05-28 03:10:51 -05:00
Francesco Rodriguez
a42bc4c9df fix empty lines [ci skip] 2012-05-28 02:40:26 -05:00
Alvaro Pereyra
72973a3070 Merge branch 'master' of github.com:lifo/docrails 2012-05-28 02:29:46 -05:00
Alvaro Pereyra
422d3a4f04 Updates documentation with cleaner examples and texts [ci skip] 2012-05-28 02:27:23 -05:00
Francesco Rodriguez
0ad2146ccf remove :nodoc: from Class#subclasses [ci skip] 2012-05-28 02:18:44 -05:00
Francesco Rodriguez
c6219b0215 add :locale option to Array#to_sentence documentation [ci skip] 2012-05-28 01:24:34 -05:00
Francesco Rodriguez
1e1d1da3ad add examples to Array#to_sentence [ci skip] 2012-05-28 01:23:38 -05:00
Francesco Rodriguez
b4f0beb68a update documentation of array/access methods [ci skip] 2012-05-28 00:32:41 -05:00
Andrew Mutz
155cd5e6b5 Moving NumberHelpers from ActionView to ActiveSupport 2012-05-27 18:14:21 -07:00
Vijay Dev
523d0f09e4 Merge branch 'master' of github.com:lifo/docrails 2012-05-27 19:51:33 +05:30
Francesco Rodriguez
4f031c8350 update Module#mattr_accessor documentation [ci skip] 2012-05-26 23:07:37 -05:00
Francesco Rodriguez
29713d7f3b update Hash documentation with 1.9 syntax [ci skip] 2012-05-26 22:28:49 -05:00
Francesco Rodriguez
ac50b633d4 add examples to Hash#deep_stringify_keys and Hash#deep_symbolize_keys [ci skip] 2012-05-26 22:24:06 -05:00
Rafael Mendonça França
eedc513503 Update the documentation and add CHANGELOG entry 2012-05-26 13:59:47 -03:00
Vijay Dev
575e77ba16 Merge branch 'master' of github.com:lifo/docrails 2012-05-26 17:49:59 +05:30
Mark McSpadden
1d485d51f8 Reorder deep_symbolize_keys methods 2012-05-25 15:29:01 -05:00
Alexey Vakhov
cb25bce26f Fix unbalanced braces in Hash#typecast_xml_value internal comment 2012-05-25 18:30:56 +04:00
Alexey Vakhov
b4167d3f3e Fix Range#sum optimized version
At 1bd4d1c67459a91415ee73a8f55d2309c0d62a87 was added Range#sum
optimized version for arithmetic progressions. This improvment injected
a defect with not integer range boundaries. The defect was fixed by
e0adfa82c05f9c975005f102b4bcaebfcd17d241. The second commit really
disabled optimization at all because in Ruby integer-valued numbers are
instances of Fixnum and Bignum classes. We should #use is_a?
(#kind_of?) method instead #instance_of? to check if value is numerical:

    1.class                 # => Fixnum
    1.instance_of?(Integer) # => false
    1.is_a?(Integer)        # => true

    -100_000_000_000.class                 # => Bignum
    -100_000_000_000.instance_of?(Integer) # => false
    -100_000_000_000.is_a?(Integer)        # => true

Moreover original implementation of Range#sum has a defect with reverse
range boundaries. If the first boundary is less than the second range is
empty. Current commit fixes and tests this case too.
2012-05-25 17:46:53 +04:00
Alexey Vakhov
a1a16de49b Clean Date#beginning_of_month description
Unnecessary peace of text was injected at
507da04a149b44e20c5a0ba72a218fe1762b6baf by mistake.
2012-05-25 17:02:31 +04:00
Alexey Vakhov
d83411134b Update examples of Array #in_groups and #in_groups_of
Examples should be not square to visually underline a difference between
Array#in_groups and Array#in_groups_of.
2012-05-25 16:47:00 +04:00
Alexey Vakhov
05ae220d2e Fix ActiveSupport Cache decrement method description 2012-05-25 10:23:44 +04:00
Carlos Antonio da Silva
317f49493a Add missing requires for deep_dup and hash ext test 2012-05-24 19:18:28 -03:00
Mark McSpadden
2b5b60fc3c Add Hash#deep_transform_keys and Hash#deep_transform_keys! Also convert deep_*_keys to use deep_transform_keys. 2012-05-23 13:11:06 -05:00
Lucas Húngaro
a4bb195c91 Adding deep versions of stringify_keys and symbolize_keys (plain and bang) for nested hashes 2012-05-23 11:56:10 -03:00
Mark McSpadden
6ff887321b Add Hash#transform_keys and Hash#transform_keys! and refactor *_keys methods to use them. 2012-05-23 09:08:04 -05:00
Angelo capilleri
5646d65d01 changed xml type datetime to dateTime, fixes #6328
XmlMini define the xml 'datatime', but according to
http://www.w3.org/TR/xmlschema-2/#dateTime could be better
change this to 'dateTime' with upper case letter 'T.
So 'DateTime' and 'Time' are redefined from 'datetime' to 'dateTime'

add the changing to the changelog
2012-05-23 14:45:56 +02:00
Santiago Pastorino
344ea04865 Fix the build 2012-05-22 12:10:35 -03:00
Santiago Pastorino
38293ea828 require active_support/lazy_load_hooks where is needed 2012-05-22 11:33:03 -03:00
Jan Xie
a807db9d19 refactor lazy_load_hooks load position 2012-05-22 21:50:16 +08:00
Jan Xie
3ed92c876c remove useless require 2012-05-22 16:18:42 +08:00
Michael Koziarski
e44009aa2b Merge pull request #5125 from winston/log_exception_when_cache_read_fails
#read_entry in ActiveSupport::Cache::FileStore should log details of the exception when an exception is thrown
2012-05-21 19:02:48 -07:00
Alexey Vakhov
e4569b50d1 Add instance_accessor option to class_attribute 2012-05-22 00:28:34 +04:00
Piotr Sarnacki
2575508a38 Improve docs for try by adding note on BasicObject
[ci skip] closes #5790
2012-05-20 00:29:30 -07:00
Henrik Hodne
fa6d921e11 Remove blank trailing comments
For future reference, this is the regex I used: ^\s*#\s*\n(?!\s*#). Replace
with the first match, and voilà! Note that the regex matches a little bit too
much, so you probably want to `git add -i .` and go through every single diff
to check if it actually should be changed.
2012-05-20 01:29:13 +02:00
kennyj
3f1caaf23a Fix warning: shadowing outer local variable - constant. 2012-05-19 23:54:52 +09:00