kafo 0.0.15 → 0.0.16

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.

@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 4febb461aa6503caff954eb79a85bfb7e9fd2872
4
+ data.tar.gz: 6e60596106b93a4a89183e149d7ab7d5a4a528af
5
+ SHA512:
6
+ metadata.gz: 804aeb0e1504ac6bd13dbf6c6a92b55f790bb13c12aa012363cf23434c05d254156550d53a83fa6fcc551d5ac5c0b8c858c77d1bfa87ec23d63603bcfc698c11
7
+ data.tar.gz: efa517c78ba534fd5fc1ae260ce528e474ccd3e6f288db6cfa3d83c4a5108ccd96ccf1549956a67fa4a5256961a97461058847e53e7134f020d2c06023a57078
@@ -87,7 +87,7 @@ class Configuration
87
87
  end
88
88
 
89
89
  def module_enabled?(mod)
90
- value = @data[mod.name]
90
+ value = @data[mod.is_a?(String) ? mod : mod.name]
91
91
  !!value || value.is_a?(Hash)
92
92
  end
93
93
 
@@ -107,19 +107,31 @@ class KafoConfigure < Clamp::Command
107
107
  end
108
108
  end
109
109
 
110
- private
111
-
112
- def exit(code)
113
- self.class.exit(code)
114
- end
115
-
116
110
  def params
117
- @params ||= config.modules.map(&:params).flatten
111
+ @params ||= modules.map(&:params).flatten
118
112
  rescue ModuleName => e
119
113
  puts e
120
114
  exit(:unknown_module)
121
115
  end
122
116
 
117
+ def modules
118
+ config.modules
119
+ end
120
+
121
+ def module(name)
122
+ modules.detect { |m| m.name == name}
123
+ end
124
+
125
+ def param(mod, name)
126
+ params.detect { |p| p.name == name && p.module.name == mod }
127
+ end
128
+
129
+ private
130
+
131
+ def exit(code)
132
+ self.class.exit(code)
133
+ end
134
+
123
135
  def set_parameters
124
136
  params.each do |param|
125
137
  # set values based on default_values
@@ -1,4 +1,4 @@
1
1
  # encoding: UTF-8
2
2
  module Kafo
3
- VERSION = "0.0.15"
3
+ VERSION = "0.0.16"
4
4
  end
@@ -78,7 +78,7 @@ END
78
78
 
79
79
  def configure(param)
80
80
  say "\n<%= color('Parameter #{param.name} (of module #{param.module.name})', :headline) %>"
81
- say "<%= color(\"#{param.doc.join("\n")}\", :important) %>"
81
+ say "<%= color(\"#{param.doc.join("\n").gsub('"','\"')}\", :important) %>"
82
82
  value = param.multivalued? ? configure_multi(param) : configure_single(param)
83
83
  value_was = param.value
84
84
  param.value = value unless value.empty?
metadata CHANGED
@@ -1,20 +1,18 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kafo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.15
5
- prerelease:
4
+ version: 0.0.16
6
5
  platform: ruby
7
6
  authors:
8
7
  - Marek Hulan
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-09-16 00:00:00.000000000 Z
11
+ date: 2013-09-26 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: bundler
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
17
  - - ~>
20
18
  - !ruby/object:Gem::Version
@@ -22,7 +20,6 @@ dependencies:
22
20
  type: :development
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
24
  - - ~>
28
25
  - !ruby/object:Gem::Version
@@ -30,23 +27,20 @@ dependencies:
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: rake
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
- - - ! '>='
31
+ - - '>='
36
32
  - !ruby/object:Gem::Version
37
33
  version: '0'
38
34
  type: :development
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
- - - ! '>='
38
+ - - '>='
44
39
  - !ruby/object:Gem::Version
45
40
  version: '0'
46
41
  - !ruby/object:Gem::Dependency
47
42
  name: minitest
48
43
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
44
  requirements:
51
45
  - - ~>
52
46
  - !ruby/object:Gem::Version
@@ -54,7 +48,6 @@ dependencies:
54
48
  type: :development
55
49
  prerelease: false
56
50
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
51
  requirements:
59
52
  - - ~>
60
53
  - !ruby/object:Gem::Version
@@ -62,166 +55,156 @@ dependencies:
62
55
  - !ruby/object:Gem::Dependency
63
56
  name: puppet
64
57
  requirement: !ruby/object:Gem::Requirement
65
- none: false
66
58
  requirements:
67
- - - ! '>='
59
+ - - '>='
68
60
  - !ruby/object:Gem::Version
