longleaf 0.1.0.pre.3 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 46460cd1116e97c1d54c4f12ad130a318b79fd9f3db3e5fbec02b4dfe1e65ee9
|
4
|
+
data.tar.gz: b8270d5fdb29c00c9689e9d5bd6b48530ac35dfd3e99daaa3a5b90803428deca
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d83b4ee88d75fc45197750e453a3798749a6d27e6b378848d466276c2292a64a7fe472d96913d466dee742b68d9660ed73916d0349cd8065b686b634f589a38a
|
7
|
+
data.tar.gz: a86bfb33e7decbded01d465f28e0d2123a2c3571339888ffb796c66c4002c9da6574733b31100a10ce00ea474461317661a8470bcf356be807bef61eb6533445
|
data/lib/longleaf/cli.rb
CHANGED
@@ -11,7 +11,6 @@ module Longleaf
|
|
11
11
|
|
12
12
|
class_option(:config, :aliases => "-c",
|
13
13
|
:default => ENV['LONGLEAF_CFG'],
|
14
|
-
:required => true,
|
15
14
|
:desc => 'Absolute path to the application configuration used for this command. By default, the value of the environment variable LONGLEAF_CFG is used.')
|
16
15
|
# Logging/output options
|
17
16
|
class_option(:failure_only,
|
@@ -59,12 +58,12 @@ module Longleaf
|
|
59
58
|
exit command.execute(file_paths: file_paths, force: options[:force], checksums: checksums)
|
60
59
|
end
|
61
60
|
|
62
|
-
desc "validate_config", "Validate an application configuration file
|
61
|
+
desc "validate_config [CONFIG_PATH]", "Validate an application configuration file"
|
63
62
|
# Application configuration validation command
|
64
|
-
def validate_config
|
63
|
+
def validate_config(config_path)
|
65
64
|
setup_logger(options)
|
66
65
|
|
67
|
-
exit Longleaf::ValidateConfigCommand.new(
|
66
|
+
exit Longleaf::ValidateConfigCommand.new(config_path).execute
|
68
67
|
end
|
69
68
|
|
70
69
|
no_commands do
|
@@ -10,10 +10,8 @@ module Longleaf
|
|
10
10
|
raise ArgumentError.new("Parameters name, path and metadata_path are required") unless name && path && metadata_path
|
11
11
|
|
12
12
|
@path = path
|
13
|
-
@path += '/' unless @path.end_with?('/')
|
14
13
|
@name = name
|
15
14
|
@metadata_path = metadata_path
|
16
|
-
@metadata_path += '/' unless @metadata_path.end_with?('/')
|
17
15
|
end
|
18
16
|
|
19
17
|
# Get the path for the metadata file for the given file path located in this storage location.
|
@@ -35,9 +35,11 @@ module Longleaf
|
|
35
35
|
YAML.load_file(config_path)
|
36
36
|
rescue Errno::ENOENT => err
|
37
37
|
raise Longleaf::ConfigurationError.new(
|
38
|
-
"
|
38
|
+
"Cannot load application configuration, file #{config_path} does not exist.")
|
39
39
|
rescue => err
|
40
|
-
raise Longleaf::ConfigurationError.new(
|
40
|
+
raise Longleaf::ConfigurationError.new(
|
41
|
+
%Q(Failed to load application configuration due to the following reason:
|
42
|
+
#{err.message}))
|
41
43
|
end
|
42
44
|
end
|
43
45
|
end
|
@@ -1,7 +1,6 @@
|
|
1
1
|
require 'yaml'
|
2
|
-
|
3
|
-
|
4
|
-
require 'pathname'
|
2
|
+
require_relative '../models/metadata_record'
|
3
|
+
require_relative '../models/md_fields'
|
5
4
|
|
6
5
|
# Service which serializes MetadataRecord objects
|
7
6
|
module Longleaf
|
@@ -24,10 +23,6 @@ module Longleaf
|
|
24
23
|
raise ArgumentError.new('Invalid serialization format #{format} specified')
|
25
24
|
end
|
26
25
|
|
27
|
-
# Fill in parent directories if they do not exist
|
28
|
-
parent_dir = Pathname(file_path).parent
|
29
|
-
parent_dir.mkpath unless parent_dir.exist?
|
30
|
-
|
31
26
|
File.write(file_path, content)
|
32
27
|
end
|
33
28
|
|
data/lib/longleaf/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: longleaf
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- bbpennel
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-10-
|
11
|
+
date: 2018-10-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -176,9 +176,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
176
176
|
version: '0'
|
177
177
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
178
178
|
requirements:
|
179
|
-
- - "
|
179
|
+
- - ">="
|
180
180
|
- !ruby/object:Gem::Version
|
181
|
-
version:
|
181
|
+
version: '0'
|
182
182
|
requirements: []
|
183
183
|
rubyforge_project:
|
184
184
|
rubygems_version: 2.7.6
|