fusuma 0.5.0 → 0.6.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
  SHA1:
3
- metadata.gz: 52d2ebaf25b3a0b1e82f3bc50c819990f0fbfec6
4
- data.tar.gz: 6ef757d69a0ab96ed925e9ea0578b0d6fa8ce977
3
+ metadata.gz: 49c6f9b73bc690856d418150dfd985b1e8437eda
4
+ data.tar.gz: 808e52a847daefb3830808f4952b813149fe0527
5
5
  SHA512:
6
- metadata.gz: ec46e97d16cedc1241a44a47104979bd4d31e8cf08cd97df22567dce29c8c2f67318871b16ddacfb148a5e4e6d88063c02cfbeefed3c88dc875e0416be6d2ff3
7
- data.tar.gz: bc35850b9dd4d699459fb598dbe52ecf802017cba88e02ed960a2c2fd58aca57a315961431b111582e1c31a82c72b3b7dbaf40c4ae03a29ebc3947e9ae2cb16d
6
+ metadata.gz: 53083db2d7c526f3273117d873a6364b3ffa94564ac5540d4652274008f49cda884737a5c869ca4fe76dcc9b352f0442036c160d7686ee8012ebb7a63ec84558
7
+ data.tar.gz: c2b7d32ff632d7a26f6c1e81bfda9c08da504b5ac4a04ce678316e62b5e324ca0156864dce613fb68e0039647340393bb1973ee977a928bd60691d2b3a1f87d8
data/README.md CHANGED
@@ -127,6 +127,7 @@ If the swipe's interval is `0.5`, shorten swipe-interval by half to recognize a
127
127
  * `-c`, `--config=path/to/file` : Use an alternative config file
128
128
  * `-d`, `--daemon` : Daemonize process
129
129
  * `-v`, `--verbose` : Show details about the results of running fusuma
130
+ * `--version` : Show fusuma version
130
131
 
131
132
  ## Contributing
132
133
 
data/exe/fusuma CHANGED
@@ -7,20 +7,29 @@ option = {}
7
7
  OptionParser.new do |opt|
8
8
  opt.on('-c',
9
9
  '--config=path/to/file',
10
- 'Use an alternative config file') do |c|
11
- option[:config] = c
10
+ 'Use an alternative config file') do |config|
11
+ option[:config] = config
12
12
  end
13
13
 
14
14
  opt.on('-d',
15
15
  '--daemon',
16
- 'Daemonize process') do |d|
17
- option[:daemon] = d
16
+ 'Daemonize process') do |daemon|
17
+ option[:daemon] = daemon
18
18
  end
19
19
 
20
20
  opt.on('-v',
21
21
  '--verbose',
22
- 'Shows details about the results of running fusuma') do |v|
23
- option[:verbose] = v
22
+ 'Show details about the results of running fusuma') do |verbose|
23
+ option[:verbose] = verbose
24
+ end
25
+
26
+ opt.on('--version',
27
+ 'Show fusuma version') do |_version|
28
+ puts "Fusuma: #{Fusuma::VERSION}"
29
+ puts "OS: #{`uname -rsv`}"
30
+ puts "Distribution: #{`cat /etc/issue`}"
31
+ puts "Desktop session: #{`echo $DESKTOP_SESSION`}"
32
+ exit 0
24
33
  end
25
34
 
26
35
  opt.parse!(ARGV)
@@ -23,6 +23,7 @@ module Fusuma
23
23
  end
24
24
 
25
25
  def read_options(option)
26
+ option.fetch(:version, nil)
26
27
  config_path = option.fetch(:config, nil)
27
28
  if config_path
28
29
  Config.instance.custom_path = config_path
@@ -10,7 +10,7 @@ module Fusuma
10
10
  MultiLogger.debug(device_names: device_names)
11
11
  raise 'Touchpad is not found' if device_names.empty?
12
12
  @names = device_names
13
- rescue => ex
13
+ rescue RuntimeError => ex
14
14
  MultiLogger.error(ex.message)
15
15
  exit 1
16
16
  end
@@ -1,3 +1,3 @@
1
1
  module Fusuma
2
- VERSION = '0.5.0'.freeze
2
+ VERSION = '0.6.0'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fusuma
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - iberianpig