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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4c6502111e3ee33f8bbd0ab96660fe6b253e3186d0ad4f03cdff722144b752ce
4
- data.tar.gz: bd4d33b9b351513ee30de709518110b767b2b7572078ec4ba7977244b87bd026
3
+ metadata.gz: d2510f31390a179bf14867d8e75bda9c8d0d9a357bc1973235f1ca953abb3c24
4
+ data.tar.gz: 40791c5e0131d8cd2506cac7f100795fd5795f60528b0c03fc0c9d8e1436ba89
5
5
  SHA512:
6
- metadata.gz: 535466cd702983f03c67d55fd56452a5ffb13d3d61829d6926aff28ef2e3f65bcabbfa98a415dcb493b3e23533ad90bffc92914d0dd8f6b5d36b668659270444
7
- data.tar.gz: b408414d09c6d915232001173aaaf765ead2973ebe5d84e668d3d0831e3ec1cb6fdac575c2cba8d0212f125b81b87c3bfce850290202113f054bf442e97300af
6
+ metadata.gz: 30b38f15dc65fa7a75bfe2e8fb2825bebecebfcea6bc511f2619b3bdf32d03f7ab938f6f2639fe1f897e8a55b4388bb8bc4bf9d1446c4c9c60951626d2be0548
7
+ data.tar.gz: cae8f1f49edba58a4f3f41b976524bf8dc9d46982528474d209c1db1a8f83d84171520b68031c433fa9ffb57c43c51cfd143fd4b4b463bd062b07c08489e0bb8
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- pears (0.0.8)
4
+ pears (0.0.11)
5
5
  activesupport
6
6
  dry-configurable (>= 0.13.0)
7
7
  redis
@@ -56,4 +56,4 @@ DEPENDENCIES
56
56
  rspec (~> 3.0)
57
57
 
58
58
  BUNDLED WITH
59
- 2.2.31
59
+ 2.3.5
@@ -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 => error
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Pears
4
- VERSION = "0.0.11"
4
+ VERSION = "0.1.0"
5
5
  end
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.11
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-01-20 00:00:00.000000000 Z
11
+ date: 2022-02-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dry-configurable