Sha256: bb13a196098c717ca4c2ec76066f1088a5d21b43730395e0004dbfb78d38a1e8
Contents?: true
Size: 1.53 KB
Versions: 1
Compression:
Stored size: 1.53 KB
Contents
require 'rubygems' require 'sinatra/base' require 'haml' require 'yaml' module Rblosxom # Version number. module Version unless defined? MAJOR STRING = Gem::Specification.load(File.expand_path("../../rblosxom.gemspec", File.dirname(__FILE__))).version.to_s MAJOR, MINOR, PATCH = STRING.split(".").map { |i| i.to_i } end end module Helpers def set_common_variables @config = options.config require 'date' @footer = { :year => %/#{DateTime.now.year}/, :copyright => %/#{options.config["copyright"]}/, :generator => %/rblosxom #{::Rblosxom::Version::STRING}/ } end end class App < Sinatra::Application unless defined? CONFIG CONFIG = YAML.load(<<-END) title: Rblosxom slogan: My Slogan. description: Ruby based blosxom. language: en datadir: /data url: http://bitbucket.org/itsucks/rblosxom/ depth: 0 num_entries: 40 file_extension: mkd default_flavour: html show_future_entries: 0 theme: default logger_level: info copyright: Rblosxom END end set :config, Proc.new { (defined? config_file) ? YAML::load(File.read(config_file)) : CONFIG } set :public, Proc.new { root && File.join(root, "themes", config["theme"], "public") } include Helpers end end # vim: ft=ruby:fenc=utf-8:sw=4:ts=4:sts=4:et: # base.rb end here
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
rblosxom-0.1.0 | lib/rblosxom/base.rb |