remove trailing white-spaces from lib/redmine/plugin.rb

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11933 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Toshi MARUYAMA 2013-06-06 05:09:46 +00:00
parent 6ab02e535f
commit 442532e316
1 changed files with 4 additions and 4 deletions

View File

@ -443,7 +443,7 @@ module Redmine #:nodoc:
class Migrator < ActiveRecord::Migrator
# We need to be able to set the 'current' plugin being migrated.
cattr_accessor :current_plugin
class << self
# Runs the migrations from a plugin, up (or down) to the version given
def migrate_plugin(plugin, version)
@ -451,7 +451,7 @@ module Redmine #:nodoc:
return if current_version(plugin) == version
migrate(plugin.migration_directory, version)
end
def current_version(plugin=current_plugin)
# Delete migrations that don't match .. to_i will work because the number comes first
::ActiveRecord::Base.connection.select_values(
@ -459,14 +459,14 @@ module Redmine #:nodoc:
).delete_if{ |v| v.match(/-#{plugin.id}/) == nil }.map(&:to_i).max || 0
end
end
def migrated
sm_table = self.class.schema_migrations_table_name
::ActiveRecord::Base.connection.select_values(
"SELECT version FROM #{sm_table}"
).delete_if{ |v| v.match(/-#{current_plugin.id}/) == nil }.map(&:to_i).sort
end
def record_version_state_after_migrating(version)
super(version.to_s + "-" + current_plugin.id.to_s)
end