Permalink
Browse files

cleanup and check

  • Loading branch information...
sgringwe committed Apr 24, 2014
1 parent 2ec6f8d commit ece8cb7a63a6014229656a1fc67d80613489a877
Showing with 3 additions and 8 deletions.
  1. +1 −3 bin/dawn
  2. +2 −5 lib/codesake/dawn/core.rb
View
@@ -58,9 +58,7 @@ opts.quiet=true
engine = nil
-find_conf = Codesake::Dawn::Core.find_conf(true)
-puts "got #{find_conf}"
-options = Codesake::Dawn::Core.read_conf()
+options = Codesake::Dawn::Core.read_conf(Codesake::Dawn::Core.find_conf(true))
check = ""
guess = {:name=>"", :version=>"", :connected_gems=>[]}
@@ -136,21 +136,18 @@ def self.find_conf(create_if_none = false)
# Calculate the conf file path
conf_path = File.expand_path('~') +'/.'+conf_name
- puts conf_path
# Open the conf file and write our default config to it
File.open(conf_path, 'w') do |f|
rv = f.write(YAML.dump(conf))
- puts "write returned #{rv}"
end
- puts "line 147 #{conf_path}"
- return conf_path
+ conf_path
end
def self.read_conf(file=nil)
conf = {:verbose=>false, :output=>"console", :mvc=>"", :gemfile_scan=>false, :gemfile_name=>"", :filename=>nil, :debug=>false, :exit_on_warn => false, :enabled_checks=> Codesake::Dawn::Kb::BasicCheck::ALLOWED_FAMILIES}
- file = file.chop if file.end_with? '/'
+ file = file.chop if (not file.nil? and file.end_with? '/')
begin
return conf if file.nil?
return conf if ! File.exist?(file)

0 comments on commit ece8cb7

Please sign in to comment.