Commit Graph

2891 Commits

Author SHA1 Message Date
Prem Sichanugrist
733bfa63f5 Remove #among? from Active Support
After a long list of discussion about the performance problem from using varargs and the reason that we can't find a great pair for it, it would be best to remove support for it for now.

It will come back if we can find a good pair for it. For now, Bon Voyage, `#among?`.
2011-04-13 20:25:28 +08:00
Sebastian Martinez
a616e7a88c Update test name to the corresponding method name
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
2011-04-12 21:04:00 -03:00
David Heinemeier Hansson
d1575ae1b9 Change Object#either? to Object#among? -- thanks to @jamesarosen for the suggestion! 2011-04-12 00:23:07 +02:00
David Heinemeier Hansson
1d8bf4f4f9 Cant use inclusion in commands/application.rb as the frameworks havent all been required yet 2011-04-11 15:25:39 +02:00
Prem Sichanugrist
d6edaeeaf8 Fix failing test case on master
It turned out that I overlook at some replacements ..
2011-04-10 22:40:21 -07:00
Prem Sichanugrist
a9f3c9da01 Using Object#in? and Object#either? in various places
There're a lot of places in Rails source code which make a lot of sense to switching to Object#in? or Object#either? instead of using [].include?.
2011-04-11 03:17:09 +08:00
Prem Sichanugrist, Brian Morearty, John Reitano
635d991683 Add support for Object#in? and Object#either? in Active Support [#6321 state:committed]
This will allow you to check if an object is included in another object
or the list of objects or not.

This patch is derived from patch by Brian Morearty and John Reitano on
Lighthouse ticket. I've rewrite it and make sure that we support both
'another object' and 'list of objects' version, as it surely be useful
to support both.
2011-04-11 03:17:08 +08:00
Josh Kalderimis
e9020b4b5d added find_zone and find_zone! to AS timezones and changed the AS Railtie to use find_zone! as well as adding Railtie tests
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
2011-04-05 17:12:09 -03:00
Marc-Andre Lafortune
1c4db4d7c3 Raise on invalid timezone
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
2011-04-05 17:11:13 -03:00
Xavier Noria
3e24e9ebc2 Merge branch 'master' of git://github.com/lifo/docrails 2011-04-03 22:22:03 +02:00
Akira Matsuda
bd3cdeea35 s/ERb/ERB/g
The author of ERB sais, his eRuby implementation was originally named "ERb/ERbLight" and then renamed to "ERB" when started bundled as a Ruby standard lib.
http://www2a.biglobe.ne.jp/~seki/ruby/erb.html
2011-04-03 12:47:51 +09:00
Santiago Pastorino
99da42c299 Gem::Specification#has_rdoc= is deprecated since rubygems 1.7.0 2011-04-02 00:35:33 -03:00
David Heinemeier Hansson
0eb6e5e270 Moved Turn activation/dependency to railties 2011-03-31 16:20:59 -07:00
David Heinemeier Hansson
6eff04499e Add using Turn with natural language test case names if the library is available (which it will be in Rails 3.1) [DHH] 2011-03-31 12:25:04 -07:00
David Heinemeier Hansson
edf7c9a6a3 require turn only for minitest 2011-03-31 12:17:28 -07:00
David Heinemeier Hansson
b27057731c Use Turn to format all Rails tests and enable the natural language case names 2011-03-31 12:11:03 -07:00
David Heinemeier Hansson
2867093365 Delegate pending to skip if Minitest is available 2011-03-30 21:16:29 -07:00
Diego Carrion
a1edbf7206 parse dates to yaml in json arrays
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
2011-03-22 21:09:54 -03:00
Diego Carrion
7004434ad8 test json decoding with time parsing disabled with all backends and respect ActiveSupport.parse_json_times when converting to yaml
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
2011-03-22 21:09:54 -03:00
José Valim
9f5b1e1ed0 Revert "It should be possible to use ActiveSupport::DescendantTracker without getting ActiveSupport::Dependencies for free."
This reverts commit 46f6a2e3889bae420589f429b09722a37dbdf18d.

