jmx4r 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -6,7 +6,7 @@ require "rubygems"
6
6
 
7
7
  dir = File.dirname(__FILE__)
8
8
  lib = File.join(dir, "lib", "jmx4r.rb")
9
- version = "0.1.1"
9
+ version = "0.1.2"
10
10
 
11
11
  task :default => [:test]
12
12
 
data/lib/dynamic_mbean.rb CHANGED
@@ -252,7 +252,7 @@ module JMX
252
252
 
253
253
  def getAttributes(attributes)
254
254
  attrs = javax.management.AttributeList.new
255
- attributes.each { |attribute| attrs.add(getAttribute(attribute)) }
255
+ attributes.each { |attribute| attrs.add send("jmx_get_"+attribute.downcase) }
256
256
  attrs
257
257
  end
258
258
 
@@ -8,6 +8,7 @@ class TestDynamicMBean < Test::Unit::TestCase
8
8
 
9
9
  import java.lang.management.ManagementFactory
10
10
  import javax.management.ObjectName
11
+ import javax.management.Attribute
11
12
 
12
13
  class AttributeTypesMBean < JMX::DynamicMBean
13
14
  rw_attribute :string_attr, :string, "a String attribute"
@@ -147,7 +148,8 @@ class TestDynamicMBean < Test::Unit::TestCase
147
148
 
148
149
  foo_mbean = JMX::MBean.find_by_name object_name.to_s, :connection => mbean_server
149
150
  attrs = mbean_server.get_attributes object_name, ["foo_attr"].to_java(:string)
150
- assert_equal foo.foo_attr, attrs[0]
151
+ assert attrs[0].kind_of? Attribute
152
+ assert_equal foo.foo_attr, attrs[0].value
151
153
 
152
154
  mbean_server.unregister_mbean object_name
153
155
 
metadata CHANGED
@@ -1,10 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  required_ruby_version: !ruby/object:Gem::Requirement
3
+ none: false
3
4
  requirements:
4
5
  - - '>='
5
6
  - !ruby/object:Gem::Version
7
+ segments:
8
+ - 0
6
9
  version: "0"
7
- version:
8
10
  email: jmesnil@gmail.com
9
11
  cert_chain: []
10
12
 
@@ -61,24 +63,31 @@ files:
61
63
  - README.rdoc
62
64
  - LICENSE.txt
63
65
  required_rubygems_version: !ruby/object:Gem::Requirement
66
+ none: false
64
67
  requirements:
65
68
  - - '>='
66
69
  - !ruby/object:Gem::Version
70
+ segments:
71
+ - 0
67
72
  version: "0"
68
- version:
69
73
  extensions: []
70
74
 
71
- rubygems_version: 1.3.5
75
+ rubygems_version: 1.3.7
72
76
  requirements: []
73
77
 
74
78
  authors:
75
79
  - Jeff Mesnil
76
- date: 2010-07-27 22:00:00 +00:00
80
+ date: 2010-07-28 22:00:00 +00:00
77
81
  platform: ruby
78
82
  test_files:
79
83
  - test/ts_all.rb
80
84
  version: !ruby/object:Gem::Version
81
- version: 0.1.1
85
+ segments:
86
+ - 0
87
+ - 1
88
+ - 2
89
+ prerelease: false
90
+ version: 0.1.2
82
91
  require_paths:
83
92
  - lib
84
93
  dependencies: []