CHANGELOG in activesupport-3.0.0.rc vs CHANGELOG in activesupport-3.0.0.rc2
- old
+ new
@@ -1,5 +1,10 @@
+*Rails 3.0.0 [release candidate 2] (August 23rd, 2010)*
+
+* No material changes (see http://github.com/rails/rails/compare/v3.0.0_RC...v3.0.0_RC2 for gory details)
+
+
*Rails 3.0.0 [release candidate] (July 26th, 2010)*
* Removed Object#returning, Object#tap should be used instead. [Santiago Pastorino]
* Deprecation behavior is no longer hardcoded to the name of the environment.
@@ -88,11 +93,11 @@
* Reduced load time by deferring configuration of classes using
ActiveSupport::on_load(:component_name) [YK]
* Rename #metaclass to #singleton_class now that ruby-core has decided [JK]
-* New assertions assert_blank and assert_present. #4299 [Juanjo Bazan]
+* New assertions assert_blank and assert_present. #4299 [Juanjo Bazan]
* Use Object#singleton_class instead of #metaclass. Prefer Ruby's choice. [Jeremy Kemper]
* JSON backend for YAJL. Preferred if available. #2666 [Brian Lopez]
@@ -241,14 +246,14 @@
* Changed cache benchmarking to be reported in milliseconds [David Heinemeier Hansson]
* Fix Ruby's Time marshaling bug in pre-1.9 versions of Ruby: utc instances are now correctly unmarshaled with a utc zone instead of the system local zone [#900 state:resolved] [Luca Guidi, Geoff Buesing]
* Add Array#in_groups which splits or iterates over the array in specified number of groups. #579. [Adrian Mugnolo] Example:
-
+
a = (1..10).to_a
- a.in_groups(3) #=> [[1, 2, 3, 4], [5, 6, 7, nil], [8, 9, 10, nil]]
- a.in_groups(3, false) #=> [[1, 2, 3, 4], [5, 6, 7], [8, 9, 10]]
+ a.in_groups(3) # => [[1, 2, 3, 4], [5, 6, 7, nil], [8, 9, 10, nil]]
+ a.in_groups(3, false) # => [[1, 2, 3, 4], [5, 6, 7], [8, 9, 10]]
* Fix TimeWithZone unmarshaling: coerce unmarshaled Time instances to utc, because Ruby's marshaling of Time instances doesn't respect the zone [Geoff Buesing]
* Added Memoizable mixin for caching simple lazy loaded attributes [Josh Peek]
@@ -329,19 +334,19 @@
* Add config.active_support.use_standard_json_time_format setting so that Times and Dates export to ISO 8601 dates. [Rick Olson]
* TZInfo: Removing unneeded TimezoneProxy class [Geoff Buesing]
-* TZInfo: Removing unneeded TimezoneIndexDefinition, since we're not including Indexes::Timezones [Geoff Buesing]
+* TZInfo: Removing unneeded TimezoneIndexDefinition, since we're not including Indexes::Timezones [Geoff Buesing]
* Removing unnecessary uses_tzinfo helper from tests, given that TZInfo is now bundled [Geoff Buesing]
* Bundling abbreviated version of TZInfo gem 0.3.8: only the classes and zone definitions required to support Rails time zone features are included. If a recent version of the full TZInfo gem is installed, this will take precedence over the bundled version [Geoff Buesing]
* TimeWithZone#marshal_load does zone lookup via Time.get_zone, so that tzinfo/Olson identifiers are handled [Geoff Buesing]
-* Time.zone= accepts TZInfo::Timezone instances and Olson identifiers; wraps result in TimeZone instance [Geoff Buesing]
+* Time.zone= accepts TZInfo::Timezone instances and Olson identifiers; wraps result in TimeZone instance [Geoff Buesing]
* TimeWithZone time conversions don't need to be wrapped in TimeOrDateTime, because TZInfo does this internally [Geoff Buesing]
* TimeWithZone#usec returns 0 instead of error when DateTime is wrapped [Geoff Buesing]
@@ -431,11 +436,11 @@
* Time.zone uses thread-local variable for thread safety. Adding Time.use_zone, for overriding Time.zone locally inside a block. Removing unneeded Time.zone_reset! [Geoff Buesing]
* TimeZone#to_s uses UTC rather than GMT; reapplying change that was undone in [8679]. #1689 [Cheah Chu Yeow]
-* Time.days_in_month defaults to current year if no year is supplied as argument #10799 [Radar], uses Date.gregorian_leap? to determine leap year, and uses constant lookup to determine days in month [Geoff Buesing]
+* Time.days_in_month defaults to current year if no year is supplied as argument #10799 [Radar], uses Date.gregorian_leap? to determine leap year, and uses constant lookup to determine days in month [Geoff Buesing]
* Adding Time and DateTime #compare_with_coercion, which layers behavior on #<=> so that any combination of Time, DateTime and ActiveSupport::TimeWithZone instances can be chronologically compared [Geoff Buesing]
* TimeZone#now returns an ActiveSupport::TimeWithZone [Geoff Buesing]
@@ -508,11 +513,11 @@
* Fix JSON encoding/decoding bugs dealing with /'s. Closes #9990 [Rick Olson, theamazingrando]
* Introduce a base class for all test cases used by rails applications. ActiveSupport::TestCase [Michael Koziarski]
- The intention is to use this to reduce the amount of monkeypatching / overriding that
+ The intention is to use this to reduce the amount of monkeypatching / overriding that
is done to test/unit's classes.
* Document Enumerable and Hash #to_json. #9970 [Cheah Chu Yeow]
* Hash#to_xml handles symbol values. #9954 [Assaf]
@@ -677,18 +682,18 @@
<person>
<name>David</name>
<avatar type="file" name="me.jpg" content_type="image/jpg">R0lGODlhkACZAPUAAM5lcfjrtMQCG=\n</avatar>
</person>
-
+
...becomes:
-
+
attributes = { :person => { :name => "David", :avatar => #<StringIO> } }
attributes[:person][:avatar].content_type # => "image/jpg"
attributes[:person][:avatar].original_filename # => "me.jpg"
attributes[:person][:avatar].read # => binary data of the file
-
+
Which is duck-type compatible with the files that you get when doing multipart uploads through HTML.
* Improved multibyte performance by relying less on exception raising #8159 [Blaine]
* Use XSD-compatible type names for Hash#to_xml and make the converters extendable #8047 [Tim Pope]
@@ -887,15 +892,15 @@
* Added Module#alias_attribute [Jamis/David Heinemeier Hansson]. Example:
class Content < ActiveRecord::Base
# has a title attribute
end
-
+
class Email < ActiveRecord::Base
alias_attribute :subject, :title
end
-
+
e = Email.find(1)
e.title # => "Superstars"
e.subject # => "Superstars"
e.subject? # => true
e.subject = "Megastars"
@@ -940,23 +945,23 @@
alias_method :save!, :save_with_validation!
* Enhance Symbol#to_proc so it works with list objects, such as multi-dimensional arrays. Closes #5295 [nov@yo.rim.or.jp]. Example:
{1 => "one", 2 => "two", 3 => "three"}.sort_by(&:first).map(&:last)
- #=> ["one", "two", "three"]
+ # => ["one", "two", "three"]
* Added Hash.create_from_xml(string) which will create a hash from a XML string and even typecast if possible [David Heinemeier Hansson]. Example:
Hash.create_from_xml <<-EOT
<note>
<title>This is a note</title>
<created-at type="date">2004-10-10</created-at>
</note>
EOT
-
+
...would return:
-
+
{ :note => { :title => "This is a note", :created_at => Date.new(2004, 10, 10) } }
* Added Jim Weirich's excellent FlexMock class to vendor (Copyright 2003, 2004 by Jim Weirich (jim@weriichhouse.org)) -- it's not automatically required, though, so require 'flexmock' is still necessary [David Heinemeier Hansson]
* Fixed that Module#alias_method_chain should work with both foo? foo! and foo at the same time #4954 [anna@wota.jp]
@@ -964,44 +969,44 @@
* to_xml fixes, features, and speedup: introduce :dasherize option that converts updated_at to updated-at if true (the existing default); binary columns get encoding="base64" attribute; nil values get nil="true" attribute to distinguish empty values; add type information for float columns; allow arbitrarily deep :include; include SQL type information as the type attribute. #4989 [Blair Zajac <blair@orcaware.com>]
* Add OrderedHash#values. [Sam Stephenson]
* Added Array#to_s(:db) that'll produce a comma-separated list of ids [David Heinemeier Hansson]. Example:
-
+
Purchase.find(:all, :conditions => "product_id IN (#{shops.products.to_s(:db)})"
-* Normalize classify's argument to a String so that it plays nice with Symbols. [Marcel Molina Jr.]
+* Normalize classify's argument to a String so that it plays nice with Symbols. [Marcel Molina Jr.]
* Strip out leading schema name in classify. References #5139. [Michael Schoen]
* Remove Enumerable#first_match since break(value) handles the use case well enough. [Nicholas Seckar]
Enumerable#first_match was like detect, but instead of returning the matching element, the yielded value returned. For example:
-
+
user_xml = adapters(:from => User, :to => Xml).first_match do |adapter|
adapter.adapt @user
end
-
+
But this is just as easily done with:
-
+
user_xml = adapters(:from => User, :to => Xml).each do
break adapter.adapt(@user)
end
-
-* Make Array#in_groups_of just return the grouped collection if a block isn't given. [Marcel Molina Jr.]
+* Make Array#in_groups_of just return the grouped collection if a block isn't given. [Marcel Molina Jr.]
+
* Don't destroy a HashWithIndifferentAccess if symbolize_keys! or stringify_keys! is called on it. Closes #5076. [Marcel Molina Jr., guy.naor@famundo.com]
* Document Module::delegate. #5002 [pergesu@gmail.com]
* Replace alias method chaining with Module#alias_method_chain. [Marcel Molina Jr.]
* Strip out punctuation on predicates or bang methods being aliased with alias_method_chain since target?_without_feature is not a valid method name. Add tests for Module#alias_method_chain. [Marcel Molina Jr.]
* Replace Ruby's deprecated append_features in favor of included. [Marcel Molina Jr.]
-* Allow default options in with_options to be overridden. Closes #4480. [murphy@cYcnus.de]
+* Allow default options in with_options to be overridden. Closes #4480. [murphy@cYcnus.de]
* Added Module#alias_method_chain [Jamis Buck]
* Updated to Builder 2.0 [David Heinemeier Hansson]
@@ -1048,11 +1053,11 @@
approximations and shouldn't be used for critical calculations. [Michael Koziarski]
* Added Hash#to_xml and Array#to_xml that makes it much easier to produce XML from basic structures [David Heinemeier Hansson]. Examples:
{ :name => "David", :street_name => "Paulina", :age => 26, :moved_on => Date.new(2005, 11, 15) }.to_xml
-
+
...returns:
<person>
<street-name>Paulina</street-name>
<name>David</name>
@@ -1067,11 +1072,11 @@
* Add Enumerable#group_by for grouping collections based on the result of some
block. Useful, for example, for grouping records by date.
ex.
- latest_transcripts.group_by(&:day).each do |day, transcripts|
+ latest_transcripts.group_by(&:day).each do |day, transcripts|
p "#{day} -> #{transcripts.map(&:class) * ', '}"
end
"2006-03-01 -> Transcript"
"2006-02-28 -> Transcript"
"2006-02-27 -> Transcript, Transcript"
@@ -1091,11 +1096,11 @@
* Added Kernel#daemonize to turn the current process into a daemon that can be killed with a TERM signal [David Heinemeier Hansson]
* Add 'around' methods to Logger, to make it easy to log before and after messages for a given block as requested in #3809. [Michael Koziarski] Example:
- logger.around_info("Start rendering component (#{options.inspect}): ",
+ logger.around_info("Start rendering component (#{options.inspect}): ",
"\n\nEnd of component rendering") { yield }
* Added Time#beginning_of_quarter #3607 [cohen.jeff@gmail.com]
* Fix Object.subclasses_of to only return currently defined objects [Jonathan Viney <jonathan@bluewire.net.nz>]
@@ -1109,11 +1114,11 @@
class Account < ActiveRecord::Base
has_one :subscription
delegate :free?, :paying?, :to => :subscription
delegate :overdue?, :to => "subscription.last_payment"
end
-
+
account.free? # => account.subscription.free?
account.overdue? # => account.subscription.last_payment.overdue?
* Fix Reloadable to handle the case where a class that has been 'removed' has not yet been garbage collected. [Nicholas Seckar]
@@ -1124,11 +1129,11 @@
* Add documentation for Reloadable::Subclasses. [Nicholas Seckar]
* Add Reloadable::Subclasses which handles the common case where a base class should not be reloaded, but its subclasses should be. [Nicholas Seckar]
* Further improvements to reloading code [Nicholas Seckar, Trevor Squires]
-
+
- All classes/modules which include Reloadable can define reloadable? for fine grained control of reloading
- Class.remove_class uses Module#parent to access the parent module
- Class.remove_class expanded to handle multiple classes in a single call
- LoadingModule.clear! has been removed as it is no longer required
- Module#remove_classes_including has been removed in favor of Reloadable.reloadable_classes
@@ -1136,11 +1141,11 @@
* Added reusable reloading support through the inclusion of the Relodable module that all subclasses of ActiveRecord::Base, ActiveRecord::Observer, ActiveController::Base, and ActionMailer::Base automatically gets. This means that these classes will be reloaded by the dispatcher when Dependencies.mechanism = :load. You can make your own models reloadable easily:
class Setting
include Reloadable
end
-
+
Reloading a class is done by removing its constant which will cause it to be loaded again on the next reference. [David Heinemeier Hansson]
* Added auto-loading support for classes in modules, so Conductor::Migration will look for conductor/migration.rb and Conductor::Database::Settings will look for conductor/database/settings.rb [Nicholas Seckar]
* Add Object#instance_exec, like instance_eval but passes its arguments to the block. (Active Support will not override the Ruby 1.9 implementation of this method.) [Sam Stephenson]
@@ -1173,11 +1178,11 @@
* Introduce enable_warnings counterpart to silence_warnings. Turn warnings on when loading a file for the first time if Dependencies.mechanism == :load. Common mistakes such as redefined methods will print warnings to stderr. [Jeremy Kemper]
* Add Symbol#to_proc, which allows for, e.g. [:foo, :bar].map(&:to_s). [Marcel Molina Jr.]
* Added the following methods [Marcel Molina Jr., Sam Stephenson]:
- * Object#copy_instance_variables_from(object) to copy instance variables from one object to another
+ * Object#copy_instance_variables_from(object) to copy instance variables from one object to another
* Object#extended_by to get an instance's included/extended modules
* Object#extend_with_included_modules_from(object) to extend an instance with the modules from another instance
*1.2.5* (December 13th, 2005)
@@ -1224,11 +1229,11 @@
* Show all framework frames in the framework trace. [Nicholas Seckar]
*1.2.0* (October 16th, 2005)
-* Update Exception extension to show the first few framework frames in an application trace. [Nicholas Seckar]
+* Update Exception extension to show the first few framework frames in an application trace. [Nicholas Seckar]
* Added Exception extension to provide support for clean backtraces. [Nicholas Seckar]
* Updated whiny nil to be more concise and useful. [Nicholas Seckar]
@@ -1273,13 +1278,13 @@
* Added easy extendability to the inflector through Inflector.inflections (using the Inflector::Inflections singleton class). Examples:
Inflector.inflections do |inflect|
inflect.plural /^(ox)$/i, '\1\2en'
inflect.singular /^(ox)en/i, '\1'
-
+
inflect.irregular 'octopus', 'octopi'
-
+
inflect.uncountable "equipment"
end
* Added String#at, String#from, String#to, String#first, String#last in ActiveSupport::CoreExtensions::String::Access to ease access to individual characters and substrings in a string serving basically as human names for range access.
@@ -1358,13 +1363,13 @@
* Fixed Inflector.pluralize to handle capitalized words #932 [Jeremy Kemper]
* Added Object#suppress which allows you to make a saner choice around with exceptions to swallow #980. Example:
suppress(ZeroDivisionError) { 1/0 }
-
+
...instead of:
-
+
1/0 rescue nil # BAD, EVIL, DIRTY.
*1.0.2* (22th March, 2005)
@@ -1374,10 +1379,10 @@
returning values = [] do
values << 'bar'
values << 'baz'
end
end
-
+
foo # => ['bar', 'baz']
*1.0.1* (7th March, 2005)