mog: config parser cleanup
[ruby-mogilefs-client.git] / Rakefile
blob962324cc05e5b983038e64af739e11b9739972aa
1 require 'rubygems'
2 require 'hoe'
3 load "./GIT-VERSION-GEN"
5 $:.unshift 'lib'
6 require 'mogilefs'
7 Hoe.plugin :seattlerb
9 manifest = "Manifest.txt"
10 if ! File.exist?(manifest) ||
11    File.stat(manifest).mtime < File.stat(RVF).mtime
12   system("git ls-files > #{manifest}")
13   File.open(manifest, "a") { |fp| fp.puts("lib/mogilefs/version.rb") }
14 end
16 Hoe.spec 'mogilefs-client' do
17   self.rubyforge_name = 'seattlerb'
18   developer 'Eric Wong', 'normalperson@yhbt.net'
19   # developer 'drbrain@segment7.net', 'Eric Hodel'
20   self.readme_file = "README"
21   self.history_file = "History"
22   self.url = "http://bogomips.org/mogilefs-client"
23   self.description = self.paragraphs_of("README", 1)
24   self.summary = "MogileFS client library for Ruby"
25 end
27 task :fix_perms do
28   IO.popen('git ls-tree -r HEAD^0') do |fp|
29     fp.each_line do |line|
30       mode, type, sha1, path = line.chomp.split(/\s+/)
31       case mode
32       when '100644' then File.chmod(0644, path)
33       when '100755' then File.chmod(0755, path)
34       end
35     end
36   end
37 end
39 # vim: syntax=Ruby