diff --git a/CHANGELOG.md b/CHANGELOG.md index deae614..9df9727 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,7 @@ ## HEAD (unreleased) +- Let -v respond with gem version instead of 'unknown' (https://github.com/zombocom/dead_end/pull/82) + ## 2.0.0 - Support "endless" oneline method definitions for Ruby 3+ (https://github.com/zombocom/dead_end/pull/80) diff --git a/exe/dead_end b/exe/dead_end index f7bb12e..d546ccd 100755 --- a/exe/dead_end +++ b/exe/dead_end @@ -35,6 +35,8 @@ parser = OptionParser.new do |opts| Options: EOM + opts.version = DeadEnd::VERSION + opts.on("--help", "Help - displays this message") do |v| puts opts exit diff --git a/spec/integration/exe_cli_spec.rb b/spec/integration/exe_cli_spec.rb index 779b2f9..8ec8ddf 100644 --- a/spec/integration/exe_cli_spec.rb +++ b/spec/integration/exe_cli_spec.rb @@ -62,5 +62,10 @@ def exe(cmd) expect(tmp_dir).to_not be_empty end end + + it "prints the version" do + out = exe("-v") + expect(out.strip).to include(DeadEnd::VERSION) + end end end