aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAkira Matsuda <ronnie@dio.jp>2013-02-18 23:57:37 +0900
committerAkira Matsuda <ronnie@dio.jp>2013-02-18 23:59:48 +0900
commit57b0ae8011ab0502253631bd6fdbc0fc838b593e (patch)
treee7249f5fb7015446d089e7de6d4e83d6c87bf4d5
parentb04c81d367323849a0019f6964639efaad0e9df0 (diff)
downloadrails-57b0ae8011ab0502253631bd6fdbc0fc838b593e.tar.gz
rails-57b0ae8011ab0502253631bd6fdbc0fc838b593e.tar.bz2
rails-57b0ae8011ab0502253631bd6fdbc0fc838b593e.zip
Gist URLs are now namespaced
see: https://github.com/blog/1406-namespaced-gists
-rw-r--r--actionpack/lib/action_dispatch/middleware/remote_ip.rb2
-rw-r--r--activerecord/lib/active_record/attribute_methods/read.rb2
-rw-r--r--activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb8
-rw-r--r--guides/source/generators.md2
-rw-r--r--guides/source/kindle/KINDLE.md2
-rw-r--r--railties/test/generators/shared_generator_tests.rb6
6 files changed, 11 insertions, 11 deletions
diff --git a/actionpack/lib/action_dispatch/middleware/remote_ip.rb b/actionpack/lib/action_dispatch/middleware/remote_ip.rb
index 5b5fa2a0e2..6de9be63c5 100644
--- a/actionpack/lib/action_dispatch/middleware/remote_ip.rb
+++ b/actionpack/lib/action_dispatch/middleware/remote_ip.rb
@@ -83,7 +83,7 @@ module ActionDispatch
# This constant contains a regular expression that validates every known
# form of IP v4 and v6 address, with or without abbreviations, adapted
- # from {this gist}[https://gist.github.com/1289635].
+ # from {this gist}[https://gist.github.com/gazay/1289635].
VALID_IP = %r{
(^(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[0-9]{1,2})(\.(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[0-9]{1,2})){3}$) | # ip v4
(^(
diff --git a/activerecord/lib/active_record/attribute_methods/read.rb b/activerecord/lib/active_record/attribute_methods/read.rb
index 3c03cce838..506f5d75f9 100644
--- a/activerecord/lib/active_record/attribute_methods/read.rb
+++ b/activerecord/lib/active_record/attribute_methods/read.rb
@@ -74,7 +74,7 @@ module ActiveRecord
# to a date object, like Date.new(2004, 12, 12)).
def read_attribute(attr_name)
# If it's cached, just return it
- # We use #[] first as a perf optimization for non-nil values. See https://gist.github.com/3552829.
+ # We use #[] first as a perf optimization for non-nil values. See https://gist.github.com/jonleighton/3552829.
name = attr_name.to_s
@attributes_cache[name] || @attributes_cache.fetch(name) {
column = @columns_hash.fetch(name) {
diff --git a/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb b/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb
index 847d9da6e6..1754e424b8 100644
--- a/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb
+++ b/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb
@@ -577,10 +577,10 @@ module ActiveRecord
# When a connection is established or removed, we invalidate the cache.
#
# Ideally we would use #fetch here, as class_to_pool[klass] may sometimes be nil.
- # However, benchmarking (https://gist.github.com/3552829) showed that #fetch is
- # significantly slower than #[]. So in the nil case, no caching will take place,
- # but that's ok since the nil case is not the common one that we wish to optimise
- # for.
+ # However, benchmarking (https://gist.github.com/jonleighton/3552829) showed that
+ # #fetch is significantly slower than #[]. So in the nil case, no caching will
+ # take place, but that's ok since the nil case is not the common one that we wish
+ # to optimise for.
def retrieve_connection_pool(klass)
class_to_pool[klass.name] ||= begin
until pool = pool_for(klass)
diff --git a/guides/source/generators.md b/guides/source/generators.md
index 1a08eb420a..d7c789e2d8 100644
--- a/guides/source/generators.md
+++ b/guides/source/generators.md
@@ -412,7 +412,7 @@ This command will generate the `Thud` application, and then apply the template t
Templates don't have to be stored on the local system, the `-m` option also supports online templates:
```bash
-$ rails new thud -m https://gist.github.com/722911.txt
+$ rails new thud -m https://gist.github.com/radar/722911/raw/
```
Whilst the final section of this guide doesn't cover how to generate the most awesome template known to man, it will take you through the methods available at your disposal so that you can develop it yourself. These same methods are also available for generators.
diff --git a/guides/source/kindle/KINDLE.md b/guides/source/kindle/KINDLE.md
index 08937e053e..8c4fad18aa 100644
--- a/guides/source/kindle/KINDLE.md
+++ b/guides/source/kindle/KINDLE.md
@@ -10,7 +10,7 @@
## Resources
* [Stack Overflow: Kindle Periodical Format](http://stackoverflow.com/questions/5379565/kindle-periodical-format)
- * Example Periodical [.ncx](https://gist.github.com/808c971ed087b839d462) and [.opf](https://gist.github.com/d6349aa8488eca2ee6d0)
+ * Example Periodical [.ncx](https://gist.github.com/mipearson/808c971ed087b839d462) and [.opf](https://gist.github.com/mipearson/d6349aa8488eca2ee6d0)
* [Kindle Publishing Guidelines](http://kindlegen.s3.amazonaws.com/AmazonKindlePublishingGuidelines.pdf)
* [KindleGen & Kindle Previewer](http://www.amazon.com/gp/feature.html?ie=UTF8&docId=1000234621)
diff --git a/railties/test/generators/shared_generator_tests.rb b/railties/test/generators/shared_generator_tests.rb
index d203afed5c..2081f4aba8 100644
--- a/railties/test/generators/shared_generator_tests.rb
+++ b/railties/test/generators/shared_generator_tests.rb
@@ -83,7 +83,7 @@ module SharedGeneratorTests
end
def test_template_is_executed_when_supplied
- path = "http://gist.github.com/103208.txt"
+ path = "https://gist.github.com/josevalim/103208/raw/"
template = %{ say "It works!" }
template.instance_eval "def read; self; end" # Make the string respond to read
@@ -92,7 +92,7 @@ module SharedGeneratorTests
end
def test_template_is_executed_when_supplied_an_https_path
- path = "https://gist.github.com/103208.txt"
+ path = "https://gist.github.com/josevalim/103208/raw/"
template = %{ say "It works!" }
template.instance_eval "def read; self; end" # Make the string respond to read
@@ -188,7 +188,7 @@ module SharedCustomGeneratorTests
end
def test_builder_option_with_http
- url = "http://gist.github.com/103208.txt"
+ url = "https://gist.github.com/josevalim/103208/raw/"
template = "class #{builder_class}; end"
template.instance_eval "def read; self; end" # Make the string respond to read