-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRakefile
More file actions
33 lines (29 loc) · 975 Bytes
/
Rakefile
File metadata and controls
33 lines (29 loc) · 975 Bytes
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
require 'rake'
require 'spec'
require 'spec/rake/spectask'
require 'rake/rdoctask'
require 'rubygems/specification'
require 'rake/gempackagetask'
task :default => [:spec]
Spec::Rake::SpecTask.new do |t|
t.spec_opts = ['--options', "spec/spec.opts"]
t.spec_files = FileList['spec/**/*_spec.rb']
t.rcov = true
t.rcov_opts = ['--exclude', 'spec,/*ruby*,/*gems*']
end
Rake::RDocTask.new { |rdoc|
rdoc.rdoc_dir = 'doc'
rdoc.title = "My AMEE - RDoc documentation"
rdoc.options << '--line-numbers' << '--inline-source' << '-A cattr_accessor=object'
rdoc.options << '--charset' << 'utf-8'
rdoc.rdoc_files.include('README', 'COPYING')
rdoc.rdoc_files.include('lib/**/*.rb')
}
# Gem build task - load gemspec from file
gemspec = File.read('my_amee_apps.gemspec')
spec = nil
# Eval gemspec in SAFE=3 mode to emulate github build environment
Thread.new { spec = eval("$SAFE = 3\n#{gemspec}") }.join
Rake::GemPackageTask.new(spec) do |p|
p.gem_spec = spec
end