eurovat 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/lib/eurovat.rb +5 -5
  2. data/lib/eurovat/version.rb +1 -1
  3. metadata +3 -3
@@ -68,6 +68,10 @@ class Eurovat
68
68
  end
69
69
  end
70
70
 
71
+ def self.sanitize_vat_number(vat_number)
72
+ vat_number.gsub(/[\s\t\.]/, '').upcase
73
+ end
74
+
71
75
  def self.check_vat_number(vat_number)
72
76
  @@instance ||= new
73
77
  @@instance.check_vat_number(vat_number)
@@ -85,7 +89,7 @@ class Eurovat
85
89
 
86
90
  # Any exception other than InvalidFormatError indicates that the service is down.
87
91
  def check_vat_number(vat_number)
88
- vat_number = sanitize_vat_number(vat_number)
92
+ vat_number = Eurovat.sanitize_vat_number(vat_number)
89
93
  if vat_number =~ VAT_FORMAT
90
94
  country_code = $1
91
95
  number = $2
@@ -138,8 +142,4 @@ private
138
142
  !!val
139
143
  end
140
144
  end
141
-
142
- def sanitize_vat_number(vat_number)
143
- vat_number.gsub(/[\s\t\.]/, '').upcase
144
- end
145
145
  end
@@ -1,3 +1,3 @@
1
1
  class Eurovat
2
- VERSION_STRING = '1.0.0'
2
+ VERSION_STRING = '1.0.1'
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: eurovat
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
4
+ hash: 21
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 0
9
- - 0
10
- version: 1.0.0
9
+ - 1
10
+ version: 1.0.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Hongli Lai