ovirt 0.7.1 → 0.7.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
  SHA1:
3
- metadata.gz: 71f1b7bb31e4d2232067a664b1a7c69b89ef97f1
4
- data.tar.gz: f64da9916927aab357ba1b3afb33584f41edc5ed
3
+ metadata.gz: 592fb6a64d52fa897faad834c4c5874bea89ac63
4
+ data.tar.gz: 3b38a6108e3fa79e073929bc461fab31961c0c4e
5
5
  SHA512:
6
- metadata.gz: f00947dba22ddf24e1ed1e1653aa02b1b7a8b5aaccbac6af1dd4d206f80a737fe4acd716b1b8c207b6fe4ddc6b04a86a32f989ae31d278b67b6648be88925522
7
- data.tar.gz: add18edf2497bad5478a0dfced3d550332b0e5ada97e88d1702666e64c1404e02d621a49552c82c7f9fdeb267dcc79dc36a8fcf9f0109519903450c582daec9d
6
+ metadata.gz: bfa70c2fffa484403532a59f74184727bd65ca46e0976034f049383ca16d59f59403adaebe7a03a544e4d55b0dee5012876d8deb9014f7433e55f64a43a3e5de
7
+ data.tar.gz: ea20ead44f3d4cf96bbc3b667d5d257a31745b32b6651e51377818e98fa3a67ffe56f347f99c0c4ffe41d485ffe1ce7a1e9fdfe169b00eb7149fd08e3acb51cf
data/lib/ovirt/base.rb CHANGED
@@ -319,7 +319,7 @@ module Ovirt
319
319
 
320
320
  def update
321
321
  builder = Nokogiri::XML::Builder.new do |xml|
322
- xml.send(namespace.last.downcase) { yield xml if block_given? }
322
+ xml.send(self.class.namespace.last.downcase) { yield xml if block_given? }
323
323
  end
324
324
  data = builder.doc.root.to_xml
325
325
 
data/lib/ovirt/service.rb CHANGED
@@ -140,7 +140,7 @@ module Ovirt
140
140
  def self.ovirt?(options)
141
141
  options[:username] = options[:password] = "_unused"
142
142
  !new(options).engine_ssh_public_key.to_s.blank?
143
- rescue RestClient::ResourceNotFound
143
+ rescue RestClient::ResourceNotFound, NoMethodError
144
144
  false
145
145
  end
146
146
 
data/lib/ovirt/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Ovirt
2
- VERSION = "0.7.1"
2
+ VERSION = "0.7.2"
3
3
  end
data/spec/base_spec.rb CHANGED
@@ -14,4 +14,12 @@ describe Ovirt::Base do
14
14
  expect(Ovirt::Base.send(:href_to_guid, guid)).to eq(guid)
15
15
  expect { Ovirt::Base.send(:href_to_guid, 12_345) }.to raise_error(ArgumentError)
16
16
  end
17
+
18
+ it "#update" do
19
+ vm = build(:vm)
20
+
21
+ expect(vm.service).to receive(:resource_put).with("vms/", "<vm>\n <description>test description</description>\n</vm>")
22
+
23
+ vm.update { |x| x.description("test description") }
24
+ end
17
25
  end
data/spec/service_spec.rb CHANGED
@@ -54,6 +54,11 @@ EOX
54
54
  expect(described_class.ovirt?(:server => "127.0.0.1")).to be false
55
55
  end
56
56
 
57
+ it "false when invalid content encoding returned" do
58
+ expect_any_instance_of(described_class).to receive(:engine_ssh_public_key).and_raise(NoMethodError)
59
+ expect(described_class.ovirt?(:server => "127.0.0.1")).to be false
60
+ end
61
+
57
62
  it "true when key non-empty" do
58
63
  fake_key = "ssh-rsa " + ("A" * 372) + " ovirt-engine\n"
59
64
  expect_any_instance_of(described_class).to receive(:engine_ssh_public_key).and_return(fake_key)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ovirt
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.1
4
+ version: 0.7.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jason Frey
@@ -13,10 +13,11 @@ authors:
13
13
  - Matthew Draper
14
14
  - Richard Oliveri
15
15
  - Chris Portman
16
+ - Adam Grare
16
17
  autorequire:
17
18
  bindir: bin
18
19
  cert_chain: []
19
- date: 2015-11-25 00:00:00.000000000 Z
20
+ date: 2016-02-23 00:00:00.000000000 Z
20
21
  dependencies:
21
22
  - !ruby/object:Gem::Dependency
22
23
  name: bundler
@@ -170,6 +171,7 @@ email:
170
171
  - matthew@trebex.net
171
172
  - roliveri@redhat.com
172
173
  - chris.portman@optusnet.com.au
174
+ - agrare@redhat.com
173
175
  executables: []
174
176
  extensions: []
175
177
  extra_rdoc_files: []
@@ -241,7 +243,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
241
243
  version: '0'
242
244
  requirements: []
243
245
  rubyforge_project:
244
- rubygems_version: 2.4.5
246
+ rubygems_version: 2.4.5.1
245
247
  signing_key:
246
248
  specification_version: 4
247
249
  summary: Ovirt provides a simple Object Oriented interface to the REST API of oVirt