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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: e373ba20e8fed84df96a492189f89b9ada0019f0
4
- data.tar.gz: 53ede53f7b0e013f3453e1874e29435a22397551
2
+ SHA256:
3
+ metadata.gz: d63414ad378d6684f8e7aa678104bc81d0b7fac4bf6f10f0ef389ab2db11df1c
4
+ data.tar.gz: 296440b378bcf019cfdfd0ae90211fdf1965e724c7c386330edc94d0792c0320
5
5
  SHA512:
6
- metadata.gz: 541abfbb3d0138b2bbdb446f49f5bf9ad7d967e10b78d8594405113cf0d1b9144483820b28ba7536b459f9bd62ac53ae59f86c75467ca281349101ad1c3dd012
7
- data.tar.gz: 26a115b8ddb9e833754648b3738f08fdf54cb79482b4f4643033f095d6272687bae5bef01ccdd3c27aa5aff821e3b94c0d7f009abf9579e7b45d64f6f7c8484e
6
+ metadata.gz: b60a9b1fc9fa6a5cfdb64d90baa3d98a2cdfac3c5d0dea38d1d22c00a5607903449a475027653501ba7b1dbbfeb2c0a439208a27325d30c092447086fd4fb92d
7
+ data.tar.gz: da1b4af394110ea8a74c3ed1b2e05c865d8eda06335a0486dfd79a9059c5245975ff23b5f13a240c50c1060a1a5b927d370adb2f7e67184dd869ff649966ff14
Binary file
data.tar.gz.sig CHANGED
@@ -1 +1,3 @@
1
- �ȵ��Z�������9�nu�n֪-ƒ4��At����2��N���i�P��pߌ\W�6�i�+�N��8���H2�SA��Wu�RU9_h�n�)g>��5o�D.#�����e�' �%�`��C6s�܂�&��7�����˄2'�nD"��_8dho��"�cV;r�}^4 �ŏ"J1�K*�{'�̇ʙ��3`P��:o�aܪ#�:4�Z]�H�GWd�O�Y��~/NJ�9ӓRBc�)\y
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�@�
@@ -1,5 +1,6 @@
1
1
  language: ruby
2
2
  rvm:
3
+ - 2.5.1
3
4
  - 2.4.0
4
5
  - 2.3
5
6
  - 2.2
data/CHANGES.md CHANGED
@@ -1,6 +1,12 @@
1
1
  ### dev
2
2
 
3
- [full changelog](http://github.com/yolk/valvat/compare/v0.7.2...master)
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 country specific error messages in English, German, French, Spanish, Italian, Portuguese, Polish, Swedish, Dutch, Danish, Czech, Bulgarian, Romanian, Latvian, Catalan, and Finnish.
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
@@ -1,21 +1,21 @@
1
1
  -----BEGIN CERTIFICATE-----
2
2
  MIIDZDCCAkygAwIBAgIBATANBgkqhkiG9w0BAQUFADA8MRIwEAYDVQQDDAlzZWJh
3
3
  c3RpYW4xEjAQBgoJkiaJk/IsZAEZFgJ5bzESMBAGCgmSJomT8ixkARkWAmxrMB4X
4
- DTE3MDQwNzE1MjU0MVoXDTE4MDQwNzE1MjU0MVowPDESMBAGA1UEAwwJc2ViYXN0
4
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
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
@@ -1,3 +1,3 @@
1
1
  class Valvat
2
- VERSION = "0.7.2"
2
+ VERSION = "0.7.3"
3
3
  end
@@ -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("LU21416127")
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 LU vies lookup spec"
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("LU21416127"))
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 LU vies lookup spec"
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("LU21416128")
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 LU vies lookup spec"
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 ,GORDON HOUSE ,BARROW STREET ,DUBLIN 4"
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("LU21416127", :requester_vat => "IE6388047V")
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=>"LU",
99
- :vat_number=>"21416127",
100
- :name => "EBAY EUROPE S.A R.L.",
84
+ :country_code=>"IE",
85
+ :vat_number=>"6388047V",
86
+ :name => "GOOGLE IRELAND LIMITED",
101
87
  :company_type=>nil,
102
- :address => "22, BOULEVARD ROYAL\nL-2449 LUXEMBOURG",
88
+ :address => "3RD FLOOR, GORDON HOUSE, BARROW STREET, DUBLIN 4",
103
89
  :request_identifier=> request_identifier
104
90
  })
105
91
  else
106
- puts "Skipping LU vies lookup spec"
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.2
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
- DTE3MDQwNzE1MjU0MVoXDTE4MDQwNzE1MjU0MVowPDESMBAGA1UEAwwJc2ViYXN0
15
+ DTE4MTEyMjEyMjEwMFoXDTE5MTEyMjEyMjEwMFowPDESMBAGA1UEAwwJc2ViYXN0
16
16
  aWFuMRIwEAYKCZImiZPyLGQBGRYCeW8xEjAQBgoJkiaJk/IsZAEZFgJsazCCASIw
17
- DQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAN19ZJbT2UwwKRMGCf48+Gzt9e7Z
18
- sArp7mEntubMpHBkXJUzfGGmn8jklUFke/twROq7pYBZjHJCtM/O2vnnmQbSBDQC
19
- FeUj9+1mfatbBj2Kl804kzzif6hFN4CiQlins8cbct9jinZGldb6D4g3ZdFJApHz
20
- veZSuFVdVXBm7cdogfeGP6mj3c6jUmP0frT3oN+rDQBTBFsnuLN5IepNLc4rdWEr
21
- XTPf9rKZcN1oFjkayTuItuJ3VAm7NvMZ5EQjAI2L5EB5H7HD1j3KzkuB3nHvEUvK
22
- fNIZ5ra5JxfkBJNDYVeAPrv64nMZcmboQFr31ny8MACy3uPtSDoqUpF1q6ECAwEA
23
- AaNxMG8wCQYDVR0TBAIwADALBgNVHQ8EBAMCBLAwHQYDVR0OBBYEFJZhKY2tg3YH
24
- 6ijnuqXJUyhLJ3cxMBoGA1UdEQQTMBGBD3NlYmFzdGlhbkB5by5sazAaBgNVHRIE
25
- EzARgQ9zZWJhc3RpYW5AeW8ubGswDQYJKoZIhvcNAQEFBQADggEBAEiRlI+2VUC0
26
- N6mWD1FDKYb+ok2xaTnrn+tFK2JwnKQj88F5gskBb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 mzAu65fwju+rdBVhtGdihBaDyUjovHGFh9xBjG9zJJBWvJX2JLhaCAP8erwQXLaw
29
+ 3zA2biZvwNLu8LJa7GvkENVbvSyMmUBobmT+cj0PhHyc4XNWd6W86R1YiJTu/upo
30
+ +geYZL6mqiC8PV6OizVNrC3Y9HZVdmsF/le1wG2TOTPRwJwzazvHtiFR3ZQhWjNP
31
+ wsi9UxM8N9c=
32
32
  -----END CERTIFICATE-----
33
- date: 2018-02-26 00:00:00.000000000 Z
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.8
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