einvoice 1.2.0 → 1.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 759abd3a63c25e2bed7fad33c5f8f39da6dbdc24
4
- data.tar.gz: 9feb27476f179c348a2e9ea839c34e5458a087df
3
+ metadata.gz: 0c6a3021179f718375bae93a5bee30b465accb90
4
+ data.tar.gz: 52876e03c028141f0359b48a77f5b5efd55ff713
5
5
  SHA512:
6
- metadata.gz: 8e7d575edd679535e71538f4be6a32ce8359685dcdf608d600fc2a22b65970648f20d93c56ccf7adfa889129d89e59c67c7cba31925b0f4fdb8f6d7a28513156
7
- data.tar.gz: af97a49f35685691ff2ab9845e71aef439cda242d1cea6308b692aa9ef3a009db5ef46de7964ee0f664900353018e9d47acfc6e5ceaba61b5b369a9c042ef0b5
6
+ metadata.gz: b3f2f65c0aaeb4c38b4ba61bbbd3cfc10cffb226da6390a4fd1200aecb5ddae4e0dbb21aaa0c7ef569f6569cc0e029d499ff13ef3fe669f640a5d2891098e2da
7
+ data.tar.gz: 8950fef831e18ca5978ea778a13549242efd85fdf75fb18c927b160bb085e962a243a7f2510112fcf447bc9f12fafb93f16b26ad558f254dd8860651c2031e29
@@ -35,7 +35,9 @@ module Einvoice
35
35
 
36
36
  class DonationUnitValidator < ActiveModel::EachValidator
37
37
  def validate_each(record, attribute, value)
38
- units = JSON.parse(File.read("lib/einvoice/donation_unit_list.json"))
38
+ puts File.expand_path('../../../', __FILE__)
39
+ donation_unit_list_file = [File.expand_path('../../../', __FILE__), "/donation_unit_list.json"].join
40
+ units = JSON.parse(File.read(donation_unit_list_file))
39
41
 
40
42
  unless units[value]
41
43
  record.errors.add attribute, options[:message] || :invalid
@@ -1,3 +1,3 @@
1
1
  module Einvoice
2
- VERSION = "1.2.0"
2
+ VERSION = "1.2.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: einvoice
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Yun
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-04-26 00:00:00.000000000 Z
11
+ date: 2016-04-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday