nofxx / friendly_id forked from norman/friendly_id

FriendlyId is the “Swiss Army bulldozer” of slugging and permalink plugins for ActiveRecord. It allows you to create pretty URL’s and work with human-friendly strings as if they were numeric ids for ActiveRecord models.

This URL has Read+Write access

friendly_id / Rakefile
100644 51 lines (46 sloc) 1.55 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
39
40
41
42
43
44
45
46
47
48
49
50
51
require 'newgem'
require 'lib/friendly_id/version'
 
$hoe = Hoe.new("friendly_id", FriendlyId::Version::STRING) do |p|
  p.rubyforge_name = "friendly-id"
  p.author = ['Norman Clarke', 'Adrian Mugnolo', 'Emilio Tagua']
  p.email = ['norman@rubysouth.com', 'adrian@rubysouth.com', 'miloops@gmail.com']
  p.summary = "A comprehensive slugging and pretty-URL plugin for ActiveRecord."
  p.description = 'A comprehensive slugging and pretty-URL plugin for ActiveRecord.'
  p.url = 'http://friendly-id.rubyforge.org/'
  p.test_globs = ['test/**/*_test.rb']
  p.extra_deps << ['activerecord', '>= 2.0.0']
  p.extra_deps << ['activesupport', '>= 2.0.0']
  p.extra_dev_deps << ['newgem', ">= #{::Newgem::VERSION}"]
  p.extra_dev_deps << ['sqlite3-ruby']
  p.remote_rdoc_dir = ""
end
 
require 'newgem/tasks'
 
desc "Run RCov"
task :rcov do
  run_coverage Dir["test/**/*_test.rb"]
end
 
def run_coverage(files)
  rm_f "coverage"
  rm_f "coverage.data"
  if files.length == 0
    puts "No files were specified for testing"
    return
  end
  files = files.join(" ")
  if PLATFORM =~ /darwin/
    exclude = '--exclude "gems/"'
  else
    exclude = '--exclude "rubygems"'
  end
  rcov = "rcov -Ilib:test --sort coverage --text-report #{exclude} --no-validator-links"
  cmd = "#{rcov} #{files}"
  puts cmd
  sh cmd
end
 
desc 'Publish RDoc to RubyForge.'
task :publish_docs => [:clean, :docs] do
  host = "compay@rubyforge.org"
  remote_dir = "/var/www/gforge-projects/friendly-id"
  local_dir = 'doc'
  sh %{rsync -av --delete #{local_dir}/ #{host}:#{remote_dir}}
end