teamocil 0.4.1 → 0.4.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/teamocil.rb +1 -1
- data/lib/teamocil/layout/window.rb +6 -1
- data/lib/teamocil/version.rb +3 -0
- data/spec/fixtures/layouts.yml +0 -1
- data/spec/layout_spec.rb +9 -2
- data/teamocil.gemspec +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
NjRlMmZkZDgyZjIzYzMzOWE2YWRjZmFhNDBmMGQ0YjkxZTMxNThlNg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NWNjNDBiNGEzOGNhYjc0OTUyN2YyZDQzOWZkMGY3ZTI3ZmI3NDU3OA==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
MGExNzQ2NDg4NmIzNzIyMWI0YTc1NDFlMmU3YmQ4Y2YwY2I2MGFmYTcyYTRk
|
10
|
+
NWZjZjQxYjIzNjg3OTc3YjNkN2ZkM2Q2ODQyOWQ3NjYwNWUzYWE2MjE1M2Nl
|
11
|
+
YmM3YmRkNWM1YjIyZWFiNTk1MGQ4YTI5ZWQyNWNkMGNiZjQ4MzY=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
ZDY1MGFjMzE0YjZkMjkyZGU1NmM0NDg3MGNiZDkxZjU0MTEyOTI4MTQ5Y2Rj
|
14
|
+
MTg4OGJhMzUxMDA3MWM4NDY1NjM5OGI5YWVjZWU4YTBjYjJjNmFiMDQ4Mjll
|
15
|
+
NGMxMDQ5MTc3YzAxNjQ2ZTkzOTk2MmViMGViN2MwYTQzNjg1Mjg=
|
data/lib/teamocil.rb
CHANGED
@@ -40,7 +40,12 @@ module Teamocil
|
|
40
40
|
commands << "tmux new-window -n \"#{@name}\""
|
41
41
|
end
|
42
42
|
|
43
|
-
|
43
|
+
pane_commands = @panes.map do |pane|
|
44
|
+
c = pane.generate_commands
|
45
|
+
c << "tmux select-layout \"#{@layout}\"" if @layout
|
46
|
+
c
|
47
|
+
end
|
48
|
+
commands << pane_commands
|
44
49
|
|
45
50
|
@options.each_pair do |option, value|
|
46
51
|
value = "on" if value === true
|
data/spec/fixtures/layouts.yml
CHANGED
data/spec/layout_spec.rb
CHANGED
@@ -77,8 +77,8 @@ describe Teamocil::Layout do
|
|
77
77
|
|
78
78
|
it "creates panes with dimensions" do
|
79
79
|
session = @layout.compile!
|
80
|
-
session.windows.
|
81
|
-
session.windows.
|
80
|
+
session.windows.last.panes[0].width.should == nil
|
81
|
+
session.windows.last.panes[1].width.should == 50
|
82
82
|
end
|
83
83
|
|
84
84
|
it "creates panes with commands specified in strings" do
|
@@ -172,6 +172,13 @@ describe Teamocil::Layout do
|
|
172
172
|
commands.last.should == "tmux select-pane -t 1"
|
173
173
|
end
|
174
174
|
|
175
|
+
it "should apply the layout after each pane is created" do
|
176
|
+
session = @layout.compile!
|
177
|
+
commands = session.windows.first.generate_commands
|
178
|
+
commands[1][0].should == ["tmux send-keys -t 0 \"export TEAMOCIL=1 && cd \"/foo\" && clear && echo 'foo'\"", "tmux send-keys -t 0 Enter", "tmux select-layout \"tiled\""]
|
179
|
+
commands[1][1].should == ["tmux split-window", "tmux send-keys -t 1 \"export TEAMOCIL=1 && cd \"/foo\" && clear && echo 'foo again'\"", "tmux send-keys -t 1 Enter", "tmux select-layout \"tiled\""]
|
180
|
+
end
|
181
|
+
|
175
182
|
context "with custom pane-base-index option" do
|
176
183
|
let(:window_pane_base_index) { 2 }
|
177
184
|
|
data/teamocil.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: teamocil
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rémi Prévost
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-03-
|
11
|
+
date: 2013-03-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -93,6 +93,7 @@ files:
|
|
93
93
|
- lib/teamocil/layout/pane.rb
|
94
94
|
- lib/teamocil/layout/session.rb
|
95
95
|
- lib/teamocil/layout/window.rb
|
96
|
+
- lib/teamocil/version.rb
|
96
97
|
- spec/cli_spec.rb
|
97
98
|
- spec/fixtures/.my-fancy-layouts-directory/sample-3.yml
|
98
99
|
- spec/fixtures/.teamocil/sample-2.yml
|