From 7015fc3b20357d0baee7ca8eebbe58411f8ebeac Mon Sep 17 00:00:00 2001 From: Brian Cain Date: Tue, 15 Sep 2015 15:22:13 -0700 Subject: [PATCH] Check for token variable instead of from options Update the get method to only retrieve tokens if one doesn't exist from either the cli arguments or from a dotfile --- lib/vmfloaty.rb | 4 ++-- vmfloaty.gemspec | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/vmfloaty.rb b/lib/vmfloaty.rb index 2ee435a..e07c9a0 100644 --- a/lib/vmfloaty.rb +++ b/lib/vmfloaty.rb @@ -10,7 +10,7 @@ class Vmfloaty include Commander::Methods def run - program :version, '0.2.0' + program :version, '0.2.1' program :description, 'A CLI helper tool for Puppet Labs vmpooler to help you stay afloat' config = read_config @@ -40,7 +40,7 @@ class Vmfloaty return end - unless options.token + unless token pass = password "Enter your password please:", '*' token = Auth.get_token(verbose, url, user, pass) end diff --git a/vmfloaty.gemspec b/vmfloaty.gemspec index 82da63c..a72e5f4 100644 --- a/vmfloaty.gemspec +++ b/vmfloaty.gemspec @@ -1,6 +1,6 @@ Gem::Specification.new do |s| s.name = 'vmfloaty' - s.version = '0.2.1' + s.version = '0.2.2' s.authors = ['Brian Cain'] s.email = ['brian.cain@puppetlabs.com'] s.license = 'Apache'