fusuma 0.1.6 → 0.1.7

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: c97f29eff3da248cc5d993658b7d7c1f65783835
4
- data.tar.gz: 6b4184e29a53cacae4f81ffda69ec2ea3dfc5e08
3
+ metadata.gz: 26e39da7f47ffacd4695bdb7d8a89c92e835eabc
4
+ data.tar.gz: 3632d10aca588e0399de163e971e98c868a09e41
5
5
  SHA512:
6
- metadata.gz: faf8f9d4906ca1a807525bcc4622ddc04eb987085923ceee953fac51db364043646937ac51c6426e5512da2cb137b49a4d25c3cf7e1eaa70edc75595f5ce6a9d
7
- data.tar.gz: 5c9a364c55c020083bf67764d164401653f159c0359cadec01a6e6b8ec0887645c3bd7c6506494154650dfa2f6676ceecf2f6d62b2b9a03cff20ec545fa00ad5
6
+ metadata.gz: cdb4a21360fc385b6d4961c56bf045d912df79381f3cb1c7fb723b6bee3040f46239c6dd7cebb630a389087ca00b1466d3bd37a4239eacefc171d52635cd50ac
7
+ data.tar.gz: b4c7bf2e5a4aa3304c1491b5b73b82a2b457eca51c058758aefeda03ad358f5e0bd95cf503423a6a34e323cd3406cd0e71e0f208686ddb4808abeae9b094c685
data/exe/fusuma CHANGED
@@ -2,5 +2,5 @@
2
2
 
3
3
  require_relative '../lib/fusuma'
4
4
 
5
- options = ARGV.getopts('v')
6
- Fusuma::Runner.run(v: options['v'])
5
+ options = ARGV.getopts('hv')
6
+ Fusuma::Runner.run(v: options['v'], h: options['h'])
@@ -14,12 +14,31 @@ require 'optparse'
14
14
  module Fusuma
15
15
  # main class
16
16
  class Runner
17
- def self.run(args = {})
18
- debug = args.fetch(:v, false)
19
- MultiLogger.instance.debug_mode = true if debug
20
- instance = new
21
- MultiLogger.debug('Enable debug lines')
22
- instance.read_libinput
17
+ class << self
18
+ def run(args = {})
19
+ read_options(args)
20
+ return if @stop
21
+ instance = new
22
+ instance.read_libinput
23
+ end
24
+
25
+ def read_options(args)
26
+ debug = args.fetch(:v, false)
27
+ help = args.fetch(:h, false)
28
+ MultiLogger.instance.debug_mode = true if debug
29
+ @stop = if help
30
+ print_help
31
+ true
32
+ else
33
+ false
34
+ end
35
+ end
36
+
37
+ def print_help
38
+ puts 'Options:
39
+ -h, print this help.
40
+ -v, print to STDOUT with debug mode.'
41
+ end
23
42
  end
24
43
 
25
44
  def read_libinput
@@ -1,3 +1,3 @@
1
1
  module Fusuma
2
- VERSION = '0.1.6'.freeze
2
+ VERSION = '0.1.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.1.6
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - iberianpig
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-12-07 00:00:00.000000000 Z
11
+ date: 2016-12-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler