tiller 0.6.4 → 0.6.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/bin/tiller +9 -10
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 12ba31f3bc1bfba41e65bcd3b0ab7c5257bd8c20
4
- data.tar.gz: 7c20d6ffbc5c0a518caca23a6813112990348a50
3
+ metadata.gz: 84545c02ddcde99810a6d2ee136b5e4adbee3e78
4
+ data.tar.gz: 5e020f6ed206820dac9a6ebc7d18e1c8b4664bcc
5
5
  SHA512:
6
- metadata.gz: 11d659d2f809d1a6b423cf25540fcbeab9f8d4f92a6ed8fd7f3b3f5b1175b87cab66dd6c4802dfa78e85e5b4361d279014e72ce630ae25e363a39919ac5f1118
7
- data.tar.gz: e80b88ded26a38fd419b6c2f84c3b1f12451ea52e878d403e5dfbcf180b70c816f4e85c0f7a25dd4f7e01212d9ded8d21741c6dcbd597020426f9db0a1ca364e
6
+ metadata.gz: f9995b6f18d95eb664fcc0ff5be3a2c0e877d596271e8123edbde3111c9975b773f800236fcc7fc1e98e3fcc50f5d1c1f3d56bbc22de9155bb9e406bb4ecfa50
7
+ data.tar.gz: e0bad75d72c44062d342aff43c2576faa154f645d85038a9127c00e1f07e8bb8aebd28ea7a74aaf63105a10752be2bea447fe562ac7875c6825538b4feb0e422
data/bin/tiller CHANGED
@@ -8,7 +8,7 @@
8
8
  #
9
9
  # Mark Dastmalchi-Round <github@markround.com>
10
10
 
11
- VERSION = '0.6.4'
11
+ VERSION = '0.6.5'
12
12
 
13
13
  require 'erb'
14
14
  require 'ostruct'
@@ -92,15 +92,17 @@ module Tiller
92
92
  # values for each one.
93
93
  all_templates = {}
94
94
  templates.each do |template, content|
95
- values = {}
95
+
96
+ # Start with a hash of our global values
97
+ tiller = global_values
96
98
  target_values = {}
97
99
 
98
- # Now we populate the hash with values from each DataSource, warning if we
100
+ # Now we add to the 'tiller' hash with values from each DataSource, warning if we
99
101
  # get duplicate values.
100
102
  data_classes.each do |data_class|
101
103
  dc = data_class.new(config)
102
104
  if dc.values(template) != nil
103
- values.merge!(dc.values(template)) do |key, old, new|
105
+ tiller.merge!(dc.values(template)) do |key, old, new|
104
106
  warn_merge(key, old, new, 'data', data_class.to_s)
105
107
  end
106
108
  end
@@ -118,9 +120,6 @@ module Tiller
118
120
 
119
121
  # Now, we build the template
120
122
  puts "Building template #{template}" if config[:verbose]
121
- tiller = values.merge(global_values) do |key, old, new|
122
- warn_merge(key, old, new, 'global and local', 'merged configuration')
123
- end
124
123
 
125
124
  # Use an OpenStruct namespace, as it's way easier than faffing around with
126
125
  # manual binding, and also non-existing values just get replaced by <nil>
@@ -137,7 +136,7 @@ module Tiller
137
136
  target.close
138
137
 
139
138
  # config is redundant in target_values, remove it for the final status hash.
140
- all_templates[template]={
139
+ all_templates[template] = {
141
140
  'merged_values' => tiller,
142
141
  'target_values' => target_values.reject{|k,v| k=='config'}
143
142
  }
@@ -162,7 +161,7 @@ module Tiller
162
161
  puts 'Template generation completed'
163
162
 
164
163
  # Final status structure for API
165
- tiller_api_hash={'config' => config, 'global_values' => global_values, 'templates' => all_templates}
164
+ tiller_api_hash = {'config' => config, 'global_values' => global_values, 'templates' => all_templates}
166
165
 
167
166
  if config['api_enable']
168
167
  Thread.start{ tiller_api(tiller_api_hash) }
@@ -171,7 +170,7 @@ module Tiller
171
170
  # Override the exec if run with -x (see options.rb)
172
171
  if config.has_key?(:alt_exec)
173
172
  puts "Overriding exec parameter [#{config['exec']}] with [#{config[:alt_exec]}]" if config[:verbose]
174
- config['exec']=config[:alt_exec]
173
+ config['exec'] = config[:alt_exec]
175
174
  end
176
175
 
177
176
  if config[:no_exec] == false && config.key?('exec')
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tiller
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.4
4
+ version: 0.6.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mark Dastmalchi-Round
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-07-23 00:00:00.000000000 Z
11
+ date: 2015-08-07 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: A tool to create configuration files from a variety of sources, particularly
14
14
  useful for Docker containers. See https://github.com/markround/tiller for examples