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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 67d2add167813b344a5424b97ac84bb6b726165d52a071bacc1864ddbbd06eae
4
- data.tar.gz: 8c48ba6566bf06b8168b83b87144fb47c7b879d88f419cd45bb113a4231c7615
3
+ metadata.gz: 6587a026202194be3546a45c7e3c5a32c98afc51351634073172c2cb9790a8a6
4
+ data.tar.gz: ad1ab050b9659fbd3200aa9dee1b4387861e85179133d6dec7569a1f62d51695
5
5
  SHA512:
6
- metadata.gz: 9440f1aad417be22cb857a9b5854fec445bd46b4ef9540bb70b70550ff43f335ecef26b4b9ffb6d126124790589df5a39b676fcc41d43ffa229c68d0e3f6122c
7
- data.tar.gz: 6150cea906e82d4f7038cb5ec383930c5e1d293801c92e807c97b0f2468448849fa451c988d32880ecec2812062581bf0306711b56ed9fecd7743c88bc615e80
6
+ metadata.gz: e8f9b85f6be3b04a44fa4f84c54ca6edc4cd6e75fa593c4aeee9af4de1a163fd391288e11694898aae25a88e022700e3d6dba42330c13636f6a2d2db2a65d390
7
+ data.tar.gz: 516cbf3516f27cdf4e6e4474d1fd0a6048ad18338db68fabd9a85fb62f5bc66fdb1f4e6d2e1c74d39d8496e31f3408a6185b8f8244a1b092e79b7b22bbb778bb
@@ -4,8 +4,9 @@ _tmuxinator() {
4
4
  projects=(${(f)"$(tmuxinator completions start)"})
5
5
 
6
6
  if (( CURRENT == 2 )); then
7
- _describe -t commands "tmuxinator subcommands" commands
8
- _describe -t projects "tmuxinator projects" projects
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)
@@ -3,9 +3,8 @@
3
3
  <%- if tmux_has_session? name -%>
4
4
  cd <%= root || "." %>
5
5
 
6
- <%= tmux_kill_session_command %>
7
-
8
6
  # Run on_project_stop command
9
7
  <%= hook_on_project_stop %>
10
8
 
11
- <%- end -%>
9
+ <%= tmux_kill_session_command %>
10
+ <%- end -%>
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Tmuxinator
2
- VERSION = "0.11.3".freeze
2
+ VERSION = "0.12.0".freeze
3
3
  end
@@ -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.11.3
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-06-11 00:00:00.000000000 Z
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