lib/gemfury/command/app.rb in gemfury-0.4.0.beta1 vs lib/gemfury/command/app.rb in gemfury-0.4.0.beta2

- old
+ new

@@ -8,9 +8,21 @@ desc "version" ,"Show Gemfury version", :hide => true def version shell.say Gemfury::VERSION end + desc "whoami" ,"Show currently logged-in user", :hide => true + def whoami + if !has_credentials? + shell.say %Q(You are not logged in), :green + else + with_checks_and_rescues do + me = client.account_info['username'] + shell.say %Q(You are logged in as "#{me}"), :green + end + end + end + desc "push GEM", "Upload a new version of a gem" def push(*gems) with_checks_and_rescues do gem_files = gems.map do |g| File.exists?(g) ? File.new(g) : nil \ No newline at end of file