From f7ba614c2db31933cbc12eda87518de3eca0228c Mon Sep 17 00:00:00 2001 From: Piotr Sarnacki Date: Fri, 2 Jul 2010 00:29:20 +0200 Subject: Unify routes naming by renaming router to routes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: José Valim --- actionmailer/lib/action_mailer/base.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'actionmailer') diff --git a/actionmailer/lib/action_mailer/base.rb b/actionmailer/lib/action_mailer/base.rb index 11fa978b9c..8b86d83301 100644 --- a/actionmailer/lib/action_mailer/base.rb +++ b/actionmailer/lib/action_mailer/base.rb @@ -737,13 +737,13 @@ module ActionMailer #:nodoc: 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." + "url_helpers of a routes 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 url_helpers of the routes, which will override this module extend DeprecatedUrlOptions ActiveSupport.run_load_hooks(:action_mailer, self) -- cgit v1.2.3 From cb321546b7aef33fcf5466b61f79bd9198cd12b5 Mon Sep 17 00:00:00 2001 From: Santiago Pastorino Date: Thu, 1 Jul 2010 19:03:18 -0300 Subject: Time has it own implementation of xmlschema, now AMo doesn't depend on TZInfo MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [#4979 state:committed] Signed-off-by: José Valim --- actionmailer/test/base_test.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'actionmailer') diff --git a/actionmailer/test/base_test.rb b/actionmailer/test/base_test.rb index 88e38a583b..5bc0491cff 100644 --- a/actionmailer/test/base_test.rb +++ b/actionmailer/test/base_test.rb @@ -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 -- cgit v1.2.3 From 75b32a69a185e2e802934bc4000f6c0efbc5c2e7 Mon Sep 17 00:00:00 2001 From: Wincent Colaiuta Date: Sat, 3 Jul 2010 12:12:50 +0200 Subject: Fixes for "router" and "routes" terminology MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Commit f7ba614c2db improved the internal consistency of the different means of accessing routes, but it introduced some problems at the level of code comments and user-visible strings. This commit applies fixes on three levels: Firstly, we remove or replace grammatically invalid constructs such as "a routes" or "a particular routes". Secondly, we make sure that we always use "the router DSL" or "the router syntax", because this has always been the official terminology. Finally, we make sure that we only use "routes" when referring to the application-specific set of routes that are defined in the "config/routes.rb" file, we use "router" when referring on a more abstract level to "the code in Rails used to handle routing", and we use "routing" when we need an adjective to apply to nouns such as "url_helpers. Again this is consistent with historical practice and other places in the documentation. Note that this is not a sweep over the entire codebase to ensure consistent usage of language; it is just a revision of the changes introduced in commit f7ba614c2db. Signed-off-by: Wincent Colaiuta Signed-off-by: José Valim --- actionmailer/lib/action_mailer/base.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'actionmailer') diff --git a/actionmailer/lib/action_mailer/base.rb b/actionmailer/lib/action_mailer/base.rb index 8b86d83301..ed4bea0c77 100644 --- a/actionmailer/lib/action_mailer/base.rb +++ b/actionmailer/lib/action_mailer/base.rb @@ -737,13 +737,13 @@ module ActionMailer #:nodoc: 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 routes 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 routes, 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) -- cgit v1.2.3 From 8a09ea6d6dbbd6a1325b3be429d96d9c45c046df Mon Sep 17 00:00:00 2001 From: Santiago Pastorino Date: Sat, 3 Jul 2010 21:12:49 -0300 Subject: Avoids deprecation warning running tests --- actionmailer/test/old_base/url_test.rb | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'actionmailer') diff --git a/actionmailer/test/old_base/url_test.rb b/actionmailer/test/old_base/url_test.rb index 6895fb230e..b6496bfe1b 100644 --- a/actionmailer/test/old_base/url_test.rb +++ b/actionmailer/test/old_base/url_test.rb @@ -28,7 +28,7 @@ class UrlTestMailer < ActionMailer::Base 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 @@ class ActionMailerUrlTest < Test::Unit::TestCase 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 -- cgit v1.2.3