Commit Graph

240 Commits

Author SHA1 Message Date
Marcel Molina
36fc181a57 Make HashWithIndifferentAccess#update behave like Hash#update by returning the hash. Closes #3419, #3425
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3388 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-01-08 21:29:47 +00:00
Sam Stephenson
e567a5eb1a Add ActiveSupport::JSON and Object#to_json for converting Ruby objects to JSON strings
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3356 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-12-27 03:11:03 +00:00
Sam Stephenson
85fe1ecaef Add Object#with_options for DRYing up multiple calls to methods having shared options
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3314 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-12-15 20:03:23 +00:00
Jeremy Kemper
e47c8381e1 Handle mutual dependencies with .rb suffix.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3193 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-28 20:39:26 +00:00
Jeremy Kemper
e7219e9e2a Introduce Dependencies.warnings_on_first_load setting. If true, enables warnings on first load of a require_dependency. Otherwise, loads without warnings. Disabled (set to false) by default.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3190 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-24 20:26:01 +00:00
Jeremy Kemper
52325f6bf8 Sever infinite loop for mutual dependencies. Closes #2997.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3181 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-24 05:43:27 +00:00
Jeremy Kemper
19f59b6eb1 Dependencies: set load_file_name = file_name if it ends in .rb
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3176 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-23 22:33:45 +00:00
Jeremy Kemper
b94d6c0654 Enable warnings on first load only. File which are loaded but raise an exception are not added to loaded set.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3169 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-23 21:31:51 +00:00
Jeremy Kemper
60091c1e2a r3241@asus: jeremy | 2005-11-20 23:26:28 -0800
Active Support is warnings-safe.  References #1792.


git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3135 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-21 07:29:51 +00:00
Jeremy Kemper
9a77e2f2be r3240@asus: jeremy | 2005-11-20 23:22:34 -0800
Introduce enable_warnings counterpart to silence_warnings.


git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3134 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-21 07:29:44 +00:00
Jeremy Kemper
d792427301 r3239@asus: jeremy | 2005-11-20 23:21:37 -0800
Test for absence of instance vars rather than nil so we don't get a warning.


git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3133 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-21 07:29:39 +00:00
Jeremy Kemper
d1ac316fa4 r3219@asus: jeremy | 2005-11-20 03:07:19 -0800
silence necessary warnings in logger test.  guard against multiple requires in kernel test.


git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3131 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-21 07:29:27 +00:00
Jeremy Kemper
7ed37c82a9 r3218@asus: jeremy | 2005-11-20 03:06:32 -0800
alias old format_message before overriding it


git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3130 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-21 07:29:22 +00:00
Jeremy Kemper
ddc863c134 r3217@asus: jeremy | 2005-11-20 03:06:01 -0800
warnings-safe inherited alias for class_inheritable_attributes


git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3129 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-21 07:29:17 +00:00
Jeremy Kemper
3148216cbb r3216@asus: jeremy | 2005-11-20 03:05:20 -0800
simplify cattr_ and mattr_accessor


git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3128 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-21 07:29:12 +00:00
Jeremy Kemper
a821c3dd93 r3215@asus: jeremy | 2005-11-20 02:05:56 -0800
Eliminate double-requires due to Ruby seeing different paths to the same file.


git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3127 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-21 07:29:04 +00:00
Jeremy Kemper
1a44b9cf1a r3214@asus: jeremy | 2005-11-20 02:03:05 -0800
Parenthesize args in Inflections


git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3126 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-21 07:28:59 +00:00
Jeremy Kemper
27f96c7d11 r3213@asus: jeremy | 2005-11-20 02:01:28 -0800
Turn on warnings for tests.


