tmuxinator 0.15.0 → 0.16.0
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/sample.yml +2 -5
- data/lib/tmuxinator/cli.rb +8 -2
- data/lib/tmuxinator/project.rb +9 -6
- data/lib/tmuxinator/version.rb +1 -1
- data/lib/tmuxinator/wemux_support.rb +7 -26
- data/spec/lib/tmuxinator/cli_spec.rb +14 -3
- data/spec/lib/tmuxinator/wemux_support_spec.rb +2 -25
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7a5f6f4bc57813ce5fdfa42366c8598a20556f2ce6f1d538e51dbd0c20e35867
|
4
|
+
data.tar.gz: a22e6c7e7b81ce35f24adff2e108feae018cb81f50b721a73206073a22e76854
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6f9cbe42d4d0061b57862394e185438092f3e2419d851e7f906345c4f199ee1c67d2cddf133b1b5eb13f167215ba7ee575f352c6371a974a86fe5970b293274c
|
7
|
+
data.tar.gz: 490d1a1eebb2d87d0c7207d565edbabce2a79fb8a64141709e2383edf1594fe8f179a50c28f4f2d76e747087907d71427da9db72edba2280e866b6f30a917e3c
|
@@ -6,8 +6,8 @@ root: ~/
|
|
6
6
|
# Optional tmux socket
|
7
7
|
# socket_name: foo
|
8
8
|
|
9
|
-
#
|
10
|
-
#
|
9
|
+
# Note that the pre and post options have been deprecated and will be replaced by
|
10
|
+
# project hooks.
|
11
11
|
|
12
12
|
# Project hooks
|
13
13
|
# Runs on project start, always
|
@@ -39,9 +39,6 @@ root: ~/
|
|
39
39
|
# Controls whether the tmux session should be attached to automatically. Defaults to true.
|
40
40
|
# attach: false
|
41
41
|
|
42
|
-
# Runs after everything. Use it to attach to tmux with custom options etc.
|
43
|
-
# post: tmux -CC attach -t <%= name %>
|
44
|
-
|
45
42
|
windows:
|
46
43
|
- editor:
|
47
44
|
layout: main-vertical
|
data/lib/tmuxinator/cli.rb
CHANGED
@@ -378,11 +378,17 @@ module Tmuxinator
|
|
378
378
|
desc "list", COMMANDS[:list]
|
379
379
|
map "l" => :list
|
380
380
|
map "ls" => :list
|
381
|
+
method_option :newline, type: :boolean,
|
382
|
+
aliases: ["-n"],
|
383
|
+
desc: "Force output to be one entry per line."
|
381
384
|
|
382
385
|
def list
|
383
386
|
say "tmuxinator projects:"
|
384
|
-
|
385
|
-
|
387
|
+
if options[:newline]
|
388
|
+
say Tmuxinator::Config.configs.join("\n")
|
389
|
+
else
|
390
|
+
print_in_columns Tmuxinator::Config.configs
|
391
|
+
end
|
386
392
|
end
|
387
393
|
|
388
394
|
desc "version", COMMANDS[:version]
|
data/lib/tmuxinator/project.rb
CHANGED
@@ -3,7 +3,6 @@ module Tmuxinator
|
|
3
3
|
include Tmuxinator::Util
|
4
4
|
include Tmuxinator::Deprecations
|
5
5
|
include Tmuxinator::Hooks::Project
|
6
|
-
include Tmuxinator::WemuxSupport
|
7
6
|
|
8
7
|
RBENVRVM_DEP_MSG = <<-M
|
9
8
|
DEPRECATION: rbenv/rvm-specific options have been replaced by the
|
@@ -27,12 +26,12 @@ module Tmuxinator
|
|
27
26
|
now, use the 'synchronize: after' option.
|
28
27
|
M
|
29
28
|
PRE_DEP_MSG = <<-M
|
30
|
-
DEPRECATION: The `pre` option has been replaced by project hooks and
|
31
|
-
|
29
|
+
DEPRECATION: The `pre` option has been replaced by project hooks (`on_project_start` and
|
30
|
+
`on_project_restart`) and will be removed in a future release.
|
32
31
|
M
|
33
32
|
POST_DEP_MSG = <<-M
|
34
|
-
DEPRECATION: The `post` option has been replaced by project hooks and
|
35
|
-
|
33
|
+
DEPRECATION: The `post` option has been replaced by project hooks (`on_project_stop` and
|
34
|
+
`on_project_exit`) and will be removed in a future release.
|
36
35
|
M
|
37
36
|
|
38
37
|
attr_reader :yaml
|
@@ -91,7 +90,7 @@ module Tmuxinator
|
|
91
90
|
raise "Cannot force_attach and force_detach at the same time" \
|
92
91
|
if @force_attach && @force_detach
|
93
92
|
|
94
|
-
|
93
|
+
extend Tmuxinator::WemuxSupport if wemux?
|
95
94
|
end
|
96
95
|
|
97
96
|
def render
|
@@ -378,5 +377,9 @@ module Tmuxinator
|
|
378
377
|
def parsed_parameters(parameters)
|
379
378
|
parameters.is_a?(Array) ? parameters.join("; ") : parameters
|
380
379
|
end
|
380
|
+
|
381
|
+
def wemux?
|
382
|
+
yaml["tmux_command"] == "wemux"
|
383
|
+
end
|
381
384
|
end
|
382
385
|
end
|
data/lib/tmuxinator/version.rb
CHANGED
@@ -1,33 +1,14 @@
|
|
1
1
|
module Tmuxinator
|
2
2
|
module WemuxSupport
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
def load_wemux_overrides
|
10
|
-
override_render!
|
11
|
-
override_commands!
|
12
|
-
end
|
13
|
-
|
14
|
-
def override_render!
|
15
|
-
class_eval do
|
16
|
-
define_method :render do
|
17
|
-
Tmuxinator::Project.render_template(
|
18
|
-
Tmuxinator::Config.wemux_template,
|
19
|
-
binding
|
20
|
-
)
|
21
|
-
end
|
22
|
-
end
|
3
|
+
def render
|
4
|
+
Tmuxinator::Project.render_template(
|
5
|
+
Tmuxinator::Config.wemux_template,
|
6
|
+
binding
|
7
|
+
)
|
23
8
|
end
|
24
9
|
|
25
|
-
|
26
|
-
|
27
|
-
%i[name tmux].each do |m|
|
28
|
-
define_method(m) { COMMAND }
|
29
|
-
end
|
30
|
-
end
|
10
|
+
%i(name tmux).each do |m|
|
11
|
+
define_method(m) { "wemux" }
|
31
12
|
end
|
32
13
|
end
|
33
14
|
end
|
@@ -783,12 +783,23 @@ describe Tmuxinator::Cli do
|
|
783
783
|
|
784
784
|
describe "#list" do
|
785
785
|
before do
|
786
|
-
ARGV.replace(["list"])
|
787
786
|
allow(Dir).to receive_messages(:[] => ["/path/to/project.yml"])
|
788
787
|
end
|
789
788
|
|
790
|
-
|
791
|
-
|
789
|
+
context "set --newline flag " do
|
790
|
+
ARGV.replace(["list --newline"])
|
791
|
+
|
792
|
+
it "force output to be one entry per line" do
|
793
|
+
expect { capture_io { cli.start } }.to_not raise_error
|
794
|
+
end
|
795
|
+
end
|
796
|
+
|
797
|
+
context "no arguments are given" do
|
798
|
+
ARGV.replace(["list"])
|
799
|
+
|
800
|
+
it "lists all projects " do
|
801
|
+
expect { capture_io { cli.start } }.to_not raise_error
|
802
|
+
end
|
792
803
|
end
|
793
804
|
end
|
794
805
|
|
@@ -1,31 +1,12 @@
|
|
1
1
|
require "spec_helper"
|
2
2
|
|
3
3
|
describe Tmuxinator::WemuxSupport do
|
4
|
-
let(:klass) { Class.new
|
4
|
+
let(:klass) { Class.new }
|
5
5
|
let(:instance) { klass.new }
|
6
6
|
|
7
|
-
|
8
|
-
it { expect(instance).to respond_to :load_wemux_overrides }
|
9
|
-
|
10
|
-
describe "#load_wemux_overrides" do
|
11
|
-
before { instance.load_wemux_overrides }
|
12
|
-
|
13
|
-
it "adds a render method" do
|
14
|
-
expect(instance).to respond_to :render
|
15
|
-
end
|
16
|
-
|
17
|
-
it "adds a name method" do
|
18
|
-
expect(instance).to respond_to :name
|
19
|
-
end
|
20
|
-
|
21
|
-
it "adds a tmux method" do
|
22
|
-
expect(instance).to respond_to :tmux
|
23
|
-
end
|
24
|
-
end
|
7
|
+
before { instance.extend Tmuxinator::WemuxSupport }
|
25
8
|
|
26
9
|
describe "#render" do
|
27
|
-
before { instance.load_wemux_overrides }
|
28
|
-
|
29
10
|
it "renders the template" do
|
30
11
|
expect(File).to receive(:read).at_least(:once) { "wemux ls 2>/dev/null" }
|
31
12
|
|
@@ -34,14 +15,10 @@ describe Tmuxinator::WemuxSupport do
|
|
34
15
|
end
|
35
16
|
|
36
17
|
describe "#name" do
|
37
|
-
before { instance.load_wemux_overrides }
|
38
|
-
|
39
18
|
it { expect(instance.name).to eq "wemux" }
|
40
19
|
end
|
41
20
|
|
42
21
|
describe "#tmux" do
|
43
|
-
before { instance.load_wemux_overrides }
|
44
|
-
|
45
22
|
it { expect(instance.tmux).to eq "wemux" }
|
46
23
|
end
|
47
24
|
end
|
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.16.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:
|
12
|
+
date: 2019-04-18 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: erubis
|
@@ -97,14 +97,14 @@ dependencies:
|
|
97
97
|
name: bundler
|
98
98
|
requirement: !ruby/object:Gem::Requirement
|
99
99
|
requirements:
|
100
|
-
- - "
|
100
|
+
- - ">="
|
101
101
|
- !ruby/object:Gem::Version
|
102
102
|
version: '1.3'
|
103
103
|
type: :development
|
104
104
|
prerelease: false
|
105
105
|
version_requirements: !ruby/object:Gem::Requirement
|
106
106
|
requirements:
|
107
|
-
- - "
|
107
|
+
- - ">="
|
108
108
|
- !ruby/object:Gem::Version
|
109
109
|
version: '1.3'
|
110
110
|
- !ruby/object:Gem::Dependency
|
@@ -302,7 +302,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
302
302
|
requirements:
|
303
303
|
- - ">="
|
304
304
|
- !ruby/object:Gem::Version
|
305
|
-
version: 2.
|
305
|
+
version: 2.4.6
|
306
306
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
307
307
|
requirements:
|
308
308
|
- - ">="
|