Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: modules/adblockplus/lib/puppet/parser/functions/manifest_exists.rb

Issue 29341151: Issue 4019 - Added "Edge" to platform choices in Issues tracker at issues1. (Closed)
Patch Set: Created May 10, 2016, 3:35 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « modules/adblockplus/files/sudoers/puppet ('k') | modules/adblockplus/manifests/host.pp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: modules/adblockplus/lib/puppet/parser/functions/manifest_exists.rb
===================================================================
deleted file mode 100644
--- a/modules/adblockplus/lib/puppet/parser/functions/manifest_exists.rb
+++ /dev/null
@@ -1,35 +0,0 @@
-module Puppet::Parser::Functions
-
- newfunction(:manifest_exists, :type => :rvalue, :doc => <<-'begin') do |args|
- Determine if a Puppet manifest (*.pp file) exists for the given type name,
- within the Puppet hierarchy of the (adblockplus) module's parent directory
- begin
-
- if args.size != 1
- message = "Usage: manifest_exists('some::definition::name')"
- raise Puppet::ParseError, message
- end
-
- # 'foo::bar::baz' => 'foo', ['bar', 'baz']
- module_name, *remainder = args[0].to_s.split('::')
-
- base_directory = File.expand_path(File.join(
- File.dirname(__FILE__),
- '..', # parser
- '..', # puppet
- '..', # lib
- '..', # $module
- '..' # modules
- ))
-
- manifest_path = File.join(
- base_directory,
- module_name,
- 'manifests',
- File.join(*remainder) << '.pp'
- )
-
- return File.exists? manifest_path
-
- end
-end
« no previous file with comments | « modules/adblockplus/files/sudoers/puppet ('k') | modules/adblockplus/manifests/host.pp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld