nexpose 0.7.2 → 0.7.3

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/nexpose/role.rb +2 -1
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e01318657cc5e089ad7026420d75b3b20ef9babe
4
- data.tar.gz: 9e0f1a624bcc6c6555156bfafe2a9c72c53857fa
3
+ metadata.gz: 4677c4dd25b090fc264d724267847713d52ab710
4
+ data.tar.gz: 159f12eb89b3bd12456fc7f8e02106ca5de37319
5
5
  SHA512:
6
- metadata.gz: 7a6a3ce3125ea1ddc59cc42cbdaa6e07e1c328991e5c28efc67a5d33e4f73baa5a53a14cb588443585e2ecd618f4a50aaecb36790a7bbdfd604c7c752c531a48
7
- data.tar.gz: 44096569c3c011159b5f3c88571c43d20ed87c6e9f4552347bf35989c8d4d9e48640e1ef02364143283f659f56eb1f43d6f6bb1b3a2c8bffd1c18e8d5438bd41
6
+ metadata.gz: ff0e90870bc691af8242ae260e59076115d1e8ad8c7504c0d6a8205e0b17d730feabca4e256fc9c9f97f3f7cb477d6a93d2f50f8c11861827cdeecfea61d7c85
7
+ data.tar.gz: 00e40eb6f9bec0e4a60d7249dd147e3adb59440ac559763e2f57ab815d464123b8af5703a48b5fc5a7f5a7dfd9fd2b590d9c3a89b5cf188eb74f46912a723ca1
data/lib/nexpose/role.rb CHANGED
@@ -176,7 +176,7 @@ module Nexpose
176
176
 
177
177
  response = APIRequest.execute(nsc.url, xml, '1.2')
178
178
  xml = REXML::XPath.first(response.res, 'RoleCreateResponse')
179
- @id = xml.attributes['id'].to_i
179
+ @id = xml.attributes['id'].to_i unless @existing
180
180
  @existing = true
181
181
  response.success
182
182
  end
@@ -235,6 +235,7 @@ module Nexpose
235
235
  def to_xml
236
236
  xml = %Q(<Role name="#{replace_entities(@name)}" full-name="#{replace_entities(@full_name)}")
237
237
  xml << %Q( enabled="#{(enabled ? 'true' : 'false')}")
238
+ xml << %Q( id="#{@id}") if @id > 0
238
239
  xml << %Q( scope="#{@scope}">)
239
240
  xml << %Q(<Description>#{replace_entities(@description)}</Description>)
240
241
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nexpose
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.2
4
+ version: 0.7.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - HD Moore
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2014-04-29 00:00:00.000000000 Z
13
+ date: 2014-04-30 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: librex