dht-sensor-ffi 0.1.3 → 0.1.4

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: f140802288ae740ead1b70bdbd8fd8097d169a43
4
- data.tar.gz: 00804f9440730e69bb3d74c2be974911bc23c12e
3
+ metadata.gz: dbc1d4a95e39589649bf1341a5014d3f23d27a9d
4
+ data.tar.gz: 87f8a550c64a0f3705fda712d1da5eba9a5ad2a7
5
5
  SHA512:
6
- metadata.gz: 2d782254a597c44ee4a26b17ccf7aa8d3864e9cd0c76ff4b9eb800b034a9ad42bf866b85e4c3c3c203009d36cb9621f7821de8780aca4cc3cdf324b4ecc9d194
7
- data.tar.gz: 6bcb6c3e3084e32bd0331b0e2eca9fa326ca7870bfd832f867a51267fcf9d2334420ff9f6d55f48847c272e50f054e87f8f5d3486dbd7bf0b4095dc4ba7682e5
6
+ metadata.gz: e9a19f49961728414c9ac5e49fe59c6e91247d3469ff58e6cc1e91595232e7bb7b7caf64003252e958d3db1d89afde1dde10004f9758fbe972507aabfeb949f1
7
+ data.tar.gz: 0968a03243417aa5a13cd9269939b34dc18df49dcd420addd4b9eb2bab80e469e77717d1003034d2a85624977591729a87d63d46c7c4981e8ba5bed42b846e4a
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.3
1
+ 0.1.4
@@ -2,12 +2,12 @@
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
3
  # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
- # stub: dht-sensor-ffi 0.1.3 ruby lib
5
+ # stub: dht-sensor-ffi 0.1.4 ruby lib
6
6
  # stub: ext/extconf.rb
7
7
 
8
8
  Gem::Specification.new do |s|
9
9
  s.name = "dht-sensor-ffi"
10
- s.version = "0.1.3"
10
+ s.version = "0.1.4"
11
11
 
12
12
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
13
13
  s.require_paths = ["lib"]
@@ -2,9 +2,17 @@
2
2
  module DhtSensor
3
3
  class App
4
4
 
5
+ DEFAULT_OPTIONS = {
6
+ :command => :read,
7
+ :pin => 4,
8
+ :type => 22,
9
+ :unit => :c
10
+ }
11
+
5
12
  def run!
6
13
 
7
14
  if ARGV.empty? then
15
+ @options = DEFAULT_OPTIONS.dup
8
16
  do_read()
9
17
  return
10
18
  end
@@ -108,12 +116,7 @@ module DhtSensor
108
116
  end
109
117
 
110
118
  def parse_opts
111
- options = {
112
- :command => :read,
113
- :pin => 4,
114
- :type => 22,
115
- :unit => :c
116
- }
119
+ options = DEFAULT_OPTIONS.dup
117
120
 
118
121
  @opt_parser = OptionParser.new do |opts|
119
122
  opts.banner = "Usage: dht_sensor [command]"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dht-sensor-ffi
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chetan Sarva