persistent_http 2.0.0 → 2.0.1
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 +4 -4
- data/History.md +9 -1
- data/lib/persistent_http.rb +22 -0
- data/lib/persistent_http/version.rb +1 -1
- metadata +19 -19
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA1:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: 6c603374a45a221f16b956c1e98ea37fb1a64000
         | 
| 4 | 
            +
              data.tar.gz: 9a6f984964296ea8ef873c864f44c3b4cd0a7ab7
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: 38efd54a08c13bfc73e763cb5691cc262d030d28fb685c5712f0e56da9bd91e518f708139838a447331f6c42e96758d3102affdf360d1b10ed83a4a8fdb9690e
         | 
| 7 | 
            +
              data.tar.gz: 2622d5d9b68b2521bc126387264d8063d2bfd1a261ea40b93e8123a7bb4c8fc12447812e2c55b535c5ff13414fc9b9dbaeb394ee9c9b008a8ed85e87dc44c3bc
         | 
    
        data/History.md
    CHANGED
    
    | @@ -1,6 +1,15 @@ | |
| 1 1 | 
             
            PersistentHttp Changelog
         | 
| 2 2 | 
             
            ========================
         | 
| 3 3 |  | 
| 4 | 
            +
            2.0.1
         | 
| 5 | 
            +
             | 
| 6 | 
            +
             - Put default_path, host and port getters back into persistent_http for backwards compatibility
         | 
| 7 | 
            +
             | 
| 8 | 
            +
            2.0.0
         | 
| 9 | 
            +
             | 
| 10 | 
            +
             - Separate out connection so a single dedicated connection can be used.
         | 
| 11 | 
            +
             - Allow non-persistent connections in case we just want the proxying stuff.
         | 
| 12 | 
            +
             | 
| 4 13 | 
             
            1.0.6
         | 
| 5 14 |  | 
| 6 15 | 
             
             - Fix pool_size and shutdown methods and make tests pass again (Matt Campbell - soupmatt)
         | 
| @@ -33,4 +42,3 @@ PersistentHttp Changelog | |
| 33 42 | 
             
            1.0.0
         | 
| 34 43 |  | 
| 35 44 | 
             
             - Initial release
         | 
| 36 | 
            -
             | 
    
        data/lib/persistent_http.rb
    CHANGED
    
    | @@ -67,6 +67,18 @@ class PersistentHTTP | |
| 67 67 | 
             
              # will be logged via the logger
         | 
| 68 68 | 
             
              attr_reader :warn_timeout
         | 
| 69 69 |  | 
| 70 | 
            +
              ##
         | 
| 71 | 
            +
              # Host for the Net:HTTP connection
         | 
| 72 | 
            +
              attr_reader :host
         | 
| 73 | 
            +
             | 
| 74 | 
            +
              ##
         | 
| 75 | 
            +
              # Port for the Net:HTTP connection
         | 
| 76 | 
            +
              attr_reader :port
         | 
| 77 | 
            +
             | 
| 78 | 
            +
              ##
         | 
| 79 | 
            +
              # Default path for the request
         | 
| 80 | 
            +
              attr_accessor :default_path
         | 
| 81 | 
            +
             | 
| 70 82 | 
             
              ##
         | 
| 71 83 | 
             
              # Creates a new PersistentHTTP.
         | 
| 72 84 | 
             
              #
         | 
| @@ -91,6 +103,16 @@ class PersistentHTTP | |
| 91 103 | 
             
                @pool_timeout    = options[:pool_timeout]
         | 
| 92 104 | 
             
                @pool_size       = options[:pool_size]       || 1
         | 
| 93 105 | 
             
                @warn_timeout    = options[:warn_timeout]    || 0.5
         | 
| 106 | 
            +
                @default_path    = options[:default_path]
         | 
| 107 | 
            +
                @host            = options[:host]
         | 
| 108 | 
            +
                @port            = options[:port]
         | 
| 109 | 
            +
                url              = options[:url]
         | 
| 110 | 
            +
                if url
         | 
| 111 | 
            +
                  url = URI.parse(url) if url.kind_of? String
         | 
| 112 | 
            +
                  @default_path ||= url.request_uri
         | 
| 113 | 
            +
                  @host         ||= url.host
         | 
| 114 | 
            +
                  @port         ||= url.port
         | 
| 115 | 
            +
                end
         | 
