uh-wm 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +14 -15
- data/features/layout/manage.feature +1 -1
- data/features/layout/protocol.feature +34 -2
- data/features/layout/unmanage.feature +1 -1
- data/features/manager/change.feature +7 -0
- data/features/manager/expose.feature +5 -0
- data/features/manager/unmanage.feature +2 -2
- data/features/run_control/layout.feature +39 -0
- data/features/session/termination.feature +1 -2
- data/features/steps/output_steps.rb +11 -0
- data/features/steps/run_steps.rb +2 -2
- data/features/steps/x_steps.rb +29 -24
- data/features/workers/block.feature +15 -0
- data/features/workers/mux.feature +15 -0
- data/lib/uh/wm/actions_handler.rb +6 -2
- data/lib/uh/wm/client.rb +5 -0
- data/lib/uh/wm/env.rb +2 -2
- data/lib/uh/wm/manager.rb +22 -4
- data/lib/uh/wm/run_control.rb +12 -0
- data/lib/uh/wm/runner.rb +12 -9
- data/lib/uh/wm/testing/acceptance_helpers.rb +47 -56
- data/lib/uh/wm/version.rb +1 -1
- data/lib/uh/wm/workers/base.rb +1 -1
- data/lib/uh/wm/workers/mux.rb +1 -1
- data/spec/spec_helper.rb +4 -0
- data/spec/support/factories.rb +27 -0
- data/spec/uh/wm/actions_handler_spec.rb +6 -1
- data/spec/uh/wm/client_spec.rb +21 -6
- data/spec/uh/wm/dispatcher_spec.rb +1 -1
- data/spec/uh/wm/env_spec.rb +18 -9
- data/spec/uh/wm/manager_spec.rb +70 -39
- data/spec/uh/wm/run_control_spec.rb +25 -1
- data/spec/uh/wm/runner_spec.rb +23 -13
- data/uh-wm.gemspec +2 -1
- metadata +20 -7
data/spec/uh/wm/runner_spec.rb
CHANGED
@@ -1,8 +1,11 @@
|
|
1
1
|
SomeLayout = Class.new do
|
2
|
-
|
3
|
-
|
4
|
-
define_method(
|
5
|
-
define_method(:
|
2
|
+
include Factories
|
3
|
+
|
4
|
+
define_method(:register) { |*_| }
|
5
|
+
define_method(:suggest_geo) { build_geo 0, 0, 42, 42 }
|
6
|
+
define_method(:<<) { |*_| }
|
7
|
+
define_method(:remove) { |*_| }
|
8
|
+
define_method(:update) { |*_| }
|
6
9
|
end
|
7
10
|
|
8
11
|
module Uh
|
@@ -16,10 +19,6 @@ module Uh
|
|
16
19
|
env.rc_path = 'non_existent_run_control.rb'
|
17
20
|
end
|
18
21
|
|
19
|
-
it 'has the env' do
|
20
|
-
expect(runner.env).to be env
|
21
|
-
end
|
22
|
-
|
23
22
|
it 'has a dispatcher' do
|
24
23
|
expect(runner.events).to be_a Dispatcher
|
25
24
|
end
|
@@ -72,7 +71,7 @@ module Uh
|
|
72
71
|
describe '#register_event_hooks' do
|
73
72
|
it 'registers quit event hook' do
|
74
73
|
runner.register_event_hooks
|
75
|
-
expect(runner).to receive
|
74
|
+
expect(runner).to receive :stop!
|
76
75
|
runner.events.emit :quit
|
77
76
|
end
|
78
77
|
|
@@ -86,7 +85,7 @@ module Uh
|
|
86
85
|
it 'registers for :configure event' do
|
87
86
|
runner.register_event_hooks
|
88
87
|
expect(runner.events.emit :configure, args: :window)
|
89
|
-
.to eq
|
88
|
+
.to eq build_geo 0, 0, 42, 42
|
90
89
|
end
|
91
90
|
|
92
91
|
it 'registers for :manage event' do
|
@@ -100,6 +99,12 @@ module Uh
|
|
100
99
|
expect(env.layout).to receive(:remove).with :client
|
101
100
|
runner.events.emit :unmanage, args: :client
|
102
101
|
end
|
102
|
+
|
103
|
+
it 'registers for :change event' do
|
104
|
+
runner.register_event_hooks
|
105
|
+
expect(env.layout).to receive(:update).with :client
|
106
|
+
runner.events.emit :change, args: :client
|
107
|
+
end
|
103
108
|
end
|
104
109
|
|
105
110
|
context 'keys hooks' do
|
@@ -145,17 +150,22 @@ module Uh
|
|
145
150
|
expect(runner.worker).to respond_to :work_events
|
146
151
|
end
|
147
152
|
|
148
|
-
it 'setups the
|
153
|
+
it 'setups the before_watch callback' do
|
154
|
+
expect(runner.manager).to receive :handle_pending_events
|
155
|
+
runner.worker.before_watch.call
|
156
|
+
end
|
157
|
+
|
158
|
+
it 'setups the read callback' do
|
149
159
|
expect(runner.manager).to receive :handle_pending_events
|
150
160
|
runner.worker.on_read.call
|
151
161
|
end
|
152
162
|
|
153
|
-
it 'setups the read_next callback
|
163
|
+
it 'setups the read_next callback' do
|
154
164
|
expect(runner.manager).to receive :handle_next_event
|
155
165
|
runner.worker.on_read_next.call
|
156
166
|
end
|
157
167
|
|
158
|
-
it 'setups the timeout callback
|
168
|
+
it 'setups the timeout callback' do
|
159
169
|
expect(runner.manager).to receive :flush
|
160
170
|
runner.worker.on_timeout.call
|
161
171
|
end
|
data/uh-wm.gemspec
CHANGED
@@ -5,6 +5,7 @@ Gem::Specification.new do |s|
|
|
5
5
|
s.version = Uh::WM::VERSION.dup
|
6
6
|
s.summary = 'minimalistic tiling and stacking window manager for X'
|
7
7
|
s.description = s.name
|
8
|
+
s.license = 'BSD-3-Clause'
|
8
9
|
s.homepage = 'https://rubygems.org/gems/uh-wm'
|
9
10
|
|
10
11
|
s.authors = 'Thibault Jouan'
|
@@ -15,7 +16,7 @@ Gem::Specification.new do |s|
|
|
15
16
|
s.executables = s.files.grep(/\Abin\//) { |f| File.basename(f) }
|
16
17
|
|
17
18
|
s.add_dependency 'uh', '2.0.0.pre2'
|
18
|
-
s.add_dependency 'uh-layout', '0.
|
19
|
+
s.add_dependency 'uh-layout', '~> 0.3.0'
|
19
20
|
|
20
21
|
s.add_development_dependency 'aruba', '~> 0.6'
|
21
22
|
s.add_development_dependency 'cucumber', '~> 2.0'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: uh-wm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Thibault Jouan
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-04-
|
11
|
+
date: 2015-04-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: uh
|
@@ -28,16 +28,16 @@ dependencies:
|
|
28
28
|
name: uh-layout
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 0.
|
33
|
+
version: 0.3.0
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 0.
|
40
|
+
version: 0.3.0
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: aruba
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -139,13 +139,16 @@ files:
|
|
139
139
|
- features/layout/manage.feature
|
140
140
|
- features/layout/protocol.feature
|
141
141
|
- features/layout/unmanage.feature
|
142
|
+
- features/manager/change.feature
|
142
143
|
- features/manager/check_other_wm.feature
|
144
|
+
- features/manager/expose.feature
|
143
145
|
- features/manager/input_events.feature
|
144
146
|
- features/manager/manage.feature
|
145
147
|
- features/manager/unmanage.feature
|
146
148
|
- features/manager/x_errors.feature
|
147
149
|
- features/run_control/evaluation.feature
|
148
150
|
- features/run_control/key.feature
|
151
|
+
- features/run_control/layout.feature
|
149
152
|
- features/run_control/modifier.feature
|
150
153
|
- features/run_control/worker.feature
|
151
154
|
- features/session/connection.feature
|
@@ -156,6 +159,8 @@ files:
|
|
156
159
|
- features/steps/run_steps.rb
|
157
160
|
- features/steps/x_steps.rb
|
158
161
|
- features/support/env.rb
|
162
|
+
- features/workers/block.feature
|
163
|
+
- features/workers/mux.feature
|
159
164
|
- lib/uh/wm.rb
|
160
165
|
- lib/uh/wm/actions_handler.rb
|
161
166
|
- lib/uh/wm/cli.rb
|
@@ -175,6 +180,7 @@ files:
|
|
175
180
|
- lib/uh/wm/workers/mux.rb
|
176
181
|
- spec/spec_helper.rb
|
177
182
|
- spec/support/exit_helpers.rb
|
183
|
+
- spec/support/factories.rb
|
178
184
|
- spec/support/filesystem_helpers.rb
|
179
185
|
- spec/uh/wm/actions_handler_spec.rb
|
180
186
|
- spec/uh/wm/cli_spec.rb
|
@@ -186,7 +192,8 @@ files:
|
|
186
192
|
- spec/uh/wm/runner_spec.rb
|
187
193
|
- uh-wm.gemspec
|
188
194
|
homepage: https://rubygems.org/gems/uh-wm
|
189
|
-
licenses:
|
195
|
+
licenses:
|
196
|
+
- BSD-3-Clause
|
190
197
|
metadata: {}
|
191
198
|
post_install_message:
|
192
199
|
rdoc_options: []
|
@@ -223,13 +230,16 @@ test_files:
|
|
223
230
|
- features/layout/manage.feature
|
224
231
|
- features/layout/protocol.feature
|
225
232
|
- features/layout/unmanage.feature
|
233
|
+
- features/manager/change.feature
|
226
234
|
- features/manager/check_other_wm.feature
|
235
|
+
- features/manager/expose.feature
|
227
236
|
- features/manager/input_events.feature
|
228
237
|
- features/manager/manage.feature
|
229
238
|
- features/manager/unmanage.feature
|
230
239
|
- features/manager/x_errors.feature
|
231
240
|
- features/run_control/evaluation.feature
|
232
241
|
- features/run_control/key.feature
|
242
|
+
- features/run_control/layout.feature
|
233
243
|
- features/run_control/modifier.feature
|
234
244
|
- features/run_control/worker.feature
|
235
245
|
- features/session/connection.feature
|
@@ -240,8 +250,11 @@ test_files:
|
|
240
250
|
- features/steps/run_steps.rb
|
241
251
|
- features/steps/x_steps.rb
|
242
252
|
- features/support/env.rb
|
253
|
+
- features/workers/block.feature
|
254
|
+
- features/workers/mux.feature
|
243
255
|
- spec/spec_helper.rb
|
244
256
|
- spec/support/exit_helpers.rb
|
257
|
+
- spec/support/factories.rb
|
245
258
|
- spec/support/filesystem_helpers.rb
|
246
259
|
- spec/uh/wm/actions_handler_spec.rb
|
247
260
|
- spec/uh/wm/cli_spec.rb
|