69
61
  version: '0'
70
62
  type: :runtime
71
63
  prerelease: false
72
64
  version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
65
  requirements:
75
- - - ! '>='
66
+ - - '>='
76
67
  - !ruby/object:Gem::Version
77
68
  version: '0'
78
69
  - !ruby/object:Gem::Dependency
79
70
  name: rdoc
80
71
  requirement: !ruby/object:Gem::Requirement
81
- none: false
82
72
  requirements:
83
- - - ! '>='
73
+ - - '>='
84
74
  - !ruby/object:Gem::Version
85
75
  version: 3.9.0
86
76
  type: :runtime
87
77
  prerelease: false
88
78
  version_requirements: !ruby/object:Gem::Requirement
89
- none: false
90
79
  requirements:
91
- - - ! '>='
80
+ - - '>='
92
81
  - !ruby/object:Gem::Version
93
82
  version: 3.9.0
94
83
  - !ruby/object:Gem::Dependency
95
84
  name: logging
96
85
  requirement: !ruby/object:Gem::Requirement
97
- none: false
98
86
  requirements:
99
- - - ! '>='
87
+ - - '>='
100
88
  - !ruby/object:Gem::Version
101
89
  version: '0'
102
90
  type: :runtime
103
91
  prerelease: false
104
92
  version_requirements: !ruby/object:Gem::Requirement
105
- none: false
106
93
  requirements:
107
- - - ! '>='
94
+ - - '>='
108
95
  - !ruby/object:Gem::Version
109
96
  version: '0'
110
97
  - !ruby/object:Gem::Dependency
111
98
  name: clamp
112
99
  requirement: !ruby/object:Gem::Requirement
113
- none: false
114
100
  requirements:
115
- - - ! '>='
101
+ - - '>='
116
102
  - !ruby/object:Gem::Version
117
103
  version: '0'
118
104
  type: :runtime
119
105
  prerelease: false
120
106
  version_requirements: !ruby/object:Gem::Requirement
121
- none: false
122
107
  requirements:
123
- - - ! '>='
108
+ - - '>='
124
109
  - !ruby/object:Gem::Version
125
110
  version: '0'
126
111
  - !ruby/object:Gem::Dependency
127
112
  name: highline
128
113
  requirement: !ruby/object:Gem::Requirement
129
- none: false
130
114
  requirements:
131
- - - ! '>='
115
+ - - '>='
132
116
  - !ruby/object:Gem::Version
133
117
  version: '0'
134
118
  type: :runtime
135
119
  prerelease: false
136
120
  version_requirements: !ruby/object:Gem::Requirement
137
- none: false
138
121
  requirements:
139
- - - ! '>='
122
+ - - '>='
140
123
  - !ruby/object:Gem::Version
141
124
  version: '0'
142
125
  description: A gem for making installations based on puppet user friendly
143
126
  email:
144
127
  - ares@igloonet.cz
145
128
  executables:
146
- - kafofy
147
- - kafo-export-params
148
129
  - kafo-configure
130
+ - kafo-export-params
131
+ - kafofy
149
132
  extensions: []
150
133
  extra_rdoc_files: []
151
134
  files:
152
- - bin/kafofy
153
- - bin/kafo-export-params
154
135
  - bin/kafo-configure
155
- - config/config_header.txt
136
+ - bin/kafo-export-params
137
+ - bin/kafofy
156
138
  - config/kafo.yaml.example
157
- - lib/kafo.rb
158
- - lib/kafo/param.rb
159
- - lib/kafo/puppet_module_parser.rb
139
+ - config/config_header.txt
160
140
  - lib/kafo/puppet_module.rb
141
+ - lib/kafo/puppet_module_parser.rb
142
+ - lib/kafo/password_manager.rb
143
+ - lib/kafo/configuration.rb
144
+ - lib/kafo/validator.rb
145
+ - lib/kafo/exceptions.rb
161
146
  - lib/kafo/system_checker.rb
162
- - lib/kafo/params/array.rb
163
- - lib/kafo/params/boolean.rb
147
+ - lib/kafo/puppet_command.rb
148
+ - lib/kafo/wizard.rb
164
149
  - lib/kafo/params/password.rb
165
- - lib/kafo/params/integer.rb
166
150
  - lib/kafo/params/string.rb
