xing-root 0.0.1 → 0.0.2

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/xing/managers/tmux.rb +7 -3
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f1e5c25fdf0a0131b66f61a48b065e7a042edfda
4
- data.tar.gz: bdda3cd893b79191835a14ade4ce89b6a63844d5
3
+ metadata.gz: d4d7af675457613ad6ced19bdaa1f039485e1c82
4
+ data.tar.gz: e572d08c0f0e8a0075f90ce30b0a80ade961d73c
5
5
  SHA512:
6
- metadata.gz: e3e77cdf6e85e6108aa2876c879a783e68a97ffc64d3ab4c525d43ce6fb9cf369133f42e01d93dd05b91f12fe954a37a5b396e5365ed86769f1456dad9084467
7
- data.tar.gz: 57bb2b0db2a4884c8eef59f885d21241b842e15571a3f34484e25c721be0ca8240824e07e6da660da7400921ae5f76cdd06aee86ae869682c8ef363da489a514
6
+ metadata.gz: 36d6191910cab7ab11336bffd546f5c7aefbf1e7a45fa9c1e2348164aa690a67c17ea1b2a93d2929b69b2a4cbcb5bf5fe6b4645a92424f615526d62e2360c165
7
+ data.tar.gz: c5418a94e4f67d22522b34d4954565cfb9f6e4999a89ec96187b1e0fe7b54db13839a8dcd7052c5dcee4deb90181c9afd0eb8ec7d3bbf6558e7ff8ec2620d7dd
@@ -106,13 +106,17 @@ module Xing
106
106
  lines = tput_lines
107
107
  min_lines = (ENV["XING_TMUX_MIN_LINES"] || MINIMUM_WINDOW_LINES).to_i
108
108
  min_lines = [1, lines / min_lines].max
109
- if calculate_layout == "tiled"
109
+ if layout == "tiled"
110
110
  min_lines * 2
111
111
  else
112
112
  min_lines
113
113
  end
114
114
  end
115
115
 
116
+ def layout
117
+ @layout ||= calculate_layout
118
+ end
119
+
116
120
  def calculate_layout
117
121
  min_cols = (ENV["XING_TMUX_MIN_COLS"] || MINIMUM_WINDOW_COLUMNS).to_i
118
122
  cols = tput_cols
@@ -142,7 +146,7 @@ module Xing
142
146
  end
143
147
 
144
148
  def open_additional_window(name, task)
145
- tmux "select-layout -t '#@window_name' #{@layout}"
149
+ tmux "select-layout -t '#@window_name' #{layout}"
146
150
  @window_count = @window_count + 1
147
151
  @window_name = "Dev Servers #{@window_count}"
148
152
  tmux "new-window -d -n '#@window_name' '#{rake_command(task)}' \\; set-window-option remain-on-exit on"
@@ -162,7 +166,7 @@ module Xing
162
166
  end
163
167
 
164
168
  def wait_all
165
- tmux "select-layout -t '#@window_name' #{@layout}"
169
+ tmux "select-layout -t '#@window_name' #{layout}"
166
170
  super
167
171
  end
168
172
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: xing-root
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Judson Lester
@@ -97,7 +97,7 @@ rdoc_options:
97
97
  - "--main"
98
98
  - doc/README
99
99
  - "--title"
100
- - xing-root-0.0.1 Documentation
100
+ - xing-root-0.0.2 Documentation
101
101
  require_paths:
102
102
  - lib/
103
103
  required_ruby_version: !ruby/object:Gem::Requirement