tmuxinator 3.2.1 → 3.3.0
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/assets/template.erb +2 -13
- data/lib/tmuxinator/version.rb +1 -1
- data/lib/tmuxinator/window.rb +7 -3
- data/spec/lib/tmuxinator/window_spec.rb +18 -19
- metadata +2 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 63c172a560956a6811c0d20df3bf2f53e32c8b14a6bad84d78b2b7dfd65e8c84
|
4
|
+
data.tar.gz: 2b9b9c77ed47a1b98645ccd0eb2292d854df97c4e9dbda69da74a64622d16310
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 995b321ee1874e190db8e5bc3c2c0f680edbb3af6148011a7b00e286c3b09b03372896bd60cd89c3a0ae20e3e3143fee5457b3c201e30a0d16bdcceef69a1e50
|
7
|
+
data.tar.gz: 48c82f9f431b7a5229332c99fca42fd13726df7052e900ca05d11d43f62a9070531db6acc44245ef7ea269d1716814005afe459590c7034d8bd64424d1154fbc
|
@@ -19,18 +19,7 @@ cd <%= root || "." %>
|
|
19
19
|
# Run on_project_first_start command.
|
20
20
|
<%= hook_on_project_first_start %>
|
21
21
|
|
22
|
-
# Create the session and the first window. Manually switch to root
|
23
|
-
# directory if required to support tmux < 1.9
|
24
|
-
<% if windows.first.root? %>
|
25
|
-
<% if Tmuxinator::Config.version < 1.9 %>
|
26
22
|
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 %>
|
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.0
|
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-06-17 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
|