Sha256: ee771d8eda04b30ca54901353e277e950e6cbc1558b93205b01dfaca1351a98f

Contents?: true

Size: 1.73 KB

Versions: 30

Compression:

Stored size: 1.73 KB

Contents

require 'rubygems'
begin
  hanna_dir = '/Users/mislav/Projects/Hanna/lib'
  $:.unshift hanna_dir if File.exists? hanna_dir
  require 'hanna/rdoctask'
rescue LoadError
  require 'rake'
  require 'rake/rdoctask'
end
load 'test/tasks.rake'

desc 'Default: run unit tests.'
task :default => :test

desc 'Generate RDoc documentation for the will_paginate plugin.'
Rake::RDocTask.new(:rdoc) do |rdoc|
  rdoc.rdoc_files.include('README.rdoc', 'LICENSE', 'CHANGELOG.rdoc').
    include('lib/**/*.rb').
    exclude('lib/will_paginate/named_scope*').
    exclude('lib/will_paginate/array.rb').
    exclude('lib/will_paginate/version.rb')
  
  rdoc.main = "README.rdoc" # page to start on
  rdoc.title = "will_paginate documentation"
  
  rdoc.rdoc_dir = 'doc' # rdoc output folder
  rdoc.options << '--inline-source' << '--charset=UTF-8'
  rdoc.options << '--webcvs=http://github.com/mislav/will_paginate/tree/master/'
end

desc %{Update ".manifest" with the latest list of project filenames. Respect\
.gitignore by excluding everything that git ignores. Update `files` and\
`test_files` arrays in "*.gemspec" file if it's present.}
task :manifest do
  list = `git ls-files --full-name --exclude=*.gemspec --exclude=.*`.chomp.split("\n")
  
  if spec_file = Dir['*.gemspec'].first
    spec = File.read spec_file
    spec.gsub! /^(\s* s.(test_)?files \s* = \s* )( \[ [^\]]* \] | %w\( [^)]* \) )/mx do
      assignment = $1
      bunch = $2 ? list.grep(/^test\//) : list
      '%s%%w(%s)' % [assignment, bunch.join(' ')]
    end
      
    File.open(spec_file, 'w') { |f| f << spec }
  end
  File.open('.manifest', 'w') { |f| f << list.join("\n") }
end

task :examples do
  %x(haml examples/index.haml examples/index.html)
  %x(sass examples/pagination.sass examples/pagination.css)
end

Version data entries

30 entries across 30 versions & 13 rubygems

Version Path
decisiv-will_paginate-2.3.8.1 Rakefile
fermion-will_paginate-2.3.8 Rakefile
gcirne-will_paginate-2.3.8 Rakefile
gigpark-will_paginate-2.3.11 Rakefile
mislav-will_paginate-2.3.10 Rakefile
mislav-will_paginate-2.3.8 Rakefile
shingara-will_paginate-2.3.10 Rakefile
Empact-will_paginate-2.3.15 Rakefile
will_paginate-2.3.15 Rakefile
will_paginate-2.3.14 Rakefile
refinerycms-0.9.6.34 vendor/plugins/will_paginate/Rakefile
refinerycms-0.9.6.33 vendor/plugins/will_paginate/Rakefile
refinerycms-0.9.6.32 vendor/plugins/will_paginate/Rakefile
djmaze-will_paginate-2.3.13 Rakefile
refinerycms-0.9.6.31 vendor/plugins/will_paginate/Rakefile
refinerycms-0.9.6.30 vendor/plugins/will_paginate/Rakefile
refinerycms-0.9.6.29 vendor/plugins/will_paginate/Rakefile
refinerycms-0.9.6.28 vendor/plugins/will_paginate/Rakefile
refinerycms-0.9.6.27 vendor/plugins/will_paginate/Rakefile
refinerycms-0.9.6.26 vendor/plugins/will_paginate/Rakefile