mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
Mass typo and misspelling fix.
This commit is contained in:
@@ -38,7 +38,7 @@ module TMail
|
||||
# = Class Address
|
||||
#
|
||||
# Provides a complete handling library for email addresses. Can parse a string of an
|
||||
# address directly or take in preformatted addresses themseleves. Allows you to add
|
||||
# address directly or take in preformatted addresses themselves. Allows you to add
|
||||
# and remove phrases from the front of the address and provides a compare function for
|
||||
# email addresses.
|
||||
#
|
||||
@@ -143,7 +143,7 @@ module TMail
|
||||
|
||||
# This is to catch an unquoted "@" symbol in the local part of the
|
||||
# address. Handles addresses like <"@"@me.com> and makes sure they
|
||||
# stay like <"@"@me.com> (previously were becomming <@@me.com>)
|
||||
# stay like <"@"@me.com> (previously were becoming <@@me.com>)
|
||||
if local && (local.join == '@' || local.join =~ /\A[^"].*?@.*?[^"]\Z/)
|
||||
@local = "\"#{local.join}\""
|
||||
else
|
||||
|
||||
@@ -59,7 +59,7 @@ module TMail
|
||||
#
|
||||
# This is because a mailbox doesn't have the : after the From that designates the
|
||||
# beginning of the envelope sender (which can be different to the from address of
|
||||
# the emial)
|
||||
# the email)
|
||||
#
|
||||
# Other fields can be passed as normal, "Reply-To", "Received" etc.
|
||||
#
|
||||
|
||||
@@ -42,7 +42,7 @@ module TMail
|
||||
# Allows you to query the mail object with a string to get the contents
|
||||
# of the field you want.
|
||||
#
|
||||
# Returns a string of the exact contnts of the field
|
||||
# Returns a string of the exact contents of the field
|
||||
#
|
||||
# mail.from = "mikel <mikel@lindsaar.net>"
|
||||
# mail.header_string("From") #=> "mikel <mikel@lindsaar.net>"
|
||||
|
||||
@@ -255,7 +255,7 @@ module TMail
|
||||
alias fetch []
|
||||
|
||||
# Allows you to set or delete TMail header objects at will.
|
||||
# Eamples:
|
||||
# Examples:
|
||||
# @mail = TMail::Mail.new
|
||||
# @mail['to'].to_s # => 'mikel@test.com.au'
|
||||
# @mail['to'] = 'mikel@elsewhere.org'
|
||||
@@ -265,7 +265,7 @@ module TMail
|
||||
# @mail['to'].to_s # => nil
|
||||
# @mail.encoded # => "\r\n"
|
||||
#
|
||||
# Note: setting mail[] = nil actualy deletes the header field in question from the object,
|
||||
# Note: setting mail[] = nil actually deletes the header field in question from the object,
|
||||
# it does not just set the value of the hash to nil
|
||||
def []=( key, val )
|
||||
dkey = key.downcase
|
||||
|
||||
@@ -347,7 +347,7 @@ module ActionController #:nodoc:
|
||||
cattr_accessor :optimise_named_routes
|
||||
self.optimise_named_routes = true
|
||||
|
||||
# Controls whether request forgergy protection is turned on or not. Turned off by default only in test mode.
|
||||
# Controls whether request forgery protection is turned on or not. Turned off by default only in test mode.
|
||||
class_inheritable_accessor :allow_forgery_protection
|
||||
self.allow_forgery_protection = true
|
||||
|
||||
|
||||
@@ -100,7 +100,7 @@ module ActionController
|
||||
@https = flag
|
||||
end
|
||||
|
||||
# Return +true+ if the session is mimicing a secure HTTPS request.
|
||||
# Return +true+ if the session is mimicking a secure HTTPS request.
|
||||
#
|
||||
# if session.https?
|
||||
# ...
|
||||
|
||||
@@ -259,7 +259,7 @@ end_msg
|
||||
@status ||= 200
|
||||
# Convert 'cookie' header to 'Set-Cookie' headers.
|
||||
# Because Set-Cookie header can appear more the once in the response body,
|
||||
# we store it in a line break seperated string that will be translated to
|
||||
# we store it in a line break separated string that will be translated to
|
||||
# multiple Set-Cookie header by the handler.
|
||||
if cookie = options.delete('cookie')
|
||||
cookies = []
|
||||
|
||||
@@ -61,7 +61,7 @@ module ActionController
|
||||
request_method == :head
|
||||
end
|
||||
|
||||
# Provides acccess to the request's HTTP headers, for example:
|
||||
# Provides access to the request's HTTP headers, for example:
|
||||
# request.headers["Content-Type"] # => "text/plain"
|
||||
def headers
|
||||
@headers ||= ActionController::Http::Headers.new(@env)
|
||||
@@ -231,7 +231,7 @@ EOM
|
||||
parts[0..-(tld_length+2)]
|
||||
end
|
||||
|
||||
# Return the query string, accounting for server idiosyncracies.
|
||||
# Return the query string, accounting for server idiosyncrasies.
|
||||
def query_string
|
||||
if uri = @env['REQUEST_URI']
|
||||
uri.split('?', 2)[1] || ''
|
||||
@@ -240,7 +240,7 @@ EOM
|
||||
end
|
||||
end
|
||||
|
||||
# Return the request URI, accounting for server idiosyncracies.
|
||||
# Return the request URI, accounting for server idiosyncrasies.
|
||||
# WEBrick includes the full URL. IIS leaves REQUEST_URI blank.
|
||||
def request_uri
|
||||
if uri = @env['REQUEST_URI']
|
||||
|
||||
@@ -17,7 +17,7 @@ module ActionController #:nodoc:
|
||||
# forged link from another site, is done by embedding a token based on the session (which an attacker wouldn't know) in all
|
||||
# forms and Ajax requests generated by Rails and then verifying the authenticity of that token in the controller. Only
|
||||
# HTML/JavaScript requests are checked, so this will not protect your XML API (presumably you'll have a different authentication
|
||||
# scheme there anyway). Also, GET requests are not protected as these should be indempotent anyway.
|
||||
# scheme there anyway). Also, GET requests are not protected as these should be idempotent anyway.
|
||||
#
|
||||
# This is turned on with the <tt>protect_from_forgery</tt> method, which will check the token and raise an
|
||||
# ActionController::InvalidAuthenticityToken if it doesn't match what was expected. You can customize the error message in
|
||||
|
||||
@@ -222,7 +222,7 @@ module ActionController #:nodoc:
|
||||
!rendered_file.nil?
|
||||
end
|
||||
|
||||
# A shortcut to the flash. Returns an empyt hash if no session flash exists.
|
||||
# A shortcut to the flash. Returns an empty hash if no session flash exists.
|
||||
def flash
|
||||
session['flash'] || {}
|
||||
end
|
||||
|
||||
@@ -64,7 +64,7 @@ module HTML
|
||||
#
|
||||
# When using a combination of the above, the element name comes first
|
||||
# followed by identifier, class names, attributes, pseudo classes and
|
||||
# negation in any order. Do not seprate these parts with spaces!
|
||||
# negation in any order. Do not separate these parts with spaces!
|
||||
# Space separation is used for descendant selectors.
|
||||
#
|
||||
# For example:
|
||||
@@ -158,7 +158,7 @@ module HTML
|
||||
# * <tt>:not(selector)</tt> -- Match the element only if the element does not
|
||||
# match the simple selector.
|
||||
#
|
||||
# As you can see, <tt>:nth-child<tt> pseudo class and its varient can get quite
|
||||
# As you can see, <tt>:nth-child<tt> pseudo class and its variant can get quite
|
||||
# tricky and the CSS specification doesn't do a much better job explaining it.
|
||||
# But after reading the examples and trying a few combinations, it's easy to
|
||||
# figure out.
|
||||
|
||||
@@ -141,7 +141,7 @@ module ActionView
|
||||
#
|
||||
# error_messages_for 'user_common', 'user', :object_name => 'user'
|
||||
#
|
||||
# If the objects cannot be located as instance variables, you can add an extra <tt>:object</tt> paremeter which gives the actual
|
||||
# If the objects cannot be located as instance variables, you can add an extra <tt>:object</tt> parameter which gives the actual
|
||||
# object (or array of objects to use):
|
||||
#
|
||||
# error_messages_for 'user', :object => @question.user
|
||||
|
||||
@@ -76,7 +76,7 @@ module ActionView
|
||||
# Creates a form and a scope around a specific model object that is used as
|
||||
# a base for questioning about values for the fields.
|
||||
#
|
||||
# Rails provides succint resource-oriented form generation with +form_for+
|
||||
# Rails provides succinct resource-oriented form generation with +form_for+
|
||||
# like this:
|
||||
#
|
||||
# <% form_for @offer do |f| %>
|
||||
|
||||
@@ -61,7 +61,7 @@ module ActionView
|
||||
#
|
||||
# == Designing your Rails actions for Ajax
|
||||
# When building your action handlers (that is, the Rails actions that receive your background requests), it's
|
||||
# important to remember a few things. First, whatever your action would normall return to the browser, it will
|
||||
# important to remember a few things. First, whatever your action would normally return to the browser, it will
|
||||
# return to the Ajax call. As such, you typically don't want to render with a layout. This call will cause
|
||||
# the layout to be transmitted back to your page, and, if you have a full HTML/CSS, will likely mess a lot of things up.
|
||||
# You can turn the layout off on particular actions by doing the following:
|
||||
|
||||
@@ -184,7 +184,7 @@ module ActionView
|
||||
HTML::WhiteListSanitizer.allowed_attributes.merge(attributes)
|
||||
end
|
||||
|
||||
# Adds to the Set of allowed CSS properties for the #sanitize and +sanitize_css+ heleprs.
|
||||
# Adds to the Set of allowed CSS properties for the #sanitize and +sanitize_css+ helpers.
|
||||
#
|
||||
# Rails::Initializer.run do |config|
|
||||
# config.action_view.sanitized_allowed_css_properties = 'expression'
|
||||
|
||||
@@ -193,7 +193,7 @@ module ActionView
|
||||
#
|
||||
# * <tt>:onDrop</tt> - Called when a +draggable_element+ is dropped onto
|
||||
# this element. Override this callback with a JavaScript expression to
|
||||
# change the default drop behavour. Example:
|
||||
# change the default drop behaviour. Example:
|
||||
#
|
||||
# :onDrop => "function(draggable_element, droppable_element, event) { alert('I like bananas') }"
|
||||
#
|
||||
|
||||
@@ -34,7 +34,7 @@ module ActiveRecord
|
||||
class_to_reflection = {}
|
||||
# Not all records have the same class, so group then preload
|
||||
# group on the reflection itself so that if various subclass share the same association then we do not split them
|
||||
# unncessarily
|
||||
# unnecessarily
|
||||
records.group_by {|record| class_to_reflection[record.class] ||= record.class.reflections[association]}.each do |reflection, records|
|
||||
raise ConfigurationError, "Association named '#{ association }' was not found; perhaps you misspelled it?" unless reflection
|
||||
send("preload_#{reflection.macro}_association", records, reflection, preload_options)
|
||||
|
||||
@@ -6,7 +6,7 @@ module ActiveRecord #:nodoc:
|
||||
class ActiveRecordError < StandardError
|
||||
end
|
||||
|
||||
# Raised when the single-table inheritance mechanism failes to locate the subclass
|
||||
# Raised when the single-table inheritance mechanism fails to locate the subclass
|
||||
# (for example due to improper usage of column that +inheritance_column+ points to).
|
||||
class SubclassNotFound < ActiveRecordError #:nodoc:
|
||||
end
|
||||
@@ -97,7 +97,7 @@ module ActiveRecord #:nodoc:
|
||||
class MissingAttributeError < NoMethodError
|
||||
end
|
||||
|
||||
# Raised when an error occured while doing a mass assignment to an attribute through the
|
||||
# Raised when an error occurred while doing a mass assignment to an attribute through the
|
||||
# <tt>attributes=</tt> method. The exception has an +attribute+ property that is the name of the
|
||||
# offending attribute.
|
||||
class AttributeAssignmentError < ActiveRecordError
|
||||
@@ -271,7 +271,7 @@ module ActiveRecord #:nodoc:
|
||||
# # Now 'Bob' exist and is an 'admin'
|
||||
# User.find_or_create_by_name('Bob', :age => 40) { |u| u.admin = true }
|
||||
#
|
||||
# Use the <tt>find_or_initialize_by_</tt> finder if you want to return a new record without saving it first. Protected attributes won't be setted unless they are given in a block. For example:
|
||||
# Use the <tt>find_or_initialize_by_</tt> finder if you want to return a new record without saving it first. Protected attributes won't be set unless they are given in a block. For example:
|
||||
#
|
||||
# # No 'Winter' tag exists
|
||||
# winter = Tag.find_or_initialize_by_name("Winter")
|
||||
|
||||
@@ -50,7 +50,7 @@ module ActiveRecord
|
||||
#
|
||||
# == Inheritable callback queues
|
||||
#
|
||||
# Besides the overwriteable callback methods, it's also possible to register callbacks through the use of the callback macros.
|
||||
# Besides the overwritable callback methods, it's also possible to register callbacks through the use of the callback macros.
|
||||
# Their main advantage is that the macros add behavior into a callback queue that is kept intact down through an inheritance
|
||||
# hierarchy. Example:
|
||||
#
|
||||
|
||||
@@ -372,7 +372,7 @@ module ActiveRecord
|
||||
|
||||
def add_column_options!(sql, options) #:nodoc:
|
||||
sql << " DEFAULT #{quote(options[:default], options[:column])}" if options_include_default?(options)
|
||||
# must explcitly check for :null to allow change_column to work on migrations
|
||||
# must explicitly check for :null to allow change_column to work on migrations
|
||||
if options.has_key? :null
|
||||
if options[:null] == false
|
||||
sql << " NOT NULL"
|
||||
|
||||
@@ -805,7 +805,7 @@ module ActiveRecord
|
||||
end
|
||||
|
||||
private
|
||||
# The internal PostgreSQL identifer of the money data type.
|
||||
# The internal PostgreSQL identifier of the money data type.
|
||||
MONEY_COLUMN_TYPE_OID = 790 #:nodoc:
|
||||
|
||||
# Connects to a PostgreSQL server and sets up the adapter depending on the
|
||||
|
||||
@@ -301,7 +301,7 @@ module ActiveRecord
|
||||
:odd => 'odd?', :even => 'even?' }.freeze
|
||||
|
||||
# Adds a validation method or block to the class. This is useful when
|
||||
# overriding the +validate+ instance method becomes too unwieldly and
|
||||
# overriding the +validate+ instance method becomes too unwieldy and
|
||||
# you're looking for more descriptive declaration of your validations.
|
||||
#
|
||||
# This can be done with a symbol pointing to a method:
|
||||
|
||||
@@ -111,7 +111,7 @@ module ActiveResource
|
||||
# over HTTPS.
|
||||
#
|
||||
# Note: Some values cannot be provided in the URL passed to site. e.g. email addresses
|
||||
# as usernames. In those situations you should use the seperate user and password option.
|
||||
# as usernames. In those situations you should use the separate user and password option.
|
||||
# == Errors & Validation
|
||||
#
|
||||
# Error handling and validation is handled in much the same manner as you're used to seeing in
|
||||
|
||||
@@ -65,7 +65,7 @@ module ActiveResource
|
||||
class << self
|
||||
|
||||
# Returns an array of all request objects that have been sent to the mock. You can use this to check
|
||||
# wether or not your model actually sent an HTTP request.
|
||||
# if your model actually sent an HTTP request.
|
||||
#
|
||||
# ==== Example
|
||||
# def setup
|
||||
|
||||
@@ -21,7 +21,7 @@ module ActiveSupport #:nodoc:
|
||||
# This emits the number without any scientific notation.
|
||||
# I prefer it to using self.to_f.to_s, which would lose precision.
|
||||
#
|
||||
# Note that YAML allows that when reconsituting floats
|
||||
# Note that YAML allows that when reconstituting floats
|
||||
# to native types, some precision may get lost.
|
||||
# There is no full precision real YAML tag that I am aware of.
|
||||
str = self.to_s
|
||||
|
||||
@@ -24,8 +24,8 @@ module ActiveSupport #:nodoc:
|
||||
#
|
||||
# "posts".singularize # => "post"
|
||||
# "octopi".singularize # => "octopus"
|
||||
# "sheep".singluarize # => "sheep"
|
||||
# "word".singluarize # => "word"
|
||||
# "sheep".singularize # => "sheep"
|
||||
# "word".singularize # => "word"
|
||||
# "the blue mailmen".singularize # => "the blue mailman"
|
||||
# "CamelOctopi".singularize # => "CamelOctopus"
|
||||
def singularize
|
||||
|
||||
@@ -261,7 +261,7 @@ module ActiveSupport #:nodoc:
|
||||
# Layers additional behavior on Time#<=> so that DateTime and ActiveSupport::TimeWithZone instances
|
||||
# can be chronologically compared with a Time
|
||||
def compare_with_coercion(other)
|
||||
# if other is an ActiveSupport::TimeWithZone, coerce a Time instance from it so we can do <=> comparision
|
||||
# if other is an ActiveSupport::TimeWithZone, coerce a Time instance from it so we can do <=> comparison
|
||||
other = other.comparable_time if other.respond_to?(:comparable_time)
|
||||
if other.acts_like?(:date)
|
||||
# other is a Date/DateTime, so coerce self #to_datetime and hand off to DateTime#<=>
|
||||
|
||||
@@ -129,7 +129,7 @@ module Dependencies #:nodoc:
|
||||
|
||||
if Module.method(:const_defined?).arity == 1
|
||||
# Does this module define this constant?
|
||||
# Wrapper to accomodate changing Module#const_defined? in Ruby 1.9
|
||||
# Wrapper to accommodate changing Module#const_defined? in Ruby 1.9
|
||||
def uninherited_const_defined?(mod, const)
|
||||
mod.const_defined?(const)
|
||||
end
|
||||
|
||||
@@ -132,8 +132,8 @@ module Inflector
|
||||
# Examples:
|
||||
# "posts".singularize # => "post"
|
||||
# "octopi".singularize # => "octopus"
|
||||
# "sheep".singluarize # => "sheep"
|
||||
# "word".singluarize # => "word"
|
||||
# "sheep".singularize # => "sheep"
|
||||
# "word".singularize # => "word"
|
||||
# "the blue mailmen".singularize # => "the blue mailman"
|
||||
# "CamelOctopi".singularize # => "CamelOctopus"
|
||||
def singularize(word)
|
||||
|
||||
@@ -192,7 +192,7 @@ class TimeZone
|
||||
utc_offset == 0 && alternate_utc_string || utc_offset.to_utc_offset_s(colon)
|
||||
end
|
||||
|
||||
# Compare this time zone to the parameter. The two are comapred first on
|
||||
# Compare this time zone to the parameter. The two are compared first on
|
||||
# their offsets, and then by name.
|
||||
def <=>(zone)
|
||||
result = (utc_offset <=> zone.utc_offset)
|
||||
|
||||
@@ -20,7 +20,7 @@ module Builder
|
||||
# markup.
|
||||
#
|
||||
# Usage:
|
||||
# xe = Builder::XmlEvents.new(hander)
|
||||
# xe = Builder::XmlEvents.new(handler)
|
||||
# xe.title("HI") # Sends start_tag/end_tag/text messages to the handler.
|
||||
#
|
||||
# Indentation may also be selected by providing value for the
|
||||
|
||||
@@ -119,7 +119,7 @@ class MemCache
|
||||
# Valid options for +opts+ are:
|
||||
#
|
||||
# [:namespace] Prepends this value to all keys added or retrieved.
|
||||
# [:readonly] Raises an exeception on cache writes when true.
|
||||
# [:readonly] Raises an exception on cache writes when true.
|
||||
# [:multithread] Wraps cache access in a Mutex for thread safety.
|
||||
#
|
||||
# Other options are ignored.
|
||||
@@ -207,7 +207,7 @@ class MemCache
|
||||
end
|
||||
|
||||
##
|
||||
# Deceremets the value for +key+ by +amount+ and returns the new value.
|
||||
# Decrements the value for +key+ by +amount+ and returns the new value.
|
||||
# +key+ must already exist. If +key+ is not an integer, it is assumed to be
|
||||
# 0. +key+ can not be decremented below 0.
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ module TZInfo
|
||||
|
||||
# Returns the set of TimezonePeriod instances that are valid for the given
|
||||
# local time as an array. If you just want a single period, use
|
||||
# period_for_local instead and specify how abiguities should be resolved.
|
||||
# period_for_local instead and specify how ambiguities should be resolved.
|
||||
# Raises PeriodNotFound if no periods are found for the given time.
|
||||
def periods_for_local(local)
|
||||
info.periods_for_local(local)
|
||||
|
||||
@@ -64,7 +64,7 @@ module TZInfo
|
||||
# ArgumentError will be raised if a transition is added out of order.
|
||||
# offset_id refers to an id defined with offset. ArgumentError will be
|
||||
# raised if the offset_id cannot be found. numerator_or_time and
|
||||
# denomiator specify the time the transition occurs as. See
|
||||
# denominator specify the time the transition occurs as. See
|
||||
# TimezoneTransitionInfo for more detail about specifying times.
|
||||
def transition(year, month, offset_id, numerator_or_time, denominator = nil)
|
||||
offset = @offsets[offset_id]
|
||||
|
||||
@@ -36,7 +36,7 @@ module TZInfo
|
||||
|
||||
# Returns the set of TimezonePeriod instances that are valid for the given
|
||||
# local time as an array. If you just want a single period, use
|
||||
# period_for_local instead and specify how abiguities should be resolved.
|
||||
# period_for_local instead and specify how ambiguities should be resolved.
|
||||
# Raises PeriodNotFound if no periods are found for the given time.
|
||||
def periods_for_local(local)
|
||||
@linked_timezone.periods_for_local(local)
|
||||
|
||||
@@ -121,7 +121,7 @@ module TZInfo
|
||||
TimezoneProxy.new(identifier)
|
||||
end
|
||||
|
||||
# If identifier is nil calls super(), otherwise calls get. An identfier
|
||||
# If identifier is nil calls super(), otherwise calls get. An identifier
|
||||
# should always be passed in when called externally.
|
||||
def self.new(identifier = nil)
|
||||
if identifier
|
||||
|
||||
@@ -37,7 +37,7 @@ module TZInfo
|
||||
attr_reader :numerator_or_time
|
||||
protected :numerator_or_time
|
||||
|
||||
# Either the denominotor of the DateTime if the transition time is defined
|
||||
# Either the denominator of the DateTime if the transition time is defined
|
||||
# as a DateTime, otherwise nil.
|
||||
attr_reader :denominator
|
||||
protected :denominator
|
||||
|
||||
@@ -121,7 +121,7 @@ class XmlSimple
|
||||
# Create a "global" cache.
|
||||
@@cache = Cache.new
|
||||
|
||||
# Creates and intializes a new XmlSimple object.
|
||||
# Creates and initializes a new XmlSimple object.
|
||||
#
|
||||
# defaults::
|
||||
# Default values for options.
|
||||
@@ -497,7 +497,7 @@ class XmlSimple
|
||||
}
|
||||
end
|
||||
|
||||
# Fold Hases containing a single anonymous Array up into just the Array.
|
||||
# Fold Hashes containing a single anonymous Array up into just the Array.
|
||||
if count == 1
|
||||
anonymoustag = @options['anonymoustag']
|
||||
if result.has_key?(anonymoustag) && result[anonymoustag].instance_of?(Array)
|
||||
@@ -907,7 +907,7 @@ class XmlSimple
|
||||
# Thanks to Norbert Gawor for a bugfix.
|
||||
#
|
||||
# value::
|
||||
# Value to be checked for emptyness.
|
||||
# Value to be checked for emptiness.
|
||||
def empty(value)
|
||||
case value
|
||||
when Hash
|
||||
|
||||
@@ -66,9 +66,9 @@ class MongrelSpawner < Spawner
|
||||
"-l #{OPTIONS[:rails_root]}/log/mongrel.log"
|
||||
|
||||
# Add prefix functionality to spawner's call to mongrel_rails
|
||||
# Digging through monrel's project subversion server, the earliest
|
||||
# Digging through mongrel's project subversion server, the earliest
|
||||
# Tag that has prefix implemented in the bin/mongrel_rails file
|
||||
# is 0.3.15 which also happens to be the earilest tag listed.
|
||||
# is 0.3.15 which also happens to be the earliest tag listed.
|
||||
# References: http://mongrel.rubyforge.org/svn/tags
|
||||
if Mongrel::Const::MONGREL_VERSION.to_f >=0.3 && !OPTIONS[:prefix].nil?
|
||||
cmd = cmd + " --prefix #{OPTIONS[:prefix]}"
|
||||
|
||||
@@ -87,7 +87,7 @@ module Rails
|
||||
# Rails::Initializer.run(:set_load_path)
|
||||
#
|
||||
# This is useful if you only want the load path initialized, without
|
||||
# incuring the overhead of completely loading the entire environment.
|
||||
# incurring the overhead of completely loading the entire environment.
|
||||
def self.run(command = :process, configuration = Configuration.new)
|
||||
yield configuration if block_given?
|
||||
initializer = new configuration
|
||||
|
||||
@@ -155,7 +155,7 @@ HELP
|
||||
# such as the rest of the user's app.
|
||||
def class_collisions(*class_names)
|
||||
|
||||
# Initialize some check varibles
|
||||
# Initialize some check variables
|
||||
last_class = Object
|
||||
current_class = nil
|
||||
name = nil
|
||||
|
||||
@@ -45,7 +45,7 @@ module Rails
|
||||
usage = "\nInstalled Generators\n"
|
||||
Rails::Generator::Base.sources.inject([]) do |mem, source|
|
||||
# Using an association list instead of a hash to preserve order,
|
||||
# for esthetic reasons more than anything else.
|
||||
# for aesthetic reasons more than anything else.
|
||||
label = source.label.to_s.capitalize
|
||||
pair = mem.assoc(label)
|
||||
mem << (pair = [label, []]) if pair.nil?
|
||||
|
||||
@@ -23,7 +23,7 @@ module Rails
|
||||
|
||||
# Generate a random secret key by using the Win32 API. Raises LoadError
|
||||
# if the current platform cannot make use of the Win32 API. Raises
|
||||
# SystemCallError if some other error occured.
|
||||
# SystemCallError if some other error occurred.
|
||||
def generate_secret_with_win32_api
|
||||
# Following code is based on David Garamond's GUID library for Ruby.
|
||||
require 'Win32API'
|
||||
|
||||
Reference in New Issue
Block a user