omgf 0.0.7 → 0.0.8

Sign up to get free protection for your applications and to get access to all the features.
@@ -2,7 +2,7 @@
2
2
  CONSTANT = "OMGF::VERSION"
3
3
  RVF = "lib/omgf/version.rb"
4
4
  GVF = "GIT-VERSION-FILE"
5
- DEF_VER = "v0.0.7"
5
+ DEF_VER = "v0.0.8"
6
6
  vn = DEF_VER
7
7
 
8
8
  # First see if there is a version file (included in release tarballs),
@@ -37,8 +37,7 @@ module OMGF::Regurgitator
37
37
 
38
38
  def mg_get_uris(env, domain, key, get_path_opts = {})
39
39
  check_domain!(domain)
40
- info = file_info({}, domain, key) or
41
- raise MogileFS::Backend::UnknownKeyError
40
+ info = file_info({}, domain, key) or return super
42
41
  _uris!(info)
43
42
  rescue Sequel::Error => e
44
43
  _log_err(env, "mg_get_uris", e)
@@ -47,8 +46,7 @@ module OMGF::Regurgitator
47
46
 
48
47
  def mg_size_and_uris(env, domain, key, get_path_opts = {})
49
48
  check_domain!(domain)
50
- info = file_info({}, domain, key) or
51
- raise MogileFS::Backend::UnknownKeyError
49
+ info = file_info({}, domain, key) or return super
52
50
  [ info[:length], _uris!(info) ]
53
51
  rescue Sequel::Error => e
54
52
  _log_err(env, "mg_size_and_uris", e)
@@ -6,7 +6,7 @@ require 'open-uri'
6
6
  require 'omgf/hysterical_raisins'
7
7
  require 'digest/md5'
8
8
  require 'sequel' # regurgitator uses sequel
9
- Sequel.extension :migration, :schema_dumper
9
+ Sequel.extension :migration
10
10
 
11
11
  class TestRegurgitator < Test::Unit::TestCase
12
12
  include TestMogileFSIntegration
@@ -19,6 +19,8 @@ class TestRegurgitator < Test::Unit::TestCase
19
19
  @opts = { "rack.logger" => logger }
20
20
  @orig_db = Sequel.connect("sqlite://#{@dbname.path}")
21
21
  @mirror_db = Sequel.connect("sqlite://#{@mirror.path}")
22
+ @orig_db.extension(:schema_dumper)
23
+
22
24
  mig = @orig_db.dump_schema_migration(:indexes => false, :same_db => true)
23
25
  mig = eval(mig)
24
26
  mig.apply(@mirror_db, :up)
@@ -54,6 +56,9 @@ class TestRegurgitator < Test::Unit::TestCase
54
56
 
55
57
  # corrupt the mirror
56
58
  @mirror_db.disconnect
59
+ @mirror.sync = true
60
+ @mirror.truncate(0)
61
+ @mirror.rewind
57
62
  @mirror.syswrite("\0" * (4096 * 1024))
58
63
 
59
64
  resp = @req.get("/non-existant", @opts)
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: !binary |-
3
3
  b21nZg==
4
4
  version: !ruby/object:Gem::Version
5
- version: 0.0.7
5
+ version: 0.0.8
6
6
  prerelease:
7
7
  platform: ruby
8
8
  authors:
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2013-05-30 00:00:00.000000000 Z
14
+ date: 2014-05-27 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: !binary |-
@@ -207,17 +207,17 @@ required_rubygems_version: !ruby/object:Gem::Requirement
207
207
  version: '0'
208
208
  requirements: []
209
209
  rubyforge_project:
210
- rubygems_version: 1.8.21
210
+ rubygems_version: 1.8.24
211
211
  signing_key:
212
212
  specification_version: 3
213
213
  summary: hysterical REST API for MogileFS using Rack
214
214
  test_files:
215
215
  - !binary |-
216
216
  dGVzdC90ZXN0X2h5c3RlcmljYWxfcmFpc2luc19jbW9nc3RvcmVkLnJi
217
- - !binary |-
218
- dGVzdC90ZXN0X2h5c3QucmI=
219
217
  - !binary |-
220
218
  dGVzdC90ZXN0X3JlZ3VyZ2l0YXRvci5yYg==
221
219
  - !binary |-
222
220
  dGVzdC90ZXN0X2h5c3RlcmljYWxfcmFpc2lucy5yYg==
221
+ - !binary |-
222
+ dGVzdC90ZXN0X2h5c3QucmI=
223
223
  has_rdoc: