pears 0.0.11 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +2 -2
- data/lib/pears/provider/base.rb +4 -0
- data/lib/pears/provider/local_file.rb +2 -1
- data/lib/pears/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d2510f31390a179bf14867d8e75bda9c8d0d9a357bc1973235f1ca953abb3c24
|
4
|
+
data.tar.gz: 40791c5e0131d8cd2506cac7f100795fd5795f60528b0c03fc0c9d8e1436ba89
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 30b38f15dc65fa7a75bfe2e8fb2825bebecebfcea6bc511f2619b3bdf32d03f7ab938f6f2639fe1f897e8a55b4388bb8bc4bf9d1446c4c9c60951626d2be0548
|
7
|
+
data.tar.gz: cae8f1f49edba58a4f3f41b976524bf8dc9d46982528474d209c1db1a8f83d84171520b68031c433fa9ffb57c43c51cfd143fd4b4b463bd062b07c08489e0bb8
|
data/Gemfile.lock
CHANGED
data/lib/pears/provider/base.rb
CHANGED
@@ -25,6 +25,10 @@ module Pears
|
|
25
25
|
yaml_data = YAML.load(yaml_data)
|
26
26
|
raise Pears::InvalidProviderData if yaml_data.is_a? String
|
27
27
|
yaml_data.with_indifferent_access
|
28
|
+
rescue Psych::SyntaxError => e
|
29
|
+
logger ||= defined?(Rails) ? Rails.logger : Logger.new(STDOUT)
|
30
|
+
logger.warn "#{e.class} #{e.message}"
|
31
|
+
raise Pears::InvalidProviderData
|
28
32
|
end
|
29
33
|
end
|
30
34
|
end
|
@@ -8,7 +8,8 @@ module Pears
|
|
8
8
|
def initialize(file_path, on_failure: :raise)
|
9
9
|
yaml_data = File.read(file_path)
|
10
10
|
@data = parse_yaml(yaml_data)
|
11
|
-
rescue Errno::ENOENT
|
11
|
+
rescue Errno::ENOENT,
|
12
|
+
Pears::InvalidProviderData => error
|
12
13
|
if on_failure == :null
|
13
14
|
@data = {}
|
14
15
|
else
|
data/lib/pears/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pears
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Steven Kemp
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-02-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dry-configurable
|