lib/lionel/cli.rb in lionel_richie-0.1.5.1 vs lib/lionel/cli.rb in lionel_richie-0.2.0

- old
+ new

@@ -39,13 +39,17 @@ desc "export", "Saves Trello export to Google Docs" method_option "print", :aliases => "-p", :type => :boolean, :default => false, :desc => "Print results instead of saving them to Google Docs." method_option "trello-board-id", :aliases => "-t", :type => :string, :default => nil, :desc => "Specify the source Trello board id." method_option "google-doc-id", :aliases => "-g", :type => :string, :default => nil, :desc => "Specify the target Google doc id." - method_option "save", :aliases => "-c", :type => :string, :default => true, :desc => "Save the command line ids as the default configuration." + method_option "save", :aliases => "-s", :type => :string, :default => true, :desc => "Save the command line ids as the default configuration." method_option "filter", :aliases => "-f", :type => :string, :default => 'open-lists', :desc => "Possible values: open-cards, open-lists." + method_option "configuration", :aliases => "-c", :type => :string, :default => nil, :desc => "Path to Lionelfile configuration" def export + lionel_file = options['configuration'] || './Lionelfile' + eval(File.read(lionel_file)) if File.exists?(lionel_file) + export = Lionel::Export.new(options) if options['google-doc-id'] export.google_doc_id = options['google-doc-id'] elsif !export.google_doc_id @@ -67,13 +71,13 @@ @google_attempts += 1 Lionel::GoogleAuthentication.new.refresh if @google_attempts < 2 retry else - invoke :authorize, ['google'] + invoke :authorize, ['google'], {} end rescue Trello::Error, Trello::InvalidAccessToken - invoke :authorize, ['trello'] + invoke :authorize, ['trello'], {} end welcome = "Trello? Is it me you're looking for?" say welcome say '=' * welcome.size