Class: PEBuild::Config::Global
- Inherits:
-
Object
- Object
- PEBuild::Config::Global
- Includes:
- PEBuild::ConfigDefault
- Defined in:
- lib/pe_build/config/global.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#download_root ⇒ String
The root URI from which to download packages.
-
#filename ⇒ String
The exact name of the PE installer archive.
-
#series ⇒ String
The release series of PE.
-
#suffix ⇒ String
The distribution specifix suffix of the Puppet Enterprise installer to use.
-
#version ⇒ String
The version of PE to install.
-
#version_file ⇒ String, URI
A fully-qualified URI or a path relative to
download_root
.
Instance Method Summary collapse
- #finalize! ⇒ Object
-
#initialize ⇒ Global
constructor
A new instance of Global.
- #validate(machine) ⇒ Object
Constructor Details
#initialize ⇒ Global
Returns a new instance of Global.
48 49 50 51 52 53 54 55 |
# File 'lib/pe_build/config/global.rb', line 48 def initialize @download_root = UNSET_VALUE @version = UNSET_VALUE @version_file = UNSET_VALUE @series = UNSET_VALUE @suffix = UNSET_VALUE @filename = UNSET_VALUE end |
Instance Attribute Details
#download_root ⇒ String
Returns The root URI from which to download packages. The URI scheme must be one of the values listed in Transfer::IMPLEMENTATIONS.
12 13 14 |
# File 'lib/pe_build/config/global.rb', line 12 def download_root @download_root end |
#filename ⇒ String
Returns The exact name of the PE installer archive. If missing, a name will be constructed from #version.
46 47 48 |
# File 'lib/pe_build/config/global.rb', line 46 def filename @filename end |
#series ⇒ String
Returns The release series of PE. Completely optional and
currently has no effect other than being an interpolation token
available for use in download_root
.
34 35 36 |
# File 'lib/pe_build/config/global.rb', line 34 def series @series end |
#suffix ⇒ String
Returns The distribution specifix suffix of the Puppet Enterprise installer to use.
40 41 42 |
# File 'lib/pe_build/config/global.rb', line 40 def suffix @suffix end |
#version ⇒ String
Returns The version of PE to install. Must conform to
x.y.x[-optional-arbitrary-stuff]
. Used to determine the name of the
PE installer archive if filename
is unset.
19 20 21 |
# File 'lib/pe_build/config/global.rb', line 19 def version @version end |
#version_file ⇒ String, URI
Returns A fully-qualified URI or a path relative to
download_root
. The contents of this file will be read and used to
Specify version
.
26 27 28 |
# File 'lib/pe_build/config/global.rb', line 26 def version_file @version_file end |
Instance Method Details
#finalize! ⇒ Object
59 60 61 62 63 64 65 66 |
# File 'lib/pe_build/config/global.rb', line 59 def finalize! set_default :@version, nil set_default :@version_file, nil set_default :@series, nil set_default :@suffix, :detect set_default :@download_root, nil set_default :@filename, nil end |
#validate(machine) ⇒ Object
68 69 70 71 72 73 74 75 |
# File 'lib/pe_build/config/global.rb', line 68 def validate(machine) errors = [] validate_version(errors, machine) validate_download_root(errors, machine) {"PE build global config" => errors} end |