nexposecli 0.3.5 → 0.3.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/nexposecli +15 -3
- data/lib/nexposecli/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: 976593240066ff9ba83acd5b90348036d03daf2a
|
4
|
+
data.tar.gz: 1ed2fccb5f0c603bbee957f83a7735ea58a6af73
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 573438283544458561bf1f44494ceb64da10df67c5f81f93d8a5ab161f530d67d4c1292c8b4a9ecb0e7c878bd857f78030b95b8be0498440f8850cb48fe4e465
|
7
|
+
data.tar.gz: c549af274cac86bc03bebb550dd541ce1e520b86896f0fc7ef86a1473e7a460ca7d9b76438018c444e4187e0a44fe6f98c392e2eb6fcfcf28b5a52db723a9475
|
data/bin/nexposecli
CHANGED
@@ -109,16 +109,28 @@ end
|
|
109
109
|
def read_config(conf)
|
110
110
|
# add check for file existence and perms
|
111
111
|
config = YAML.load_file(conf)
|
112
|
+
begin
|
113
|
+
if config["config"].key?("server")
|
114
|
+
@nsc_server = config["config"]["server"]
|
115
|
+
else
|
116
|
+
puts "The config yaml file does not contain a valid [server] parameter.\nPlease confirm the yaml file is well-formed and complete."
|
117
|
+
exit(-1)
|
118
|
+
end
|
119
|
+
rescue NoMethodError => e
|
120
|
+
puts "The config yaml file does not to be well-formed and complete.\nThe config: appears to be null.\nPlease edit the config file and try again."
|
121
|
+
STDERR.puts "ERROR [ " + e.to_s + " ]"
|
122
|
+
exit(-1)
|
123
|
+
end
|
112
124
|
|
113
|
-
@nsc_server = config["config"]["server"]
|
114
125
|
if config["config"].key?("port")
|
115
126
|
@nsc_port = config["config"]["port"]
|
116
127
|
else
|
117
128
|
@nsc_port = $nxport
|
118
129
|
end
|
119
130
|
@nsc_user = config["config"]["user"]
|
120
|
-
|
121
|
-
|
131
|
+
if config["config"].key?("password")
|
132
|
+
@nsc_passwd = config["config"]["password"]
|
133
|
+
else
|
122
134
|
puts "A console password was not provided via config file.\nWhat password shall I use?"
|
123
135
|
@nsc_passwd = STDIN.noecho(&:gets).chomp
|
124
136
|
end
|
data/lib/nexposecli/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nexposecli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Erik Gomez
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2017-04-
|
12
|
+
date: 2017-04-05 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: nexpose
|