lib/h.rb in h-1.0.0 vs lib/h.rb in h-1.0.1

- old
+ new

@@ -1,25 +1,25 @@ require 'digest' require 'highline/import' -require 'yaml' +require 'psych' module H class Generator CONF_PATH = File.join(File.expand_path('~'), '.h') def initialize unless File.exists?(CONF_PATH) File.open(CONF_PATH, 'w') do |f| - YAML.dump({ 'encryption' => 'SHA1', + Psych.dump({ 'encryption' => 'SHA1', 'static_key' => 'foobar', 'max_length' => 15, 'radix' => 36 }, f) end File.chmod(0600, CONF_PATH) end - @params = YAML::load_file(CONF_PATH) + @params = Psych.load_file(CONF_PATH) @params.freeze end def input(message) m = message + @params['static_key']