tmuxinator 3.4.0 → 3.4.2
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.
- checksums.yaml +4 -4
- data/lib/tmuxinator/tmux_version.rb +5 -0
- data/lib/tmuxinator/util.rb +3 -1
- data/lib/tmuxinator/version.rb +1 -1
- data/spec/fixtures/interface/basic.yml +3 -1
- data/spec/interface/debug_snapshot_spec.rb +10 -2
- data/spec/lib/tmuxinator/config_spec.rb +5 -0
- data/spec/lib/tmuxinator/util_spec.rb +40 -0
- data/spec/snapshots/debug/1.6/basic.sh +1 -0
- data/spec/snapshots/debug/1.8/basic.sh +1 -0
- data/spec/snapshots/debug/2.6/basic.sh +2 -1
- metadata +3 -5
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 9a28fcd139a6a2ff19dbfb39a683879c281a3f50a69708eaae5fe7ea91f042ce
|
|
4
|
+
data.tar.gz: 1f9f45e49666e96cec5ec9e5b979cf8dc70d957d5a668575077f93d470fa860f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f171e361de524406ab8fa8ae72576845db194cb0db71a6f97e9432f84245d831357e96e4ae575009a890a447ce371045fe34fe76b9524dae7e01bb84dd196e58
|
|
7
|
+
data.tar.gz: 681c3b88e2a9b2a82126fdace5e82dd8c8eaea17f56fe0f53b4625798039bc714e5ef86eee71c9021432187f635b48f2862e34a3a4cce4dec4566c98fc58fcb8
|
data/lib/tmuxinator/util.rb
CHANGED
data/lib/tmuxinator/version.rb
CHANGED
|
@@ -6,6 +6,14 @@ describe "tmuxinator debug snapshots" do
|
|
|
6
6
|
let(:cli) { Tmuxinator::Cli }
|
|
7
7
|
let(:snapshot_root) { File.expand_path("../snapshots/debug", __dir__) }
|
|
8
8
|
|
|
9
|
+
def expect_snapshot(output, snapshot_path)
|
|
10
|
+
if ENV["UPDATE_SNAPSHOTS"]
|
|
11
|
+
File.write(snapshot_path, output.delete_suffix("\n"))
|
|
12
|
+
else
|
|
13
|
+
expect(output).to eq("#{File.read(snapshot_path)}\n")
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
|
|
9
17
|
around do |example|
|
|
10
18
|
original_argv = ARGV.dup
|
|
11
19
|
example.run
|
|
@@ -44,7 +52,7 @@ describe "tmuxinator debug snapshots" do
|
|
|
44
52
|
"#{fixture_name}.sh"
|
|
45
53
|
)
|
|
46
54
|
|
|
47
|
-
|
|
55
|
+
expect_snapshot(output, snapshot_path)
|
|
48
56
|
end
|
|
49
57
|
end
|
|
50
58
|
end
|
|
@@ -60,6 +68,6 @@ describe "tmuxinator debug snapshots" do
|
|
|
60
68
|
|
|
61
69
|
snapshot_path = File.join(snapshot_root, "2.6", "session_name.sh")
|
|
62
70
|
|
|
63
|
-
|
|
71
|
+
expect_snapshot(output, snapshot_path)
|
|
64
72
|
end
|
|
65
73
|
end
|
|
@@ -206,6 +206,11 @@ describe Tmuxinator::Config do
|
|
|
206
206
|
"v3.6" => 3.6,
|
|
207
207
|
"v3.6a" => 3.6,
|
|
208
208
|
"v3.6b" => 3.6,
|
|
209
|
+
"v3.7" => 3.7,
|
|
210
|
+
"v3.7a" => 3.7,
|
|
211
|
+
"v3.7b" => 3.7,
|
|
212
|
+
"v3.7c" => 3.7,
|
|
213
|
+
"v3.8" => 3.8,
|
|
209
214
|
"v3.12.0" => 3.12,
|
|
210
215
|
"v3.12.5" => 3.12
|
|
211
216
|
}.freeze
|
|
@@ -4,4 +4,44 @@ require "spec_helper"
|
|
|
4
4
|
|
|
5
5
|
describe Tmuxinator::Util do
|
|
6
6
|
let(:util) { Object.new.extend(Tmuxinator::Util) }
|
|
7
|
+
|
|
8
|
+
describe "#current_session_name" do
|
|
9
|
+
def with_env(key, value)
|
|
10
|
+
had_key = ENV.key?(key)
|
|
11
|
+
original = ENV[key]
|
|
12
|
+
if value.nil?
|
|
13
|
+
ENV.delete(key)
|
|
14
|
+
else
|
|
15
|
+
ENV[key] = value
|
|
16
|
+
end
|
|
17
|
+
yield
|
|
18
|
+
ensure
|
|
19
|
+
if had_key
|
|
20
|
+
ENV[key] = original
|
|
21
|
+
else
|
|
22
|
+
ENV.delete(key)
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
context "when TMUX is not set" do
|
|
27
|
+
it "returns an empty string without invoking the shell" do
|
|
28
|
+
with_env("TMUX", nil) do
|
|
29
|
+
expect(util).not_to receive(:`)
|
|
30
|
+
expect(util.current_session_name).to eq("")
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
context "when TMUX is set" do
|
|
36
|
+
it "returns the current tmux session name" do
|
|
37
|
+
with_env("TMUX", "/tmp/tmux-1000/default,1,0") do
|
|
38
|
+
expect(util).to receive(:`).
|
|
39
|
+
with('tmux display-message -p "#S"').
|
|
40
|
+
and_return("flash\n")
|
|
41
|
+
|
|
42
|
+
expect(util.current_session_name).to eq("flash")
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
end
|
|
7
47
|
end
|
|
@@ -52,6 +52,7 @@ cd /workspace/basic
|
|
|
52
52
|
|
|
53
53
|
tmux -L interface send-keys -t basic:1.0 bundle\ exec\ ruby\ -v C-m
|
|
54
54
|
tmux -L interface send-keys -t basic:1.0 bin/setup C-m
|
|
55
|
+
tmux -L interface send-keys -t basic:1.0 bundle\ exec\ rake\ test C-m
|
|
55
56
|
|
|
56
57
|
tmux -L interface select-layout -t basic:1 tiled
|
|
57
58
|
|
|
@@ -50,6 +50,7 @@ cd /workspace/basic
|
|
|
50
50
|
|
|
51
51
|
tmux -L interface send-keys -t basic:1.0 bundle\ exec\ ruby\ -v C-m
|
|
52
52
|
tmux -L interface send-keys -t basic:1.0 bin/setup C-m
|
|
53
|
+
tmux -L interface send-keys -t basic:1.0 bundle\ exec\ rake\ test C-m
|
|
53
54
|
|
|
54
55
|
tmux -L interface select-layout -t basic:1 tiled
|
|
55
56
|
|
|
@@ -50,9 +50,10 @@ cd /workspace/basic
|
|
|
50
50
|
# Window "shell"
|
|
51
51
|
|
|
52
52
|
|
|
53
|
-
|
|
53
|
+
tmux -L interface select-pane -t basic:1.0 -T commands
|
|
54
54
|
tmux -L interface send-keys -t basic:1.0 bundle\ exec\ ruby\ -v C-m
|
|
55
55
|
tmux -L interface send-keys -t basic:1.0 bin/setup C-m
|
|
56
|
+
tmux -L interface send-keys -t basic:1.0 bundle\ exec\ rake\ test C-m
|
|
56
57
|
|
|
57
58
|
tmux -L interface select-layout -t basic:1 tiled
|
|
58
59
|
|
metadata
CHANGED
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: tmuxinator
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.4.
|
|
4
|
+
version: 3.4.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Allen Bargi
|
|
8
8
|
- Christopher Chow
|
|
9
|
-
autorequire:
|
|
10
9
|
bindir: bin
|
|
11
10
|
cert_chain: []
|
|
12
|
-
date:
|
|
11
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
13
12
|
dependencies:
|
|
14
13
|
- !ruby/object:Gem::Dependency
|
|
15
14
|
name: erubi
|
|
@@ -251,8 +250,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
251
250
|
- !ruby/object:Gem::Version
|
|
252
251
|
version: '2.7'
|
|
253
252
|
requirements: []
|
|
254
|
-
rubygems_version:
|
|
255
|
-
signing_key:
|
|
253
|
+
rubygems_version: 4.0.16
|
|
256
254
|
specification_version: 4
|
|
257
255
|
summary: Create and manage complex tmux sessions easily.
|
|
258
256
|
test_files:
|