Commit Graph

277 Commits

Author SHA1 Message Date
Jeremy Kemper
70d7b3752f Test DateTime native type in migrations. References #7649.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6304 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-03-04 04:33:55 +00:00
Jeremy Kemper
543622959a DateTime calculations analogous to the Date and Time extensions. Closes #7693.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6303 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-03-04 04:12:42 +00:00
Michael Koziarski
1902ef6caa Give DateTime correct .to_s implementations, lets it play nice with ActiveRecord quoting. [gbuesing] Closes #7649
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6263 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-02-27 23:25:16 +00:00
Michael Koziarski
203932ec88 Add File.atomic_write to prevent users from seeing half written files. Useful for situations like Page Caching and the like. [Koz]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6262 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-02-27 23:16:06 +00:00
Michael Koziarski
c9770d8a5a Allow users to provide custom formatters to Logger. [aeden] Closes #7106, #2484
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6225 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-02-25 00:07:54 +00:00
Jeremy Kemper
002c0aeef3 Hash#to_query CGI-escapes its keys.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6148 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-02-11 06:29:04 +00:00
Jeremy Kemper
9daddf0116 Deprecation: warn on stderr if RAILS_DEFAULT_LOGGER isn't set yet.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6140 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-02-08 00:17:39 +00:00
Rick Olson
3340261515 Optimize Class Inheritable Attributes so that unnecessary hashes are not created. Closes #7472 [Bruce Perens]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6110 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-02-04 18:20:04 +00:00
Jeremy Kemper
593b1b837d Ruby 1.8-cvs and 1.9 define a private Time#to_date that overrides Active Support. Make it public to preserve compatibility.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6099 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-02-01 18:06:16 +00:00
Jeremy Kemper
50c1150e53 Mark the last release in the changelog.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6076 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-01-28 15:54:42 +00:00
Jeremy Kemper
b0ed5057e0 Full test coverage for Inflector. Closes #7228.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6075 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-01-28 15:52:45 +00:00
Jeremy Kemper
17fee001a9 :db format for Date#to_s
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6060 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-01-28 07:36:34 +00:00
Rick Olson
5e85a1c7f8 Added :instance_writer option to #mattr_writer/accessor, #cattr_writer/accessor, and #class_inheritable_writer to skip the creation of the instance writer. [Rick]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6050 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-01-28 01:18:51 +00:00
David Heinemeier Hansson
35433859bd Added Hash#to_query to turn a hash of values into a form-encoded query string [Nicholas Seckar]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6038 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-01-24 22:12:31 +00:00
Nicholas Seckar
6ee09b6a0a Increase test coverage for subclasses_of. Closes #7335.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6036 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-01-24 20:47:32 +00:00
Rick Olson
be7f86e37a Added test coverage for Inflector.inflections.clear. Closes #7179. [Rich Collins]. Remove unused code from Duration#inspect. Closes #7180. [Rich Collins]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6022 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-01-23 05:32:08 +00:00
Rick Olson
f3f691eaf2 A couple extra tests for #classify. Closes #7273. [Josh Susser]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6019 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-01-23 05:11:34 +00:00
Jamis Buck
1e9ce3c6a1 Better docs for Object extensions (closes #7002)
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6011 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-01-22 22:53:38 +00:00
Sam Stephenson
312e6edf91 Fix that Dates couldn't be subtracted from Dates after [5940].
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5954 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-01-15 22:02:11 +00:00
Jamis Buck
f28eef9a27 Add Object#acts_like? and Time#acts_like_time? and Date#acts_like_date? to facilitate duck-typing
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5951 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-01-15 17:12:32 +00:00
Michael Koziarski
276c9f29cd Make 1.months and friends accurate by introducing a Duration class. #6835 [eventualbuddha]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5940 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-01-15 06:54:50 +00:00
Jeremy Kemper
6714b39a13 Document Inflector.ordinalize and merge docs from String inflections. Closes #7023.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5924 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-01-14 12:18:51 +00:00
Jeremy Kemper
7b07baac27 Unbundle flexmock.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5917 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-01-13 07:15:07 +00:00
Nicholas Seckar
91b71ed30c Fix Dependencies.autoloaded? to ignore anonymous modules. Closes #6561.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5811 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-12-31 18:53:58 +00:00
Nicholas Seckar
e2acd16810 Update load once paths to prevent nested once constants from being detected and claimed by an external non-once load. References #6720
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5782 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-12-24 14:53:35 +00:00
Jeremy Kemper
8a73d4fe6f Deprecation: silence warnings when reporting test errors.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5728 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-12-17 08:21:45 +00:00
Jeremy Kemper
86deb27095 Hash#slice(*keys) returns a new hash with only the given keys. #slice! replaces the hash with only the given keys. Works with HashWithIndifferentAccess also.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5726 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-12-17 00:49:41 +00:00
Jeremy Kemper
05a5209f82 HashWithIndifferentAccess#to_hash converts to a Hash with String keys and the same default value. Fix Hash#reverse_update to be an alias for reverse_merge./script/console More thoroughly test the reverse_* methods.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5725 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-12-16 23:48:24 +00:00
Nicholas Seckar
6a485c3100 Fix remove_constant to correctly handle constant names of the form "::A::...". References #6720.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5710 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-12-09 05:21:33 +00:00
David Heinemeier Hansson
0297b31b82 Fixed Array#to_xml when it contains a series of hashes (each piece would get its own XML declaration) (closes #6610) [thkarcher/cyu]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5668 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-12-03 16:47:53 +00:00
David Heinemeier Hansson
eacca8d7e6 Added Time#to_s(:time) which will just return H:M, like 17:44 [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5628 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-11-25 23:56:28 +00:00
Marcel Molina
309a6bd550 Add Module#attr_accessor_with_default to initialize value of attribute before setting it. Closes #6538. [Stuart Halloway, Marcel Molina Jr.]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5539 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-11-16 19:35:13 +00:00
Jeremy Kemper
b97ffa2a4f Hash#to_xml handles keys with the same name as Kernel methods. Closes #6613.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5521 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-11-14 09:08:40 +00:00
David Heinemeier Hansson
79c309e43b Added Time#end_of_day to get 23:59:59 of that day [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5495 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-11-12 03:05:18 +00:00
Sam Stephenson
2516063f61 Don't quote hash keys in Hash#to_json if they're valid JavaScript identifiers.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5486 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-11-11 18:25:26 +00:00
Rick Olson
510092c681 Lazily load the Unicode Database in the UTF-8 Handler [Rick Olson]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5476 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-11-09 19:40:32 +00:00
Nicholas Seckar
ad06514257 Update dependencies to delete partially loaded constants.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5464 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-11-07 20:45:36 +00:00
Jeremy Kemper
7b453d2844 Fix unicode JSON regexp for Onigurama compatibility. Closes #6494.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5432 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-11-05 19:03:37 +00:00
Michael Koziarski
ea433f15bf update XmlSimple to 1.0.10. Closes #6532. [nicksieger]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5414 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-11-02 20:10:53 +00:00
Jeremy Kemper
0ee5d64c34 Remove dupe entry.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5410 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-11-02 19:14:16 +00:00
David Heinemeier Hansson
4559840a32 Resolved the conflict
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5407 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-11-02 18:14:16 +00:00
Jeremy Kemper
5ba85d84fb next_week respects DST changes. Closes #5617, closes #2353, closes #2509, references #4551.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5388 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-11-02 01:52:11 +00:00
Nicholas Seckar
5cc682da07 Update dependencies to allow constants to be defined alongside their siblings.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5386 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-11-01 23:21:13 +00:00
Jeremy Kemper
0f5f05b51e next_week respects DST changes. Closes #6483.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5363 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-10-24 23:35:27 +00:00
Marcel Molina
ba5591f212 Expose methods added to Enumerable in the documentation, such as group_by. Closes #6170.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5334 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-10-22 03:04:50 +00:00
Michael Koziarski
911f3db00a Ensure Chars#tidy_bytes only tidies broken bytes. Closes #6397 [Manfred Stienstra]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5316 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-10-17 08:29:16 +00:00
Nicholas Seckar
497b5dcf19 Add 'unloadable', a method used to mark any constant as requiring an unload after each request.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5307 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-10-15 23:32:31 +00:00
Michael Koziarski
48cef84150 Make core_ext/string/access.rb multibyte safe. Closes #6388 [Manfred Stienstra]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5287 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-10-12 21:03:32 +00:00
Michael Koziarski
cb927c8774 Make String#chars slicing behaviour consistent with String. Closes #6387 [Manfred Stienstra]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5286 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-10-12 21:00:34 +00:00
Michael Koziarski
e899190826 Pull in latest multibyte patch. Closes #6346 [Manfred Stienstra]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5224 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-10-04 09:03:57 +00:00