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 +4 -4
- data/Gemfile.lock +1 -1
- data/lib/wiot-agent-hd/cli.rb +37 -4
- data/lib/wiot-agent-hd/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 486266af18cf359da6fd1715e371dd54ade2f11f
|
|
4
|
+
data.tar.gz: f41a349c0e49c7ac5cd6013da54a77ab3b6dbc59
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: fd138efe72f4490d4f2b83261b185b0869a45ce3444e37de86d313ac7c891edb19a596f7e8710a5ff045b53ce9985ca5b645ca118232d0e747385af386a8448d
|
|
7
|
+
data.tar.gz: 3c89a0ed745240fad75fc10bdd52a838e7a5a9faa4319e46eecf7f63821daa7c541e2d9bccdfd790b6ef9bac7e940c5db03c8174fd48bb833919c7406bc10775
|
data/Gemfile.lock
CHANGED
data/lib/wiot-agent-hd/cli.rb
CHANGED
|
@@ -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
|
-
|
|
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
|
|
44
|
+
puts opts
|
|
12
45
|
end
|
|
13
46
|
|
|
14
47
|
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.
|
|
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-
|
|
11
|
+
date: 2017-01-16 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|