forked from dropio/dropio
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRakefile
More file actions
71 lines (56 loc) · 2.18 KB
/
Rakefile
File metadata and controls
71 lines (56 loc) · 2.18 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
require 'rubygems'
require 'bundler'
Bundler.setup :development, :test
$: << File.expand_path('./lib')
require 'rmb/version'
### Echoe
begin
require 'echoe'
Echoe.new('rmb', Rmb::VERSION) do |echoe|
echoe.summary = "A Ruby client library for the Rich Media Backbone (RMB) API (http://rmb.io)"
echoe.author = ["Jake Good", "Eric Skiff", "Kunal Shah", "Seth Thomas Rasmussen", "Bryan Woods"]
echoe.email = ["jake@dropio.com", "eric@dropio.com", "kunal@dropio.com", "seth@dropio.com", "bryan@dropio.com"]
echoe.url = "http://github.com/dropio/rmb"
echoe.retain_gemspec = true
echoe.changelog = "History.rdoc"
# TODO have this generated from Gemfile or vice versa
echoe.runtime_dependencies = ["mime-types", "json", "httparty 0.6.1", "multipart-post 1.0.1", "orderedhash 0.0.6"]
echoe.development_dependencies = ["rspec", "diff-lcs", "fakeweb"]
echoe.ignore_pattern = "tmtags"
# Use this rdoc_pattern when building docs locally or publishing docs.
# echoe.rdoc_pattern = Regexp.union(echoe.rdoc_pattern, /\.rdoc$/)
echoe.rdoc_pattern = /\.rdoc$/
end
# Until we find a way to undefine rake tasks...
# %w{coverage clobber_coverage}.each { |name| Rake::Task[name].comment = "(don't use)" }
# default depends on test, but we don't have a test task. Define a trivial one.
task :test
rescue LoadError
puts "(Note: Echoe not found. Install echoe gem for package management tasks.)"
end
### RSpec
require 'spec/rake/spectask'
task :default => :spec
Spec::Rake::SpecTask.new(:spec)
namespace :spec do
Spec::Rake::SpecTask.new(:rcov) do |t|
t.rcov = true
t.rcov_opts = %w{ --exclude ^/ --exclude ^spec/ --sort coverage }
end
namespace :rcov do
desc "Generate and view RCov report"
task :view => :rcov do
coverage_index = File.expand_path(File.join(File.dirname(__FILE__), 'coverage', 'index.html'))
sh "open file://#{coverage_index}"
end
end
end
### RDoc
require 'rake/rdoctask'
namespace :docs do
desc "Generate and view RDoc documentation"
task :view => :docs do
doc_index = File.expand_path(File.join(File.dirname(__FILE__), 'doc', 'index.html'))
sh "open file://#{doc_index}"
end
end