gds-api-adapters 24.3.0 → 24.4.0
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/lib/gds_api/json_client.rb +2 -1
 - data/lib/gds_api/version.rb +1 -1
 - data/test/json_client_test.rb +9 -0
 - metadata +2 -2
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA1:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: 917b62c21c23af44bb7bd701631407f93ad3e528
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 5cfcbf49f3381b24011fbaddc4809c173267436e
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: d6febf466943aca5a5ccec8a099d88956d8bbbbfede4f527986ddfe4e8484799200bc99d06861c39fef999ffb367b450889ace42be7e0cc84788f4cac9f08a30
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: 59a64bbbe9fee9466c90b61760d09ef560159e398e7380e4902c17b56b4838ea06f78763ecde700ae2f28cdd12a0cdcc8e9c5ec213406a3cea561ac2a11e20c5
         
     | 
    
        data/lib/gds_api/json_client.rb
    CHANGED
    
    | 
         @@ -171,7 +171,8 @@ module GdsApi 
     | 
|
| 
       171 
171 
     | 
    
         
             
                # parameters with timeouts included
         
     | 
| 
       172 
172 
     | 
    
         
             
                def with_timeout(method_params)
         
     | 
| 
       173 
173 
     | 
    
         
             
                  method_params.merge(
         
     | 
| 
       174 
     | 
    
         
            -
                    timeout: options[:timeout] || DEFAULT_TIMEOUT_IN_SECONDS
         
     | 
| 
      
 174 
     | 
    
         
            +
                    timeout: options[:timeout] || DEFAULT_TIMEOUT_IN_SECONDS,
         
     | 
| 
      
 175 
     | 
    
         
            +
                    open_timeout: options[:timeout] || DEFAULT_TIMEOUT_IN_SECONDS,
         
     | 
| 
       175 
176 
     | 
    
         
             
                  )
         
     | 
| 
       176 
177 
     | 
    
         
             
                end
         
     | 
| 
       177 
178 
     | 
    
         | 
    
        data/lib/gds_api/version.rb
    CHANGED
    
    
    
        data/test/json_client_test.rb
    CHANGED
    
    | 
         @@ -33,6 +33,15 @@ class JsonClientTest < MiniTest::Spec 
     | 
|
| 
       33 
33 
     | 
    
         
             
                end
         
     | 
| 
       34 
34 
     | 
    
         
             
              end
         
     | 
| 
       35 
35 
     | 
    
         | 
| 
      
 36 
     | 
    
         
            +
              def test_long_connections_timeout
         
     | 
| 
      
 37 
     | 
    
         
            +
                url = "http://www.example.com/timeout.json"
         
     | 
| 
      
 38 
     | 
    
         
            +
                exception = defined?(Net::OpenTimeout) ? Net::OpenTimeout : TimeoutError
         
     | 
| 
      
 39 
     | 
    
         
            +
                stub_request(:get, url).to_raise(exception)
         
     | 
| 
      
 40 
     | 
    
         
            +
                assert_raises GdsApi::TimedOutException do
         
     | 
| 
      
 41 
     | 
    
         
            +
                  @client.get_json(url)
         
     | 
| 
      
 42 
     | 
    
         
            +
                end
         
     | 
| 
      
 43 
     | 
    
         
            +
              end
         
     | 
| 
      
 44 
     | 
    
         
            +
             
     | 
| 
       36 
45 
     | 
    
         
             
              def test_get_should_raise_endpoint_not_found_if_connection_refused
         
     | 
| 
       37 
46 
     | 
    
         
             
                url = "http://some.endpoint/some.json"
         
     | 
| 
       38 
47 
     | 
    
         
             
                stub_request(:get, url).to_raise(Errno::ECONNREFUSED)
         
     | 
    
        metadata
    CHANGED
    
    | 
         @@ -1,14 +1,14 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: gds-api-adapters
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 24. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 24.4.0
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - James Stewart
         
     | 
| 
       8 
8 
     | 
    
         
             
            autorequire: 
         
     | 
| 
       9 
9 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       10 
10 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       11 
     | 
    
         
            -
            date: 2015-09- 
     | 
| 
      
 11 
     | 
    
         
            +
            date: 2015-09-17 00:00:00.000000000 Z
         
     | 
| 
       12 
12 
     | 
    
         
             
            dependencies:
         
     | 
| 
       13 
13 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       14 
14 
     | 
    
         
             
              name: plek
         
     |