fusuma 0.2.6 → 0.2.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ab7c21fda1d6f09e06a8ccc3f18e0fe1d8d34aeb
4
- data.tar.gz: 44a05a105bc8bf49e48a11b253642b834793d685
3
+ metadata.gz: 148b3255a66309d6e395563434f329d9d2aa7644
4
+ data.tar.gz: 2aa17df3eccdf7efb2b672ecd1d238a8513d50a7
5
5
  SHA512:
6
- metadata.gz: f4eb4842122e42c0c48ed9db1fac93d8df1dfe12f6eb625a20214d86fe53eda05c4eeddf985995b26009d21ab2543a7f249367542908a619e9ed4677a735ece6
7
- data.tar.gz: cb740e6023def63f2f8b8a1500f9149848e52ad8d048522be601771364b98a5aa69d9a2a3586ad2d857e428e5e388dee01d52dbac57cf71e668c56202e166e36
6
+ metadata.gz: 223772b06f859d05839ba166204d996a844e33772dfc7262e043da3a36fd411ac969dc9576d49bd1ad73d70fed1aa2baf03b42365c2ef24f3289cc8dd714576e
7
+ data.tar.gz: c8e9fd768b01da06eee21c7248159d0bd89c8fdc0cbd51f8929f2e93afe3eca1a3a900270f829ff1c3dcfe95d20221f797dfe80b085f3834fa082310fcef3a98
data/.travis.yml CHANGED
@@ -1,5 +1,8 @@
1
1
  sudo: false
2
2
  language: ruby
3
3
  rvm:
4
+ - 2.0
5
+ - 2.1
6
+ - 2.2
4
7
  - 2.3.1
5
8
  before_install: gem install bundler -v 1.13.2
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)
1
+ # Fusuma [![Gem Version](https://badge.fury.io/rb/fusuma.svg)](https://badge.fury.io/rb/fusuma) [![Build Status](https://travis-ci.org/iberianpig/fusuma.svg?branch=master)](https://travis-ci.org/iberianpig/fusuma)
2
2
 
3
3
  Fusuma is multitouch gesture recognizer.
4
4
  This gem makes your linux PC able to recognize swipes or pinchs and assign shortcuts to them.
@@ -37,7 +37,7 @@ Install Fusuma:
37
37
  ## Customize
38
38
 
39
39
  You can customize the settings for gestures to put and edit `~/.config/fusuma/config.yml`.
40
- *NOTE*: You will need to create the `~.config/fusuma` directory if it doesn't exist yet.
40
+ *NOTE*: You will need to create the `~/.config/fusuma` directory if it doesn't exist yet.
41
41
 
42
42
 
43
43
  ### Sample (default keymap for Elementary OS)
data/fusuma.gemspec CHANGED
@@ -27,4 +27,5 @@ Gem::Specification.new do |spec|
27
27
  spec.add_development_dependency 'pry'
28
28
  spec.add_development_dependency 'pry-byebug'
29
29
  spec.add_development_dependency 'rubocop'
30
+ spec.add_development_dependency 'reek'
30
31
  end
@@ -28,23 +28,23 @@ module Fusuma
28
28
  private
29
29
 
30
30
  def gesture_action_arguments(libinput_line)
31
- action, time, finger_directions = parse_libinput(libinput_line)
32
- finger, move_x, move_y, zoom =
33
- parse_finger_directions(finger_directions)
31
+ action, time, finger, other = parse_libinput(libinput_line)
32
+ move_x, move_y, zoom =
33
+ parse_finger_directions(other)
34
34
  directions = { move: { x: move_x, y: move_y }, zoom: zoom }
35
35
  [time, action, finger, directions]
36
36
  end
37
37
 
38
38
  def parse_libinput(line)
39
- _device, action_time, finger_directions = line.split("\t").map(&:strip)
40
- action, time = action_time.split
41
- [action, time, finger_directions]
39
+ _device, action, time, other = line.strip.split(nil, 4)
40
+ finger, other = other.split(nil, 2)
41
+ [action, time, finger, other]
42
42
  end
43
43
 
44
- def parse_finger_directions(finger_directions_line)
45
- finger_num, move_x, move_y, _, _, _, zoom =
46
- finger_directions_line.tr('/|(|)', ' ').split
47
- [finger_num, move_x, move_y, zoom]
44
+ def parse_finger_directions(line)
45
+ return [] if line.nil?
46
+ move_x, move_y, _, _, _, zoom = line.tr('/|(|)', ' ').split
47
+ [move_x, move_y, zoom]
48
48
  end
49
49
  end
50
50
  end
@@ -1,3 +1,3 @@
1
1
  module Fusuma
2
- VERSION = '0.2.6'.freeze
2
+ VERSION = '0.2.7'.freeze
3
3
  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: 0.2.6
4
+ version: 0.2.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - iberianpig
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-01-22 00:00:00.000000000 Z
11
+ date: 2017-02-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -94,6 +94,20 @@ dependencies:
94
94
  - - ">="
95
95
  - !ruby/object:Gem::Version
96
96
  version: '0'
97
+ - !ruby/object:Gem::Dependency
98
+ name: reek
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
97
111
  description: Fusuma is multitouch gesture recognizer. This gem makes your linux PC
98
112
  able to recognize swipes or pinchs and assign shortcuts to them. Read installation
99
113
  on Github(https://github.com/iberianpig/fusuma#installation).