Support Ruby 1.8.7 using backports

The YARD plugin is currently architected using `require_relative` so that it
can be loaded outside of Puppet. Unfortunately, `require_relative` first
appeared in Ruby 1.9.1.

Achieve compatibility using the Backports gem.
This commit is contained in:
Charlie Sharpsteen 2014-05-24 16:49:54 -07:00
parent b4e2ed0e5c
commit 0eb6ec1158
1 changed files with 5 additions and 0 deletions

View File

@ -1,3 +1,8 @@
# TODO: Decide if supporting 1.8.7 is really worth it.
if RUBY_VERSION < '1.9'
require 'backports/1.9.1/kernel/require_relative'
end
require_relative 'parser' require_relative 'parser'
require_relative 'handlers' require_relative 'handlers'