consul-templaterb 1.5.2 → 1.5.3
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/CHANGELOG.md +5 -0
- data/lib/consul/async/consul_template.rb +2 -1
- data/lib/consul/async/endpoint.rb +2 -6
- data/lib/consul/async/version.rb +1 -1
- data/samples/consul-ui/consul_nodes.json.erb +1 -1
- data/samples/consul-ui/consul_services.json.erb +1 -1
- data/samples/criteo_choregraphies.html.erb +8 -1
- metadata +2 -2
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA256:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: 108f2c7ab2a9ad7a5153a9bb0589a5964da4cc6c87354fd8b09504bfde519431
         | 
| 4 | 
            +
              data.tar.gz: 7307427ef26bc8e0fec2d38ea64568d327d5df18a530b092d97e71ce14d736cd
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: 0791904a177e227316c3c4e062ec1291620dd1e067ac5a3a80f172df501dbd2f902ba747841d2b94b53903bd5ee3ddaa6a33cdbf553f2d730b71af696ff98fb6
         | 
| 7 | 
            +
              data.tar.gz: 8c305969be4be2eef1b726ef7ea04dd0d28a0a3861aa05dd08e54911207461e3c696949b029ea4a46d4a603772946d93b115aa4b8f33f3f75e92338e6a9058b8
         | 
    
        data/CHANGELOG.md
    CHANGED
    
    
| @@ -285,13 +285,14 @@ module Consul | |
| 285 285 | 
             
                end
         | 
| 286 286 |  | 
| 287 287 | 
             
                class ConsulTemplateAbstractMap < ConsulTemplateAbstract
         | 
| 288 | 
            -
                  def_delegators :result_delegate, :each, :[], :keys, :sort, :values, :each_pair, :each_value
         | 
| 288 | 
            +
                  def_delegators :result_delegate, :each, :[], :keys, :sort, :select, :values, :each_pair, :each_value, :count, :empty?, :map
         | 
| 289 289 | 
             
                  def initialize(consul_endpoint)
         | 
| 290 290 | 
             
                    super(consul_endpoint)
         | 
| 291 291 | 
             
                  end
         | 
| 292 292 | 
             
                end
         | 
| 293 293 |  | 
| 294 294 | 
             
                class ConsulTemplateAbstractArray < ConsulTemplateAbstract
         | 
| 295 | 
            +
                  def_delegators :result_delegate, :each, :[], :sort, :select, :each_value, :count, :empty?, :map, :to_a
         | 
| 295 296 | 
             
                  def initialize(consul_endpoint)
         | 
| 296 297 | 
             
                    super(consul_endpoint)
         | 
| 297 298 | 
             
                  end
         | 
| @@ -67,10 +67,6 @@ class Endpoint | |
| 67 67 | 
             
                req
         | 
| 68 68 | 
             
              end
         | 
| 69 69 |  | 
| 70 | 
            -
              def log(level, message)
         | 
| 71 | 
            -
             | 
| 72 | 
            -
              end
         | 
| 73 | 
            -
             | 
| 74 70 | 
             
              def _handle_error(http, consul_index)
         | 
| 75 71 | 
             
                retry_in = [600, conf.retry_duration + 2**@consecutive_errors].min
         | 
| 76 72 | 
             
                STDERR.puts "[ERROR][#{path}] X-Consul-Index:#{consul_index} - #{http.error} - Retry in #{retry_in}s #{stats.body_bytes_human}"
         | 
| @@ -85,8 +81,8 @@ class Endpoint | |
| 85 81 |  | 
| 86 82 | 
             
              def fetch
         | 
| 87 83 | 
             
                options = {
         | 
| 88 | 
            -
             | 
| 89 | 
            -
             | 
| 84 | 
            +
                  connect_timeout: 5, # default connection setup timeout
         | 
| 85 | 
            +
                  inactivity_timeout: conf.wait_duration + 1, # default connection inactivity (post-setup) timeout
         | 
| 90 86 | 
             
                }
         | 
| 91 87 | 
             
                connection = EventMachine::HttpRequest.new(conf.base_url, options)
         | 
| 92 88 | 
             
                cb = proc do |consul_index|
         | 
    
        data/lib/consul/async/version.rb
    CHANGED
    
    
| @@ -42,7 +42,14 @@ | |
| 42 42 | 
             
              <%
         | 
| 43 43 | 
             
                else
         | 
| 44 44 | 
             
                  json = JSON.parse(Base64.decode64(tuple['Value']))
         | 
| 45 | 
            -
                   | 
| 45 | 
            +
                  begin
         | 
| 46 | 
            +
                    holders = json['holders']
         | 
| 47 | 
            +
                  rescue StandardError => e
         | 
| 48 | 
            +
            %>
         | 
| 49 | 
            +
                    <h1>Failed to parse holders <%= e %> in <%= json %></h1>
         | 
| 50 | 
            +
            <%
         | 
| 51 | 
            +
                    holders = []
         | 
| 52 | 
            +
                  end
         | 
| 46 53 | 
             
                end
         | 
| 47 54 | 
             
              %>
         | 
| 48 55 | 
             
              <% if holders.count > 0 %>
         | 
    
        metadata
    CHANGED
    
    | @@ -1,14 +1,14 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: consul-templaterb
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 1.5. | 
| 4 | 
            +
              version: 1.5.3
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - SRE Core Services
         | 
| 8 8 | 
             
            autorequire: 
         | 
| 9 9 | 
             
            bindir: bin
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 | 
            -
            date: 2018-09- | 
| 11 | 
            +
            date: 2018-09-24 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies:
         | 
| 13 13 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 14 14 | 
             
              name: em-http-request
         |