forked from toolmantim/bananajour
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Rakefile
64 lines (53 loc) · 1.85 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
$:.unshift "#{File.dirname(__FILE__)}/lib"
require "bananajour/gem_dependencies"
require "bananajour/version"
gem = Gem::Specification.new do |gem|
gem.name = "bananajour"
gem.version = Bananajour::VERSION
gem.platform = Gem::Platform::RUBY
gem.extra_rdoc_files = ["Readme.md"]
gem.summary = "Local git repository hosting with a sexy web interface and bonjour discovery. It's like your own little adhoc, network-aware github!"
gem.description = gem.summary
gem.authors = ["Tim Lucas"]
gem.email = "[email protected]"
gem.homepage = "https://github.com/toolmantim/bananajour"
gem.require_path = "lib"
gem.files = %w(Readme.md Rakefile) + Dir.glob("{bin,lib,sinatra}/**/*")
gem.has_rdoc = false
gem.bindir = 'bin'
gem.executables = [ 'bananajour' ]
Bananajour::GemDependencies.all.each {|dep| gem.add_runtime_dependency( dep.name, ">= #{dep.version}" ) }
end
task :clean do
FileUtils.rm_rf Dir['*.gem', '*.gemspec']
end
namespace :gem do
desc "Rebuild and install bananajour as a gem"
task :install => :package do
require 'rubygems/installer'
Dir['*.gem'].each do |gem|
Gem::Installer.new(gem).install
end
end
desc "Create the gem"
task :package => [:clean, "spec:generate"] do
require 'rubygems/builder'
Gem::Builder.new( gem ).build
end
namespace :spec do
desc "Update #{gem.name}.gemspec"
task :generate do
File.open("#{gem.name}.gemspec", "w") do |f|
f.puts(gem.to_ruby)
end
end
desc "Test spec in github cleanroom"
task :test => :generate do
require 'rubygems/specification'
data = File.read("#{gem.name}.gemspec")
spec = nil
Thread.new { spec = eval("$SAFE = 3\n#{data}") }.join
puts "#{spec} - Good to go!"
end
end
end