Created
January 16, 2012 16:28
-
-
Save manveru/1621636 to your computer and use it in GitHub Desktop.
Convert from syck to proper YAML syntax
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'yaml' | |
ARGV.each do |path| | |
YAML::ENGINE.yamler = 'syck' | |
obj = YAML.load_file(path) | |
YAML::ENGINE.yamler = 'psych' | |
File.open(path, 'w+'){|io| io.write(obj.to_yaml) } | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment