kafo 0.3.8 → 0.3.9

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of kafo might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2097c6e99602c8b478265219c447052baaece53b
4
- data.tar.gz: 2edb25f2bbe58a5f25ba2ad3ee98b49bb1cd8532
3
+ metadata.gz: 1aba96236792eab1ec4fdf251ed8ffa9b2eb97b5
4
+ data.tar.gz: 985d1ca234e1b51e5004b7738c35673ecabed643
5
5
  SHA512:
6
- metadata.gz: 6e889867eb668c139ccffc103824e3597ee5c2122f9f9309b6eb359a099b90d491a0ea500dba55a86fb835b34133cabf8c1bd278181f6363e9ff28fbca4a72f0
7
- data.tar.gz: 8e72a851e7320ef021e5dc9bd3ceba54803dd4dd6cde30e9b4cf387269f100e74ec6507035bb8ba90b41858c968b5c84c640f315d9a75d6d29d5eb572c892f39
6
+ metadata.gz: 90264b64775acb7b4c08ad04b936fddf3e4650eab45fe9aa41013cff0db599373c48061a272a7d3ecd27afde0b6e773e94722327cb93b8192bda5319b11354d9
7
+ data.tar.gz: 6bde752677b5921c939fe56f1e6b045e0f7edd7f4b39b934318b85655d25805ac4e73ff618a7c34410f98cfbf6425766a55764c46af8671d9a67c23359213e94
data/bin/kafofy CHANGED
@@ -35,5 +35,5 @@ puts "Your directory was kafofied"
35
35
 
36
36
  puts "Now you should:"
37
37
  puts " 1. upload your puppet modules to modules directory (you can use librarian-puppet project)"
38
- puts " 2. create default config/answers.yaml or modify config/kafo.yaml to laod another answer file"
38
+ puts " 2. create default config/answers.yaml or modify config/kafo.yaml to load another answer file"
39
39
  puts " 3. run #{script_name}"
@@ -3,6 +3,8 @@
3
3
  # note current configuration is written to kafo.yaml every time kafo is run
4
4
 
5
5
  ## Installer configuration
6
+ # Your project name
7
+ # :name: Kafo
6
8
  # Path to answer file, if the file does not exist a $pwd/config/answers.yaml is used as a fallback
7
9
  # :answer_file: /etc/kafo/kafo.yaml
8
10
  # Custom installer path
@@ -13,6 +13,7 @@ module Kafo
13
13
 
14
14
  DEFAULT = {
15
15
  :log_dir => '/var/log/kafo',
16
+ :log_name => 'configuration.log',
16
17
  :log_level => 'info',
17
18
  :no_prefix => false,
18
19
  :mapping => {},
@@ -121,7 +122,7 @@ module Kafo
121
122
  def params
122
123
  params = modules.map(&:params).flatten
123
124
  params = params.select { |p| p.default != 'UNSET' }
124
- params.map { |param| "#{param.default}" }.join(',')
125
+ params.map { |param| "#{param.dump_default}" }.join(',')
125
126
  end
126
127
 
127
128
  def format(data)
@@ -26,6 +26,10 @@ module Kafo
26
26
  @value = value == 'UNDEF' ? nil : value
27
27
  end
28
28
 
29
+ def dump_default
30
+ default
31
+ end
32
+
29
33
  def module_name
30
34
  self.module.name
31
35
  end
@@ -6,6 +6,10 @@ module Kafo
6
6
  @value = typecast(@value)
7
7
  end
8
8
 
9
+ def dump_default
10
+ %{"#{super}"}
11
+ end
12
+
9
13
  private
10
14
 
11
15
  def typecast(value)
@@ -4,6 +4,10 @@ module Kafo
4
4
  def condition_value
5
5
  %{"#{value}"}
6
6
  end
7
+
8
+ def dump_default
9
+ %{"#{super}"}
10
+ end
7
11
  end
8
12
  end
9
13
  end
@@ -1,4 +1,4 @@
1
1
  # encoding: UTF-8
2
2
  module Kafo
3
- VERSION = "0.3.8"
3
+ VERSION = "0.3.9"
4
4
  end
@@ -4,7 +4,7 @@ module Puppet::Parser::Functions
4
4
  newfunction(:dump_values) do |args|
5
5
  options = []
6
6
  options<< false if Puppet::PUPPETVERSION.start_with?('2.6')
7
- data = Hash[args.map { |arg| [arg, lookupvar(arg, *options)] }]
7
+ data = Hash[args.map { |arg| [arg, lookupvar(arg, *options) || arg] }]
8
8
  dump_dir = YAML.load_file(lookupvar('kafo_config_file'))[:default_values_dir]
9
9
  File.open("#{dump_dir}/default_values.yaml", 'w') { |file| file.write(YAML.dump(data)) }
10
10
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kafo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.8
4
+ version: 0.3.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marek Hulan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-01-24 00:00:00.000000000 Z
11
+ date: 2014-01-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler