omgf 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/.manifest CHANGED
@@ -16,7 +16,9 @@ examples/verify_paths_manual_test.rb
16
16
  lib/omgf.rb
17
17
  lib/omgf/hysterical_raisins.rb
18
18
  lib/omgf/pool.rb
19
+ lib/omgf/regurgitator.rb
19
20
  lib/omgf/verify_paths.rb
21
+ lib/omgf/version.rb
20
22
  omgf.gemspec
21
23
  pkg.mk
22
24
  test/integration.rb
data/ChangeLog CHANGED
@@ -1,5 +1,36 @@
1
1
  ChangeLog from http://bogomips.org/omgf.git
2
2
 
3
+ commit 423c825be30adc1cd9e10baac27af4362ffe9b48
4
+ Author: Eric Wong <normalperson@yhbt.net>
5
+ Date: Thu Sep 20 18:55:16 2012 -0700
6
+
7
+ omgf 0.0.2 - regurgitator support
8
+
9
+ commit 651d531e683d434b87a171569aee63d7ac48e94f
10
+ Author: Eric Wong <normalperson@yhbt.net>
11
+ Date: Thu Sep 20 18:30:04 2012 -0700
12
+
13
+ optionally use regurgitator for read-only DB access
14
+
15
+ regurgitator can be faster in some cases since it
16
+ bypasses the tracker.
17
+
18
+ commit 439a5b8faa06373b9d67457e26bcd23f5fe41b36
19
+ Author: Eric Wong <normalperson@yhbt.net>
20
+ Date: Fri Jun 22 17:14:15 2012 -0700
21
+
22
+ gemspec: add kcar + kgio dependencies
23
+
24
+ Not everybody has these installed.
25
+
26
+ commit 6be63326b55e1d3de86986728d0ce57f2a852292
27
+ Author: Eric Wong <normalperson@yhbt.net>
28
+ Date: Fri Jun 22 17:11:15 2012 -0700
29
+
30
+ GNUmakefile: add omgf/version file to gem
31
+
32
+ Otherwise it won't load and run :<
33
+
3
34
  commit da589c5c0954703568daec913b9c493631f7c0da
4
35
  Author: Eric Wong <normalperson@yhbt.net>
5
36
  Date: Fri Jun 22 16:45:03 2012 -0700
data/GIT-VERSION-FILE CHANGED
@@ -1 +1 @@
1
- GIT_VERSION = 0.0.1
1
+ GIT_VERSION = 0.0.2
data/GIT-VERSION-GEN CHANGED
@@ -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.1"
5
+ DEF_VER = "v0.0.2"
6
6
  vn = DEF_VER
7
7
 
8
8
  # First see if there is a version file (included in release tarballs),
data/GNUmakefile CHANGED
@@ -2,4 +2,5 @@ all::
2
2
  RSYNC_DEST := bogomips.org:/srv/bogomips/omgf
3
3
  rfproject := rainbows
4
4
  rfpackage := omgf
5
+ pkg_extra += lib/omgf/version.rb
5
6
  include pkg.mk
data/LATEST CHANGED
@@ -1 +1,4 @@
1
- Currently unreleased
1
+ === omgf 0.0.2 - regurgitator support / 2012-09-21 01:55 UTC
2
+
3
+ initial
4
+
data/NEWS CHANGED
@@ -1 +1,4 @@
1
- No news yet.
1
+ === omgf 0.0.2 - regurgitator support / 2012-09-21 01:55 UTC
2
+
3
+ initial
4
+
@@ -52,6 +52,13 @@ class OMGF::HystericalRaisins
52
52
  @vp = OMGF::VerifyPaths.new(opts[:logger])
53
53
  @verify_timeout = opts[:verify_timeout] || 0.5
54
54
  pool_init(mg_opts)
55
+
56
+ # we may use regurgitator for reads
57
+ if db = opts[:db]
58
+ require 'omgf/regurgitator'
59
+ extend OMGF::Regurgitator
60
+ regurgitator_init(db)
61
+ end
55
62
  end
56
63
 
57
64
  # The entry point for Rack
@@ -0,0 +1,35 @@
1
+ # -*- encoding: binary -*-
2
+ require 'omgf/hysterical_raisins'
3
+ require 'regurgitator'
4
+
5
+ module OMGF::Regurgitator
6
+ include Regurgitator::ListKeys
7
+ include Regurgitator::FileInfo
8
+
9
+ def regurgitator_init(db)
10
+ @db = db
11
+ file_info_init
12
+ end
13
+
14
+ def mg_list_keys(domain, prefix, after, limit)
15
+ list_keys(domain, prefix: prefix, after: after, limit: limit) do |x|
16
+ yield(x[:dkey], x[:length], x[:devcount])
17
+ end
18
+ end
19
+
20
+ def _uris!(info)
21
+ info[:uris].values.flatten!
22
+ end
23
+
24
+ def mg_get_uris(domain, key, get_path_opts = {})
25
+ info = file_info({}, domain, key) or
26
+ raise MogileFS::Backend::UnknownKeyError
27
+ _uris!(info)
28
+ end
29
+
30
+ def mg_size_and_uris(domain, key, get_path_opts = {})
31
+ info = file_info({}, domain, key) or
32
+ raise MogileFS::Backend::UnknownKeyError
33
+ [ info[:length], _uris!(info) ]
34
+ end
35
+ end
@@ -0,0 +1 @@
1
+ OMGF::VERSION = '0.0.2'
data/omgf.gemspec CHANGED
@@ -20,6 +20,8 @@ Gem::Specification.new do |s|
20
20
  s.rdoc_options = rdoc_options
