public
Fork of technoweenie/mephisto
Description: User-friendly blogging with multisite support and asset managment
Homepage: http://mephistoblog.com/
Clone URL: git://github.com/emk/mephisto.git
Spyridon Vasileiadis (author)
Sun Mar 15 06:53:26 -0700 2009
emk (committer)
Sun Mar 15 06:56:38 -0700 2009
100644 38 lines (33 sloc) 1.585 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# Run this rake file by navigating to the
# 'vendor/plugins/filtered_column_code_macro' directory on the command line
# and run "rake" execute the unit tests. A new 'default_coderay.css' may be
# generated by running "rake generate_default_coderay_stylesheet". Generating
# a new default stylesheet is useful after the CodeRay gem has been updated.
require 'rake'
require 'rake/testtask'
require 'pathname'
 
# require the coderay gem in the vendor/gems dir
# (not dependent on globally installed coderay gem)
$: << Pathname.glob(Pathname(__FILE__).parent.parent.parent + 'gems' + 'coderay*' + 'lib').to_s
require 'coderay'
 
task :default => :test
 
# This task is useful to generate a new default CodeRay stylesheet after
# updating the coderay gem in 'vendor/gems' to insure that the
# 'default_coderay.css' stylesheet is compatible with the updated gem.
# Be sure to regression test the css in an assortment of browsers after
# generating a new coderay stylesheet since the 'default_codemacro.css'
# stylesheet over-rides some of the CodeRay styles. Note that it is
# very unlikely that a change to the default CodeRay stylesheet would
# probably not be big enough to cause any problems.
desc 'Generate default_coderay.css'
task :generate_default_coderay_stylesheet do
  File.open(File.join(File.dirname(__FILE__), 'assets', 'default_coderay.css'), "wb") do |file|
file.write(CodeRay::Encoders[:html]::CSS.new.stylesheet)
end
end
 
desc 'Test the code_macro plugin.'
Rake::TestTask.new(:test) do |t|
  t.libs << 'lib'
  t.pattern = 'test/**/*_test.rb'
  t.verbose = true
end