From 9e3281738023fad5cb8fb2f2b5741c72d0b68fdb Mon Sep 17 00:00:00 2001 From: Hailee Kenney Date: Tue, 8 Dec 2015 12:00:58 -0800 Subject: [PATCH] (maint) Fix ruby namespacing issue Prior to this commit, strings would raise an error when the server command was run against a module directory that contained the strings module. This was due to the fact that we were trying to reference the YARD namespace but our own namespace was being prepending to the front, making Ruby think the two class were the same. In order to stop this from happening, prepend a :: to the front of the YARD version of the class to tell Ruby that we mean the YARD namespace. --- .gitignore | 1 + lib/puppet_x/puppetlabs/strings/yard/handlers/base.rb | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 3369cc4..936d40a 100644 --- a/.gitignore +++ b/.gitignore @@ -20,6 +20,7 @@ Gemfile.lock ## YARD .yardoc +.yardwarns ## MODULE BUILDS **/pkg diff --git a/lib/puppet_x/puppetlabs/strings/yard/handlers/base.rb b/lib/puppet_x/puppetlabs/strings/yard/handlers/base.rb index 66327ae..0bd3e60 100644 --- a/lib/puppet_x/puppetlabs/strings/yard/handlers/base.rb +++ b/lib/puppet_x/puppetlabs/strings/yard/handlers/base.rb @@ -1,6 +1,6 @@ require 'puppet_x/puppetlabs/strings/yard/core_ext/yard' -class PuppetX::PuppetLabs::Strings::YARD::Handlers::Base < YARD::Handlers::Base +class PuppetX::PuppetLabs::Strings::YARD::Handlers::Base < ::YARD::Handlers::Base # Easy access to Pops model objects for handler matching. include Puppet::Pops::Model # Easy access to custom code objects from which documentation is generated.