fixed_record 0.4.1 → 0.4.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/Gemfile.lock +1 -1
- data/lib/fixed_record.rb +9 -2
- 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: 6569aadc6d27a82383e2fadcf8da80313962ae3a46c1515ca1670d5472cfc1bd
|
4
|
+
data.tar.gz: f3bb5c501f26f2bd64f0c6c606ae9da209e4c93a9de8d2458367fec87dfe2386
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 76869aa7725d9dd400ebcf0e8c8c04d1d0bef639298742e3b5ea6bbca491364e021df28c26a181e48ac248b2f9b88ec95ba4e3ffc22201ba924f17fd84923934
|
7
|
+
data.tar.gz: 29a29b7422dceda390e4449d511bc13aff4a4f32fc66d3b0333f9556a218ae6419e5031944e972756cf10c50912d81a1d45da7208c25f0ce8a8eb56825a0dee1
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
data/lib/fixed_record.rb
CHANGED
@@ -1,9 +1,10 @@
|
|
1
1
|
|
2
2
|
require 'yaml'
|
3
|
+
require 'psych'
|
3
4
|
require 'set'
|
4
5
|
|
5
6
|
class FixedRecord
|
6
|
-
VERSION = "0.4.
|
7
|
+
VERSION = "0.4.2"
|
7
8
|
|
8
9
|
# Lazy load data from given filename
|
9
10
|
# creating accessors for top level attributes
|
@@ -79,7 +80,13 @@ class FixedRecord
|
|
79
80
|
|
80
81
|
def self.load!
|
81
82
|
if @@items.nil?
|
82
|
-
|
83
|
+
begin
|
84
|
+
y = YAML.load_file( @@filename )
|
85
|
+
rescue Errno::ENOENT
|
86
|
+
raise
|
87
|
+
rescue Psych::SyntaxError => error
|
88
|
+
raise ArgumentError, "\#{error.class.name} \#{error.message}"
|
89
|
+
end
|
83
90
|
validate_structure( y, @@singleton, @@filename )
|
84
91
|
if @@valid_keys.empty?
|
85
92
|
# Grab keys from file
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fixed_record
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mike Bell
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-03-
|
11
|
+
date: 2020-03-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|