Skip to content
This repository
Browse code

Replace example hostname with "example.com".

The hostname used in these comments actually exists, which is
undesirable. See also RFC 2606.
  • Loading branch information...
commit 783007a8ad7b4b61a1a671d1737a8a6e0369ceb9 1 parent 2f0dca5
Joost Baaij authored April 21, 2011
6  actionpack/lib/action_view/helpers/asset_tag_helper.rb
@@ -268,7 +268,7 @@ def favicon_link_tag(source='/favicon.ico', options={})
268 268
       #   image_path("edit.png")                                     # => "/images/edit.png"
269 269
       #   image_path("icons/edit.png")                               # => "/images/icons/edit.png"
270 270
       #   image_path("/icons/edit.png")                              # => "/icons/edit.png"
271  
-      #   image_path("http://www.railsapplication.com/img/edit.png") # => "http://www.railsapplication.com/img/edit.png"
  271
+      #   image_path("http://www.example.com/img/edit.png")          # => "http://www.example.com/img/edit.png"
272 272
       #
273 273
       # If you have images as application resources this method may conflict with their named routes.
274 274
       # The alias +path_to_image+ is provided to avoid that. Rails uses the alias internally, and
@@ -291,7 +291,7 @@ def image_path(source)
291 291
       #   video_path("hd.avi")                                        # => /videos/hd.avi
292 292
       #   video_path("trailers/hd.avi")                               # => /videos/trailers/hd.avi
293 293
       #   video_path("/trailers/hd.avi")                              # => /trailers/hd.avi
294  
-      #   video_path("http://www.railsapplication.com/vid/hd.avi") # => http://www.railsapplication.com/vid/hd.avi
  294
+      #   video_path("http://www.example.com/vid/hd.avi")             # => http://www.example.com/vid/hd.avi
295 295
       def video_path(source)
296 296
         if config.use_sprockets
297 297
           asset_path(source)
@@ -310,7 +310,7 @@ def video_path(source)
310 310
       #   audio_path("horse.wav")                                        # => /audios/horse.wav
311 311
       #   audio_path("sounds/horse.wav")                                 # => /audios/sounds/horse.wav
312 312
       #   audio_path("/sounds/horse.wav")                                # => /sounds/horse.wav
313  
-      #   audio_path("http://www.railsapplication.com/sounds/horse.wav") # => http://www.railsapplication.com/sounds/horse.wav
  313
+      #   audio_path("http://www.example.com/sounds/horse.wav")          # => http://www.example.com/sounds/horse.wav
314 314
       def audio_path(source)
315 315
         if config.use_sprockets
316 316
           asset_path(source)
18  actionpack/lib/action_view/helpers/asset_tag_helpers/javascript_tag_helpers.rb
@@ -77,11 +77,11 @@ def register_javascript_expansion(expansions)
77 77
         # Used internally by javascript_include_tag to build the script path.
78 78
         #
79 79
         # ==== Examples
80  
-        #   javascript_path "xmlhr" # => /javascripts/xmlhr.js
81  
-        #   javascript_path "dir/xmlhr.js" # => /javascripts/dir/xmlhr.js
82  
-        #   javascript_path "/dir/xmlhr" # => /dir/xmlhr.js
83  
-        #   javascript_path "http://www.railsapplication.com/js/xmlhr" # => http://www.railsapplication.com/js/xmlhr
84  
-        #   javascript_path "http://www.railsapplication.com/js/xmlhr.js" # => http://www.railsapplication.com/js/xmlhr.js
  80
+        #   javascript_path "xmlhr"                              # => /javascripts/xmlhr.js
  81
+        #   javascript_path "dir/xmlhr.js"                       # => /javascripts/dir/xmlhr.js
  82
+        #   javascript_path "/dir/xmlhr"                         # => /dir/xmlhr.js
  83
+        #   javascript_path "http://www.example.com/js/xmlhr"    # => http://www.example.com/js/xmlhr
  84
+        #   javascript_path "http://www.example.com/js/xmlhr.js" # => http://www.example.com/js/xmlhr.js
85 85
         def javascript_path(source)
86 86
           if config.use_sprockets
