From 20d3e705e36da98239558b328c346b89440a6e23 Mon Sep 17 00:00:00 2001 From: Chris Eppstein Date: Fri, 12 Nov 2010 21:45:24 -0800 Subject: [PATCH] Update nanoc so we can use the new watcher. --- doc-src/Gemfile | 5 ++--- doc-src/Gemfile.lock | 9 ++++----- doc-src/lib/data_sources/nanoc_monkey_patches.rb | 10 +++++----- doc-src/lib/stylesheets/sass_extensions.rb | 8 ++++++-- 4 files changed, 17 insertions(+), 15 deletions(-) diff --git a/doc-src/Gemfile b/doc-src/Gemfile index 40e59eeb..dca10842 100644 --- a/doc-src/Gemfile +++ b/doc-src/Gemfile @@ -1,7 +1,6 @@ source :gemcutter -# We can switch nanoc to a normal gem when 3.1.3 is released. -gem 'nanoc3', :require => false, :git => "git://github.com/chriseppstein/nanoc.git", :branch => "3.1.x" +gem 'nanoc3', :git => "git://github.com/chriseppstein/nanoc.git" gem 'rdiscount' gem 'thor' gem 'rack' @@ -11,7 +10,7 @@ gem 'serve', "1.0.0" gem 'mongrel' gem 'nokogiri' gem 'coderay' -gem 'haml', ">=3.0.6", :require => 'sass' +gem 'haml', ">=3.0.23", :require => 'sass' gem 'rake' gem 'compass', :path => ".." gem 'compass-susy-plugin', ">=0.7.0.pre8" diff --git a/doc-src/Gemfile.lock b/doc-src/Gemfile.lock index afc1cd9d..4706f997 100644 --- a/doc-src/Gemfile.lock +++ b/doc-src/Gemfile.lock @@ -1,9 +1,8 @@ GIT remote: git://github.com/chriseppstein/nanoc.git - revision: 3982942 - branch: 3.1.x + revision: 4ecb400489c83fd2068659de0c651733b8dad28f specs: - nanoc3 (3.1.2) + nanoc3 (3.2.0a3) cri (>= 1.0.0) PATH @@ -24,7 +23,7 @@ GEM compass (>= 0.10.0.rc3) fssm (0.1.4) gem_plugin (0.2.3) - haml (3.0.16) + haml (3.0.23) i18n (0.4.2) json (1.4.5) mime-types (1.16) @@ -51,7 +50,7 @@ DEPENDENCIES compass-susy-plugin (>= 0.7.0.pre8) css-slideshow (= 0.2.0) fssm - haml (>= 3.0.6) + haml (>= 3.0.23) json mime-types mongrel diff --git a/doc-src/lib/data_sources/nanoc_monkey_patches.rb b/doc-src/lib/data_sources/nanoc_monkey_patches.rb index b38e47ee..f04c844b 100644 --- a/doc-src/lib/data_sources/nanoc_monkey_patches.rb +++ b/doc-src/lib/data_sources/nanoc_monkey_patches.rb @@ -1,12 +1,12 @@ class Nanoc3::Site def cached(key) - if cache.has_key?(key) - cache[key] + if cached_stuff.has_key?(key) + cached_stuff[key] else - cache[key]= yield + cached_stuff[key]= yield end end - def cache - @cache ||= {} + def cached_stuff + @cached_stuff ||= {} end end diff --git a/doc-src/lib/stylesheets/sass_extensions.rb b/doc-src/lib/stylesheets/sass_extensions.rb index 010dcd2c..dcf77717 100644 --- a/doc-src/lib/stylesheets/sass_extensions.rb +++ b/doc-src/lib/stylesheets/sass_extensions.rb @@ -61,8 +61,12 @@ module Sass attr_accessor :imported_filename unless method_defined? :imported_filename end class CommentNode < Node - PRE_COMMENT = %r{(^ */*\**(\s*\|)?( |$))} - POST_COMMENT = %r{ *\*/$} + unless defined?(PRE_COMMENT) + PRE_COMMENT = %r{(^ */*\**(\s*\|)?( |$))} + end + unless defined?(POST_COMMENT) + POST_COMMENT = %r{ *\*/$} + end def self.clean(docstring) docstring.gsub(/@doc off(.*?)@doc on/m, '') end