Sha256: 3fdc98b9b0997be0ac1d7761b3634fbc8010d246e5236f02d00bbbf8c0234b85
Contents?: true
Size: 472 Bytes
Versions: 2
Compression:
Stored size: 472 Bytes
Contents
module Aka module Upgrader module FromV0 def self.run(aka_yml) v0 = YAML::load_file(aka_yml) current = { :version => Aka::Configuration::FORMAT, :shortcuts => v0 } FileUtils.cp(aka_yml, "#{aka_yml}.backup") File.open(aka_yml, 'w+') do |f| f.write current.to_yaml end puts "Upgraded #{aka_yml}." puts "Backed up to #{aka_yml}.backup." end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
hsume2-aka-0.2.1 | lib/aka/upgrader.rb |
hsume2-aka-0.2.0 | lib/aka/upgrader.rb |