tmuxinator 0.11.3 → 0.12.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/completion/tmuxinator.zsh +3 -2
- data/lib/tmuxinator/assets/template-stop.erb +2 -3
- data/lib/tmuxinator/project.rb +1 -1
- data/lib/tmuxinator/version.rb +1 -1
- data/spec/factories/projects.rb +8 -0
- data/spec/fixtures/sample_alias.yml +21 -0
- data/spec/lib/tmuxinator/project_spec.rb +12 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6587a026202194be3546a45c7e3c5a32c98afc51351634073172c2cb9790a8a6
|
4
|
+
data.tar.gz: ad1ab050b9659fbd3200aa9dee1b4387861e85179133d6dec7569a1f62d51695
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e8f9b85f6be3b04a44fa4f84c54ca6edc4cd6e75fa593c4aeee9af4de1a163fd391288e11694898aae25a88e022700e3d6dba42330c13636f6a2d2db2a65d390
|
7
|
+
data.tar.gz: 516cbf3516f27cdf4e6e4474d1fd0a6048ad18338db68fabd9a85fb62f5bc66fdb1f4e6d2e1c74d39d8496e31f3408a6185b8f8244a1b092e79b7b22bbb778bb
|
data/completion/tmuxinator.zsh
CHANGED
@@ -4,8 +4,9 @@ _tmuxinator() {
|
|
4
4
|
projects=(${(f)"$(tmuxinator completions start)"})
|
5
5
|
|
6
6
|
if (( CURRENT == 2 )); then
|
7
|
-
|
8
|
-
|
7
|
+
_alternative \
|
8
|
+
'commands:: _describe -t commands "tmuxinator subcommands" commands' \
|
9
|
+
'projects:: _describe -t projects "tmuxinator projects" projects'
|
9
10
|
elif (( CURRENT == 3)); then
|
10
11
|
case $words[2] in
|
11
12
|
copy|debug|delete|open|start)
|
data/lib/tmuxinator/project.rb
CHANGED
@@ -54,7 +54,7 @@ module Tmuxinator
|
|
54
54
|
@args = args
|
55
55
|
|
56
56
|
content = Erubis::Eruby.new(raw_content).result(binding)
|
57
|
-
YAML.safe_load(content)
|
57
|
+
YAML.safe_load(content, [], [], true)
|
58
58
|
rescue SyntaxError, StandardError => error
|
59
59
|
raise "Failed to parse config file: #{error.message}"
|
60
60
|
end
|
data/lib/tmuxinator/version.rb
CHANGED
data/spec/factories/projects.rb
CHANGED
@@ -105,4 +105,12 @@ FactoryBot.define do
|
|
105
105
|
|
106
106
|
initialize_with { Tmuxinator::Project.new(file) }
|
107
107
|
end
|
108
|
+
|
109
|
+
factory :project_with_alias, class: Tmuxinator::Project do
|
110
|
+
transient do
|
111
|
+
file { "spec/fixtures/sample_alias.yml" }
|
112
|
+
end
|
113
|
+
|
114
|
+
initialize_with { Tmuxinator::Project.load(file) }
|
115
|
+
end
|
108
116
|
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# ~/.tmuxinator/sample.yml
|
2
|
+
# you can make as many tabs as you wish...
|
3
|
+
|
4
|
+
defaults: &defaults
|
5
|
+
pre:
|
6
|
+
- echo "alias_is_working"
|
7
|
+
|
8
|
+
name: sample_alias
|
9
|
+
root: ~/test
|
10
|
+
windows:
|
11
|
+
- editor:
|
12
|
+
<<: *defaults
|
13
|
+
layout: main-vertical
|
14
|
+
panes:
|
15
|
+
- vim
|
16
|
+
- #empty, will just run plain bash
|
17
|
+
- top
|
18
|
+
- pane_with_multiple_commands:
|
19
|
+
- ssh server
|
20
|
+
- echo "Hello"
|
21
|
+
- guard:
|
@@ -31,6 +31,10 @@ describe Tmuxinator::Project do
|
|
31
31
|
FactoryBot.build(:nameless_window_project)
|
32
32
|
end
|
33
33
|
|
34
|
+
let(:project_with_alias) do
|
35
|
+
FactoryBot.build(:project_with_alias)
|
36
|
+
end
|
37
|
+
|
34
38
|
it "should include Hooks" do
|
35
39
|
expect(project).to be_kind_of(Tmuxinator::Hooks::Project)
|
36
40
|
end
|
@@ -62,6 +66,14 @@ describe Tmuxinator::Project do
|
|
62
66
|
expect(rendered).to_not include("sample")
|
63
67
|
end
|
64
68
|
end
|
69
|
+
|
70
|
+
context "with alias" do
|
71
|
+
it "renders the tmux config" do
|
72
|
+
rendered = project_with_alias.render
|
73
|
+
expect(rendered).to_not be_empty
|
74
|
+
expect(rendered).to include("alias_is_working")
|
75
|
+
end
|
76
|
+
end
|
65
77
|
end
|
66
78
|
|
67
79
|
describe "#tmux_has_session?" do
|
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: 0.
|
4
|
+
version: 0.12.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: 2018-
|
12
|
+
date: 2018-07-03 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: erubis
|
@@ -249,6 +249,7 @@ files:
|
|
249
249
|
- spec/fixtures/nowindows.yml
|
250
250
|
- spec/fixtures/sample.deprecations.yml
|
251
251
|
- spec/fixtures/sample.yml
|
252
|
+
- spec/fixtures/sample_alias.yml
|
252
253
|
- spec/fixtures/sample_emoji_as_name.yml
|
253
254
|
- spec/fixtures/sample_literals_as_window_name.yml
|
254
255
|
- spec/fixtures/sample_number_as_name.yml
|
@@ -310,6 +311,7 @@ test_files:
|
|
310
311
|
- spec/fixtures/nowindows.yml
|
311
312
|
- spec/fixtures/sample.deprecations.yml
|
312
313
|
- spec/fixtures/sample.yml
|
314
|
+
- spec/fixtures/sample_alias.yml
|
313
315
|
- spec/fixtures/sample_emoji_as_name.yml
|
314
316
|
- spec/fixtures/sample_literals_as_window_name.yml
|
315
317
|
- spec/fixtures/sample_number_as_name.yml
|