mogilefs-client.git  about / heads / tags
MogileFS client library for Ruby
blob 1adba470fff91a40f82535c754e33fde45a4f8a6 1489 bytes (raw)
$ git show v3.7.0:Rakefile	# shows this blob on the CLI

 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
 
require 'rubygems'
require 'hoe'
load "./GIT-VERSION-GEN"

include Rake::DSL if defined?(Rake::DSL)
$:.unshift 'lib'
require 'mogilefs'
Hoe.plugin :seattlerb

wd = %w(ChangeLog NEWS)
wd_ok = true
wd.each do |f|
  next if File.exist?(f) || system("wrongdoc all")
  wd_ok = false
  File.open(f, "a") do |fp|
    fp.puts "`wrongdoc all' failed, #{f} not generated properly"
  end
end

warn "install `wrongdoc' gem to generate: #{wd.inspect}" unless wd_ok

manifest = "Manifest.txt"
if ! File.exist?(manifest) ||
   File.stat(manifest).mtime < File.stat(RVF).mtime ||
   File.stat(manifest).mtime < File.stat(__FILE__).mtime
  system("git ls-files > #{manifest}")
  File.open(manifest, "a") do |fp|
    fp.puts "Manifest.txt"
    fp.puts "ChangeLog"
    fp.puts "NEWS"
    fp.puts "lib/mogilefs/version.rb"
  end
end

Hoe.spec 'mogilefs-client' do
  self.rubyforge_name = 'seattlerb'
  developer 'Eric Wong', 'normalperson@yhbt.net'
  # developer 'drbrain@segment7.net', 'Eric Hodel'
  self.readme_file = "README"
  self.history_file = "NEWS"
  self.urls = %w(http://bogomips.org/mogilefs-client/)
  self.description = self.paragraphs_of("README", 1)
  self.summary = "MogileFS client library for Ruby"
end

task :fix_perms do
  IO.popen('git ls-tree -r HEAD^0') do |fp|
    fp.each_line do |line|
      mode, type, sha1, path = line.chomp.split(/\s+/)
      case mode
      when '100644' then File.chmod(0644, path)
      when '100755' then File.chmod(0755, path)
      end
    end
  end
end

git clone https://yhbt.net/mogilefs-client.git