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 CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ZDU3ZmI2YzQ4NWYyZThlYzM1NmExNTQ4MjE3YjgxMGU3ZGYzZjg0Yg==
4
+ NjRlMmZkZDgyZjIzYzMzOWE2YWRjZmFhNDBmMGQ0YjkxZTMxNThlNg==
5
5
  data.tar.gz: !binary |-
6
- M2Q2Y2NkYTMzYzVhNjc5Njk2NGRkMjU0OTQ1NGRhMjlkZjI3M2JiYg==
6
+ NWNjNDBiNGEzOGNhYjc0OTUyN2YyZDQzOWZkMGY3ZTI3ZmI3NDU3OA==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- OWM1OTVjMWE1YmZjMjViODFhN2RkNDIwMDlmNDc0NzZlZmJhZjhiNDEzN2I0
10
- ZWQyMDExNWJlMjUxODZiNjk0Y2JlMGViY2E1MzAyMDYyNDY3OTc1NGU3NmVj
11
- YmUyYmQ3YTAwMjFiNGRlNTI3NDI2YWU4Yzk5NzhhYmJlOWJhNWI=
9
+ MGExNzQ2NDg4NmIzNzIyMWI0YTc1NDFlMmU3YmQ4Y2YwY2I2MGFmYTcyYTRk
10
+ NWZjZjQxYjIzNjg3OTc3YjNkN2ZkM2Q2ODQyOWQ3NjYwNWUzYWE2MjE1M2Nl
11
+ YmM3YmRkNWM1YjIyZWFiNTk1MGQ4YTI5ZWQyNWNkMGNiZjQ4MzY=
12
12
  data.tar.gz: !binary |-
13
- YTA5ODk0OGVlZmFiNzA3MjM1YjhlNjEyYTlmYjBiYzc0OWU3MDViZDUyMTE0
14
- MDk4N2E4YmU1ZDMxODQ3ZDRiM2E5ZDk1YThmOTUxNmFjNGE0MTQ1MTlmZWFk
15
- OWVhNmI0NzQ3NTMyOWU4MWIwZTRjZDJhZDlkMDY1NzllMmQ2N2M=
13
+ ZDY1MGFjMzE0YjZkMjkyZGU1NmM0NDg3MGNiZDkxZjU0MTEyOTI4MTQ5Y2Rj
14
+ MTg4OGJhMzUxMDA3MWM4NDY1NjM5OGI5YWVjZWU4YTBjYjJjNmFiMDQ4Mjll
15
+ NGMxMDQ5MTc3YzAxNjQ2ZTkzOTk2MmViMGViN2MwYTQzNjg1Mjg=
@@ -1,7 +1,7 @@
1
+ require "teamocil/version"
1
2
  require "teamocil/layout"
2
3
  require "teamocil/cli"
3
4
  require "teamocil/error"
4
5
 
5
6
  module Teamocil
6
- VERSION = "0.4.1"
7
7
  end
@@ -40,7 +40,12 @@ module Teamocil
40
40
  commands << "tmux new-window -n \"#{@name}\""
41
41
  end
42
42
 
43
- commands << @panes.map(&:generate_commands)
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
@@ -0,0 +1,3 @@
1
+ module Teamocil
2
+ VERSION = "0.4.2"
3
+ end
@@ -8,7 +8,6 @@ two-windows:
8
8
  panes:
9
9
  - cmd: "echo 'foo'"
10
10
  - cmd: "echo 'foo again'"
11
- width: 50
12
11
  - name: "bar"
13
12
  root: "/bar"
14
13
  splits:
@@ -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.first.panes[0].width.should == nil
81
- session.windows.first.panes[1].width.should == 50
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
 
@@ -1,7 +1,7 @@
1
1
  # encoding: utf-8
2
2
 
3
3
  $:.push File.expand_path("../lib", __FILE__)
4
- require "teamocil"
4
+ require "teamocil/version"
5
5
 
6
6
  spec = Gem::Specification.new do |s|
7
7
  # Metadata
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.1
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-26 00:00:00.000000000 Z
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