wiot-agent-hd 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: fcf490e1d28ca74f01d7dff87e5587cbb05a49ee
4
- data.tar.gz: 0d140148bca440a19463af62fb320a1ad812a828
3
+ metadata.gz: 486266af18cf359da6fd1715e371dd54ade2f11f
4
+ data.tar.gz: f41a349c0e49c7ac5cd6013da54a77ab3b6dbc59
5
5
  SHA512:
6
- metadata.gz: 7fef481957f86342692ce9bfbdf047d022feb39bc39fae3c4f3cfc6511b13d6196072f77668524dec4cdec9f8359bc544b5c818ac8ce1b3f957797bb35327cf8
7
- data.tar.gz: a76753bba19ca0bf56608ee97186061a870110c6d371bc4edd6ea303954ead91aefff2255be7d994f6e04ec453b2f58e8fe6064791369f0c75d1e0ebfd61d43f
6
+ metadata.gz: fd138efe72f4490d4f2b83261b185b0869a45ce3444e37de86d313ac7c891edb19a596f7e8710a5ff045b53ce9985ca5b645ca118232d0e747385af386a8448d
7
+ data.tar.gz: 3c89a0ed745240fad75fc10bdd52a838e7a5a9faa4319e46eecf7f63821daa7c541e2d9bccdfd790b6ef9bac7e940c5db03c8174fd48bb833919c7406bc10775
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- wiot-agent-hd (0.1.2)
4
+ wiot-agent-hd (0.1.3)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -1,14 +1,47 @@
1
+ require 'optparse'
2
+ require 'version'
3
+
1
4
  module WiotAgentHd
2
5
  module CLI
3
6
 
4
- NoOptionsError = Class.new(StandardError)
5
-
6
7
  def self.parse_options(args=ARGV)
7
- puts "Parse options WiotAgentHd ..."
8
+ options = {api_key: nil, space: nil, project: nil}
9
+
10
+ parser = OptionParser.new do|opts|
11
+ opts.banner = "Usage: wiot-agent-hd [options]"
12
+
13
+ # Mandatory argument.
14
+
15
+ opts.on('-a', '--api-key api_key', 'The API Key') do |api_key|
16
+ options[:api_key] = api_key;
17
+ end
18
+
19
+ opts.on('-s', '--space space', 'The Space') do |space|
20
+ options[:space] = space;
21
+ end
22
+
23
+ opts.on('-p', '--project project', 'The Project') do |project|
24
+ options[:project] = project;
25
+ end
26
+
27
+ opts.on_tail('-h', '--help', 'Displays Help') do
28
+ puts opts
29
+ exit
30
+ end
31
+
32
+ # Another typical switch to print the version.
33
+ opts.on_tail('-v', '--version', 'Show version') do
34
+ puts WiotAgentHd::VERSION
35
+ exit
36
+ end
37
+ end
38
+
39
+ parser.parse!(args)
40
+ options
8
41
  end
9
42
 
10
43
  def self.start(opts)
11
- puts "Start WiotAgentHd ..."
44
+ puts opts
12
45
  end
13
46
 
14
47
  end
@@ -1,3 +1,3 @@
1
1
  module WiotAgentHd
2
- VERSION = '0.1.3'
2
+ VERSION = '0.1.4'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wiot-agent-hd
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
  - gorums
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-01-14 00:00:00.000000000 Z
11
+ date: 2017-01-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler