fusuma 2.0.3 → 2.0.4
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.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8f19305771a0704b1f7294b9b54653f09d7d4f6153ffbdd19a6c23a753870b09
|
4
|
+
data.tar.gz: 3b6c9addcda816e7379e69bb258bd11f091ea39fbae37fc8e0ef4c9ca4b7dff7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 422dc7e58b8db650754c4939ec1946456bfdfb0a8e4af33d79a20d88d84190f393952e05e1d086f711fb1ee2e6c415c4ddf6861dba8d94bf84df4f4e0585374f
|
7
|
+
data.tar.gz: 02e75550adfd4a6f3e3d43b4a6326377d5182131bdd9d9f3ff3ca0abcb89888e0bca9eea8551868cc87edb0a706fb9b51ee97cc517e093566c7448729359ded2
|
@@ -42,7 +42,12 @@ module Fusuma
|
|
42
42
|
|
43
43
|
# @return [Integer] return a latest line libinput debug-events
|
44
44
|
def debug_events(writer)
|
45
|
-
@debug_events ||=
|
45
|
+
@debug_events ||= begin
|
46
|
+
pid = Process.spawn(debug_events_with_options, out: writer,
|
47
|
+
in: '/dev/null')
|
48
|
+
Process.detach(pid)
|
49
|
+
pid
|
50
|
+
end
|
46
51
|
end
|
47
52
|
|
48
53
|
# @return [String] command
|
@@ -14,19 +14,19 @@ module Fusuma
|
|
14
14
|
end
|
15
15
|
|
16
16
|
def execute(event)
|
17
|
-
search_command(event)
|
18
|
-
break unless command
|
17
|
+
command = search_command(event)
|
19
18
|
|
20
|
-
|
19
|
+
MultiLogger.info(command: command, args: event.record.args)
|
21
20
|
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
21
|
+
accel = args_accel(event)
|
22
|
+
additional_env = event.record.args
|
23
|
+
.deep_transform_keys(&:to_s)
|
24
|
+
.deep_transform_values { |v| (v * accel).to_s }
|
26
25
|
|
27
|
-
|
28
|
-
|
29
|
-
|
26
|
+
pid = Process.spawn(additional_env, command.to_s)
|
27
|
+
Process.detach(pid)
|
28
|
+
rescue SystemCallError => e
|
29
|
+
MultiLogger.error("#{event.record.index.keys}": e.message.to_s)
|
30
30
|
end
|
31
31
|
|
32
32
|
def executable?(event)
|
data/lib/fusuma/version.rb
CHANGED
@@ -5,7 +5,9 @@ require './lib/fusuma/libinput_command'
|
|
5
5
|
|
6
6
|
module Fusuma
|
7
7
|
RSpec.describe LibinputCommand do
|
8
|
-
let(:libinput_command)
|
8
|
+
let(:libinput_command) do
|
9
|
+
described_class.new(libinput_options: libinput_options, commands: commands)
|
10
|
+
end
|
9
11
|
let(:libinput_options) { [] }
|
10
12
|
let(:commands) { {} }
|
11
13
|
describe '#version' do
|
@@ -79,7 +81,8 @@ module Fusuma
|
|
79
81
|
before do
|
80
82
|
dummy_io = StringIO.new('dummy')
|
81
83
|
io = StringIO.new('dummy output')
|
82
|
-
allow(Open3).to receive(:popen3).with(anything).and_return([dummy_io, io, dummy_io,
|
84
|
+
allow(Open3).to receive(:popen3).with(anything).and_return([dummy_io, io, dummy_io,
|
85
|
+
dummy_io, nil])
|
83
86
|
end
|
84
87
|
|
85
88
|
context 'with the alternative command' do
|
@@ -119,7 +122,7 @@ module Fusuma
|
|
119
122
|
describe 'debug_events' do
|
120
123
|
before do
|
121
124
|
@dummy_io = StringIO.new('dummy')
|
122
|
-
allow(Process).to receive(:
|
125
|
+
allow(Process).to receive(:detach).with(anything).and_return(nil)
|
123
126
|
end
|
124
127
|
subject { libinput_command.debug_events(@dummy_io) }
|
125
128
|
|
@@ -129,7 +132,8 @@ module Fusuma
|
|
129
132
|
end
|
130
133
|
|
131
134
|
it 'should call dummy events' do
|
132
|
-
expect(Process).to receive(:spawn).with('dummy_debug_events',
|
135
|
+
expect(Process).to receive(:spawn).with('dummy_debug_events',
|
136
|
+
{ out: @dummy_io, in: '/dev/null' }).once
|
133
137
|
subject
|
134
138
|
end
|
135
139
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fusuma
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- iberianpig
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-04-
|
11
|
+
date: 2021-04-24 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Fusuma is multitouch gesture recognizer. This gem makes your touchpad
|
14
14
|
on Linux able to recognize swipes or pinchs and assign command to them. Read installation
|