enfcli 3.9.5.pre.beta → 3.9.6.pre.beta

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 85e9a5ecc5abe6b44bb23e914ff2b9e5efb53b072034ee19946988de53ddc50b
4
- data.tar.gz: cedd488ea699962388562e113c67efc85bd02c897e1c6ce003c2026476492c96
3
+ metadata.gz: c836073fa8165cb90c99b1935e062801b6f8f192b24e6609c6144453b49a8e12
4
+ data.tar.gz: fb0fee350a8dc9312f8280de04c5ca96db9cb548064d8924fa669a7ba85e4f00
5
5
  SHA512:
6
- metadata.gz: 8c8c2aeae84d7eeac54bddb320e80c816d74e27ef998403e3fff8ca6156dd9ddc8465815cf1e7b4584dfc3b85423d62c7f877dd517cf61b38cfb5c46e237267b
7
- data.tar.gz: 149ee78c1a031bcc13949e0edcfbe9e10fa2fabb94feb1c01efe17250b3232b90d054dfd5ca5578b590147a537106a0e43d4b4cd7ac11b3b406f48f351344bd5
6
+ metadata.gz: 490d4201d5e8bfc2ef6333e7f7a95273a56edf412272345c57c087ef2bb94c3a3b72dafb8d4426393d472c8d15ca941bb5eb3a228d6bab2b7c297d74365f458a
7
+ data.tar.gz: 5e96903a0f9a25cb5a1e5720fe699b6d125e02ce581483e775f32fb91987aaa0b7f406eb5ab0f4e18015fd349682b8b8ee2ea0f9b17f2052ab74924323687c5b
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- enfcli (3.9.5.pre.beta)
4
+ enfcli (3.9.6.pre.beta)
5
5
  rest-client (~> 2.0)
6
6
  terminal-table
7
7
  thor (~> 0.20.0)
@@ -24,9 +24,9 @@ GEM
24
24
  http-accept (1.7.0)
25
25
  http-cookie (1.0.3)
26
26
  domain_name (~> 0.5)
27
- mime-types (3.2.2)
27
+ mime-types (3.3)
28
28
  mime-types-data (~> 3.2015)
29
- mime-types-data (3.2019.0331)
29
+ mime-types-data (3.2019.1009)
30
30
  netrc (0.11.0)
31
31
  public_suffix (3.0.3)
32
32
  rake (10.5.0)
@@ -285,10 +285,15 @@ module EnfCli
285
285
  class Console
286
286
  class << self
287
287
  def execute(input)
288
- argv = input.split(" ")
289
- EnfCli::Shell::CLI.start( argv )
288
+ # split on space and = but leave quoted together.
289
+ argv = input.split(/[\s=](?=(?:[^"]|"[^"]*")*$)/)
290
+ # now remove quotes.
291
+ argv.each do |arg|
292
+ arg.gsub!(/\A"|"\Z/, '')
293
+ end
294
+ EnfCli::Shell::CLI.start(argv)
290
295
  end
291
-
296
+
292
297
  def start(host, user)
293
298
  $stdout.sync = true
294
299
  # Set prompt
@@ -45,12 +45,12 @@ module EnfCli
45
45
  end
46
46
 
47
47
  desc 'create-wifi-configuration', 'Create a new wifi configuration.'
48
- method_option :'wifi-config-file', type: :array, required: true,
48
+ method_option :'wifi-config-file', type: :string, required: true,
49
49
  banner: '<file>',
50
50
  desc: '<file> is JSON file with parameters required for configuring the router card.'
51
51
  def create_wifi_configuration
52
52
  try_with_rescue_in_session do
53
- json_file_name = options[:'wifi-config-file'].join(' ')
53
+ json_file_name = options[:'wifi-config-file']
54
54
 
55
55
  # read in the entire file - yes it is slurping the file, but it should
56
56
  # never be bigger than a few KB.
@@ -111,14 +111,14 @@ module EnfCli
111
111
  'Update an existing wifi configuration.'
112
112
  method_option :'wifi-id', defaut: nil, type: :string, banner: 'WIFI-ID',
113
113
  desc: 'WIFI-ID is the UUID of the wifi profile'
114
- method_option :'wifi-config-file', type: :array, required: true,
114
+ method_option :'wifi-config-file', type: :string, required: true,
115
115
  banner: '<file>',
116
116
  desc: '<file> is JSON file with ' \
117
117
  'parameters required for ' \
118
118
  'configuring the router card.'
119
119
  def update_wifi_configuration
120
120
  try_with_rescue_in_session do
121
- json_file_name = options[:'wifi-config-file'].join(' ')
121
+ json_file_name = options[:'wifi-config-file']
122
122
  # read in the entire file - yes it is slurping the file, but it should
123
123
  # never be bigger than a few KB.
124
124
  content = File.read json_file_name
@@ -264,9 +264,10 @@ module EnfCli
264
264
  desc: 'WIFI-ID is the UUID of the wifi record that the profile will use. wifi record must already exist'
265
265
  def create_profile
266
266
  try_with_rescue_in_session do
267
+ profile_name = options[:'profile-name']
267
268
  new_profile_hash = {
268
- name: options[:'profile-name'],
269
- config: {mode: options[:'device-mode']}
269
+ name: profile_name,
270
+ config: { mode: options[:'device-mode'] }
270
271
  }
271
272
 
272
273
  wifi = options[:'wifi-id']
@@ -14,5 +14,5 @@
14
14
  # limitations under the License.
15
15
  #
16
16
  module EnfCli
17
- VERSION = '3.9.5-beta'
17
+ VERSION = '3.9.6-beta'
18
18
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: enfcli
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.9.5.pre.beta
4
+ version: 3.9.6.pre.beta
5
5
  platform: ruby
6
6
  authors:
7
7
  - Venkatakumar Srinivasan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-10-01 00:00:00.000000000 Z
11
+ date: 2019-10-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor