fusuma 2.2.0 → 2.4.1

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: 701d329da6fb23d22958f210648a1bf30b73f947064c94c2f30a1ab634edf5e4
4
- data.tar.gz: 6335546af4a4624fd450107800b5fde80692f0aa60ab910758be940163006d54
3
+ metadata.gz: 134ea9e98557e1475809d32c0fff6a636721118b6923eec3a74d69ac94659126
4
+ data.tar.gz: 40c33331caa554239fd5c56187c5273bd5abe0c9b83f1498a4cb8e4ff821d2d5
5
5
  SHA512:
6
- metadata.gz: 931976b9864eb6077a6ebbc34b4425848782cb1b40358ada6e1b2dae6b145bff5382ec61b17ef58835ce1b179be28fca13d76e870243d0f70c40cddb67317700
7
- data.tar.gz: 4ccc5737a5ae4d9f979fb409374f3f02c285046f266e368a05c1f5f6e846bfb9ddd47af3bff809f9f6ed1329564aeaaa66b5723ac7e7f342b2031b0322cefbea
6
+ metadata.gz: eb7e3ee14cce7f5efa087fa48ded433068e2b5ab3c4e083e282ac0cc5d837bef84c43c755d8c2b3d70d931883076856579797d104e414c89360478eb71ec9134
7
+ data.tar.gz: 61dc019f239f4bcd0e9398c0791cf2e16def41f82a458b20cb76a34aa36e414f3fea6e287eca731c7537d30fc4352f8c172dc95e1b23763f352085d2446a0d09
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # Fusuma [![Gem Version](https://badge.fury.io/rb/fusuma.svg)](https://badge.fury.io/rb/fusuma) [![Testing on Ubuntu](https://github.com/iberianpig/fusuma/actions/workflows/ubuntu.yml/badge.svg)](https://github.com/iberianpig/fusuma/actions/workflows/ubuntu.yml) [![Coverage Status](https://coveralls.io/repos/github/iberianpig/fusuma/badge.svg?branch=master)](https://coveralls.io/github/iberianpig/fusuma?branch=master)
1
+ # Fusuma [![Gem Version](https://badge.fury.io/rb/fusuma.svg)](https://badge.fury.io/rb/fusuma) [![Build Status](https://github.com/iberianpig/fusuma/actions/workflows/ubuntu.yml/badge.svg)](https://github.com/iberianpig/fusuma/actions/workflows/ubuntu.yml)
2
2
 
3
3
  Fusuma is multitouch gesture recognizer.
4
4
  This gem makes your linux able to recognize swipes or pinchs and assign commands to them.
@@ -297,7 +297,7 @@ swipe:
297
297
 
298
298
  - `xte`
