valvat 0.8.1 → 0.8.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/.travis.yml +1 -1
- data/CHANGES.md +9 -2
- data/certs/yolk.pem +23 -19
- data/lib/valvat/checksum/si.rb +2 -2
- data/lib/valvat/utils.rb +1 -1
- data/lib/valvat/version.rb +1 -1
- data/spec/valvat/checksum/si_spec.rb +3 -3
- data/spec/valvat/utils_spec.rb +1 -0
- metadata +25 -21
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0e7d92a2e8474b0badde3dfda893183f6109eed0d27cd485f7d3f22dfcae5723
|
4
|
+
data.tar.gz: f347f0ed55567d2b2c770f9eed233159baa5570bffa75eefbe341d75fa9d292b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3b195b61b4fbd02643bd219d7727932542ebc9f5b7e67bef71d31307575554f5dee7545e2cc983862959414c5b4237929f46e6989600439333e5082454af9e70
|
7
|
+
data.tar.gz: abedae554dd4f8b8a6d113df09a5e95990e454a43aca4c2723e8a966e86041ac2cd66fea812b66d5e5c039f9540c78b36e2574f7a7f82b67b90f549835255514
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/.travis.yml
CHANGED
data/CHANGES.md
CHANGED
@@ -1,6 +1,13 @@
|
|
1
1
|
### dev
|
2
2
|
|
3
|
-
[full changelog](http://github.com/yolk/valvat/compare/v0.8.
|
3
|
+
[full changelog](http://github.com/yolk/valvat/compare/v0.8.2...master)
|
4
|
+
|
5
|
+
### 0.8.2 / 2019-11-15
|
6
|
+
|
7
|
+
[full changelog](http://github.com/yolk/valvat/compare/v0.8.1...v0.8.2)
|
8
|
+
|
9
|
+
* Fixed checksum computation for Slovenian VAT ID.
|
10
|
+
* Updated normalize regexp to clean spaces, punctuation and control chars (by [jarthod](https://github.com/jarthod))
|
4
11
|
|
5
12
|
### 0.8.1 / 2019-07-30
|
6
13
|
|
@@ -294,4 +301,4 @@
|
|
294
301
|
|
295
302
|
[full changelog](http://github.com/yolk/valvat/compare/v0.0.1...v0.0.2)
|
296
303
|
|
297
|
-
* Use REST-wrapper for accessing VIES web service; this removes dependency on savon and some lines of code. See http://isvat.appspot.com/
|
304
|
+
* Use REST-wrapper for accessing VIES web service; this removes dependency on savon and some lines of code. See http://isvat.appspot.com/
|
data/certs/yolk.pem
CHANGED
@@ -1,21 +1,25 @@
|
|
1
1
|
-----BEGIN CERTIFICATE-----
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
+
|
20
|
-
|
2
|
+
MIIELDCCApSgAwIBAgIBATANBgkqhkiG9w0BAQsFADAgMR4wHAYDVQQDDBVzZWJh
|
3
|
+
c3RpYW4vREM9eW8vREM9bGswHhcNMTkxMTE1MTIzMzUwWhcNMjAxMTE0MTIzMzUw
|
4
|
+
WjAgMR4wHAYDVQQDDBVzZWJhc3RpYW4vREM9eW8vREM9bGswggGiMA0GCSqGSIb3
|
5
|
+
DQEBAQUAA4IBjwAwggGKAoIBgQC96oQ16N6R0H69fWFfsfHo2oIJHtLgETPK6ly+
|
6
|
+
tLeznJsZomCkZgFS0wNwnExr9qlH+AmygvNoaniVq/Pp2+2jwMuLgk5hkZMRM8Rf
|
7
|
+
i3wp5LCbW4BysT1rURQoqfo4iH8d60WgUl2Ggou70RMGlizvgvGOfszxfRTkuNXd
|
8
|
+
Eisbzs3UTKIWdx/umzHW4hbfbZcJ89cXoRLbxPjzozCfXPymmimlyva3Tu3QrxNH
|
9
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5cGER
|
24
|
+
9vbf6JSKzQPa/HeBoU0s1Q==
|
21
25
|
-----END CERTIFICATE-----
|
data/lib/valvat/checksum/si.rb
CHANGED
data/lib/valvat/utils.rb
CHANGED
@@ -3,7 +3,7 @@ class Valvat
|
|
3
3
|
|
4
4
|
EU_COUNTRIES = %w(AT BE BG CY CZ DE DK EE ES FI FR GB GR HR HU IE IT LT LU LV MT NL PL PT RO SE SI SK)
|
5
5
|
COUNTRY_PATTERN = /\A([A-Z]{2})(.+)\Z/
|
6
|
-
NORMALIZE_PATTERN = /[
|
6
|
+
NORMALIZE_PATTERN = /[[:space:][:punct:][:cntrl:]]+/
|
7
7
|
|
8
8
|
def self.split(vat)
|
9
9
|
COUNTRY_PATTERN =~ vat
|
data/lib/valvat/version.rb
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
3
|
describe Valvat::Checksum::SI do
|
4
|
-
%w(SI59082437 SI51049406 SI86154575 SI47431857 SI22511822
|
4
|
+
%w(SI59082437 SI51049406 SI86154575 SI47431857 SI22511822 SI26833921).each do |valid_vat|
|
5
5
|
it "returns true on valid vat #{valid_vat}" do
|
6
6
|
expect(Valvat::Checksum.validate(valid_vat)).to eql(true)
|
7
7
|
end
|
8
8
|
|
9
|
-
invalid_vat = "#{valid_vat[0..-
|
9
|
+
invalid_vat = "#{valid_vat[0..-2]}#{valid_vat[-1].to_i+1}"
|
10
10
|
|
11
11
|
it "returns false on invalid vat #{invalid_vat}" do
|
12
12
|
expect(Valvat::Checksum.validate(invalid_vat)).to eql(false)
|
@@ -20,4 +20,4 @@ describe Valvat::Checksum::SI do
|
|
20
20
|
it "returns false on special case invalid vat SI01111108" do
|
21
21
|
expect(Valvat::Checksum.validate("SI01111108")).to eql(false)
|
22
22
|
end
|
23
|
-
end
|
23
|
+
end
|
data/spec/valvat/utils_spec.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: valvat
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sebastian Munz
|
@@ -10,27 +10,31 @@ bindir: bin
|
|
10
10
|
cert_chain:
|
11
11
|
- |
|
12
12
|
-----BEGIN CERTIFICATE-----
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
+
|
31
|
-
|
13
|
+
MIIELDCCApSgAwIBAgIBATANBgkqhkiG9w0BAQsFADAgMR4wHAYDVQQDDBVzZWJh
|
14
|
+
c3RpYW4vREM9eW8vREM9bGswHhcNMTkxMTE1MTIzMzUwWhcNMjAxMTE0MTIzMzUw
|
15
|
+
WjAgMR4wHAYDVQQDDBVzZWJhc3RpYW4vREM9eW8vREM9bGswggGiMA0GCSqGSIb3
|
16
|
+
DQEBAQUAA4IBjwAwggGKAoIBgQC96oQ16N6R0H69fWFfsfHo2oIJHtLgETPK6ly+
|
17
|
+
tLeznJsZomCkZgFS0wNwnExr9qlH+AmygvNoaniVq/Pp2+2jwMuLgk5hkZMRM8Rf
|
18
|
+
i3wp5LCbW4BysT1rURQoqfo4iH8d60WgUl2Ggou70RMGlizvgvGOfszxfRTkuNXd
|
19
|
+
Eisbzs3UTKIWdx/umzHW4hbfbZcJ89cXoRLbxPjzozCfXPymmimlyva3Tu3QrxNH
|
20
|
+
/IBdzni9qj6gctmTYgWHMwzRJz+yJBY7V3G7jss/3vWaAoOhLns5bJUAXOvNsR4D
|
21
|
+
sWE5676q+Hi8Ti7B7AvWhqxB+9HSevjNrK+fNV7GFNRtbPW6o6vzYjPhtsdjluzP
|
22
|
+
94UA2AC6rjxtzNgzaXtQHZAnBjCf6ayoqbizh++SHU7J+tdoyxHjSfKPfdIW0P7Z
|
23
|
+
W5npDb+b2kGTa6cclciBpRqyZWVz0CIgi06k+GuxgroQVf7465CEjyh2krQqGXtt
|
24
|
+
A7d8gWiKsxpZgOjh5wFmFT97h8MCAwEAAaNxMG8wCQYDVR0TBAIwADALBgNVHQ8E
|
25
|
+
BAMCBLAwHQYDVR0OBBYEFOGxpUkCn17xMxFtmn/CFk5W57s6MBoGA1UdEQQTMBGB
|
26
|
+
D3NlYmFzdGlhbkB5by5sazAaBgNVHRIEEzARgQ9zZWJhc3RpYW5AeW8ubGswDQYJ
|
27
|
+
KoZIhvcNAQELBQADggGBAEDGrRAAvS7w793sYSoE8VAt45pw71zio2BgdcpYRoHB
|
28
|
+
rdaghjIVg77lybTmKdRGPM1T9m4zL01xddrqpgQFflVLmd/JVfEHwkLfJzZKvpy+
|
29
|
+
1vxgdIHhXkBB9G/X+LZC3PtMQx4f6BYIyf4kiVrTSWiKeeftFsH1tdvU5oYR7Gzy
|
30
|
+
dugPR09J0oVA/DiLlzfUy9o2meH8QyCGX8c0LHY8gx4C4orZz+FIFZczZB1FUOeu
|
31
|
+
LjR/yNUh7bYqwVHTQL5sajfQMFyt8HotazwdBvUETXGZW3VQZymR99gcMjr/H4xg
|
32
|
+
mPEildrYsY7glEKryCc2YDYC1ahqWshnpOLqAXatonsoDBXpVKl+HGsUnrnCiaxh
|
33
|
+
ctN4at+sy0CqPL+zXqp14b34rO0lP6hf0l+/LnuM96ImE+Rw+3gPX2iOtqivhrfM
|
34
|
+
rAFNAD1QEGN6elQdy1MRuXwjcUhM8P8ofLDEaE225TSZvAI+XoCxW2PSsQj5cGER
|
35
|
+
9vbf6JSKzQPa/HeBoU0s1Q==
|
32
36
|
-----END CERTIFICATE-----
|
33
|
-
date: 2019-
|
37
|
+
date: 2019-11-15 00:00:00.000000000 Z
|
34
38
|
dependencies:
|
35
39
|
- !ruby/object:Gem::Dependency
|
36
40
|
name: savon
|
metadata.gz.sig
CHANGED
Binary file
|