Skip to content
This repository
Browse code

more "SSL everywhere" for GitHub URLs

  • Loading branch information...
commit 071ddb82812d1336450c9cbc6b317d5edfff3731 1 parent 5bed377
Akira Matsuda authored March 07, 2011
2  actionpack/lib/action_view/helpers/prototype_helper.rb
@@ -103,7 +103,7 @@ module PrototypeHelper
103 103
                        :form, :with, :update, :script, :type ]).merge(CALLBACKS)
104 104
 
105 105
       # Returns the JavaScript needed for a remote function.
106  
-      # See the link_to_remote documentation at http://github.com/rails/prototype_legacy_helper as it takes the same arguments.
  106
+      # See the link_to_remote documentation at https://github.com/rails/prototype_legacy_helper as it takes the same arguments.
107 107
       #
108 108
       # Example:
109 109
       #   # Generates: <select id="options" onchange="new Ajax.Updater('options',
4  activesupport/lib/active_support/core_ext/array/random_access.rb
... ...
@@ -1,5 +1,5 @@
1 1
 class Array
2  
-  # Backport of Array#sample based on Marc-Andre Lafortune's http://github.com/marcandre/backports/
  2
+  # Backport of Array#sample based on Marc-Andre Lafortune's https://github.com/marcandre/backports/
3 3
   # Returns a random element or +n+ random elements from the array.
4 4
   # If the array is empty and +n+ is nil, returns <tt>nil</tt>. if +n+ is passed, returns <tt>[]</tt>.
5 5
   #
@@ -24,4 +24,4 @@ def sample(n=nil)
24 24
     result[n..size] = []
25 25
     result
26 26
   end unless method_defined? :sample
27  
-end
  27
+end
4  activesupport/lib/active_support/testing/pending.rb
... ...
@@ -1,5 +1,5 @@
1 1
 # Some code from jeremymcanally's "pending"
2  
-# http://github.com/jeremymcanally/pending/tree/master
  2
+# https://github.com/jeremymcanally/pending/tree/master
3 3
 
4 4
 module ActiveSupport
5 5
   module Testing
@@ -45,4 +45,4 @@ def pending(description = "", &block)
45 45
 
46 46
     end
47 47
   end
48  
-end
  48
+end
4  ci/ci_setup_notes.txt
@@ -27,7 +27,7 @@ $ sudo shutdown -r now
27 27
 $ sudo aptitude update
28 28
 
29 29
 * Use cinabox to perform rest of ruby/ccrb setup:
30  
-* http://github.com/thewoolleyman/cinabox/tree/master/README.txt
  30
+* https://github.com/thewoolleyman/cinabox/tree/master/README.txt
31 31
 
32 32
 # This is not yet properly supported by RubyGems...
33 33
 # * Configure RubyGems to not require root access for gem installation
@@ -137,4 +137,4 @@ $ rake postgresql:build_databases
137 137
 
138 138
 * Reboot and make sure everything is working
139 139
 $ sudo shutdown -r now
140  
-$ http://ci.yourdomain.com
  140
+$ http://ci.yourdomain.com
10  railties/guides/source/contribute.textile
Source Rendered
@@ -7,11 +7,11 @@ endprologue.
7 7
 h3. How to Contribute?
8 8
 
9 9
 * We have an open commit policy: anyone is welcome to contribute and to review contributions.
10  
-* "docrails is hosted on GitHub":http://github.com/lifo/docrails and has public write access.
  10
+* "docrails is hosted on GitHub":https://github.com/lifo/docrails and has public write access.
11 11
 * Guides are written in Textile, and reside at +railties/guides/source+ in the docrails project.
12  
-* Follow the "Rails Guides Conventions":http://wiki.github.com/lifo/docrails/rails-guides-conventions.
  12
+* Follow the "Rails Guides Conventions":https://wiki.github.com/lifo/docrails/rails-guides-conventions.
13 13
 * Assets are stored in the +railties/guides/assets+ directory.
14  
-* Sample format : "Active Record Associations":http://github.com/lifo/docrails/blob/3e56a3832415476fdd1cb963980d0ae390ac1ed3/railties/guides/source/association_basics.textile.
  14
+* Sample format : "Active Record Associations":https://github.com/lifo/docrails/blob/3e56a3832415476fdd1cb963980d0ae390ac1ed3/railties/guides/source/association_basics.textile.
15 15
 * Sample output : "Active Record Associations":association_basics.html.
16 16
 * You can build the Guides during testing by running +bundle exec rake generate_guides+ in the +railties+ directory.
17 17
 * You're encouraged to validate XHTML for the generated guides before commiting your changes by running +bundle exec rake validate_guides+ in the +railties+ directory.
@@ -53,11 +53,11 @@ h3. Rules
53 53
 * If the same guide writer wants to write multiple guides, that's ideally the situation we'd love to be in! However, that guide writer will only receive the cash prize for all the subsequent guides (and not the GitHub or RPM prizes).
