forked from redcar/plugin_manager
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Rakefile
55 lines (45 loc) · 1.59 KB
/
Rakefile
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
require "rubygems"
require "rake/gempackagetask"
require "rake/rdoctask"
require "spec"
require "spec/rake/spectask"
Spec::Rake::SpecTask.new do |t|
t.spec_opts = %w(--format specdoc --colour)
t.libs = ["spec"]
end
task :default => ["spec"]
spec = Gem::Specification.new do |s|
s.name = "plugin_manager"
s.version = "1.1"
s.summary = "A Ruby plugin loader"
s.author = "Daniel Lucraft"
s.email = "[email protected]"
s.homepage = "http://github.com/danlucraft/plugin_manager"
s.has_rdoc = true
s.extra_rdoc_files = %w(README.md)
s.rdoc_options = %w(--main README.md)
s.files = %w(README.md) + Dir.glob("{bin,spec,lib/**/*}")
s.executables = FileList["bin/**"].map { |f| File.basename(f) }
s.require_paths = ["lib"]
s.add_development_dependency("rspec")
end
# This task actually builds the gem. We also regenerate a static
# .gemspec file, which is useful if something (i.e. GitHub) will
# be automatically building a gem for this project. If you're not
# using GitHub, edit as appropriate.
Rake::GemPackageTask.new(spec) do |pkg|
pkg.gem_spec = spec
# Generate the gemspec file for github.
file = File.dirname(__FILE__) + "/#{spec.name}.gemspec"
File.open(file, "w") {|f| f << spec.to_ruby }
end
# Generate documentation
Rake::RDocTask.new do |rd|
rd.main = "README.md"
rd.rdoc_files.include("README.md", "lib/**/*.rb")
rd.rdoc_dir = "rdoc"
end
desc 'Clear out RDoc and generated packages'
task :clean => [:clobber_rdoc, :clobber_package] do
rm "#{spec.name}.gemspec"
end