jmx4r 0.1.1 → 0.1.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/Rakefile +1 -1
- data/lib/dynamic_mbean.rb +1 -1
- data/test/tc_dynamic_mbean.rb +3 -1
- metadata +14 -5
    
        data/Rakefile
    CHANGED
    
    
    
        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( | 
| 255 | 
            +
                  attributes.each { |attribute| attrs.add send("jmx_get_"+attribute.downcase) }
         | 
| 256 256 | 
             
                  attrs
         | 
| 257 257 | 
             
                end
         | 
| 258 258 |  | 
    
        data/test/tc_dynamic_mbean.rb
    CHANGED
    
    | @@ -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 | 
            -
                 | 
| 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. | 
| 75 | 
            +
            rubygems_version: 1.3.7
         | 
| 72 76 | 
             
            requirements: []
         | 
| 73 77 |  | 
| 74 78 | 
             
            authors: 
         | 
| 75 79 | 
             
            - Jeff Mesnil
         | 
| 76 | 
            -
            date: 2010-07- | 
| 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 | 
            -
               | 
| 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: []
         |