forked from janlelis/irbtools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
37 lines (31 loc) · 956 Bytes
/
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
# require 'rake'
require 'fileutils'
def gemspec1
@gemspec1 ||= eval(File.read('irbtools.gemspec'), binding, 'irbtools.gemspec')
end
def gemspec2
@gemspec2 ||= eval(File.read('every_day_irb.gemspec'), binding, 'every_day_irb.gemspec')
end
desc "Build the gem"
task :gem => :gemspec do
sh "gem build irbtools.gemspec"
sh "gem build every_day_irb.gemspec"
FileUtils.mkdir_p 'pkg'
FileUtils.mv "#{gemspec1.name}-#{gemspec1.version}.gem", 'pkg'
FileUtils.mv "#{gemspec2.name}-#{gemspec2.version}.gem", 'pkg'
end
desc "Install the gem locally (without docs)"
task :install => :gem do
sh %{gem install pkg/#{gemspec2.name}-#{gemspec2.version}.gem --no-rdoc --no-ri}
sh %{gem install pkg/#{gemspec1.name}-#{gemspec1.version}.gem --no-rdoc --no-ri}
end
desc "Generate the gemspec"
task :generate do
puts gemspec1.to_ruby
puts gemspec2.to_ruby
end
desc "Validate the gemspec"
task :gemspec do
gemspec1.validate
gemspec2.validate
end