redrum 0.2.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/lib/redrum.rb CHANGED
@@ -5,3 +5,5 @@ require File.expand_path("../redrum/skeleton", __FILE__)
5
5
  require File.expand_path("../redrum/redrum", __FILE__)
6
6
  require File.expand_path("../redrum/cli", __FILE__)
7
7
 
8
+ REDRUM_VERSION = "0.2.1"
9
+
data/lib/redrum/cli.rb CHANGED
@@ -17,6 +17,10 @@ module Redrum
17
17
  out.puts opts
18
18
  return false
19
19
  end
20
+ opts.on("-v", "--version", "Version information") do
21
+ out.puts "Redrum v" + REDRUM_VERSION
22
+ return false
23
+ end
20
24
  opts.on_tail do
21
25
  out.puts opts
22
26
  end
@@ -64,5 +64,20 @@ describe Redrum::CLI do
64
64
  end
65
65
  end
66
66
 
67
+ context "with -v, --version" do
68
+ before { no_warnings { ARGV = ["-v", "--version"] } }
69
+
70
+ it "returns false" do
71
+ Redrum::CLI.parse(@messenger).should == false
72
+ end
73
+
74
+ it "shows version information" do
75
+ Redrum::CLI.parse(@messenger)
76
+ @messenger.string.should include("Redrum v")
77
+ end
78
+
79
+
80
+ end
81
+
67
82
  end
68
83
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: redrum
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
4
+ hash: 21
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 2
9
- - 0
10
- version: 0.2.0
9
+ - 1
10
+ version: 0.2.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - !binary |
@@ -17,7 +17,7 @@ autorequire:
17
17
  bindir: bin
18
18
  cert_chain: []
19
19
 
20
- date: 2010-10-28 00:00:00 +02:00
20
+ date: 2010-10-30 00:00:00 +02:00
21
21
  default_executable:
22
22
  dependencies:
23
23
  - !ruby/object:Gem::Dependency