Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 63 lines (53 sloc) 1.978 kb
43abd3b @mislav try to use Hanna for rake rdoc
authored
1 require 'rubygems'
2 begin
3 hanna_dir = '/home/mislav/projects/hanna/lib'
4 $:.unshift hanna_dir if File.exists? hanna_dir
5 require 'hanna/rdoctask'
6 rescue LoadError
7 require 'rake'
8 require 'rake/rdoctask'
9 end
1ef16f1 @mislav extract testing tasks to test/tasks.rake
authored
10 load 'test/tasks.rake'
079d0d8 Awesome new features, supersmart tests, great coverage!
mislav authored
11
12 desc 'Default: run unit tests.'
13 task :default => :test
14
0128efd Point users to the Lightouse URL
mislav authored
15 desc 'Generate RDoc documentation for the will_paginate plugin.'
079d0d8 Awesome new features, supersmart tests, great coverage!
mislav authored
16 Rake::RDocTask.new(:rdoc) do |rdoc|
43abd3b @mislav try to use Hanna for rake rdoc
authored
17 rdoc.rdoc_files.include('README.rdoc', 'LICENSE', 'CHANGELOG').
18 include('lib/**/*.rb').
9afc5e8 @mislav added WillPaginate::VERSION
authored
19 exclude('lib/will_paginate/named_scope*').
20 exclude('lib/will_paginate/array.rb').
21 exclude('lib/will_paginate/version.rb')
43abd3b @mislav try to use Hanna for rake rdoc
authored
22
4d7de72 @mislav add examples of pagination links styling
authored
23 rdoc.main = "README.rdoc" # page to start on
24 rdoc.title = "will_paginate documentation"
c7ec4a5 Will Paginate docs and contributors
mislav authored
25
9ba306e rdoc changes
chris authored
26 rdoc.rdoc_dir = 'doc' # rdoc output folder
43abd3b @mislav try to use Hanna for rake rdoc
authored
27 rdoc.options << '--inline-source' << '--charset=UTF-8'
1cc5730 @mislav clean up README; point people to examples/index.html
authored
28 rdoc.options << '--webcvs=http://github.com/mislav/will_paginate/tree/master/'
079d0d8 Awesome new features, supersmart tests, great coverage!
mislav authored
29 end
1464c8b @mislav gemify
authored
30
54bc63e @mislav goodbye, '.gemified'. we'll miss you
authored
31 desc %{Update ".manifest" with the latest list of project filenames. Respect\
32 .gitignore by excluding everything that git ignores. Update `files` and\
33 `test_files` arrays in "*.gemspec" file if it's present.}
1464c8b @mislav gemify
authored
34 task :manifest do
3334327 @mislav add gemspec file. change rake manifest to auto-update the gemspec. get r...
authored
35 list = Dir['**/*'].sort
36 spec_file = Dir['*.gemspec'].first
54bc63e @mislav goodbye, '.gemified'. we'll miss you
authored
37 list -= [spec_file] if spec_file
1464c8b @mislav gemify
authored
38
39 File.read('.gitignore').each_line do |glob|
40 glob = glob.chomp.sub(/^\//, '')
41 list -= Dir[glob]
7525ee8 @mislav fix rake manifest
authored
42 list -= Dir["#{glob}/**/*"] if File.directory?(glob) and !File.symlink?(glob)
1464c8b @mislav gemify
authored
43 puts "excluding #{glob}"
44 end
3bda0ba @mislav added prev_page/next_page CSS classes on prev/next "buttons" in views
authored
45
54bc63e @mislav goodbye, '.gemified'. we'll miss you
authored
46 if spec_file
47 spec = File.read spec_file
48 spec.gsub! /^(\s* s.(test_)?files \s* = \s* )( \[ [^\]]* \] | %w\( [^)]* \) )/mx do
49 assignment = $1
50 bunch = $2 ? list.grep(/^test\//) : list
51 '%s%%w(%s)' % [assignment, bunch.join(' ')]
52 end
53
54 File.open(spec_file, 'w') {|f| f << spec }
3334327 @mislav add gemspec file. change rake manifest to auto-update the gemspec. get r...
authored
55 end
56 File.open('.manifest', 'w') {|f| f << list.join("\n") }
e9814ca @mislav add rake release task
authored
57 end
58
3bda0ba @mislav added prev_page/next_page CSS classes on prev/next "buttons" in views
authored
59 task :examples do
60 %x(haml examples/index.haml examples/index.html)
61 %x(sass examples/pagination.sass examples/pagination.css)
62 end
Something went wrong with that request. Please try again.