Signed-off-by: James Turnbull <[email protected]>
---
lib/puppet/util/rdoc/parser.rb | 2 +-
spec/unit/util/rdoc/parser_spec.rb | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/lib/puppet/util/rdoc/parser.rb b/lib/puppet/util/rdoc/parser.rb
index 0693c44..9c86ec3 100644
--- a/lib/puppet/util/rdoc/parser.rb
+++ b/lib/puppet/util/rdoc/parser.rb
@@ -82,7 +82,7 @@ class Parser
# find a module
fullpath = File.expand_path(path)
Puppet.debug "rdoc: testing %s" % fullpath
- if fullpath =~ /(.*)\/([^\/]+)\/(?:manifests|plugins)\/.+\.(pp|rb)$/
+ if fullpath =~
/(.*)\/([^\/]+)\/(?:manifests|plugins|lib)\/.+\.(pp|rb)$/
modpath = $1
name = $2
Puppet.debug "rdoc: module %s into %s ?" % [name, modpath]
diff --git a/spec/unit/util/rdoc/parser_spec.rb
b/spec/unit/util/rdoc/parser_spec.rb
index 7113b95..d30c0c1 100755
--- a/spec/unit/util/rdoc/parser_spec.rb
+++ b/spec/unit/util/rdoc/parser_spec.rb
@@ -109,7 +109,7 @@ describe RDoc::Parser do
end
it "should defer plugins parsing to parse_plugins for this module" do
- @parser.input_file_name =
"module/plugins/puppet/parser/function.rb"
+ @parser.input_file_name = "module/lib/puppet/parser/function.rb"
@parser.expects(:parse_plugins).with(@module)
@@ -462,14 +462,14 @@ describe RDoc::Parser do
end
it "should delegate parsing custom facts to parse_facts" do
- @parser = RDoc::Parser.new(@top_level,
"module/manifests/plugins/puppet/facter/test.rb", nil, Options.instance,
RDoc::Stats.new)
+ @parser = RDoc::Parser.new(@top_level,
"module/manifests/lib/puppet/facter/test.rb", nil, Options.instance,
RDoc::Stats.new)
@parser.expects(:parse_fact).with(@container)
@parser.parse_plugins(@container)
end
it "should delegate parsing plugins to parse_plugins" do
- @parser = RDoc::Parser.new(@top_level,
"module/manifests/plugins/puppet/functions/test.rb", nil, Options.instance,
RDoc::Stats.new)
+ @parser = RDoc::Parser.new(@top_level,
"module/manifests/lib/puppet/functions/test.rb", nil, Options.instance,
RDoc::Stats.new)
@parser.expects(:parse_puppet_plugin).with(@container)
@parser.parse_plugins(@container)
--
1.6.6.1
--
You received this message because you are subscribed to the Google Groups
"Puppet Developers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-dev?hl=en.