git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3125 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-21 07:28:54 +00:00
Jeremy Kemper
edc7c521b8 Turn warnings on when loading a file if Dependencies.mechanism == :load. Common mistakes such as redefined methods will print warnings to stderr. References #752. References #1792.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3124 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-21 07:06:33 +00:00
Marcel Molina
dd198e259f Pull out Array#to_strings in favor of more general Symbol#to_proc.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3119 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-21 02:17:10 +00:00
Marcel Molina
69bf71f5e9 Add Symbol#to_proc, which allows for, e.g. [:foo, :bar].map(&:to_s).
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3118 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-21 02:15:32 +00:00
Marcel Molina
5d785dbc11 Add Array#to_strings which to_s's all elements in an array.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3114 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-20 22:36:02 +00:00
Marcel Molina
baa2ab5ac3 Add extended_by, extend_with_included_modules_from and copy_instance_variables_from to Object.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3113 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-20 22:32:40 +00:00
Marcel Molina
5cb2aa722d Rename Version constant to VERSION. Closes #2802.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3065 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-17 00:32:16 +00:00
Nicholas Seckar
1cc8ab865f Change Inflector#constantize to use eval instead of const_get
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3049 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-16 00:56:16 +00:00
Nicholas Seckar
41e4173fd6 Fix const_missing handler to ignore the trailing '.rb' on files when comparing paths.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2976 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-10 20:32:13 +00:00
David Heinemeier Hansson
cd2b9a9498 Made ready for 0.14.3 (RC4)
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2930 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-07 19:40:27 +00:00
David Heinemeier Hansson
6ab9f2bb40 Fix READMEs (closes #2680) [coffee2code]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2908 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-07 09:51:47 +00:00
Sam Stephenson
5feb3124d4 Define kernel.rb methods in "class Object" instead of "module Kernel" to work around a Windows peculiarity
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2902 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-07 02:26:20 +00:00
Nicholas Seckar
24064910d0 Fix broken tests caused by incomplete loading of active support.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2901 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-07 01:48:33 +00:00
Jeremy Kemper
8210f70c7c Fix status pluralization bug so status_codes doesn't get pluralized as statuses_code. Closes #2758.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2900 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-07 01:20:54 +00:00
Sam Stephenson
645de33912 Added Kernel#silence_stderr to silence stderr for the duration of the given block. Changed Kernel#` to print a message to stderr (like Unix) instead of raising Errno::ENOENT on Win32.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2899 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-07 00:37:32 +00:00
Jeremy Kemper
f109bfb765 Restore the fast Numeric#blank? Closes #2714.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2853 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-03 01:32:25 +00:00
Jeremy Kemper
ac58ba60f6 Changed 0.blank? to false rather than true since it violates everyone's expectation of blankness. Closes #2518, Closes #2705.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2849 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-02 15:37:58 +00:00
Nicholas Seckar
727162e7fd When loading classes using const_missing, raise a NameError if and only if the file we tried to load was not present.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2771 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-10-27 17:40:48 +00:00
David Heinemeier Hansson
0d52abfd0e Added petabytes and exebytes to numeric extensions (closes #2397) [timct@mac.com]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2746 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-10-26 13:10:03 +00:00
David Heinemeier Hansson
fabf34848e Added Time#end_of_month to accompany Time#beginning_of_month (closes #2514) [Jens-Christian Fischer]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2745 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-10-26 13:07:22 +00:00
David Heinemeier Hansson
c7a6b9862d Prepared for release of 0.14.2 (RC3)
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2737 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-10-25 22:11:48 +00:00
David Heinemeier Hansson
8ac9638646 A little spacing goes a long way
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2717 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-10-24 13:33:58 +00:00
Jeremy Kemper
b57c86ae74 r3689@sedna: jeremy | 2005-10-16 10:24:36 -0700
Ticket 2404 - delete fixtures after using them
 r3744@sedna:  jeremy | 2005-10-23 12:28:28 -0700
 track dirty and loaded fixtures more carefully
 r3745@sedna:  jeremy | 2005-10-23 12:29:39 -0700
 fix broken tests
 r3756@sedna:  jeremy | 2005-10-23 15:51:00 -0700
 Global Logger.silencer switch for Logger#silence.
 r3757@sedna:  jeremy | 2005-10-23 15:51:35 -0700
 Correct changelogs


git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2715 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-10-23 20:00:05 +00:00
Marcel Molina
b23c72fd42 Add title case method to String to do, e.g., 'action_web_service'.titlecase # => 'Action Web Service'.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2690 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-10-19 20:20:11 +00:00
David Heinemeier Hansson
2555b885ed Really ready for release
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2687 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-10-19 14:28:55 +00:00
Nicholas Seckar
60b6fac5de Remove generated code from app traces; improve accuracy of framework traces
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2676 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-10-18 14:06:34 +00:00
David Heinemeier Hansson
e906ec7f36 Dont include unnecessary active support classes in docs
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2661 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-10-16 22:31:55 +00:00
David Heinemeier Hansson
f4aaa26eb3 Getting ready for 0.14.0 (1.0.0 Release Candidate 1)
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2660 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-10-16 22:15:03 +00:00
Nicholas Seckar
57f43473d7 Update Exception extension to show the first few framework frames in an application trace.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2654 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-10-16 17:47:19 +00:00
Jamis Buck
d7e6161b6c Don't rdoc the Version module
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2651 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-10-16 16:04:24 +00:00
Nicholas Seckar
8103d373e6 Add unit tests for exception extensions
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2646 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-10-16 14:23:28 +00:00
Nicholas Seckar
49ec08aaa7 Added Extension extension to provide support for clean backtraces.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2623 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-10-15 19:03:38 +00:00
Nicholas Seckar
43c34e20d2 Updated whiny nil to be more concise and useful.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2602 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-10-15 02:24:05 +00:00