lib/milc/base.rb in milc-0.1.0 vs lib/milc/base.rb in milc-0.1.1

- old
+ new

@@ -39,23 +39,18 @@ @config = YAML.load_file_with_erb(yaml_path) load_config end attr_reader :config - attr_reader :project, :nebula - attr_reader :network_base, :region, :new_relic_license_key + attr_reader :project def dry_run Milc.dry_run end def load_config @project = config['PROJECT'] || ENV['PROJECT'] - @nebula = config['NEBULA'] || ENV['NEBULA'] - @network_base = config['NETWORK_BASE'] || ENV['NETWORK_BASE'] - @region =config['REGION'] || ENV['REGION'] - @new_relic_license_key = config['NEW_RELIC_LICENSE_KEY'] || ENV['NEW_RELIC_LICENSE_KEY'] end def show_help_and_exit1 ## シェルスクリプトのUsage $stderr.puts help_message @@ -85,19 +80,21 @@ show_help_and_exit1 unless args.empty? Milc.dry_run = !!options["n"] Milc.verbose = !!options["V"] - show_help_and_exit1 unless options["c"] - - load_from_yaml(options["c"]) - load_options(options) + if options["c"] + load_from_yaml(options["c"]) + load_options(options) + else + show_help_and_exit1 + end end def run(args) setup(args) process - exit 0 + # exit 0 end end end