Skip to content

Commit 52d4c7e

Browse files
authored
Merge pull request #82 from zombocom/mauro-oto/gem-version-on-cli
Let -v respond with gem version instead of 'unknown'
2 parents 32b86a9 + 5d196e3 commit 52d4c7e

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
## HEAD (unreleased)
22

3+
- Let -v respond with gem version instead of 'unknown' (https://github.com/zombocom/dead_end/pull/82)
4+
35
## 2.0.0
46

57
- Support "endless" oneline method definitions for Ruby 3+ (https://github.com/zombocom/dead_end/pull/80)

exe/dead_end

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ parser = OptionParser.new do |opts|
3535
Options:
3636
EOM
3737

38+
opts.version = DeadEnd::VERSION
39+
3840
opts.on("--help", "Help - displays this message") do |v|
3941
puts opts
4042
exit

spec/integration/exe_cli_spec.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,5 +62,10 @@ def exe(cmd)
6262
expect(tmp_dir).to_not be_empty
6363
end
6464
end
65+
66+
it "prints the version" do
67+
out = exe("-v")
68+
expect(out.strip).to include(DeadEnd::VERSION)
69+
end
6570
end
6671
end

0 commit comments

Comments
 (0)