valvat 0.7.2 → 0.7.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +3 -1
- data/.travis.yml +1 -0
- data/CHANGES.md +7 -1
- data/README.md +1 -1
- data/certs/yolk.pem +16 -16
- data/lib/valvat/locales/hu.yml +34 -0
- data/lib/valvat/locales/sk.yml +34 -0
- data/lib/valvat/locales/tr.yml +34 -0
- data/lib/valvat/version.rb +1 -1
- data/spec/valvat/lookup_spec.rb +13 -27
- metadata +22 -19
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: d63414ad378d6684f8e7aa678104bc81d0b7fac4bf6f10f0ef389ab2db11df1c
|
4
|
+
data.tar.gz: 296440b378bcf019cfdfd0ae90211fdf1965e724c7c386330edc94d0792c0320
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b60a9b1fc9fa6a5cfdb64d90baa3d98a2cdfac3c5d0dea38d1d22c00a5607903449a475027653501ba7b1dbbfeb2c0a439208a27325d30c092447086fd4fb92d
|
7
|
+
data.tar.gz: da1b4af394110ea8a74c3ed1b2e05c865d8eda06335a0486dfd79a9059c5245975ff23b5f13a240c50c1060a1a5b927d370adb2f7e67184dd869ff649966ff14
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
@@ -1 +1,3 @@
|
|
1
|
-
|
1
|
+
t����
|
2
|
+
vd6ix��Sf�2�d�Y�t0N V=����3��t`�ra�t�N��y.�4��@7�lۜ�s��� �9Ō��"�BLW�T��g�e�g���a�,�xlue[|�hَ��"��."��I���UQ�hr�
|
3
|
+
#0���Hj�kN�@�
|
data/.travis.yml
CHANGED
data/CHANGES.md
CHANGED
@@ -1,6 +1,12 @@
|
|
1
1
|
### dev
|
2
2
|
|
3
|
-
[full changelog](http://github.com/yolk/valvat/compare/v0.7.
|
3
|
+
[full changelog](http://github.com/yolk/valvat/compare/v0.7.3...master)
|
4
|
+
|
5
|
+
### 0.7.3 / 2018-11-21
|
6
|
+
|
7
|
+
[full changelog](http://github.com/yolk/valvat/compare/v0.7.2...v0.7.3)
|
8
|
+
|
9
|
+
* Added Hungarian & Slovakian translations (by [tomas-radic](https://github.com/tomas-radic))
|
4
10
|
|
5
11
|
### 0.7.2 / 2018-02-26
|
6
12
|
|
data/README.md
CHANGED
@@ -11,7 +11,7 @@ Validates european vat numbers. Standalone or as a ActiveModel validator.
|
|
11
11
|
* Lookup via the VIES web service
|
12
12
|
* ActiveModel/Rails integration
|
13
13
|
* Works standalone without ActiveModel
|
14
|
-
* I18n locales for
|
14
|
+
* I18n locales for language specific error messages in English, German, French, Spanish, Italian, Portuguese, Polish, Swedish, Dutch, Danish, Czech, Slovakian, Hungarian, Bulgarian, Romanian, Latvian, Catalan, and Finnish.
|
15
15
|
* *Experimental* checksum verification
|
16
16
|
|
17
17
|
valvat is tested and works with ruby MRI 1.9.3/2.0/2.1/2.2/2.3/2.4, jruby (in 1.9 mode) and ActiveModel 3/4/5
|
data/certs/yolk.pem
CHANGED
@@ -1,21 +1,21 @@
|
|
1
1
|
-----BEGIN CERTIFICATE-----
|
2
2
|
MIIDZDCCAkygAwIBAgIBATANBgkqhkiG9w0BAQUFADA8MRIwEAYDVQQDDAlzZWJh
|
3
3
|
c3RpYW4xEjAQBgoJkiaJk/IsZAEZFgJ5bzESMBAGCgmSJomT8ixkARkWAmxrMB4X
|
4
|
-
|
4
|
+
DTE4MTEyMjEyMjEwMFoXDTE5MTEyMjEyMjEwMFowPDESMBAGA1UEAwwJc2ViYXN0
|
5
5
|
aWFuMRIwEAYKCZImiZPyLGQBGRYCeW8xEjAQBgoJkiaJk/IsZAEZFgJsazCCASIw
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
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TOTPRwJwzazvHtiFR3ZQhWjNP
|
20
|
+
wsi9UxM8N9c=
|
21
21
|
-----END CERTIFICATE-----
|
@@ -0,0 +1,34 @@
|
|
1
|
+
en:
|
2
|
+
errors:
|
3
|
+
messages:
|
4
|
+
invalid_vat: a közösségi adószám %{country_adjective} helytelen
|
5
|
+
valvat:
|
6
|
+
country_adjectives:
|
7
|
+
eu: európai
|
8
|
+
at: osztrák
|
9
|
+
be: belga
|
10
|
+
bg: belga
|
11
|
+
cy: ciprus
|
12
|
+
cz: cseh
|
13
|
+
de: német
|
14
|
+
dk: dán
|
15
|
+
ee: észt
|
16
|
+
es: spanyol
|
17
|
+
fi: finn
|
18
|
+
fr: francia
|
19
|
+
gb: britt
|
20
|
+
gr: görög
|
21
|
+
hu: magyar
|
22
|
+
ie: ír
|
23
|
+
it: olasz
|
24
|
+
lt: litván
|
25
|
+
lu: luxemburgi
|
26
|
+
lv: lett
|
27
|
+
mt: máltai
|
28
|
+
nl: holland
|
29
|
+
pl: lengyel
|
30
|
+
pt: portugál
|
31
|
+
ro: román
|
32
|
+
se: svéd
|
33
|
+
si: szlovén
|
34
|
+
sk: szlovák
|
@@ -0,0 +1,34 @@
|
|
1
|
+
en:
|
2
|
+
errors:
|
3
|
+
messages:
|
4
|
+
invalid_vat: nie je platné %{country_adjective} IČ DPH
|
5
|
+
valvat:
|
6
|
+
country_adjectives:
|
7
|
+
eu: európske
|
8
|
+
at: rakúske
|
9
|
+
be: belgické
|
10
|
+
bg: bulharské
|
11
|
+
cy: cyperské
|
12
|
+
cz: české
|
13
|
+
de: nemecké
|
14
|
+
dk: dánske
|
15
|
+
ee: estónske
|
16
|
+
es: španielské
|
17
|
+
fi: fínske
|
18
|
+
fr: francúzske
|
19
|
+
gb: britské
|
20
|
+
gr: grécke
|
21
|
+
hu: maďarské
|
22
|
+
ie: írske
|
23
|
+
it: talianske
|
24
|
+
lt: litovské
|
25
|
+
lu: luxemburské
|
26
|
+
lv: lotyšské
|
27
|
+
mt: maltské
|
28
|
+
nl: holandské
|
29
|
+
pl: polské
|
30
|
+
pt: portugalské
|
31
|
+
ro: rumunské
|
32
|
+
se: švédske
|
33
|
+
si: slovinské
|
34
|
+
sk: slovenské
|
@@ -0,0 +1,34 @@
|
|
1
|
+
tr:
|
2
|
+
errors:
|
3
|
+
messages:
|
4
|
+
invalid_vat: geçerli %{country_adjective} vergi numarası değil
|
5
|
+
valvat:
|
6
|
+
country_adjectives:
|
7
|
+
eu: Avrupa
|
8
|
+
at: Avusturya
|
9
|
+
be: Belçika
|
10
|
+
bg: Bulgaristan
|
11
|
+
cy: Kıbrıs
|
12
|
+
cz: Çek Cumhuriyeti
|
13
|
+
de: Almanya
|
14
|
+
dk: Danimarka
|
15
|
+
ee: Estonya
|
16
|
+
es: İspanya
|
17
|
+
fi: Finlandiya
|
18
|
+
fr: Fransa
|
19
|
+
gb: İngiltere
|
20
|
+
gr: Yunanistan
|
21
|
+
hu: Macaristan
|
22
|
+
ie: İrlanda
|
23
|
+
it: İtalya
|
24
|
+
lt: Litvanya
|
25
|
+
lu: Lüksenburg
|
26
|
+
lv: Letonya
|
27
|
+
mt: Malta
|
28
|
+
nl: Hollanda
|
29
|
+
pl: Polonya
|
30
|
+
pt: Portekiz
|
31
|
+
ro: Romanya
|
32
|
+
se: İsveç
|
33
|
+
si: Slovenya
|
34
|
+
sk: Slovakya
|
data/lib/valvat/version.rb
CHANGED
data/spec/valvat/lookup_spec.rb
CHANGED
@@ -5,34 +5,34 @@ describe Valvat::Lookup do
|
|
5
5
|
context "existing vat number" do
|
6
6
|
|
7
7
|
it "returns true" do
|
8
|
-
result = Valvat::Lookup.validate("
|
8
|
+
result = Valvat::Lookup.validate("IE6388047V")
|
9
9
|
|
10
10
|
unless result.nil?
|
11
11
|
expect(result).to eql(true)
|
12
12
|
else
|
13
|
-
puts "Skipping
|
13
|
+
puts "Skipping IE vies lookup spec"
|
14
14
|
end
|
15
15
|
end
|
16
16
|
|
17
17
|
it "allows Valvat instance as input" do
|
18
|
-
result = Valvat::Lookup.validate(Valvat.new("
|
18
|
+
result = Valvat::Lookup.validate(Valvat.new("IE6388047V"))
|
19
19
|
|
20
20
|
unless result.nil?
|
21
21
|
expect(result).to eql(true)
|
22
22
|
else
|
23
|
-
puts "Skipping
|
23
|
+
puts "Skipping IE vies lookup spec"
|
24
24
|
end
|
25
25
|
end
|
26
26
|
end
|
27
27
|
|
28
28
|
context "not existing vat number" do
|
29
29
|
it "returns false" do
|
30
|
-
result = Valvat::Lookup.validate("
|
30
|
+
result = Valvat::Lookup.validate("IE6388048V")
|
31
31
|
|
32
32
|
unless result.nil?
|
33
33
|
expect(result).to eql(false)
|
34
34
|
else
|
35
|
-
puts "Skipping
|
35
|
+
puts "Skipping IE vies lookup spec"
|
36
36
|
end
|
37
37
|
end
|
38
38
|
end
|
@@ -54,25 +54,11 @@ describe Valvat::Lookup do
|
|
54
54
|
:country_code=>"IE",
|
55
55
|
:vat_number=>"6388047V",
|
56
56
|
:name=>"GOOGLE IRELAND LIMITED",
|
57
|
-
:address=>"3RD FLOOR
|
57
|
+
:address=>"3RD FLOOR, GORDON HOUSE, BARROW STREET, DUBLIN 4"
|
58
58
|
})
|
59
59
|
else
|
60
60
|
puts "Skipping IE vies lookup spec; result = #{result.inspect}"
|
61
61
|
end
|
62
|
-
|
63
|
-
result = Valvat::Lookup.validate("LU21416127", :detail => true)
|
64
|
-
|
65
|
-
if result
|
66
|
-
expect(result.delete(:request_date)).to be_kind_of(Date)
|
67
|
-
expect(result).to eql({
|
68
|
-
:country_code=>"LU",
|
69
|
-
:vat_number=>"21416127",
|
70
|
-
:name=>"EBAY EUROPE S.A R.L.",
|
71
|
-
:address=>"22, BOULEVARD ROYAL\nL-2449 LUXEMBOURG"
|
72
|
-
})
|
73
|
-
else
|
74
|
-
puts "Skipping LU vies lookup spec; result = #{result.inspect}"
|
75
|
-
end
|
76
62
|
end
|
77
63
|
|
78
64
|
it "still returns false on not existing vat number" do
|
@@ -88,22 +74,22 @@ describe Valvat::Lookup do
|
|
88
74
|
|
89
75
|
context "with request identifier" do
|
90
76
|
it "returns hash of details instead of true" do
|
91
|
-
response = Valvat::Lookup.validate("
|
77
|
+
response = Valvat::Lookup.validate("IE6388047V", :requester_vat => "IE6388047V")
|
92
78
|
|
93
79
|
if response
|
94
80
|
expect(response[:request_identifier].size).to eql(16)
|
95
81
|
request_identifier = response[:request_identifier]
|
96
82
|
expect(response.delete(:request_date)).to be_kind_of(Date)
|
97
83
|
expect(response).to eql({
|
98
|
-
:country_code=>"
|
99
|
-
:vat_number=>"
|
100
|
-
:name => "
|
84
|
+
:country_code=>"IE",
|
85
|
+
:vat_number=>"6388047V",
|
86
|
+
:name => "GOOGLE IRELAND LIMITED",
|
101
87
|
:company_type=>nil,
|
102
|
-
:address => "
|
88
|
+
:address => "3RD FLOOR, GORDON HOUSE, BARROW STREET, DUBLIN 4",
|
103
89
|
:request_identifier=> request_identifier
|
104
90
|
})
|
105
91
|
else
|
106
|
-
puts "Skipping
|
92
|
+
puts "Skipping IE vies lookup spec"
|
107
93
|
end
|
108
94
|
end
|
109
95
|
end
|
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.7.
|
4
|
+
version: 0.7.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sebastian Munz
|
@@ -12,25 +12,25 @@ cert_chain:
|
|
12
12
|
-----BEGIN CERTIFICATE-----
|
13
13
|
MIIDZDCCAkygAwIBAgIBATANBgkqhkiG9w0BAQUFADA8MRIwEAYDVQQDDAlzZWJh
|
14
14
|
c3RpYW4xEjAQBgoJkiaJk/IsZAEZFgJ5bzESMBAGCgmSJomT8ixkARkWAmxrMB4X
|
15
|
-
|
15
|
+
DTE4MTEyMjEyMjEwMFoXDTE5MTEyMjEyMjEwMFowPDESMBAGA1UEAwwJc2ViYXN0
|
16
16
|
aWFuM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u8LJa7GvkENVbvSyMmUBobmT+cj0PhHyc4XNWd6W86R1YiJTu/upo
|
30
|
+
+geYZL6mqiC8PV6OizVNrC3Y9HZVdmsF/le1wG2TOTPRwJwzazvHtiFR3ZQhWjNP
|
31
|
+
wsi9UxM8N9c=
|
32
32
|
-----END CERTIFICATE-----
|
33
|
-
date: 2018-
|
33
|
+
date: 2018-11-22 00:00:00.000000000 Z
|
34
34
|
dependencies:
|
35
35
|
- !ruby/object:Gem::Dependency
|
36
36
|
name: savon
|
@@ -136,13 +136,16 @@ files:
|
|
136
136
|
- lib/valvat/locales/es.yml
|
137
137
|
- lib/valvat/locales/fi.yml
|
138
138
|
- lib/valvat/locales/fr.yml
|
139
|
+
- lib/valvat/locales/hu.yml
|
139
140
|
- lib/valvat/locales/it.yml
|
140
141
|
- lib/valvat/locales/lv.yml
|
141
142
|
- lib/valvat/locales/nl.yml
|
142
143
|
- lib/valvat/locales/pl.yml
|
143
144
|
- lib/valvat/locales/pt.yml
|
144
145
|
- lib/valvat/locales/ro.yml
|
146
|
+
- lib/valvat/locales/sk.yml
|
145
147
|
- lib/valvat/locales/sv.yml
|
148
|
+
- lib/valvat/locales/tr.yml
|
146
149
|
- lib/valvat/lookup.rb
|
147
150
|
- lib/valvat/lookup/request.rb
|
148
151
|
- lib/valvat/lookup/request_with_id.rb
|
@@ -202,7 +205,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
202
205
|
version: '0'
|
203
206
|
requirements: []
|
204
207
|
rubyforge_project:
|
205
|
-
rubygems_version: 2.6
|
208
|
+
rubygems_version: 2.7.6
|
206
209
|
signing_key:
|
207
210
|
specification_version: 4
|
208
211
|
summary: Validates european vat numbers. Standalone or as a ActiveModel validator.
|
metadata.gz.sig
CHANGED
Binary file
|