diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2013-06-06 05:09:46 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2013-06-06 05:09:46 +0000 |
commit | 442532e3163396d91402eaf96a99083c0c3909d8 (patch) | |
tree | 78cc0512e202315d79c7cdaf605fbde2bad9047d /lib/redmine/plugin.rb | |
parent | 6ab02e535ff265c37b9da3e9d9155fbd2745908a (diff) | |
download | redmine-442532e3163396d91402eaf96a99083c0c3909d8.tar.gz redmine-442532e3163396d91402eaf96a99083c0c3909d8.zip |
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
Diffstat (limited to 'lib/redmine/plugin.rb')
-rw-r--r-- | lib/redmine/plugin.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/redmine/plugin.rb b/lib/redmine/plugin.rb index 8eb1c078d..ea61cef7e 100644 --- a/lib/redmine/plugin.rb +++ b/lib/redmine/plugin.rb @@ -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 |