Skip to content

Commit

Permalink
Output httparty version at command line with --version
Browse files Browse the repository at this point in the history
  • Loading branch information
mjvezzani committed Jul 8, 2015
1 parent 18b28d6 commit b4a54c3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
5 changes: 2 additions & 3 deletions bin/httparty
Expand Up @@ -63,11 +63,10 @@ OptionParser.new do |o|
exit
end

o.on("--version", "Show the version") do |ver|
puts "The current version is: #{HTTParty::VERSION}"
o.on("--version", "Show HTTParty version") do |ver|
puts "Version: #{HTTParty::VERSION}"
exit
end

end.parse!

if ARGV.empty?
Expand Down
4 changes: 2 additions & 2 deletions features/command_line.feature
Expand Up @@ -9,9 +9,9 @@ Feature: Command Line
When I run `httparty --help`
Then the output should contain "-f, --format [FORMAT]"

Scenario: Show httparty version at command line
Scenario: Show current version
When I run `httparty --version`
Then the output should contain "The current version is:"
Then the output should contain "Version:"
And the output should not contain "You need to provide a URL"

Scenario: Make a get request
Expand Down

0 comments on commit b4a54c3

Please sign in to comment.