lab-manager 1.0.8 → 1.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. data/lib/lab_manager/configuration.rb +15 -9
  2. metadata +1 -1
@@ -1,17 +1,23 @@
1
+ require 'flexmock'
2
+
1
3
  class Configuration
2
4
 
3
5
  def self.parse(data)
4
6
 
5
- if !data.keys.empty? && data.keys.first != "Configuration"
6
- data = data.values[0]
7
- end
8
-
9
7
  configuration = Configuration.new
10
- data_config = data["Configuration"]
11
- if data_config
12
- configuration.id = data_config["id"]
13
- configuration.name = data_config["name"]
14
- configuration.deployed = data_config["isDeployed"] == "true" ? true : false
8
+
9
+ if !data.__xmlele.empty?
10
+
11
+ if data.__xmlele[0].first.name != "Configuration"
12
+ data = data.__xmlele[0][1]
13
+ end
14
+
15
+ data_config = data["Configuration"]
16
+ if data_config
17
+ configuration.id = data_config["id"]
18
+ configuration.name = data_config["name"]
19
+ configuration.deployed = data_config["isDeployed"] == "true" ? true : false
20
+ end
15
21
  end
16
22
 
17
23
  configuration
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lab-manager
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.8
4
+ version: 1.0.9
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: