fusuma 1.4.0 → 1.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: f16929054076669742906dca54ea4cc907c5b4adb12d6454261dce202baa5280
4
- data.tar.gz: '08cbb875607091af2b3ae0a27f96bb735532527f4e64df534f19dda6c0ea74af'
3
+ metadata.gz: dd4670c6b29d118e7663736911b14298e526c3cea9a7886032b45f3f1f6aafed
4
+ data.tar.gz: 5b68ab3340e02aa3ed85b7985a8a58007d5567a81871c28465210d8e04561998
5
5
  SHA512:
6
- metadata.gz: '08fa7c0802ba80260e7c3c7a06e3509d363d314cb49618c8af728f1eb5ee33bc44f9c71f4197d010485583d6c251eb8796c2e62fa30aa81a6bb6124ec0d73caf'
7
- data.tar.gz: a01441b1995ec469729deb899c68ff54955a0b4083d943ee137f293d7b0b0202f186263d47dd3f96d1a3f1257686a5394677a8da667311b05870606bfc9ba9f3
6
+ metadata.gz: 4776baf12386df866c0034cc7c6b2e9deeffdc33f59c651ec03fcb53a385306a221e8ac01f4b261d197488d9895e688b31fa97801daf3c621079c1d452319a0d
7
+ data.tar.gz: c2bd43b3afe5748b8feaeec9a81b00c1753332d8abe239e7ef0a0a3305463004dd4210385f29e2a0cfe34853a8a0f2582a8984d35d90b05ee4acc592562931d1
@@ -1,8 +1,8 @@
1
1
  # Changelog
2
2
 
3
- ## [Unreleased](https://github.com/iberianpig/fusuma/tree/HEAD)
3
+ ## [v1.4.0](https://github.com/iberianpig/fusuma/tree/v1.4.0) (2020-02-18)
4
4
 
5
- [Full Changelog](https://github.com/iberianpig/fusuma/compare/v1.3.3...HEAD)
5
+ [Full Changelog](https://github.com/iberianpig/fusuma/compare/v1.3.3...v1.4.0)
6
6
 
7
7
  **Closed issues:**
8
8
 
@@ -53,6 +53,7 @@
53
53
  **Merged pull requests:**
54
54
 
55
55
  - Merge modifier event records [\#142](https://github.com/iberianpig/fusuma/pull/142) ([iberianpig](https://github.com/iberianpig))
56
+ - Update rake requirement from ~\> 12.3 to ~\> 13.0 [\#136](https://github.com/iberianpig/fusuma/pull/136) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
56
57
 
57
58
  ## [v1.2.1](https://github.com/iberianpig/fusuma/tree/v1.2.1) (2019-10-19)
58
59
 
@@ -80,7 +81,6 @@
80
81
 
81
82
  **Merged pull requests:**
82
83
 
83
- - Update rake requirement from ~\> 12.3 to ~\> 13.0 [\#136](https://github.com/iberianpig/fusuma/pull/136) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
84
84
  - Fixed Spelling mistake [\#128](https://github.com/iberianpig/fusuma/pull/128) ([thomascrha](https://github.com/thomascrha))
85
85
  - \[Readme\] Added step to install Ruby [\#127](https://github.com/iberianpig/fusuma/pull/127) ([mmoraes-rafael](https://github.com/mmoraes-rafael))
86
86
  - Plugin Based Architecture [\#116](https://github.com/iberianpig/fusuma/pull/116) ([iberianpig](https://github.com/iberianpig))
@@ -28,6 +28,10 @@ module Fusuma
28
28
  @last_time ||= Time.now
29
29
  end
30
30
 
31
+ def first_time?
32
+ @last_time.nil?
33
+ end
34
+
31
35
  def tag
32
36
  self.class.name.split('Detectors::').last.underscore
33
37
  end
@@ -66,15 +66,11 @@ module Fusuma
66
66
 
67
67
  def enough_interval?(index:)
68
68
  return true if first_time?
69
- return true if (Time.now - @last_time) > interval_time(index: index)
69
+ return true if (Time.now - last_time) > interval_time(index: index)
70
70
 
71
71
  false
72
72
  end
73
73
 
74
- def first_time?
75
- !@last_time
76
- end
77
-
78
74
  def threshold(index:)
79
75
  @threshold ||= {}
80
76
  @threshold[index.cache_key] ||= begin
@@ -63,15 +63,11 @@ module Fusuma
63
63
 
64
64
  def enough_interval?(index:)
65
65
  return true if first_time?
66
- return true if (Time.now - @last_time) > interval_time(index: index)
66
+ return true if (Time.now - last_time) > interval_time(index: index)
67
67
 
68
68
  false
69
69
  end
70
70
 
71
- def first_time?
72
- !@last_time
73
- end
74
-
75
71
  def threshold(index:)
76
72
  @threshold ||= {}
77
73
  @threshold[index.cache_key] ||= begin
@@ -64,15 +64,11 @@ module Fusuma
64
64
 
65
65
  def enough_interval?(index:)
66
66
  return true if first_time?
67
- return true if (Time.now - @last_time) > interval_time(index: index)
67
+ return true if (Time.now - last_time) > interval_time(index: index)
68
68
 
69
69
  false
70
70
  end
71
71
 
72
- def first_time?
73
- !@last_time
74
- end
75
-
76
72
  def threshold(index:)
77
73
  @threshold ||= {}
78
74
  @threshold[index.cache_key] ||= begin
@@ -13,7 +13,8 @@ module Fusuma
13
13
  'device': [String],
14
14
  'enable-dwt': [TrueClass, FalseClass],
15
15
  'enable-tap': [TrueClass, FalseClass],
16
- 'show-keycodes': [TrueClass, FalseClass]
16
+ 'show-keycodes': [TrueClass, FalseClass],
17
+ 'verbose': [TrueClass, FalseClass]
17
18
  }
18
19
  end
19
20
 
@@ -94,11 +95,13 @@ module Fusuma
94
95
  enable_tap = '--enable-tap' if config_params(:'enable-tap')
95
96
  enable_dwt = '--enable-dwt' if config_params(:'enable-dwt')
96
97
  show_keycodes = '--show-keycodes' if config_params(:'show-keycodes')
98
+ verbose = '--verbose' if config_params(:verbose)
97
99
  [
98
100
  device,
99
101
  enable_dwt,
100
102
  enable_tap,
101
- show_keycodes
103
+ show_keycodes,
104
+ verbose
102
105
  ].compact
103
106
  end
104
107
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Fusuma
4
- VERSION = '1.4.0'
4
+ VERSION = '1.4.1'
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: 1.4.0
4
+ version: 1.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: 2020-02-18 00:00:00.000000000 Z
11
+ date: 2020-02-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler