opennebula-cli 5.4.10 → 5.4.11

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/cli_helper.rb +4 -3
  3. metadata +4 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 75531218f80b81b799b8bb8068ad14d654a6d496
4
- data.tar.gz: 85a187a6d51a830b50e0dfc032e87898a160b5b9
3
+ metadata.gz: 8479e08d5bbb017e1bab962da4c6f6ba0dcdcd3d
4
+ data.tar.gz: 2a3c29cc0229811a8a7fec94c8f1cc03a4ebf613
5
5
  SHA512:
6
- metadata.gz: ebff8850b441da03e916f5a85672468ac0870abed284871a655b7b3a5af525bdd821504bbbd487d8e022dde9fd7a45b360c6f8eca23c258fefae7cb3b4215da2
7
- data.tar.gz: 9f9cf4c4fae6b2b552d20568675d1c9529ce79577b65a28109b9989c9406e7cd2b9d6390f6ecb49d6ad558ee824e7d86fe230da88cdbee37cb85bfb55f7d09c4
6
+ metadata.gz: d9a26e79bfc1fe8e58fbd594858f57c06dd2aeb356d8fc283c074a49a0253931fe9183cd9d4e6307017d847c5b725d3fc74a34a5d374ae9aed364e0b06b1d4ab
7
+ data.tar.gz: 51e82c648019d30dfdca010b8c3bc0b9ae7a8108c4c965feae2a7ad5b2fe74f0551f4ef446a66c4428924cfe9923eab1128c65ecf574e7111ce98b8c202229c5
data/lib/cli_helper.rb CHANGED
@@ -369,7 +369,7 @@ module CLIHelper
369
369
  def filter_data!(data, filter)
370
370
  # TBD: add more operators
371
371
  # operators=/(==|=|!=|<|<=|>|>=)/
372
- operators=/(=)/
372
+ operators=/(=|!=)/
373
373
 
374
374
  stems=filter.map do |s|
375
375
  m=s.match(/^(.*?)#{operators}(.*?)$/)
@@ -394,11 +394,12 @@ module CLIHelper
394
394
  end
395
395
  end
396
396
 
397
- data.reject! do |d|
397
+ data.select! do |d|
398
398
  pass=true
399
399
 
400
400
  stems.each do |s|
401
- if d[s[:index]]!=s[:right]
401
+
402
+ if d[s[:index]].public_send(s[:operator] == "=" ? "==" : s[:operator], s[:right])
402
403
  pass=false
403
404
  break
404
405
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: opennebula-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.4.10
4
+ version: 5.4.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - OpenNebula
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-04-03 00:00:00.000000000 Z
11
+ date: 2018-04-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: opennebula
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 5.4.10
19
+ version: 5.4.11
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 5.4.10
26
+ version: 5.4.11
27
27
  description: Commands used to talk to OpenNebula
28
28
  email: contact@opennebula.org
29
29
  executables: