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.
Files changed (165) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/config.yml +84 -0
  3. data/.gitignore +4 -2
  4. data/.rubocop.yml +42 -2
  5. data/.rubocop_todo.yml +390 -311
  6. data/.yardopts +1 -0
  7. data/Gemfile +16 -1
  8. data/README.md +67 -13
  9. data/Rakefile +6 -0
  10. data/bin/setup +16 -1
  11. data/docs/aboutlongleaf.md +28 -0
  12. data/docs/extra.css +32 -0
  13. data/docs/img/change-file.png +0 -0
  14. data/docs/img/ll-example-preserved.png +0 -0
  15. data/docs/index.md +19 -0
  16. data/docs/install.md +66 -0
  17. data/docs/ll-example/config-example-relative.yml +33 -0
  18. data/docs/ll-example/files-dir/LLexample-PDF.pdf +0 -0
  19. data/docs/ll-example/files-dir/LLexample-TOCHANGE.txt +15 -0
  20. data/docs/ll-example/files-dir/LLexample-tokeep.txt +10 -0
  21. data/docs/ll-example/metadata-dir/.gitkeep +0 -0
  22. data/docs/ll-example/replica-files/.gitkeep +0 -0
  23. data/docs/ll-example/replica-metadata/.gitkeep +0 -0
  24. data/docs/quickstart.md +270 -0
  25. data/docs/rdocs/Longleaf.html +135 -0
  26. data/docs/rdocs/Longleaf/AppFields.html +178 -0
  27. data/docs/rdocs/Longleaf/ApplicationConfigDeserializer.html +631 -0
  28. data/docs/rdocs/Longleaf/ApplicationConfigManager.html +610 -0
  29. data/docs/rdocs/Longleaf/ApplicationConfigValidator.html +238 -0
  30. data/docs/rdocs/Longleaf/CLI.html +909 -0
  31. data/docs/rdocs/Longleaf/ChecksumMismatchError.html +151 -0
  32. data/docs/rdocs/Longleaf/ConfigBuilder.html +1339 -0
  33. data/docs/rdocs/Longleaf/ConfigurationError.html +143 -0
  34. data/docs/rdocs/Longleaf/ConfigurationValidator.html +227 -0
  35. data/docs/rdocs/Longleaf/DeregisterCommand.html +420 -0
  36. data/docs/rdocs/Longleaf/DeregisterEvent.html +453 -0
  37. data/docs/rdocs/Longleaf/DeregistrationError.html +151 -0
  38. data/docs/rdocs/Longleaf/DigestHelper.html +419 -0
  39. data/docs/rdocs/Longleaf/EventError.html +147 -0
  40. data/docs/rdocs/Longleaf/EventNames.html +163 -0
  41. data/docs/rdocs/Longleaf/EventStatusTracking.html +656 -0
  42. data/docs/rdocs/Longleaf/FileCheckService.html +540 -0
  43. data/docs/rdocs/Longleaf/FileHelpers.html +520 -0
  44. data/docs/rdocs/Longleaf/FileRecord.html +716 -0
  45. data/docs/rdocs/Longleaf/FileSelector.html +901 -0
  46. data/docs/rdocs/Longleaf/FixityCheckService.html +691 -0
  47. data/docs/rdocs/Longleaf/IndexManager.html +1155 -0
  48. data/docs/rdocs/Longleaf/InvalidDigestAlgorithmError.html +143 -0
  49. data/docs/rdocs/Longleaf/InvalidStoragePathError.html +143 -0
  50. data/docs/rdocs/Longleaf/Logging.html +405 -0
  51. data/docs/rdocs/Longleaf/Logging/RedirectingLogger.html +1213 -0
  52. data/docs/rdocs/Longleaf/LongleafError.html +139 -0
  53. data/docs/rdocs/Longleaf/MDFields.html +193 -0
  54. data/docs/rdocs/Longleaf/MetadataBuilder.html +787 -0
  55. data/docs/rdocs/Longleaf/MetadataDeserializer.html +537 -0
  56. data/docs/rdocs/Longleaf/MetadataError.html +143 -0
  57. data/docs/rdocs/Longleaf/MetadataPersistenceManager.html +539 -0
  58. data/docs/rdocs/Longleaf/MetadataRecord.html +1411 -0
  59. data/docs/rdocs/Longleaf/MetadataSerializer.html +786 -0
  60. data/docs/rdocs/Longleaf/PreservationServiceError.html +147 -0
  61. data/docs/rdocs/Longleaf/PreserveCommand.html +410 -0
  62. data/docs/rdocs/Longleaf/PreserveEvent.html +491 -0
  63. data/docs/rdocs/Longleaf/RegisterCommand.html +428 -0
  64. data/docs/rdocs/Longleaf/RegisterEvent.html +628 -0
  65. data/docs/rdocs/Longleaf/RegisteredFileSelector.html +446 -0
  66. data/docs/rdocs/Longleaf/RegistrationError.html +151 -0
  67. data/docs/rdocs/Longleaf/ReindexCommand.html +576 -0
  68. data/docs/rdocs/Longleaf/RsyncReplicationService.html +1180 -0
  69. data/docs/rdocs/Longleaf/SequelIndexDriver.html +1978 -0
  70. data/docs/rdocs/Longleaf/ServiceCandidateFilesystemIterator.html +572 -0
  71. data/docs/rdocs/Longleaf/ServiceCandidateIndexIterator.html +532 -0
  72. data/docs/rdocs/Longleaf/ServiceCandidateLocator.html +333 -0
  73. data/docs/rdocs/Longleaf/ServiceClassCache.html +725 -0
  74. data/docs/rdocs/Longleaf/ServiceDateHelper.html +425 -0
  75. data/docs/rdocs/Longleaf/ServiceDefinition.html +683 -0
  76. data/docs/rdocs/Longleaf/ServiceDefinitionManager.html +371 -0
  77. data/docs/rdocs/Longleaf/ServiceDefinitionValidator.html +269 -0
  78. data/docs/rdocs/Longleaf/ServiceFields.html +173 -0
  79. data/docs/rdocs/Longleaf/ServiceManager.html +1229 -0
  80. data/docs/rdocs/Longleaf/ServiceMappingManager.html +410 -0
  81. data/docs/rdocs/Longleaf/ServiceMappingValidator.html +347 -0
  82. data/docs/rdocs/Longleaf/ServiceRecord.html +821 -0
  83. data/docs/rdocs/Longleaf/StorageLocation.html +985 -0
  84. data/docs/rdocs/Longleaf/StorageLocationManager.html +729 -0
  85. data/docs/rdocs/Longleaf/StorageLocationUnavailableError.html +143 -0
  86. data/docs/rdocs/Longleaf/StorageLocationValidator.html +373 -0
  87. data/docs/rdocs/Longleaf/StoragePathValidator.html +253 -0
  88. data/docs/rdocs/Longleaf/SystemConfigBuilder.html +441 -0
  89. data/docs/rdocs/Longleaf/SystemConfigFields.html +163 -0
  90. data/docs/rdocs/Longleaf/ValidateConfigCommand.html +451 -0
  91. data/docs/rdocs/Longleaf/ValidateMetadataCommand.html +408 -0
  92. data/docs/rdocs/_index.html +660 -0
  93. data/docs/rdocs/class_list.html +51 -0
  94. data/docs/rdocs/css/common.css +1 -0
  95. data/docs/rdocs/css/full_list.css +58 -0
  96. data/docs/rdocs/css/style.css +496 -0
  97. data/docs/rdocs/file.README.html +165 -0
  98. data/docs/rdocs/file_list.html +56 -0
  99. data/docs/rdocs/frames.html +17 -0
  100. data/docs/rdocs/index.html +165 -0
  101. data/docs/rdocs/js/app.js +303 -0
  102. data/docs/rdocs/js/full_list.js +216 -0
  103. data/docs/rdocs/js/jquery.js +4 -0
  104. data/docs/rdocs/method_list.html +2051 -0
  105. data/docs/rdocs/top-level-namespace.html +110 -0
  106. data/lib/longleaf/candidates/file_selector.rb +47 -15
  107. data/lib/longleaf/candidates/registered_file_selector.rb +67 -0
  108. data/lib/longleaf/candidates/service_candidate_filesystem_iterator.rb +29 -35
  109. data/lib/longleaf/candidates/service_candidate_index_iterator.rb +84 -0
  110. data/lib/longleaf/candidates/service_candidate_locator.rb +9 -4
  111. data/lib/longleaf/cli.rb +162 -80
  112. data/lib/longleaf/commands/deregister_command.rb +12 -11
  113. data/lib/longleaf/commands/preserve_command.rb +13 -8
  114. data/lib/longleaf/commands/register_command.rb +9 -6
  115. data/lib/longleaf/commands/reindex_command.rb +92 -0
  116. data/lib/longleaf/commands/validate_config_command.rb +27 -6
  117. data/lib/longleaf/commands/validate_metadata_command.rb +11 -9
  118. data/lib/longleaf/errors.rb +12 -12
  119. data/lib/longleaf/events/deregister_event.rb +13 -15
  120. data/lib/longleaf/events/event_status_tracking.rb +7 -7
  121. data/lib/longleaf/events/preserve_event.rb +24 -14
  122. data/lib/longleaf/events/register_event.rb +21 -35
  123. data/lib/longleaf/helpers/digest_helper.rb +4 -4
  124. data/lib/longleaf/helpers/service_date_helper.rb +5 -6
  125. data/lib/longleaf/indexing/index_manager.rb +101 -0
  126. data/lib/longleaf/indexing/sequel_index_driver.rb +324 -0
  127. data/lib/longleaf/logging.rb +4 -4
  128. data/lib/longleaf/logging/redirecting_logger.rb +20 -20
  129. data/lib/longleaf/models/app_fields.rb +2 -1
  130. data/lib/longleaf/models/file_record.rb +10 -6
  131. data/lib/longleaf/models/md_fields.rb +1 -1
  132. data/lib/longleaf/models/metadata_record.rb +22 -12
  133. data/lib/longleaf/models/service_definition.rb +3 -3
  134. data/lib/longleaf/models/service_fields.rb +1 -1
  135. data/lib/longleaf/models/service_record.rb +6 -5
  136. data/lib/longleaf/models/storage_location.rb +26 -7
  137. data/lib/longleaf/models/system_config_fields.rb +9 -0
  138. data/lib/longleaf/preservation_services/file_check_service.rb +58 -0
  139. data/lib/longleaf/preservation_services/fixity_check_service.rb +16 -14
  140. data/lib/longleaf/preservation_services/rsync_replication_service.rb +32 -31
  141. data/lib/longleaf/services/application_config_deserializer.rb +55 -18
  142. data/lib/longleaf/services/application_config_manager.rb +16 -4
  143. data/lib/longleaf/services/application_config_validator.rb +1 -2
  144. data/lib/longleaf/services/configuration_validator.rb +6 -4
  145. data/lib/longleaf/services/metadata_deserializer.rb +40 -38
  146. data/lib/longleaf/services/metadata_persistence_manager.rb +46 -0
  147. data/lib/longleaf/services/metadata_serializer.rb +23 -22
  148. data/lib/longleaf/services/service_class_cache.rb +15 -15
  149. data/lib/longleaf/services/service_definition_manager.rb +5 -6
  150. data/lib/longleaf/services/service_definition_validator.rb +5 -6
  151. data/lib/longleaf/services/service_manager.rb +37 -17
  152. data/lib/longleaf/services/service_mapping_manager.rb +9 -9
  153. data/lib/longleaf/services/service_mapping_validator.rb +9 -10
  154. data/lib/longleaf/services/storage_location_manager.rb +22 -8
  155. data/lib/longleaf/services/storage_location_validator.rb +11 -8
  156. data/lib/longleaf/services/storage_path_validator.rb +1 -1
  157. data/lib/longleaf/specs/config_builder.rb +30 -17
  158. data/lib/longleaf/specs/custom_matchers.rb +1 -1
  159. data/lib/longleaf/specs/file_helpers.rb +15 -14
  160. data/lib/longleaf/specs/metadata_builder.rb +91 -0
  161. data/lib/longleaf/specs/system_config_builder.rb +27 -0
  162. data/lib/longleaf/version.rb +1 -1
  163. data/longleaf.gemspec +17 -7
  164. data/mkdocs.yml +20 -0
  165. metadata +233 -22
@@ -0,0 +1,147 @@
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
+ Exception: Longleaf::EventError
8
+
9
+ &mdash; 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::EventError";
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 (E)</a> &raquo;
40
+ <span class='title'><span class='object_link'><a href="../Longleaf.html" title="Longleaf (module)">Longleaf</a></span></span>
41
+ &raquo;
42
+ <span class="title">EventError</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>Exception: Longleaf::EventError
63
+
64
+
65
+
66
+ </h1>
67
+ <div class="box_info">
68
+
69
+ <dl>
70
+ <dt>Inherits:</dt>
71
+ <dd>
72
+ <span class="inheritName"><span class='object_link'><a href="LongleafError.html" title="Longleaf::LongleafError (class)">LongleafError</a></span></span>
73
+
74
+ <ul class="fullTree">
75
+ <li>Object</li>
76
+
77
+ <li class="next">StandardError</li>
78
+
79
+ <li class="next"><span class='object_link'><a href="LongleafError.html" title="Longleaf::LongleafError (class)">LongleafError</a></span></li>
80
+
81
+ <li class="next">Longleaf::EventError</li>
82
+
83
+ </ul>
84
+ <a href="#" class="inheritanceTree">show all</a>
85
+
86
+ </dd>
87
+ </dl>
88
+
89
+
90
+
91
+
92
+
93
+
94
+
95
+
96
+
97
+
98
+
99
+ <dl>
100
+ <dt>Defined in:</dt>
101
+ <dd>lib/longleaf/errors.rb</dd>
102
+ </dl>
103
+
104
+ </div>
105
+
106
+ <h2>Overview</h2><div class="docstring">
107
+ <div class="discussion">
108
+
109
+ <p>Error related to executing a preservation event</p>
110
+
111
+
112
+ </div>
113
+ </div>
114
+ <div class="tags">
115
+
116
+
117
+ </div><div id="subclasses">
118
+ <h2>Direct Known Subclasses</h2>
119
+ <p class="children"><span class='object_link'><a href="DeregistrationError.html" title="Longleaf::DeregistrationError (class)">DeregistrationError</a></span>, <span class='object_link'><a href="RegistrationError.html" title="Longleaf::RegistrationError (class)">RegistrationError</a></span></p>
120
+ </div>
121
+
122
+
123
+
124
+
125
+
126
+
127
+
128
+
129
+
130
+
131
+
132
+
133
+
134
+
135
+
136
+
137
+ </div>
138
+
139
+ <div id="footer">
140
+ Generated on Tue May 28 15:48:00 2019 by
141
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
142
+ 0.9.19 (ruby-2.6.3).
143
+ </div>
144
+
145
+ </div>
146
+ </body>
147
+ </html>
@@ -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::EventNames
8
+
9
+ &mdash; 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::EventNames";
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 (E)</a> &raquo;
40
+ <span class='title'><span class='object_link'><a href="../Longleaf.html" title="Longleaf (module)">Longleaf</a></span></span>
41
+ &raquo;
42
+ <span class="title">EventNames</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::EventNames
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::EventNames</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/events/event_names.rb</dd>
98
+ </dl>
99
+
100
+ </div>
101
+
102
+ <h2>Overview</h2><div class="docstring">
103
+ <div class="discussion">
104
+
105
+ <p>Constants for preservation event 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="REGISTER-constant" class="">REGISTER =
123
+
124
+ </dt>
125
+ <dd><pre class="code"><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>register</span><span class='tstring_end'>&#39;</span></span></pre></dd>
126
+
127
+ <dt id="PRESERVE-constant" class="">PRESERVE =
128
+
129
+ </dt>
130
+ <dd><pre class="code"><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>preserve</span><span class='tstring_end'>&#39;</span></span></pre></dd>
131
+
132
+ <dt id="CLEANUP-constant" class="">CLEANUP =
133
+
134
+ </dt>
135
+ <dd><pre class="code"><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>cleanup</span><span class='tstring_end'>&#39;</span></span></pre></dd>
136
+
137
+ <dt id="DEREGISTER-constant" class="">DEREGISTER =
138
+
139
+ </dt>
140
+ <dd><pre class="code"><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>deregister</span><span class='tstring_end'>&#39;</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:00 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,656 @@
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
+ Module: Longleaf::EventStatusTracking
8
+
9
+ &mdash; 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::EventStatusTracking";
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 (E)</a> &raquo;
40
+ <span class='title'><span class='object_link'><a href="../Longleaf.html" title="Longleaf (module)">Longleaf</a></span></span>
41
+ &raquo;
42
+ <span class="title">EventStatusTracking</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>Module: Longleaf::EventStatusTracking
63
+
64
+
65
+
66
+ </h1>
67
+ <div class="box_info">
68
+
69
+
70
+
71
+
72
+
73
+
74
+ <dl>
75
+ <dt>Includes:</dt>
76
+ <dd><span class='object_link'><a href="Logging.html" title="Longleaf::Logging (module)">Logging</a></span></dd>
77
+ </dl>
78
+
79
+
80
+
81
+
82
+ <dl>
83
+ <dt>Included in:</dt>
84
+ <dd><span class='object_link'><a href="DeregisterCommand.html" title="Longleaf::DeregisterCommand (class)">DeregisterCommand</a></span>, <span class='object_link'><a href="DeregisterEvent.html" title="Longleaf::DeregisterEvent (class)">DeregisterEvent</a></span>, <span class='object_link'><a href="PreserveCommand.html" title="Longleaf::PreserveCommand (class)">PreserveCommand</a></span>, <span class='object_link'><a href="PreserveEvent.html" title="Longleaf::PreserveEvent (class)">PreserveEvent</a></span>, <span class='object_link'><a href="RegisterCommand.html" title="Longleaf::RegisterCommand (class)">RegisterCommand</a></span>, <span class='object_link'><a href="RegisterEvent.html" title="Longleaf::RegisterEvent (class)">RegisterEvent</a></span>, <span class='object_link'><a href="ReindexCommand.html" title="Longleaf::ReindexCommand (class)">ReindexCommand</a></span>, <span class='object_link'><a href="ValidateConfigCommand.html" title="Longleaf::ValidateConfigCommand (class)">ValidateConfigCommand</a></span>, <span class='object_link'><a href="ValidateMetadataCommand.html" title="Longleaf::ValidateMetadataCommand (class)">ValidateMetadataCommand</a></span></dd>
85
+ </dl>
86
+
87
+
88
+
89
+ <dl>
90
+ <dt>Defined in:</dt>
91
+ <dd>lib/longleaf/events/event_status_tracking.rb</dd>
92
+ </dl>
93
+
94
+ </div>
95
+
96
+ <h2>Overview</h2><div class="docstring">
97
+ <div class="discussion">
98
+
99
+ <p>Helper methods for tracking and recording the overall outcome of a preservation event.</p>
100
+
101
+
102
+ </div>
103
+ </div>
104
+ <div class="tags">
105
+
106
+
107
+ </div>
108
+
109
+
110
+
111
+
112
+
113
+
114
+
115
+ <h2>
116
+ Instance Method Summary
117
+ <small><a href="#" class="summary_toggle">collapse</a></small>
118
+ </h2>
119
+
120
+ <ul class="summary">
121
+
122
+ <li class="public ">
123
+ <span class="summary_signature">
124
+
125
+ <a href="#record_failure-instance_method" title="#record_failure (instance method)">#<strong>record_failure</strong>(*args) &#x21d2; Object </a>
126
+
127
+
128
+
129
+ </span>
130
+
131
+
132
+
133
+
134
+
135
+
136
+
137
+
138
+
139
+ <span class="summary_desc"><div class='inline'>
140
+ <p>Record a failed operation to the output and the overall status of this event.</p>
141
+ </div></span>
142
+
143
+ </li>
144
+
145
+
146
+ <li class="public ">
147
+ <span class="summary_signature">
148
+
149
+ <a href="#record_success-instance_method" title="#record_success (instance method)">#<strong>record_success</strong>(*args) &#x21d2; Object </a>
150
+
151
+
152
+
153
+ </span>
154
+
155
+
156
+
157
+
158
+
159
+
160
+
161
+
162
+
163
+ <span class="summary_desc"><div class='inline'>
164
+ <p>Record a successful operation to the output and the overall status of this event.</p>
165
+ </div></span>
166
+
167
+ </li>
168
+
169
+
170
+ <li class="public ">
171
+ <span class="summary_signature">
172
+
173
+ <a href="#return_status-instance_method" title="#return_status (instance method)">#<strong>return_status</strong> &#x21d2; Integer </a>
174
+
175
+
176
+
177
+ </span>
178
+
179
+
180
+
181
+
182
+
183
+
184
+
185
+
186
+
187
+ <span class="summary_desc"><div class='inline'>
188
+ <p>1 indicates failure, and 2 indicates partial failure.</p>
189
+ </div></span>
190
+
191
+ </li>
192
+
193
+
194
+ <li class="public ">
195
+ <span class="summary_signature">
196
+
197
+ <a href="#track_failure-instance_method" title="#track_failure (instance method)">#<strong>track_failure</strong> &#x21d2; Object </a>
198
+
199
+
200
+
201
+ </span>
202
+
203
+
204
+
205
+
206
+
207
+
208
+
209
+
210
+
211
+ <span class="summary_desc"><div class='inline'>
212
+ <p>Update the status of this action with a failure outcome.</p>
213
+ </div></span>
214
+
215
+ </li>
216
+
217
+
218
+ <li class="public ">
219
+ <span class="summary_signature">
220
+
221
+ <a href="#track_status-instance_method" title="#track_status (instance method)">#<strong>track_status</strong>(status) &#x21d2; Object </a>
222
+
223
+
224
+
225
+ </span>
226
+
227
+
228
+
229
+
230
+
231
+
232
+
233
+
234
+
235
+ <span class="summary_desc"><div class='inline'>
236
+ <p>Update the status of this action with the provided outcome status number.</p>
237
+ </div></span>
238
+
239
+ </li>
240
+
241
+
242
+ <li class="public ">
243
+ <span class="summary_signature">
244
+
245
+ <a href="#track_success-instance_method" title="#track_success (instance method)">#<strong>track_success</strong> &#x21d2; Object </a>
246
+
247
+
248
+
249
+ </span>
250
+
251
+
252
+
253
+
254
+
255
+
256
+
257
+
258
+
259
+ <span class="summary_desc"><div class='inline'>
260
+ <p>Update the status of this action with a success outcome.</p>
261
+ </div></span>
262
+
263
+ </li>
264
+
265
+
266
+ </ul>
267
+
268
+
269
+
270
+
271
+
272
+
273
+
274
+
275
+
276
+
277
+
278
+ <h3 class="inherited">Methods included from <span class='object_link'><a href="Logging.html" title="Longleaf::Logging (module)">Logging</a></span></h3>
279
+ <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>
280
+
281
+
282
+ <div id="instance_method_details" class="method_details_list">
283
+ <h2>Instance Method Details</h2>
284
+
285
+
286
+ <div class="method_details first">
287
+ <h3 class="signature first" id="record_failure-instance_method">
288
+
289
+ #<strong>record_failure</strong>(*args) &#x21d2; <tt>Object</tt>
290
+
291
+
292
+
293
+
294
+
295
+ </h3><div class="docstring">
296
+ <div class="discussion">
297
+
298
+ <p>Record a failed operation to the output and the overall status of this event.</p>
299
+
300
+
301
+ </div>
302
+ </div>
303
+ <div class="tags">
304
+ <p class="tag_title">Parameters:</p>
305
+ <ul class="param">
306
+
307
+ <li>
308
+
309
+ <span class='name'>args</span>
310
+
311
+
312
+ <span class='type'>(<tt>Array</tt>)</span>
313
+
314
+
315
+
316
+ &mdash;
317
+ <div class='inline'>
318
+ <p>arguments to pass to logger</p>
319
+ </div>
320
+
321
+ </li>
322
+
323
+ </ul>
324
+
325
+
326
+ </div><table class="source_code">
327
+ <tr>
328
+ <td>
329
+ <pre class="lines">
330
+
331
+
332
+ 26
333
+ 27
334
+ 28
335
+ 29</pre>
336
+ </td>
337
+ <td>
338
+ <pre class="code"><span class="info file"># File 'lib/longleaf/events/event_status_tracking.rb', line 26</span>
339
+
340
+ <span class='kw'>def</span> <span class='id identifier rubyid_record_failure'>record_failure</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span>
341
+ <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='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span>
342
+ <span class='id identifier rubyid_track_failure'>track_failure</span>
343
+ <span class='kw'>end</span></pre>
344
+ </td>
345
+ </tr>
346
+ </table>
347
+ </div>
348
+
349
+ <div class="method_details ">
350
+ <h3 class="signature " id="record_success-instance_method">
351
+
352
+ #<strong>record_success</strong>(*args) &#x21d2; <tt>Object</tt>
353
+
354
+
355
+
356
+
357
+
358
+ </h3><div class="docstring">
359
+ <div class="discussion">
360
+
361
+ <p>Record a successful operation to the output and the overall status of this event.</p>
362
+
363
+
364
+ </div>
365
+ </div>
366
+ <div class="tags">
367
+ <p class="tag_title">Parameters:</p>
368
+ <ul class="param">
369
+
370
+ <li>
371
+
372
+ <span class='name'>args</span>
373
+
374
+
375
+ <span class='type'>(<tt>Array</tt>)</span>
376
+
377
+
378
+
379
+ &mdash;
380
+ <div class='inline'>
381
+ <p>arguments to pass to logger</p>
382
+ </div>
383
+
384
+ </li>
385
+
386
+ </ul>
387
+
388
+
389
+ </div><table class="source_code">
390
+ <tr>
391
+ <td>
392
+ <pre class="lines">
393
+
394
+
395
+ 10
396
+ 11
397
+ 12
398
+ 13</pre>
399
+ </td>
400
+ <td>
401
+ <pre class="code"><span class="info file"># File 'lib/longleaf/events/event_status_tracking.rb', line 10</span>
402
+
403
+ <span class='kw'>def</span> <span class='id identifier rubyid_record_success'>record_success</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span>
404
+ <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='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span>
405
+ <span class='id identifier rubyid_track_success'>track_success</span>
406
+ <span class='kw'>end</span></pre>
407
+ </td>
408
+ </tr>
409
+ </table>
410
+ </div>
411
+
412
+ <div class="method_details ">
413
+ <h3 class="signature " id="return_status-instance_method">
414
+
415
+ #<strong>return_status</strong> &#x21d2; <tt>Integer</tt>
416
+
417
+
418
+
419
+
420
+
421
+ </h3><div class="docstring">
422
+ <div class="discussion">
423
+
424
+ <p>1 indicates failure, and 2 indicates partial failure</p>
425
+
426
+
427
+ </div>
428
+ </div>
429
+ <div class="tags">
430
+
431
+ <p class="tag_title">Returns:</p>
432
+ <ul class="return">
433
+
434
+ <li>
435
+
436
+
437
+ <span class='type'>(<tt>Integer</tt>)</span>
438
+
439
+
440
+
441
+ &mdash;
442
+ <div class='inline'>
443
+ <p>the return status for this event, where 0 indicates success,</p>
444
+ </div>
445
+
446
+ </li>
447
+
448
+ </ul>
449
+
450
+ </div><table class="source_code">
451
+ <tr>
452
+ <td>
453
+ <pre class="lines">
454
+
455
+
456
+ 54
457
+ 55
458
+ 56
459
+ 57</pre>
460
+ </td>
461
+ <td>
462
+ <pre class="code"><span class="info file"># File 'lib/longleaf/events/event_status_tracking.rb', line 54</span>
463
+
464
+ <span class='kw'>def</span> <span class='id identifier rubyid_return_status'>return_status</span>
465
+ <span class='ivar'>@return_status</span> <span class='op'>=</span> <span class='int'>0</span> <span class='kw'>if</span> <span class='ivar'>@return_status</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
466
+ <span class='ivar'>@return_status</span>
467
+ <span class='kw'>end</span></pre>
468
+ </td>
469
+ </tr>
470
+ </table>
471
+ </div>
472
+
473
+ <div class="method_details ">
474
+ <h3 class="signature " id="track_failure-instance_method">
475
+
476
+ #<strong>track_failure</strong> &#x21d2; <tt>Object</tt>
477
+
478
+
479
+
480
+
481
+
482
+ </h3><div class="docstring">
483
+ <div class="discussion">
484
+
485
+ <p>Update the status of this action with a failure outcome.</p>
486
+
487
+
488
+ </div>
489
+ </div>
490
+ <div class="tags">
491
+
492
+
493
+ </div><table class="source_code">
494
+ <tr>
495
+ <td>
496
+ <pre class="lines">
497
+
498
+
499
+ 32
500
+ 33
501
+ 34
502
+ 35
503
+ 36
504
+ 37
505
+ 38</pre>
506
+ </td>
507
+ <td>
508
+ <pre class="code"><span class="info file"># File 'lib/longleaf/events/event_status_tracking.rb', line 32</span>
509
+
510
+ <span class='kw'>def</span> <span class='id identifier rubyid_track_failure'>track_failure</span>
511
+ <span class='kw'>if</span> <span class='ivar'>@return_status</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> <span class='op'>||</span> <span class='ivar'>@return_status</span> <span class='op'>==</span> <span class='int'>1</span>
512
+ <span class='ivar'>@return_status</span> <span class='op'>=</span> <span class='int'>1</span>
513
+ <span class='kw'>else</span>
514
+ <span class='ivar'>@return_status</span> <span class='op'>=</span> <span class='int'>2</span>
515
+ <span class='kw'>end</span>
516
+ <span class='kw'>end</span></pre>
517
+ </td>
518
+ </tr>
519
+ </table>
520
+ </div>
521
+
522
+ <div class="method_details ">
523
+ <h3 class="signature " id="track_status-instance_method">
524
+
525
+ #<strong>track_status</strong>(status) &#x21d2; <tt>Object</tt>
526
+
527
+
528
+
529
+
530
+
531
+ </h3><div class="docstring">
532
+ <div class="discussion">
533
+
534
+ <p>Update the status of this action with the provided outcome status number.</p>
535
+
536
+
537
+ </div>
538
+ </div>
539
+ <div class="tags">
540
+ <p class="tag_title">Parameters:</p>
541
+ <ul class="param">
542
+
543
+ <li>
544
+
545
+ <span class='name'>status</span>
546
+
547
+
548
+ <span class='type'>(<tt>Integer</tt>)</span>
549
+
550
+
551
+
552
+ &mdash;
553
+ <div class='inline'>
554
+ <p>outcome status</p>
555
+ </div>
556
+
557
+ </li>
558
+
559
+ </ul>
560
+
561
+
562
+ </div><table class="source_code">
563
+ <tr>
564
+ <td>
565
+ <pre class="lines">
566
+
567
+
568
+ 42
569
+ 43
570
+ 44
571
+ 45
572
+ 46
573
+ 47
574
+ 48
575
+ 49
576
+ 50</pre>
577
+ </td>
578
+ <td>
579
+ <pre class="code"><span class="info file"># File 'lib/longleaf/events/event_status_tracking.rb', line 42</span>
580
+
581
+ <span class='kw'>def</span> <span class='id identifier rubyid_track_status'>track_status</span><span class='lparen'>(</span><span class='id identifier rubyid_status'>status</span><span class='rparen'>)</span>
582
+ <span class='kw'>if</span> <span class='id identifier rubyid_status'>status</span> <span class='op'>==</span> <span class='int'>2</span>
583
+ <span class='ivar'>@return_status</span> <span class='op'>=</span> <span class='int'>2</span>
584
+ <span class='kw'>elsif</span> <span class='id identifier rubyid_status'>status</span> <span class='op'>==</span> <span class='int'>0</span>
585
+ <span class='id identifier rubyid_track_success'>track_success</span>
586
+ <span class='kw'>elsif</span> <span class='id identifier rubyid_status'>status</span> <span class='op'>==</span> <span class='int'>1</span>
587
+ <span class='id identifier rubyid_track_failure'>track_failure</span>
588
+ <span class='kw'>end</span>
589
+ <span class='kw'>end</span></pre>
590
+ </td>
591
+ </tr>
592
+ </table>
593
+ </div>
594
+
595
+ <div class="method_details ">
596
+ <h3 class="signature " id="track_success-instance_method">
597
+
598
+ #<strong>track_success</strong> &#x21d2; <tt>Object</tt>
599
+
600
+
601
+
602
+
603
+
604
+ </h3><div class="docstring">
605
+ <div class="discussion">
606
+
607
+ <p>Update the status of this action with a success outcome.</p>
608
+
609
+
610
+ </div>
611
+ </div>
612
+ <div class="tags">
613
+
614
+
615
+ </div><table class="source_code">
616
+ <tr>
617
+ <td>
618
+ <pre class="lines">
619
+
620
+
621
+ 16
622
+ 17
623
+ 18
624
+ 19
625
+ 20
626
+ 21
627
+ 22</pre>
628
+ </td>
629
+ <td>
630
+ <pre class="code"><span class="info file"># File 'lib/longleaf/events/event_status_tracking.rb', line 16</span>
631
+
632
+ <span class='kw'>def</span> <span class='id identifier rubyid_track_success'>track_success</span>
633
+ <span class='kw'>if</span> <span class='ivar'>@return_status</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> <span class='op'>||</span> <span class='ivar'>@return_status</span> <span class='op'>==</span> <span class='int'>0</span>
634
+ <span class='ivar'>@return_status</span> <span class='op'>=</span> <span class='int'>0</span>
635
+ <span class='kw'>else</span>
636
+ <span class='ivar'>@return_status</span> <span class='op'>=</span> <span class='int'>2</span>
637
+ <span class='kw'>end</span>
638
+ <span class='kw'>end</span></pre>
639
+ </td>
640
+ </tr>
641
+ </table>
642
+ </div>
643
+
644
+ </div>
645
+
646
+ </div>
647
+
648
+ <div id="footer">
649
+ Generated on Tue May 28 15:48:00 2019 by
650
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
651
+ 0.9.19 (ruby-2.6.3).
652
+ </div>
653
+
654
+ </div>
655
+ </body>
656
+ </html>