Sha256: 69b8755200d1da11c3b07ca8d434b60716ad55b0418d99d401ca508b3ab6223c

Contents?: true

Size: 816 Bytes

Versions: 1

Compression:

Stored size: 816 Bytes

Contents

require 'sinatra/base'
require 'extlib'

module RatPack
  VERSION = '0.2.2'
  LIBPATH = ::File.expand_path(::File.dirname(__FILE__)) + ::File::SEPARATOR
  PATH = ::File.dirname(LIBPATH) + ::File::SEPARATOR

  def self.version
    VERSION
  end

  def self.libpath( *args )
    args.empty? ? LIBPATH : ::File.join(LIBPATH, args.flatten)
  end

  def self.path( *args )
    args.empty? ? PATH : ::File.join(PATH, args.flatten)
  end

  def self.require_all_libs_relative_to( fname, dir = nil )
    dir ||= ::File.basename(fname, '.*')
    search_me = ::File.expand_path(
        ::File.join(::File.dirname(fname), dir, '**', '*.rb'))
    Dir.glob(search_me).sort.each {|rb| require rb }
  end
end  # module RatPack

RatPack.require_all_libs_relative_to(__FILE__)
require File.join(RatPack::LIBPATH,'sinatra','ratpack')

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
BrianTheCoder-ratpack-0.3.1 lib/ratpack.rb