Module: PuppetFixtures
- Defined in:
- lib/puppet_fixtures.rb
Overview
PuppetFixtures is a mechanism to download Puppet fixtures.
These fixtures can be symlinks, repositories (git or Mercurial) or forge modules.
Defined Under Namespace
Modules: Repository Classes: Fixtures, Metadata, Symlink
Class Method Summary collapse
-
.deep_expand_env(value) ⇒ Object
private
The value with environment variables expanded.
-
.windows? ⇒ Boolean
True if the os is a windows system.
Class Method Details
.deep_expand_env(value) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns The value with environment variables expanded.
26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/puppet_fixtures.rb', line 26 def self.(value) case value when String value.gsub(/\$\{([^}]+)\}/) { ENV.fetch(Regexp.last_match(1)) { Regexp.last_match(0) } } when Hash value.transform_values { |v| (v) } when Array value.map { |v| (v) } else value end end |
.windows? ⇒ Boolean
Returns true if the os is a windows system.
15 16 17 18 19 |
# File 'lib/puppet_fixtures.rb', line 15 def self.windows? # Ruby only sets File::ALT_SEPARATOR on Windows and Rubys standard library # uses this to check for Windows !!File::ALT_SEPARATOR end |