Commit Graph

538 Commits

Author SHA1 Message Date
David Heinemeier Hansson
22af62cf48 Added Array#second through Array#tenth as aliases for Array#[1] through Array#[9] [DHH] 2008-06-17 17:37:29 -05:00
David Heinemeier Hansson
ba0f38f89e Change Enumberal#several? to Enumberal#many? 2008-06-13 17:34:17 -05:00
David Heinemeier Hansson
a3caf28da3 Added Object#present? which is equivalent to !Object#blank? [DHH] 2008-06-12 18:30:56 -05:00
David Heinemeier Hansson
ea3a7e1bb1 Merge branch 'master' of git@github.com:rails/rails 2008-06-12 17:48:30 -05:00
David Heinemeier Hansson
556204abaf Added Enumberable#several? to encapsulate collection.size > 1 [DHH] 2008-06-12 17:46:15 -05:00
Jeremy Kemper
16a9787bf0 Add empty setup and teardown methods to rule out default setup behavior in base class 2008-06-09 23:04:51 -07:00
Jeremy Kemper
6c970d79a0 Performance: faster Object.subclasses_of 2008-06-08 00:35:36 -07:00
Joshua Peek
ceb5b6dbb1 Wrap date part value method tests inside a uses mocha block. 2008-06-07 23:25:34 -05:00
Jeremy Kemper
566d717d78 Move Class::ModelName to Active Support module core_ext 2008-06-06 03:38:05 -07:00
Joshua Peek
5fe2878973 Renamed StringQuestioneer to StringInquirer. 2008-06-04 15:06:32 -05:00
Joshua Peek
6e85f14817 Namespaced StringQuestioneer under ActiveSupport. 2008-06-04 15:02:51 -05:00
David Heinemeier Hansson
8afa725f4b Wrapped Rails.env in StringQuestioneer so you can do Rails.env.development? [DHH] 2008-06-03 17:44:56 -05:00
Steve Purcell
7cfa6ec8a3 Add more standard Hash methods to ActiveSupport::OrderedHash [#314 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2008-06-03 14:15:33 -05:00
Joshua Peek
a977f3e88e Fixed ambiguous first argument warning in ArrayExtTest. 2008-06-03 13:35:03 -05:00
Joshua Peek
c08547d226 Namespace Inflector, Dependencies, OrderedOptions, and TimeZone under ActiveSupport [#238 state:resolved] 2008-06-03 13:32:53 -05:00
David Heinemeier Hansson
da91450e68 Added tests [#279 state:resolved] (Nicholas Schlueter) 2008-06-02 22:05:27 -05:00
David Heinemeier Hansson
64fea9c45c Fixed Date#end_of_quarter to not blow up on May 31st [#289 state:resolved] (Danger) 2008-06-02 22:02:43 -05:00
David Heinemeier Hansson
a855ab89b7 Added a test for Gzip 2008-06-02 17:42:10 -05:00
Tom Ward
77e45352e7 Fixed Dependencies so load errors are not masked behind a 'Expected x.rb to define X' message when mechanism is not set to :load [#87 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2008-05-31 13:33:38 -07:00
gbuesing
f88267d532 TimeZone#to_s shows offset as GMT instead of UTC, because GMT will be more familiar to end users (see time zone selects used by Windows OS, google.com and yahoo.com.) Reverts [8370] 2008-05-25 11:56:29 -05:00
Tom Ward
ebb642fa3a Fix Dependencies watch_frames collection. [#24 state:resolved]
Previously, the code collecting watch_frames could fail leaving
watch_frames defined but nil. The cleanup code checks watch_frames
is defined, but not that it holds a value, raising an undefined method
on NilClass error rather than the original cause.  This can make
debugging the underlying cause a total pain.

Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2008-05-20 11:44:23 +01:00
gbuesing
cee9297c9b Hash.from_xml: datetime xml types overflow to Ruby DateTime class when out of range of Time. Adding tests for utc offsets 2008-05-18 11:48:33 -05:00
gbuesing
cde9c09a52 TimeWithZone #+ and #- : ensure overflow to DateTime with Numeric arg 2008-05-18 11:15:29 -05:00
gbuesing
be85868987 Time#to_json: don't convert to utc before encoding. References #175 2008-05-18 10:48:11 -05:00
Joshua Peek
49846f8586 Create a seperate file for ActiveSupport::OrderedHash. 2008-05-14 12:48:37 -05:00
Daniel Morrison
f498f221bd Include time zone offset in TimeWithZone#to_json 2008-05-13 09:50:45 -07:00
Pratik Naik
2270371f5d Remove unnecessary DeprecatedInstanceVariable class 2008-05-13 10:39:45 +01:00
gbuesing
66728087d0 Adding Date.current, which returns Time.zone.today if config.time_zone is set; otherwise returns Date.today. ActionView date_helper uses Date.current to determine locale-appropriate default 2008-05-08 22:48:47 -05:00
gbuesing
4f03190f26 TimeWithZone: date part getter methods (#year #mon #day etc) are defined on class; no longer relying on method_missing 2008-05-08 22:07:21 -05:00
gbuesing
06a7c2948a Time.zone.parse: return nil for strings with no date information 2008-05-08 21:30:17 -05:00
gbuesing
fb9bf16e96 Time.zone.parse: compatibility with far future date with time zone offset in string. Eliminate creation of additional TimeWithZone instance to determine utc offset. 2008-05-08 20:56:38 -05:00
Scott Fleckenstein
eb5b93be74 Fix Time.zone.parse from stripping time zone information and make Time aware attribute methods use Time.zone.parse instead of to_time 2008-05-08 19:25:31 -05:00
Pratik Naik
a53331a161 Add class to deprecate instance variables
Add ActiveSupport::Deprecation::DeprecatedInstanceVariable class to
deprecate instance variables of primitive types such as stings.
2008-05-06 11:52:44 +01:00
Sean Ouimet
d75525b045 Added OrderedHash#delete [#113 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2008-05-05 10:03:11 -05:00
Jeremy Kemper
c699a4daf1 Ruby 1.9 compat: compatibility wrapper for new Module#const_defined? behavior 2008-05-01 13:34:31 -07:00
gbuesing
32b82e4c6f Duration #since and #ago with no argument (e.g., 5.days.ago) return TimeWithZone when config.time_zone is set. Introducing Time.current, which returns Time.zone.now if config.time_zone is set, otherwise just returns Time.now 2008-04-20 21:57:04 -05:00
Joshua Peek
cf04e62127 Tidy up ActiveSupport::Callbacks::CallbackChain instance API. 2008-04-17 23:30:01 -05:00
jweiss
9e1d506a8c Support options passed to ActiveSupport::Cache :mem_cache_store [#14 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2008-04-17 12:58:31 -05:00
gbuesing
9620372a6d Time#since behaves correctly when passed a Duration. Closes #11527 [kemiller] 2008-04-12 19:35:47 -05:00
gbuesing
f285b6119b Add #getutc alias for DateTime#utc 2008-04-12 17:37:50 -05:00
gbuesing
7e5aa6569b TimeWithZone respects config.active_support.use_standard_json_time_format 2008-04-12 16:48:56 -05:00
Rick Olson
605196c448 Add config.active_support.escape_html_entities_in_json to allow disabling of html entity escaping. [rick]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9238 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-08 03:45:26 +00:00
Geoff Buesing
49f2e6f8d4 Time #yesterday and #tomorrow behave correctly crossing DST boundary. Closes #7399 [sblackstone]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9221 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-04 03:29:30 +00:00
Geoff Buesing
2c6f1d4396 TimeWithZone: Adding tests for dst and leap day edge cases when advancing time
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9213 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-02 14:15:30 +00:00
Pratik Naik
3b603bbc93 Revert [9209] Use Hash#except
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9210 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-02 12:47:52 +00:00
Pratik Naik
adaed1ebcb Adding Hash#without Closes #7369 [eventualbuddha]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9209 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-02 11:45:03 +00:00
Geoff Buesing
f4dc834976 TimeWithZone#method_missing: send to utc to advance with dst correctness, otherwise send to time. Adding tests for time calculations methods
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9208 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-02 06:56:44 +00:00
Rick Olson
1eb57a6870 Add config.active_support.use_standard_json_time_format setting so that Times and Dates export to ISO 8601 dates. [rick]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9203 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-01 20:25:26 +00:00
Jeremy Kemper
2cf72ad250 Add query methods for superclass_delegating_reader
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9156 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-31 01:09:39 +00:00
Jeremy Kemper
ade1e3defd require fileutils
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9154 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-31 01:09:19 +00:00