omgf 0.0.2 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -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.2"
5
+ DEF_VER = "v0.0.3"
6
6
  vn = DEF_VER
7
7
 
8
8
  # First see if there is a version file (included in release tarballs),
@@ -11,7 +11,12 @@ module OMGF::Regurgitator
11
11
  file_info_init
12
12
  end
13
13
 
14
+ def check_domain!(domain)
15
+ get_dmid(domain) or raise MogileFS::Backend::UnregDomainError
16
+ end
17
+
14
18
  def mg_list_keys(domain, prefix, after, limit)
19
+ check_domain!(domain)
15
20
  list_keys(domain, prefix: prefix, after: after, limit: limit) do |x|
16
21
  yield(x[:dkey], x[:length], x[:devcount])
17
22
  end
@@ -22,12 +27,14 @@ module OMGF::Regurgitator
22
27
  end
23
28
 
24
29
  def mg_get_uris(domain, key, get_path_opts = {})
30
+ check_domain!(domain)
25
31
  info = file_info({}, domain, key) or
26
32
  raise MogileFS::Backend::UnknownKeyError
27
33
  _uris!(info)
28
34
  end
29
35
 
30
36
  def mg_size_and_uris(domain, key, get_path_opts = {})
37
+ check_domain!(domain)
31
38
  info = file_info({}, domain, key) or
32
39
  raise MogileFS::Backend::UnknownKeyError
33
40
  [ info[:length], _uris!(info) ]
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: !binary |-
3
3
  b21nZg==
4
4
  version: !ruby/object:Gem::Version
5
- version: 0.0.2
5
+ version: 0.0.3
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: 2012-09-21 00:00:00.000000000 Z
14
+ date: 2012-09-28 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: !binary |-