1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Gist URLs are now namespaced

see: https://github.com/blog/1406-namespaced-gists
This commit is contained in:
Akira Matsuda 2013-02-18 23:57:37 +09:00
parent b04c81d367
commit 57b0ae8011
6 changed files with 11 additions and 11 deletions

View file

@ -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
(^(

View file

@ -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) {

View file

@ -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)

View file

@ -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.

View file

@ -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)

View file

@ -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