Skip to content

Commit

Permalink
Transitioning code for the YAML configuration file
Browse files Browse the repository at this point in the history
Signed-off-by: Colin Shea <colin@evaryont.me>
  • Loading branch information
nogweii committed Jul 6, 2009
1 parent 9e97696 commit 5e7dba2
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion bin/arson
Expand Up @@ -6,7 +6,15 @@ require 'arson'
require 'arson/colorful'
require 'optparse'

Arson::Config.write unless File.exists? Arson::Config::FILE_PATH
# Check if the YAML is outdated or doesn't exist. In either case, write the YAML
# again.
#
# The YAML is considered 'outdated' if the user's YAML doesn't contain the same
# keys as the defaults. We do not respect foreign keys however. Should fix that.
if (Arson::Config::LOADED_YAML and (Arson::Config::LOADED_YAML.keys.sort != Arson::Config::DEFAULTS.keys.sort)) or !File.exists? Arson::Config::FILE_PATH
Arson::Config.write
end


options = {:download => 0}
opts = OptionParser.new do |opts|
Expand Down

0 comments on commit 5e7dba2

Please sign in to comment.