-
Notifications
You must be signed in to change notification settings - Fork 9
/
Rakefile
74 lines (60 loc) · 2.28 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
require "rubygems"
require "rake/gempackagetask"
require "rake/rdoctask"
task :default => :spec
require "spec"
require "spec/rake/spectask"
Spec::Rake::SpecTask.new do |t|
t.spec_opts = %w(--format specdoc --colour)
t.libs = ["spec"]
end
# This builds the actual gem. For details of what all these options
# mean, and other ones you can add, check the documentation here:
#
# http://rubygems.org/read/chapter/20
#
spec = Gem::Specification.new do |s|
# Change these as appropriate
s.name = "jira"
s.version = "0.1.2"
s.summary = "A command line interface to the JIRA issue tracking system"
s.author = "Chris Lowis"
s.email = "[email protected]"
s.homepage = "http://github.com/chrislo/jira"
s.has_rdoc = true
s.extra_rdoc_files = %w(README.rdoc)
s.rdoc_options = %w(--main README.rdoc)
# Add any extra files to include in the gem
s.files = %w(jira.gemspec LICENSE README.rdoc) + Dir.glob("{bin,spec,lib}/**/*")
s.executables = FileList["bin/**"].map { |f| File.basename(f) }
s.require_paths = ["lib"]
# If you want to depend on other gems, add them here, along with any
# relevant versions
s.add_dependency("rest-client", ">=1.0.3")
s.add_dependency("xml-simple", ">=1.0.12")
s.add_development_dependency("rspec")
s.add_development_dependency("fakeweb", ">=1.2.7")
# If you want to publish automatically to rubyforge, you'll may need
# to tweak this, and the publishing task below too.
s.rubyforge_project = "jira"
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.rdoc"
rd.rdoc_files.include("README.rdoc", "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