tmuxinator 3.2.1 → 3.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/tmuxinator/assets/template.erb +3 -14
- data/lib/tmuxinator/tmux_version.rb +1 -0
- data/lib/tmuxinator/version.rb +1 -1
- data/lib/tmuxinator/window.rb +7 -3
- data/spec/lib/tmuxinator/window_spec.rb +18 -19
- metadata +3 -17
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 374b70100cae3e45e5953f09d9f61c85d9b10aabe0c918b2def15cc7c0606e60
|
4
|
+
data.tar.gz: cb27cba1cdea87587386469de9f116a5d64aaaa1fb70a60a1a344cb929e8dcf8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '0009410ca3370967b3ced71ea3dc306352feed655984e9ca2f83a9b43119401445710686561f2fa05cf21aecd4d24f68209eefe03f81653d051c4d5acdd9b199'
|
7
|
+
data.tar.gz: 5b00a6ea5117abcd553c416051318b4ff55fdf2a709be7ed9f31b2d38ed5788d70de6f40aab1d1b815ec7a956552fb536261fdfd7322830c8d9d969de58c7c96
|
@@ -19,18 +19,7 @@ cd <%= root || "." %>
|
|
19
19
|
# Run on_project_first_start command.
|
20
20
|
<%= hook_on_project_first_start %>
|
21
21
|
|
22
|
-
|
23
|
-
# directory if required to support tmux < 1.9
|
24
|
-
<% if windows.first.root? %>
|
25
|
-
<% if Tmuxinator::Config.version < 1.9 %>
|
26
|
-
TMUX= <%= tmux_new_session_command %>
|
27
|
-
<%= windows.first.tmux_window_command_prefix %> <%= "cd #{windows.first.root}".shellescape %> C-m
|
28
|
-
<%- else -%>
|
29
|
-
TMUX= <%= tmux_new_session_command %> -c <%= windows.first.root.shellescape %>
|
30
|
-
<% end %>
|
31
|
-
<%- else -%>
|
32
|
-
TMUX= <%= tmux_new_session_command %>
|
33
|
-
<% end %>
|
22
|
+
<%= tmux_new_session_command %>
|
34
23
|
|
35
24
|
<% if Tmuxinator::Config.version < 1.7 %>
|
36
25
|
# Set the default path for versions prior to 1.7
|
@@ -48,8 +37,8 @@ cd <%= root || "." %>
|
|
48
37
|
<% end %>
|
49
38
|
<% end %>
|
50
39
|
|
51
|
-
# Create
|
52
|
-
<% windows.
|
40
|
+
# Create windows.
|
41
|
+
<% windows.each do |window| %>
|
53
42
|
<%= window.tmux_new_window_command %>
|
54
43
|
<% end %>
|
55
44
|
|
data/lib/tmuxinator/version.rb
CHANGED
data/lib/tmuxinator/window.rb
CHANGED
@@ -36,12 +36,16 @@ module Tmuxinator
|
|
36
36
|
yaml["synchronize"] || false
|
37
37
|
end
|
38
38
|
|
39
|
+
# The expanded, joined window root path
|
40
|
+
# Relative paths are joined to the project root
|
39
41
|
def root
|
40
|
-
|
42
|
+
return _project_root unless _yaml_root
|
43
|
+
|
44
|
+
File.expand_path(_yaml_root, _project_root).shellescape
|
41
45
|
end
|
42
46
|
|
43
47
|
def _yaml_root
|
44
|
-
|
48
|
+
yaml["root"]
|
45
49
|
end
|
46
50
|
|
47
51
|
def _project_root
|
@@ -115,7 +119,7 @@ module Tmuxinator
|
|
115
119
|
|
116
120
|
def tmux_new_window_command
|
117
121
|
path = root? ? "#{Tmuxinator::Config.default_path_option} #{root}" : nil
|
118
|
-
"#{project.tmux} new-window #{path} -t #{tmux_window_target} #{tmux_window_name_option}"
|
122
|
+
"#{project.tmux} new-window #{path} -k -t #{tmux_window_target} #{tmux_window_name_option}"
|
119
123
|
end
|
120
124
|
|
121
125
|
def tmux_tiled_layout_command
|
@@ -7,6 +7,8 @@ describe Tmuxinator::Window do
|
|
7
7
|
let(:panes) { ["vim", nil, "top"] }
|
8
8
|
let(:window_name) { "editor" }
|
9
9
|
let(:synchronize) { false }
|
10
|
+
let(:root) {}
|
11
|
+
let(:root?) { root }
|
10
12
|
let(:yaml) do
|
11
13
|
{
|
12
14
|
window_name => {
|
@@ -16,27 +18,14 @@ describe Tmuxinator::Window do
|
|
16
18
|
],
|
17
19
|
"synchronize" => synchronize,
|
18
20
|
"layout" => "main-vertical",
|
19
|
-
"panes" => panes
|
20
|
-
|
21
|
-
|
22
|
-
end
|
23
|
-
let(:yaml_root) do
|
24
|
-
{
|
25
|
-
"editor" => {
|
26
|
-
"root" => "/project/override",
|
27
|
-
"root?" => true,
|
28
|
-
"pre" => [
|
29
|
-
"echo 'I get run in each pane. Before each pane command!'",
|
30
|
-
nil
|
31
|
-
],
|
32
|
-
"layout" => "main-vertical",
|
33
|
-
"panes" => panes
|
21
|
+
"panes" => panes,
|
22
|
+
"root" => root,
|
23
|
+
"root?" => root?,
|
34
24
|
}
|
35
25
|
}
|
36
26
|
end
|
37
27
|
|
38
28
|
let(:window) { described_class.new(yaml, 0, project) }
|
39
|
-
let(:window_root) { described_class.new(yaml_root, 0, project) }
|
40
29
|
|
41
30
|
shared_context "window command context" do
|
42
31
|
let(:project) { double(:project) }
|
@@ -81,9 +70,19 @@ describe Tmuxinator::Window do
|
|
81
70
|
end
|
82
71
|
end
|
83
72
|
|
84
|
-
context "with window root" do
|
73
|
+
context "with absolute window root" do
|
74
|
+
let(:root) { "/project/override" }
|
75
|
+
|
85
76
|
it "gets the window root" do
|
86
|
-
expect(
|
77
|
+
expect(window.root).to include("/project/override")
|
78
|
+
end
|
79
|
+
end
|
80
|
+
|
81
|
+
context "with relative window root" do
|
82
|
+
let(:root) { "relative" }
|
83
|
+
|
84
|
+
it "joins the project root" do
|
85
|
+
expect(window.root).to include("/project/tmuxinator/relative")
|
87
86
|
end
|
88
87
|
end
|
89
88
|
end
|
@@ -354,7 +353,7 @@ describe Tmuxinator::Window do
|
|
354
353
|
|
355
354
|
let(:window_part) { "new-window" }
|
356
355
|
let(:name_part) { window.tmux_window_name_option }
|
357
|
-
let(:target_part) { "-t #{window.tmux_window_target}" }
|
356
|
+
let(:target_part) { "-k -t #{window.tmux_window_target}" }
|
358
357
|
let(:path_part) { "#{path_option} #{project.root}" }
|
359
358
|
|
360
359
|
let(:path_option) { "-c" }
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tmuxinator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Allen Bargi
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2024-
|
12
|
+
date: 2024-09-29 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: erubi
|
@@ -59,20 +59,6 @@ dependencies:
|
|
59
59
|
- - ">="
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: 2.2.5
|
62
|
-
- !ruby/object:Gem::Dependency
|
63
|
-
name: activesupport
|
64
|
-
requirement: !ruby/object:Gem::Requirement
|
65
|
-
requirements:
|
66
|
-
- - "<"
|
67
|
-
- !ruby/object:Gem::Version
|
68
|
-
version: 5.0.0
|
69
|
-
type: :development
|
70
|
-
prerelease: false
|
71
|
-
version_requirements: !ruby/object:Gem::Requirement
|
72
|
-
requirements:
|
73
|
-
- - "<"
|
74
|
-
- !ruby/object:Gem::Version
|
75
|
-
version: 5.0.0
|
76
62
|
- !ruby/object:Gem::Dependency
|
77
63
|
name: awesome_print
|
78
64
|
requirement: !ruby/object:Gem::Requirement
|
@@ -302,7 +288,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
302
288
|
- !ruby/object:Gem::Version
|
303
289
|
version: 1.8.23
|
304
290
|
requirements: []
|
305
|
-
rubygems_version: 3.
|
291
|
+
rubygems_version: 3.5.11
|
306
292
|
signing_key:
|
307
293
|
specification_version: 4
|
308
294
|
summary: Create and manage complex tmux sessions easily.
|