fusuma 2.0.0.pre2 → 2.0.0

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: 6f7ab066b275d3d5bdf59d18a948d297d0e164f71d0611e6f999c71d962a8f6d
4
- data.tar.gz: f92ff70084e6b98482236b67b2f2c68d7424f7cb8ff1e9ad6b61f4a7d4bea244
3
+ metadata.gz: c8b830de9940632862b66b2cd6dbd6cf9ead713a24d7913d31baae7baacef348
4
+ data.tar.gz: e55c53522a2184c8e6197bc12c4ca203cd844f1277dafbfe02fde48ae8f0d8c6
5
5
  SHA512:
6
- metadata.gz: 885b781c3ec389cc6e37a68eb0799044e8792587145875d7c3facb59dc3a003cd53c4beb9d2a539f534f4947b2a5cf4d43442a9d3a0dba929744881feac7607c
7
- data.tar.gz: a79c1f4390694af343cb98901f30916c32642ff5318181a8191c855997eff64aea3dc4a88f02b51a7bfb2565ac7037965bb2816b24141eab6bcd6a23f9ce04dc
6
+ metadata.gz: 8153cf247654a3b70f976f74b0c3d791a962185fec288286f625448e8c23c6b53e134acff8d2ebad51eebdd51fefe8539a8da11c5abbd7744b90f6f943b3316e
7
+ data.tar.gz: 5065d471bfa721b9e973ac276ffb60db09ed1a5e4f967fa8dd7010856d6709b9c44ea3b9cd5fab82c2b2ae2467a0b072f14a3c779db331abbcda1b9fa479a276
data/fusuma.gemspec CHANGED
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
10
10
  spec.authors = ['iberianpig']
11
11
  spec.email = ['yhkyky@gmail.com']
12
12
 
13
- spec.summary = 'Multitouch gestures with libinput driver on X11, Linux'
13
+ spec.summary = 'Multitouch gestures with libinput driver, Linux'
14
14
  spec.description = 'Fusuma is multitouch gesture recognizer. This gem makes your touchpad on Linux able to recognize swipes or pinchs and assign command to them. Read installation on Github(https://github.com/iberianpig/fusuma#installation).'
15
15
  spec.homepage = 'https://github.com/iberianpig/fusuma'
16
16
  spec.license = 'MIT'
@@ -32,6 +32,8 @@ module Fusuma
32
32
  end
33
33
 
34
34
  def search_with_context(index, location:, context:)
35
+ return nil if location.nil?
36
+
35
37
  return search(index, location: location[0]) if context == {}
36
38
 
37
39
  new_location = location.find do |conf|
data/lib/fusuma/device.rb CHANGED
@@ -36,9 +36,9 @@ module Fusuma
36
36
  # sort devices by capabilities of gesture
37
37
  # @return [Array]
38
38
  def all
39
- @all ||= fetch_devices.sort_by do |d|
40
- d.capabilities.match(/gesture/).to_s
41
- end
39
+ @all ||= fetch_devices.partition do |d|
40
+ d.capabilities.match?(/gesture/)
41
+ end.flatten
42
42
  end
43
43
 
44
44
  # @raise [SystemExit]
@@ -20,6 +20,7 @@ module Fusuma
20
20
  libinput_command = Plugin::Inputs::LibinputCommandInput.new.command
21
21
  MultiLogger.info "Fusuma: #{VERSION}"
22
22
  MultiLogger.info "libinput: #{libinput_command.version}"
23
+ MultiLogger.info "ruby #{ RUBY_VERSION }p#{ RUBY_PATCHLEVEL }"
23
24
  MultiLogger.info "OS: #{`uname -rsv`}".strip
24
25
  MultiLogger.info "Distribution: #{`cat /etc/issue`}".strip
25
26
  MultiLogger.info "Desktop session: #{`echo $DESKTOP_SESSION $XDG_SESSION_TYPE`}".strip
@@ -60,7 +60,7 @@ module Fusuma
60
60
  elsif which('libinput-list-devices')
61
61
  'libinput-list-devices --version'
62
62
  else
63
- MultiLogger.error 'install libinput-tools'
63
+ MultiLogger.error 'Please install libinput-tools'
64
64
  exit 1
65
65
  end
66
66
  end
@@ -25,6 +25,7 @@ module Fusuma
25
25
  warn "#{input.class.name}: #{e}"
26
26
  warn 'Send SIGKILL to fusuma processes'
27
27
  inputs.reject { |i| i == input }.each do |i|
28
+ warn "stop process: #{i.class.name.underscore}"
28
29
  Process.kill(:SIGKILL, i.pid)
29
30
  end
30
31
  exit 1
@@ -21,8 +21,19 @@ module Fusuma
21
21
  def require_siblings_from_gems
22
22
  search_key = File.join(plugin_dir_name, '*.rb')
23
23
  Gem.find_latest_files(search_key).each do |siblings_plugin|
24
- if siblings_plugin =~ %r{fusuma-plugin-(.+).*/lib/#{plugin_dir_name}/\1_.+.rb}
24
+ next unless siblings_plugin =~ %r{fusuma-plugin-(.+).*/lib/#{plugin_dir_name}/\1_.+.rb}
25
+
26
+ match_data = siblings_plugin.match(%r{(.*)/(.*)/lib/(.*)})
27
+ gemspec_path = Dir.glob("#{match_data[1]}/#{match_data[2]}/*.gemspec").first
28
+ raise "Not Found: #{match_data[1]}/#{match_data[2]}/*.gemspec" unless gemspec_path
29
+
30
+ gemspec = Gem::Specification.load gemspec_path
31
+ fusuma_gemspec = Gem::Specification.load File.expand_path('../../../fusuma.gemspec',
32
+ __dir__)
33
+ if gemspec.dependencies.find { |d| d.name == 'fusuma' }&.match?(fusuma_gemspec)
25
34
  require siblings_plugin
35
+ else
36
+ MultiLogger.warn "#{gemspec.name} #{gemspec.version} is incompatible with running #{fusuma_gemspec.name} #{fusuma_gemspec.version}"
26
37
  end
27
38
  end
28
39
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Fusuma
4
- VERSION = '2.0.0.pre2'
4
+ VERSION = '2.0.0'
5
5
  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.0.pre2
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - iberianpig
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-03-29 00:00:00.000000000 Z
11
+ date: 2021-04-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: posix-spawn
@@ -101,7 +101,7 @@ licenses:
101
101
  - MIT
102
102
  metadata:
103
103
  yard.run: yri
104
- post_install_message:
104
+ post_install_message:
105
105
  rdoc_options: []
106
106
  require_paths:
107
107
  - lib
@@ -112,12 +112,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
112
112
  version: 2.5.1
113
113
  required_rubygems_version: !ruby/object:Gem::Requirement
114
114
  requirements:
115
- - - ">"
115
+ - - ">="
116
116
  - !ruby/object:Gem::Version
117
- version: 1.3.1
117
+ version: '0'
118
118
  requirements: []
119
- rubygems_version: 3.2.15
120
- signing_key:
119
+ rubygems_version: 3.1.4
120
+ signing_key:
121
121
  specification_version: 4
122
- summary: Multitouch gestures with libinput driver on X11, Linux
122
+ summary: Multitouch gestures with libinput driver, Linux
123
123
  test_files: []