consul-templaterb 1.0.6 → 1.0.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c585b885aba40b8fcb72ac48c82f4dfd90ea4cbb9949976aa33eecf8a6a109a3
4
- data.tar.gz: 1a35639786fb7c3dad6f23bd890816763997f025299a99608291212cc8c07695
3
+ metadata.gz: dff2b22aa59dd10c76e17b02ad83bc2d3f5d0b6e2e2502ad94c2436c9c93f074
4
+ data.tar.gz: f41245cc9d75fd2c326fa573643e6dee67eb2e9743c9862da2710e41114fba3f
5
5
  SHA512:
6
- metadata.gz: 50afc5d1cdfb2aa269673be86561dc4c8fde3334f9de4b2a9361714f1e35b47a0235d828a17c93d6e50345873bbb396075bd0762f6ad7062fe97ba51eda1c1c3
7
- data.tar.gz: 9286bd23cf9d41e01b0585521eb0e7c41bead41a82b571baa687e7f3734fdfd238cce67b7b45bcadbe2565111dc118b49d659061ec20a9deaa2d0dd6fa0bf016
6
+ metadata.gz: 6a2cc201720dd43f08ac085e7df34bafaa63379a3eabd801e188f587a2ff5448ec2c657e7984c47dddc516a0fc6d8ce61c5ab4cb426ff76101e671f0c523855e
7
+ data.tar.gz: 7dea5e8d25aade2cfb621faa461f496183dcdfa77a8b3862fd2e030d042c05722692517bdaf8de382566946948eaa6aaeb3b91596c7bda08c1ef17690cc1f8dc
data/.gitignore CHANGED
@@ -7,6 +7,7 @@
7
7
  /pkg/
8
8
  /spec/reports/
9
9
  /tmp/
10
+ /samples/ready
10
11
  /samples/*.json
11
12
  /samples/*.xml
12
13
  /samples/*.html
@@ -21,5 +22,5 @@
21
22
 
22
23
  # rspec failure tracking
23
24
  .rspec_status
24
- # Max OS
25
+ # Mac OS
25
26
  .DS_Store
data/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  ## (UNRELEASED)
2
2
 
3
+ ## 1.0.7 (March 16, 2018)
4
+
5
+ BUG FIXES:
6
+
7
+ * Do not execute reload command at startup if destination file exists and is unchanged
8
+
9
+ IMPROVEMENTS:
10
+
11
+ * samples/*.html.erb files have doctype as first line
12
+
3
13
  ## 1.0.6 (March 16, 2018)
4
14
 
5
15
  IMPROVEMENTS:
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # Consul::Templaterb
1
+ # Consul::Templaterb [![Build Status](https://api.travis-ci.org/criteo/consul-templaterb.svg?branch=master)](https://travis-ci.org/criteo/consul-templaterb)
2
2
 
3
3
  This GEM is both a library and an executable that allows to generate files
4
4
  using data from Consul (Discovery and Key/Value Store) easily using ruby's
@@ -117,7 +117,7 @@ $ consul-templaterb --help
117
117
  USAGE: bin/consul-templaterb [[options]]
118
118
  -h, --help Show help
119
119
  -v, --version Show Version
120
- -c, --consul-addr=<address> Address of Consul, eg: http://locahost:8500
120
+ -c, --consul-addr=<address> Address of Consul, eg: http://localhost:8500
121
121
  --consul-token=<token> Use a token to connect to Consul
122
122
  -w, --wait=<min_duration> Wait at least n seconds before each template generation
123
123
  -r, --retry-delay=<min_duration> Min Retry delay on Error/Missing Consul Index
@@ -67,7 +67,7 @@ optparse = OptionParser.new do |opts|
67
67
  exit 0
68
68
  end
69
69
 
70
- opts.on('-c', '--consul-addr=<address>', String, 'Address of Consul, eg: http://locahost:8500') do |consul_url|
70
+ opts.on('-c', '--consul-addr=<address>', String, 'Address of Consul, eg: http://localhost:8500') do |consul_url|
71
71
  options[:consul][:base_url] = consul_url
72
72
  end
73
73
 
@@ -7,7 +7,7 @@ module Consul
7
7
  class ConsulConfiguration
8
8
  attr_reader :base_url, :token, :retry_duration, :min_duration, :wait_duration, :max_retry_duration, :retry_on_non_diff,
9
9
  :missing_index_retry_time_on_diff, :missing_index_retry_time_on_unchanged, :debug
10
- def initialize(base_url: 'http://locahost:8500',
10
+ def initialize(base_url: 'http://localhost:8500',
11
11
  debug: { network: false },
12
12
  token: nil,
13
13
  retry_duration: 10,
@@ -27,6 +27,7 @@ module Consul
27
27
  @output_file = output_file
28
28
  @template_manager = template_manager
29
29
  @last_result = ''
30
+ @last_result = File.read(output_file) if File.exist? output_file
30
31
  @template = load_template
31
32
  end
32
33
 
@@ -1,5 +1,5 @@
1
1
  module Consul
2
2
  module Async
3
- VERSION = '1.0.6'.freeze
3
+ VERSION = '1.0.7'.freeze
4
4
  end
5
5
  end
@@ -14,8 +14,7 @@
14
14
  'info'
15
15
  end
16
16
  end
17
- %>
18
- <%= render_file 'common/header.html.erb' %>
17
+ %><%= render_file 'common/header.html.erb' %>
19
18
  <style type="text/css">
20
19
  .check {
21
20
  transition: opacity 1s ease-out;
@@ -6,8 +6,7 @@
6
6
  tools = (ENV['CONSUL_TOOLS'] || 'criteo_choregraphies,checks,services,nodes,keys').split(",")
7
7
  suffix = ENV['CONSUL_TOOLS_PREFIX'] || '.html'
8
8
  prefix = ENV['CONSUL_TOOLS_SUFFIX'] || ''
9
- %>
10
- <!DOCTYPE html>
9
+ %><!DOCTYPE html>
11
10
  <html lang="en">
12
11
  <head>
13
12
  <meta charset="utf-8">
@@ -2,8 +2,7 @@
2
2
  require 'json'
3
3
  require 'date'
4
4
  @current_time = Time.now.utc
5
- %>
6
- <%= render_file 'common/header.html.erb' %>
5
+ %><%= render_file 'common/header.html.erb' %>
7
6
  <main role="main" class="container">
8
7
  <div>
9
8
  <h1>Show all choregraphie information</h1>
@@ -14,8 +14,7 @@
14
14
  'info'
15
15
  end
16
16
  end
17
- %>
18
- <%= render_file 'common/header.html.erb' %>
17
+ %><%= render_file 'common/header.html.erb' %>
19
18
  <% require 'base64'
20
19
  require 'json'
21
20
  require 'date'
@@ -69,4 +68,4 @@
69
68
  <% end%>
70
69
  </ul>
71
70
  <% end%>
72
- <%= render_file 'common/footer.html.erb' %>
71
+ <%= render_file 'common/footer.html.erb' %>
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: consul-templaterb
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.6
4
+ version: 1.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - SRE Core Services