Skip to content

Commit

Permalink
Show help if plain honeybii command is executed
Browse files Browse the repository at this point in the history
  • Loading branch information
Jamey J. DeOrio committed Apr 13, 2014
1 parent 38abac1 commit f512401
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion bin/honeybii
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,14 @@ option_parser = OptionParser.new do |opts|
end

option_parser.parse!
image = ARGV.pop

if !image && options.empty?
puts option_parser.help
exit
end

# required
image = ARGV.pop
unless image && /.*\.(png|gif|jpg)$/i =~ image
raise ArgumentError, 'Please point to an image file (png|gif|jpg)'
end
Expand Down
2 changes: 1 addition & 1 deletion honeybii.gemspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Gem::Specification.new do |s|
s.name = 'honeybii'
s.version = '2.0.1'
s.version = '2.0.2'
s.date = '2014-04-12'
s.executables << 'honeybii'
s.add_runtime_dependency 'rmagick', ['~> 2.13', '>= 2.13.2']
Expand Down

0 comments on commit f512401

Please sign in to comment.