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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 06c1719b0b3d8508755171751405a9e44a65b3d8
4
- data.tar.gz: 2a843634e631cd122dfead4d0ff7f9b28c114934
3
+ metadata.gz: a35b4aaa6258bcb067202566061385e97e55b4b5
4
+ data.tar.gz: 2494572b48805e55544228f1fea1f40ebf7cef9f
5
5
  SHA512:
6
- metadata.gz: 26576e1a5defefbbe0eef931d707a459fdfd4a172dc243828bd1dcc3bc6e9bf80ab491fd1a415c7720c5030c0c7ba010f6d3fa2864efd94ffab2fbd64d0c7169
7
- data.tar.gz: efd5805d53e8265f3e0929d257e160d3aa5a2c731d7d80f8e14e9b1814e5023b8c5107a8af938eff52e6c8e398c493cfb13a41e141e8b93dca6814a741f8be8d
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][passenger], [thin][thin], [unicorn][unicorn], whatever floats your boat).
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
 
@@ -43,11 +43,28 @@ module Geminabox
43
43
  end
44
44
 
45
45
  def read(key_hash)
46
- read_int(key_hash) { |path| File.read(path) }
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) { |path| Marshal.load(File.open(path)) }
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)
@@ -1,3 +1,3 @@
1
1
  module Geminabox
2
- VERSION = '0.13.4' unless defined? VERSION
2
+ VERSION = '0.13.5' unless defined? VERSION
3
3
  end
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
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: 2016-10-25 00:00:00.000000000 Z
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.1
155
+ rubygems_version: 2.5.2
156
156
  signing_key:
157
157
  specification_version: 4
158
158
  summary: Really simple rubygem hosting