Permalink
Browse files

partially cleanup require/paths hell

  • Loading branch information...
1 parent d841d89 commit 4c5d47a16d7a3c28e2c612041074697cb012de7d @vast committed May 17, 2012
Showing with 3 additions and 13 deletions.
  1. +1 −10 bin/rokko
  2. +0 −1 lib/rokko.rb
  3. +1 −1 lib/rokko/index_layout.rb
  4. +1 −1 lib/rokko/layout.rb
View
@@ -12,16 +12,7 @@
require 'optparse'
require 'fileutils'
-begin
- $:.unshift(File.expand_path('../../lib', __FILE__).sub(/^#{Dir.pwd}\//, ''))
- require 'rokko'
-rescue LoadError
- if !defined?(Gem)
- require 'rubygems'
- retry
- end
- raise
-end
+require 'rokko'
# Write usage message to stdout and exit
def usage(stream=$stderr, status=1)
View
@@ -118,7 +118,6 @@ def prettify(blocks)
def to_html
require 'mustache'
- $:.unshift(File.dirname(__FILE__))
require 'rokko/layout'
::Rokko::Layout.new(self).render
@@ -1,5 +1,5 @@
class Rokko::IndexLayout < Rokko::Layout
- self.template_path = File.dirname(__FILE__)
+ self.template_file = File.join(File.dirname(__FILE__), 'index_layout.mustache')
def initialize(sources, readme = '', options = {})
@sources = sources
View
@@ -2,7 +2,7 @@
module Rokko
class Layout < Mustache
- self.template_path = File.dirname(__FILE__)
+ self.template_file = File.join(File.dirname(__FILE__), 'layout.mustache')
def initialize(doc)
@doc = doc

0 comments on commit 4c5d47a

Please sign in to comment.