Skip to content

HTTPS clone URL

Subversion checkout URL

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