54 54
 * Our review team will have the final say on whether the guide is complete and of good enough quality.
55 55
 
56  
-All authors should read and follow the "Rails Guides Conventions":http://wiki.github.com/lifo/docrails/rails-guides-conventions and the "Rails API Documentation Conventions":http://wiki.github.com/lifo/docrails/rails-api-documentation-conventions.
  56
+All authors should read and follow the "Rails Guides Conventions":https://wiki.github.com/lifo/docrails/rails-guides-conventions and the "Rails API Documentation Conventions":https://wiki.github.com/lifo/docrails/rails-api-documentation-conventions.
57 57
 
58 58
 h3. Translations
59 59
 
60  
-The translation effort for the Rails Guides is just getting underway. We know about projects to translate the Guides into Spanish, Portuguese, Polish, and French. For more details or to get involved see the "Translating Rails Guides":http://wiki.github.com/lifo/docrails/translating-rails-guides page.
  60
+The translation effort for the Rails Guides is just getting underway. We know about projects to translate the Guides into Spanish, Portuguese, Polish, and French. For more details or to get involved see the "Translating Rails Guides":https://wiki.github.com/lifo/docrails/translating-rails-guides page.
61 61
 
62 62
 h3. Mailing List
63 63
 
4  railties/guides/source/contributing_to_ruby_on_rails.textile
Source Rendered
@@ -48,7 +48,7 @@ Ruby on Rails uses git for source code control. The "git homepage":http://git-sc
48 48
 
49 49
 * "Everyday Git":http://www.kernel.org/pub/software/scm/git/docs/everyday.html will teach you just enough about git to get by.
50 50
 * The "PeepCode screencast":https://peepcode.com/products/git on git ($9) is easier to follow.
51  
-* "GitHub":http://github.com/guides/home offers links to a variety of git resources.
  51
+* "GitHub":https://github.com/guides/home offers links to a variety of git resources.
52 52
 * "Pro Git":http://progit.org/book/ is an entire book about git with a Creative Commons license.
53 53
 
54 54
 h4. Clone the Ruby on Rails Repository
@@ -261,7 +261,7 @@ h3. Contributing to the Rails Documentation
261 261
 
262 262
 Ruby on Rails has two main sets of documentation: The guides help you to learn Ruby on Rails, and the API is a reference.
263 263
 
264  
-You can create a ticket in Lighthouse to fix or expand documentation. However, if you're confident about your changes you can push them yourself directly via "docrails":http://github.com/lifo/docrails/tree/master. docrails is a branch with an *open commit policy* and public write access. Commits to docrails are still reviewed, but that happens after they are pushed. docrails is merged with master regularly, so you are effectively editing the Ruby on Rails documentation.
  264
+You can create a ticket in Lighthouse to fix or expand documentation. However, if you're confident about your changes you can push them yourself directly via "docrails":https://github.com/lifo/docrails/tree/master. docrails is a branch with an *open commit policy* and public write access. Commits to docrails are still reviewed, but that happens after they are pushed. docrails is merged with master regularly, so you are effectively editing the Ruby on Rails documentation.
265 265
 
266 266
 When working with documentation, please take into account the "API Documentation Guidelines":api_documentation_guidelines.html and the "Ruby on Rails Guides Guidelines":ruby_on_rails_guides_guidelines.html.
267 267
 
2  railties/guides/source/credits.html.erb
@@ -44,7 +44,7 @@ Ruby on Rails Guides: Credits
44 44
 <% end %>
45 45
 
46 46
 <%= author('Mikel Lindsaar', 'raasdnil') do %>
