pho 0.7.8 → 0.7.9
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.
- data/CHANGES +8 -0
- data/Rakefile +4 -2
- data/doc/rdoc/classes/Pho.html +4 -0
- data/doc/rdoc/classes/Pho/CommandLine.html +114 -114
- data/doc/rdoc/classes/Pho/DatatypeProperty.html +12 -12
- data/doc/rdoc/classes/Pho/Enrichment/StoreEnricher.html +29 -29
- data/doc/rdoc/classes/Pho/Etags.html +36 -36
- data/doc/rdoc/classes/Pho/Facet/Results.html +19 -19
- data/doc/rdoc/classes/Pho/Facet/Term.html +6 -6
- data/doc/rdoc/classes/Pho/FieldPredicateMap.html +102 -102
- data/doc/rdoc/classes/Pho/FieldWeighting.html +12 -12
- data/doc/rdoc/classes/Pho/FileManagement.html +16 -0
- data/doc/rdoc/classes/Pho/FileManagement/AbstractFileManager.html +168 -108
- data/doc/rdoc/classes/Pho/FileManagement/BNodeRewritingHandler.html +226 -0
- data/doc/rdoc/classes/Pho/FileManagement/FileManager.html +48 -35
- data/doc/rdoc/classes/Pho/FileManagement/FileSplitter.html +291 -0
- data/doc/rdoc/classes/Pho/FileManagement/RDFManager.html +22 -22
- data/doc/rdoc/classes/Pho/FileManagement/StatementHandler.html +152 -0
- data/doc/rdoc/classes/Pho/FileManagement/Util.html +212 -0
- data/doc/rdoc/classes/Pho/Job.html +64 -64
- data/doc/rdoc/classes/Pho/Jobs.html +60 -60
- data/doc/rdoc/classes/Pho/OAI/Record.html +6 -6
- data/doc/rdoc/classes/Pho/OAI/Records.html +24 -24
- data/doc/rdoc/classes/Pho/OAI/Statistics.html +12 -12
- data/doc/rdoc/classes/Pho/QueryProfile.html +66 -66
- data/doc/rdoc/classes/Pho/ResourceHash/Converter.html +36 -36
- data/doc/rdoc/classes/Pho/ResourceHash/SetAlgebra.html +12 -12
- data/doc/rdoc/classes/Pho/Snapshot.html +35 -35
- data/doc/rdoc/classes/Pho/Sparql/SparqlClient.html +74 -74
- data/doc/rdoc/classes/Pho/Sparql/SparqlHelper.html +78 -78
- data/doc/rdoc/classes/Pho/Status.html +26 -26
- data/doc/rdoc/classes/Pho/Store.html +215 -215
- data/doc/rdoc/classes/Pho/StoreSparqlClient.html +12 -12
- data/doc/rdoc/classes/Pho/Update/Changeset.html +63 -63
- data/doc/rdoc/classes/Pho/Update/ChangesetBuilder.html +24 -24
- data/doc/rdoc/classes/Pho/Update/ChangesetHelper.html +6 -6
- data/doc/rdoc/classes/Pho/Update/Changesets.html +12 -12
- data/doc/rdoc/classes/Pho/Update/LiteralStatement.html +18 -18
- data/doc/rdoc/classes/Pho/Update/ResourceStatement.html +24 -24
- data/doc/rdoc/classes/Pho/Update/Statement.html +24 -24
- data/doc/rdoc/classes/String.html +1 -1
- data/doc/rdoc/created.rid +1 -1
- data/doc/rdoc/files/CHANGES.html +13 -1
- data/doc/rdoc/files/lib/pho/file_management_rb.html +1 -1
- data/doc/rdoc/files/lib/pho/file_manager_rb.html +1 -1
- data/doc/rdoc/files/lib/pho/rdf_collection_rb.html +1 -1
- data/doc/rdoc/files/lib/pho/upload_rb.html +101 -0
- data/doc/rdoc/files/lib/pho_rb.html +4 -2
- data/doc/rdoc/fr_class_index.html +4 -0
- data/doc/rdoc/fr_file_index.html +1 -0
- data/doc/rdoc/fr_method_index.html +228 -218
- data/lib/pho.rb +4 -1
- data/lib/pho/file_management.rb +30 -1
- data/lib/pho/file_manager.rb +7 -0
- data/lib/pho/rdf_collection.rb +4 -4
- data/lib/pho/upload.rb +156 -0
- data/tests/tc_bnodehandler.rb +42 -0
- data/tests/tc_filesplitter.rb +51 -0
- data/tests/ts_pho.rb +3 -1
- metadata +56 -8
@@ -93,8 +93,8 @@ href="QueryProfile.html">QueryProfile</a>
|
|
93
93
|
<h3 class="section-bar">Methods</h3>
|
94
94
|
|
95
95
|
<div class="name-list">
|
96
|
-
<a href="#
|
97
|
-
<a href="#
|
96
|
+
<a href="#M000212">new</a>
|
97
|
+
<a href="#M000213">to_rdf</a>
|
98
98
|
</div>
|
99
99
|
</div>
|
100
100
|
|
@@ -148,19 +148,19 @@ The weighting applied to the field
|
|
148
148
|
<div id="methods">
|
149
149
|
<h3 class="section-bar">Public Class methods</h3>
|
150
150
|
|
151
|
-
<div id="method-
|
152
|
-
<a name="
|
151
|
+
<div id="method-M000212" class="method-detail">
|
152
|
+
<a name="M000212"></a>
|
153
153
|
|
154
154
|
<div class="method-heading">
|
155
|
-
<a href="#
|
155
|
+
<a href="#M000212" class="method-signature">
|
156
156
|
<span class="method-name">new</span><span class="method-args">(uri, name, weight)</span>
|
157
157
|
</a>
|
158
158
|
</div>
|
159
159
|
|
160
160
|
<div class="method-description">
|
161
161
|
<p><a class="source-toggle" href="#"
|
162
|
-
onclick="toggleCode('
|
163
|
-
<div class="method-source-code" id="
|
162
|
+
onclick="toggleCode('M000212-source');return false;">[Source]</a></p>
|
163
|
+
<div class="method-source-code" id="M000212-source">
|
164
164
|
<pre>
|
165
165
|
<span class="ruby-comment cmt"># File lib/pho/query_profile.rb, line 15</span>
|
166
166
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">uri</span>, <span class="ruby-identifier">name</span>, <span class="ruby-identifier">weight</span>)
|
@@ -175,11 +175,11 @@ The weighting applied to the field
|
|
175
175
|
|
176
176
|
<h3 class="section-bar">Public Instance methods</h3>
|
177
177
|
|
178
|
-
<div id="method-
|
179
|
-
<a name="
|
178
|
+
<div id="method-M000213" class="method-detail">
|
179
|
+
<a name="M000213"></a>
|
180
180
|
|
181
181
|
<div class="method-heading">
|
182
|
-
<a href="#
|
182
|
+
<a href="#M000213" class="method-signature">
|
183
183
|
<span class="method-name">to_rdf</span><span class="method-args">(ns=true)</span>
|
184
184
|
</a>
|
185
185
|
</div>
|
@@ -195,8 +195,8 @@ rdf:Description, optionally including namespaces
|
|
195
195
|
</td></tr>
|
196
196
|
</table>
|
197
197
|
<p><a class="source-toggle" href="#"
|
198
|
-
onclick="toggleCode('
|
199
|
-
<div class="method-source-code" id="
|
198
|
+
onclick="toggleCode('M000213-source');return false;">[Source]</a></p>
|
199
|
+
<div class="method-source-code" id="M000213-source">
|
200
200
|
<pre>
|
201
201
|
<span class="ruby-comment cmt"># File lib/pho/query_profile.rb, line 23</span>
|
202
202
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_rdf</span>(<span class="ruby-identifier">ns</span>=<span class="ruby-keyword kw">true</span>)
|
@@ -66,6 +66,10 @@
|
|
66
66
|
<a href="../../files/lib/pho/rdf_collection_rb.html">
|
67
67
|
lib/pho/rdf_collection.rb
|
68
68
|
</a>
|
69
|
+
<br />
|
70
|
+
<a href="../../files/lib/pho/upload_rb.html">
|
71
|
+
lib/pho/upload.rb
|
72
|
+
</a>
|
69
73
|
<br />
|
70
74
|
</td>
|
71
75
|
</tr>
|
@@ -80,6 +84,14 @@
|
|
80
84
|
|
81
85
|
<div id="contextContent">
|
82
86
|
|
87
|
+
<div id="description">
|
88
|
+
<p>
|
89
|
+
This module provides support for managing local directories of files and
|
90
|
+
mirroring them into either the metabox or contentbox of a Talis Platform
|
91
|
+
store
|
92
|
+
</p>
|
93
|
+
|
94
|
+
</div>
|
83
95
|
|
84
96
|
|
85
97
|
</div>
|
@@ -96,8 +108,12 @@
|
|
96
108
|
<h3 class="section-bar">Classes and Modules</h3>
|
97
109
|
|
98
110
|
Class <a href="FileManagement/AbstractFileManager.html" class="link">Pho::FileManagement::AbstractFileManager</a><br />
|
111
|
+
Class <a href="FileManagement/BNodeRewritingHandler.html" class="link">Pho::FileManagement::BNodeRewritingHandler</a><br />
|
99
112
|
Class <a href="FileManagement/FileManager.html" class="link">Pho::FileManagement::FileManager</a><br />
|
113
|
+
Class <a href="FileManagement/FileSplitter.html" class="link">Pho::FileManagement::FileSplitter</a><br />
|
100
114
|
Class <a href="FileManagement/RDFManager.html" class="link">Pho::FileManagement::RDFManager</a><br />
|
115
|
+
Class <a href="FileManagement/StatementHandler.html" class="link">Pho::FileManagement::StatementHandler</a><br />
|
116
|
+
Class <a href="FileManagement/Util.html" class="link">Pho::FileManagement::Util</a><br />
|
101
117
|
|
102
118
|
</div>
|
103
119
|
|
@@ -78,6 +78,41 @@
|
|
78
78
|
|
79
79
|
<div id="contextContent">
|
80
80
|
|
81
|
+
<div id="description">
|
82
|
+
<p>
|
83
|
+
Base class for the management of collections of files
|
84
|
+
</p>
|
85
|
+
<p>
|
86
|
+
A collection is considered to be a directory (and sub-directory) of files.
|
87
|
+
Depending on the type of collection manager used (e.g. +<a
|
88
|
+
href="FileManager.html">Pho::FileManagement::FileManager</a>+ or +<a
|
89
|
+
href="RDFManager.html">Pho::FileManagement::RDFManager</a>+) these may be
|
90
|
+
collections of any kind of file, or just RDF serialisations.
|
91
|
+
</p>
|
92
|
+
<p>
|
93
|
+
The basic mechanism has support for:
|
94
|
+
</p>
|
95
|
+
<pre>
|
96
|
+
* tracking whether a file has been successfully loaded into a store (or not)
|
97
|
+
* identifying all new files, just those that have been successfully stored, or failed
|
98
|
+
* identifying files that have been changed locally since last stored
|
99
|
+
* storage of any of these classes of files either by uploading into the contentbox or
|
100
|
+
storing in the metabox
|
101
|
+
* resumable uploads
|
102
|
+
* retrying uploads
|
103
|
+
* traversal across a directory structure to manage a complete set of files
|
104
|
+
</pre>
|
105
|
+
<p>
|
106
|
+
Files are tracked locally by keeping some hidden files in the same
|
107
|
+
directory system as the files being tracked. These are currently all
|
108
|
+
managed in a hidden directory (".pho") that is automatically
|
109
|
+
created. To access error messages from uploads look for the corresponding
|
110
|
+
"fail file" for the relevant file. E.g. /foo/file.txt will be
|
111
|
+
tracked in /foo/.pho, and will have either an OK file
|
112
|
+
(/foo/.pho/file.txt.ok) or a fail file (/foo/.pho/file.txt.fail).
|
113
|
+
</p>
|
114
|
+
|
115
|
+
</div>
|
81
116
|
|
82
117
|
|
83
118
|
</div>
|
@@ -86,21 +121,22 @@
|
|
86
121
|
<h3 class="section-bar">Methods</h3>
|
87
122
|
|
88
123
|
<div class="name-list">
|
89
|
-
<a href="#
|
90
|
-
<a href="#
|
91
|
-
<a href="#
|
92
|
-
<a href="#M000023">
|
93
|
-
<a href="#
|
94
|
-
<a href="#
|
95
|
-
<a href="#
|
96
|
-
<a href="#
|
97
|
-
<a href="#
|
98
|
-
<a href="#
|
99
|
-
<a href="#
|
100
|
-
<a href="#
|
101
|
-
<a href="#
|
102
|
-
<a href="#
|
103
|
-
<a href="#
|
124
|
+
<a href="#M000019">changed?</a>
|
125
|
+
<a href="#M000021">changed_files</a>
|
126
|
+
<a href="#M000028">create_tracking_dir</a>
|
127
|
+
<a href="#M000023">failures</a>
|
128
|
+
<a href="#M000026">get_fail_file_for</a>
|
129
|
+
<a href="#M000027">get_ok_file_for</a>
|
130
|
+
<a href="#M000013">new</a>
|
131
|
+
<a href="#M000022">new_files</a>
|
132
|
+
<a href="#M000017">reset</a>
|
133
|
+
<a href="#M000015">retry_failures</a>
|
134
|
+
<a href="#M000014">store</a>
|
135
|
+
<a href="#M000016">store_changes</a>
|
136
|
+
<a href="#M000018">stored?</a>
|
137
|
+
<a href="#M000020">stored_files</a>
|
138
|
+
<a href="#M000024">successes</a>
|
139
|
+
<a href="#M000025">summary</a>
|
104
140
|
</div>
|
105
141
|
</div>
|
106
142
|
|
@@ -163,21 +199,21 @@
|
|
163
199
|
<div id="methods">
|
164
200
|
<h3 class="section-bar">Public Class methods</h3>
|
165
201
|
|
166
|
-
<div id="method-
|
167
|
-
<a name="
|
202
|
+
<div id="method-M000013" class="method-detail">
|
203
|
+
<a name="M000013"></a>
|
168
204
|
|
169
205
|
<div class="method-heading">
|
170
|
-
<a href="#
|
206
|
+
<a href="#M000013" class="method-signature">
|
171
207
|
<span class="method-name">new</span><span class="method-args">(store, dir, ok_suffix=OK, fail_suffix=FAIL)</span>
|
172
208
|
</a>
|
173
209
|
</div>
|
174
210
|
|
175
211
|
<div class="method-description">
|
176
212
|
<p><a class="source-toggle" href="#"
|
177
|
-
onclick="toggleCode('
|
178
|
-
<div class="method-source-code" id="
|
213
|
+
onclick="toggleCode('M000013-source');return false;">[Source]</a></p>
|
214
|
+
<div class="method-source-code" id="M000013-source">
|
179
215
|
<pre>
|
180
|
-
<span class="ruby-comment cmt"># File lib/pho/file_management.rb, line
|
216
|
+
<span class="ruby-comment cmt"># File lib/pho/file_management.rb, line 38</span>
|
181
217
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">store</span>, <span class="ruby-identifier">dir</span>, <span class="ruby-identifier">ok_suffix</span>=<span class="ruby-constant">OK</span>, <span class="ruby-identifier">fail_suffix</span>=<span class="ruby-constant">FAIL</span>)
|
182
218
|
<span class="ruby-ivar">@store</span> = <span class="ruby-identifier">store</span>
|
183
219
|
<span class="ruby-ivar">@dir</span> = <span class="ruby-identifier">dir</span>
|
@@ -191,11 +227,11 @@
|
|
191
227
|
|
192
228
|
<h3 class="section-bar">Public Instance methods</h3>
|
193
229
|
|
194
|
-
<div id="method-
|
195
|
-
<a name="
|
230
|
+
<div id="method-M000019" class="method-detail">
|
231
|
+
<a name="M000019"></a>
|
196
232
|
|
197
233
|
<div class="method-heading">
|
198
|
-
<a href="#
|
234
|
+
<a href="#M000019" class="method-signature">
|
199
235
|
<span class="method-name">changed?</span><span class="method-args">(file)</span>
|
200
236
|
</a>
|
201
237
|
</div>
|
@@ -207,10 +243,10 @@ Allows files that have been updated in a collection to be easily identified
|
|
207
243
|
New files (i.e untracked) are always considered to be changed
|
208
244
|
</p>
|
209
245
|
<p><a class="source-toggle" href="#"
|
210
|
-
onclick="toggleCode('
|
211
|
-
<div class="method-source-code" id="
|
246
|
+
onclick="toggleCode('M000019-source');return false;">[Source]</a></p>
|
247
|
+
<div class="method-source-code" id="M000019-source">
|
212
248
|
<pre>
|
213
|
-
<span class="ruby-comment cmt"># File lib/pho/file_management.rb, line
|
249
|
+
<span class="ruby-comment cmt"># File lib/pho/file_management.rb, line 106</span>
|
214
250
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">changed?</span>(<span class="ruby-identifier">file</span>)
|
215
251
|
<span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">stored?</span>(<span class="ruby-identifier">file</span>)
|
216
252
|
<span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span>
|
@@ -231,21 +267,21 @@ New files (i.e untracked) are always considered to be changed
|
|
231
267
|
</div>
|
232
268
|
</div>
|
233
269
|
|
234
|
-
<div id="method-
|
235
|
-
<a name="
|
270
|
+
<div id="method-M000021" class="method-detail">
|
271
|
+
<a name="M000021"></a>
|
236
272
|
|
237
273
|
<div class="method-heading">
|
238
|
-
<a href="#
|
274
|
+
<a href="#M000021" class="method-signature">
|
239
275
|
<span class="method-name">changed_files</span><span class="method-args">(recursive=false)</span>
|
240
276
|
</a>
|
241
277
|
</div>
|
242
278
|
|
243
279
|
<div class="method-description">
|
244
280
|
<p><a class="source-toggle" href="#"
|
245
|
-
onclick="toggleCode('
|
246
|
-
<div class="method-source-code" id="
|
281
|
+
onclick="toggleCode('M000021-source');return false;">[Source]</a></p>
|
282
|
+
<div class="method-source-code" id="M000021-source">
|
247
283
|
<pre>
|
248
|
-
<span class="ruby-comment cmt"># File lib/pho/file_management.rb, line
|
284
|
+
<span class="ruby-comment cmt"># File lib/pho/file_management.rb, line 130</span>
|
249
285
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">changed_files</span>(<span class="ruby-identifier">recursive</span>=<span class="ruby-keyword kw">false</span>)
|
250
286
|
<span class="ruby-identifier">changed</span> = <span class="ruby-constant">Array</span>.<span class="ruby-identifier">new</span>
|
251
287
|
<span class="ruby-identifier">list</span>(<span class="ruby-identifier">recursive</span>).<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">file</span><span class="ruby-operator">|</span>
|
@@ -258,24 +294,48 @@ New files (i.e untracked) are always considered to be changed
|
|
258
294
|
</div>
|
259
295
|
</div>
|
260
296
|
|
261
|
-
<div id="method-
|
262
|
-
<a name="
|
297
|
+
<div id="method-M000028" class="method-detail">
|
298
|
+
<a name="M000028"></a>
|
263
299
|
|
264
300
|
<div class="method-heading">
|
265
|
-
<a href="#
|
301
|
+
<a href="#M000028" class="method-signature">
|
302
|
+
<span class="method-name">create_tracking_dir</span><span class="method-args">(filename)</span>
|
303
|
+
</a>
|
304
|
+
</div>
|
305
|
+
|
306
|
+
<div class="method-description">
|
307
|
+
<p><a class="source-toggle" href="#"
|
308
|
+
onclick="toggleCode('M000028-source');return false;">[Source]</a></p>
|
309
|
+
<div class="method-source-code" id="M000028-source">
|
310
|
+
<pre>
|
311
|
+
<span class="ruby-comment cmt"># File lib/pho/file_management.rb, line 190</span>
|
312
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">create_tracking_dir</span>(<span class="ruby-identifier">filename</span>)
|
313
|
+
<span class="ruby-identifier">path</span> = <span class="ruby-identifier">filename</span>.<span class="ruby-identifier">split</span>(<span class="ruby-value str">"/"</span>)[<span class="ruby-value">0</span><span class="ruby-operator">..</span><span class="ruby-value">-2</span>].<span class="ruby-identifier">join</span>(<span class="ruby-value str">"/"</span>)
|
314
|
+
<span class="ruby-constant">Dir</span>.<span class="ruby-identifier">mkdir</span>(<span class="ruby-node">"#{path}/#{TRACKING_DIR}"</span>) <span class="ruby-keyword kw">unless</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">exists?</span>(<span class="ruby-node">"#{path}/#{TRACKING_DIR}"</span>)
|
315
|
+
<span class="ruby-keyword kw">end</span>
|
316
|
+
</pre>
|
317
|
+
</div>
|
318
|
+
</div>
|
319
|
+
</div>
|
320
|
+
|
321
|
+
<div id="method-M000023" class="method-detail">
|
322
|
+
<a name="M000023"></a>
|
323
|
+
|
324
|
+
<div class="method-heading">
|
325
|
+
<a href="#M000023" class="method-signature">
|
266
326
|
<span class="method-name">failures</span><span class="method-args">(recursive=false)</span>
|
267
327
|
</a>
|
268
328
|
</div>
|
269
329
|
|
270
330
|
<div class="method-description">
|
271
331
|
<p>
|
272
|
-
List <a href="AbstractFileManager.html#
|
332
|
+
List <a href="AbstractFileManager.html#M000023">failures</a>
|
273
333
|
</p>
|
274
334
|
<p><a class="source-toggle" href="#"
|
275
|
-
onclick="toggleCode('
|
276
|
-
<div class="method-source-code" id="
|
335
|
+
onclick="toggleCode('M000023-source');return false;">[Source]</a></p>
|
336
|
+
<div class="method-source-code" id="M000023-source">
|
277
337
|
<pre>
|
278
|
-
<span class="ruby-comment cmt"># File lib/pho/file_management.rb, line
|
338
|
+
<span class="ruby-comment cmt"># File lib/pho/file_management.rb, line 148</span>
|
279
339
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">failures</span>(<span class="ruby-identifier">recursive</span>=<span class="ruby-keyword kw">false</span>)
|
280
340
|
<span class="ruby-identifier">fails</span> = <span class="ruby-constant">Array</span>.<span class="ruby-identifier">new</span>
|
281
341
|
<span class="ruby-identifier">list</span>(<span class="ruby-identifier">recursive</span>).<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">file</span><span class="ruby-operator">|</span>
|
@@ -288,21 +348,21 @@ List <a href="AbstractFileManager.html#M000020">failures</a>
|
|
288
348
|
</div>
|
289
349
|
</div>
|
290
350
|
|
291
|
-
<div id="method-
|
292
|
-
<a name="
|
351
|
+
<div id="method-M000026" class="method-detail">
|
352
|
+
<a name="M000026"></a>
|
293
353
|
|
294
354
|
<div class="method-heading">
|
295
|
-
<a href="#
|
355
|
+
<a href="#M000026" class="method-signature">
|
296
356
|
<span class="method-name">get_fail_file_for</span><span class="method-args">(filename)</span>
|
297
357
|
</a>
|
298
358
|
</div>
|
299
359
|
|
300
360
|
<div class="method-description">
|
301
361
|
<p><a class="source-toggle" href="#"
|
302
|
-
onclick="toggleCode('
|
303
|
-
<div class="method-source-code" id="
|
362
|
+
onclick="toggleCode('M000026-source');return false;">[Source]</a></p>
|
363
|
+
<div class="method-source-code" id="M000026-source">
|
304
364
|
<pre>
|
305
|
-
<span class="ruby-comment cmt"># File lib/pho/file_management.rb, line
|
365
|
+
<span class="ruby-comment cmt"># File lib/pho/file_management.rb, line 176</span>
|
306
366
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get_fail_file_for</span>(<span class="ruby-identifier">filename</span>)
|
307
367
|
<span class="ruby-identifier">relative_path</span> = <span class="ruby-identifier">filename</span>.<span class="ruby-identifier">gsub</span>(<span class="ruby-ivar">@dir</span>, <span class="ruby-value str">""</span>)
|
308
368
|
<span class="ruby-identifier">base</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">basename</span>(<span class="ruby-identifier">filename</span>)
|
@@ -314,21 +374,21 @@ List <a href="AbstractFileManager.html#M000020">failures</a>
|
|
314
374
|
</div>
|
315
375
|
</div>
|
316
376
|
|
317
|
-
<div id="method-
|
318
|
-
<a name="
|
377
|
+
<div id="method-M000027" class="method-detail">
|
378
|
+
<a name="M000027"></a>
|
319
379
|
|
320
380
|
<div class="method-heading">
|
321
|
-
<a href="#
|
381
|
+
<a href="#M000027" class="method-signature">
|
322
382
|
<span class="method-name">get_ok_file_for</span><span class="method-args">(filename)</span>
|
323
383
|
</a>
|
324
384
|
</div>
|
325
385
|
|
326
386
|
<div class="method-description">
|
327
387
|
<p><a class="source-toggle" href="#"
|
328
|
-
onclick="toggleCode('
|
329
|
-
<div class="method-source-code" id="
|
388
|
+
onclick="toggleCode('M000027-source');return false;">[Source]</a></p>
|
389
|
+
<div class="method-source-code" id="M000027-source">
|
330
390
|
<pre>
|
331
|
-
<span class="ruby-comment cmt"># File lib/pho/file_management.rb, line
|
391
|
+
<span class="ruby-comment cmt"># File lib/pho/file_management.rb, line 183</span>
|
332
392
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get_ok_file_for</span>(<span class="ruby-identifier">filename</span>)
|
333
393
|
<span class="ruby-identifier">relative_path</span> = <span class="ruby-identifier">filename</span>.<span class="ruby-identifier">gsub</span>(<span class="ruby-ivar">@dir</span>, <span class="ruby-value str">""</span>)
|
334
394
|
<span class="ruby-identifier">base</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">basename</span>(<span class="ruby-identifier">filename</span>)
|
@@ -340,25 +400,25 @@ List <a href="AbstractFileManager.html#M000020">failures</a>
|
|
340
400
|
</div>
|
341
401
|
</div>
|
342
402
|
|
343
|
-
<div id="method-
|
344
|
-
<a name="
|
403
|
+
<div id="method-M000022" class="method-detail">
|
404
|
+
<a name="M000022"></a>
|
345
405
|
|
346
406
|
<div class="method-heading">
|
347
|
-
<a href="#
|
407
|
+
<a href="#M000022" class="method-signature">
|
348
408
|
<span class="method-name">new_files</span><span class="method-args">(recursive=false)</span>
|
349
409
|
</a>
|
350
410
|
</div>
|
351
411
|
|
352
412
|
<div class="method-description">
|
353
413
|
<p>
|
354
|
-
List any <a href="AbstractFileManager.html#
|
414
|
+
List any <a href="AbstractFileManager.html#M000013">new</a> files in the
|
355
415
|
directory
|
356
416
|
</p>
|
357
417
|
<p><a class="source-toggle" href="#"
|
358
|
-
onclick="toggleCode('
|
359
|
-
<div class="method-source-code" id="
|
418
|
+
onclick="toggleCode('M000022-source');return false;">[Source]</a></p>
|
419
|
+
<div class="method-source-code" id="M000022-source">
|
360
420
|
<pre>
|
361
|
-
<span class="ruby-comment cmt"># File lib/pho/file_management.rb, line
|
421
|
+
<span class="ruby-comment cmt"># File lib/pho/file_management.rb, line 139</span>
|
362
422
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">new_files</span>(<span class="ruby-identifier">recursive</span>=<span class="ruby-keyword kw">false</span>)
|
363
423
|
<span class="ruby-identifier">newfiles</span> = <span class="ruby-constant">Array</span>.<span class="ruby-identifier">new</span>
|
364
424
|
<span class="ruby-identifier">list</span>(<span class="ruby-identifier">recursive</span>).<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">file</span><span class="ruby-operator">|</span>
|
@@ -371,11 +431,11 @@ directory
|
|
371
431
|
</div>
|
372
432
|
</div>
|
373
433
|
|
374
|
-
<div id="method-
|
375
|
-
<a name="
|
434
|
+
<div id="method-M000017" class="method-detail">
|
435
|
+
<a name="M000017"></a>
|
376
436
|
|
377
437
|
<div class="method-heading">
|
378
|
-
<a href="#
|
438
|
+
<a href="#M000017" class="method-signature">
|
379
439
|
<span class="method-name">reset</span><span class="method-args">(recursive=false)</span>
|
380
440
|
</a>
|
381
441
|
</div>
|
@@ -385,10 +445,10 @@ directory
|
|
385
445
|
Reset the directory to clear out any previous statuses
|
386
446
|
</p>
|
387
447
|
<p><a class="source-toggle" href="#"
|
388
|
-
onclick="toggleCode('
|
389
|
-
<div class="method-source-code" id="
|
448
|
+
onclick="toggleCode('M000017-source');return false;">[Source]</a></p>
|
449
|
+
<div class="method-source-code" id="M000017-source">
|
390
450
|
<pre>
|
391
|
-
<span class="ruby-comment cmt"># File lib/pho/file_management.rb, line
|
451
|
+
<span class="ruby-comment cmt"># File lib/pho/file_management.rb, line 79</span>
|
392
452
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">reset</span>(<span class="ruby-identifier">recursive</span>=<span class="ruby-keyword kw">false</span>)
|
393
453
|
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">recursive</span>
|
394
454
|
<span class="ruby-identifier">pattern</span> = <span class="ruby-node">"**/#{TRACKING_DIR}/*"</span>
|
@@ -407,11 +467,11 @@ Reset the directory to clear out any previous statuses
|
|
407
467
|
</div>
|
408
468
|
</div>
|
409
469
|
|
410
|
-
<div id="method-
|
411
|
-
<a name="
|
470
|
+
<div id="method-M000015" class="method-detail">
|
471
|
+
<a name="M000015"></a>
|
412
472
|
|
413
473
|
<div class="method-heading">
|
414
|
-
<a href="#
|
474
|
+
<a href="#M000015" class="method-signature">
|
415
475
|
<span class="method-name">retry_failures</span><span class="method-args">(recursive=false)</span>
|
416
476
|
</a>
|
417
477
|
</div>
|
@@ -421,10 +481,10 @@ Reset the directory to clear out any previous statuses
|
|
421
481
|
Retry anything known to have failed
|
422
482
|
</p>
|
423
483
|
<p><a class="source-toggle" href="#"
|
424
|
-
onclick="toggleCode('
|
425
|
-
<div class="method-source-code" id="
|
484
|
+
onclick="toggleCode('M000015-source');return false;">[Source]</a></p>
|
485
|
+
<div class="method-source-code" id="M000015-source">
|
426
486
|
<pre>
|
427
|
-
<span class="ruby-comment cmt"># File lib/pho/file_management.rb, line
|
487
|
+
<span class="ruby-comment cmt"># File lib/pho/file_management.rb, line 55</span>
|
428
488
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">retry_failures</span>(<span class="ruby-identifier">recursive</span>=<span class="ruby-keyword kw">false</span>)
|
429
489
|
<span class="ruby-identifier">retries</span> = <span class="ruby-identifier">failures</span>(<span class="ruby-identifier">recursive</span>)
|
430
490
|
<span class="ruby-identifier">retries</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">filename</span><span class="ruby-operator">|</span>
|
@@ -439,11 +499,11 @@ Retry anything known to have failed
|
|
439
499
|
</div>
|
440
500
|
</div>
|
441
501
|
|
442
|
-
<div id="method-
|
443
|
-
<a name="
|
502
|
+
<div id="method-M000014" class="method-detail">
|
503
|
+
<a name="M000014"></a>
|
444
504
|
|
445
505
|
<div class="method-heading">
|
446
|
-
<a href="#
|
506
|
+
<a href="#M000014" class="method-signature">
|
447
507
|
<span class="method-name">store</span><span class="method-args">(recursive=false)</span>
|
448
508
|
</a>
|
449
509
|
</div>
|
@@ -454,10 +514,10 @@ Retry anything known to have failed
|
|
454
514
|
directory
|
455
515
|
</p>
|
456
516
|
<p><a class="source-toggle" href="#"
|
457
|
-
onclick="toggleCode('
|
458
|
-
<div class="method-source-code" id="
|
517
|
+
onclick="toggleCode('M000014-source');return false;">[Source]</a></p>
|
518
|
+
<div class="method-source-code" id="M000014-source">
|
459
519
|
<pre>
|
460
|
-
<span class="ruby-comment cmt"># File lib/pho/file_management.rb, line
|
520
|
+
<span class="ruby-comment cmt"># File lib/pho/file_management.rb, line 46</span>
|
461
521
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">store</span>(<span class="ruby-identifier">recursive</span>=<span class="ruby-keyword kw">false</span>)
|
462
522
|
<span class="ruby-identifier">files_to_store</span> = <span class="ruby-identifier">new_files</span>(<span class="ruby-identifier">recursive</span>)
|
463
523
|
<span class="ruby-identifier">files_to_store</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">filename</span><span class="ruby-operator">|</span>
|
@@ -470,21 +530,21 @@ directory
|
|
470
530
|
</div>
|
471
531
|
</div>
|
472
532
|
|
473
|
-
<div id="method-
|
474
|
-
<a name="
|
533
|
+
<div id="method-M000016" class="method-detail">
|
534
|
+
<a name="M000016"></a>
|
475
535
|
|
476
536
|
<div class="method-heading">
|
477
|
-
<a href="#
|
537
|
+
<a href="#M000016" class="method-signature">
|
478
538
|
<span class="method-name">store_changes</span><span class="method-args">(recursive=false)</span>
|
479
539
|
</a>
|
480
540
|
</div>
|
481
541
|
|
482
542
|
<div class="method-description">
|
483
543
|
<p><a class="source-toggle" href="#"
|
484
|
-
onclick="toggleCode('
|
485
|
-
<div class="method-source-code" id="
|
544
|
+
onclick="toggleCode('M000016-source');return false;">[Source]</a></p>
|
545
|
+
<div class="method-source-code" id="M000016-source">
|
486
546
|
<pre>
|
487
|
-
<span class="ruby-comment cmt"># File lib/pho/file_management.rb, line
|
547
|
+
<span class="ruby-comment cmt"># File lib/pho/file_management.rb, line 65</span>
|
488
548
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">store_changes</span>(<span class="ruby-identifier">recursive</span>=<span class="ruby-keyword kw">false</span>)
|
489
549
|
<span class="ruby-identifier">changes</span> = <span class="ruby-identifier">changed_files</span>(<span class="ruby-identifier">recursive</span>)
|
490
550
|
<span class="ruby-identifier">changes</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">filename</span><span class="ruby-operator">|</span>
|
@@ -502,11 +562,11 @@ directory
|
|
502
562
|
</div>
|
503
563
|
</div>
|
504
564
|
|
505
|
-
<div id="method-
|
506
|
-
<a name="
|
565
|
+
<div id="method-M000018" class="method-detail">
|
566
|
+
<a name="M000018"></a>
|
507
567
|
|
508
568
|
<div class="method-heading">
|
509
|
-
<a href="#
|
569
|
+
<a href="#M000018" class="method-signature">
|
510
570
|
<span class="method-name">stored?</span><span class="method-args">(file)</span>
|
511
571
|
</a>
|
512
572
|
</div>
|
@@ -516,10 +576,10 @@ directory
|
|
516
576
|
returns true if there is a fail or ok file, false otherwise
|
517
577
|
</p>
|
518
578
|
<p><a class="source-toggle" href="#"
|
519
|
-
onclick="toggleCode('
|
520
|
-
<div class="method-source-code" id="
|
579
|
+
onclick="toggleCode('M000018-source');return false;">[Source]</a></p>
|
580
|
+
<div class="method-source-code" id="M000018-source">
|
521
581
|
<pre>
|
522
|
-
<span class="ruby-comment cmt"># File lib/pho/file_management.rb, line
|
582
|
+
<span class="ruby-comment cmt"># File lib/pho/file_management.rb, line 94</span>
|
523
583
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">stored?</span>(<span class="ruby-identifier">file</span>)
|
524
584
|
<span class="ruby-identifier">ok_file</span> = <span class="ruby-identifier">get_ok_file_for</span>(<span class="ruby-identifier">file</span>)
|
525
585
|
<span class="ruby-identifier">fail_file</span> = <span class="ruby-identifier">get_fail_file_for</span>(<span class="ruby-identifier">file</span>)
|
@@ -533,21 +593,21 @@ returns true if there is a fail or ok file, false otherwise
|
|
533
593
|
</div>
|
534
594
|
</div>
|
535
595
|
|
536
|
-
<div id="method-
|
537
|
-
<a name="
|
596
|
+
<div id="method-M000020" class="method-detail">
|
597
|
+
<a name="M000020"></a>
|
538
598
|
|
539
599
|
<div class="method-heading">
|
540
|
-
<a href="#
|
600
|
+
<a href="#M000020" class="method-signature">
|
541
601
|
<span class="method-name">stored_files</span><span class="method-args">(recursive=false)</span>
|
542
602
|
</a>
|
543
603
|
</div>
|
544
604
|
|
545
605
|
<div class="method-description">
|
546
606
|
<p><a class="source-toggle" href="#"
|
547
|
-
onclick="toggleCode('
|
548
|
-
<div class="method-source-code" id="
|
607
|
+
onclick="toggleCode('M000020-source');return false;">[Source]</a></p>
|
608
|
+
<div class="method-source-code" id="M000020-source">
|
549
609
|
<pre>
|
550
|
-
<span class="ruby-comment cmt"># File lib/pho/file_management.rb, line
|
610
|
+
<span class="ruby-comment cmt"># File lib/pho/file_management.rb, line 122</span>
|
551
611
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">stored_files</span>(<span class="ruby-identifier">recursive</span>=<span class="ruby-keyword kw">false</span>)
|
552
612
|
<span class="ruby-identifier">stored</span> = <span class="ruby-constant">Array</span>.<span class="ruby-identifier">new</span>
|
553
613
|
<span class="ruby-identifier">list</span>(<span class="ruby-identifier">recursive</span>).<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">file</span><span class="ruby-operator">|</span>
|
@@ -560,24 +620,24 @@ returns true if there is a fail or ok file, false otherwise
|
|
560
620
|
</div>
|
561
621
|
</div>
|
562
622
|
|
563
|
-
<div id="method-
|
564
|
-
<a name="
|
623
|
+
<div id="method-M000024" class="method-detail">
|
624
|
+
<a name="M000024"></a>
|
565
625
|
|
566
626
|
<div class="method-heading">
|
567
|
-
<a href="#
|
627
|
+
<a href="#M000024" class="method-signature">
|
568
628
|
<span class="method-name">successes</span><span class="method-args">(recursive=false)</span>
|
569
629
|
</a>
|
570
630
|
</div>
|
571
631
|
|
572
632
|
<div class="method-description">
|
573
633
|
<p>
|
574
|
-
List <a href="AbstractFileManager.html#
|
634
|
+
List <a href="AbstractFileManager.html#M000024">successes</a>
|
575
635
|
</p>
|
576
636
|
<p><a class="source-toggle" href="#"
|
577
|
-
onclick="toggleCode('
|
578
|
-
<div class="method-source-code" id="
|
637
|
+
onclick="toggleCode('M000024-source');return false;">[Source]</a></p>
|
638
|
+
<div class="method-source-code" id="M000024-source">
|
579
639
|
<pre>
|
580
|
-
<span class="ruby-comment cmt"># File lib/pho/file_management.rb, line
|
640
|
+
<span class="ruby-comment cmt"># File lib/pho/file_management.rb, line 157</span>
|
581
641
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">successes</span>(<span class="ruby-identifier">recursive</span>=<span class="ruby-keyword kw">false</span>)
|
582
642
|
<span class="ruby-identifier">successes</span> = <span class="ruby-constant">Array</span>.<span class="ruby-identifier">new</span>
|
583
643
|
<span class="ruby-identifier">list</span>(<span class="ruby-identifier">recursive</span>).<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">file</span><span class="ruby-operator">|</span>
|
@@ -590,11 +650,11 @@ List <a href="AbstractFileManager.html#M000021">successes</a>
|
|
590
650
|
</div>
|
591
651
|
</div>
|
592
652
|
|
593
|
-
<div id="method-
|
594
|
-
<a name="
|
653
|
+
<div id="method-M000025" class="method-detail">
|
654
|
+
<a name="M000025"></a>
|
595
655
|
|
596
656
|
<div class="method-heading">
|
597
|
-
<a href="#
|
657
|
+
<a href="#M000025" class="method-signature">
|
598
658
|
<span class="method-name">summary</span><span class="method-args">(recursive=false)</span>
|
599
659
|
</a>
|
600
660
|
</div>
|
@@ -605,10 +665,10 @@ Summarize the state of the collection to the provided IO object Creates a
|
|
605
665
|
simple report
|
606
666
|
</p>
|
607
667
|
<p><a class="source-toggle" href="#"
|
608
|
-
onclick="toggleCode('
|
609
|
-
<div class="method-source-code" id="
|
668
|
+
onclick="toggleCode('M000025-source');return false;">[Source]</a></p>
|
669
|
+
<div class="method-source-code" id="M000025-source">
|
610
670
|
<pre>
|
611
|
-
<span class="ruby-comment cmt"># File lib/pho/file_management.rb, line
|
671
|
+
<span class="ruby-comment cmt"># File lib/pho/file_management.rb, line 167</span>
|
612
672
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">summary</span>(<span class="ruby-identifier">recursive</span>=<span class="ruby-keyword kw">false</span>)
|
613
673
|
<span class="ruby-identifier">failures</span> = <span class="ruby-identifier">failures</span>(<span class="ruby-identifier">recursive</span>)
|
614
674
|
<span class="ruby-identifier">successes</span> = <span class="ruby-identifier">successes</span>(<span class="ruby-identifier">recursive</span>)
|