valvat 0.3.5 → 0.3.6
Sign up to get free protection for your applications and to get access to all the features.
- data/.rvmrc +1 -1
- data/CHANGES.md +7 -1
- data/lib/valvat/syntax.rb +1 -1
- data/lib/valvat/version.rb +1 -1
- data/spec/valvat/syntax_spec.rb +1 -0
- metadata +76 -117
data/.rvmrc
CHANGED
@@ -1 +1 @@
|
|
1
|
-
rvm use ruby-1.9.
|
1
|
+
rvm use ruby-1.9.3@valvat --create
|
data/CHANGES.md
CHANGED
@@ -1,6 +1,12 @@
|
|
1
1
|
### dev
|
2
2
|
|
3
|
-
[full changelog](http://github.com/yolk/valvat/compare/v0.3.
|
3
|
+
[full changelog](http://github.com/yolk/valvat/compare/v0.3.6...master)
|
4
|
+
|
5
|
+
### 0.3.6 / 2012-04-10
|
6
|
+
|
7
|
+
[full changelog](http://github.com/yolk/valvat/compare/v0.3,5...v0.3.6)
|
8
|
+
|
9
|
+
* Fixed wrong regexp for Belgium numbers (by [opsidao](https://github.com/opsidao))
|
4
10
|
|
5
11
|
### 0.3.5 / 2012-02-02
|
6
12
|
|
data/lib/valvat/syntax.rb
CHANGED
@@ -5,7 +5,7 @@ class Valvat
|
|
5
5
|
|
6
6
|
VAT_PATTERNS = {
|
7
7
|
'AT' => /\AATU[0-9]{8}\Z/, # Austria
|
8
|
-
'BE' => /\
|
8
|
+
'BE' => /\ABE0[0-9]{9}\Z/, # Belgium
|
9
9
|
'BG' => /\ABG[0-9]{9,10}\Z/, # Bulgaria
|
10
10
|
'CY' => /\ACY[0-9]{8}[A-Z]\Z/, # Cyprus
|
11
11
|
'CZ' => /\ACZ[0-9]{8,10}\Z/, # Czech Republic
|
data/lib/valvat/version.rb
CHANGED
data/spec/valvat/syntax_spec.rb
CHANGED
@@ -24,6 +24,7 @@ describe Valvat::Syntax do
|
|
24
24
|
Valvat::Syntax.validate("BE081733199").should eql(false)
|
25
25
|
Valvat::Syntax.validate("BE08173319944").should eql(false)
|
26
26
|
Valvat::Syntax.validate("BE081733199H").should eql(false)
|
27
|
+
Valvat::Syntax.validate("BE1817331999").should eql(false)
|
27
28
|
end
|
28
29
|
|
29
30
|
it "validates a BG vat number" do
|
metadata
CHANGED
@@ -1,136 +1,103 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: valvat
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
|
6
|
-
- 0
|
7
|
-
- 3
|
8
|
-
- 5
|
9
|
-
version: 0.3.5
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.3.6
|
5
|
+
prerelease:
|
10
6
|
platform: ruby
|
11
|
-
authors:
|
7
|
+
authors:
|
12
8
|
- Sebastian Munz
|
13
9
|
autorequire:
|
14
10
|
bindir: bin
|
15
11
|
cert_chain: []
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
dependencies:
|
20
|
-
- !ruby/object:Gem::Dependency
|
12
|
+
date: 2012-04-10 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
21
15
|
name: savon
|
22
|
-
|
23
|
-
requirement: &id001 !ruby/object:Gem::Requirement
|
16
|
+
requirement: &2151816700 !ruby/object:Gem::Requirement
|
24
17
|
none: false
|
25
|
-
requirements:
|
26
|
-
- -
|
27
|
-
- !ruby/object:Gem::Version
|
28
|
-
segments:
|
29
|
-
- 0
|
30
|
-
- 8
|
31
|
-
- 2
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
32
21
|
version: 0.8.2
|
33
22
|
type: :runtime
|
34
|
-
version_requirements: *id001
|
35
|
-
- !ruby/object:Gem::Dependency
|
36
|
-
name: rspec
|
37
23
|
prerelease: false
|
38
|
-
|
24
|
+
version_requirements: *2151816700
|
25
|
+
- !ruby/object:Gem::Dependency
|
26
|
+
name: rspec
|
27
|
+
requirement: &2151816160 !ruby/object:Gem::Requirement
|
39
28
|
none: false
|
40
|
-
requirements:
|
41
|
-
- -
|
42
|
-
- !ruby/object:Gem::Version
|
43
|
-
segments:
|
44
|
-
- 2
|
45
|
-
- 4
|
46
|
-
- 0
|
29
|
+
requirements:
|
30
|
+
- - ! '>='
|
31
|
+
- !ruby/object:Gem::Version
|
47
32
|
version: 2.4.0
|
48
33
|
type: :development
|
49
|
-
version_requirements: *id002
|
50
|
-
- !ruby/object:Gem::Dependency
|
51
|
-
name: guard-rspec
|
52
34
|
prerelease: false
|
53
|
-
|
35
|
+
version_requirements: *2151816160
|
36
|
+
- !ruby/object:Gem::Dependency
|
37
|
+
name: guard-rspec
|
38
|
+
requirement: &2151815160 !ruby/object:Gem::Requirement
|
54
39
|
none: false
|
55
|
-
requirements:
|
56
|
-
- -
|
57
|
-
- !ruby/object:Gem::Version
|
58
|
-
segments:
|
59
|
-
- 0
|
60
|
-
- 1
|
61
|
-
- 9
|
40
|
+
requirements:
|
41
|
+
- - ! '>='
|
42
|
+
- !ruby/object:Gem::Version
|
62
43
|
version: 0.1.9
|
63
44
|
type: :development
|
64
|
-
version_requirements: *id003
|
65
|
-
- !ruby/object:Gem::Dependency
|
66
|
-
name: growl
|
67
45
|
prerelease: false
|
68
|
-
|
46
|
+
version_requirements: *2151815160
|
47
|
+
- !ruby/object:Gem::Dependency
|
48
|
+
name: growl
|
49
|
+
requirement: &2151814240 !ruby/object:Gem::Requirement
|
69
50
|
none: false
|
70
|
-
requirements:
|
71
|
-
- -
|
72
|
-
- !ruby/object:Gem::Version
|
73
|
-
segments:
|
74
|
-
- 1
|
75
|
-
- 0
|
76
|
-
- 3
|
51
|
+
requirements:
|
52
|
+
- - ! '>='
|
53
|
+
- !ruby/object:Gem::Version
|
77
54
|
version: 1.0.3
|
78
55
|
type: :development
|
79
|
-
version_requirements: *id004
|
80
|
-
- !ruby/object:Gem::Dependency
|
81
|
-
name: rb-fsevent
|
82
56
|
prerelease: false
|
83
|
-
|
57
|
+
version_requirements: *2151814240
|
58
|
+
- !ruby/object:Gem::Dependency
|
59
|
+
name: rb-fsevent
|
60
|
+
requirement: &2151813380 !ruby/object:Gem::Requirement
|
84
61
|
none: false
|
85
|
-
requirements:
|
86
|
-
- -
|
87
|
-
- !ruby/object:Gem::Version
|
88
|
-
segments:
|
89
|
-
- 0
|
90
|
-
- 3
|
91
|
-
- 9
|
62
|
+
requirements:
|
63
|
+
- - ! '>='
|
64
|
+
- !ruby/object:Gem::Version
|
92
65
|
version: 0.3.9
|
93
66
|
type: :development
|
94
|
-
version_requirements: *id005
|
95
|
-
- !ruby/object:Gem::Dependency
|
96
|
-
name: activemodel
|
97
67
|
prerelease: false
|
98
|
-
|
68
|
+
version_requirements: *2151813380
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: activemodel
|
71
|
+
requirement: &2151827280 !ruby/object:Gem::Requirement
|
99
72
|
none: false
|
100
|
-
requirements:
|
101
|
-
- -
|
102
|
-
- !ruby/object:Gem::Version
|
103
|
-
|
104
|
-
- 3
|
105
|
-
- 0
|
106
|
-
version: "3.0"
|
73
|
+
requirements:
|
74
|
+
- - ! '>='
|
75
|
+
- !ruby/object:Gem::Version
|
76
|
+
version: '3.0'
|
107
77
|
type: :development
|
108
|
-
version_requirements: *id006
|
109
|
-
- !ruby/object:Gem::Dependency
|
110
|
-
name: fakeweb
|
111
78
|
prerelease: false
|
112
|
-
|
79
|
+
version_requirements: *2151827280
|
80
|
+
- !ruby/object:Gem::Dependency
|
81
|
+
name: fakeweb
|
82
|
+
requirement: &2151826400 !ruby/object:Gem::Requirement
|
113
83
|
none: false
|
114
|
-
requirements:
|
115
|
-
- -
|
116
|
-
- !ruby/object:Gem::Version
|
117
|
-
segments:
|
118
|
-
- 1
|
119
|
-
- 3
|
120
|
-
- 0
|
84
|
+
requirements:
|
85
|
+
- - ! '>='
|
86
|
+
- !ruby/object:Gem::Version
|
121
87
|
version: 1.3.0
|
122
88
|
type: :development
|
123
|
-
|
124
|
-
|
125
|
-
|
89
|
+
prerelease: false
|
90
|
+
version_requirements: *2151826400
|
91
|
+
description: ! " Validates european vat numbers. Standalone or as a ActiveModel validator.\n\n
|
92
|
+
\ * Simple syntax verification\n * Lookup via the VIES web service\n * Works standalone
|
93
|
+
without any gem dependencies\n * (Optional) ActiveModel/Rails3 integration\n *
|
94
|
+
I18n locales for country specific error messages\n"
|
95
|
+
email:
|
126
96
|
- sebastian@yo.lk
|
127
97
|
executables: []
|
128
|
-
|
129
98
|
extensions: []
|
130
|
-
|
131
99
|
extra_rdoc_files: []
|
132
|
-
|
133
|
-
files:
|
100
|
+
files:
|
134
101
|
- .gitignore
|
135
102
|
- .rvmrc
|
136
103
|
- CHANGES.md
|
@@ -155,39 +122,31 @@ files:
|
|
155
122
|
- spec/valvat/utils_spec.rb
|
156
123
|
- spec/valvat_spec.rb
|
157
124
|
- valvat.gemspec
|
158
|
-
has_rdoc: true
|
159
125
|
homepage: https://github.com/yolk/valvat
|
160
126
|
licenses: []
|
161
|
-
|
162
127
|
post_install_message:
|
163
128
|
rdoc_options: []
|
164
|
-
|
165
|
-
require_paths:
|
129
|
+
require_paths:
|
166
130
|
- lib
|
167
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
131
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
168
132
|
none: false
|
169
|
-
requirements:
|
170
|
-
- -
|
171
|
-
- !ruby/object:Gem::Version
|
172
|
-
|
173
|
-
|
174
|
-
version: "0"
|
175
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
133
|
+
requirements:
|
134
|
+
- - ! '>='
|
135
|
+
- !ruby/object:Gem::Version
|
136
|
+
version: '0'
|
137
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
176
138
|
none: false
|
177
|
-
requirements:
|
178
|
-
- -
|
179
|
-
- !ruby/object:Gem::Version
|
180
|
-
|
181
|
-
- 0
|
182
|
-
version: "0"
|
139
|
+
requirements:
|
140
|
+
- - ! '>='
|
141
|
+
- !ruby/object:Gem::Version
|
142
|
+
version: '0'
|
183
143
|
requirements: []
|
184
|
-
|
185
144
|
rubyforge_project:
|
186
|
-
rubygems_version: 1.
|
145
|
+
rubygems_version: 1.8.10
|
187
146
|
signing_key:
|
188
147
|
specification_version: 3
|
189
148
|
summary: Validates european vat numbers. Standalone or as a ActiveModel validator.
|
190
|
-
test_files:
|
149
|
+
test_files:
|
191
150
|
- spec/spec_helper.rb
|
192
151
|
- spec/valvat/active_model_spec.rb
|
193
152
|
- spec/valvat/lookup_spec.rb
|