longleaf 0.2.0.pre.1 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.circleci/config.yml +84 -0
- data/.gitignore +4 -2
- data/.rubocop.yml +42 -2
- data/.rubocop_todo.yml +390 -311
- data/.yardopts +1 -0
- data/Gemfile +16 -1
- data/README.md +67 -13
- data/Rakefile +6 -0
- data/bin/setup +16 -1
- data/docs/aboutlongleaf.md +28 -0
- data/docs/extra.css +32 -0
- data/docs/img/change-file.png +0 -0
- data/docs/img/ll-example-preserved.png +0 -0
- data/docs/index.md +19 -0
- data/docs/install.md +66 -0
- data/docs/ll-example/config-example-relative.yml +33 -0
- data/docs/ll-example/files-dir/LLexample-PDF.pdf +0 -0
- data/docs/ll-example/files-dir/LLexample-TOCHANGE.txt +15 -0
- data/docs/ll-example/files-dir/LLexample-tokeep.txt +10 -0
- data/docs/ll-example/metadata-dir/.gitkeep +0 -0
- data/docs/ll-example/replica-files/.gitkeep +0 -0
- data/docs/ll-example/replica-metadata/.gitkeep +0 -0
- data/docs/quickstart.md +270 -0
- data/docs/rdocs/Longleaf.html +135 -0
- data/docs/rdocs/Longleaf/AppFields.html +178 -0
- data/docs/rdocs/Longleaf/ApplicationConfigDeserializer.html +631 -0
- data/docs/rdocs/Longleaf/ApplicationConfigManager.html +610 -0
- data/docs/rdocs/Longleaf/ApplicationConfigValidator.html +238 -0
- data/docs/rdocs/Longleaf/CLI.html +909 -0
- data/docs/rdocs/Longleaf/ChecksumMismatchError.html +151 -0
- data/docs/rdocs/Longleaf/ConfigBuilder.html +1339 -0
- data/docs/rdocs/Longleaf/ConfigurationError.html +143 -0
- data/docs/rdocs/Longleaf/ConfigurationValidator.html +227 -0
- data/docs/rdocs/Longleaf/DeregisterCommand.html +420 -0
- data/docs/rdocs/Longleaf/DeregisterEvent.html +453 -0
- data/docs/rdocs/Longleaf/DeregistrationError.html +151 -0
- data/docs/rdocs/Longleaf/DigestHelper.html +419 -0
- data/docs/rdocs/Longleaf/EventError.html +147 -0
- data/docs/rdocs/Longleaf/EventNames.html +163 -0
- data/docs/rdocs/Longleaf/EventStatusTracking.html +656 -0
- data/docs/rdocs/Longleaf/FileCheckService.html +540 -0
- data/docs/rdocs/Longleaf/FileHelpers.html +520 -0
- data/docs/rdocs/Longleaf/FileRecord.html +716 -0
- data/docs/rdocs/Longleaf/FileSelector.html +901 -0
- data/docs/rdocs/Longleaf/FixityCheckService.html +691 -0
- data/docs/rdocs/Longleaf/IndexManager.html +1155 -0
- data/docs/rdocs/Longleaf/InvalidDigestAlgorithmError.html +143 -0
- data/docs/rdocs/Longleaf/InvalidStoragePathError.html +143 -0
- data/docs/rdocs/Longleaf/Logging.html +405 -0
- data/docs/rdocs/Longleaf/Logging/RedirectingLogger.html +1213 -0
- data/docs/rdocs/Longleaf/LongleafError.html +139 -0
- data/docs/rdocs/Longleaf/MDFields.html +193 -0
- data/docs/rdocs/Longleaf/MetadataBuilder.html +787 -0
- data/docs/rdocs/Longleaf/MetadataDeserializer.html +537 -0
- data/docs/rdocs/Longleaf/MetadataError.html +143 -0
- data/docs/rdocs/Longleaf/MetadataPersistenceManager.html +539 -0
- data/docs/rdocs/Longleaf/MetadataRecord.html +1411 -0
- data/docs/rdocs/Longleaf/MetadataSerializer.html +786 -0
- data/docs/rdocs/Longleaf/PreservationServiceError.html +147 -0
- data/docs/rdocs/Longleaf/PreserveCommand.html +410 -0
- data/docs/rdocs/Longleaf/PreserveEvent.html +491 -0
- data/docs/rdocs/Longleaf/RegisterCommand.html +428 -0
- data/docs/rdocs/Longleaf/RegisterEvent.html +628 -0
- data/docs/rdocs/Longleaf/RegisteredFileSelector.html +446 -0
- data/docs/rdocs/Longleaf/RegistrationError.html +151 -0
- data/docs/rdocs/Longleaf/ReindexCommand.html +576 -0
- data/docs/rdocs/Longleaf/RsyncReplicationService.html +1180 -0
- data/docs/rdocs/Longleaf/SequelIndexDriver.html +1978 -0
- data/docs/rdocs/Longleaf/ServiceCandidateFilesystemIterator.html +572 -0
- data/docs/rdocs/Longleaf/ServiceCandidateIndexIterator.html +532 -0
- data/docs/rdocs/Longleaf/ServiceCandidateLocator.html +333 -0
- data/docs/rdocs/Longleaf/ServiceClassCache.html +725 -0
- data/docs/rdocs/Longleaf/ServiceDateHelper.html +425 -0
- data/docs/rdocs/Longleaf/ServiceDefinition.html +683 -0
- data/docs/rdocs/Longleaf/ServiceDefinitionManager.html +371 -0
- data/docs/rdocs/Longleaf/ServiceDefinitionValidator.html +269 -0
- data/docs/rdocs/Longleaf/ServiceFields.html +173 -0
- data/docs/rdocs/Longleaf/ServiceManager.html +1229 -0
- data/docs/rdocs/Longleaf/ServiceMappingManager.html +410 -0
- data/docs/rdocs/Longleaf/ServiceMappingValidator.html +347 -0
- data/docs/rdocs/Longleaf/ServiceRecord.html +821 -0
- data/docs/rdocs/Longleaf/StorageLocation.html +985 -0
- data/docs/rdocs/Longleaf/StorageLocationManager.html +729 -0
- data/docs/rdocs/Longleaf/StorageLocationUnavailableError.html +143 -0
- data/docs/rdocs/Longleaf/StorageLocationValidator.html +373 -0
- data/docs/rdocs/Longleaf/StoragePathValidator.html +253 -0
- data/docs/rdocs/Longleaf/SystemConfigBuilder.html +441 -0
- data/docs/rdocs/Longleaf/SystemConfigFields.html +163 -0
- data/docs/rdocs/Longleaf/ValidateConfigCommand.html +451 -0
- data/docs/rdocs/Longleaf/ValidateMetadataCommand.html +408 -0
- data/docs/rdocs/_index.html +660 -0
- data/docs/rdocs/class_list.html +51 -0
- data/docs/rdocs/css/common.css +1 -0
- data/docs/rdocs/css/full_list.css +58 -0
- data/docs/rdocs/css/style.css +496 -0
- data/docs/rdocs/file.README.html +165 -0
- data/docs/rdocs/file_list.html +56 -0
- data/docs/rdocs/frames.html +17 -0
- data/docs/rdocs/index.html +165 -0
- data/docs/rdocs/js/app.js +303 -0
- data/docs/rdocs/js/full_list.js +216 -0
- data/docs/rdocs/js/jquery.js +4 -0
- data/docs/rdocs/method_list.html +2051 -0
- data/docs/rdocs/top-level-namespace.html +110 -0
- data/lib/longleaf/candidates/file_selector.rb +47 -15
- data/lib/longleaf/candidates/registered_file_selector.rb +67 -0
- data/lib/longleaf/candidates/service_candidate_filesystem_iterator.rb +29 -35
- data/lib/longleaf/candidates/service_candidate_index_iterator.rb +84 -0
- data/lib/longleaf/candidates/service_candidate_locator.rb +9 -4
- data/lib/longleaf/cli.rb +162 -80
- data/lib/longleaf/commands/deregister_command.rb +12 -11
- data/lib/longleaf/commands/preserve_command.rb +13 -8
- data/lib/longleaf/commands/register_command.rb +9 -6
- data/lib/longleaf/commands/reindex_command.rb +92 -0
- data/lib/longleaf/commands/validate_config_command.rb +27 -6
- data/lib/longleaf/commands/validate_metadata_command.rb +11 -9
- data/lib/longleaf/errors.rb +12 -12
- data/lib/longleaf/events/deregister_event.rb +13 -15
- data/lib/longleaf/events/event_status_tracking.rb +7 -7
- data/lib/longleaf/events/preserve_event.rb +24 -14
- data/lib/longleaf/events/register_event.rb +21 -35
- data/lib/longleaf/helpers/digest_helper.rb +4 -4
- data/lib/longleaf/helpers/service_date_helper.rb +5 -6
- data/lib/longleaf/indexing/index_manager.rb +101 -0
- data/lib/longleaf/indexing/sequel_index_driver.rb +324 -0
- data/lib/longleaf/logging.rb +4 -4
- data/lib/longleaf/logging/redirecting_logger.rb +20 -20
- data/lib/longleaf/models/app_fields.rb +2 -1
- data/lib/longleaf/models/file_record.rb +10 -6
- data/lib/longleaf/models/md_fields.rb +1 -1
- data/lib/longleaf/models/metadata_record.rb +22 -12
- data/lib/longleaf/models/service_definition.rb +3 -3
- data/lib/longleaf/models/service_fields.rb +1 -1
- data/lib/longleaf/models/service_record.rb +6 -5
- data/lib/longleaf/models/storage_location.rb +26 -7
- data/lib/longleaf/models/system_config_fields.rb +9 -0
- data/lib/longleaf/preservation_services/file_check_service.rb +58 -0
- data/lib/longleaf/preservation_services/fixity_check_service.rb +16 -14
- data/lib/longleaf/preservation_services/rsync_replication_service.rb +32 -31
- data/lib/longleaf/services/application_config_deserializer.rb +55 -18
- data/lib/longleaf/services/application_config_manager.rb +16 -4
- data/lib/longleaf/services/application_config_validator.rb +1 -2
- data/lib/longleaf/services/configuration_validator.rb +6 -4
- data/lib/longleaf/services/metadata_deserializer.rb +40 -38
- data/lib/longleaf/services/metadata_persistence_manager.rb +46 -0
- data/lib/longleaf/services/metadata_serializer.rb +23 -22
- data/lib/longleaf/services/service_class_cache.rb +15 -15
- data/lib/longleaf/services/service_definition_manager.rb +5 -6
- data/lib/longleaf/services/service_definition_validator.rb +5 -6
- data/lib/longleaf/services/service_manager.rb +37 -17
- data/lib/longleaf/services/service_mapping_manager.rb +9 -9
- data/lib/longleaf/services/service_mapping_validator.rb +9 -10
- data/lib/longleaf/services/storage_location_manager.rb +22 -8
- data/lib/longleaf/services/storage_location_validator.rb +11 -8
- data/lib/longleaf/services/storage_path_validator.rb +1 -1
- data/lib/longleaf/specs/config_builder.rb +30 -17
- data/lib/longleaf/specs/custom_matchers.rb +1 -1
- data/lib/longleaf/specs/file_helpers.rb +15 -14
- data/lib/longleaf/specs/metadata_builder.rb +91 -0
- data/lib/longleaf/specs/system_config_builder.rb +27 -0
- data/lib/longleaf/version.rb +1 -1
- data/longleaf.gemspec +17 -7
- data/mkdocs.yml +20 -0
- metadata +233 -22
@@ -0,0 +1,238 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<meta charset="utf-8">
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6
|
+
<title>
|
7
|
+
Class: Longleaf::ApplicationConfigValidator
|
8
|
+
|
9
|
+
— Documentation by YARD 0.9.19
|
10
|
+
|
11
|
+
</title>
|
12
|
+
|
13
|
+
<link rel="stylesheet" href="../css/style.css" type="text/css" charset="utf-8" />
|
14
|
+
|
15
|
+
<link rel="stylesheet" href="../css/common.css" type="text/css" charset="utf-8" />
|
16
|
+
|
17
|
+
<script type="text/javascript" charset="utf-8">
|
18
|
+
pathId = "Longleaf::ApplicationConfigValidator";
|
19
|
+
relpath = '../';
|
20
|
+
</script>
|
21
|
+
|
22
|
+
|
23
|
+
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
|
24
|
+
|
25
|
+
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
|
26
|
+
|
27
|
+
|
28
|
+
</head>
|
29
|
+
<body>
|
30
|
+
<div class="nav_wrap">
|
31
|
+
<iframe id="nav" src="../class_list.html?1"></iframe>
|
32
|
+
<div id="resizer"></div>
|
33
|
+
</div>
|
34
|
+
|
35
|
+
<div id="main" tabindex="-1">
|
36
|
+
<div id="header">
|
37
|
+
<div id="menu">
|
38
|
+
|
39
|
+
<a href="../_index.html">Index (A)</a> »
|
40
|
+
<span class='title'><span class='object_link'><a href="../Longleaf.html" title="Longleaf (module)">Longleaf</a></span></span>
|
41
|
+
»
|
42
|
+
<span class="title">ApplicationConfigValidator</span>
|
43
|
+
|
44
|
+
</div>
|
45
|
+
|
46
|
+
<div id="search">
|
47
|
+
|
48
|
+
<a class="full_list_link" id="class_list_link"
|
49
|
+
href="../class_list.html">
|
50
|
+
|
51
|
+
<svg width="24" height="24">
|
52
|
+
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
|
53
|
+
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
|
54
|
+
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
|
55
|
+
</svg>
|
56
|
+
</a>
|
57
|
+
|
58
|
+
</div>
|
59
|
+
<div class="clear"></div>
|
60
|
+
</div>
|
61
|
+
|
62
|
+
<div id="content"><h1>Class: Longleaf::ApplicationConfigValidator
|
63
|
+
|
64
|
+
|
65
|
+
|
66
|
+
</h1>
|
67
|
+
<div class="box_info">
|
68
|
+
|
69
|
+
<dl>
|
70
|
+
<dt>Inherits:</dt>
|
71
|
+
<dd>
|
72
|
+
<span class="inheritName">Object</span>
|
73
|
+
|
74
|
+
<ul class="fullTree">
|
75
|
+
<li>Object</li>
|
76
|
+
|
77
|
+
<li class="next">Longleaf::ApplicationConfigValidator</li>
|
78
|
+
|
79
|
+
</ul>
|
80
|
+
<a href="#" class="inheritanceTree">show all</a>
|
81
|
+
|
82
|
+
</dd>
|
83
|
+
</dl>
|
84
|
+
|
85
|
+
|
86
|
+
|
87
|
+
|
88
|
+
|
89
|
+
|
90
|
+
|
91
|
+
|
92
|
+
|
93
|
+
|
94
|
+
|
95
|
+
<dl>
|
96
|
+
<dt>Defined in:</dt>
|
97
|
+
<dd>lib/longleaf/services/application_config_validator.rb</dd>
|
98
|
+
</dl>
|
99
|
+
|
100
|
+
</div>
|
101
|
+
|
102
|
+
<h2>Overview</h2><div class="docstring">
|
103
|
+
<div class="discussion">
|
104
|
+
|
105
|
+
<p>Validator for Longleaf application configuration</p>
|
106
|
+
|
107
|
+
|
108
|
+
</div>
|
109
|
+
</div>
|
110
|
+
<div class="tags">
|
111
|
+
|
112
|
+
|
113
|
+
</div>
|
114
|
+
|
115
|
+
|
116
|
+
|
117
|
+
|
118
|
+
|
119
|
+
|
120
|
+
|
121
|
+
<h2>
|
122
|
+
Class Method Summary
|
123
|
+
<small><a href="#" class="summary_toggle">collapse</a></small>
|
124
|
+
</h2>
|
125
|
+
|
126
|
+
<ul class="summary">
|
127
|
+
|
128
|
+
<li class="public ">
|
129
|
+
<span class="summary_signature">
|
130
|
+
|
131
|
+
<a href="#validate-class_method" title="validate (class method)">.<strong>validate</strong>(config) ⇒ Object </a>
|
132
|
+
|
133
|
+
|
134
|
+
|
135
|
+
</span>
|
136
|
+
|
137
|
+
|
138
|
+
|
139
|
+
|
140
|
+
|
141
|
+
|
142
|
+
|
143
|
+
|
144
|
+
|
145
|
+
<span class="summary_desc"><div class='inline'>
|
146
|
+
<p>Validates the application configuration provided.</p>
|
147
|
+
</div></span>
|
148
|
+
|
149
|
+
</li>
|
150
|
+
|
151
|
+
|
152
|
+
</ul>
|
153
|
+
|
154
|
+
|
155
|
+
|
156
|
+
|
157
|
+
<div id="class_method_details" class="method_details_list">
|
158
|
+
<h2>Class Method Details</h2>
|
159
|
+
|
160
|
+
|
161
|
+
<div class="method_details first">
|
162
|
+
<h3 class="signature first" id="validate-class_method">
|
163
|
+
|
164
|
+
.<strong>validate</strong>(config) ⇒ <tt>Object</tt>
|
165
|
+
|
166
|
+
|
167
|
+
|
168
|
+
|
169
|
+
|
170
|
+
</h3><div class="docstring">
|
171
|
+
<div class="discussion">
|
172
|
+
|
173
|
+
<p>Validates the application configuration provided. Will raise ConfigurationError if any portion of the configuration is not syntactically or semantically valid.</p>
|
174
|
+
|
175
|
+
|
176
|
+
</div>
|
177
|
+
</div>
|
178
|
+
<div class="tags">
|
179
|
+
<p class="tag_title">Parameters:</p>
|
180
|
+
<ul class="param">
|
181
|
+
|
182
|
+
<li>
|
183
|
+
|
184
|
+
<span class='name'>config</span>
|
185
|
+
|
186
|
+
|
187
|
+
<span class='type'>(<tt>Hash</tt>)</span>
|
188
|
+
|
189
|
+
|
190
|
+
|
191
|
+
—
|
192
|
+
<div class='inline'>
|
193
|
+
<p>application configuration</p>
|
194
|
+
</div>
|
195
|
+
|
196
|
+
</li>
|
197
|
+
|
198
|
+
</ul>
|
199
|
+
|
200
|
+
|
201
|
+
</div><table class="source_code">
|
202
|
+
<tr>
|
203
|
+
<td>
|
204
|
+
<pre class="lines">
|
205
|
+
|
206
|
+
|
207
|
+
11
|
208
|
+
12
|
209
|
+
13
|
210
|
+
14
|
211
|
+
15</pre>
|
212
|
+
</td>
|
213
|
+
<td>
|
214
|
+
<pre class="code"><span class="info file"># File 'lib/longleaf/services/application_config_validator.rb', line 11</span>
|
215
|
+
|
216
|
+
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_validate'>validate</span><span class='lparen'>(</span><span class='id identifier rubyid_config'>config</span><span class='rparen'>)</span>
|
217
|
+
<span class='const'><span class='object_link'><a href="../Longleaf.html" title="Longleaf (module)">Longleaf</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="StorageLocationValidator.html" title="Longleaf::StorageLocationValidator (class)">StorageLocationValidator</a></span></span><span class='op'>::</span><span class='id identifier rubyid_validate_config'><span class='object_link'><a href="StorageLocationValidator.html#validate_config-class_method" title="Longleaf::StorageLocationValidator.validate_config (method)">validate_config</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_config'>config</span><span class='rparen'>)</span>
|
218
|
+
<span class='const'><span class='object_link'><a href="../Longleaf.html" title="Longleaf (module)">Longleaf</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="ServiceDefinitionValidator.html" title="Longleaf::ServiceDefinitionValidator (class)">ServiceDefinitionValidator</a></span></span><span class='op'>::</span><span class='id identifier rubyid_validate_config'><span class='object_link'><a href="ServiceDefinitionValidator.html#validate_config-class_method" title="Longleaf::ServiceDefinitionValidator.validate_config (method)">validate_config</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_config'>config</span><span class='rparen'>)</span>
|
219
|
+
<span class='const'><span class='object_link'><a href="../Longleaf.html" title="Longleaf (module)">Longleaf</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="ServiceMappingValidator.html" title="Longleaf::ServiceMappingValidator (class)">ServiceMappingValidator</a></span></span><span class='op'>::</span><span class='id identifier rubyid_validate_config'><span class='object_link'><a href="ServiceMappingValidator.html#validate_config-class_method" title="Longleaf::ServiceMappingValidator.validate_config (method)">validate_config</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_config'>config</span><span class='rparen'>)</span>
|
220
|
+
<span class='kw'>end</span></pre>
|
221
|
+
</td>
|
222
|
+
</tr>
|
223
|
+
</table>
|
224
|
+
</div>
|
225
|
+
|
226
|
+
</div>
|
227
|
+
|
228
|
+
</div>
|
229
|
+
|
230
|
+
<div id="footer">
|
231
|
+
Generated on Tue May 28 15:48:02 2019 by
|
232
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
233
|
+
0.9.19 (ruby-2.6.3).
|
234
|
+
</div>
|
235
|
+
|
236
|
+
</div>
|
237
|
+
</body>
|
238
|
+
</html>
|
@@ -0,0 +1,909 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<meta charset="utf-8">
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6
|
+
<title>
|
7
|
+
Class: Longleaf::CLI
|
8
|
+
|
9
|
+
— Documentation by YARD 0.9.19
|
10
|
+
|
11
|
+
</title>
|
12
|
+
|
13
|
+
<link rel="stylesheet" href="../css/style.css" type="text/css" charset="utf-8" />
|
14
|
+
|
15
|
+
<link rel="stylesheet" href="../css/common.css" type="text/css" charset="utf-8" />
|
16
|
+
|
17
|
+
<script type="text/javascript" charset="utf-8">
|
18
|
+
pathId = "Longleaf::CLI";
|
19
|
+
relpath = '../';
|
20
|
+
</script>
|
21
|
+
|
22
|
+
|
23
|
+
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
|
24
|
+
|
25
|
+
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
|
26
|
+
|
27
|
+
|
28
|
+
</head>
|
29
|
+
<body>
|
30
|
+
<div class="nav_wrap">
|
31
|
+
<iframe id="nav" src="../class_list.html?1"></iframe>
|
32
|
+
<div id="resizer"></div>
|
33
|
+
</div>
|
34
|
+
|
35
|
+
<div id="main" tabindex="-1">
|
36
|
+
<div id="header">
|
37
|
+
<div id="menu">
|
38
|
+
|
39
|
+
<a href="../_index.html">Index (C)</a> »
|
40
|
+
<span class='title'><span class='object_link'><a href="../Longleaf.html" title="Longleaf (module)">Longleaf</a></span></span>
|
41
|
+
»
|
42
|
+
<span class="title">CLI</span>
|
43
|
+
|
44
|
+
</div>
|
45
|
+
|
46
|
+
<div id="search">
|
47
|
+
|
48
|
+
<a class="full_list_link" id="class_list_link"
|
49
|
+
href="../class_list.html">
|
50
|
+
|
51
|
+
<svg width="24" height="24">
|
52
|
+
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
|
53
|
+
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
|
54
|
+
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
|
55
|
+
</svg>
|
56
|
+
</a>
|
57
|
+
|
58
|
+
</div>
|
59
|
+
<div class="clear"></div>
|
60
|
+
</div>
|
61
|
+
|
62
|
+
<div id="content"><h1>Class: Longleaf::CLI
|
63
|
+
|
64
|
+
|
65
|
+
|
66
|
+
</h1>
|
67
|
+
<div class="box_info">
|
68
|
+
|
69
|
+
<dl>
|
70
|
+
<dt>Inherits:</dt>
|
71
|
+
<dd>
|
72
|
+
<span class="inheritName">Thor</span>
|
73
|
+
|
74
|
+
<ul class="fullTree">
|
75
|
+
<li>Object</li>
|
76
|
+
|
77
|
+
<li class="next">Thor</li>
|
78
|
+
|
79
|
+
<li class="next">Longleaf::CLI</li>
|
80
|
+
|
81
|
+
</ul>
|
82
|
+
<a href="#" class="inheritanceTree">show all</a>
|
83
|
+
|
84
|
+
</dd>
|
85
|
+
</dl>
|
86
|
+
|
87
|
+
|
88
|
+
|
89
|
+
|
90
|
+
|
91
|
+
|
92
|
+
<dl>
|
93
|
+
<dt>Includes:</dt>
|
94
|
+
<dd><span class='object_link'><a href="Logging.html" title="Longleaf::Logging (module)">Logging</a></span></dd>
|
95
|
+
</dl>
|
96
|
+
|
97
|
+
|
98
|
+
|
99
|
+
|
100
|
+
|
101
|
+
|
102
|
+
<dl>
|
103
|
+
<dt>Defined in:</dt>
|
104
|
+
<dd>lib/longleaf/cli.rb</dd>
|
105
|
+
</dl>
|
106
|
+
|
107
|
+
</div>
|
108
|
+
|
109
|
+
<h2>Overview</h2><div class="docstring">
|
110
|
+
<div class="discussion">
|
111
|
+
|
112
|
+
<p>Main commandline interface setup for Longleaf using Thor.</p>
|
113
|
+
|
114
|
+
|
115
|
+
</div>
|
116
|
+
</div>
|
117
|
+
<div class="tags">
|
118
|
+
|
119
|
+
|
120
|
+
</div>
|
121
|
+
|
122
|
+
|
123
|
+
|
124
|
+
|
125
|
+
|
126
|
+
|
127
|
+
|
128
|
+
<h2>
|
129
|
+
Class Method Summary
|
130
|
+
<small><a href="#" class="summary_toggle">collapse</a></small>
|
131
|
+
</h2>
|
132
|
+
|
133
|
+
<ul class="summary">
|
134
|
+
|
135
|
+
<li class="public ">
|
136
|
+
<span class="summary_signature">
|
137
|
+
|
138
|
+
<a href="#add_shared_option-class_method" title="add_shared_option (class method)">.<strong>add_shared_option</strong>(name, group, options = {}) ⇒ Object </a>
|
139
|
+
|
140
|
+
|
141
|
+
|
142
|
+
</span>
|
143
|
+
|
144
|
+
|
145
|
+
|
146
|
+
|
147
|
+
|
148
|
+
|
149
|
+
|
150
|
+
|
151
|
+
|
152
|
+
<span class="summary_desc"><div class='inline'>
|
153
|
+
<p>Register a shared method option in a shared option group.</p>
|
154
|
+
</div></span>
|
155
|
+
|
156
|
+
</li>
|
157
|
+
|
158
|
+
|
159
|
+
<li class="public ">
|
160
|
+
<span class="summary_signature">
|
161
|
+
|
162
|
+
<a href="#shared_options_group-class_method" title="shared_options_group (class method)">.<strong>shared_options_group</strong>(group_name) ⇒ Object </a>
|
163
|
+
|
164
|
+
|
165
|
+
|
166
|
+
</span>
|
167
|
+
|
168
|
+
|
169
|
+
|
170
|
+
|
171
|
+
|
172
|
+
|
173
|
+
|
174
|
+
|
175
|
+
|
176
|
+
<span class="summary_desc"><div class='inline'>
|
177
|
+
<p>Add all of the shared options in the specified group as method options.</p>
|
178
|
+
</div></span>
|
179
|
+
|
180
|
+
</li>
|
181
|
+
|
182
|
+
|
183
|
+
</ul>
|
184
|
+
|
185
|
+
<h2>
|
186
|
+
Instance Method Summary
|
187
|
+
<small><a href="#" class="summary_toggle">collapse</a></small>
|
188
|
+
</h2>
|
189
|
+
|
190
|
+
<ul class="summary">
|
191
|
+
|
192
|
+
<li class="public ">
|
193
|
+
<span class="summary_signature">
|
194
|
+
|
195
|
+
<a href="#__print_version-instance_method" title="#__print_version (instance method)">#<strong>__print_version</strong> ⇒ Object </a>
|
196
|
+
|
197
|
+
|
198
|
+
|
199
|
+
</span>
|
200
|
+
|
201
|
+
|
202
|
+
|
203
|
+
|
204
|
+
|
205
|
+
|
206
|
+
|
207
|
+
|
208
|
+
|
209
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
210
|
+
|
211
|
+
</li>
|
212
|
+
|
213
|
+
|
214
|
+
<li class="public ">
|
215
|
+
<span class="summary_signature">
|
216
|
+
|
217
|
+
<a href="#deregister-instance_method" title="#deregister (instance method)">#<strong>deregister</strong> ⇒ Object </a>
|
218
|
+
|
219
|
+
|
220
|
+
|
221
|
+
</span>
|
222
|
+
|
223
|
+
|
224
|
+
|
225
|
+
|
226
|
+
|
227
|
+
|
228
|
+
|
229
|
+
|
230
|
+
|
231
|
+
<span class="summary_desc"><div class='inline'>
|
232
|
+
<p>Deregister event command.</p>
|
233
|
+
</div></span>
|
234
|
+
|
235
|
+
</li>
|
236
|
+
|
237
|
+
|
238
|
+
<li class="public ">
|
239
|
+
<span class="summary_signature">
|
240
|
+
|
241
|
+
<a href="#preserve-instance_method" title="#preserve (instance method)">#<strong>preserve</strong> ⇒ Object </a>
|
242
|
+
|
243
|
+
|
244
|
+
|
245
|
+
</span>
|
246
|
+
|
247
|
+
|
248
|
+
|
249
|
+
|
250
|
+
|
251
|
+
|
252
|
+
|
253
|
+
|
254
|
+
|
255
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
256
|
+
|
257
|
+
</li>
|
258
|
+
|
259
|
+
|
260
|
+
<li class="public ">
|
261
|
+
<span class="summary_signature">
|
262
|
+
|
263
|
+
<a href="#register-instance_method" title="#register (instance method)">#<strong>register</strong> ⇒ Object </a>
|
264
|
+
|
265
|
+
|
266
|
+
|
267
|
+
</span>
|
268
|
+
|
269
|
+
|
270
|
+
|
271
|
+
|
272
|
+
|
273
|
+
|
274
|
+
|
275
|
+
|
276
|
+
|
277
|
+
<span class="summary_desc"><div class='inline'>
|
278
|
+
<p>Register event command.</p>
|
279
|
+
</div></span>
|
280
|
+
|
281
|
+
</li>
|
282
|
+
|
283
|
+
|
284
|
+
<li class="public ">
|
285
|
+
<span class="summary_signature">
|
286
|
+
|
287
|
+
<a href="#reindex-instance_method" title="#reindex (instance method)">#<strong>reindex</strong> ⇒ Object </a>
|
288
|
+
|
289
|
+
|
290
|
+
|
291
|
+
</span>
|
292
|
+
|
293
|
+
|
294
|
+
|
295
|
+
|
296
|
+
|
297
|
+
|
298
|
+
|
299
|
+
|
300
|
+
|
301
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
302
|
+
|
303
|
+
</li>
|
304
|
+
|
305
|
+
|
306
|
+
<li class="public ">
|
307
|
+
<span class="summary_signature">
|
308
|
+
|
309
|
+
<a href="#setup_index-instance_method" title="#setup_index (instance method)">#<strong>setup_index</strong> ⇒ Object </a>
|
310
|
+
|
311
|
+
|
312
|
+
|
313
|
+
</span>
|
314
|
+
|
315
|
+
|
316
|
+
|
317
|
+
|
318
|
+
|
319
|
+
|
320
|
+
|
321
|
+
|
322
|
+
|
323
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
324
|
+
|
325
|
+
</li>
|
326
|
+
|
327
|
+
|
328
|
+
<li class="public ">
|
329
|
+
<span class="summary_signature">
|
330
|
+
|
331
|
+
<a href="#validate_config-instance_method" title="#validate_config (instance method)">#<strong>validate_config</strong> ⇒ Object </a>
|
332
|
+
|
333
|
+
|
334
|
+
|
335
|
+
</span>
|
336
|
+
|
337
|
+
|
338
|
+
|
339
|
+
|
340
|
+
|
341
|
+
|
342
|
+
|
343
|
+
|
344
|
+
|
345
|
+
<span class="summary_desc"><div class='inline'>
|
346
|
+
<p>Application configuration validation command.</p>
|
347
|
+
</div></span>
|
348
|
+
|
349
|
+
</li>
|
350
|
+
|
351
|
+
|
352
|
+
<li class="public ">
|
353
|
+
<span class="summary_signature">
|
354
|
+
|
355
|
+
<a href="#validate_metadata-instance_method" title="#validate_metadata (instance method)">#<strong>validate_metadata</strong> ⇒ Object </a>
|
356
|
+
|
357
|
+
|
358
|
+
|
359
|
+
</span>
|
360
|
+
|
361
|
+
|
362
|
+
|
363
|
+
|
364
|
+
|
365
|
+
|
366
|
+
|
367
|
+
|
368
|
+
|
369
|
+
<span class="summary_desc"><div class='inline'>
|
370
|
+
<p>File metadata validation command.</p>
|
371
|
+
</div></span>
|
372
|
+
|
373
|
+
</li>
|
374
|
+
|
375
|
+
|
376
|
+
</ul>
|
377
|
+
|
378
|
+
|
379
|
+
|
380
|
+
|
381
|
+
|
382
|
+
|
383
|
+
|
384
|
+
|
385
|
+
|
386
|
+
|
387
|
+
|
388
|
+
<h3 class="inherited">Methods included from <span class='object_link'><a href="Logging.html" title="Longleaf::Logging (module)">Logging</a></span></h3>
|
389
|
+
<p class="inherited"><span class='object_link'><a href="Logging.html#initialize_logger-instance_method" title="Longleaf::Logging#initialize_logger (method)">#initialize_logger</a></span>, <span class='object_link'><a href="Logging.html#initialize_logger-class_method" title="Longleaf::Logging.initialize_logger (method)">initialize_logger</a></span>, <span class='object_link'><a href="Logging.html#logger-instance_method" title="Longleaf::Logging#logger (method)">#logger</a></span>, <span class='object_link'><a href="Logging.html#logger-class_method" title="Longleaf::Logging.logger (method)">logger</a></span></p>
|
390
|
+
|
391
|
+
|
392
|
+
|
393
|
+
<div id="class_method_details" class="method_details_list">
|
394
|
+
<h2>Class Method Details</h2>
|
395
|
+
|
396
|
+
|
397
|
+
<div class="method_details first">
|
398
|
+
<h3 class="signature first" id="add_shared_option-class_method">
|
399
|
+
|
400
|
+
.<strong>add_shared_option</strong>(name, group, options = {}) ⇒ <tt>Object</tt>
|
401
|
+
|
402
|
+
|
403
|
+
|
404
|
+
|
405
|
+
|
406
|
+
</h3><div class="docstring">
|
407
|
+
<div class="discussion">
|
408
|
+
|
409
|
+
<p>Register a shared method option in a shared option group</p>
|
410
|
+
|
411
|
+
|
412
|
+
</div>
|
413
|
+
</div>
|
414
|
+
<div class="tags">
|
415
|
+
|
416
|
+
|
417
|
+
</div><table class="source_code">
|
418
|
+
<tr>
|
419
|
+
<td>
|
420
|
+
<pre class="lines">
|
421
|
+
|
422
|
+
|
423
|
+
21
|
424
|
+
22
|
425
|
+
23
|
426
|
+
24
|
427
|
+
25</pre>
|
428
|
+
</td>
|
429
|
+
<td>
|
430
|
+
<pre class="code"><span class="info file"># File 'lib/longleaf/cli.rb', line 21</span>
|
431
|
+
|
432
|
+
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_add_shared_option'>add_shared_option</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='comma'>,</span> <span class='id identifier rubyid_group'>group</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
|
433
|
+
<span class='ivar'>@shared_groups</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span> <span class='kw'>if</span> <span class='ivar'>@shared_groups</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
|
434
|
+
<span class='ivar'>@shared_groups</span><span class='lbracket'>[</span><span class='id identifier rubyid_group'>group</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span> <span class='kw'>if</span> <span class='ivar'>@shared_groups</span><span class='lbracket'>[</span><span class='id identifier rubyid_group'>group</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
|
435
|
+
<span class='ivar'>@shared_groups</span><span class='lbracket'>[</span><span class='id identifier rubyid_group'>group</span><span class='rbracket'>]</span><span class='lbracket'>[</span><span class='id identifier rubyid_name'>name</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_options'>options</span>
|
436
|
+
<span class='kw'>end</span></pre>
|
437
|
+
</td>
|
438
|
+
</tr>
|
439
|
+
</table>
|
440
|
+
</div>
|
441
|
+
|
442
|
+
<div class="method_details ">
|
443
|
+
<h3 class="signature " id="shared_options_group-class_method">
|
444
|
+
|
445
|
+
.<strong>shared_options_group</strong>(group_name) ⇒ <tt>Object</tt>
|
446
|
+
|
447
|
+
|
448
|
+
|
449
|
+
|
450
|
+
|
451
|
+
</h3><div class="docstring">
|
452
|
+
<div class="discussion">
|
453
|
+
|
454
|
+
<p>Add all of the shared options in the specified group as method options</p>
|
455
|
+
|
456
|
+
|
457
|
+
</div>
|
458
|
+
</div>
|
459
|
+
<div class="tags">
|
460
|
+
|
461
|
+
|
462
|
+
</div><table class="source_code">
|
463
|
+
<tr>
|
464
|
+
<td>
|
465
|
+
<pre class="lines">
|
466
|
+
|
467
|
+
|
468
|
+
28
|
469
|
+
29
|
470
|
+
30
|
471
|
+
31
|
472
|
+
32</pre>
|
473
|
+
</td>
|
474
|
+
<td>
|
475
|
+
<pre class="code"><span class="info file"># File 'lib/longleaf/cli.rb', line 28</span>
|
476
|
+
|
477
|
+
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_shared_options_group'>shared_options_group</span><span class='lparen'>(</span><span class='id identifier rubyid_group_name'>group_name</span><span class='rparen'>)</span>
|
478
|
+
<span class='ivar'>@shared_groups</span><span class='lbracket'>[</span><span class='id identifier rubyid_group_name'>group_name</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_opt_name'>opt_name</span><span class='comma'>,</span> <span class='id identifier rubyid_opt'>opt</span><span class='op'>|</span>
|
479
|
+
<span class='id identifier rubyid_option'>option</span> <span class='id identifier rubyid_opt_name'>opt_name</span><span class='comma'>,</span> <span class='id identifier rubyid_opt'>opt</span>
|
480
|
+
<span class='kw'>end</span>
|
481
|
+
<span class='kw'>end</span></pre>
|
482
|
+
</td>
|
483
|
+
</tr>
|
484
|
+
</table>
|
485
|
+
</div>
|
486
|
+
|
487
|
+
</div>
|
488
|
+
|
489
|
+
<div id="instance_method_details" class="method_details_list">
|
490
|
+
<h2>Instance Method Details</h2>
|
491
|
+
|
492
|
+
|
493
|
+
<div class="method_details first">
|
494
|
+
<h3 class="signature first" id="__print_version-instance_method">
|
495
|
+
|
496
|
+
#<strong>__print_version</strong> ⇒ <tt>Object</tt>
|
497
|
+
|
498
|
+
|
499
|
+
|
500
|
+
|
501
|
+
|
502
|
+
</h3><table class="source_code">
|
503
|
+
<tr>
|
504
|
+
<td>
|
505
|
+
<pre class="lines">
|
506
|
+
|
507
|
+
|
508
|
+
78
|
509
|
+
79
|
510
|
+
80</pre>
|
511
|
+
</td>
|
512
|
+
<td>
|
513
|
+
<pre class="code"><span class="info file"># File 'lib/longleaf/cli.rb', line 78</span>
|
514
|
+
|
515
|
+
<span class='kw'>def</span> <span class='id identifier rubyid___print_version'>__print_version</span>
|
516
|
+
<span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>longleaf version </span><span class='embexpr_beg'>#{</span><span class='const'><span class='object_link'><a href="../Longleaf.html" title="Longleaf (module)">Longleaf</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Longleaf.html#VERSION-constant" title="Longleaf::VERSION (constant)">VERSION</a></span></span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span>
|
517
|
+
<span class='kw'>end</span></pre>
|
518
|
+
</td>
|
519
|
+
</tr>
|
520
|
+
</table>
|
521
|
+
</div>
|
522
|
+
|
523
|
+
<div class="method_details ">
|
524
|
+
<h3 class="signature " id="deregister-instance_method">
|
525
|
+
|
526
|
+
#<strong>deregister</strong> ⇒ <tt>Object</tt>
|
527
|
+
|
528
|
+
|
529
|
+
|
530
|
+
|
531
|
+
|
532
|
+
</h3><div class="docstring">
|
533
|
+
<div class="discussion">
|
534
|
+
|
535
|
+
<p>Deregister event command</p>
|
536
|
+
|
537
|
+
|
538
|
+
</div>
|
539
|
+
</div>
|
540
|
+
<div class="tags">
|
541
|
+
|
542
|
+
|
543
|
+
</div><table class="source_code">
|
544
|
+
<tr>
|
545
|
+
<td>
|
546
|
+
<pre class="lines">
|
547
|
+
|
548
|
+
|
549
|
+
124
|
550
|
+
125
|
551
|
+
126
|
552
|
+
127
|
553
|
+
128
|
554
|
+
129
|
555
|
+
130
|
556
|
+
131
|
557
|
+
132
|
558
|
+
133</pre>
|
559
|
+
</td>
|
560
|
+
<td>
|
561
|
+
<pre class="code"><span class="info file"># File 'lib/longleaf/cli.rb', line 124</span>
|
562
|
+
|
563
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_deregister'>deregister</span>
|
564
|
+
<span class='id identifier rubyid_verify_config_provided'>verify_config_provided</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
|
565
|
+
<span class='id identifier rubyid_setup_logger'>setup_logger</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
|
566
|
+
|
567
|
+
<span class='id identifier rubyid_app_config_manager'>app_config_manager</span> <span class='op'>=</span> <span class='id identifier rubyid_load_application_config'>load_application_config</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
|
568
|
+
<span class='id identifier rubyid_file_selector'>file_selector</span> <span class='op'>=</span> <span class='id identifier rubyid_create_registered_selector'>create_registered_selector</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='comma'>,</span> <span class='id identifier rubyid_app_config_manager'>app_config_manager</span><span class='rparen'>)</span>
|
569
|
+
|
570
|
+
<span class='id identifier rubyid_command'>command</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="DeregisterCommand.html" title="Longleaf::DeregisterCommand (class)">DeregisterCommand</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="DeregisterCommand.html#initialize-instance_method" title="Longleaf::DeregisterCommand#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_app_config_manager'>app_config_manager</span><span class='rparen'>)</span>
|
571
|
+
<span class='id identifier rubyid_exit'>exit</span> <span class='id identifier rubyid_command'>command</span><span class='period'>.</span><span class='id identifier rubyid_execute'>execute</span><span class='lparen'>(</span><span class='label'>file_selector:</span> <span class='id identifier rubyid_file_selector'>file_selector</span><span class='comma'>,</span> <span class='label'>force:</span> <span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:force</span><span class='rbracket'>]</span><span class='rparen'>)</span>
|
572
|
+
<span class='kw'>end</span></pre>
|
573
|
+
</td>
|
574
|
+
</tr>
|
575
|
+
</table>
|
576
|
+
</div>
|
577
|
+
|
578
|
+
<div class="method_details ">
|
579
|
+
<h3 class="signature " id="preserve-instance_method">
|
580
|
+
|
581
|
+
#<strong>preserve</strong> ⇒ <tt>Object</tt>
|
582
|
+
|
583
|
+
|
584
|
+
|
585
|
+
|
586
|
+
|
587
|
+
</h3><table class="source_code">
|
588
|
+
<tr>
|
589
|
+
<td>
|
590
|
+
<pre class="lines">
|
591
|
+
|
592
|
+
|
593
|
+
142
|
594
|
+
143
|
595
|
+
144
|
596
|
+
145
|
597
|
+
146
|
598
|
+
147
|
599
|
+
148
|
600
|
+
149
|
601
|
+
150
|
602
|
+
151
|
603
|
+
152</pre>
|
604
|
+
</td>
|
605
|
+
<td>
|
606
|
+
<pre class="code"><span class="info file"># File 'lib/longleaf/cli.rb', line 142</span>
|
607
|
+
|
608
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_preserve'>preserve</span>
|
609
|
+
<span class='id identifier rubyid_verify_config_provided'>verify_config_provided</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
|
610
|
+
<span class='id identifier rubyid_setup_logger'>setup_logger</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
|
611
|
+
|
612
|
+
<span class='id identifier rubyid_extend_load_path'>extend_load_path</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:load_path</span><span class='rbracket'>]</span><span class='rparen'>)</span>
|
613
|
+
<span class='id identifier rubyid_app_config_manager'>app_config_manager</span> <span class='op'>=</span> <span class='id identifier rubyid_load_application_config'>load_application_config</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
|
614
|
+
<span class='id identifier rubyid_file_selector'>file_selector</span> <span class='op'>=</span> <span class='id identifier rubyid_create_registered_selector'>create_registered_selector</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='comma'>,</span> <span class='id identifier rubyid_app_config_manager'>app_config_manager</span><span class='rparen'>)</span>
|
615
|
+
|
616
|
+
<span class='id identifier rubyid_command'>command</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="PreserveCommand.html" title="Longleaf::PreserveCommand (class)">PreserveCommand</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="PreserveCommand.html#initialize-instance_method" title="Longleaf::PreserveCommand#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_app_config_manager'>app_config_manager</span><span class='rparen'>)</span>
|
617
|
+
<span class='id identifier rubyid_exit'>exit</span> <span class='id identifier rubyid_command'>command</span><span class='period'>.</span><span class='id identifier rubyid_execute'>execute</span><span class='lparen'>(</span><span class='label'>file_selector:</span> <span class='id identifier rubyid_file_selector'>file_selector</span><span class='comma'>,</span> <span class='label'>force:</span> <span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:force</span><span class='rbracket'>]</span><span class='rparen'>)</span>
|
618
|
+
<span class='kw'>end</span></pre>
|
619
|
+
</td>
|
620
|
+
</tr>
|
621
|
+
</table>
|
622
|
+
</div>
|
623
|
+
|
624
|
+
<div class="method_details ">
|
625
|
+
<h3 class="signature " id="register-instance_method">
|
626
|
+
|
627
|
+
#<strong>register</strong> ⇒ <tt>Object</tt>
|
628
|
+
|
629
|
+
|
630
|
+
|
631
|
+
|
632
|
+
|
633
|
+
</h3><div class="docstring">
|
634
|
+
<div class="discussion">
|
635
|
+
|
636
|
+
<p>Register event command</p>
|
637
|
+
|
638
|
+
|
639
|
+
</div>
|
640
|
+
</div>
|
641
|
+
<div class="tags">
|
642
|
+
|
643
|
+
|
644
|
+
</div><table class="source_code">
|
645
|
+
<tr>
|
646
|
+
<td>
|
647
|
+
<pre class="lines">
|
648
|
+
|
649
|
+
|
650
|
+
93
|
651
|
+
94
|
652
|
+
95
|
653
|
+
96
|
654
|
+
97
|
655
|
+
98
|
656
|
+
99
|
657
|
+
100
|
658
|
+
101
|
659
|
+
102
|
660
|
+
103
|
661
|
+
104
|
662
|
+
105
|
663
|
+
106
|
664
|
+
107
|
665
|
+
108
|
666
|
+
109
|
667
|
+
110
|
668
|
+
111
|
669
|
+
112
|
670
|
+
113
|
671
|
+
114</pre>
|
672
|
+
</td>
|
673
|
+
<td>
|
674
|
+
<pre class="code"><span class="info file"># File 'lib/longleaf/cli.rb', line 93</span>
|
675
|
+
|
676
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_register'>register</span>
|
677
|
+
<span class='id identifier rubyid_verify_config_provided'>verify_config_provided</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
|
678
|
+
<span class='id identifier rubyid_setup_logger'>setup_logger</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
|
679
|
+
|
680
|
+
<span class='id identifier rubyid_app_config_manager'>app_config_manager</span> <span class='op'>=</span> <span class='id identifier rubyid_load_application_config'>load_application_config</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
|
681
|
+
|
682
|
+
<span class='id identifier rubyid_file_selector'>file_selector</span> <span class='op'>=</span> <span class='id identifier rubyid_create_file_selector'>create_file_selector</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='comma'>,</span> <span class='id identifier rubyid_app_config_manager'>app_config_manager</span><span class='rparen'>)</span>
|
683
|
+
<span class='kw'>if</span> <span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:checksums</span><span class='rbracket'>]</span>
|
684
|
+
<span class='id identifier rubyid_checksums'>checksums</span> <span class='op'>=</span> <span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:checksums</span><span class='rbracket'>]</span>
|
685
|
+
<span class='comment'># validate checksum list format, must a comma delimited list of prefix:checksums
|
686
|
+
</span> <span class='kw'>if</span> <span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>^[^:,]+:[^:,]+(,[^:,]+:[^:,]+)*$</span><span class='regexp_end'>/</span></span><span class='period'>.</span><span class='id identifier rubyid_match'>match</span><span class='lparen'>(</span><span class='id identifier rubyid_checksums'>checksums</span><span class='rparen'>)</span>
|
687
|
+
<span class='comment'># convert checksum list into hash with prefix as key
|
688
|
+
</span> <span class='id identifier rubyid_checksums'>checksums</span> <span class='op'>=</span> <span class='const'>Hash</span><span class='lbracket'>[</span><span class='op'>*</span><span class='id identifier rubyid_checksums'>checksums</span><span class='period'>.</span><span class='id identifier rubyid_split'>split</span><span class='lparen'>(</span><span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>\s*[:,]\s*</span><span class='regexp_end'>/</span></span><span class='rparen'>)</span><span class='rbracket'>]</span>
|
689
|
+
<span class='kw'>else</span>
|
690
|
+
<span class='id identifier rubyid_logger'>logger</span><span class='period'>.</span><span class='id identifier rubyid_failure'>failure</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Invalid checksums parameter format, see `longleaf help <command>` for more information</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
691
|
+
<span class='id identifier rubyid_exit'>exit</span> <span class='int'>1</span>
|
692
|
+
<span class='kw'>end</span>
|
693
|
+
<span class='kw'>end</span>
|
694
|
+
|
695
|
+
<span class='id identifier rubyid_command'>command</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="RegisterCommand.html" title="Longleaf::RegisterCommand (class)">RegisterCommand</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="RegisterCommand.html#initialize-instance_method" title="Longleaf::RegisterCommand#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_app_config_manager'>app_config_manager</span><span class='rparen'>)</span>
|
696
|
+
<span class='id identifier rubyid_exit'>exit</span> <span class='id identifier rubyid_command'>command</span><span class='period'>.</span><span class='id identifier rubyid_execute'>execute</span><span class='lparen'>(</span><span class='label'>file_selector:</span> <span class='id identifier rubyid_file_selector'>file_selector</span><span class='comma'>,</span> <span class='label'>force:</span> <span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:force</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='label'>checksums:</span> <span class='id identifier rubyid_checksums'>checksums</span><span class='rparen'>)</span>
|
697
|
+
<span class='kw'>end</span></pre>
|
698
|
+
</td>
|
699
|
+
</tr>
|
700
|
+
</table>
|
701
|
+
</div>
|
702
|
+
|
703
|
+
<div class="method_details ">
|
704
|
+
<h3 class="signature " id="reindex-instance_method">
|
705
|
+
|
706
|
+
#<strong>reindex</strong> ⇒ <tt>Object</tt>
|
707
|
+
|
708
|
+
|
709
|
+
|
710
|
+
|
711
|
+
|
712
|
+
</h3><table class="source_code">
|
713
|
+
<tr>
|
714
|
+
<td>
|
715
|
+
<pre class="lines">
|
716
|
+
|
717
|
+
|
718
|
+
203
|
719
|
+
204
|
720
|
+
205
|
721
|
+
206
|
722
|
+
207
|
723
|
+
208
|
724
|
+
209</pre>
|
725
|
+
</td>
|
726
|
+
<td>
|
727
|
+
<pre class="code"><span class="info file"># File 'lib/longleaf/cli.rb', line 203</span>
|
728
|
+
|
729
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_reindex'>reindex</span>
|
730
|
+
<span class='id identifier rubyid_verify_config_provided'>verify_config_provided</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
|
731
|
+
<span class='id identifier rubyid_setup_logger'>setup_logger</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
|
732
|
+
<span class='id identifier rubyid_app_config_manager'>app_config_manager</span> <span class='op'>=</span> <span class='id identifier rubyid_load_application_config'>load_application_config</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
|
733
|
+
|
734
|
+
<span class='id identifier rubyid_exit'>exit</span> <span class='const'><span class='object_link'><a href="../Longleaf.html" title="Longleaf (module)">Longleaf</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="ReindexCommand.html" title="Longleaf::ReindexCommand (class)">ReindexCommand</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="ReindexCommand.html#initialize-instance_method" title="Longleaf::ReindexCommand#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_app_config_manager'>app_config_manager</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_execute'><span class='object_link'><a href="ReindexCommand.html#execute-instance_method" title="Longleaf::ReindexCommand#execute (method)">execute</a></span></span><span class='lparen'>(</span><span class='label'>only_if_stale:</span> <span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:if_stale</span><span class='rbracket'>]</span><span class='rparen'>)</span>
|
735
|
+
<span class='kw'>end</span></pre>
|
736
|
+
</td>
|
737
|
+
</tr>
|
738
|
+
</table>
|
739
|
+
</div>
|
740
|
+
|
741
|
+
<div class="method_details ">
|
742
|
+
<h3 class="signature " id="setup_index-instance_method">
|
743
|
+
|
744
|
+
#<strong>setup_index</strong> ⇒ <tt>Object</tt>
|
745
|
+
|
746
|
+
|
747
|
+
|
748
|
+
|
749
|
+
|
750
|
+
</h3><table class="source_code">
|
751
|
+
<tr>
|
752
|
+
<td>
|
753
|
+
<pre class="lines">
|
754
|
+
|
755
|
+
|
756
|
+
181
|
757
|
+
182
|
758
|
+
183
|
759
|
+
184
|
760
|
+
185
|
761
|
+
186
|
762
|
+
187
|
763
|
+
188
|
764
|
+
189
|
765
|
+
190
|
766
|
+
191
|
767
|
+
192
|
768
|
+
193
|
769
|
+
194
|
770
|
+
195</pre>
|
771
|
+
</td>
|
772
|
+
<td>
|
773
|
+
<pre class="code"><span class="info file"># File 'lib/longleaf/cli.rb', line 181</span>
|
774
|
+
|
775
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_setup_index'>setup_index</span>
|
776
|
+
<span class='id identifier rubyid_verify_config_provided'>verify_config_provided</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
|
777
|
+
<span class='id identifier rubyid_setup_logger'>setup_logger</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
|
778
|
+
|
779
|
+
<span class='id identifier rubyid_app_config_manager'>app_config_manager</span> <span class='op'>=</span> <span class='id identifier rubyid_load_application_config'>load_application_config</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
|
780
|
+
|
781
|
+
<span class='kw'>if</span> <span class='id identifier rubyid_app_config_manager'>app_config_manager</span><span class='period'>.</span><span class='id identifier rubyid_index_manager'>index_manager</span><span class='period'>.</span><span class='id identifier rubyid_using_index?'>using_index?</span>
|
782
|
+
<span class='id identifier rubyid_app_config_manager'>app_config_manager</span><span class='period'>.</span><span class='id identifier rubyid_index_manager'>index_manager</span><span class='period'>.</span><span class='id identifier rubyid_setup_index'>setup_index</span>
|
783
|
+
<span class='id identifier rubyid_logger'>logger</span><span class='period'>.</span><span class='id identifier rubyid_success'>success</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Setup of index complete</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
784
|
+
<span class='id identifier rubyid_exit'>exit</span> <span class='int'>0</span>
|
785
|
+
<span class='kw'>else</span>
|
786
|
+
<span class='id identifier rubyid_logger'>logger</span><span class='period'>.</span><span class='id identifier rubyid_failure'>failure</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>No index configured, unable to perform setup.</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
787
|
+
<span class='id identifier rubyid_exit'>exit</span> <span class='int'>1</span>
|
788
|
+
<span class='kw'>end</span>
|
789
|
+
<span class='kw'>end</span></pre>
|
790
|
+
</td>
|
791
|
+
</tr>
|
792
|
+
</table>
|
793
|
+
</div>
|
794
|
+
|
795
|
+
<div class="method_details ">
|
796
|
+
<h3 class="signature " id="validate_config-instance_method">
|
797
|
+
|
798
|
+
#<strong>validate_config</strong> ⇒ <tt>Object</tt>
|
799
|
+
|
800
|
+
|
801
|
+
|
802
|
+
|
803
|
+
|
804
|
+
</h3><div class="docstring">
|
805
|
+
<div class="discussion">
|
806
|
+
|
807
|
+
<p>Application configuration validation command</p>
|
808
|
+
|
809
|
+
|
810
|
+
</div>
|
811
|
+
</div>
|
812
|
+
<div class="tags">
|
813
|
+
|
814
|
+
|
815
|
+
</div><table class="source_code">
|
816
|
+
<tr>
|
817
|
+
<td>
|
818
|
+
<pre class="lines">
|
819
|
+
|
820
|
+
|
821
|
+
157
|
822
|
+
158
|
823
|
+
159
|
824
|
+
160
|
825
|
+
161
|
826
|
+
162
|
827
|
+
163</pre>
|
828
|
+
</td>
|
829
|
+
<td>
|
830
|
+
<pre class="code"><span class="info file"># File 'lib/longleaf/cli.rb', line 157</span>
|
831
|
+
|
832
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_validate_config'>validate_config</span>
|
833
|
+
<span class='id identifier rubyid_verify_config_provided'>verify_config_provided</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
|
834
|
+
<span class='id identifier rubyid_setup_logger'>setup_logger</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
|
835
|
+
<span class='id identifier rubyid_extend_load_path'>extend_load_path</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:load_path</span><span class='rbracket'>]</span><span class='rparen'>)</span>
|
836
|
+
|
837
|
+
<span class='id identifier rubyid_exit'>exit</span> <span class='const'><span class='object_link'><a href="../Longleaf.html" title="Longleaf (module)">Longleaf</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="ValidateConfigCommand.html" title="Longleaf::ValidateConfigCommand (class)">ValidateConfigCommand</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="ValidateConfigCommand.html#initialize-instance_method" title="Longleaf::ValidateConfigCommand#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:config</span><span class='rbracket'>]</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_execute'><span class='object_link'><a href="ValidateConfigCommand.html#execute-instance_method" title="Longleaf::ValidateConfigCommand#execute (method)">execute</a></span></span>
|
838
|
+
<span class='kw'>end</span></pre>
|
839
|
+
</td>
|
840
|
+
</tr>
|
841
|
+
</table>
|
842
|
+
</div>
|
843
|
+
|
844
|
+
<div class="method_details ">
|
845
|
+
<h3 class="signature " id="validate_metadata-instance_method">
|
846
|
+
|
847
|
+
#<strong>validate_metadata</strong> ⇒ <tt>Object</tt>
|
848
|
+
|
849
|
+
|
850
|
+
|
851
|
+
|
852
|
+
|
853
|
+
</h3><div class="docstring">
|
854
|
+
<div class="discussion">
|
855
|
+
|
856
|
+
<p>File metadata validation command</p>
|
857
|
+
|
858
|
+
|
859
|
+
</div>
|
860
|
+
</div>
|
861
|
+
<div class="tags">
|
862
|
+
|
863
|
+
|
864
|
+
</div><table class="source_code">
|
865
|
+
<tr>
|
866
|
+
<td>
|
867
|
+
<pre class="lines">
|
868
|
+
|
869
|
+
|
870
|
+
169
|
871
|
+
170
|
872
|
+
171
|
873
|
+
172
|
874
|
+
173
|
875
|
+
174
|
876
|
+
175
|
877
|
+
176
|
878
|
+
177</pre>
|
879
|
+
</td>
|
880
|
+
<td>
|
881
|
+
<pre class="code"><span class="info file"># File 'lib/longleaf/cli.rb', line 169</span>
|
882
|
+
|
883
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_validate_metadata'>validate_metadata</span>
|
884
|
+
<span class='id identifier rubyid_verify_config_provided'>verify_config_provided</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
|
885
|
+
<span class='id identifier rubyid_setup_logger'>setup_logger</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
|
886
|
+
|
887
|
+
<span class='id identifier rubyid_app_config_manager'>app_config_manager</span> <span class='op'>=</span> <span class='id identifier rubyid_load_application_config'>load_application_config</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
|
888
|
+
<span class='id identifier rubyid_file_selector'>file_selector</span> <span class='op'>=</span> <span class='id identifier rubyid_create_registered_selector'>create_registered_selector</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='comma'>,</span> <span class='id identifier rubyid_app_config_manager'>app_config_manager</span><span class='rparen'>)</span>
|
889
|
+
|
890
|
+
<span class='id identifier rubyid_exit'>exit</span> <span class='const'><span class='object_link'><a href="../Longleaf.html" title="Longleaf (module)">Longleaf</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="ValidateMetadataCommand.html" title="Longleaf::ValidateMetadataCommand (class)">ValidateMetadataCommand</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="ValidateMetadataCommand.html#initialize-instance_method" title="Longleaf::ValidateMetadataCommand#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_app_config_manager'>app_config_manager</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_execute'><span class='object_link'><a href="ValidateMetadataCommand.html#execute-instance_method" title="Longleaf::ValidateMetadataCommand#execute (method)">execute</a></span></span><span class='lparen'>(</span><span class='label'>file_selector:</span> <span class='id identifier rubyid_file_selector'>file_selector</span><span class='rparen'>)</span>
|
891
|
+
<span class='kw'>end</span></pre>
|
892
|
+
</td>
|
893
|
+
</tr>
|
894
|
+
</table>
|
895
|
+
</div>
|
896
|
+
|
897
|
+
</div>
|
898
|
+
|
899
|
+
</div>
|
900
|
+
|
901
|
+
<div id="footer">
|
902
|
+
Generated on Tue May 28 15:48:00 2019 by
|
903
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
904
|
+
0.9.19 (ruby-2.6.3).
|
905
|
+
</div>
|
906
|
+
|
907
|
+
</div>
|
908
|
+
</body>
|
909
|
+
</html>
|