Skip to content

Commit

Permalink
Added xml_http_request/xhr method for simulating XMLHttpRequest in fu…
Browse files Browse the repository at this point in the history
…nctional tests #1151 [Sam Stephenson]

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1230 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information
dhh committed Apr 19, 2005
1 parent 6f34400 commit 77af61b
Show file tree
Hide file tree
Showing 9 changed files with 39 additions and 12 deletions.
5 changes: 5 additions & 0 deletions actionmailer/CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
*0.9.1* (20th April, 2005)

* Depend on Action Pack 1.8.1


*0.9.0* (19th April, 2005)

* Added that deliver_* will now return the email that was sent
Expand Down
4 changes: 2 additions & 2 deletions actionmailer/Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ require 'rake/contrib/rubyforgepublisher'

PKG_BUILD = ENV['PKG_BUILD'] ? '.' + ENV['PKG_BUILD'] : ''
PKG_NAME = 'actionmailer'
PKG_VERSION = '0.9.0' + PKG_BUILD
PKG_VERSION = '0.9.1' + PKG_BUILD
PKG_FILE_NAME = "#{PKG_NAME}-#{PKG_VERSION}"

RELEASE_NAME = "REL #{PKG_VERSION}"
Expand Down Expand Up @@ -52,7 +52,7 @@ spec = Gem::Specification.new do |s|
s.rubyforge_project = "actionmailer"
s.homepage = "http://www.rubyonrails.org"

s.add_dependency('actionpack', '= 1.8.0' + PKG_BUILD)
s.add_dependency('actionpack', '= 1.8.1' + PKG_BUILD)

s.has_rdoc = true
s.requirements << 'none'
Expand Down
10 changes: 8 additions & 2 deletions actionpack/CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
*SVN*
*1.8.1* (20th April, 2005)

* Added xml_http_request/xhr method for simulating XMLHttpRequest in functional tests #1151 [Sam Stephenson]. Example:

xhr :post, :index

* Fixed that Ajax.Base.options.asynchronous wasn't being respected in Ajax.Request (thanks Jon Casey)

* Fixed that :get, :post, and the others should take a flash array as the third argument just like process #1144 [rails@cogentdude.com]

Expand Down Expand Up @@ -47,7 +53,7 @@

* Fixed that you can now pass an alternative :href option to link_to_function/remote in order to point to somewhere other than # if the javascript fails or is turned off. You can do the same with form_remote_tag by passing in :action. #1113 [Sam Stephenson]

* Fixed DateHelper to return values on the option tags such that they'll work properly in IE with form_remote_tag #1024 [rscottmace@gmail.com]
* Fixed DateHelper to return values on the option tags such that they'll work properly in IE with form_remote_tag #1024 [Scott Raymond]

* Fixed FormTagHelper#check_box to respect checked #1049 [DelynnB]

Expand Down
2 changes: 1 addition & 1 deletion actionpack/Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ require 'rake/contrib/rubyforgepublisher'

PKG_BUILD = ENV['PKG_BUILD'] ? '.' + ENV['PKG_BUILD'] : ''
PKG_NAME = 'actionpack'
PKG_VERSION = '1.8.0' + PKG_BUILD
PKG_VERSION = '1.8.1' + PKG_BUILD
PKG_FILE_NAME = "#{PKG_NAME}-#{PKG_VERSION}"

RELEASE_NAME = "REL #{PKG_VERSION}"
Expand Down
6 changes: 6 additions & 0 deletions actionpack/lib/action_controller/test_process.rb
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,12 @@ def #{method}(action, parameters = nil, session = nil, flash = nil)
EOV
end

def xml_http_request(request_method, action, parameters = nil, session = nil, flash = nil)
@request.env['HTTP_X_REQUESTED_WITH'] = 'XMLHttpRequest'
self.send(request_method, action, parameters, session, flash)
end
alias xhr :xml_http_request

def follow_redirect
if @response.redirected_to[:controller]
raise "Can't follow redirects outside of current controller (#{@response.redirected_to[:controller]})"
Expand Down
5 changes: 5 additions & 0 deletions actionwebservice/CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
*0.7.1* (20th April, 2005)

* Depend on Active Record 1.10.1 and Action Pack 1.8.1


*0.7.0* (19th April, 2005)

* When casting structured types, don't try to send obj.name= unless obj responds to it, causes casting to be less likely to fail for XML-RPC
Expand Down
6 changes: 3 additions & 3 deletions actionwebservice/Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ require 'fileutils'

PKG_BUILD = ENV['PKG_BUILD'] ? '.' + ENV['PKG_BUILD'] : ''
PKG_NAME = 'actionwebservice'
PKG_VERSION = '0.7.0' + PKG_BUILD
PKG_VERSION = '0.7.1' + PKG_BUILD
PKG_FILE_NAME = "#{PKG_NAME}-#{PKG_VERSION}"
PKG_DESTINATION = ENV["RAILS_PKG_DESTINATION"] || "../#{PKG_NAME}"

Expand Down Expand Up @@ -62,8 +62,8 @@ spec = Gem::Specification.new do |s|
s.rubyforge_project = "aws"
s.homepage = "http://www.rubyonrails.org"

s.add_dependency('actionpack', '= 1.8.0' + PKG_BUILD)
s.add_dependency('activerecord', '= 1.10.0' + PKG_BUILD)
s.add_dependency('actionpack', '= 1.8.1' + PKG_BUILD)
s.add_dependency('activerecord', '= 1.10.1' + PKG_BUILD)
s.add_dependency('activesupport', '= 1.0.4' + PKG_BUILD)

s.has_rdoc = true
Expand Down
5 changes: 5 additions & 0 deletions railties/CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
*0.12.1* (20th April, 2005)

* Upgraded to Active Record 1.10.1, Action Pack 1.8.1, Action Mailer 0.9.1, Action Web Service 0.7.1


*0.12.0* (19th April, 2005)

* Fixed that purge_test_database would use database settings from the development environment when recreating the test database #1122 [rails@cogentdude.com]
Expand Down
8 changes: 4 additions & 4 deletions railties/Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -240,10 +240,10 @@ spec = Gem::Specification.new do |s|

s.add_dependency('rake', '>= 0.5.3')
s.add_dependency('activesupport', '= 1.0.4' + PKG_BUILD)
s.add_dependency('activerecord', '= 1.10.0' + PKG_BUILD)
s.add_dependency('actionpack', '= 1.8.0' + PKG_BUILD)
s.add_dependency('actionmailer', '= 0.9.0' + PKG_BUILD)
s.add_dependency('actionwebservice', '= 0.7.0' + PKG_BUILD)
s.add_dependency('activerecord', '= 1.10.1' + PKG_BUILD)
s.add_dependency('actionpack', '= 1.8.1' + PKG_BUILD)
s.add_dependency('actionmailer', '= 0.9.1' + PKG_BUILD)
s.add_dependency('actionwebservice', '= 0.7.1' + PKG_BUILD)

s.rdoc_options << '--exclude' << '.'
s.has_rdoc = false
Expand Down

0 comments on commit 77af61b

Please sign in to comment.