fixed_record 0.4.2 → 0.4.4

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: 6569aadc6d27a82383e2fadcf8da80313962ae3a46c1515ca1670d5472cfc1bd
4
- data.tar.gz: f3bb5c501f26f2bd64f0c6c606ae9da209e4c93a9de8d2458367fec87dfe2386
3
+ metadata.gz: ff8338a931bf7c56128b3865f814cff42f0383db1fe48d97cf36d621ab53e244
4
+ data.tar.gz: 9f3378e6a0423fbbd6cb042973a1c29b315114cdb3accd4b82d3dd8e94a2d529
5
5
  SHA512:
6
- metadata.gz: 76869aa7725d9dd400ebcf0e8c8c04d1d0bef639298742e3b5ea6bbca491364e021df28c26a181e48ac248b2f9b88ec95ba4e3ffc22201ba924f17fd84923934
7
- data.tar.gz: 29a29b7422dceda390e4449d511bc13aff4a4f32fc66d3b0333f9556a218ae6419e5031944e972756cf10c50912d81a1d45da7208c25f0ce8a8eb56825a0dee1
6
+ metadata.gz: 7eb69a020b70344a11ccdbd5010ab9035cc016235ee462291fd8eef54e0d0829d70ab8581213d264d6f1a12fd99581794938258c50b2af550bb6d3b6d5785643
7
+ data.tar.gz: abc3b1526a5ce6b2f19271044692e4d4c1eff1acc8aadf05579075a96fd4d3aae30e594f5f1c4035eff034342a05e2d7d6c622fe09ac4e761b6a498d5c42f70a
data/CHANGELOG.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Gem fixed_record Changelog
2
2
 
3
- ## 0.4.2
3
+ ## 0.4.4
4
4
  * Syntax Errors in YAML file now reported as ArgumentError
5
5
 
6
6
  ## 0.4.1
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- fixed_record (0.4.2)
4
+ fixed_record (0.4.3)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/lib/fixed_record.rb CHANGED
@@ -4,7 +4,7 @@ require 'psych'
4
4
  require 'set'
5
5
 
6
6
  class FixedRecord
7
- VERSION = "0.4.2"
7
+ VERSION = "0.4.4"
8
8
 
9
9
  # Lazy load data from given filename
10
10
  # creating accessors for top level attributes
@@ -85,7 +85,15 @@ class FixedRecord
85
85
  rescue Errno::ENOENT
86
86
  raise
87
87
  rescue Psych::SyntaxError => error
88
- raise ArgumentError, "\#{error.class.name} \#{error.message}"
88
+ fname = File.basename(@@filename)
89
+ msg = error.message
90
+ if msg.include? @@filename
91
+ msg.sub!( @@filename, fname )
92
+ msg = "\#{error.class.name} \#{msg}"
93
+ else
94
+ msg = "\#{error.class.name} \#{fname} \#{error.message}"
95
+ end
96
+ raise ArgumentError, msg
89
97
  end
90
98
  validate_structure( y, @@singleton, @@filename )
91
99
  if @@valid_keys.empty?
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fixed_record
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.2
4
+ version: 0.4.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Bell