Permalink
Browse files

Merge branch 'master' into streaming

  • Loading branch information...
2 parents f22b4b5 + 5bf3294 commit d307853c2fc56110d47b562deb04f3eff6c4766f @jeremy jeremy committed Jul 4, 2010
Showing with 1,424 additions and 869 deletions.
  1. +1 −0 .gitignore
  2. +5 −3 actionmailer/lib/action_mailer/base.rb
  3. +1 −0 actionmailer/test/base_test.rb
  4. +7 −5 actionmailer/test/old_base/url_test.rb
  5. +7 −0 actionpack/CHANGELOG
  6. +1 −1 actionpack/actionpack.gemspec
  7. +2 −2 actionpack/lib/abstract_controller/rendering.rb
  8. +5 −5 actionpack/lib/action_controller/metal/url_for.rb
  9. +5 −0 actionpack/lib/action_dispatch/middleware/session/abstract_store.rb
  10. +1 −1 actionpack/lib/action_dispatch/routing.rb
  11. +1 −1 actionpack/lib/action_dispatch/routing/deprecated_mapper.rb
  12. +149 −199 actionpack/lib/action_dispatch/routing/mapper.rb
  13. +42 −36 actionpack/lib/action_dispatch/routing/route_set.rb
  14. +1 −1 actionpack/lib/action_dispatch/routing/url_for.rb
  15. +1 −1 actionpack/lib/action_view/base.rb
  16. +3 −1 actionpack/lib/action_view/helpers/form_tag_helper.rb
  17. +1 −1 actionpack/lib/action_view/helpers/prototype_helper.rb
  18. +1 −1 actionpack/lib/action_view/helpers/tag_helper.rb
  19. +22 −30 actionpack/lib/action_view/helpers/url_helper.rb
  20. +1 −1 actionpack/lib/action_view/template.rb
  21. +5 −5 actionpack/lib/action_view/test_case.rb
  22. +14 −11 actionpack/test/abstract_unit.rb
  23. +20 −0 actionpack/test/controller/mime_responds_test.rb
  24. +1 −1 actionpack/test/controller/url_for_test.rb
  25. +133 −7 actionpack/test/dispatch/routing_test.rb
  26. +22 −0 actionpack/test/dispatch/session/cookie_store_test.rb
  27. +8 −8 actionpack/test/dispatch/url_generation_test.rb
  28. +1 −1 actionpack/test/template/form_helper_test.rb
  29. +1 −1 actionpack/test/template/form_tag_helper_test.rb
  30. +2 −2 actionpack/test/template/tag_helper_test.rb
  31. +34 −22 actionpack/test/template/url_helper_test.rb
  32. +1 −0 activemodel/lib/active_model/errors.rb
  33. +2 −0 activerecord/CHANGELOG
  34. +17 −1 activerecord/lib/active_record/associations/association_collection.rb
  35. +5 −1 activerecord/lib/active_record/associations/has_many_association.rb
  36. +47 −20 activerecord/lib/active_record/base.rb
  37. +1 −1 activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb
  38. +1 −0 activerecord/lib/active_record/migration.rb
  39. +23 −12 activerecord/lib/active_record/named_scope.rb
  40. +1 −1 activerecord/lib/active_record/nested_attributes.rb
  41. +1 −1 activerecord/lib/active_record/persistence.rb
  42. +8 −8 activerecord/lib/active_record/railties/databases.rake
  43. +24 −21 activerecord/lib/active_record/relation.rb
  44. +1 −3 activerecord/lib/active_record/relation/predicate_builder.rb
  45. +4 −10 activerecord/lib/active_record/relation/query_methods.rb
  46. +1 −1 activerecord/lib/active_record/relation/spawn_methods.rb
  47. +62 −0 activerecord/test/cases/associations/has_many_associations_test.rb
  48. +0 −19 activerecord/test/cases/base_test.rb
  49. +1 −1 activerecord/test/cases/inheritance_test.rb
  50. +11 −202 activerecord/test/cases/method_scoping_test.rb
  51. +17 −0 activerecord/test/cases/migration_test.rb
  52. +8 −2 activerecord/test/cases/named_scope_test.rb
  53. +6 −0 activerecord/test/cases/nested_attributes_test.rb
  54. +396 −0 activerecord/test/cases/relation_scoping_test.rb
  55. +1 −1 activerecord/test/cases/relations_test.rb
  56. +7 −1 activerecord/test/models/developer.rb
  57. +3 −0 activerecord/test/models/without_table.rb
  58. +6 −0 activesupport/CHANGELOG
  59. +0 −1 activesupport/lib/active_support/all.rb
  60. +7 −0 activesupport/lib/active_support/core_ext/array/random_access.rb
  61. +2 −1 activesupport/lib/active_support/core_ext/date/calculations.rb
  62. +3 −13 activesupport/lib/active_support/core_ext/date/conversions.rb
  63. +14 −0 activesupport/lib/active_support/core_ext/date/zones.rb
  64. +1 −0 activesupport/lib/active_support/core_ext/date_time/calculations.rb
  65. +1 −0 activesupport/lib/active_support/core_ext/date_time/conversions.rb
  66. +2 −0 activesupport/lib/active_support/core_ext/date_time/zones.rb
  67. +1 −0 activesupport/lib/active_support/core_ext/object.rb
  68. +19 −0 activesupport/lib/active_support/core_ext/object/to_json.rb
  69. +5 −0 activesupport/lib/active_support/core_ext/time/calculations.rb
  70. +0 −5 activesupport/lib/active_support/core_ext/time/zones.rb
  71. +13 −9 activesupport/lib/active_support/deprecation/behaviors.rb
  72. +3 −2 activesupport/lib/active_support/deprecation/reporting.rb
  73. +5 −6 activesupport/lib/active_support/file_update_checker.rb
  74. +1 −0 activesupport/lib/active_support/i18n_railtie.rb
  75. +10 −32 activesupport/lib/active_support/json/encoding.rb
  76. +2 −4 activesupport/lib/active_support/json/variable.rb
  77. +5 −4 activesupport/lib/active_support/multibyte/chars.rb
  78. +1 −1 activesupport/lib/active_support/multibyte/unicode.rb
  79. +31 −1 activesupport/lib/active_support/railtie.rb
  80. +18 −36 activesupport/lib/active_support/testing/performance.rb
  81. +1 −0 activesupport/lib/active_support/time.rb
  82. +6 −6 activesupport/lib/active_support/values/time_zone.rb
  83. BIN activesupport/lib/active_support/values/unicode_tables.dat
  84. +20 −0 activesupport/test/deprecation_test.rb
  85. +4 −2 activesupport/test/json/encoding_test.rb
  86. +9 −6 activesupport/test/multibyte_chars_test.rb
  87. +1 −0 activesupport/test/ordered_hash_test.rb
  88. +1 −1 rails.gemspec
  89. +29 −49 railties/guides/source/initialization.textile
  90. +9 −14 railties/lib/rails/application.rb
  91. +5 −5 railties/lib/rails/commands.rb
  92. +1 −1 railties/lib/rails/commands/application.rb
  93. +1 −1 railties/lib/rails/commands/runner.rb
  94. +1 −1 railties/lib/rails/generators/rails/app/templates/Rakefile
  95. +3 −0 railties/lib/rails/generators/rails/app/templates/config/environments/development.rb.tt
  96. +3 −0 railties/lib/rails/generators/rails/app/templates/config/environments/production.rb.tt
  97. +3 −0 railties/lib/rails/generators/rails/app/templates/config/environments/test.rb.tt
  98. +1 −1 railties/lib/rails/generators/rails/app/templates/config/initializers/secret_token.rb.tt
  99. +2 −2 railties/lib/rails/generators/rails/app/templates/config/initializers/session_store.rb.tt
  100. +1 −1 railties/lib/rails/info_routes.rb
  101. +1 −1 railties/lib/rails/tasks/middleware.rake
  102. +1 −1 railties/lib/rails/tasks/routes.rake
  103. +1 −1 railties/railties.gemspec
  104. +1 −1 railties/test/application/initializers/frameworks_test.rb
  105. +1 −1 railties/test/application/initializers/i18n_test.rb
  106. +14 −1 railties/test/application/loading_test.rb
  107. +2 −2 railties/test/application/rake_test.rb
  108. +1 −1 railties/test/application/runner_test.rb
  109. +1 −0 railties/test/application/url_generation_test.rb
  110. +2 −1 railties/test/isolation/abstract_unit.rb
  111. +1 −1 railties/test/rails_info_controller_test.rb
View
@@ -1,6 +1,7 @@
*.gem
pkg
.bundle
+Gemfile.lock
debug.log
doc/rdoc
activemodel/doc
@@ -540,7 +540,9 @@ def attachments
# :reply_to => 'bounces@test.lindsaar.net'
# end
#
- # If you need other headers not listed above, use the <tt>headers['name'] = value</tt> method.
+ # If you need other headers not listed above, you can either pass them in
+ # as part of the headers hash or use the <tt>headers['name'] = value</tt>
+ # method.
#
# When a <tt>:return_path</tt> is specified as header, that value will be used as the 'envelope from'
# address for the Mail message. Setting this is useful when you want delivery notifications
@@ -746,13 +748,13 @@ def deprecated_url_options
raise "You can no longer call ActionMailer::Base.default_url_options " \
"directly. You need to set config.action_mailer.default_url_options. " \
"If you are using ActionMailer standalone, you need to include the " \
- "url_helpers of a router directly."
+ "routing url_helpers directly."
end
end
# This module will complain if the user tries to set default_url_options
# directly instead of through the config object. In Action Mailer's Railtie,
- # we include the url_helpers of the router, which will override this module
+ # we include the router's url_helpers, which will override this module.
extend DeprecatedUrlOptions
ActiveSupport.run_load_hooks(:action_mailer, self)
@@ -1,5 +1,6 @@
# encoding: utf-8
require 'abstract_unit'
+require 'active_support/time'
class BaseTest < ActiveSupport::TestCase
# TODO Add some tests for implicity layout render and url helpers
@@ -28,7 +28,7 @@ def signed_up_with_url(recipient)
end
end
-class ActionMailerUrlTest < Test::Unit::TestCase
+class ActionMailerUrlTest < ActionMailer::TestCase
def encode( text, charset="UTF-8" )
quoted_printable( text, charset )
@@ -57,10 +57,12 @@ def teardown
def test_signed_up_with_url
UrlTestMailer.delivery_method = :test
-
- AppRoutes.draw do |map|
- map.connect ':controller/:action/:id'
- map.welcome 'welcome', :controller=>"foo", :action=>"bar"
+
+ assert_deprecated do
+ AppRoutes.draw do |map|
+ map.connect ':controller/:action/:id'
+ map.welcome 'welcome', :controller=>"foo", :action=>"bar"
+ end
end
expected = new_mail
View
@@ -1,5 +1,12 @@
*Rails 3.0.0 [Release Candidate] (unreleased)*
+* link_to, button_to, and tag/tag_options now rely on html_escape instead of escape_once. [fxn]
+
+* url_for returns always unescaped strings, and the :escape option is gone. [fxn]
+
+* Added accept-charset parameter and _snowman hidden field to force the contents
+ of Rails POSTed forms to be in UTF-8 [Yehuda Katz]
+
* Upgrade to Rack 1.2.1 [Jeremy Kemper]
* Allow :path to be given to match/get/post/put/delete instead of :path_names in the new router [Carlos Antônio da Silva]
@@ -27,5 +27,5 @@ Gem::Specification.new do |s|
s.add_dependency('rack-test', '~> 0.5.4')
#s.add_dependency('rack-mount', '~> 0.6.6')
s.add_dependency('tzinfo', '~> 0.3.16')
- s.add_dependency('erubis', '~> 2.6.5')
+ s.add_dependency('erubis', '~> 2.6.6')
end
@@ -50,8 +50,8 @@ def view_context_class
if controller.respond_to?(:_helpers)
include controller._helpers
- if controller.respond_to?(:_router)
- include controller._router.url_helpers
+ if controller.respond_to?(:_routes)
+ include controller._routes.url_helpers
end
# TODO: Fix RJS to not require this
@@ -12,17 +12,17 @@ def url_options
).merge(:script_name => request.script_name)
end
- def _router
- raise "In order to use #url_for, you must include the helpers of a particular " \
- "router. For instance, `include Rails.application.routes.url_helpers"
+ def _routes
+ raise "In order to use #url_for, you must include routing helpers explicitly. " \
+ "For instance, `include Rails.application.routes.url_helpers"
end
module ClassMethods
def action_methods
@action_methods ||= begin
- super - _router.named_routes.helper_names
+ super - _routes.named_routes.helper_names
end
end
end
end
-end
+end
@@ -64,6 +64,11 @@ def []=(key, value)
super(key.to_s, value)
end
+ def clear
+ load_for_write!
+ super
+ end
+
def to_hash
load_for_read!
h = {}.replace(self)
@@ -167,7 +167,7 @@ module ActionDispatch
#
# You can reload routes if you feel you must:
#
- # Rails::Application.reload_routes!
+ # Rails.application.reload_routes!
#
# This will clear all named routes and reload routes.rb if the file has been modified from
# last load. To absolutely force reloading, use <tt>reload!</tt>.
@@ -31,7 +31,7 @@ def in_memory_controller_namespaces
class DeprecatedMapper #:nodoc:
def initialize(set) #:nodoc:
ActiveSupport::Deprecation.warn "You are using the old router DSL which will be removed in Rails 3.1. " <<
- "Please check how to update your router file at: http://www.engineyard.com/blog/2010/the-lowdown-on-routes-in-rails-3/"
+ "Please check how to update your routes file at: http://www.engineyard.com/blog/2010/the-lowdown-on-routes-in-rails-3/"
@set = set
end
Oops, something went wrong.

0 comments on commit d307853

Please sign in to comment.