defog 0.9.2 → 0.9.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +1 -2
- data/README.md +3 -2
- data/defog.gemspec +1 -1
- data/lib/defog/proxy.rb +1 -1
- data/lib/defog/version.rb +1 -1
- data/spec/proxy_spec.rb +9 -0
- metadata +25 -25
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4f78e9196fe479090f8c5a32df1c2bc936d45c48
|
4
|
+
data.tar.gz: 28c49ba6db95862f3b245e5aab5d703d4b5afa21
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1fedff27855d7b2adb3685bdadd3be1c937a9f9dae9c66240524e28773f08b593fa9f673f92d091f9fdb1ba7848e2cff871dd419acfb5ff8751aed82a5af0949
|
7
|
+
data.tar.gz: deedf9a852806d1d41d74267586c7cabe5e50a92e358f00f073f24d06bc8d603b86ca9306a2fee213de8e58cae539bcc7b8ead5875d6b4255d2e47e12558e31b
|
data/.travis.yml
CHANGED
data/README.md
CHANGED
@@ -239,9 +239,9 @@ Gemfile:
|
|
239
239
|
|
240
240
|
## Compatibility
|
241
241
|
|
242
|
-
Defog is
|
242
|
+
Defog is tested on:
|
243
243
|
|
244
|
-
* Ruby: MRI 1.9.
|
244
|
+
* Ruby: MRI 1.9.3, MRI 2.1.3
|
245
245
|
* Fog Storage: :local, :AWS
|
246
246
|
|
247
247
|
|
@@ -253,6 +253,7 @@ plus appropriate rspec examples.)
|
|
253
253
|
## History
|
254
254
|
|
255
255
|
Release Notes:
|
256
|
+
* 0.9.3 - Bug fix: don't fail when measuring cache if file gets deleted by another process (more robust)
|
256
257
|
* 0.9.2 - Bug fix: don't fail when measuring cache if file gets deleted by another process (more robust)
|
257
258
|
* 0.9.1 - Bug fix: don't fail when measuring cache if file gets deleted by another process
|
258
259
|
* 0.9.0 - Expose Handle#md5_hash
|
data/defog.gemspec
CHANGED
@@ -21,7 +21,7 @@ Gem::Specification.new do |gem|
|
|
21
21
|
|
22
22
|
gem.add_development_dependency 'rake'
|
23
23
|
gem.add_development_dependency 'rdoc'
|
24
|
-
gem.add_development_dependency 'rspec'
|
24
|
+
gem.add_development_dependency 'rspec', "<2.99"
|
25
25
|
gem.add_development_dependency 'simplecov'
|
26
26
|
gem.add_development_dependency 'simplecov-gem-adapter'
|
27
27
|
end
|
data/lib/defog/proxy.rb
CHANGED
@@ -207,7 +207,7 @@ module Defog
|
|
207
207
|
|
208
208
|
# take candidates in LRU order until that would be enough space
|
209
209
|
would_free = 0
|
210
|
-
candidates = Set.new(candidates.sort_by(
|
210
|
+
candidates = Set.new(candidates.sort_by{|path| pathTry(path, :atime)}.take_while{|path| (would_free < space_needed).tap{|condition| would_free += pathTry(path, :size)}})
|
211
211
|
|
212
212
|
# still not enough...?
|
213
213
|
raise Error::CacheFull, "No room in cache for #{proxy_path.relative_path_from(proxy_root)}: size=#{want_size} available=#{available} can_free=#{would_free} (max_cache_size=#{max_cache_size})" if would_free < space_needed
|
data/lib/defog/version.rb
CHANGED
data/spec/proxy_spec.rb
CHANGED
@@ -192,6 +192,15 @@ shared_examples "a proxy" do |args|
|
|
192
192
|
expect { @proxy.file(key, "r") do end }.to_not raise_error(Errno::ENOENT)
|
193
193
|
end
|
194
194
|
|
195
|
+
it "should not fail atime when proxies get deleted by another process" do
|
196
|
+
create_other_proxy("a", 10)
|
197
|
+
create_other_proxy("b", 30)
|
198
|
+
create_other_proxy("c", 40)
|
199
|
+
create_remote("x" * 80)
|
200
|
+
Pathname.any_instance.should_receive(:atime).and_raise Errno::ENOENT
|
201
|
+
expect { @proxy.file(key, "r") do end }.to_not raise_error(Errno::ENOENT)
|
202
|
+
end
|
203
|
+
|
195
204
|
it "should delete proxies to make room for hinted size" do
|
196
205
|
create_other_proxy("a", 10)
|
197
206
|
create_other_proxy("b", 30)
|
metadata
CHANGED
@@ -1,125 +1,125 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: defog
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ronen barzel
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-11-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fog
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: hash_keyword_args
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '0'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: fastandand
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '0'
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: rake
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- -
|
59
|
+
- - ">="
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '0'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- -
|
66
|
+
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: rdoc
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- -
|
73
|
+
- - ">="
|
74
74
|
- !ruby/object:Gem::Version
|
75
75
|
version: '0'
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- -
|
80
|
+
- - ">="
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: rspec
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
|
-
- -
|
87
|
+
- - "<"
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: '
|
89
|
+
version: '2.99'
|
90
90
|
type: :development
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
|
-
- -
|
94
|
+
- - "<"
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version: '
|
96
|
+
version: '2.99'
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: simplecov
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
|
-
- -
|
101
|
+
- - ">="
|
102
102
|
- !ruby/object:Gem::Version
|
103
103
|
version: '0'
|
104
104
|
type: :development
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
|
-
- -
|
108
|
+
- - ">="
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '0'
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
112
|
name: simplecov-gem-adapter
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
114
114
|
requirements:
|
115
|
-
- -
|
115
|
+
- - ">="
|
116
116
|
- !ruby/object:Gem::Version
|
117
117
|
version: '0'
|
118
118
|
type: :development
|
119
119
|
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
121
|
requirements:
|
122
|
-
- -
|
122
|
+
- - ">="
|
123
123
|
- !ruby/object:Gem::Version
|
124
124
|
version: '0'
|
125
125
|
description: Wrapper to fog gem, proxying access to cloud files as local files.
|
@@ -129,8 +129,8 @@ executables: []
|
|
129
129
|
extensions: []
|
130
130
|
extra_rdoc_files: []
|
131
131
|
files:
|
132
|
-
- .gitignore
|
133
|
-
- .travis.yml
|
132
|
+
- ".gitignore"
|
133
|
+
- ".travis.yml"
|
134
134
|
- Gemfile
|
135
135
|
- LICENSE
|
136
136
|
- README.md
|
@@ -158,17 +158,17 @@ require_paths:
|
|
158
158
|
- lib
|
159
159
|
required_ruby_version: !ruby/object:Gem::Requirement
|
160
160
|
requirements:
|
161
|
-
- -
|
161
|
+
- - ">="
|
162
162
|
- !ruby/object:Gem::Version
|
163
163
|
version: '0'
|
164
164
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
165
165
|
requirements:
|
166
|
-
- -
|
166
|
+
- - ">="
|
167
167
|
- !ruby/object:Gem::Version
|
168
168
|
version: '0'
|
169
169
|
requirements: []
|
170
170
|
rubyforge_project:
|
171
|
-
rubygems_version: 2.
|
171
|
+
rubygems_version: 2.2.2
|
172
172
|
signing_key:
|
173
173
|
specification_version: 4
|
174
174
|
summary: Wrapper to fog gem, proxying access to cloud files as local files. Access
|