emogilefs 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/emogilefs.gemspec +45 -0
- data/lib/emogilefs.rb +5 -2
- metadata +3 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.1
|
data/emogilefs.gemspec
ADDED
@@ -0,0 +1,45 @@
|
|
1
|
+
# Generated by jeweler
|
2
|
+
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
|
4
|
+
# -*- encoding: utf-8 -*-
|
5
|
+
|
6
|
+
Gem::Specification.new do |s|
|
7
|
+
s.name = %q{emogilefs}
|
8
|
+
s.version = "0.1.1"
|
9
|
+
|
10
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
+
s.authors = ["Andrew Rudenko"]
|
12
|
+
s.date = %q{2009-12-10}
|
13
|
+
s.description = %q{MogileFS client patch for async requests to backend (not read or write data)}
|
14
|
+
s.email = %q{ceo@prepor.ru}
|
15
|
+
s.extra_rdoc_files = [
|
16
|
+
"LICENSE",
|
17
|
+
"README.rdoc"
|
18
|
+
]
|
19
|
+
s.files = [
|
20
|
+
".document",
|
21
|
+
".gitignore",
|
22
|
+
"LICENSE",
|
23
|
+
"README.rdoc",
|
24
|
+
"Rakefile",
|
25
|
+
"VERSION",
|
26
|
+
"emogilefs.gemspec",
|
27
|
+
"lib/emogilefs.rb"
|
28
|
+
]
|
29
|
+
s.homepage = %q{http://github.com/prepor/emogilefs}
|
30
|
+
s.rdoc_options = ["--charset=UTF-8"]
|
31
|
+
s.require_paths = ["lib"]
|
32
|
+
s.rubygems_version = %q{1.3.5}
|
33
|
+
s.summary = %q{MogileFS client patch for async requests to backend (not read or write data)}
|
34
|
+
|
35
|
+
if s.respond_to? :specification_version then
|
36
|
+
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
37
|
+
s.specification_version = 3
|
38
|
+
|
39
|
+
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
|
40
|
+
else
|
41
|
+
end
|
42
|
+
else
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
data/lib/emogilefs.rb
CHANGED
@@ -42,8 +42,10 @@ module EMogileFS
|
|
42
42
|
raise MogileFS::Backend::ConnectionLost unless data
|
43
43
|
if current_task && current_task.callback
|
44
44
|
begin
|
45
|
-
parsed = client.send :parse_response, data
|
45
|
+
parsed = client.send :parse_response, data
|
46
46
|
current_task.callback.call parsed
|
47
|
+
rescue MogileFS::Backend::UnknownKeyError
|
48
|
+
current_task.callback.call :unknown_key
|
47
49
|
rescue MogileFS::Backend::ChannelNotFoundError => e
|
48
50
|
puts 'not found'
|
49
51
|
end
|
@@ -93,13 +95,14 @@ class EMogileFS::Request
|
|
93
95
|
end
|
94
96
|
end
|
95
97
|
|
96
|
-
class MogileFS::
|
98
|
+
class MogileFS::Client
|
97
99
|
def async(method, *args, &block)
|
98
100
|
Thread.current[:mogile_async] = true
|
99
101
|
req = self.send method, *args
|
100
102
|
req.callback(&block)
|
101
103
|
end
|
102
104
|
end
|
105
|
+
|
103
106
|
class MogileFS::Backend
|
104
107
|
alias do_request_without_async do_request
|
105
108
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: emogilefs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Rudenko
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-12-
|
12
|
+
date: 2009-12-10 00:00:00 +03:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|
@@ -29,6 +29,7 @@ files:
|
|
29
29
|
- README.rdoc
|
30
30
|
- Rakefile
|
31
31
|
- VERSION
|
32
|
+
- emogilefs.gemspec
|
32
33
|
- lib/emogilefs.rb
|
33
34
|
has_rdoc: true
|
34
35
|
homepage: http://github.com/prepor/emogilefs
|