-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
168 lines (135 loc) · 5.26 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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
require "rubygems"
require "rubygems/package_task"
require "rdoc/task"
task :default => :package do
puts "Don't forget to write some tests!"
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 = "peak_id_mapper"
s.version = "0.1.0"
s.summary = "What this thing does"
s.author = "Ryan Taylor,,,"
s.email = "[email protected]"
s.homepage = "http://yoursite.example.com"
s.has_rdoc = true
# You should probably have a README of some kind. Change the filename
# as appropriate
# s.extra_rdoc_files = %w(README)
# s.rdoc_options = %w(--main README)
# Add any extra files to include in the gem (like your README)
s.files = %w(test.mzML ids_for_pepxml_insertion.data ids_for_pepxml_insertion.data~ gp41.pepxml~ ptest.pepxml) + Dir.glob("lib/*") + Dir.glob("spec/*")
# You need to put your code in a directory which can then be added to
# the $LOAD_PATH by rubygems. Typically this is lib, but you don't seem
# to have that directory. You'll need to set the line below to whatever
# directory your code is in. Rubygems is going to assume lib if you leave
# this blank.
#
# s.require_paths = ["lib"]
# If you want to depend on other gems, add them here, along with any
# relevant versions
# s.add_dependency("some_other_gem", "~> 0.1.0")
# If your tests use any gems, include them here
# s.add_development_dependency("mocha") # for example
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.
#
# To publish your gem online, install the 'gemcutter' gem; Read more
# about that here: http://gemcutter.org/pages/gem_docs
Gem::PackageTask.new(spec) do |pkg|
pkg.gem_spec = spec
end
desc "Build the gemspec file #{spec.name}.gemspec"
task :gemspec do
file = File.dirname(__FILE__) + "/#{spec.name}.gemspec"
File.open(file, "w") {|f| f << spec.to_ruby }
end
# If you don't want to generate the .gemspec file, just remove this line. Reasons
# why you might want to generate a gemspec:
# - using bundler with a git source
# - building the gem without rake (i.e. gem build blah.gemspec)
# - maybe others?
task :package => :gemspec
# Generate documentation
RDoc::Task.new do |rd|
rd.rdoc_files.include("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
require "rubygems"
require "rubygems/package_task"
require "rdoc/task"
require "rspec"
require "rspec/core/rake_task"
RSpec::Core::RakeTask.new do |t|
t.rspec_opts = %w(--format documentation --colour)
end
task :default => ["spec"]
# 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 = "peak_id_mapper"
s.version = "0.1.0"
s.summary = "What this thing does"
s.author = "Ryan Taylor,,,"
s.email = "[email protected]"
s.homepage = "http://yoursite.example.com"
s.has_rdoc = true
# You should probably have a README of some kind. Change the filename
# as appropriate
# s.extra_rdoc_files = %w(README)
# s.rdoc_options = %w(--main README)
# Add any extra files to include in the gem (like your README)
s.files = %w(test.mzML ids_for_pepxml_insertion.data Rakefile ids_for_pepxml_insertion.data~ gp41.pepxml~ ptest.pepxml) + Dir.glob("{spec,lib}/**/*")
s.require_paths = ["lib"]
# If you want to depend on other gems, add them here, along with any
# relevant versions
# s.add_dependency("some_other_gem", "~> 0.1.0")
# If your tests use any gems, include them here
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.
#
# To publish your gem online, install the 'gemcutter' gem; Read more
# about that here: http://gemcutter.org/pages/gem_docs
Gem::PackageTask.new(spec) do |pkg|
pkg.gem_spec = spec
end
desc "Build the gemspec file #{spec.name}.gemspec"
task :gemspec do
file = File.dirname(__FILE__) + "/#{spec.name}.gemspec"
File.open(file, "w") {|f| f << spec.to_ruby }
end
# If you don't want to generate the .gemspec file, just remove this line. Reasons
# why you might want to generate a gemspec:
# - using bundler with a git source
# - building the gem without rake (i.e. gem build blah.gemspec)
# - maybe others?
task :package => :gemspec
# Generate documentation
RDoc::Task.new do |rd|
rd.rdoc_files.include("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