pdk 0.2.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
data/lib/pdk/cli/input.rb DELETED
@@ -1,28 +0,0 @@
1
- module PDK
2
- module CLI
3
- module Input
4
- # Query the user for a value via STDIN.
5
- #
6
- # @param message [String] The message to be displayed to the user before
7
- # accepting input.
8
- # @param default [String] The default value to be used if the user
9
- # provides a blank value.
10
- #
11
- # @return [String] The value provided by the user (or the supplied
12
- # default value).
13
- def self.get(message, default = nil)
14
- print message
15
- if default.nil?
16
- print ' [(none)]'
17
- else
18
- print " [#{default}]"
19
- end
20
-
21
- print "\n--> "
22
- input = (STDIN.gets || '').chomp.strip
23
- input = default if input == ''
24
- input
25
- end
26
- end
27
- end
28
- end
@@ -1,34 +0,0 @@
1
- require 'pdk'
2
- require 'pdk/cli/exec'
3
- require 'pdk/validators/base_validator'
4
-
5
- module PDK
6
- module Validate
7
- class PuppetParser < BaseValidator
8
- def self.name
9
- 'puppet-parser'
10
- end
11
-
12
- def self.cmd
13
- 'puppet'
14
- end
15
-
16
- def self.pattern
17
- '**/**.pp'
18
- end
19
-
20
- def self.spinner_text
21
- _('Checking Puppet manifest syntax')
22
- end
23
-
24
- def self.parse_options(_options, targets)
25
- %w[parser validate].concat(targets)
26
- end
27
-
28
- def self.parse_output(_report, _json_data)
29
- # TODO: handle outputs
30
- # report.add_event(result.merge(state: :passed, severity: :ok))
31
- end
32
- end
33
- end
34
- end