47  
-  Mikel Lindsaar has been working with Rails since 2006 and is the author of the Ruby <a href="http://github.com/mikel/mail">Mail gem</a> and core contributor (he helped re-write Action Mailer's API). Mikel is the founder of <a href="http://rubyx.com/">RubyX</a>, has a <a href="http://lindsaar.net/">blog</a> and <a href="http://twitter.com/raasdnil">tweets</a>.
  47
+  Mikel Lindsaar has been working with Rails since 2006 and is the author of the Ruby <a href="https://github.com/mikel/mail">Mail gem</a> and core contributor (he helped re-write Action Mailer's API). Mikel is the founder of <a href="http://rubyx.com/">RubyX</a>, has a <a href="http://lindsaar.net/">blog</a> and <a href="http://twitter.com/raasdnil">tweets</a>.
48 48
 <% end %>
49 49
 
50 50
 <%= author('Cássio Marques', 'cmarques') do %>
14  railties/guides/source/debugging_rails_applications.textile
Source Rendered
@@ -619,7 +619,7 @@ In this section, you will learn how to find and fix such leaks by using tools su
619 619
 
620 620
 h4. BleakHouse
621 621
 
622  
-"BleakHouse":http://github.com/fauna/bleak_house/tree/master is a library for finding memory leaks.
  622
+"BleakHouse":https://github.com/fauna/bleak_house/tree/master is a library for finding memory leaks.
623 623
 
624 624
 If a Ruby object does not go out of scope, the Ruby Garbage Collector won't sweep it since it is referenced somewhere. Leaks like this can grow slowly and your application will consume more and more memory, gradually affecting the overall system performance. This tool will help you find leaks on the Ruby heap.
625 625
 
@@ -668,7 +668,7 @@ To analyze it, just run the listed command. The top 20 leakiest lines will be li
668 668
 
669 669
 This way you can find where your application is leaking memory and fix it.
670 670
 
671  
-If "BleakHouse":http://github.com/fauna/bleak_house/tree/master doesn't report any heap growth but you still have memory growth, you might have a broken C extension, or real leak in the interpreter. In that case, try using Valgrind to investigate further.
  671
+If "BleakHouse":https://github.com/fauna/bleak_house/tree/master doesn't report any heap growth but you still have memory growth, you might have a broken C extension, or real leak in the interpreter. In that case, try using Valgrind to investigate further.
672 672
 
673 673
 h4. Valgrind
674 674
 
@@ -682,12 +682,12 @@ h3. Plugins for Debugging
682 682
 
683 683
 There are some Rails plugins to help you to find errors and debug your application. Here is a list of useful plugins for debugging:
684 684
 
685  
-* "Footnotes":http://github.com/josevalim/rails-footnotes: Every Rails page has footnotes that give request information and link back to your source via TextMate.
686  
-* "Query Trace":http://github.com/ntalbott/query_trace/tree/master: Adds query origin tracing to your logs.
687  
-* "Query Stats":http://github.com/dan-manges/query_stats/tree/master: A Rails plugin to track database queries.
  685
+* "Footnotes":https://github.com/josevalim/rails-footnotes: Every Rails page has footnotes that give request information and link back to your source via TextMate.
  686
+* "Query Trace":https://github.com/ntalbott/query_trace/tree/master: Adds query origin tracing to your logs.
  687
+* "Query Stats":https://github.com/dan-manges/query_stats/tree/master: A Rails plugin to track database queries.
688 688
 * "Query Reviewer":http://code.google.com/p/query-reviewer/: This rails plugin not only runs "EXPLAIN" before each of your select queries in development, but provides a small DIV in the rendered output of each page with the summary of warnings for each query that it analyzed.
689  
-* "Exception Notifier":http://github.com/rails/exception_notification/tree/master: Provides a mailer object and a default set of templates for sending email notifications when errors occur in a Rails application.
690  
-* "Exception Logger":http://github.com/defunkt/exception_logger/tree/master: Logs your Rails exceptions in the database and provides a funky web interface to manage them.
  689
+* "Exception Notifier":https://github.com/rails/exception_notification/tree/master: Provides a mailer object and a default set of templates for sending email notifications when errors occur in a Rails application.
  690
+* "Exception Logger":https://github.com/defunkt/exception_logger/tree/master: Logs your Rails exceptions in the database and provides a funky web interface to manage them.
691 691
 
692 692
 h3. References
693 693
 
10  railties/guides/source/form_helpers.textile
Source Rendered
@@ -475,7 +475,7 @@ To leverage time zone support in Rails, you have to ask your users what time zon
475 475
 
476 476
 There is also +time_zone_options_for_select+ helper for a more manual (therefore more customizable) way of doing this. Read the API documentation to learn about the possible arguments for these two methods.
477 477
 
478  
-Rails _used_ to have a +country_select+ helper for choosing countries, but this has been extracted to the "country_select plugin":http://github.com/rails/country_select/tree/master. When using this, be aware that the exclusion or inclusion of certain names from the list can be somewhat controversial (and was the reason this functionality was extracted from Rails).
  478
+Rails _used_ to have a +country_select+ helper for choosing countries, but this has been extracted to the "country_select plugin":https://github.com/rails/country_select/tree/master. When using this, be aware that the exclusion or inclusion of certain names from the list can be somewhat controversial (and was the reason this functionality was extracted from Rails).
479 479
 
480 480
 h3. Using Date and Time Form Helpers
481 481
 
@@ -589,7 +589,7 @@ def upload
589 589
 end
590 590
 </ruby>
591 591
 
592  
-Once a file has been uploaded, there are a multitude of potential tasks, ranging from where to store the files (on disk, Amazon S3, etc) and associating them with models to resizing image files and generating thumbnails. The intricacies of this are beyond the scope of this guide, but there are several plugins designed to assist with these. Two of the better known ones are "Attachment-Fu":http://github.com/technoweenie/attachment_fu and "Paperclip":http://www.thoughtbot.com/projects/paperclip.
  592
+Once a file has been uploaded, there are a multitude of potential tasks, ranging from where to store the files (on disk, Amazon S3, etc) and associating them with models to resizing image files and generating thumbnails. The intricacies of this are beyond the scope of this guide, but there are several plugins designed to assist with these. Two of the better known ones are "Attachment-Fu":https://github.com/technoweenie/attachment_fu and "Paperclip":http://www.thoughtbot.com/projects/paperclip.
593 593
 
594 594
 NOTE: If the user has not selected a file the corresponding parameter will be an empty string.
595 595
 
@@ -805,9 +805,9 @@ Many apps grow beyond simple forms editing a single object. For example when cre
805 805
 * As of Rails 2.3, Rails includes "Nested Attributes":./2_3_release_notes.html#nested-attributes and "Nested Object Forms":./2_3_release_notes.html#nested-object-forms
806 806
 * Ryan Bates' series of Railscasts on "complex forms":http://railscasts.com/episodes/75
807 807
 * Handle Multiple Models in One Form from "Advanced Rails Recipes":http://media.pragprog.com/titles/fr_arr/multiple_models_one_form.pdf
808  
-* Eloy Duran's "complex-forms-examples":http://github.com/alloy/complex-form-examples/ application
809  
-* Lance Ivy's "nested_assignment":http://github.com/cainlevy/nested_assignment/tree/master plugin and "sample application":http://github.com/cainlevy/complex-form-examples/tree/cainlevy
810  
-* James Golick's "attribute_fu":http://github.com/jamesgolick/attribute_fu plugin
  808
+* Eloy Duran's "complex-forms-examples":https://github.com/alloy/complex-form-examples/ application
  809
+* Lance Ivy's "nested_assignment":https://github.com/cainlevy/nested_assignment/tree/master plugin and "sample application":https://github.com/cainlevy/complex-form-examples/tree/cainlevy
  810
+* James Golick's "attribute_fu":https://github.com/jamesgolick/attribute_fu plugin
811 811
 
812 812
 h3. Changelog
813 813
 
4  railties/guides/source/generators.textile
Source Rendered
@@ -34,7 +34,7 @@ $ rails generate helper --help
34 34
 
35 35
 h3. Creating Your First Generator
36 36
 
37  
-Since Rails 3.0, generators are built on top of "Thor":http://github.com/wycats/thor. Thor provides powerful options parsing and a great API for manipulating files. For instance, let's build a generator that creates an initializer file named +initializer.rb+ inside +config/initializers+.
  37
+Since Rails 3.0, generators are built on top of "Thor":https://github.com/wycats/thor. Thor provides powerful options parsing and a great API for manipulating files. For instance, let's build a generator that creates an initializer file named +initializer.rb+ inside +config/initializers+.
38 38
 
39 39
 The first step is to create a file at +lib/generators/initializer_generator.rb+ with the following content:
40 40
 
@@ -319,7 +319,7 @@ If you generate another resource, you can see that we get exactly the same resul
319 319
 
320 320
 h3. Adding Generators Fallbacks
321 321
 
322  
-One last feature about generators which is quite useful for plugin generators is fallbacks. For example, imagine that you want to add a feature on top of TestUnit like "shoulda":http://github.com/thoughtbot/shoulda does. Since TestUnit already implements all generators required by Rails and shoulda just wants to overwrite part of it, there is no need for shoulda to reimplement some generators again, it can simply tell Rails to use a +TestUnit+ generator if none was found under the +Shoulda+ namespace.
  322
+One last feature about generators which is quite useful for plugin generators is fallbacks. For example, imagine that you want to add a feature on top of TestUnit like "shoulda":https://github.com/thoughtbot/shoulda does. Since TestUnit already implements all generators required by Rails and shoulda just wants to overwrite part of it, there is no need for shoulda to reimplement some generators again, it can simply tell Rails to use a +TestUnit+ generator if none was found under the +Shoulda+ namespace.
323 323
 
324 324
 We can easily simulate this behavior by changing our +config/application.rb+ once again:
325 325
 
2  railties/guides/source/getting_started.textile
Source Rendered
@@ -153,7 +153,7 @@ TIP. If you're working on Windows, you should be aware that the vast majority of
153 153
 
154 154
 h4. Creating the Blog Application
155 155
 
156  
-The best way to use this guide is to follow each step as it happens, no code or step needed to make this example application has been left out, so you can literally follow along step by step.  If you need to see the completed code, you can download it from "Getting Started Code":http://github.com/mikel/getting-started-code.
  156
+The best way to use this guide is to follow each step as it happens, no code or step needed to make this example application has been left out, so you can literally follow along step by step.  If you need to see the completed code, you can download it from "Getting Started Code":https://github.com/mikel/getting-started-code.
157 157
 
158 158
 To begin, open a terminal, navigate to a folder where you have rights to create files, and type:
159 159
 
28  railties/guides/source/i18n.textile
Source Rendered
@@ -87,11 +87,11 @@ en:
87 87
   hello: "Hello world"
88 88
 </ruby>
89 89
 
90  
-This means, that in the +:en+ locale, the key _hello_ will map to the _Hello world_ string. Every string inside Rails is internationalized in this way, see for instance Active Record validation messages in the "+activerecord/lib/active_record/locale/en.yml+":http://github.com/rails/rails/blob/master/activerecord/lib/active_record/locale/en.yml file or time and date formats in the "+activesupport/lib/active_support/locale/en.yml+":http://github.com/rails/rails/blob/master/activesupport/lib/active_support/locale/en.yml file. You can use YAML or standard Ruby Hashes to store translations in the default (Simple) backend.
  90
+This means, that in the +:en+ locale, the key _hello_ will map to the _Hello world_ string. Every string inside Rails is internationalized in this way, see for instance Active Record validation messages in the "+activerecord/lib/active_record/locale/en.yml+":https://github.com/rails/rails/blob/master/activerecord/lib/active_record/locale/en.yml file or time and date formats in the "+activesupport/lib/active_support/locale/en.yml+":https://github.com/rails/rails/blob/master/activesupport/lib/active_support/locale/en.yml file. You can use YAML or standard Ruby Hashes to store translations in the default (Simple) backend.
91 91
 
92 92
 The I18n library will use *English* as a *default locale*, i.e. if you don't set a different locale, +:en+ will be used for looking up translations.
93 93
 
94  
-NOTE: The i18n library takes a *pragmatic approach* to locale keys (after "some discussion":http://groups.google.com/group/rails-i18n/browse_thread/thread/14dede2c7dbe9470/80eec34395f64f3c?hl=en), including only the _locale_ ("language") part, like +:en+, +:pl+, not the _region_ part, like +:en-US+ or +:en-UK+, which are traditionally used for separating "languages" and "regional setting" or "dialects". Many international applications use only the "language" element of a locale such as +:cz+, +:th+ or +:es+ (for Czech, Thai and Spanish).  However, there are also regional differences within different language groups that may be important. For instance, in the +:en-US+ locale you would have $ as a currency symbol, while in +:en-UK+, you would have £. Nothing stops you from separating regional and other settings in this way: you just have to provide full "English - United Kingdom" locale in a +:en-UK+ dictionary. Various "Rails I18n plugins":http://rails-i18n.org/wiki such as "Globalize2":http://github.com/joshmh/globalize2/tree/master may help you implement it.
  94
+NOTE: The i18n library takes a *pragmatic approach* to locale keys (after "some discussion":http://groups.google.com/group/rails-i18n/browse_thread/thread/14dede2c7dbe9470/80eec34395f64f3c?hl=en), including only the _locale_ ("language") part, like +:en+, +:pl+, not the _region_ part, like +:en-US+ or +:en-UK+, which are traditionally used for separating "languages" and "regional setting" or "dialects". Many international applications use only the "language" element of a locale such as +:cz+, +:th+ or +:es+ (for Czech, Thai and Spanish).  However, there are also regional differences within different language groups that may be important. For instance, in the +:en-US+ locale you would have $ as a currency symbol, while in +:en-UK+, you would have £. Nothing stops you from separating regional and other settings in this way: you just have to provide full "English - United Kingdom" locale in a +:en-UK+ dictionary. Various "Rails I18n plugins":http://rails-i18n.org/wiki such as "Globalize2":https://github.com/joshmh/globalize2/tree/master may help you implement it.
95 95
 
96 96
 The *translations load path* (+I18n.load_path+) is just a Ruby Array of paths to your translation files that will be loaded automatically and available in your application. You can pick whatever directory and translation file naming scheme makes sense for you.
97 97
 
@@ -253,7 +253,7 @@ match '/:locale' => 'dashboard#index'
253 253
 
254 254
 Do take special care about the *order of your routes*, so this route declaration does not "eat" other ones. (You may want to add it directly before the +root :to+ declaration.)
255 255
 
256  
-NOTE: Have a look at two plugins which simplify work with routes in this way: Sven Fuchs's "routing_filter":http://github.com/svenfuchs/routing-filter/tree/master and Raul Murciano's "translate_routes":http://github.com/raul/translate_routes/tree/master.
  256
+NOTE: Have a look at two plugins which simplify work with routes in this way: Sven Fuchs's "routing_filter":https://github.com/svenfuchs/routing-filter/tree/master and Raul Murciano's "translate_routes":https://github.com/raul/translate_routes/tree/master.
257 257
 
258 258
 h4. Setting the Locale from the Client Supplied Information
259 259
 
@@ -278,7 +278,7 @@ def extract_locale_from_accept_language_header
278 278
 end
279 279
 </ruby>
280 280
 
281  
-Of course, in a production environment you would need much more robust code, and could use a plugin such as Iain Hecker's "http_accept_language":http://github.com/iain/http_accept_language/tree/master or even Rack middleware such as Ryan Tomayko's "locale":http://github.com/rack/rack-contrib/blob/master/lib/rack/contrib/locale.rb.
  281
+Of course, in a production environment you would need much more robust code, and could use a plugin such as Iain Hecker's "http_accept_language":https://github.com/iain/http_accept_language/tree/master or even Rack middleware such as Ryan Tomayko's "locale":https://github.com/rack/rack-contrib/blob/master/lib/rack/contrib/locale.rb.
282 282
 
283 283
 h5. Using GeoIP (or Similar) Database
284 284
 
@@ -390,7 +390,7 @@ So that would give you:
390 390
 
391 391
 !images/i18n/demo_localized_pirate.png(rails i18n demo localized time to pirate)!
392 392
 
393  
-TIP: Right now you might need to add some more date/time formats in order to make the I18n backend work as expected (at least for the 'pirate' locale). Of course, there's a great chance that somebody already did all the work by *translating Rails' defaults for your locale*. See the "rails-i18n repository at Github":http://github.com/svenfuchs/rails-i18n/tree/master/rails/locale for an archive of various locale files. When you put such file(s) in +config/locales/+ directory, they will automatically be ready for use.
  393
+TIP: Right now you might need to add some more date/time formats in order to make the I18n backend work as expected (at least for the 'pirate' locale). Of course, there's a great chance that somebody already did all the work by *translating Rails' defaults for your locale*. See the "rails-i18n repository at Github":https://github.com/svenfuchs/rails-i18n/tree/master/rails/locale for an archive of various locale files. When you put such file(s) in +config/locales/+ directory, they will automatically be ready for use.
394 394
 
395 395
 h4. Localized Views
396 396
 
@@ -778,23 +778,23 @@ Rails uses fixed strings and other localizations, such as format strings and oth
778 778
 
779 779
 h5. Action View Helper Methods
780 780
 
781  
-* +distance_of_time_in_words+ translates and pluralizes its result and interpolates the number of seconds, minutes, hours, and so on. See "datetime.distance_in_words":http://github.com/rails/rails/blob/master/actionpack/lib/action_view/locale/en.yml#L51 translations.
  781
+* +distance_of_time_in_words+ translates and pluralizes its result and interpolates the number of seconds, minutes, hours, and so on. See "datetime.distance_in_words":https://github.com/rails/rails/blob/master/actionpack/lib/action_view/locale/en.yml#L51 translations.
782 782
 
783  
-* +datetime_select+ and +select_month+ use translated month names for populating the resulting select tag. See "date.month_names":http://github.com/rails/rails/blob/master/activesupport/lib/active_support/locale/en.yml#L15 for translations. +datetime_select+ also looks up the order option from "date.order":http://github.com/rails/rails/blob/master/activesupport/lib/active_support/locale/en.yml#L18 (unless you pass the option explicitly). All date selection helpers translate the prompt using the translations in the "datetime.prompts":http://github.com/rails/rails/blob/master/actionpack/lib/action_view/locale/en.yml#L83 scope if applicable.
  783
+* +datetime_select+ and +select_month+ use translated month names for populating the resulting select tag. See "date.month_names":https://github.com/rails/rails/blob/master/activesupport/lib/active_support/locale/en.yml#L15 for translations. +datetime_select+ also looks up the order option from "date.order":https://github.com/rails/rails/blob/master/activesupport/lib/active_support/locale/en.yml#L18 (unless you pass the option explicitly). All date selection helpers translate the prompt using the translations in the "datetime.prompts":https://github.com/rails/rails/blob/master/actionpack/lib/action_view/locale/en.yml#L83 scope if applicable.
784 784
 
785  
-* The +number_to_currency+, +number_with_precision+, +number_to_percentage+, +number_with_delimiter+, and +number_to_human_size+ helpers use the number format settings located in the "number":http://github.com/rails/rails/blob/master/actionpack/lib/action_view/locale/en.yml#L2 scope.
  785
+* The +number_to_currency+, +number_with_precision+, +number_to_percentage+, +number_with_delimiter+, and +number_to_human_size+ helpers use the number format settings located in the "number":https://github.com/rails/rails/blob/master/actionpack/lib/action_view/locale/en.yml#L2 scope.
786 786
 
787 787
 h5. Active Record Methods
788 788
 
789  
-* +model_name.human+ and +human_attribute_name+ use translations for model names and attribute names if available in the "activerecord.models":http://github.com/rails/rails/blob/master/activerecord/lib/active_record/locale/en.yml#L29 scope. They also support translations for inherited class names (e.g. for use with STI) as explained above in "Error message scopes".
  789
+* +model_name.human+ and +human_attribute_name+ use translations for model names and attribute names if available in the "activerecord.models":https://github.com/rails/rails/blob/master/activerecord/lib/active_record/locale/en.yml#L29 scope. They also support translations for inherited class names (e.g. for use with STI) as explained above in "Error message scopes".
790 790
 
791 791
 * +ActiveRecord::Errors#generate_message+ (which is used by Active Record validations but may also be used manually) uses +model_name.human+ and +human_attribute_name+ (see above). It also translates the error message and supports translations for inherited class names as explained above in "Error message scopes".
792 792
 
793  
-*+ ActiveRecord::Errors#full_messages+ prepends the attribute name to the error message using a separator that will be looked up from "activerecord.errors.format.separator":http://github.com/rails/rails/blob/master/actionpack/lib/action_view/locale/en.yml#L91 (and which defaults to +'&nbsp;'+).
  793
+*+ ActiveRecord::Errors#full_messages+ prepends the attribute name to the error message using a separator that will be looked up from "activerecord.errors.format.separator":https://github.com/rails/rails/blob/master/actionpack/lib/action_view/locale/en.yml#L91 (and which defaults to +'&nbsp;'+).
794 794
 
795 795
 h5. Active Support Methods
796 796
 
797  
-* +Array#to_sentence+ uses format settings as given in the "support.array":http://github.com/rails/rails/blob/master/activesupport/lib/active_support/locale/en.yml#L30 scope.
  797
+* +Array#to_sentence+ uses format settings as given in the "support.array":https://github.com/rails/rails/blob/master/activesupport/lib/active_support/locale/en.yml#L30 scope.
798 798
 
799 799
 
800 800
 h3. Customize your I18n Setup
@@ -867,15 +867,15 @@ I18n support in Ruby on Rails was introduced in the release 2.2 and is still evo
867 867
 
868 868
 Thus we encourage everybody to experiment with new ideas and features in plugins or other libraries and make them available to the community. (Don't forget to announce your work on our "mailing list":http://groups.google.com/group/rails-i18n!)
869 869
 
870  
-If you find your own locale (language) missing from our "example translations data":http://github.com/svenfuchs/rails-i18n/tree/master/rails/locale repository for Ruby on Rails, please "_fork_":http://github.com/guides/fork-a-project-and-submit-your-modifications the repository, add your data and send a "pull request":http://github.com/guides/pull-requests.
  870
+If you find your own locale (language) missing from our "example translations data":https://github.com/svenfuchs/rails-i18n/tree/master/rails/locale repository for Ruby on Rails, please "_fork_":https://github.com/guides/fork-a-project-and-submit-your-modifications the repository, add your data and send a "pull request":https://github.com/guides/pull-requests.
871 871
 
872 872
 
873 873
 h3. Resources
874 874
 
875 875
 * "rails-i18n.org":http://rails-i18n.org - Homepage of the rails-i18n project. You can find lots of useful resources on the "wiki":http://rails-i18n.org/wiki.
876 876
 * "Google group: rails-i18n":http://groups.google.com/group/rails-i18n - The project's mailing list.
877  
-* "Github: rails-i18n":http://github.com/svenfuchs/rails-i18n/tree/master - Code repository for the rails-i18n project. Most importantly you can find lots of "example translations":http://github.com/svenfuchs/rails-i18n/tree/master/rails/locale for Rails that should work for your application in most cases.
878  
-* "Github: i18n":http://github.com/svenfuchs/i18n/tree/master - Code repository for the i18n gem.
  877
+* "Github: rails-i18n":https://github.com/svenfuchs/rails-i18n/tree/master - Code repository for the rails-i18n project. Most importantly you can find lots of "example translations":https://github.com/svenfuchs/rails-i18n/tree/master/rails/locale for Rails that should work for your application in most cases.
  878
+* "Github: i18n":https://github.com/svenfuchs/i18n/tree/master - Code repository for the i18n gem.
879 879
 * "Lighthouse: rails-i18n":http://i18n.lighthouseapp.com/projects/14948-rails-i18n/overview - Issue tracker for the rails-i18n project.
880 880
 * "Lighthouse: i18n":http://i18n.lighthouseapp.com/projects/14947-ruby-i18n/overview - Issue tracker for the i18n gem.
881 881
 
2  railties/guides/source/index.html.erb
@@ -8,7 +8,7 @@ Ruby on Rails Guides
8 8
 <% if @edge %>
9 9
 <p>
10 10
   These are <b>Edge Guides</b>, based on the current
11  
-  <a href="http://github.com/rails/rails/tree/master">master branch</a>.
  11
+  <a href="https://github.com/rails/rails/tree/master">master branch</a>.
12 12
 </p>
13 13
 <p>
14 14
   If you are looking for the ones for the stable version please check
2  railties/guides/source/migrations.textile
Source Rendered
@@ -586,7 +586,7 @@ The Active Record way claims that intelligence belongs in your models, not in th
586 586
 
587 587
 Validations such as +validates :foreign_key, :uniqueness => true+ are one way in which models can enforce data integrity. The +:dependent+ option on associations allows models to automatically destroy child objects when the parent is destroyed. Like anything which operates at the application level these cannot guarantee referential integrity and so some people augment them with foreign key constraints.
588 588
 
589  
-Although Active Record does not provide any tools for working directly with such features, the +execute+ method can be used to execute arbitrary SQL. There are also a number of plugins such as "foreign_key_migrations":http://github.com/harukizaemon/redhillonrails/tree/master/foreign_key_migrations/ which add foreign key support to Active Record (including support for dumping foreign keys in +db/schema.rb+).
  589
+Although Active Record does not provide any tools for working directly with such features, the +execute+ method can be used to execute arbitrary SQL. There are also a number of plugins such as "foreign_key_migrations":https://github.com/harukizaemon/redhillonrails/tree/master/foreign_key_migrations/ which add foreign key support to Active Record (including support for dumping foreign keys in +db/schema.rb+).
590 590
 
591 591
 h3. Changelog
592 592
 
4  railties/guides/source/performance_testing.textile
Source Rendered
@@ -500,8 +500,8 @@ h4. Rails Plugins and Gems
500 500
 
501 501
 * "Rails Analyzer":http://rails-analyzer.rubyforge.org
502 502
 * "Palmist":http://www.flyingmachinestudios.com/projects/
503  
-* "Rails Footnotes":http://github.com/josevalim/rails-footnotes/tree/master
504  
-* "Query Reviewer":http://github.com/dsboulder/query_reviewer/tree/master
  503
+* "Rails Footnotes":https://github.com/josevalim/rails-footnotes/tree/master
  504
+* "Query Reviewer":https://github.com/dsboulder/query_reviewer/tree/master
505 505
 
506 506
 h4. Generic Tools
507 507
 
2  railties/guides/source/security.textile
Source Rendered
@@ -282,7 +282,7 @@ h4. File Uploads
282 282
 
283 283
 Many web applications allow users to upload files. _(highlight)File names, which the user may choose (partly), should always be filtered_ as an attacker could use a malicious file name to overwrite any file on the server. If you store file uploads at /var/www/uploads, and the user enters a file name like “../../../etc/passwd”, it may overwrite an important file. Of course, the Ruby interpreter would need the appropriate permissions to do so – one more reason to run web servers, database servers and other programs as a less privileged Unix user.
284 284
 
285  
-When filtering user input file names, _(highlight)don't try to remove malicious parts_. Think of a situation where the web application removes all “../” in a file name and an attacker uses a string such as “....//” - the result will be “../”. It is best to use a whitelist approach, which _(highlight)checks for the validity of a file name with a set of accepted characters_. This is opposed to a blacklist approach which attempts to remove not allowed characters. In case it isn't a valid file name, reject it (or replace not accepted characters), but don't remove them. Here is the file name sanitizer from the "attachment_fu plugin":http://github.com/technoweenie/attachment_fu/tree/master:
  285
+When filtering user input file names, _(highlight)don't try to remove malicious parts_. Think of a situation where the web application removes all “../” in a file name and an attacker uses a string such as “....//” - the result will be “../”. It is best to use a whitelist approach, which _(highlight)checks for the validity of a file name with a set of accepted characters_. This is opposed to a blacklist approach which attempts to remove not allowed characters. In case it isn't a valid file name, reject it (or replace not accepted characters), but don't remove them. Here is the file name sanitizer from the "attachment_fu plugin":https://github.com/technoweenie/attachment_fu/tree/master:
286 286
 
287 287
 <ruby>
288 288
 def sanitize_filename(filename)
4  railties/guides/source/testing.textile
Source Rendered
@@ -939,8 +939,8 @@ h3. Other Testing Approaches
939 939
 The built-in +test/unit+ based testing is not the only way to test Rails applications. Rails developers have come up with a wide variety of other approaches and aids for testing, including:
940 940
 
941 941
 * "NullDB":http://avdi.org/projects/nulldb/, a way to speed up testing by avoiding database use.
942  
-* "Factory Girl":http://github.com/thoughtbot/factory_girl/tree/master, as replacement for fixtures.
943  
-* "Machinist":http://github.com/notahat/machinist/tree/master, another replacement for fixtures.
  942
+* "Factory Girl":https://github.com/thoughtbot/factory_girl/tree/master, as replacement for fixtures.
  943
+* "Machinist":https://github.com/notahat/machinist/tree/master, another replacement for fixtures.
944 944
 * "Shoulda":http://www.thoughtbot.com/projects/shoulda, an extension to +test/unit+ with additional helpers, macros, and assertions.
945 945
 * "RSpec":http://rspec.info/, a behavior-driven development framework
946 946
 
2  railties/lib/rails/generators/rails/app/templates/config/locales/en.yml
... ...
@@ -1,5 +1,5 @@
1 1
 # Sample localization file for English. Add more files in this directory for other locales.
2  
-# See http://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points.
  2
+# See https://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points.
3 3
 
4 4
 en:
5 5
   hello: "Hello world"

0 notes on commit 071ddb8

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