167
- - lib/kafo/logger.rb
168
- - lib/kafo/puppet_command.rb
169
- - lib/kafo/param_builder.rb
170
- - lib/kafo/configuration.rb
171
- - lib/kafo/validator.rb
151
+ - lib/kafo/params/boolean.rb
152
+ - lib/kafo/params/array.rb
153
+ - lib/kafo/params/integer.rb
172
154
  - lib/kafo/kafo_configure.rb
173
- - lib/kafo/wizard.rb
174
- - lib/kafo/version.rb
175
- - lib/kafo/exceptions.rb
176
155
  - lib/kafo/string_helper.rb
177
- - lib/kafo/password_manager.rb
178
- - modules/create_resources/Modulefile
179
- - modules/create_resources/tests/users.pp
180
- - modules/create_resources/LICENSE
181
- - modules/create_resources/lib/puppet/parser/functions/create_resources.rb
182
- - modules/create_resources/Gemfile
183
- - modules/create_resources/README.md
184
- - modules/create_resources/spec/unit/puppet/parser/functions/create_resources_spec.rb
185
- - modules/create_resources/spec/spec_helper.rb
186
- - modules/create_resources/Rakefile
187
- - modules/kafo_configure/manifests/yaml_to_class.pp
188
- - modules/kafo_configure/manifests/init.pp
189
- - modules/kafo_configure/lib/puppet/parser/functions/hash_keys.rb
156
+ - lib/kafo/logger.rb
157
+ - lib/kafo/param.rb
158
+ - lib/kafo/version.rb
159
+ - lib/kafo/param_builder.rb
160
+ - lib/kafo.rb
190
161
  - modules/kafo_configure/lib/puppet/parser/functions/decrypt.rb
191
- - modules/kafo_configure/lib/puppet/parser/functions/loadanyyaml.rb
192
162
  - modules/kafo_configure/lib/puppet/parser/functions/is_hash.rb
193
163
  - modules/kafo_configure/lib/puppet/parser/functions/load_kafo_answer_file.rb
194
- - modules/kafo_configure/lib/puppet/parser/functions/kafo_ordered.rb
164
+ - modules/kafo_configure/lib/puppet/parser/functions/class_name.rb
195
165
  - modules/kafo_configure/lib/puppet/parser/functions/dump_values.rb
196
166
  - modules/kafo_configure/lib/puppet/parser/functions/load_kafo_password.rb
197
- - modules/kafo_configure/lib/puppet/parser/functions/class_name.rb
167
+ - modules/kafo_configure/lib/puppet/parser/functions/hash_keys.rb
168
+ - modules/kafo_configure/lib/puppet/parser/functions/kafo_ordered.rb
169
+ - modules/kafo_configure/lib/puppet/parser/functions/loadanyyaml.rb
170
+ - modules/kafo_configure/manifests/yaml_to_class.pp
171
+ - modules/kafo_configure/manifests/init.pp
172
+ - modules/create_resources/README.md
173
+ - modules/create_resources/Modulefile
174
+ - modules/create_resources/tests/users.pp
175
+ - modules/create_resources/Gemfile
176
+ - modules/create_resources/Rakefile
177
+ - modules/create_resources/lib/puppet/parser/functions/create_resources.rb
178
+ - modules/create_resources/LICENSE
179
+ - modules/create_resources/spec/unit/puppet/parser/functions/create_resources_spec.rb
180
+ - modules/create_resources/spec/spec_helper.rb
198
181
  - LICENSE.txt
199
182
  - Rakefile
200
183
  - README.md
201
184
  homepage: https://github.com/theforeman/kafo
202
185
  licenses:
203
186
  - GPLv3+
187
+ metadata: {}
204
188
  post_install_message:
205
189
  rdoc_options: []
206
190
  require_paths:
207
191
  - lib
208
192
  required_ruby_version: !ruby/object:Gem::Requirement
209
- none: false
210
193
  requirements:
211
- - - ! '>='
194
+ - - '>='
212
195
  - !ruby/object:Gem::Version
213
196
  version: '0'
214
197
  required_rubygems_version: !ruby/object:Gem::Requirement
215
- none: false
216
198
  requirements:
217
- - - ! '>='
199
+ - - '>='
218
200
  - !ruby/object:Gem::Version
219
201
  version: '0'
220
202
  requirements: []
221
203
  rubyforge_project:
222
- rubygems_version: 1.8.24
204
+ rubygems_version: 2.0.3
223
205
  signing_key:
224
- specification_version: 3
206
+ specification_version: 4
225
207
  summary: If you write puppet modules for installing your software, you can use kafo
226
208
  to create powerful installer
227
209
  test_files: []
210
+ has_rdoc: