march_hare 2.0.0.rc2-java → 2.0.0.rc3-java
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 +7 -0
- data/lib/march_hare/session.rb +23 -10
- data/lib/march_hare/version.rb +1 -1
- metadata +5 -7
    
        checksums.yaml
    ADDED
    
    | @@ -0,0 +1,7 @@ | |
| 1 | 
            +
            ---
         | 
| 2 | 
            +
            SHA1:
         | 
| 3 | 
            +
              metadata.gz: 8fef0a21e9108bc602820f6a9c5ac0754fef75f9
         | 
| 4 | 
            +
              data.tar.gz: f53168edd0513906f9903fe6d79276b8baaed8b1
         | 
| 5 | 
            +
            SHA512:
         | 
| 6 | 
            +
              metadata.gz: b5012f3a6b060f7c253f378af70a9dbe2fb3618b54afc4d968261893ce56cb00b0db1474f94df5dae90c2dea7a78a7046f26833b2a72d30812bbc7cd42b12774
         | 
| 7 | 
            +
              data.tar.gz: 8a24a42c39d26a514278682cb1e55981f5f1b9a3c6ef0c1e76a990a90208dccb8f752d05f16f0c201510ecd58d07d2bec253026f7f31fc84652fc31877277d26
         | 
    
        data/lib/march_hare/session.rb
    CHANGED
    
    | @@ -74,10 +74,12 @@ module MarchHare | |
| 74 74 |  | 
| 75 75 | 
             
                # @private
         | 
| 76 76 | 
             
                def initialize(connection_factory, opts = {})
         | 
| 77 | 
            -
                  @cf | 
| 78 | 
            -
                   | 
| 79 | 
            -
                   | 
| 80 | 
            -
                  @ | 
| 77 | 
            +
                  @cf               = connection_factory
         | 
| 78 | 
            +
                  # executors cannot be restarted after shutdown,
         | 
| 79 | 
            +
                  # so we really need a factory here. MK.
         | 
| 80 | 
            +
                  @executor_factory = opts[:executor_factory] || build_executor_factory_from(opts)
         | 
| 81 | 
            +
                  @connection       = self.new_connection
         | 
| 82 | 
            +
                  @channels         = JavaConcurrent::ConcurrentHashMap.new
         | 
| 81 83 |  | 
| 82 84 | 
             
                  # should automatic recovery from network failures be used?
         | 
| 83 85 | 
             
                  @automatically_recover = if opts[:automatically_recover].nil? && opts[:automatic_recovery].nil?
         | 
| @@ -238,7 +240,7 @@ module MarchHare | |
| 238 240 |  | 
| 239 241 | 
             
                # @private
         | 
| 240 242 | 
             
                def self.hostname_from(options)
         | 
| 241 | 
            -
                  options[:host] || options[:hostname] || ConnectionFactory | 
| 243 | 
            +
                  options[:host] || options[:hostname] || ConnectionFactory::DEFAULT_HOST
         | 
| 242 244 | 
             
                end
         | 
| 243 245 |  | 
| 244 246 | 
             
                # @private
         | 
| @@ -248,7 +250,7 @@ module MarchHare | |
| 248 250 |  | 
| 249 251 | 
             
                # @private
         | 
| 250 252 | 
             
                def self.vhost_from(options)
         | 
| 251 | 
            -
                  options[:virtual_host] || options[:vhost] || ConnectionFactory | 
| 253 | 
            +
                  options[:virtual_host] || options[:vhost] || ConnectionFactory::DEFAULT_VHOST
         | 
| 252 254 | 
             
                end
         | 
| 253 255 |  | 
| 254 256 | 
             
                # @private
         | 
| @@ -268,17 +270,17 @@ module MarchHare | |
| 268 270 |  | 
| 269 271 | 
             
                # @private
         | 
| 270 272 | 
             
                def self.username_from(options)
         | 
| 271 | 
            -
                  options[:username] || options[:user] || ConnectionFactory | 
| 273 | 
            +
                  options[:username] || options[:user] || ConnectionFactory::DEFAULT_USER
         | 
| 272 274 | 
             
                end
         | 
| 273 275 |  | 
| 274 276 | 
             
                # @private
         | 
| 275 277 | 
             
                def self.heartbeat_from(options)
         | 
| 276 | 
            -
                  options[:heartbeat_interval] || options[:requested_heartbeat] || ConnectionFactory | 
| 278 | 
            +
                  options[:heartbeat_interval] || options[:requested_heartbeat] || ConnectionFactory::DEFAULT_HEARTBEAT
         | 
| 277 279 | 
             
                end
         | 
| 278 280 |  | 
| 279 281 | 
             
                # @private
         | 
| 280 282 | 
             
                def self.connection_timeout_from(options)
         | 
| 281 | 
            -
                  options[:connection_timeout_interval] || options[:connection_timeout] || ConnectionFactory | 
| 283 | 
            +
                  options[:connection_timeout_interval] || options[:connection_timeout] || ConnectionFactory::DEFAULT_CONNECTION_TIMEOUT
         | 
| 282 284 | 
             
                end
         | 
| 283 285 |  | 
| 284 286 | 
             
                # @private
         | 
| @@ -288,7 +290,7 @@ module MarchHare | |
| 288 290 |  | 
| 289 291 | 
             
                # @private
         | 
| 290 292 | 
             
                def self.password_from(options)
         | 
| 291 | 
            -
                  options[:password] || options[:pass] || ConnectionFactory | 
| 293 | 
            +
                  options[:password] || options[:pass] || ConnectionFactory::DEFAULT_PASS
         | 
| 292 294 | 
             
                end
         | 
| 293 295 |  | 
| 294 296 | 
             
                # @private
         | 
| @@ -343,5 +345,16 @@ module MarchHare | |
| 343 345 | 
             
                    end
         | 
| 344 346 | 
             
                  end
         | 
| 345 347 | 
             
                end
         | 
| 348 | 
            +
             | 
| 349 | 
            +
                # Makes it easier to construct executor factories.
         | 
| 350 | 
            +
                # @private
         | 
| 351 | 
            +
                def build_executor_factory_from(opts)
         | 
| 352 | 
            +
                  # if we are given a thread pool size, construct
         | 
| 353 | 
            +
                  # a callable that createa a fixed size executor
         | 
| 354 | 
            +
                  # of that size. MK.
         | 
| 355 | 
            +
                  if n = opts[:thread_pool_size]
         | 
| 356 | 
            +
                    return Proc.new { MarchHare::ThreadPools.fixed_of_size(n) }
         | 
| 357 | 
            +
                  end
         | 
| 358 | 
            +
                end
         | 
| 346 359 | 
             
              end
         | 
| 347 360 | 
             
            end
         | 
    
        data/lib/march_hare/version.rb
    CHANGED
    
    
    
        metadata
    CHANGED
    
    | @@ -1,8 +1,7 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: march_hare
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 2.0.0. | 
| 5 | 
            -
              prerelease: 6
         | 
| 4 | 
            +
              version: 2.0.0.rc3
         | 
| 6 5 | 
             
            platform: java
         | 
| 7 6 | 
             
            authors:
         | 
| 8 7 | 
             
            - Theo Hultberg
         | 
| @@ -10,7 +9,7 @@ authors: | |
| 10 9 | 
             
            autorequire:
         | 
| 11 10 | 
             
            bindir: bin
         | 
| 12 11 | 
             
            cert_chain: []
         | 
| 13 | 
            -
            date: 2013- | 
| 12 | 
            +
            date: 2013-10-21 00:00:00.000000000 Z
         | 
| 14 13 | 
             
            dependencies: []
         | 
| 15 14 | 
             
            description: RabbitMQ client for JRuby built around the official RabbitMQ Java client
         | 
| 16 15 | 
             
            email:
         | 
| @@ -40,6 +39,7 @@ files: | |
| 40 39 | 
             
            - lib/march_hare/versioned_delivery_tag.rb
         | 
| 41 40 | 
             
            homepage: http://rubymarchhare.info
         | 
| 42 41 | 
             
            licenses: []
         | 
| 42 | 
            +
            metadata: {}
         | 
| 43 43 | 
             
            post_install_message:
         | 
| 44 44 | 
             
            rdoc_options: []
         | 
| 45 45 | 
             
            require_paths:
         | 
| @@ -49,18 +49,16 @@ required_ruby_version: !ruby/object:Gem::Requirement | |
| 49 49 | 
             
              - - '>='
         | 
| 50 50 | 
             
                - !ruby/object:Gem::Version
         | 
| 51 51 | 
             
                  version: '0'
         | 
| 52 | 
            -
              none: false
         | 
| 53 52 | 
             
            required_rubygems_version: !ruby/object:Gem::Requirement
         | 
| 54 53 | 
             
              requirements:
         | 
| 55 54 | 
             
              - - '>'
         | 
| 56 55 | 
             
                - !ruby/object:Gem::Version
         | 
| 57 56 | 
             
                  version: 1.3.1
         | 
| 58 | 
            -
              none: false
         | 
| 59 57 | 
             
            requirements: []
         | 
| 60 58 | 
             
            rubyforge_project: march_hare
         | 
| 61 | 
            -
            rubygems_version: 1. | 
| 59 | 
            +
            rubygems_version: 2.1.5
         | 
| 62 60 | 
             
            signing_key:
         | 
| 63 | 
            -
            specification_version:  | 
| 61 | 
            +
            specification_version: 4
         | 
| 64 62 | 
             
            summary: RabbitMQ client for JRuby built around the official RabbitMQ Java client
         | 
| 65 63 | 
             
            test_files: []
         | 
| 66 64 | 
             
            has_rdoc:
         |