From ee06e01b54657297eace14afecc4e4b7ce0d909c Mon Sep 17 00:00:00 2001 From: Thomas Reynolds Date: Fri, 5 Aug 2011 10:32:53 -0700 Subject: [PATCH] switch to Maruku, avoid compiled extensions --- lib/middleman/core_extensions/front_matter.rb | 7 +++++-- lib/middleman/features/blog.rb | 2 -- lib/middleman/renderers/markdown.rb | 2 +- middleman.gemspec | 4 +--- 4 files changed, 7 insertions(+), 8 deletions(-) diff --git a/lib/middleman/core_extensions/front_matter.rb b/lib/middleman/core_extensions/front_matter.rb index 919f0e9b..1994e8ab 100644 --- a/lib/middleman/core_extensions/front_matter.rb +++ b/lib/middleman/core_extensions/front_matter.rb @@ -8,7 +8,8 @@ module Middleman::CoreExtensions::FrontMatter ::Tilt::register RDiscountTemplate, 'markdown', 'mkd', 'md' ::Tilt::register RedcarpetTemplate, 'markdown', 'mkd', 'md' - app.set :markdown_engine, RDiscountTemplate + ::Tilt::register MarukuTemplate, 'markdown', 'mkd', 'md' + app.set :markdown_engine, MarukuTemplate ::Tilt::register RedClothTemplate, 'textile' ::Tilt.prefer(RedClothTemplate) @@ -86,7 +87,9 @@ module Middleman::CoreExtensions::FrontMatter class RedcarpetTemplate < ::Tilt::RedcarpetTemplate include Middleman::CoreExtensions::FrontMatter::YamlAware end - + class MarukuTemplate < ::Tilt::MarukuTemplate + include Middleman::CoreExtensions::FrontMatter::YamlAware + end class RedClothTemplate < ::Tilt::RedClothTemplate include Middleman::CoreExtensions::FrontMatter::YamlAware end diff --git a/lib/middleman/features/blog.rb b/lib/middleman/features/blog.rb index 394f76f0..c39d0779 100644 --- a/lib/middleman/features/blog.rb +++ b/lib/middleman/features/blog.rb @@ -1,5 +1,3 @@ -require "rdiscount" - module Middleman module Features module Blog diff --git a/lib/middleman/renderers/markdown.rb b/lib/middleman/renderers/markdown.rb index 473610be..a3046c88 100644 --- a/lib/middleman/renderers/markdown.rb +++ b/lib/middleman/renderers/markdown.rb @@ -1,7 +1,7 @@ module Middleman::Renderers::Markdown class << self def registered(app) - app.set :markdown_engine, ::Tilt::RDiscountTemplate + app.set :markdown_engine, ::Tilt::MarukuTemplate app.after_configuration do ::Tilt.prefer(app.settings.markdown_engine) end diff --git a/middleman.gemspec b/middleman.gemspec index e322a597..8aeb8968 100644 --- a/middleman.gemspec +++ b/middleman.gemspec @@ -20,7 +20,7 @@ Gem::Specification.new do |s| s.add_runtime_dependency("thin", ["~> 1.2.11"]) s.add_runtime_dependency("thor", ["~> 0.14.0"]) s.add_runtime_dependency("tilt", ["~> 1.3.1"]) - s.add_runtime_dependency("rdiscount", ["~> 1.6.8"]) + s.add_runtime_dependency("maruku", ["~> 0.6.0"]) s.add_runtime_dependency("sinatra", ["~> 1.2.6"]) s.add_runtime_dependency("padrino-core", ["~> 0.10.1"]) s.add_runtime_dependency("padrino-helpers", ["~> 0.10.1"]) @@ -29,7 +29,6 @@ Gem::Specification.new do |s| s.add_runtime_dependency("slim", ["~> 0.9.0"]) s.add_runtime_dependency("haml", ["~> 3.1.0"]) s.add_runtime_dependency("sass", ["~> 3.1.5", '< 3.1.6']) - s.add_runtime_dependency("coffee-script", ["~> 2.2.0"]) s.add_runtime_dependency("compass", ["~> 0.11.3"]) s.add_runtime_dependency("coffee-script", ["~> 2.2.0"]) s.add_runtime_dependency("sprockets", ["2.0.0.beta.12"]) @@ -37,7 +36,6 @@ Gem::Specification.new do |s| s.add_runtime_dependency("guard", ["~> 0.5.1"]) s.add_runtime_dependency("guard-livereload", ["~> 0.2.1"]) s.add_development_dependency("coffee-filter", ["~> 0.1.1"]) - # s.add_development_dependency("jquery-rails", ["~> 1.0.12"]) s.add_development_dependency("cucumber", ["~> 1.0.2"]) s.add_development_dependency("rake", ["0.8.7"]) s.add_development_dependency("rspec", ["~> 2.6.0"])