21
21
  s.test_files = Dir['test/test_*.rb']
22
22
  s.add_dependency('rack', ['~> 1.3'])
23
+ s.add_dependency('kgio', ['~> 2.7'])
24
+ s.add_dependency('kcar', ['~> 0.3'])
23
25
  s.add_dependency('mogilefs-client', ['~> 3.1'])
24
26
 
25
27
  s.licenses = %w(AGPLv3+)
metadata CHANGED
@@ -1,71 +1,124 @@
1
- --- !ruby/object:Gem::Specification
2
- name: omgf
3
- version: !ruby/object:Gem::Version
4
- hash: 29
1
+ --- !ruby/object:Gem::Specification
2
+ name: !binary |-
3
+ b21nZg==
4
+ version: !ruby/object:Gem::Version
5
+ version: 0.0.2
5
6
  prerelease:
6
- segments:
7
- - 0
8
- - 0
9
- - 1
10
- version: 0.0.1
11
7
  platform: ruby
12
- authors:
13
- - OMGF hackers
8
+ authors:
9
+ - !binary |-
10
+ T01HRiBoYWNrZXJz
14
11
  autorequire:
15
12
  bindir: bin
16
13
  cert_chain: []
17
-
18
- date: 2012-06-22 00:00:00 Z
19
- dependencies:
20
- - !ruby/object:Gem::Dependency
21
- name: rack
14
+ date: 2012-09-21 00:00:00.000000000 Z
15
+ dependencies:
16
+ - !ruby/object:Gem::Dependency
17
+ name: !binary |-
18
+ cmFjaw==
19
+ requirement: !ruby/object:Gem::Requirement
20
+ none: false
21
+ requirements:
22
+ - - !binary |-
23
+ fj4=
24
+ - !ruby/object:Gem::Version
25
+ version: !binary |-
26
+ MS4z
27
+ type: :runtime
28
+ prerelease: false
29
+ version_requirements: !ruby/object:Gem::Requirement
30
+ none: false
31
+ requirements:
32
+ - - !binary |-
33
+ fj4=
34
+ - !ruby/object:Gem::Version
35
+ version: !binary |-
36
+ MS4z
37
+ - !ruby/object:Gem::Dependency
38
+ name: !binary |-
39
+ a2dpbw==
40
+ requirement: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - !binary |-
44
+ fj4=
45
+ - !ruby/object:Gem::Version
46
+ version: !binary |-
47
+ Mi43
48
+ type: :runtime
22
49
  prerelease: false
23
- requirement: &id001 !ruby/object:Gem::Requirement
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ none: false
52
+ requirements:
53
+ - - !binary |-
54
+ fj4=
55
+ - !ruby/object:Gem::Version
56
+ version: !binary |-
57
+ Mi43
58
+ - !ruby/object:Gem::Dependency
59
+ name: !binary |-
60
+ a2Nhcg==
61
+ requirement: !ruby/object:Gem::Requirement
24
62
  none: false
25
- requirements:
26
- - - ~>
27
- - !ruby/object:Gem::Version
28
- hash: 9
29
- segments:
30
- - 1
31
- - 3
32
- version: "1.3"
63
+ requirements:
64
+ - - !binary |-
65
+ fj4=
66
+ - !ruby/object:Gem::Version
67
+ version: !binary |-
68
+ MC4z
33
69
  type: :runtime
34
- version_requirements: *id001
35
- - !ruby/object:Gem::Dependency
36
- name: mogilefs-client
37
70
  prerelease: false
38
- requirement: &id002 !ruby/object:Gem::Requirement
71
+ version_requirements: !ruby/object:Gem::Requirement
39
72
  none: false
40
- requirements:
41
- - - ~>
42
- - !ruby/object:Gem::Version
43
- hash: 5
44
- segments:
45
- - 3
46
- - 1
47
- version: "3.1"
73
+ requirements:
74
+ - - !binary |-
75
+ fj4=
76
+ - !ruby/object:Gem::Version
77
+ version: !binary |-
78
+ MC4z
79
+ - !ruby/object:Gem::Dependency
80
+ name: !binary |-
81
+ bW9naWxlZnMtY2xpZW50
82
+ requirement: !ruby/object:Gem::Requirement
83
+ none: false
84
+ requirements:
85
+ - - !binary |-
86
+ fj4=
87
+ - !ruby/object:Gem::Version
88
+ version: !binary |-
89
+ My4x
48
90
  type: :runtime
