public
Description: A universal interface to import email contacts from various providers including Yahoo, Gmail, Hotmail, and Plaxo.
Homepage: http://rubyforge.org/projects/contacts
Clone URL: git://github.com/cardmagic/contacts.git
Click here to lend your support to: contacts and make a donation at www.pledgie.com !
commit  42b49ad5f5a9b0554f0560634fcf29e1a929a424
tree    9e347ac888153d1c7f92391c371c072840ed1b66
parent  b96b8ea7884fda5da08372899ae911e3e074ca57
contacts / Rakefile
100644 90 lines (70 sloc) 2.259 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
require 'rubygems'
require 'rake'
require 'rake/testtask'
require 'rake/rdoctask'
require 'rake/gempackagetask'
require 'rake/contrib/rubyforgepublisher'
require 'lib/contacts'
 
PKG_VERSION = Contacts::VERSION
 
PKG_FILES = FileList[
    "lib/**/*", "bin/*", "test/**/*", "[A-Z]*", "Rakefile", "doc/**/*", "examples/**/*"
] - ["test/accounts.yml"]
 
desc "Default Task"
task :default => [ :test ]
 
# Run the unit tests
desc "Run all unit tests"
Rake::TestTask.new("test") { |t|
  t.libs << "lib"
  t.pattern = 'test/*/*_test.rb'
  t.verbose = true
}
 
# Make a console, useful when working on tests
desc "Generate a test console"
task :console do
   verbose( false ) { sh "irb -I lib/ -r 'contacts'" }
end
 
# Genereate the RDoc documentation
desc "Create documentation"
Rake::RDocTask.new("doc") { |rdoc|
  rdoc.title = "Contact List - ridiculously easy contact list information from various providers including Yahoo, Gmail, and Hotmail"
  rdoc.rdoc_dir = 'doc'
  rdoc.rdoc_files.include('README')
  rdoc.rdoc_files.include('lib/**/*.rb')
}
 
# Genereate the package
spec = Gem::Specification.new do |s|
 
  #### Basic information.
 
  s.name = 'contacts'
  s.version = PKG_VERSION
  s.summary = <<-EOF
Ridiculously easy contact list information from various providers including Yahoo, Gmail, and Hotmail
EOF
  s.description = <<-EOF
Ridiculously easy contact list information from various providers including Yahoo, Gmail, and Hotmail
EOF
 
  #### Which files are to be included in this gem? Everything! (Except CVS directories.)
 
  s.files = PKG_FILES
 
  #### Load-time details: library and application (you will need one or both).
 
  s.require_path = 'lib'
  s.autorequire = 'contacts'
 
  s.add_dependency('json', '>= 0.4.1')
  s.requirements << "A json parser"
 
  #### Documentation and testing.
 
  s.has_rdoc = true
 
  #### Author and project details.
 
  s.author = "Lucas Carlson"
  s.email = "lucas@rufy.com"
  s.homepage = "http://rubyforge.org/projects/contacts"
end
 
Rake::GemPackageTask.new(spec) do |pkg|
  pkg.need_zip = true
  pkg.need_tar = true
end
 
desc "Report code statistics (KLOCs, etc) from the application"
task :stats do
  require 'code_statistics'
  CodeStatistics.new(
    ["Library", "lib"],
    ["Units", "test"]
  ).to_s
end