lib/rzo/app/config_validation.rb in rzo-0.7.0 vs lib/rzo/app/config_validation.rb in rzo-0.8.0

- old
+ new

@@ -5,19 +5,19 @@ module Rzo class App ## # Mix-in module providing configuration validation methods and safety # checking. The goal is to provide useful feedback to the end user in the - # situation where ~/.rizzo.json is configured to point at directories which + # situation where ~/.rizzo.yaml is configured to point at directories which # do not exist, have missing keys, etc... # rubocop:disable Metrics/ModuleLength module ConfigValidation ## Rizzo configuration schema for the personal configuration file at - # ~/.rizzo.json. Minimum necessary to load the complete configuration from + # ~/.rizzo.yaml. Minimum necessary to load the complete configuration from # all control repositories. RZO_PERSONAL_CONFIG_SCHEMA = { - '$schema' => 'http://json-schema.org/draft-06/schema#', + '$schema' => 'http://json-schema.org/draft/schema#', title: 'Personal Configuration', description: 'Rizzo personal configuration file', type: 'object', properties: { defaults: { @@ -58,11 +58,11 @@ modulepath: { type: 'array', items: { type: 'string' }, }, synced_folders: { - '$schema' => 'http://json-schema.org/draft-06/schema#', + '$schema' => 'http://json-schema.org/draft/schema#', type: 'object', properties: { '/' => {}, patternProperties: { '^(/[^/]+)+$' => {}, @@ -158,11 +158,11 @@ end end ## # Validate a personal configuration, typically originating from - # ~/.rizzo.json. This configuration is necessary to build a complete + # ~/.rizzo.yaml. This configuration is necessary to build a complete # control repo configuration using the top level control repo. This # validation focuses on the minimum necessary configuration to bootstrap # the complete configuration, primarily the repo locations and existence. def validate_personal_config!(config) issues = compute_issues(CHECKS_PERSONAL_CONFIG, config) @@ -173,13 +173,13 @@ end end ## # Validate a complete loaded configuration. This is distinct from a base - # configuration in that the JSON files in each control repository have + # configuration in that the YAML files in each control repository have # already been merged, in order, on top of the base configuration - # originating at ~/.rizzo.json. This implements safety checking. These + # originating at ~/.rizzo.yaml. This implements safety checking. These # methods are expected to execute within the context of a # Rzo::App::Subcommand instance, therefore log methods and the parsed # configuration are assumed to be available. # # The approach is to collect an Array of Issue instances. If issues are @@ -302,5 +302,6 @@ end end # rubocop:enable Metrics/ModuleLength end end +# rubocop:enable Style/GuardClause