diff --git a/lib/babelish/commandline.rb b/lib/babelish/commandline.rb index 01c68fa..36f3c20 100644 --- a/lib/babelish/commandline.rb +++ b/lib/babelish/commandline.rb @@ -2,6 +2,7 @@ class Commandline < Thor include Thor::Actions class_option :verbose, :type => :boolean + class_option :config, :type => :string, :aliases => "-c", :desc => "Read configuration from given file", :default => ".babelish" map "-v" => :version CSVCLASSES = [ @@ -175,8 +176,8 @@ def self.exit_on_failure? def options original_options = super - return original_options unless File.exists?(".babelish") - defaults = ::YAML.load_file(".babelish") || {} + return original_options unless File.exists?(original_options["config"]) + defaults = ::YAML.load_file(original_options["config"]) || {} Thor::CoreExt::HashWithIndifferentAccess.new(defaults.merge(original_options)) end end diff --git a/lib/babelish/version.rb b/lib/babelish/version.rb index 65115e4..3a4620b 100644 --- a/lib/babelish/version.rb +++ b/lib/babelish/version.rb @@ -1,3 +1,3 @@ module Babelish - VERSION = "0.4.0" + VERSION = "0.4.1" end