Rails 2.3.3.1

Update to latest Rails.
A little bit of jiggery-pokery is involved, since they
neglected to re-include vendored Rack in this release.
This commit is contained in:
Jacques Distler 2009-08-04 10:16:03 -05:00
parent 329fafafce
commit 664552ac02
257 changed files with 4346 additions and 1682 deletions

View file

@ -1,3 +1,7 @@
*2.3.3 (July 12, 2009)*
* No changes, just a version bump.
*2.3.2 [Final] (March 15, 2009)*
* Nothing new, just included in 2.3.2

View file

@ -4,7 +4,6 @@ require 'rake/testtask'
require 'rake/rdoctask'
require 'rake/packagetask'
require 'rake/gempackagetask'
require 'rake/contrib/sshpublisher'
require File.join(File.dirname(__FILE__), 'lib', 'active_resource', 'version')
@ -67,7 +66,7 @@ spec = Gem::Specification.new do |s|
s.files = s.files + Dir.glob( "#{dir}/**/*" ).delete_if { |item| item.include?( "\.svn" ) }
end
s.add_dependency('activesupport', '= 2.3.2' + PKG_BUILD)
s.add_dependency('activesupport', '= 2.3.3' + PKG_BUILD)
s.require_path = 'lib'
s.autorequire = 'active_resource'
@ -117,12 +116,14 @@ end
desc "Publish the beta gem"
task :pgem => [:package] do
require 'rake/contrib/sshpublisher'
Rake::SshFilePublisher.new("gems.rubyonrails.org", "/u/sites/gems/gems", "pkg", "#{PKG_FILE_NAME}.gem").upload
`ssh gems.rubyonrails.org '/u/sites/gems/gemupdate.sh'`
end
desc "Publish the API documentation"
task :pdoc => [:rdoc] do
require 'rake/contrib/sshpublisher'
Rake::SshDirPublisher.new("wrath.rubyonrails.org", "public_html/ar", "doc").upload
end

View file

@ -832,7 +832,7 @@ module ActiveResource
!new? && self.class.exists?(to_param, :params => prefix_options)
end
# A method to convert the the resource to an XML string.
# Converts the resource to an XML string representation.
#
# ==== Options
# The +options+ parameter is handed off to the +to_xml+ method on each
@ -841,7 +841,14 @@ module ActiveResource
#
# * <tt>:indent</tt> - Set the indent level for the XML output (default is +2+).
# * <tt>:dasherize</tt> - Boolean option to determine whether or not element names should
# replace underscores with dashes (default is <tt>false</tt>).
# replace underscores with dashes. Default is <tt>true</tt>. The default can be set to <tt>false</tt>
# by setting the module attribute <tt>ActiveSupport.dasherize_xml = false</tt> in an initializer. Because save
# uses this method, and there are no options on save, then you will have to set the default if you don't
# want underscores in element names to become dashes when the resource is saved. This is important when
# integrating with non-Rails applications.
# * <tt>:camelize</tt> - Boolean option to determine whether or not element names should be converted
# to camel case, e.g some_name to SomeName. Default is <tt>false</tt>. Like <tt>:dasherize</tt> you can
# change the default by setting the module attribute <tt>ActiveSupport.camelise_xml = true</tt> in an initializer.
# * <tt>:skip_instruct</tt> - Toggle skipping the +instruct!+ call on the XML builder
# that generates the XML declaration (default is <tt>false</tt>).
#
@ -861,8 +868,7 @@ module ActiveResource
attributes.to_xml({:root => self.class.element_name}.merge(options))
end
# Returns a JSON string representing the model. Some configuration is
# available through +options+.
# Coerces to a hash for JSON encoding.
#
# ==== Options
# The +options+ are passed to the +to_json+ method on each
@ -886,8 +892,8 @@ module ActiveResource
#
# person.to_json(:except => ["first_name"])
# # => {"last_name": "Smith"}
def to_json(options={})
attributes.to_json(options)
def as_json(options = nil)
attributes.as_json(options)
end
# Returns the serialized string representation of the resource in the configured

View file

@ -11,8 +11,8 @@ module ActiveResource
"application/json"
end
def encode(hash, options={})
hash.to_json(options)
def encode(hash, options = nil)
ActiveSupport::JSON.encode(hash, options)
end
def decode(json)

View file

@ -2,7 +2,7 @@ module ActiveResource
module VERSION #:nodoc:
MAJOR = 2
MINOR = 3
TINY = 2
TINY = 3
STRING = [MAJOR, MINOR, TINY].join('.')
end

View file

@ -1,8 +1,6 @@
require 'rubygems'
require 'test/unit'
gem 'mocha', '>= 0.9.5'
require 'mocha'
require 'active_support/test_case'
$:.unshift "#{File.dirname(__FILE__)}/../lib"
$:.unshift "#{File.dirname(__FILE__)}/../../activesupport/lib"