tweemux 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/tweemux/action/log.rb +6 -0
- data/lib/tweemux/action/version.rb +5 -0
- data/lib/tweemux/version.rb +1 -1
- data/lib/tweemux.rb +2 -0
- data/test/tweemux/action/log_test.rb +10 -0
- data/test/tweemux/action/version_test.rb +27 -0
- metadata +8 -2
data/lib/tweemux/version.rb
CHANGED
data/lib/tweemux.rb
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
require 'tweemux/version'
|
1
2
|
require 'tweemux/action'
|
2
3
|
require 'tweemux/core_ext'
|
3
4
|
|
@@ -18,6 +19,7 @@ class Tweemux
|
|
18
19
|
end
|
19
20
|
|
20
21
|
def understand args
|
22
|
+
args = ['Version'] if args.first[/^--?v/i]
|
21
23
|
# dash args are out of fashion!
|
22
24
|
args = ['Help'] if args.empty? or args.first[/^-/]
|
23
25
|
action = args.shift
|
@@ -0,0 +1,27 @@
|
|
1
|
+
require_relative '../../action_test_helper'
|
2
|
+
class Tweemux::Action
|
3
|
+
class VersionTest < MiniTest::Unit::TestCase
|
4
|
+
include TweemuxActionHelper
|
5
|
+
def argv; %w'version' end
|
6
|
+
def expected_commands; [] end
|
7
|
+
def test_run
|
8
|
+
output = nil
|
9
|
+
out, err = capture_io do
|
10
|
+
assert_equal stubbed_run.to_yaml, expected_commands.to_yaml
|
11
|
+
end
|
12
|
+
assert_match Tweemux::VERSION, err
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
class DashyVersionFlagTest < VersionTest
|
17
|
+
def argv; ['--version'] end
|
18
|
+
end
|
19
|
+
|
20
|
+
class VersionShortFlagTest < VersionTest
|
21
|
+
def argv; ['-v'] end
|
22
|
+
end
|
23
|
+
|
24
|
+
class VersionShortUppercaseFlagTest < VersionTest
|
25
|
+
def argv; ['-V'] end
|
26
|
+
end
|
27
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tweemux
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-03-
|
12
|
+
date: 2013-03-14 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: ! 'For Remote Pair Programming: A handy script to create-or-join a world-readable
|
15
15
|
tmux session
|
@@ -39,8 +39,10 @@ files:
|
|
39
39
|
- lib/tweemux/action/help.rb
|
40
40
|
- lib/tweemux/action/host.rb
|
41
41
|
- lib/tweemux/action/hubkey.rb
|
42
|
+
- lib/tweemux/action/log.rb
|
42
43
|
- lib/tweemux/action/on.rb
|
43
44
|
- lib/tweemux/action/share.rb
|
45
|
+
- lib/tweemux/action/version.rb
|
44
46
|
- lib/tweemux/core_ext.rb
|
45
47
|
- lib/tweemux/version.rb
|
46
48
|
- test/action_test_helper.rb
|
@@ -51,8 +53,10 @@ files:
|
|
51
53
|
- test/tweemux/action/help_test.rb
|
52
54
|
- test/tweemux/action/host_test.rb
|
53
55
|
- test/tweemux/action/hubkey_test.rb
|
56
|
+
- test/tweemux/action/log_test.rb
|
54
57
|
- test/tweemux/action/on_test.rb
|
55
58
|
- test/tweemux/action/share_test.rb
|
59
|
+
- test/tweemux/action/version_test.rb
|
56
60
|
- test/tweemux/action_test.rb
|
57
61
|
- test/tweemux_test.rb
|
58
62
|
homepage: https://github.com/rking/tweemux
|
@@ -89,8 +93,10 @@ test_files:
|
|
89
93
|
- test/tweemux/action/help_test.rb
|
90
94
|
- test/tweemux/action/host_test.rb
|
91
95
|
- test/tweemux/action/hubkey_test.rb
|
96
|
+
- test/tweemux/action/log_test.rb
|
92
97
|
- test/tweemux/action/on_test.rb
|
93
98
|
- test/tweemux/action/share_test.rb
|
99
|
+
- test/tweemux/action/version_test.rb
|
94
100
|
- test/tweemux/action_test.rb
|
95
101
|
- test/tweemux_test.rb
|
96
102
|
has_rdoc:
|