git.lirion.de

Of git, get, and gud

summaryrefslogtreecommitdiffstats
path: root/site/no_fail_file
diff options
context:
space:
mode:
authormail_redacted_for_web 2016-03-17 14:38:12 -0700
committermail_redacted_for_web 2016-03-17 14:38:12 -0700
commit667c77892a1f3ef98982cfaf3cfb27c34aa15e28 (patch)
tree1474e0c8b5b0882466598c9b0c517cc963b5acd2 /site/no_fail_file
parentd250d971b91674fb5821839b20cfaac3e99dc8fd (diff)
parent4978905d9b66aad5497c29aefb7229f58bee7785 (diff)
downloadcontrol-repo-template-667c77892a1f3ef98982cfaf3cfb27c34aa15e28.tar.bz2
Merge pull request #22 from npwalker/breakout_git_webhook_into_a_module
Move profile::git_webhook into seperate module pe_code_manager_webhook
Diffstat (limited to 'site/no_fail_file')
-rw-r--r--site/no_fail_file/lib/puppet/parser/functions/no_fail_file.rb36
1 files changed, 0 insertions, 36 deletions
diff --git a/site/no_fail_file/lib/puppet/parser/functions/no_fail_file.rb b/site/no_fail_file/lib/puppet/parser/functions/no_fail_file.rb
deleted file mode 100644
index 3819ebf..0000000
--- a/site/no_fail_file/lib/puppet/parser/functions/no_fail_file.rb
+++ /dev/null
@@ -1,36 +0,0 @@
-require 'puppet/file_system'
-
-Puppet::Parser::Functions::newfunction(
- :no_fail_file, :arity => -2, :type => :rvalue,
- :doc => "Loads a file from a module and returns its contents as a string.
-
- This is a replacement to the file function that returns nothing
- if the file specified cannot be found instead of erroring out.
-
- The argument to this function should be a `<MODULE NAME>/<FILE>`
- reference, which will load `<FILE>` from a module's `files`
- directory. (For example, the reference `mysql/mysqltuner.pl` will load the
- file `<MODULES DIRECTORY>/mysql/files/mysqltuner.pl`.)
-
- This function can also accept:
-
- * An absolute path, which can load a file from anywhere on disk.
- * Multiple arguments, which will return the contents of the **first** file
- found, skipping any files that don't exist.
- "
-) do |vals|
- path = nil
- vals.each do |file|
- found = Puppet::Parser::Files.find_file(file, compiler.environment)
- if found && Puppet::FileSystem.exist?(found)
- path = found
- break
- end
- end
-
- if path
- Puppet::FileSystem.read_preserve_line_endings(path)
- else
- nil
- end
-end