87 87
             asset_path(source, 'js')
@@ -123,11 +123,11 @@ def javascript_path(source)
123 123
         #   # => <script type="text/javascript" src="/javascripts/common.javascript?1284139606"></script>
124 124
         #   #    <script type="text/javascript" src="/elsewhere/cools.js?1423139606"></script>
125 125
         #
126  
-        #   javascript_include_tag "http://www.railsapplication.com/xmlhr"
127  
-        #   # => <script type="text/javascript" src="http://www.railsapplication.com/xmlhr.js?1284139606"></script>
  126
+        #   javascript_include_tag "http://www.example.com/xmlhr"
  127
+        #   # => <script type="text/javascript" src="http://www.example.com/xmlhr.js?1284139606"></script>
128 128
         #
129  
-        #   javascript_include_tag "http://www.railsapplication.com/xmlhr.js"
130  
-        #   # => <script type="text/javascript" src="http://www.railsapplication.com/xmlhr.js?1284139606"></script>
  129
+        #   javascript_include_tag "http://www.example.com/xmlhr.js"
  130
+        #   # => <script type="text/javascript" src="http://www.example.com/xmlhr.js?1284139606"></script>
131 131
         #
132 132
         #   javascript_include_tag :defaults
133 133
         #   # => <script type="text/javascript" src="/javascripts/jquery.js?1284139606"></script>
14  actionpack/lib/action_view/helpers/asset_tag_helpers/stylesheet_tag_helpers.rb
@@ -54,11 +54,11 @@ def register_stylesheet_expansion(expansions)
54 54
         # Used internally by +stylesheet_link_tag+ to build the stylesheet path.
55 55
         #
56 56
         # ==== Examples
57  
-        #   stylesheet_path "style" # => /stylesheets/style.css
58  
-        #   stylesheet_path "dir/style.css" # => /stylesheets/dir/style.css
59  
-        #   stylesheet_path "/dir/style.css" # => /dir/style.css
60  
-        #   stylesheet_path "http://www.railsapplication.com/css/style" # => http://www.railsapplication.com/css/style
61  
-        #   stylesheet_path "http://www.railsapplication.com/css/style.css" # => http://www.railsapplication.com/css/style.css
  57
+        #   stylesheet_path "style"                                  # => /stylesheets/style.css
  58
+        #   stylesheet_path "dir/style.css"                          # => /stylesheets/dir/style.css
  59
+        #   stylesheet_path "/dir/style.css"                         # => /dir/style.css
  60
+        #   stylesheet_path "http://www.example.com/css/style"       # => http://www.example.com/css/style
  61
+        #   stylesheet_path "http://www.example.com/css/style.css"   # => http://www.example.com/css/style.css
62 62
         def stylesheet_path(source)
63 63
           if config.use_sprockets
64 64
             asset_path(source, 'css')
@@ -79,8 +79,8 @@ def stylesheet_path(source)
79 79
         #   stylesheet_link_tag "style.css" # =>
80 80
         #     <link href="/stylesheets/style.css" media="screen" rel="stylesheet" type="text/css" />
81 81
         #
82  
-        #   stylesheet_link_tag "http://www.railsapplication.com/style.css" # =>
83  
-        #     <link href="http://www.railsapplication.com/style.css" media="screen" rel="stylesheet" type="text/css" />
  82
+        #   stylesheet_link_tag "http://www.example.com/style.css" # =>
  83
+        #     <link href="http://www.example.com/style.css" media="screen" rel="stylesheet" type="text/css" />
84 84
         #
85 85
         #   stylesheet_link_tag "style", :media => "all" # =>
86 86
         #     <link href="/stylesheets/style.css" media="all" rel="stylesheet" type="text/css" />
2  actionpack/lib/action_view/helpers/url_helper.rb
@@ -68,7 +68,7 @@ def url_options
68 68
       #   # => /books/find
69 69
       #
70 70
       #   <%= url_for(:action => 'login', :controller => 'members', :only_path => false, :protocol => 'https') %>
71  
-      #   # => https://www.railsapplication.com/members/login/
  71
+      #   # => https://www.example.com/members/login/
72 72
       #
73 73
       #   <%= url_for(:action => 'play', :anchor => 'player') %>
74 74
       #   # => /messages/play/#player
24  actionpack/test/template/sprockets_helper_test.rb
@@ -69,10 +69,10 @@ def url_for(*args)
69 69
     assert_equal "/dir/xmlhr.js",
70 70
       asset_path("/dir/xmlhr", "js")
71 71
 
72  
-    assert_equal "http://www.railsapplication.com/js/xmlhr",
73  
-      asset_path("http://www.railsapplication.com/js/xmlhr", "js")
74  
-    assert_equal "http://www.railsapplication.com/js/xmlhr.js",
75  
-      asset_path("http://www.railsapplication.com/js/xmlhr.js", "js")
  72
+    assert_equal "http://www.example.com/js/xmlhr",
  73
+      asset_path("http://www.example.com/js/xmlhr", "js")
  74
+    assert_equal "http://www.example.com/js/xmlhr.js",
  75
+      asset_path("http://www.example.com/js/xmlhr.js", "js")
76 76
   end
77 77
 
78 78
   test "javascript include tag" do
@@ -83,8 +83,8 @@ def url_for(*args)
83 83
       sprockets_javascript_include_tag("xmlhr")
84 84
     assert_equal '<script src="/assets/xmlhr-d41d8cd98f00b204e9800998ecf8427e.js" type="text/javascript"></script>',
85 85
       sprockets_javascript_include_tag("xmlhr.js")
86  
-    assert_equal '<script src="http://www.railsapplication.com/xmlhr" type="text/javascript"></script>',
87  
-      sprockets_javascript_include_tag("http://www.railsapplication.com/xmlhr")
  86
+    assert_equal '<script src="http://www.example.com/xmlhr" type="text/javascript"></script>',
  87
+      sprockets_javascript_include_tag("http://www.example.com/xmlhr")
88 88
   end
89 89
 
90 90
   test "stylesheet path" do
@@ -94,10 +94,10 @@ def url_for(*args)
94 94
     assert_equal "/assets/dir/style-d41d8cd98f00b204e9800998ecf8427e.css", asset_path("dir/style.css", "css")
95 95
     assert_equal "/dir/style.css", asset_path("/dir/style.css", "css")
96 96
 
97  
-    assert_equal "http://www.railsapplication.com/css/style",
98  
-      asset_path("http://www.railsapplication.com/css/style", "css")
99  
-    assert_equal "http://www.railsapplication.com/css/style.css",
100  
-      asset_path("http://www.railsapplication.com/css/style.css", "css")
  97
+    assert_equal "http://www.example.com/css/style",
  98
+      asset_path("http://www.example.com/css/style", "css")
  99
+    assert_equal "http://www.example.com/css/style.css",
  100
+      asset_path("http://www.example.com/css/style.css", "css")
101 101
   end
102 102
 
103 103
   test "stylesheet link tag" do
@@ -109,8 +109,8 @@ def url_for(*args)
109 109
     assert_equal '<link href="/assets/style-d41d8cd98f00b204e9800998ecf8427e.css" media="screen" rel="stylesheet" type="text/css" />',
110 110
       sprockets_stylesheet_link_tag("style.css")
111 111
 
112  
-    assert_equal '<link href="http://www.railsapplication.com/style.css" media="screen" rel="stylesheet" type="text/css" />',
113  
-      sprockets_stylesheet_link_tag("http://www.railsapplication.com/style.css")
  112
+    assert_equal '<link href="http://www.example.com/style.css" media="screen" rel="stylesheet" type="text/css" />',
  113
+      sprockets_stylesheet_link_tag("http://www.example.com/style.css")
114 114
     assert_equal '<link href="/assets/style-d41d8cd98f00b204e9800998ecf8427e.css" media="all" rel="stylesheet" type="text/css" />',
115 115
       sprockets_stylesheet_link_tag("style", :media => "all")
116 116
     assert_equal '<link href="/assets/style-d41d8cd98f00b204e9800998ecf8427e.css" media="print" rel="stylesheet" type="text/css" />',

0 notes on commit 783007a

Please sign in to comment.
Something went wrong with that request. Please try again.