299
299
  - [xte(1) - Linux man page](https://linux.die.net/man/1/xte)
300
- - install with `sudo apt xautomation`
300
+ - install with `sudo apt install xautomation`
301
301
 
302
302
  - [ydotool](https://github.com/ReimuNotMoe/ydotool)
303
303
  - Wayland compatible
@@ -1,13 +1,21 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require "fusuma/string_support"
4
+
3
5
  module Fusuma
4
6
  # Rename process
5
7
  module CustomProcess
8
+ attr_writer :proctitle
9
+
6
10
  def fork
7
11
  Process.fork do
8
- Process.setproctitle(self.class.name.underscore.to_s)
12
+ Process.setproctitle(proctitle)
9
13
  yield
10
14
  end
11
15
  end
16
+
17
+ def proctitle
18
+ @proctitle ||= self.class.name.underscore
19
+ end
12
20
  end
13
21
  end
@@ -19,6 +19,7 @@ module Fusuma
19
19
  filepath = self.class.instance_variable_get('@filepath')
20
20
  if filepath
21
21
  logfile = File.new(filepath, 'a')
22
+ logfile.sync = true
22
23
  super(logfile)
23
24
  $stderr = logfile
24
25
  else
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Fusuma
4
- VERSION = '2.2.0'
4
+ VERSION = '2.4.1'
5
5
  end
@@ -15,13 +15,14 @@ module Fusuma
15
15
 
16
16
  describe '.fork' do
17
17
  before do
18
- allow(Process).to receive(:fork)
18
+ @test_instance = ForkTest.new
19
19
  end
20
20
  it 'call Process.fork and Process.setproctitle' do
21
- expect(Process).to receive(:fork).and_yield do
22
- expect(Process).to receive(:setproctitle)
21
+ expect(Process).to receive(:fork).and_yield do |block_context|
22
+ allow(block_context).to receive(:proctitle).and_return(@test_instance.proctitle)
23
+ expect(Process).to receive(:setproctitle).with(@test_instance.proctitle)
23
24
  end
24
- ForkTest.new.call
25
+ @test_instance.call
25
26
  end
26
27
  end
27
28
  end
data/spec/spec_helper.rb CHANGED
@@ -2,8 +2,8 @@
2
2
 
3
3
  require 'bundler/setup'
4
4
  require 'helpers/config_helper'
5
- require 'coveralls'
6
- Coveralls.wear!
5
+
6
+ require 'simplecov'
7
7
 
8
8
  RSpec.configure do |config|
9
9
  # Enable flags like --only-failures and --next-failure
@@ -18,3 +18,6 @@ RSpec.configure do |config|
18
18
 
19
19
  config.include(Fusuma::ConfigHelper)
20
20
  end
21
+
22
+ SimpleCov.formatter = SimpleCov::Formatter::HTMLFormatter
23
+ SimpleCov.start
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.2.0
4
+ version: 2.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - iberianpig
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-11-21 00:00:00.000000000 Z
11
+ date: 2022-04-17 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
@@ -124,46 +124,46 @@ required_rubygems_version: !ruby/object:Gem::Requirement
124
124
  - !ruby/object:Gem::Version
125
125
  version: '0'
126
126
  requirements: []
127
- rubygems_version: 3.2.22
127
+ rubygems_version: 3.0.3.1
128
128
  signing_key:
129
129
  specification_version: 4
130
130
  summary: Multitouch gestures with libinput driver, Linux
131
131
  test_files:
132
- - spec/helpers/config_helper.rb
133
- - spec/lib/config/searcher_spec.rb
134
- - spec/lib/config_spec.rb
135
- - spec/lib/custom_process_spec.rb
136
- - spec/lib/device_spec.rb
132
+ - spec/spec_helper.rb
133
+ - spec/lib/libinput_command_spec.rb
137
134
  - spec/lib/dummy_config.yml
138
- - spec/lib/fusuma_spec.rb
139
- - spec/lib/libinput-list-devices_iberianpig-XPS-9360.txt
140
- - spec/lib/libinput-list-devices_magic_trackpad.txt
141
135
  - spec/lib/libinput-list-devices_razer_razer_blade.txt
136
+ - spec/lib/fusuma_spec.rb
142
137
  - spec/lib/libinput-list-devices_thejinx0r.txt
138
+ - spec/lib/config/searcher_spec.rb
143
139
  - spec/lib/libinput-list-devices_unavailable.txt
144
- - spec/lib/libinput_command_spec.rb
145
- - spec/lib/plugin/base_spec.rb
146
- - spec/lib/plugin/buffers/buffer_spec.rb
147
- - spec/lib/plugin/buffers/dummy_buffer.rb
148
- - spec/lib/plugin/buffers/gesture_buffer_spec.rb
140
+ - spec/lib/config_spec.rb
141
+ - spec/lib/libinput-list-devices_iberianpig-XPS-9360.txt
142
+ - spec/lib/plugin/executors/command_executor_spec.rb
143
+ - spec/lib/plugin/executors/executor_spec.rb
149
144
  - spec/lib/plugin/detectors/detector_spec.rb
145
+ - spec/lib/plugin/detectors/rotate_detector_spec.rb
150
146
  - spec/lib/plugin/detectors/dummy_detector.rb
151
- - spec/lib/plugin/detectors/hold_detector_spec.rb
152
147
  - spec/lib/plugin/detectors/pinch_detector_spec.rb
153
- - spec/lib/plugin/detectors/rotate_detector_spec.rb
154
148
  - spec/lib/plugin/detectors/swipe_detector_spec.rb
155
- - spec/lib/plugin/events/event_spec.rb
156
- - spec/lib/plugin/events/records/gesture_record_spec.rb
157
- - spec/lib/plugin/events/records/record_spec.rb
158
- - spec/lib/plugin/events/records/text_record_spec.rb
159
- - spec/lib/plugin/executors/command_executor_spec.rb
160
- - spec/lib/plugin/executors/executor_spec.rb
161
- - spec/lib/plugin/filters/filter_spec.rb
162
- - spec/lib/plugin/filters/libinput_filter_spec.rb
149
+ - spec/lib/plugin/detectors/hold_detector_spec.rb
163
150
  - spec/lib/plugin/inputs/input_spec.rb
164
- - spec/lib/plugin/inputs/libinput_command_input_spec.rb
165
151
  - spec/lib/plugin/inputs/timer_input_spec.rb
152
+ - spec/lib/plugin/inputs/libinput_command_input_spec.rb
153
+ - spec/lib/plugin/filters/filter_spec.rb
154
+ - spec/lib/plugin/filters/libinput_filter_spec.rb
155
+ - spec/lib/plugin/base_spec.rb
156
+ - spec/lib/plugin/events/event_spec.rb
157
+ - spec/lib/plugin/events/records/text_record_spec.rb
158
+ - spec/lib/plugin/events/records/record_spec.rb
159
+ - spec/lib/plugin/events/records/gesture_record_spec.rb
160
+ - spec/lib/plugin/buffers/gesture_buffer_spec.rb
161
+ - spec/lib/plugin/buffers/dummy_buffer.rb
162
+ - spec/lib/plugin/buffers/buffer_spec.rb
166
163
  - spec/lib/plugin/manager_spec.rb
167
- - spec/lib/plugin/parsers/libinput_gesture_parser_spec.rb
168
164
  - spec/lib/plugin/parsers/parser_spec.rb
169
- - spec/spec_helper.rb
165
+ - spec/lib/plugin/parsers/libinput_gesture_parser_spec.rb
166
+ - spec/lib/libinput-list-devices_magic_trackpad.txt
167
+ - spec/lib/custom_process_spec.rb
168
+ - spec/lib/device_spec.rb
169
+ - spec/helpers/config_helper.rb