lib/slippery/rake_tasks.rb in slippery-0.4.1 vs lib/slippery/rake_tasks.rb in slippery-0.4.2
- old
+ new
@@ -49,10 +49,11 @@
instance_exec(node, &blk)
end
end
end
alias replace processor
+ alias transform processor
def pack_assets
@options[:include_assets] = true
end
alias self_contained pack_assets
@@ -78,12 +79,12 @@
processor 'head' do |head|
head <<= H[:title, title]
end
end
- def add_highlighting(style = Slippery::Processors::AddHighlight::DEFAULT_STYLE, version = Slippery::Processors::AddHighlight::DEFAULT_VERSION)
- processors << Slippery::Processors::AddHighlight.new(style, version)
+ def add_highlighting(style = Slippery::Processors::AddHighlight::DEFAULT_STYLE, version = :unused)
+ processors << Slippery::Processors::AddHighlight.new(style)
end
def define
namespace @name do
desc "build all"
@@ -119,10 +120,14 @@
puts "="*60
tmpfile = Tempfile.new("#{name}.html")
tmpfile << before
tmpfile.close
- print `diff -u #{tmpfile.path} #{name}.html | cut -c1-150`
+ if `which pup` =~ /pup/
+ print `bash -c 'diff -u <(cat #{tmpfile.path} | pup) <(cat #{name}.html | pup) | cut -c1-180'`
+ else
+ print `diff -u #{tmpfile.path} #{name}.html | cut -c1-180`
+ end
end
end
end
end
end