abhay / calais

A Ruby interface to the Open Calais API (http://opencalais.com)

abhay (author)
Mon Jun 08 20:11:53 -0700 2009
commit  ac8d10314b190aa5a1a365bf5d97475e09ad0fbe
tree    813cacb531a29d5b821e7f3056dfd84664aa0bf1
parent  5492b3a6bda0212bdd2f334de4d3f4ceb827d51a
calais / Rakefile
0a0cd1b1 » abhay 2008-01-27 initial commit 1 # -*- ruby -*-
2
dcda25c1 » abhay 2009-06-08 jeweler for gem management ... 3 require 'rake'
4 require 'rake/clean'
0a0cd1b1 » abhay 2008-01-27 initial commit 5
6 require './lib/calais.rb'
7
dcda25c1 » abhay 2009-06-08 jeweler for gem management ... 8 begin
9 gem 'jeweler', '>= 1.0.1'
10 require 'jeweler'
11
12 Jeweler::Tasks.new do |s|
13 s.name = 'calais'
14 s.summary = 'A Ruby interface to the Calais Web Service'
d1abafc7 » abhay 2009-06-08 fix email address 15 s.email = 'info@opensynapse.net'
dcda25c1 » abhay 2009-06-08 jeweler for gem management ... 16 s.homepage = 'http://github.com/abhay/calais'
17 s.description = 'A Ruby interface to the Calais Web Service'
18 s.authors = ['Abhay Kumar']
19 s.files = FileList["[A-Z]*", "{bin,generators,lib,test}/**/*"]
20 s.rubyforge_project = 'calais'
21 s.add_dependency 'libxml-ruby', '>= 0.5.4'
22 s.add_dependency 'json', '>= 1.1.3'
23 s.add_dependency 'curb', '>= 0.1.4'
24 end
25 rescue LoadError
26 puts "Jeweler, or one of its dependencies, is not available. Please install it."
27 exit(1)
0a0cd1b1 » abhay 2008-01-27 initial commit 28 end
29
dcda25c1 » abhay 2009-06-08 jeweler for gem management ... 30 begin
31 require 'spec/rake/spectask'
32
33 desc "Run all specs"
34 Spec::Rake::SpecTask.new do |t|
35 t.spec_files = FileList["spec/**/*_spec.rb"].sort
36 t.spec_opts = ["--options", "spec/spec.opts"]
37 end
38
39 desc "Run all specs and get coverage statistics"
40 Spec::Rake::SpecTask.new('coverage') do |t|
41 t.spec_opts = ["--options", "spec/spec.opts"]
42 t.spec_files = FileList["spec/*_spec.rb"].sort
43 t.rcov_opts = ["--exclude", "spec", "--exclude", "gems"]
44 t.rcov = true
45 end
46
47 task :default => :spec
48 rescue LoadError
49 puts "RSpec, or one of its dependencies, is not available. Please install it."
50 exit(1)
0a0cd1b1 » abhay 2008-01-27 initial commit 51 end
52
dcda25c1 » abhay 2009-06-08 jeweler for gem management ... 53 begin
54 require 'yard'
55 require 'yard/rake/yardoc_task'
56
d2bb2a56 » abhay 2009-06-08 add license and changelog t... 57 YARD::Rake::YardocTask.new do |t|
a5cf5357 » abhay 2009-06-08 add extra files in yardoc ... 58 t.options = ["--verbose", "--markup=markdown", "--files=CHANGELOG.markdown,MIT-LICENSE"]
d2bb2a56 » abhay 2009-06-08 add license and changelog t... 59 end
60
dcda25c1 » abhay 2009-06-08 jeweler for gem management ... 61 task :rdoc => :yardoc
d2bb2a56 » abhay 2009-06-08 add license and changelog t... 62
dcda25c1 » abhay 2009-06-08 jeweler for gem management ... 63 CLOBBER.include 'doc'
64 CLOBBER.include '.yardoc'
65 rescue LoadError
66 puts "Yard, or one of its dependencies is not available. Please install it."
67 exit(1)
0a0cd1b1 » abhay 2008-01-27 initial commit 68 end
69
dcda25c1 » abhay 2009-06-08 jeweler for gem management ... 70 begin
71 require 'rake/contrib/sshpublisher'
72 namespace :rubyforge do
73
74 desc "Release gem and RDoc documentation to RubyForge"
75 task :release => ["rubyforge:release:gem", "rubyforge:release:docs"]
76
77 namespace :release do
78 desc "Publish RDoc to RubyForge."
79 task :docs => [:yardoc] do
80 config = YAML.load(
81 File.read(File.expand_path('~/.rubyforge/user-config.yml'))
82 )
83
84 host = "#{config['username']}@rubyforge.org"
85 remote_dir = "/var/www/gforge-projects/calais/"
86 local_dir = 'doc'
87
88 Rake::SshDirPublisher.new(host, remote_dir, local_dir).upload
89 end
90 end
91 end
92 rescue LoadError
93 puts "Rake SshDirPublisher is unavailable or your rubyforge environment is not configured."
94 exit(1)
95 end
0a0cd1b1 » abhay 2008-01-27 initial commit 96
97 # vim: syntax=Ruby