Permalink
Browse files

init_as_cli

  • Loading branch information...
1 parent 3a5d243 commit 3416f4e39cb171a4a6da4bdef1b691bc600e411d @pasberth committed Apr 23, 2012
Showing with 9 additions and 5 deletions.
  1. +1 −2 lib/myoack/as_cli.rb
  2. +8 −3 lib/myoack/config_manager.rb
View
@@ -1,6 +1,5 @@
module Myoack
require 'myoack/as_lib'
-
- Config.configure_all
+ Config.init_as_cli
end
@@ -14,9 +14,7 @@ def initialize home=MYOACK_HOME
end
def main *argv
- if File.exist? @init_file_path
- load @init_file_path
- end
+ init_as_cli
if File.exist? argv[0]
load argv[0]
return
@@ -29,6 +27,13 @@ def main *argv
end
end
+ def init_as_cli
+ configure_all
+ if File.exist? @init_file_path
+ load @init_file_path
+ end
+ end
+
def authorize! id
cfg = require_config(id)
cfg.authorize!

0 comments on commit 3416f4e

Please sign in to comment.