figjam 1.5.0 → 1.6.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: a0ed678f68603cf0ac2b6a695ae0c0516626c229964edc3e1b8175e2a306e210
4
- data.tar.gz: 46b53becca0e9b613496b1c5699fc7ba4d486d3a95ac841751eafaa9c2fbd91b
3
+ metadata.gz: efb30c09f6e2c3d1b9dd649679dfba6dbabd5cbbc5e56c8e9f51fd18082cfa9c
4
+ data.tar.gz: b95972fc469e8bfdb651406925fc3af859c0639662fd4464c8b367de1fc23c87
5
5
  SHA512:
6
- metadata.gz: f8e492711470e7b4aaa1a999d00d2feedfb9e116d4f93a1393183ad9e4ff4f6c65283150d3ff3d0539b199be45c819db85f4b4f4132caac138ff69b5cd58d828
7
- data.tar.gz: 96f49716a0ba722587c3553b2f2463ed9fa239c5bf498a4e82dd1642ada3a3c7d3e4ab55f9fb57136ca7f041c1fa59d1726c9d696a9ed71444feb50c98c09343
6
+ metadata.gz: ba4c3648b7ed4c8f1cdc0a8e7df2a8db996511301b626f02ca0921547a996e4d21fddfbe2aabcb4643df6b14277026efa2a00c148ec25d0db93746fb3d978865
7
+ data.tar.gz: 00c61bc16d26dc502a4948d986ab528994a00a2aab51f45f0b9150ed17d8be7037660cb4d5b9990d50215c9f50dd44f49c32097af188f590b0384fe3c8c0f3da
@@ -62,7 +62,17 @@ module Figjam
62
62
  end
63
63
 
64
64
  def parse(path)
65
- File.exist?(path) && YAML.load(ERB.new(File.read(path)).result) || {}
65
+ File.exist?(path) && load_yaml(ERB.new(File.read(path)).result) || {}
66
+ end
67
+
68
+ def load_yaml(source)
69
+ # https://bugs.ruby-lang.org/issues/17866
70
+ # https://github.com/rails/rails/commit/179d0a1f474ada02e0030ac3bd062fc653765dbe
71
+ begin
72
+ YAML.load(source, aliases: true) || {}
73
+ rescue ArgumentError
74
+ YAML.load(source) || {}
75
+ end
66
76
  end
67
77
 
68
78
  def global_configuration
@@ -1,3 +1,3 @@
1
1
  module Figjam
2
- VERSION = "1.5.0"
2
+ VERSION = "1.6.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: figjam
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.0
4
+ version: 1.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Harry Lascelles
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-11-30 00:00:00.000000000 Z
11
+ date: 2022-12-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor