geminabox 0.13.4 → 0.13.5
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of geminabox might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/geminabox/disk_cache.rb +19 -2
- data/lib/geminabox/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a35b4aaa6258bcb067202566061385e97e55b4b5
|
4
|
+
data.tar.gz: 2494572b48805e55544228f1fea1f40ebf7cef9f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 51ba90076d989c8c561fb113e4b445d00903ffed572425c5943a16b5e179c86212674373a862fd3c92485956bc24fe40655396d1010d0d306e9bee8fa234f6bf
|
7
|
+
data.tar.gz: c45f880d9a82c23aafffd70606623bef35820817024d355a06d88b0e55f3592de3f8f7d9eda3fd85d57c23660a95b904fe6f837a5b9767be8a099786cc8e6380
|
data/README.md
CHANGED
@@ -26,7 +26,7 @@ Create a config.ru as follows:
|
|
26
26
|
Geminabox.data = "/var/geminabox-data" # ... or wherever
|
27
27
|
run Geminabox::Server
|
28
28
|
|
29
|
-
Start your gem server with 'rackup' to run WEBrick or hook up the config.ru as you normally would ([passenger]
|
29
|
+
Start your gem server with 'rackup' to run WEBrick or hook up the config.ru as you normally would ([passenger](https://www.phusionpassenger.com/), [thin](http://code.macournoyer.com/thin/), [unicorn](https://bogomips.org/unicorn/), whatever floats your boat).
|
30
30
|
|
31
31
|
## Legacy RubyGems index
|
32
32
|
|
data/lib/geminabox/disk_cache.rb
CHANGED
@@ -43,11 +43,28 @@ module Geminabox
|
|
43
43
|
end
|
44
44
|
|
45
45
|
def read(key_hash)
|
46
|
-
read_int(key_hash)
|
46
|
+
read_int(key_hash) do |path|
|
47
|
+
begin
|
48
|
+
File.read(path)
|
49
|
+
rescue Errno::ENOENT
|
50
|
+
# There is a possibility that the file is removed by another process
|
51
|
+
# after checking File.exist?. Return nil if the file does not exist.
|
52
|
+
nil
|
53
|
+
end
|
54
|
+
end
|
47
55
|
end
|
48
56
|
|
49
57
|
def marshal_read(key_hash)
|
50
|
-
read_int(key_hash)
|
58
|
+
read_int(key_hash) do |path|
|
59
|
+
begin
|
60
|
+
Marshal.load(File.open(path))
|
61
|
+
rescue Errno::ENOENT, EOFError
|
62
|
+
# There is a possibility that the file is removed by another process.
|
63
|
+
# Marshal.load raises EOFError if the file is removed after File.open(path) succeeds.
|
64
|
+
# Return nil if the file does not exist.
|
65
|
+
nil
|
66
|
+
end
|
67
|
+
end
|
51
68
|
end
|
52
69
|
|
53
70
|
def read_int(key_hash)
|
data/lib/geminabox/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: geminabox
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.13.
|
4
|
+
version: 0.13.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tom Lea
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date:
|
14
|
+
date: 2017-01-14 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: sinatra
|
@@ -152,7 +152,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
152
152
|
version: '0'
|
153
153
|
requirements: []
|
154
154
|
rubyforge_project:
|
155
|
-
rubygems_version: 2.5.
|
155
|
+
rubygems_version: 2.5.2
|
156
156
|
signing_key:
|
157
157
|
specification_version: 4
|
158
158
|
summary: Really simple rubygem hosting
|