Browse files

better cmd msg and gemspec

  • Loading branch information...
1 parent 6b23287 commit aeb19d6d4a77ab95322e45b69bdaa0319de87113 @csquared csquared committed Feb 28, 2012
Showing with 11 additions and 4 deletions.
  1. +3 −3 addons-client.gemspec
  2. +8 −1 bin/addons-client
View
6 addons-client.gemspec
@@ -3,9 +3,9 @@ require File.expand_path('../lib/addons-client/version', __FILE__)
Gem::Specification.new do |gem|
gem.authors = ["Chris Continanza"]
- gem.email = ["christopher.continanza@gmail.com"]
- gem.description = %q{TODO: Write a gem description}
- gem.summary = %q{TODO: Write a gem summary}
+ gem.email = ["csquared@gmail.com"]
+ gem.description = %q{Addons Platform API client}
+ gem.summary = %q{Allows platfomrs to provision, deprovision, and change plans for add-on resources.}
gem.homepage = ""
gem.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
View
9 bin/addons-client
@@ -6,6 +6,13 @@ require_relative '../lib/addons-client'
begin
Addons::CLI.run!
rescue Addons::UserError => e
- STDERR.puts e.message
+ STDERR.puts e.message and exit 1
+rescue RestClient::ServiceUnavailable => e
+ if ! e.response.body.strip.empty?
+ STDERR.puts JSON.parse(e.response.body)['message']
+ else
+ STDERR.puts "Add-on is not available"
+ end
exit 1
end
+

0 comments on commit aeb19d6

Please sign in to comment.