jmx_client-parser 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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9a19428165fe743e2ded03fa6d12e5c8bdf7ea92
4
- data.tar.gz: 530eeaf7d2f3a9b5bc7182898cf8f51fb3f7d02b
3
+ metadata.gz: 20db4b32f1fe90c8352fec65f54019a13825b2cb
4
+ data.tar.gz: 6328615f12122070e1d75b42f25d4a6afde52805
5
5
  SHA512:
6
- metadata.gz: ec3b410b561b507bb220dc70ec2c7cef56158a5ec4070543cca5c6f4f3f21b0373e8d55bcf4f94ae6bbb9032e4b92e4de893d504086f24ed7d77f0f57213e247
7
- data.tar.gz: 0b45619028fa456b4cfe13c64f99375fbddd7e092f0c8ce0375f1fc9dc07ce515e44b8a67b2573caf4ecd0a4f005671656b6d3992b957977a2cfe86366953b80
6
+ metadata.gz: 22fe1199d4c9f0c0ef558160ce3ebfb33674df2833e5b9c9362e70b0a013ac50682316597f92fbdb18c2ff8549cd9690c32651350631ea9af4d658766c577c2a
7
+ data.tar.gz: 97a8a6c30664239508aec451d08bffe03a220de8acf630d84500e8bf766c5e0b42e4deb1be8fe267d1c0c17f4b4fa7592332057f5f3f9288dce70e1d6c3f21be
@@ -39,6 +39,9 @@ module JmxClient
39
39
  def parse_all_output(cmd_output, formatted_output = {})
40
40
  if cmd_output.nil? || cmd_output.empty?
41
41
  return formatted_output
42
+ elsif bean_not_registered?(cmd_output)
43
+ remaining = drop_first_line(cmd_output)
44
+ return parse_all_output(remaining, formatted_output)
42
45
  elsif single_line?(cmd_output)
43
46
  remaining, formatted = parse_single_line(cmd_output)
44
47
  return parse_all_output(remaining, formatted_output.merge(formatted))
@@ -48,6 +51,11 @@ module JmxClient
48
51
  end
49
52
  end
50
53
 
54
+ def bean_not_registered?(output)
55
+ regex = %r(is not a registered bean)
56
+ output.dup.split("\n").shift.chomp.match(regex)
57
+ end
58
+
51
59
  def single_line?(output)
52
60
  regex = %r(^
53
61
  [0-9/]+\s+ # Matches calendar day, like 12/12/2013.
@@ -1,5 +1,5 @@
1
1
  module JmxClient
2
2
  class Parser
3
- VERSION = '0.0.1'
3
+ VERSION = '0.0.2'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jmx_client-parser
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aaron Oman
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-12-18 00:00:00.000000000 Z
11
+ date: 2013-12-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake