libvirt_ffi 0.5.1 → 0.5.2

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: 2685f9b26b91cc3365a0552374160ab1448e96b122a65f2e2350bf11811230d7
4
- data.tar.gz: b89251ca7af3dac7275384f59bd2b93ce93bd7473c1c15ab3302ddad2a021212
3
+ metadata.gz: 4d8688af0ed128266c17bf8048e3c3d570df7c99bee5eda4b891ccf4fef34992
4
+ data.tar.gz: ec56f38a36470d403b345b6787130e28c75e594a323d704e7df714cba1f122fb
5
5
  SHA512:
6
- metadata.gz: 791f213bfff0092f762ba0e87f3cf1eacb319f8b4530854f9d6bf20dab76b29a47eedb6f582d2c1f9fb8ff94a6f4c26226d3c2f170cb03a173fe16f33d73bb5b
7
- data.tar.gz: 803d55a39f54fc9ab52affb71dad317957626614c3f9fc6edbbfce9ecaef038be74de52a011a6d79b501a6cc177f85c874cedb0339fa23fd61eec28e5a7b6d67
6
+ metadata.gz: 9045b8acca247352c607417cac3108ffb5e44bc4383b56659c6cd6b34f9c0e8fdba4e2c1872fdc53aa44c3fa641814e3abeb64e2d5ceeb8cff044a75bab80429
7
+ data.tar.gz: 5da8c3e8dbb676956355d3271785fc85adf6a2d156dfcb3d81e02ffb151cf6bf73761aa2927460d35c63ad15e7693d1e0f3bcd601d4c9b70b6f09f0bf24a6faf
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Libvirt
4
- VERSION = '0.5.1'
4
+ VERSION = '0.5.2'
5
5
  end
@@ -14,7 +14,7 @@ module Libvirt
14
14
  attribute :description
15
15
  attribute :metadata, type: :raw
16
16
  attribute :vcpu, type: :struct, class: MaxVcpu
17
- attribute :vcpus, type: :struct, array: true, class: Vcpu, cast: ->(objects) { objects.sort_by(&:id) }
17
+ attribute :vcpus, type: :struct, array: true, class: Vcpu, cast: ->(objects, _) { objects.sort_by(&:id) }
18
18
  attribute :memory, type: :struct, class: Memory
19
19
  attribute :current_memory, type: :struct, class: Memory
20
20
  attribute :max_memory, type: :struct, class: Memory
@@ -167,7 +167,7 @@ module Libvirt
167
167
  def parse_node_text(name, opts)
168
168
  nodes = find_nodes(name, opts)
169
169
 
170
- nodes.map(&:text) if opts[:array]
170
+ return nodes.map(&:text) if opts[:array]
171
171
 
172
172
  node = nodes.first
173
173
  return if node.nil?
@@ -179,7 +179,7 @@ module Libvirt
179
179
  nodes = find_nodes name, { path: :root }.merge(opts)
180
180
  value_name = opts[:name]&.to_sym || name
181
181
 
182
- nodes.map { |node| node[value_name.to_s] } if opts[:array]
182
+ return nodes.map { |node| node[value_name.to_s] } if opts[:array]
183
183
 
184
184
  node = nodes.first
185
185
  return if node.nil?
@@ -193,7 +193,7 @@ module Libvirt
193
193
 
194
194
  nodes = find_nodes(name, opts)
195
195
 
196
- nodes.map { |node| klass.new(node) } if opts[:array]
196
+ return nodes.map { |node| klass.new(node) } if opts[:array]
197
197
 
198
198
  node = nodes.first
199
199
  return if node.nil?
@@ -204,7 +204,7 @@ module Libvirt
204
204
  def parse_node_raw(name, opts)
205
205
  nodes = find_nodes(name, opts)
206
206
 
207
- nodes.map(&:to_xml) if opts[:array]
207
+ return nodes.map(&:to_xml) if opts[:array]
208
208
 
209
209
  node = nodes.first
210
210
  return if node.nil?
@@ -218,7 +218,7 @@ module Libvirt
218
218
  if opts[:array]
219
219
  return [] if nodes.empty?
220
220
 
221
- nodes.map { |node| Util.parse_memory node.text, node['unit'] }
221
+ return nodes.map { |node| Util.parse_memory node.text, node['unit'] }
222
222
  end
223
223
 
224
224
  node = nodes.first
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: libvirt_ffi
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.1
4
+ version: 0.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Denis Talakevich
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-03-22 00:00:00.000000000 Z
11
+ date: 2020-03-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ffi