fix conflict

This commit is contained in:
tdreyno 2010-10-31 19:25:05 -07:00
commit a89946a15e
6 changed files with 16 additions and 13 deletions

View file

@ -6,7 +6,10 @@ ENV['MM_ENV'] = "build"
require File.join(File.dirname(__FILE__), "..", "lib", "middleman") require File.join(File.dirname(__FILE__), "..", "lib", "middleman")
require 'middleman/builder' require 'middleman/builder'
# Initialize server once so features are loaded
Middleman::Server.new
# Middleman::Server.init! # Middleman::Server.init!
Middleman::Builder.init! Middleman::Builder.init!
Middleman::Generators.run_cli(Dir.pwd, 'mm-build', 1, %w(build --force).concat(ARGV)) Middleman::Generators.run_cli(Dir.pwd, 'mm-build', 1, %w(build --force).concat(ARGV))

View file

@ -25,4 +25,4 @@ end
get "/sub1/sub2/auto-css.html" do get "/sub1/sub2/auto-css.html" do
haml :"auto-css.html", :layout => false haml :"auto-css.html", :layout => false
end end

View file

@ -57,4 +57,4 @@ module Middleman
add :build, ::Middleman::Builder add :build, ::Middleman::Builder
end end
end end

View file

@ -6,13 +6,13 @@ module Middleman::Features::Slickmap
require 'slickmap' require 'slickmap'
@sitemap_url = "sitemap.html" @sitemap_url = "sitemap.html"
@sitemap_url = Middleman::Server.sitemap_url if (Middleman::Server.respond_to? :sitemap_url) @sitemap_url = app.sitemap_url if app.respond_to?(:slickmap_url)
if Middleman::Server.environment == :build if app.environment == :build
Middleman::Builder.template :slickmap, @sitemap_url, @sitemap_url Middleman::Builder.template :slickmap, @sitemap_url, @sitemap_url
end end
Middleman::Server.helpers do app.helpers do
def sitemap_node(n, first=false) def sitemap_node(n, first=false)
if n.children.length < 1 if n.children.length < 1
if !first && File.extname(n.dir).length > 0 if !first && File.extname(n.dir).length > 0
@ -46,7 +46,7 @@ module Middleman::Features::Slickmap
end end
end end
Middleman::Server.get "/#{@sitemap_url}" do app.get "/#{@sitemap_url}" do
# Return :utility to put it util top menu. False to ignore # Return :utility to put it util top menu. False to ignore
@tree, @utility = Middleman::Features::Slickmap.build_sitemap do |file_name| @tree, @utility = Middleman::Features::Slickmap.build_sitemap do |file_name|
:valid :valid
@ -87,4 +87,4 @@ module Middleman::Features::Slickmap
entry entry
end end
end end

View file

@ -23,4 +23,4 @@ class Templater::Actions::Template
@@rack_test.last_response.body @@rack_test.last_response.body
end end
end end
end end

View file

@ -9,7 +9,7 @@ Gem::Specification.new do |s|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version= s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["Thomas Reynolds"] s.authors = ["Thomas Reynolds"]
s.date = %q{2010-09-24} s.date = %q{2010-10-11}
s.email = %q{tdreyno@gmail.com} s.email = %q{tdreyno@gmail.com}
s.executables = ["mm-init", "mm-build", "mm-server"] s.executables = ["mm-init", "mm-build", "mm-server"]
s.extra_rdoc_files = [ s.extra_rdoc_files = [
@ -108,14 +108,14 @@ Gem::Specification.new do |s|
s.rdoc_options = ["--charset=UTF-8"] s.rdoc_options = ["--charset=UTF-8"]
s.require_paths = ["lib"] s.require_paths = ["lib"]
s.rubyforge_project = %q{middleman} s.rubyforge_project = %q{middleman}
s.rubygems_version = %q{1.3.7} s.rubygems_version = %q{1.3.6}
s.summary = %q{A static site generator utilizing Haml, Sass and providing YUI compression and cache busting} s.summary = %q{A static site generator utilizing Haml, Sass and providing YUI compression and cache busting}
if s.respond_to? :specification_version then if s.respond_to? :specification_version then
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
s.specification_version = 3 s.specification_version = 3
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
s.add_runtime_dependency(%q<rack>, ["~> 1.0"]) s.add_runtime_dependency(%q<rack>, ["~> 1.0"])
s.add_runtime_dependency(%q<thin>, ["~> 1.2.0"]) s.add_runtime_dependency(%q<thin>, ["~> 1.2.0"])
s.add_runtime_dependency(%q<shotgun>, ["~> 0.8.0"]) s.add_runtime_dependency(%q<shotgun>, ["~> 0.8.0"])