Caused failures on CI. rake test:isolated on activesupport directory show them.
2011-03-13 08:35:50 +01:00
Rolf Timmermans
1a3fe8ce42 Prevent callbacks in child classes from being executed more than once. 2011-03-13 01:35:29 +08:00
Rolf Timmermans
46f6a2e388 It should be possible to use ActiveSupport::DescendantTracker without getting ActiveSupport::Dependencies for free. 2011-03-13 01:33:10 +08:00
Rolf Timmermans
63c8ea9a6a adds a couple of missing AS dependencies 2011-03-12 14:30:09 +01:00
José Valim
53794cf7b5 Add missing require 'thread' to BufferedLogger. 2011-03-11 13:29:39 -08:00
Xavier Noria
ebe4fa5fbe move the conditional definition of Float#round down
Rails 3 cherry-picks as little as possible from Active Support. In particular
the framework requires the files where extensions are exactly defined, rather
than convenience entry points like float.rb and friends. Because of that, it
is better to define conditionally rather than require conditionally.
2011-03-09 18:51:54 +01:00
Andrei Kulakov
532b77077f Use Rubys own Float#round method in versions 1.9 and above 2011-03-10 01:30:51 +08:00
Aaron Pfeifer
9798ee2619 Add better test scenario for around callback return results 2011-03-08 15:01:06 +08:00
Aaron Pfeifer
df615f127e Allow access to a callback event's return result from around callbacks 2011-03-08 15:01:05 +08:00
Aaron Patterson
1408b942d9 removing stubs. 1.9.3 implements Date.today in C so mocking the return value of Time.now does nothing 2011-03-07 15:44:39 -08:00
Aaron Patterson
33f222b9e1 fixing some tests on ruby 1.9.3 2011-03-07 14:01:51 -08:00
Xavier Noria
a0d7247d15 reorganizes the RDoc of Hash#to_param 2011-03-07 22:20:24 +01:00
Xavier Noria
89ecc0a5dc Merge branch 'master' of git://github.com/lifo/docrails 2011-03-07 22:11:47 +01:00
Aaron Patterson
5968d7a658 do not test explicit equality of predicate methods, they should be allowed to return truthy or falsey objects 2011-03-07 09:36:07 -08:00
Aaron Patterson
a032212e7c refactor calls to to_param in expand_key method 2011-03-07 09:33:19 -08:00
Aaron Patterson
9cee693213 Merge branch 'master' of github.com:rails/rails
* 'master' of github.com:rails/rails: (44 commits)
  Fixed indentation in actionmailer base_test [#6538 state:committed]
  remove unused assigned variable
  removes merge conflicts
  removes Examples headers introduced in 9b96de6
  Revert "Fixed identation in actionmailer base_test"
  Report the correct value of nil.id in the exception message as different ruby implementations may have different values, for example Rubinius returns 53 for nil.id.
  Improve testing of cookies in functional tests: - cookies can be set using string or symbol keys - cookies are preserved across calls to get, post, etc. - cookie names and values are escaped - cookies can be cleared using @request.cookies.clear
  more style changes
  Some style changes
  style changes
  Revert "style changes"
  Raise ArgumentError if route name is invalid [#6517 state:resolved]
  style changes
  Allow model to be inherited from Hash [#6487 state:resolved]
  styles applied for usage
  added failing test for fields_for with a record object that inherits from Hash
  Fixed identation in actionmailer base_test
  wrong SQL statement
  commas to set off expressions that interrupt sentence flow
  typo changes
  ...
2011-03-07 08:50:50 -08:00
Dalibor Nasevic
55d2a211d3 Improved docs for Hash#to_param method 2011-03-06 23:54:18 +01:00
Akira Matsuda
071ddb8281 more "SSL everywhere" for GitHub URLs
see: https://github.com/blog/738-sidejack-prevention-phase-2-ssl-everywhere
2011-03-07 06:18:32 +09:00
Akira Matsuda
5bed37779a "SSL everywhere" for GitHub URLs
see: https://github.com/blog/738-sidejack-prevention-phase-2-ssl-everywhere
2011-03-07 05:56:02 +09:00
Xavier Noria
3a621e7be4 removes merge conflicts 2011-03-06 20:34:56 +01:00
Xavier Noria
89d825d021 Merge branch 'master' of git://github.com/lifo/docrails 2011-03-06 17:52:30 +01:00
Xavier Noria
6ce844a3c1 removes Examples headers introduced in 9b96de6
Example headers are discouraged in the API guidelines.
Code just flows with the text. They may be good in
places where there's a lot of stuff and structure may
add clarity
2011-03-06 17:49:39 +01:00
Andrew White
5e7ce47fb9 Report the correct value of nil.id in the exception message
as different ruby implementations may have different values,
for example Rubinius returns 53 for nil.id.

[#6444 state:resolved]
2011-03-06 15:23:31 +00:00
suchasurge
b99fb66fb7 more style changes 2011-03-06 10:44:52 +01:00
suchasurge
9b96de6f3d Some style changes 2011-03-06 10:26:24 +01:00
Aaron Patterson
09d3e89cf0 use sort_by instead of sort() 2011-03-05 20:01:06 -08:00
Xavier Noria
9092052cb0 merges rails 2011-03-05 12:06:43 +01:00
Xavier Noria
2076817629 revises the RDoc of Hash#reverse_merge 2011-03-05 11:57:32 +01:00
Xavier Noria
5f99a899a8 copy-edits 108561f 2011-03-05 11:57:32 +01:00
R.T. Lechow
273700cbd0 Active Support typos. 2011-03-05 11:56:34 +01:00
Jonathon D. Jones
3eca9d5b43 Adds link to Object.blank? from Object.present? 2011-03-05 11:56:33 +01:00