avoid NilMethodError if get_file_data is passed an invalid key
[ruby-mogilefs-client.git] / Rakefile
blob5d434b344bc14eb3b869237203e167be464fe8e1
1 require 'rubygems'
2 require 'hoe'
4 $:.unshift 'lib'
5 require 'mogilefs'
7 Hoe.new 'mogilefs-client', MogileFS::VERSION do |p|
8   p.rubyforge_name = 'seattlerb'
9   p.author = [ 'Eric Wong', 'Eric Hodel' ]
10   p.email = 'normalperson@yhbt.net' # (Eric Wong)
11   # p.email = 'drbrain@segment7.net' # (Eric Hodel)
12   p.summary = p.paragraphs_of('README.txt', 1).first
13   p.description = p.paragraphs_of('README.txt', 9).first
14   p.url = p.paragraphs_of('README.txt', 5).first
15   p.changes = p.paragraphs_of('History.txt', 0..1).join("\n\n")
16 end
18 task :fix_perms do
19   IO.popen('git ls-tree -r HEAD^0') do |fp|
20     fp.each_line do |line|
21       mode, type, sha1, path = line.chomp.split(/\s+/)
22       case mode
23       when '100644' then File.chmod(0644, path)
24       when '100755' then File.chmod(0755, path)
25       end
26     end
27   end
28 end
30 # vim: syntax=Ruby