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,163 @@
|
|
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::SystemConfigFields
|
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::SystemConfigFields";
|
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 (S)</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">SystemConfigFields</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::SystemConfigFields
|
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::SystemConfigFields</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/models/system_config_fields.rb</dd>
|
98
|
+
</dl>
|
99
|
+
|
100
|
+
</div>
|
101
|
+
|
102
|
+
<h2>Overview</h2><div class="docstring">
|
103
|
+
<div class="discussion">
|
104
|
+
|
105
|
+
<p>System configuration field names</p>
|
106
|
+
|
107
|
+
|
108
|
+
</div>
|
109
|
+
</div>
|
110
|
+
<div class="tags">
|
111
|
+
|
112
|
+
|
113
|
+
</div>
|
114
|
+
|
115
|
+
<h2>
|
116
|
+
Constant Summary
|
117
|
+
<small><a href="#" class="constants_summary_toggle">collapse</a></small>
|
118
|
+
</h2>
|
119
|
+
|
120
|
+
<dl class="constants">
|
121
|
+
|
122
|
+
<dt id="MD_INDEX-constant" class="">MD_INDEX =
|
123
|
+
|
124
|
+
</dt>
|
125
|
+
<dd><pre class="code"><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>index</span><span class='tstring_end'>'</span></span></pre></dd>
|
126
|
+
|
127
|
+
<dt id="MD_INDEX_ADAPTER-constant" class="">MD_INDEX_ADAPTER =
|
128
|
+
|
129
|
+
</dt>
|
130
|
+
<dd><pre class="code"><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>adapter</span><span class='tstring_end'>'</span></span></pre></dd>
|
131
|
+
|
132
|
+
<dt id="MD_INDEX_CONNECTION-constant" class="">MD_INDEX_CONNECTION =
|
133
|
+
|
134
|
+
</dt>
|
135
|
+
<dd><pre class="code"><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>connection</span><span class='tstring_end'>'</span></span></pre></dd>
|
136
|
+
|
137
|
+
<dt id="MD_INDEX_PAGE_SIZE-constant" class="">MD_INDEX_PAGE_SIZE =
|
138
|
+
|
139
|
+
</dt>
|
140
|
+
<dd><pre class="code"><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>page_size</span><span class='tstring_end'>'</span></span></pre></dd>
|
141
|
+
|
142
|
+
</dl>
|
143
|
+
|
144
|
+
|
145
|
+
|
146
|
+
|
147
|
+
|
148
|
+
|
149
|
+
|
150
|
+
|
151
|
+
|
152
|
+
|
153
|
+
</div>
|
154
|
+
|
155
|
+
<div id="footer">
|
156
|
+
Generated on Tue May 28 15:48:02 2019 by
|
157
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
158
|
+
0.9.19 (ruby-2.6.3).
|
159
|
+
</div>
|
160
|
+
|
161
|
+
</div>
|
162
|
+
</body>
|
163
|
+
</html>
|
@@ -0,0 +1,451 @@
|
|
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::ValidateConfigCommand
|
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::ValidateConfigCommand";
|
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 (V)</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">ValidateConfigCommand</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::ValidateConfigCommand
|
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::ValidateConfigCommand</li>
|
78
|
+
|
79
|
+
</ul>
|
80
|
+
<a href="#" class="inheritanceTree">show all</a>
|
81
|
+
|
82
|
+
</dd>
|
83
|
+
</dl>
|
84
|
+
|
85
|
+
|
86
|
+
|
87
|
+
|
88
|
+
|
89
|
+
|
90
|
+
<dl>
|
91
|
+
<dt>Includes:</dt>
|
92
|
+
<dd><span class='object_link'><a href="EventStatusTracking.html" title="Longleaf::EventStatusTracking (module)">EventStatusTracking</a></span></dd>
|
93
|
+
</dl>
|
94
|
+
|
95
|
+
|
96
|
+
|
97
|
+
|
98
|
+
|
99
|
+
|
100
|
+
<dl>
|
101
|
+
<dt>Defined in:</dt>
|
102
|
+
<dd>lib/longleaf/commands/validate_config_command.rb</dd>
|
103
|
+
</dl>
|
104
|
+
|
105
|
+
</div>
|
106
|
+
|
107
|
+
<h2>Overview</h2><div class="docstring">
|
108
|
+
<div class="discussion">
|
109
|
+
|
110
|
+
<p>Command for validating an application configuration file</p>
|
111
|
+
|
112
|
+
|
113
|
+
</div>
|
114
|
+
</div>
|
115
|
+
<div class="tags">
|
116
|
+
|
117
|
+
|
118
|
+
</div>
|
119
|
+
|
120
|
+
|
121
|
+
|
122
|
+
|
123
|
+
|
124
|
+
|
125
|
+
|
126
|
+
<h2>
|
127
|
+
Instance Method Summary
|
128
|
+
<small><a href="#" class="summary_toggle">collapse</a></small>
|
129
|
+
</h2>
|
130
|
+
|
131
|
+
<ul class="summary">
|
132
|
+
|
133
|
+
<li class="public ">
|
134
|
+
<span class="summary_signature">
|
135
|
+
|
136
|
+
<a href="#execute-instance_method" title="#execute (instance method)">#<strong>execute</strong> ⇒ Object </a>
|
137
|
+
|
138
|
+
|
139
|
+
|
140
|
+
</span>
|
141
|
+
|
142
|
+
|
143
|
+
|
144
|
+
|
145
|
+
|
146
|
+
|
147
|
+
|
148
|
+
|
149
|
+
|
150
|
+
<span class="summary_desc"><div class='inline'>
|
151
|
+
<p>Execute the validate command on the specified configuration yml file.</p>
|
152
|
+
</div></span>
|
153
|
+
|
154
|
+
</li>
|
155
|
+
|
156
|
+
|
157
|
+
<li class="public ">
|
158
|
+
<span class="summary_signature">
|
159
|
+
|
160
|
+
<a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(config_path) ⇒ ValidateConfigCommand </a>
|
161
|
+
|
162
|
+
|
163
|
+
|
164
|
+
</span>
|
165
|
+
|
166
|
+
|
167
|
+
<span class="note title constructor">constructor</span>
|
168
|
+
|
169
|
+
|
170
|
+
|
171
|
+
|
172
|
+
|
173
|
+
|
174
|
+
|
175
|
+
|
176
|
+
<span class="summary_desc"><div class='inline'>
|
177
|
+
<p>A new instance of ValidateConfigCommand.</p>
|
178
|
+
</div></span>
|
179
|
+
|
180
|
+
</li>
|
181
|
+
|
182
|
+
|
183
|
+
<li class="private ">
|
184
|
+
<span class="summary_signature">
|
185
|
+
|
186
|
+
<a href="#validate_services-instance_method" title="#validate_services (instance method)">#<strong>validate_services</strong>(service_manager) ⇒ Object </a>
|
187
|
+
|
188
|
+
|
189
|
+
|
190
|
+
</span>
|
191
|
+
|
192
|
+
|
193
|
+
|
194
|
+
<span class="note title private">private</span>
|
195
|
+
|
196
|
+
|
197
|
+
|
198
|
+
|
199
|
+
|
200
|
+
<span class="summary_desc"><div class='inline'>
|
201
|
+
<p>Verify that all defined services are valid and may be instantiated with the given configuration, according to internal expectations.</p>
|
202
|
+
</div></span>
|
203
|
+
|
204
|
+
</li>
|
205
|
+
|
206
|
+
|
207
|
+
</ul>
|
208
|
+
|
209
|
+
|
210
|
+
|
211
|
+
|
212
|
+
|
213
|
+
|
214
|
+
|
215
|
+
|
216
|
+
|
217
|
+
|
218
|
+
|
219
|
+
<h3 class="inherited">Methods included from <span class='object_link'><a href="EventStatusTracking.html" title="Longleaf::EventStatusTracking (module)">EventStatusTracking</a></span></h3>
|
220
|
+
<p class="inherited"><span class='object_link'><a href="EventStatusTracking.html#record_failure-instance_method" title="Longleaf::EventStatusTracking#record_failure (method)">#record_failure</a></span>, <span class='object_link'><a href="EventStatusTracking.html#record_success-instance_method" title="Longleaf::EventStatusTracking#record_success (method)">#record_success</a></span>, <span class='object_link'><a href="EventStatusTracking.html#return_status-instance_method" title="Longleaf::EventStatusTracking#return_status (method)">#return_status</a></span>, <span class='object_link'><a href="EventStatusTracking.html#track_failure-instance_method" title="Longleaf::EventStatusTracking#track_failure (method)">#track_failure</a></span>, <span class='object_link'><a href="EventStatusTracking.html#track_status-instance_method" title="Longleaf::EventStatusTracking#track_status (method)">#track_status</a></span>, <span class='object_link'><a href="EventStatusTracking.html#track_success-instance_method" title="Longleaf::EventStatusTracking#track_success (method)">#track_success</a></span></p>
|
221
|
+
|
222
|
+
|
223
|
+
|
224
|
+
|
225
|
+
|
226
|
+
|
227
|
+
|
228
|
+
|
229
|
+
|
230
|
+
<h3 class="inherited">Methods included from <span class='object_link'><a href="Logging.html" title="Longleaf::Logging (module)">Logging</a></span></h3>
|
231
|
+
<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>
|
232
|
+
<div id="constructor_details" class="method_details_list">
|
233
|
+
<h2>Constructor Details</h2>
|
234
|
+
|
235
|
+
<div class="method_details first">
|
236
|
+
<h3 class="signature first" id="initialize-instance_method">
|
237
|
+
|
238
|
+
#<strong>initialize</strong>(config_path) ⇒ <tt><span class='object_link'><a href="" title="Longleaf::ValidateConfigCommand (class)">ValidateConfigCommand</a></span></tt>
|
239
|
+
|
240
|
+
|
241
|
+
|
242
|
+
|
243
|
+
|
244
|
+
</h3><div class="docstring">
|
245
|
+
<div class="discussion">
|
246
|
+
|
247
|
+
<p>Returns a new instance of ValidateConfigCommand</p>
|
248
|
+
|
249
|
+
|
250
|
+
</div>
|
251
|
+
</div>
|
252
|
+
<div class="tags">
|
253
|
+
|
254
|
+
|
255
|
+
</div><table class="source_code">
|
256
|
+
<tr>
|
257
|
+
<td>
|
258
|
+
<pre class="lines">
|
259
|
+
|
260
|
+
|
261
|
+
9
|
262
|
+
10
|
263
|
+
11</pre>
|
264
|
+
</td>
|
265
|
+
<td>
|
266
|
+
<pre class="code"><span class="info file"># File 'lib/longleaf/commands/validate_config_command.rb', line 9</span>
|
267
|
+
|
268
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_config_path'>config_path</span><span class='rparen'>)</span>
|
269
|
+
<span class='ivar'>@config_path</span> <span class='op'>=</span> <span class='id identifier rubyid_config_path'>config_path</span>
|
270
|
+
<span class='kw'>end</span></pre>
|
271
|
+
</td>
|
272
|
+
</tr>
|
273
|
+
</table>
|
274
|
+
</div>
|
275
|
+
|
276
|
+
</div>
|
277
|
+
|
278
|
+
|
279
|
+
<div id="instance_method_details" class="method_details_list">
|
280
|
+
<h2>Instance Method Details</h2>
|
281
|
+
|
282
|
+
|
283
|
+
<div class="method_details first">
|
284
|
+
<h3 class="signature first" id="execute-instance_method">
|
285
|
+
|
286
|
+
#<strong>execute</strong> ⇒ <tt>Object</tt>
|
287
|
+
|
288
|
+
|
289
|
+
|
290
|
+
|
291
|
+
|
292
|
+
</h3><div class="docstring">
|
293
|
+
<div class="discussion">
|
294
|
+
|
295
|
+
<p>Execute the validate command on the specified configuration yml file</p>
|
296
|
+
|
297
|
+
|
298
|
+
</div>
|
299
|
+
</div>
|
300
|
+
<div class="tags">
|
301
|
+
|
302
|
+
|
303
|
+
</div><table class="source_code">
|
304
|
+
<tr>
|
305
|
+
<td>
|
306
|
+
<pre class="lines">
|
307
|
+
|
308
|
+
|
309
|
+
14
|
310
|
+
15
|
311
|
+
16
|
312
|
+
17
|
313
|
+
18
|
314
|
+
19
|
315
|
+
20
|
316
|
+
21
|
317
|
+
22
|
318
|
+
23
|
319
|
+
24
|
320
|
+
25
|
321
|
+
26
|
322
|
+
27
|
323
|
+
28
|
324
|
+
29
|
325
|
+
30
|
326
|
+
31
|
327
|
+
32
|
328
|
+
33
|
329
|
+
34
|
330
|
+
35
|
331
|
+
36</pre>
|
332
|
+
</td>
|
333
|
+
<td>
|
334
|
+
<pre class="code"><span class="info file"># File 'lib/longleaf/commands/validate_config_command.rb', line 14</span>
|
335
|
+
|
336
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_execute'>execute</span>
|
337
|
+
<span class='id identifier rubyid_start_time'>start_time</span> <span class='op'>=</span> <span class='const'>Time</span><span class='period'>.</span><span class='id identifier rubyid_now'>now</span>
|
338
|
+
<span class='id identifier rubyid_logger'>logger</span><span class='period'>.</span><span class='id identifier rubyid_info'>info</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Performing validate configuration command</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span>
|
339
|
+
<span class='kw'>begin</span>
|
340
|
+
<span class='id identifier rubyid_app_config_manager'>app_config_manager</span> <span class='op'>=</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="ApplicationConfigDeserializer.html" title="Longleaf::ApplicationConfigDeserializer (class)">ApplicationConfigDeserializer</a></span></span><span class='period'>.</span><span class='id identifier rubyid_deserialize'><span class='object_link'><a href="ApplicationConfigDeserializer.html#deserialize-class_method" title="Longleaf::ApplicationConfigDeserializer.deserialize (method)">deserialize</a></span></span><span class='lparen'>(</span><span class='ivar'>@config_path</span><span class='rparen'>)</span>
|
341
|
+
|
342
|
+
<span class='id identifier rubyid_location_manager'>location_manager</span> <span class='op'>=</span> <span class='id identifier rubyid_app_config_manager'>app_config_manager</span><span class='period'>.</span><span class='id identifier rubyid_location_manager'>location_manager</span>
|
343
|
+
<span class='id identifier rubyid_location_manager'>location_manager</span><span class='period'>.</span><span class='id identifier rubyid_locations'>locations</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_name'>name</span><span class='comma'>,</span> <span class='id identifier rubyid_location'>location</span><span class='op'>|</span>
|
344
|
+
<span class='id identifier rubyid_location'>location</span><span class='period'>.</span><span class='id identifier rubyid_available?'>available?</span>
|
345
|
+
<span class='kw'>end</span>
|
346
|
+
|
347
|
+
<span class='id identifier rubyid_validate_services'>validate_services</span><span class='lparen'>(</span><span class='id identifier rubyid_app_config_manager'>app_config_manager</span><span class='period'>.</span><span class='id identifier rubyid_service_manager'>service_manager</span><span class='rparen'>)</span>
|
348
|
+
|
349
|
+
<span class='id identifier rubyid_record_success'>record_success</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Application configuration passed validation: </span><span class='embexpr_beg'>#{</span><span class='ivar'>@config_path</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
350
|
+
<span class='kw'>rescue</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="ConfigurationError.html" title="Longleaf::ConfigurationError (class)">ConfigurationError</a></span></span><span class='comma'>,</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="StorageLocationUnavailableError.html" title="Longleaf::StorageLocationUnavailableError (class)">StorageLocationUnavailableError</a></span></span> <span class='op'>=></span> <span class='id identifier rubyid_err'>err</span>
|
351
|
+
<span class='id identifier rubyid_record_failure'>record_failure</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Application configuration invalid due to the following issue:\n</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_err'>err</span><span class='period'>.</span><span class='id identifier rubyid_message'>message</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
352
|
+
<span class='kw'>rescue</span> <span class='op'>=></span> <span class='id identifier rubyid_err'>err</span>
|
353
|
+
<span class='id identifier rubyid_record_failure'>record_failure</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Failed to validate application configuration</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='label'>error:</span> <span class='id identifier rubyid_err'>err</span><span class='rparen'>)</span>
|
354
|
+
<span class='kw'>end</span>
|
355
|
+
|
356
|
+
<span class='id identifier rubyid_logger'>logger</span><span class='period'>.</span><span class='id identifier rubyid_info'>info</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Completed validate configuration command in </span><span class='embexpr_beg'>#{</span><span class='const'>Time</span><span class='period'>.</span><span class='id identifier rubyid_now'>now</span> <span class='op'>-</span> <span class='id identifier rubyid_start_time'>start_time</span><span class='embexpr_end'>}</span><span class='tstring_content'>s</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
357
|
+
<span class='id identifier rubyid_return_status'>return_status</span>
|
358
|
+
<span class='kw'>end</span></pre>
|
359
|
+
</td>
|
360
|
+
</tr>
|
361
|
+
</table>
|
362
|
+
</div>
|
363
|
+
|
364
|
+
<div class="method_details ">
|
365
|
+
<h3 class="signature " id="validate_services-instance_method">
|
366
|
+
|
367
|
+
#<strong>validate_services</strong>(service_manager) ⇒ <tt>Object</tt> <span class="extras">(private)</span>
|
368
|
+
|
369
|
+
|
370
|
+
|
371
|
+
|
372
|
+
|
373
|
+
</h3><div class="docstring">
|
374
|
+
<div class="discussion">
|
375
|
+
|
376
|
+
<p>Verify that all defined services are valid and may be instantiated with the given configuration, according to internal expectations.</p>
|
377
|
+
|
378
|
+
|
379
|
+
</div>
|
380
|
+
</div>
|
381
|
+
<div class="tags">
|
382
|
+
|
383
|
+
<p class="tag_title">Raises:</p>
|
384
|
+
<ul class="raise">
|
385
|
+
|
386
|
+
<li>
|
387
|
+
|
388
|
+
|
389
|
+
<span class='type'></span>
|
390
|
+
|
391
|
+
|
392
|
+
|
393
|
+
|
394
|
+
<div class='inline'>
|
395
|
+
<p>ConfigurationError if any services may not be instantiated</p>
|
396
|
+
</div>
|
397
|
+
|
398
|
+
</li>
|
399
|
+
|
400
|
+
</ul>
|
401
|
+
|
402
|
+
</div><table class="source_code">
|
403
|
+
<tr>
|
404
|
+
<td>
|
405
|
+
<pre class="lines">
|
406
|
+
|
407
|
+
|
408
|
+
42
|
409
|
+
43
|
410
|
+
44
|
411
|
+
45
|
412
|
+
46
|
413
|
+
47
|
414
|
+
48
|
415
|
+
49
|
416
|
+
50
|
417
|
+
51
|
418
|
+
52</pre>
|
419
|
+
</td>
|
420
|
+
<td>
|
421
|
+
<pre class="code"><span class="info file"># File 'lib/longleaf/commands/validate_config_command.rb', line 42</span>
|
422
|
+
|
423
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_validate_services'>validate_services</span><span class='lparen'>(</span><span class='id identifier rubyid_service_manager'>service_manager</span><span class='rparen'>)</span>
|
424
|
+
<span class='id identifier rubyid_def_manager'>def_manager</span> <span class='op'>=</span> <span class='id identifier rubyid_service_manager'>service_manager</span><span class='period'>.</span><span class='id identifier rubyid_definition_manager'>definition_manager</span>
|
425
|
+
|
426
|
+
<span class='id identifier rubyid_def_manager'>def_manager</span><span class='period'>.</span><span class='id identifier rubyid_services'>services</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_service_name'>service_name</span><span class='comma'>,</span> <span class='id identifier rubyid_service_def'>service_def</span><span class='op'>|</span>
|
427
|
+
<span class='kw'>begin</span>
|
428
|
+
<span class='id identifier rubyid_service_manager'>service_manager</span><span class='period'>.</span><span class='id identifier rubyid_service'>service</span><span class='lparen'>(</span><span class='id identifier rubyid_service_name'>service_name</span><span class='rparen'>)</span>
|
429
|
+
<span class='kw'>rescue</span> <span class='op'>=></span> <span class='id identifier rubyid_e'>e</span>
|
430
|
+
<span class='id identifier rubyid_raise'>raise</span> <span class='const'><span class='object_link'><a href="ConfigurationError.html" title="Longleaf::ConfigurationError (class)">ConfigurationError</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_e'>e</span><span class='period'>.</span><span class='id identifier rubyid_message'>message</span><span class='rparen'>)</span>
|
431
|
+
<span class='kw'>end</span>
|
432
|
+
<span class='kw'>end</span>
|
433
|
+
<span class='kw'>end</span></pre>
|
434
|
+
</td>
|
435
|
+
</tr>
|
436
|
+
</table>
|
437
|
+
</div>
|
438
|
+
|
439
|
+
</div>
|
440
|
+
|
441
|
+
</div>
|
442
|
+
|
443
|
+
<div id="footer">
|
444
|
+
Generated on Tue May 28 15:48:02 2019 by
|
445
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
446
|
+
0.9.19 (ruby-2.6.3).
|
447
|
+
</div>
|
448
|
+
|
449
|
+
</div>
|
450
|
+
</body>
|
451
|
+
</html>
|