The Puppet Labs Issue Tracker has Moved: https://tickets.puppetlabs.com

Feature #12765

Test Harness should use a relative require that is 1.8 and 1.9 compatible

Added by Justin Stoller about 2 years ago. Updated over 1 year ago.

Status:ClosedStart date:02/21/2012
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:Harness
Target version:-
Patch:None Branch:
Keywords:

We've Moved!

Ticket tracking is now hosted in JIRA: https://tickets.puppetlabs.com

This issue is currently not available for export. If you are experiencing the issue described below, please file a new ticket in JIRA. Once a new ticket has been created, please add a link to it that points back to this Redmine ticket.


Description

Ideally I think the Harness should a standard ruby library/gem structure and use simple requires, but until we can invest in the time to that I believe patching the harness to use a require_relative is the easiest solution. ie:

unless Kernel.respond_to?(:require_relative)
  module Kernel
    def require_relative(path)
      require File.join(File.dirname(caller[0]), path.to_str)
    end
  end
end

Related issues

Related to Puppet Acceptance - Feature #12743: Test Harness should be 1.9 compatible Closed 02/20/2012

History

#1 Updated by Branan Purvine-Riley over 1 year ago

  • Status changed from Accepted to Closed

Also available in: Atom PDF