dshelf 0.2.13 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/dshelf.rb +2 -1
- data/lib/dshelf/dfile.rb +8 -10
- metadata +17 -6
data/lib/dshelf.rb
CHANGED
data/lib/dshelf/dfile.rb
CHANGED
@@ -1,5 +1,4 @@
|
|
1
1
|
require 'rest_client'
|
2
|
-
# require 'httpclient'
|
3
2
|
require 'mime/types'
|
4
3
|
|
5
4
|
class DistributedFile
|
@@ -72,15 +71,14 @@ class DistributedFile
|
|
72
71
|
end
|
73
72
|
|
74
73
|
def read length=0, offset=0
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
# def read_full length=0, offset=0
|
74
|
+
# if RUBY_VERSION >= '1.8.7' then
|
75
|
+
# Stream.new "#{server_url}/storage#{URI.escape absolutepath}"
|
76
|
+
# else
|
77
|
+
read_full length, offset
|
78
|
+
# end
|
79
|
+
end
|
80
|
+
|
81
|
+
def read_full length=0, offset=0
|
84
82
|
params = {}
|
85
83
|
params[:length] = length unless length == 0
|
86
84
|
params[:offset] = offset unless offset == 0
|
metadata
CHANGED
@@ -1,12 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dshelf
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
+
hash: 19
|
4
5
|
prerelease: false
|
5
6
|
segments:
|
6
7
|
- 0
|
7
|
-
-
|
8
|
-
-
|
9
|
-
version: 0.
|
8
|
+
- 3
|
9
|
+
- 0
|
10
|
+
version: 0.3.0
|
10
11
|
platform: ruby
|
11
12
|
authors:
|
12
13
|
- Phil Pirozhkov
|
@@ -14,16 +15,18 @@ autorequire:
|
|
14
15
|
bindir: bin
|
15
16
|
cert_chain: []
|
16
17
|
|
17
|
-
date:
|
18
|
+
date: 2011-01-11 00:00:00 +03:00
|
18
19
|
default_executable:
|
19
20
|
dependencies:
|
20
21
|
- !ruby/object:Gem::Dependency
|
21
|
-
name: rest-client
|
22
|
+
name: rest-client-next-dshelf
|
22
23
|
prerelease: false
|
23
24
|
requirement: &id001 !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
24
26
|
requirements:
|
25
27
|
- - ~>
|
26
28
|
- !ruby/object:Gem::Version
|
29
|
+
hash: 13
|
27
30
|
segments:
|
28
31
|
- 1
|
29
32
|
- 6
|
@@ -35,9 +38,11 @@ dependencies:
|
|
35
38
|
name: json
|
36
39
|
prerelease: false
|
37
40
|
requirement: &id002 !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
38
42
|
requirements:
|
39
43
|
- - ~>
|
40
44
|
- !ruby/object:Gem::Version
|
45
|
+
hash: 31
|
41
46
|
segments:
|
42
47
|
- 1
|
43
48
|
- 2
|
@@ -49,9 +54,11 @@ dependencies:
|
|
49
54
|
name: mime-types
|
50
55
|
prerelease: false
|
51
56
|
requirement: &id003 !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
52
58
|
requirements:
|
53
59
|
- - ~>
|
54
60
|
- !ruby/object:Gem::Version
|
61
|
+
hash: 15
|
55
62
|
segments:
|
56
63
|
- 1
|
57
64
|
- 0
|
@@ -82,23 +89,27 @@ rdoc_options:
|
|
82
89
|
require_paths:
|
83
90
|
- lib
|
84
91
|
required_ruby_version: !ruby/object:Gem::Requirement
|
92
|
+
none: false
|
85
93
|
requirements:
|
86
94
|
- - ">="
|
87
95
|
- !ruby/object:Gem::Version
|
96
|
+
hash: 3
|
88
97
|
segments:
|
89
98
|
- 0
|
90
99
|
version: "0"
|
91
100
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
101
|
+
none: false
|
92
102
|
requirements:
|
93
103
|
- - ">="
|
94
104
|
- !ruby/object:Gem::Version
|
105
|
+
hash: 3
|
95
106
|
segments:
|
96
107
|
- 0
|
97
108
|
version: "0"
|
98
109
|
requirements: []
|
99
110
|
|
100
111
|
rubyforge_project:
|
101
|
-
rubygems_version: 1.3.
|
112
|
+
rubygems_version: 1.3.7
|
102
113
|
signing_key:
|
103
114
|
specification_version: 3
|
104
115
|
summary: Transparent remote storage for File API
|