tiller 0.6.4 → 0.6.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/tiller +9 -10
- 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: 84545c02ddcde99810a6d2ee136b5e4adbee3e78
|
4
|
+
data.tar.gz: 5e020f6ed206820dac9a6ebc7d18e1c8b4664bcc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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.
|
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
|
-
|
95
|
+
|
96
|
+
# Start with a hash of our global values
|
97
|
+
tiller = global_values
|
96
98
|
target_values = {}
|
97
99
|
|
98
|
-
# Now 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
|
-
|
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
|
+
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
|
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
|