49
- version_requirements: *id002
50
- description: |-
51
- OMGF provides an HTTP interface for {MogileFS}[http://mogilefs.org],
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ none: false
94
+ requirements:
95
+ - - !binary |-
96
+ fj4=
97
+ - !ruby/object:Gem::Version
98
+ version: !binary |-
99
+ My4x
100
+ description: ! 'OMGF provides an HTTP interface for {MogileFS}[http://mogilefs.org],
101
+
52
102
  allowing clients to connect to MogileFS without needing specialized
103
+
53
104
  libraries to interface with MogileFS. Currently, WebDAV is supported.
54
- OMGF is short for "OMGFiles", an anagram for "MogileFS".
55
- email: omgf@librelist.org
56
- executables: []
57
105
 
106
+ OMGF is short for "OMGFiles", an anagram for "MogileFS".'
107
+ email: !binary |-
108
+ b21nZkBsaWJyZWxpc3Qub3Jn
109
+ executables: []
58
110
  extensions: []
59
-
60
- extra_rdoc_files:
111
+ extra_rdoc_files:
61
112
  - ChangeLog
62
113
  - lib/omgf.rb
63
114
  - lib/omgf/hysterical_raisins.rb
64
115
  - lib/omgf/pool.rb
116
+ - lib/omgf/regurgitator.rb
65
117
  - lib/omgf/verify_paths.rb
118
+ - lib/omgf/version.rb
66
119
  - NEWS
67
120
  - README
68
- files:
121
+ files:
69
122
  - .document
70
123
  - .gitignore
71
124
  - .manifest
@@ -84,7 +137,9 @@ files:
84
137
  - lib/omgf.rb
85
138
  - lib/omgf/hysterical_raisins.rb
86
139
  - lib/omgf/pool.rb
140
+ - lib/omgf/regurgitator.rb
87
141
  - lib/omgf/verify_paths.rb
142
+ - lib/omgf/version.rb
88
143
  - omgf.gemspec
89
144
  - pkg.mk
90
145
  - test/integration.rb
@@ -92,42 +147,40 @@ files:
92
147
  - test/test_hysterical_raisins.rb
93
148
  - test/test_hysterical_raisins_cmogstored.rb
94
149
  homepage: http://bogomips.org/omgf/
95
- licenses:
96
- - AGPLv3+
150
+ licenses:
151
+ - !binary |-
152
+ QUdQTHYzKw==
97
153
  post_install_message:
98
- rdoc_options:
154
+ rdoc_options:
99
155
  - -t
100
156
  - OMGF - hysterical REST API for MogileFS using Rack
101
157
  - -W
102
158
  - http://bogomips.org/omgf.git/tree/%s
103
- require_paths:
159
+ require_paths:
104
160
  - lib
105
- required_ruby_version: !ruby/object:Gem::Requirement
161
+ required_ruby_version: !ruby/object:Gem::Requirement
106
162
  none: false
107
- requirements:
108
- - - ">="
109
- - !ruby/object:Gem::Version
110
- hash: 3
111
- segments:
112
- - 0
113
- version: "0"
114
- required_rubygems_version: !ruby/object:Gem::Requirement
163
+ requirements:
164
+ - - ! '>='
165
+ - !ruby/object:Gem::Version
166
+ version: '0'
167
+ required_rubygems_version: !ruby/object:Gem::Requirement
115
168
  none: false
116
- requirements:
117
- - - ">="
118
- - !ruby/object:Gem::Version
119
- hash: 3
120
- segments:
121
- - 0
122
- version: "0"
169
+ requirements:
170
+ - - ! '>='
171
+ - !ruby/object:Gem::Version
172
+ version: '0'
123
173
  requirements: []
124
-
125
174
  rubyforge_project:
126
- rubygems_version: 1.8.24
175
+ rubygems_version: 1.8.21
127
176
  signing_key:
128
177
  specification_version: 3
129
178
  summary: hysterical REST API for MogileFS using Rack
130
- test_files:
131
- - test/test_hysterical_raisins.rb
132
- - test/test_hysterical_raisins_cmogstored.rb
133
- - test/test_hyst.rb
179
+ test_files:
180
+ - !binary |-
181
+ dGVzdC90ZXN0X2h5c3RlcmljYWxfcmFpc2luc19jbW9nc3RvcmVkLnJi
182
+ - !binary |-
183
+ dGVzdC90ZXN0X2h5c3QucmI=
184
+ - !binary |-
185
+ dGVzdC90ZXN0X2h5c3RlcmljYWxfcmFpc2lucy5yYg==
186
+ has_rdoc: