Skip to content

Commit

Permalink
Merge pull request #1241 from smartinez87/extra-space
Browse files Browse the repository at this point in the history
Remove extra white-space on exception message.
  • Loading branch information
spastorino committed May 24, 2011
2 parents a9f22dc + 05f29ca commit 8e7590c
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion actionpack/lib/action_dispatch/middleware/cookies.rb
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ def ensure_secret_secure(secret)


if secret.length < SECRET_MIN_LENGTH if secret.length < SECRET_MIN_LENGTH
raise ArgumentError, "Secret should be something secure, " + raise ArgumentError, "Secret should be something secure, " +
"like \"#{SecureRandom.hex(16)}\". The value you " + "like \"#{SecureRandom.hex(16)}\". The value you " +
"provided, \"#{secret}\", is shorter than the minimum length " + "provided, \"#{secret}\", is shorter than the minimum length " +
"of #{SECRET_MIN_LENGTH} characters" "of #{SECRET_MIN_LENGTH} characters"
end end
Expand Down
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ def checkout
else else
clear_stale_cached_connections! clear_stale_cached_connections!
if @size == @checked_out.size if @size == @checked_out.size
raise ConnectionTimeoutError, "could not obtain a database connection#{" within #{@timeout} seconds" if @timeout}. The max pool size is currently #{@size}; consider increasing it." raise ConnectionTimeoutError, "could not obtain a database connection#{" within #{@timeout} seconds" if @timeout}. The max pool size is currently #{@size}; consider increasing it."
end end
end end


Expand Down
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -564,7 +564,7 @@ def index_name_for_remove(table_name, options = {})
def columns_for_remove(table_name, *column_names) def columns_for_remove(table_name, *column_names)
column_names = column_names.flatten column_names = column_names.flatten


raise ArgumentError.new("You must specify at least one column name. Example: remove_column(:people, :first_name)") if column_names.blank? raise ArgumentError.new("You must specify at least one column name. Example: remove_column(:people, :first_name)") if column_names.blank?
column_names.map {|column_name| quote_column_name(column_name) } column_names.map {|column_name| quote_column_name(column_name) }
end end


Expand Down
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ def execute(sql, name = nil)
end end
rescue ActiveRecord::StatementInvalid => exception rescue ActiveRecord::StatementInvalid => exception
if exception.message.split(":").first =~ /Packets out of order/ if exception.message.split(":").first =~ /Packets out of order/
raise ActiveRecord::StatementInvalid, "'Packets out of order' error was received from the database. Please update your mysql bindings (gem install mysql) and read http://dev.mysql.com/doc/mysql/en/password-hashing.html for more information. If you're on Windows, use the Instant Rails installer to get the updated mysql bindings." raise ActiveRecord::StatementInvalid, "'Packets out of order' error was received from the database. Please update your mysql bindings (gem install mysql) and read http://dev.mysql.com/doc/mysql/en/password-hashing.html for more information. If you're on Windows, use the Instant Rails installer to get the updated mysql bindings."
else else
raise raise
end end
Expand Down Expand Up @@ -662,7 +662,7 @@ def exec_query(sql, name = 'SQL', binds = [])
result = @connection.query(sql) result = @connection.query(sql)
rescue ActiveRecord::StatementInvalid => exception rescue ActiveRecord::StatementInvalid => exception
if exception.message.split(":").first =~ /Packets out of order/ if exception.message.split(":").first =~ /Packets out of order/
raise ActiveRecord::StatementInvalid, "'Packets out of order' error was received from the database. Please update your mysql bindings (gem install mysql) and read http://dev.mysql.com/doc/mysql/en/password-hashing.html for more information. If you're on Windows, use the Instant Rails installer to get the updated mysql bindings." raise ActiveRecord::StatementInvalid, "'Packets out of order' error was received from the database. Please update your mysql bindings (gem install mysql) and read http://dev.mysql.com/doc/mysql/en/password-hashing.html for more information. If you're on Windows, use the Instant Rails installer to get the updated mysql bindings."
else else
raise raise
end end
Expand Down
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ def execute(sql, name = nil) #:nodoc:
end end
rescue ActiveRecord::StatementInvalid => exception rescue ActiveRecord::StatementInvalid => exception
if exception.message.split(":").first =~ /Packets out of order/ if exception.message.split(":").first =~ /Packets out of order/
raise ActiveRecord::StatementInvalid, "'Packets out of order' error was received from the database. Please update your mysql bindings (gem install mysql) and read http://dev.mysql.com/doc/mysql/en/password-hashing.html for more information. If you're on Windows, use the Instant Rails installer to get the updated mysql bindings." raise ActiveRecord::StatementInvalid, "'Packets out of order' error was received from the database. Please update your mysql bindings (gem install mysql) and read http://dev.mysql.com/doc/mysql/en/password-hashing.html for more information. If you're on Windows, use the Instant Rails installer to get the updated mysql bindings."
else else
raise raise
end end
Expand Down
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ def add_column(table_name, column_name, type, options = {}) #:nodoc:
end end


def remove_column(table_name, *column_names) #:nodoc: def remove_column(table_name, *column_names) #:nodoc:
raise ArgumentError.new("You must specify at least one column name. Example: remove_column(:people, :first_name)") if column_names.empty? raise ArgumentError.new("You must specify at least one column name. Example: remove_column(:people, :first_name)") if column_names.empty?
column_names.flatten.each do |column_name| column_names.flatten.each do |column_name|
alter_table(table_name) do |definition| alter_table(table_name) do |definition|
definition.columns.delete(definition[column_name]) definition.columns.delete(definition[column_name])
Expand Down
2 changes: 1 addition & 1 deletion activerecord/lib/active_record/railties/databases.rake
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ db_namespace = namespace :db do
end end


namespace :fixtures do namespace :fixtures do
desc "Load fixtures into the current environment's database. Load specific fixtures using FIXTURES=x,y. Load from subdirectory in test/fixtures using FIXTURES_DIR=z. Specify an alternative path (eg. spec/fixtures) using FIXTURES_PATH=spec/fixtures." desc "Load fixtures into the current environment's database. Load specific fixtures using FIXTURES=x,y. Load from subdirectory in test/fixtures using FIXTURES_DIR=z. Specify an alternative path (eg. spec/fixtures) using FIXTURES_PATH=spec/fixtures."
task :load => :environment do task :load => :environment do
require 'active_record/fixtures' require 'active_record/fixtures'


Expand Down

0 comments on commit 8e7590c

Please sign in to comment.