longleaf 0.1.0.pre.2 → 0.1.0.pre.3

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: 41b149cc264dcc00b79558d1acc06fd42c7810e8b06fe62627baf359fb23a784
4
- data.tar.gz: f4634c72c87d9858faace5e8c480d96b85365a37e989addfac8d2a044b957d08
3
+ metadata.gz: c987531475f7b35dcdb978ef13c1e2913598a1acce660309bc3788b9614c06c1
4
+ data.tar.gz: 274f8464642c86bcb9b21bb2eade03604b4d7771eac78939d974bab729a5cb1a
5
5
  SHA512:
6
- metadata.gz: 07aa3758499e04ff45f1fcbf1bd9e51af22b0d64ef4314ba784dc1eb0fae78bffeb6faf285e0fbe107761cf6c0c89dd024b814eb6a130821718a53d985eebe47
7
- data.tar.gz: 4546b08c4e3119f783bd7134b0a49ee7cb0f022509829122b136f872fad95b38c8c31a4db1eed021d51adb639e4cf63c2972cfeeeeaeda8cef194b026fd9051b
6
+ metadata.gz: 14de168333ab43f39ac1084d9c0ae41360349f4a5e3e4872e4671fefdd0a6daf64ab6b818f7ff237402faa2377289072a993a918fe4085c734da17da7d3bdd3a
7
+ data.tar.gz: 9187c9b69eda7a9ba5e2ae30db7b1f940da33dd4237cf4ba9c7142f13b5fb4f0196942da5e6a1b8cdef6bbab7dd1468f8a32760174c75b100a56ea0a9616b074
data/lib/longleaf/cli.rb CHANGED
@@ -11,6 +11,7 @@ module Longleaf
11
11
 
12
12
  class_option(:config, :aliases => "-c",
13
13
  :default => ENV['LONGLEAF_CFG'],
14
+ :required => true,
14
15
  :desc => 'Absolute path to the application configuration used for this command. By default, the value of the environment variable LONGLEAF_CFG is used.')
15
16
  # Logging/output options
16
17
  class_option(:failure_only,
@@ -58,12 +59,12 @@ module Longleaf
58
59
  exit command.execute(file_paths: file_paths, force: options[:force], checksums: checksums)
59
60
  end
60
61
 
61
- desc "validate_config [CONFIG_PATH]", "Validate an application configuration file"
62
+ desc "validate_config", "Validate an application configuration file, provided using --config."
62
63
  # Application configuration validation command
63
- def validate_config(config_path)
64
+ def validate_config
64
65
  setup_logger(options)
65
66
 
66
- exit Longleaf::ValidateConfigCommand.new(config_path).execute
67
+ exit Longleaf::ValidateConfigCommand.new(options[:config]).execute
67
68
  end
68
69
 
69
70
  no_commands do
@@ -10,8 +10,10 @@ 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?('/')
13
14
  @name = name
14
15
  @metadata_path = metadata_path
16
+ @metadata_path += '/' unless @metadata_path.end_with?('/')
15
17
  end
16
18
 
17
19
  # Get the path for the metadata file for the given file path located in this storage location.
@@ -35,11 +35,9 @@ module Longleaf
35
35
  YAML.load_file(config_path)
36
36
  rescue Errno::ENOENT => err
37
37
  raise Longleaf::ConfigurationError.new(
38
- "Cannot load application configuration, file #{config_path} does not exist.")
38
+ "Configuration file #{config_path} does not exist.")
39
39
  rescue => err
40
- raise Longleaf::ConfigurationError.new(
41
- %Q(Failed to load application configuration due to the following reason:
42
- #{err.message}))
40
+ raise Longleaf::ConfigurationError.new(err)
43
41
  end
44
42
  end
45
43
  end
@@ -1,3 +1,3 @@
1
1
  module Longleaf
2
- VERSION = "0.1.0.pre.2"
2
+ VERSION = "0.1.0.pre.3"
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.2
4
+ version: 0.1.0.pre.3
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-18 00:00:00.000000000 Z
11
+ date: 2018-10-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor