Class: JIJI::Migration::Migrator1_0_3

Inherits:
Object
  • Object
show all
Defined in:
lib/jiji/migration/migrator1_0_3.rb

Overview

1.0.0 → 1.0.3

Instance Method Summary collapse

Instance Method Details

#migrate(registry) ⇒ Object



12
13
14
15
16
17
18
19
20
21
# File 'lib/jiji/migration/migrator1_0_3.rb', line 12

def migrate( registry )
  # outputのプロパティキーを変換
  Dir.glob( "#{registry.process_dir}/*/out/**/meta.yaml").each {|meta|
    props = YAML.load_file meta
    props = props.inject({}) {|r,p| r[p[0].to_sym] = p[1]; r }
    FileLock.new( meta ).writelock { |f|
      f.write( YAML.dump( props ) )
    }
  }
end