dip 8.2.4 → 8.2.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 517d3e67f9ef9adb70103d135dd6569b2adcc95f8b47c2263ff24627b9b0af87
4
- data.tar.gz: 223107379a499fcd0724d30b4cab55336a84d1c196f33d71895d9459411fce24
3
+ metadata.gz: 43ca40663a00675570ed4dcd668987e7845c6a3d9682b999889c9af37368cfea
4
+ data.tar.gz: c9eb17ad1d6f9615868f04024afb434a821a758bffa48daac1516a1cd99b10e7
5
5
  SHA512:
6
- metadata.gz: 1347cebef78a36db54d5842376755eb3329021dbe780c1ba7fdde0bc2662b796ffbcbc731c4472ba83bb3dd5f67175d1351aea9970397c40fcae346265ac783c
7
- data.tar.gz: 4b4cd090e8b944a0cba7b98f0ffd422cc6bfb0e1e53bc25339ded9a4924884321206c30fc4862e3bcddbf87b9790e317b9c718aa36d3d4d4c678a16ae38d9f2a
6
+ metadata.gz: 4fc103b4c4e0f22c58d4b87e9d1b48a61f95bd948b9b00e7afbaaf453c0d11ef5720d698e11376837f032e35639058f9e47cd74716a2f7274da00c868589110a
7
+ data.tar.gz: 13a8525d318c4e312287d136005b0bf6c751f11f85f984de5266c2222aa432deb44eb0173172305739022fe654770290dea07b712b1a1b029015782a2582d38d
data/README.md CHANGED
@@ -1,5 +1,5 @@
1
1
  [![Gem Version](https://badge.fury.io/rb/dip.svg)](https://badge.fury.io/rb/dip)
2
- [![Build Status](https://github.com/bibendi/dip/workflows/Ruby/badge.svg?branch=master)](https://github.com/bibendi/dip/actions?query=branch%3Amaster)
2
+ [![Build Status](https://github.com/bibendi/dip/actions/workflows/ci.yml/badge.svg)](https://github.com/bibendi/dip/actions/workflows/ci.yml)
3
3
  [![Maintainability](https://api.codeclimate.com/v1/badges/d0dca854f0930502f7b3/maintainability)](https://codeclimate.com/github/bibendi/dip/maintainability)
4
4
 
5
5
  <img src="https://raw.githubusercontent.com/bibendi/dip/master/.github/logo.png" alt="dip logo" height="140" />
data/lib/dip/config.rb CHANGED
@@ -120,8 +120,8 @@ module Dip
120
120
  schema_path = File.join(File.dirname(__FILE__), "../../schema.json")
121
121
  raise Dip::Error, "Schema file not found: #{schema_path}" unless File.exist?(schema_path)
122
122
 
123
- data = YAML.load_file(file_path)
124
- schema = JSON.parse(File.read(schema_path))
123
+ data = self.class.load_yaml(file_path)
124
+ schema = JSON::Validator.parse(File.read(schema_path))
125
125
  JSON::Validator.validate!(schema, data)
126
126
  rescue Psych::SyntaxError => e
127
127
  raise Dip::Error, "Invalid YAML syntax in config file: #{e.message}"
@@ -129,6 +129,8 @@ module Dip
129
129
  data_display = data ? data.to_yaml.gsub("\n", "\n ") : "nil"
130
130
  error_message = "Schema validation failed: #{e.message}\nInput data:\n #{data_display}"
131
131
  raise Dip::Error, error_message
132
+ rescue JSON::Schema::JsonParseError => e
133
+ raise Dip::Error, "Error parsing schema file: #{e.message}"
132
134
  end
133
135
 
134
136
  private
data/lib/dip/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Dip
4
- VERSION = "8.2.4"
4
+ VERSION = "8.2.5"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dip
3
3
  version: !ruby/object:Gem::Version
4
- version: 8.2.4
4
+ version: 8.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - bibendi
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-11-26 00:00:00.000000000 Z
11
+ date: 2024-11-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor