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: c987531475f7b35dcdb978ef13c1e2913598a1acce660309bc3788b9614c06c1
4
- data.tar.gz: 274f8464642c86bcb9b21bb2eade03604b4d7771eac78939d974bab729a5cb1a
3
+ metadata.gz: 46460cd1116e97c1d54c4f12ad130a318b79fd9f3db3e5fbec02b4dfe1e65ee9
4
+ data.tar.gz: b8270d5fdb29c00c9689e9d5bd6b48530ac35dfd3e99daaa3a5b90803428deca
5
5
  SHA512:
6
- metadata.gz: 14de168333ab43f39ac1084d9c0ae41360349f4a5e3e4872e4671fefdd0a6daf64ab6b818f7ff237402faa2377289072a993a918fe4085c734da17da7d3bdd3a
7
- data.tar.gz: 9187c9b69eda7a9ba5e2ae30db7b1f940da33dd4237cf4ba9c7142f13b5fb4f0196942da5e6a1b8cdef6bbab7dd1468f8a32760174c75b100a56ea0a9616b074
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, provided using --config."
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(options[:config]).execute
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
- "Configuration file #{config_path} does not exist.")
38
+ "Cannot load application configuration, file #{config_path} does not exist.")
39
39
  rescue => err
40
- raise Longleaf::ConfigurationError.new(err)
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
- require 'longleaf/models/metadata_record'
3
- require 'longleaf/models/md_fields'
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
 
@@ -1,3 +1,3 @@
1
1
  module Longleaf
2
- VERSION = "0.1.0.pre.3"
2
+ VERSION = "0.1.0"
3
3
  end
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.pre.3
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-19 00:00:00.000000000 Z
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: 1.3.1
181
+ version: '0'
182
182
  requirements: []
183
183
  rubyforge_project:
184
184
  rubygems_version: 2.7.6