em-ci 0.0.1 → 0.0.2

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.
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
- # Test
1
+ # EmCi
2
2
 
3
- TODO: Write a gem description
3
+ Event-machine friendly cctray.xml monitoring
4
4
 
5
5
  ## Installation
6
6
 
@@ -1,4 +1,4 @@
1
- require "ox"
1
+ require 'ox'
2
2
  require 'eventmachine'
3
3
  require 'em-http'
4
4
  require 'em-promise'
@@ -58,7 +58,13 @@ module CcTray
58
58
 
59
59
  # Parse response XML, and break into projects
60
60
  def parse(data)
61
- Ox.parse(data).locate("Projects/Project").each do |project|
61
+ data = Ox.parse(data)
62
+
63
+ return unless data
64
+
65
+ data = data.root if data.is_a?(Ox::Document)
66
+
67
+ data.locate('Project').each do |project|
62
68
  attrs = project.attributes
63
69
  name = attrs[:name]
64
70
  next if options[:filter].is_a?(Array) && !options[:filter].include?(name)
@@ -1,3 +1,3 @@
1
1
  module EmCi
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: em-ci
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-04-15 00:00:00.000000000 Z
12
+ date: 2013-04-16 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: eventmachine