Commit Graph

3434 Commits

Author SHA1 Message Date
Francesco Rodriguez
55f8b0d09e add example to AS::Deprecation#deprecate_methods [ci skip] 2012-06-18 15:00:58 -05:00
Francesco Rodriguez
508538066c add example to AS::Deprecation#silence [ci skip] 2012-06-17 12:31:40 -05:00
Vijay Dev
c1474ff2e7 Merge branch 'master' of github.com:lifo/docrails 2012-06-14 22:52:38 +05:30
Aaron Patterson
56a1bb2f10 raise the same exception in order to keep path info
Ruby 2.0.0 implements LoadError#path, but newly raised load errors will
not contain the path information.  Replace the error message, copy
blame, and rereaise the same exception object
2012-06-12 16:19:51 -07:00
José Valim
122f6de2e0 Merge pull request #6711 from takkanm/fix-warning-LoadError-path-method
fix method redefined warning in Ruby2.0
2012-06-12 02:34:07 -07:00
Mitsutaka Mimura
a599c034fd fix method redefined warning in Ruby2.0
Ruby2.0 already has LoadError#path.
2012-06-12 17:41:53 +09:00
José Valim
5ea2b11ad7 Stop relying on mutable structures in the FileUpdateChecker 2012-06-12 10:36:13 +02:00
takkanm
fa1ea34c5c fix warning in Ruby2.0.0
```
rails/activesupport/lib/active_support/multibyte/chars.rb:136: warning:
character class has duplicated range: /\b('?[\S])/
```
2012-06-11 13:25:46 +09:00
Xavier Noria
d3a99c32d1 removes the obsolete require_association method from dependencies
This is an obsolete method from the very early days,
apparently it was used circa 2004 because STI support
was not smart enough. This method is not public
interface, and we are heading a major version, so
removal seems right.
2012-06-10 00:38:40 +02:00
Carlos Antonio da Silva
b4fb80cbda Merge pull request #6645 from amatsuda/reduce_string_instance
Reduce number of String instance
2012-06-06 08:49:38 -07:00
Akira Matsuda
7fe6002793 MiniTest::Spec shipped with Ruby >= 1.9.3 always responds_to __name__ 2012-06-06 22:00:43 +09:00
Akira Matsuda
2635a29fec no need to to_s here. Both String and Symbol can be interpolated into String 2012-06-06 19:33:38 +09:00
Akira Matsuda
099639670a Symbol responds_to :upcase & :downcase in Ruby >= 1.9 2012-06-06 19:33:38 +09:00
Akira Matsuda
edee2c7b3b stop to_sing method names
Module#methods are Symbols in Ruby >= 1.9
2012-06-06 19:33:38 +09:00
Mark Rushakoff
5907b0b7f2 Document ActiveSupport::JSON.parse_error [ci skip] 2012-06-05 20:42:08 -07:00
Francesco Rodriguez
1790b234e4 add :nodoc: to AS::NumberHelper private methods [ci skip] 2012-06-05 15:53:20 -05:00
Andrew White
870310db6a Eliminate dependency on Rails::VERSION::STRING
To facilitate the use of ActiveSupport::Testing::Performance outside
of a Rails application conditionally check for the presence of
Rails::VERSION::STRING before including it in the environment string.
2012-06-05 20:43:41 +01:00
Francesco Rodriguez
5e1d40f773 add instance_accessor option to ActiveSupport::Configurable#config_accessor
Changes:

* Add `instance_accessor` option to opt out of the instance writer and
  instance reader methods.
* Raises a NameError if the name of the attribute is not valid.
* Update documentation and tests.
* Add CHANGELOG entry in activesupport.
2012-06-05 10:50:48 -05:00
Francesco Rodriguez
20ded911c0 add example to AS::Gzip 2012-06-04 23:43:43 -05:00
Francesco Rodriguez
4072de266a remove double hyphen that doesn't allow properly parsing 2012-06-04 23:21:48 -05:00
Vijay Dev
40d5303b4f Merge branch 'master' of github.com:lifo/docrails 2012-06-02 21:50:02 +05:30
Rafael Mendonça França
a769fe9db1 Revert some ActiveSupport::Callbacks changes.
This reverts commits 911a0859ac065aa8e8834ac985353d659c7c7b65 and
30b31f51af6f7094c4a27b086755fc66c368d6fa.

Reason: these changes make the Active Model tests fail randomly.

Some examples:
http://travis-ci.org/#!/rails/rails/jobs/1498992
http://travis-ci.org/#!/rails/rails/jobs/1496948
http://travis-ci.org/#!/rails/rails/jobs/1489985

This script was used to reproduce these breaks:
https://gist.github.com/f6828a03ee4d40bffbc3

200 times, 0 failures
2012-06-01 15:14:06 -03:00
Andrew White
67b94799c2 Reduce warning messages when running Active Support tests
Eliminate the warnings generated by redefining methods and constants.
2012-05-31 17:18:25 +01:00
Piotr Sarnacki
aab0d4e2c6 Merge pull request #6554 from erichmenge/remove-json-variable
Remove deprecated ActiveSupport::JSON::Variable.
2012-05-30 13:04:33 -07:00
Erich Menge
1f5dddcf2f Remove deprecated ActiveSupport::JSON::Variable. 2012-05-30 14:39:00 -05:00
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