From 3d711436148093d41cde9692ddf4169ab83f5b90 Mon Sep 17 00:00:00 2001 From: Charlie Sharpsteen Date: Fri, 16 May 2014 10:54:34 -0700 Subject: [PATCH] Add skeleton of yardoc face Currently just reads in a path to a `.pp` file and runs it through a Pops parser. --- lib/puppet/application/yardoc.rb | 4 ++++ lib/puppet/face/yardoc.rb | 16 ++++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 lib/puppet/application/yardoc.rb create mode 100644 lib/puppet/face/yardoc.rb diff --git a/lib/puppet/application/yardoc.rb b/lib/puppet/application/yardoc.rb new file mode 100644 index 0000000..0133b57 --- /dev/null +++ b/lib/puppet/application/yardoc.rb @@ -0,0 +1,4 @@ +require 'puppet/application/face_base' + +class Puppet::Application::Yardoc < Puppet::Application::FaceBase +end diff --git a/lib/puppet/face/yardoc.rb b/lib/puppet/face/yardoc.rb new file mode 100644 index 0000000..b29faa5 --- /dev/null +++ b/lib/puppet/face/yardoc.rb @@ -0,0 +1,16 @@ +require 'puppet/face' +require 'puppet/pops' + +Puppet::Face.define(:yardoc, '0.0.1') do + + action(:yardoc) do + default + + when_invoked do |*args| + parser = Puppet::Pops::Parser::Parser.new() + parse_result = parser.parse_file(args[0]) + + return 0 + end + end +end