| 94 116 |  | 
| 95 117 | 
             
                @pool = GenePool.new(:name         => name,
         | 
| 96 118 | 
             
                                     :pool_size    => @pool_size,
         | 
    
        metadata
    CHANGED
    
    | @@ -1,29 +1,29 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: persistent_http
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 2.0. | 
| 4 | 
            +
              version: 2.0.1
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Brad Pardee
         | 
| 8 | 
            -
            autorequire: | 
| 8 | 
            +
            autorequire:
         | 
| 9 9 | 
             
            bindir: bin
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 | 
            -
            date: 2014- | 
| 11 | 
            +
            date: 2014-08-21 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies:
         | 
| 13 13 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 14 14 | 
             
              name: gene_pool
         | 
| 15 | 
            -
               | 
| 15 | 
            +
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 16 16 | 
             
                requirements:
         | 
| 17 | 
            -
                - -  | 
| 17 | 
            +
                - - '>='
         | 
| 18 18 | 
             
                  - !ruby/object:Gem::Version
         | 
| 19 19 | 
             
                    version: '1.3'
         | 
| 20 | 
            -
               | 
| 21 | 
            -
              prerelease: false
         | 
| 22 | 
            -
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 20 | 
            +
              requirement: !ruby/object:Gem::Requirement
         | 
| 23 21 | 
             
                requirements:
         | 
| 24 | 
            -
                - -  | 
| 22 | 
            +
                - - '>='
         | 
| 25 23 | 
             
                  - !ruby/object:Gem::Version
         | 
| 26 24 | 
             
                    version: '1.3'
         | 
| 25 | 
            +
              prerelease: false
         | 
| 26 | 
            +
              type: :runtime
         | 
| 27 27 | 
             
            description: Persistent HTTP connections using a connection pool
         | 
| 28 28 | 
             
            email:
         | 
| 29 29 | 
             
            - bradpardee@gmail.com
         | 
| @@ -31,34 +31,34 @@ executables: [] | |
| 31 31 | 
             
            extensions: []
         | 
| 32 32 | 
             
            extra_rdoc_files: []
         | 
| 33 33 | 
             
            files:
         | 
| 34 | 
            -
            - History.md
         | 
| 35 | 
            -
            - LICENSE
         | 
| 36 | 
            -
            - README.rdoc
         | 
| 37 | 
            -
            - Rakefile
         | 
| 38 34 | 
             
            - lib/persistent_http.rb
         | 
| 39 35 | 
             
            - lib/persistent_http/connection.rb
         | 
| 40 36 | 
             
            - lib/persistent_http/version.rb
         | 
| 37 | 
            +
            - LICENSE
         | 
| 38 | 
            +
            - Rakefile
         | 
| 39 | 
            +
            - History.md
         | 
| 40 | 
            +
            - README.rdoc
         | 
| 41 41 | 
             
            homepage: http://github.com/bpardee/persistent_http
         | 
| 42 42 | 
             
            licenses: []
         | 
| 43 43 | 
             
            metadata: {}
         | 
| 44 | 
            -
            post_install_message: | 
| 44 | 
            +
            post_install_message:
         | 
| 45 45 | 
             
            rdoc_options: []
         | 
| 46 46 | 
             
            require_paths:
         | 
| 47 47 | 
             
            - lib
         | 
| 48 48 | 
             
            required_ruby_version: !ruby/object:Gem::Requirement
         | 
| 49 49 | 
             
              requirements:
         | 
| 50 | 
            -
              - -  | 
| 50 | 
            +
              - - '>='
         | 
| 51 51 | 
             
                - !ruby/object:Gem::Version
         | 
| 52 52 | 
             
                  version: '0'
         | 
| 53 53 | 
             
            required_rubygems_version: !ruby/object:Gem::Requirement
         | 
| 54 54 | 
             
              requirements:
         | 
| 55 | 
            -
              - -  | 
| 55 | 
            +
              - - '>='
         | 
| 56 56 | 
             
                - !ruby/object:Gem::Version
         | 
| 57 57 | 
             
                  version: '0'
         | 
| 58 58 | 
             
            requirements: []
         | 
| 59 | 
            -
            rubyforge_project: | 
| 60 | 
            -
            rubygems_version: 2. | 
| 61 | 
            -
            signing_key: | 
| 59 | 
            +
            rubyforge_project:
         | 
| 60 | 
            +
            rubygems_version: 2.1.9
         | 
| 61 | 
            +
            signing_key:
         | 
| 62 62 | 
             
            specification_version: 4
         | 
| 63 63 | 
             
            summary: Persistent HTTP connections using a connection pool
         | 
| 64 64 | 
             
            test_files: []
         |