mogilefs-client 3.7.1 → 3.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.document +0 -1
- data/.gitignore +3 -3
- data/{.wrongdoc.yml → .olddoc.yml} +2 -0
- data/GIT-VERSION-GEN +13 -2
- data/GNUmakefile +12 -86
- data/README +19 -9
- data/TODO +0 -4
- data/examples/mog-sync.rb +245 -0
- data/examples/usage_fetcher.rb +44 -0
- data/lib/mogilefs/admin.rb +12 -10
- data/mogilefs-client.gemspec +20 -0
- data/pkg.mk +150 -0
- data/test/fresh.rb +10 -82
- data/test/setup.rb +2 -6
- data/test/test_admin.rb +25 -1
- data/test/test_fresh.rb +71 -0
- data/test/test_mogilefs.rb +25 -29
- data/test/test_mogilefs_integration.rb +15 -5
- data/test/test_mogilefs_integration_large_pipe.rb +7 -3
- data/test/test_mogilefs_integration_list_keys.rb +8 -4
- data/test/test_mogtool_bigfile.rb +7 -3
- metadata +39 -76
- data/.gemtest +0 -0
- data/Rakefile +0 -56
- data/test/integration.rb +0 -43
data/.gemtest
DELETED
File without changes
|
data/Rakefile
DELETED
@@ -1,56 +0,0 @@
|
|
1
|
-
require 'rubygems'
|
2
|
-
require 'hoe'
|
3
|
-
load "./GIT-VERSION-GEN"
|
4
|
-
|
5
|
-
include Rake::DSL if defined?(Rake::DSL)
|
6
|
-
$:.unshift 'lib'
|
7
|
-
require 'mogilefs'
|
8
|
-
Hoe.plugin :seattlerb
|
9
|
-
|
10
|
-
wd = %w(ChangeLog NEWS)
|
11
|
-
wd_ok = true
|
12
|
-
wd.each do |f|
|
13
|
-
next if File.exist?(f) || system("wrongdoc all")
|
14
|
-
wd_ok = false
|
15
|
-
File.open(f, "a") do |fp|
|
16
|
-
fp.puts "`wrongdoc all' failed, #{f} not generated properly"
|
17
|
-
end
|
18
|
-
end
|
19
|
-
|
20
|
-
warn "install `wrongdoc' gem to generate: #{wd.inspect}" unless wd_ok
|
21
|
-
|
22
|
-
manifest = "Manifest.txt"
|
23
|
-
if ! File.exist?(manifest) ||
|
24
|
-
File.stat(manifest).mtime < File.stat(RVF).mtime ||
|
25
|
-
File.stat(manifest).mtime < File.stat(__FILE__).mtime
|
26
|
-
system("git ls-files > #{manifest}")
|
27
|
-
File.open(manifest, "a") do |fp|
|
28
|
-
fp.puts "Manifest.txt"
|
29
|
-
fp.puts "ChangeLog"
|
30
|
-
fp.puts "NEWS"
|
31
|
-
fp.puts "lib/mogilefs/version.rb"
|
32
|
-
end
|
33
|
-
end
|
34
|
-
|
35
|
-
Hoe.spec 'mogilefs-client' do
|
36
|
-
self.rubyforge_name = 'seattlerb'
|
37
|
-
developer 'Eric Wong', 'normalperson@yhbt.net'
|
38
|
-
# developer 'drbrain@segment7.net', 'Eric Hodel'
|
39
|
-
self.readme_file = "README"
|
40
|
-
self.history_file = "NEWS"
|
41
|
-
self.urls = %w(http://bogomips.org/mogilefs-client/)
|
42
|
-
self.description = self.paragraphs_of("README", 1)
|
43
|
-
self.summary = "MogileFS client library for Ruby"
|
44
|
-
end
|
45
|
-
|
46
|
-
task :fix_perms do
|
47
|
-
IO.popen('git ls-tree -r HEAD^0') do |fp|
|
48
|
-
fp.each_line do |line|
|
49
|
-
mode, type, sha1, path = line.chomp.split(/\s+/)
|
50
|
-
case mode
|
51
|
-
when '100644' then File.chmod(0644, path)
|
52
|
-
when '100755' then File.chmod(0755, path)
|
53
|
-
end
|
54
|
-
end
|
55
|
-
end
|
56
|
-
end
|
data/test/integration.rb
DELETED
@@ -1,43 +0,0 @@
|
|
1
|
-
# -*- encoding: binary -*-
|
2
|
-
require './test/exec'
|
3
|
-
|
4
|
-
class TestMogIntegration < Test::Unit::TestCase
|
5
|
-
include TestExec
|
6
|
-
|
7
|
-
def test_dummy
|
8
|
-
assert true, "Ruby 1.8 Test::Unit is broken"
|
9
|
-
end unless defined?(MiniTest)
|
10
|
-
|
11
|
-
def setup
|
12
|
-
@to_close = []
|
13
|
-
@trackers = ENV["MOG_TEST_TRACKERS"].split(/,/)
|
14
|
-
domain = "rbmogtest#{Time.now.strftime('%Y%m%d%H%M%S')}.#{uuid}"
|
15
|
-
@admin = MogileFS::Admin.new(:hosts => @trackers)
|
16
|
-
@admin.create_domain(domain)
|
17
|
-
yield_for_monitor_update do
|
18
|
-
@admin.get_domains.include?(domain) and break
|
19
|
-
end
|
20
|
-
@domain = domain
|
21
|
-
end
|
22
|
-
|
23
|
-
def teardown
|
24
|
-
if defined?(@domain)
|
25
|
-
client = MogileFS::MogileFS.new :hosts => @trackers, :domain => @domain
|
26
|
-
client.each_key("") { |key|
|
27
|
-
p [ :delete, key ] if $VERBOSE
|
28
|
-
client.delete(key)
|
29
|
-
}
|
30
|
-
assert_equal true, @admin.delete_domain(@domain)
|
31
|
-
assert_raises(MogileFS::Backend::DomainNotFoundError) do
|
32
|
-
@admin.delete_domain(@domain)
|
33
|
-
end
|
34
|
-
end
|
35
|
-
@to_close.each do |io|
|
36
|
-
io.closed? or io.close
|
37
|
-
end
|
38
|
-
end
|
39
|
-
end if ENV["MOG_TEST_TRACKERS"]
|
40
|
-
|
41
|
-
class TestMogIntegration
|
42
|
-
warn "MOG_TEST_TRACKERS not defined"
|
43
|
-
end unless ENV["MOG_TEST_TRACKERS"]
|