tiller 1.4.1 → 1.5.0

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
  SHA1:
3
- metadata.gz: 6c49fb85b812db77038c4a407ac27e7534505aee
4
- data.tar.gz: cf33241660e63fae8614684a6dccb617b487b4bb
3
+ metadata.gz: 22aaf2193c468dc3093877af0c32e2ba3a45c4b3
4
+ data.tar.gz: fe12751ee701e51ae950b6027d6bba5b0274a628
5
5
  SHA512:
6
- metadata.gz: 3e6d524b4086e10312eb92e4f7a999d1aacd2e3104b1052b44c18d6c776791fa70fe2fb3096baa653b5eca2eb9deb1c3e74c55235bf394929f02db48ad5694ca
7
- data.tar.gz: 88456c0b18269ba3c474efab78f42939ca3ce336ac0012ef4c54ad0b611759b6cc1f5b7d2a259d83cd17375cafc6b71495c2cf0908811404d525ec792c7e3f0b
6
+ metadata.gz: ac2748d44640ace1211d323d5ea9f81b490e937b5ee854b8710898f40b930e0a9315931329f61d426512eb54783db722f5b8f563507d81901beab0f9fc2def0e
7
+ data.tar.gz: df8d59ee36c95e7c6be84b4559a0e6b7fc4c4450d07da3cf851d53eff3e7d110f998df0c2e0232cf56d8c17061c8627e3059f61af93b6bcace2d05d505fc65e4
data/bin/tiller CHANGED
@@ -247,6 +247,7 @@ module Tiller
247
247
  log.debug("MD5 of #{template} is #{template_md5}")
248
248
  file_md5 = Digest::MD5.hexdigest(File.read(filename))
249
249
  log.debug("MD5 of #{filename} is #{file_md5}")
250
+
250
251
  if template_md5 == file_md5
251
252
  log.info("Content unchanged for #{template}, not writing anything")
252
253
  skipped_templates += 1
@@ -255,7 +256,7 @@ module Tiller
255
256
  end
256
257
 
257
258
  target = open(target_values['target'], 'w')
258
- target.puts(parsed_template)
259
+ target.print(parsed_template)
259
260
  target.close
260
261
 
261
262
  updated_templates += 1
@@ -282,13 +283,17 @@ module Tiller
282
283
  end
283
284
 
284
285
  # Exec on write
285
- if target_values.key?('exec_on_write')
286
+ if target_values.key?('exec_on_write')
286
287
  if ! target_values['exec_on_write'].is_a?(Array)
287
288
  log.warn("Warning: exec_on_write for template #{template} is not in array format")
288
289
  else
289
- eow_pid=launch(target_values['exec_on_write'])
290
- pids.push(eow_pid)
291
- log.info("exec_on_write process for #{template} forked with PID #{eow_pid}")
290
+ if config[:no_exec] == true
291
+ log.info("no-exec option set, so not running exec_on_write for this template")
292
+ else
293
+ eow_pid=launch(target_values['exec_on_write'])
294
+ pids.push(eow_pid)
295
+ log.info("exec_on_write process for #{template} forked with PID #{eow_pid}")
296
+ end
292
297
  end
293
298
  end
294
299
 
@@ -1,6 +1,6 @@
1
1
  def parse_options(config)
2
2
  optparse = OptionParser.new do |opts|
3
- opts.on('-n', '--no-exec', 'Do not execute a replacement process') do
3
+ opts.on('-n', '--no-exec', 'Do not execute any processes') do
4
4
  config[:no_exec] = true
5
5
  end
6
6
  opts.on('-v', '--verbose', 'Display verbose output') do
@@ -1,3 +1,3 @@
1
1
  # http://semver.org/
2
- VERSION="1.4.1"
2
+ VERSION="1.5.0"
3
3
  SUPPORTED_RUBY_VERSION="2.2.0"
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: 1.4.1
4
+ version: 1.5.0
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: 2018-06-21 00:00:00.000000000 Z
11
+ date: 2018-02-04 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