spanish_vat_validators 0.0.3 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: eafe9c193f0f9418573d3d98721df8cfefc7d1da
4
+ data.tar.gz: 73ec9f093dcd280568c6b6ede5aef010d6b33e02
5
+ SHA512:
6
+ metadata.gz: b02db6c952ef6f7b957505ed4f48fb11f3712536dcb28b17a33843cac959965999b322bbff887c7bcb14d1fded9ea5f70af0f23bada192caefbf0652141a3f46
7
+ data.tar.gz: 1b88266efc93563c4ff86947bcccf41dbdce16ac196bf22c7a74c715a41743775363e579b8aa768a042e8023739ab9b96be4ca27086cb380e0ed63c82c1094a3
data/README.md CHANGED
@@ -8,6 +8,7 @@ Also added I18n support for error messages, which you can change by adding this
8
8
  errors:
9
9
  messages:
10
10
  not_valid_spanish_vat: El número de identificación fiscal no es válido
11
+ not_valid_spanish_id: El NIF/NIE no es válido
11
12
  not_valid_nif: El NIF no es válido
12
13
  not_valid_cif: El CIF no es válido
13
14
  not_valid_nie: El NIE no es válido
@@ -1,3 +1,3 @@
1
1
  module SpanishVatValidators
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
@@ -75,7 +75,7 @@ module ActiveModel::Validations
75
75
  class ValidSpanishIdValidator < ActiveModel::EachValidator
76
76
  include SpanishVatValidatorsHelpers
77
77
  def validate_each(record, attribute, value)
78
- record.errors[attribute] = message unless validate_nif(value) or validate_nie(value)
78
+ record.errors[attribute] = message('spanish_id') unless validate_nif(value) or validate_nie(value)
79
79
  end
80
80
  end
81
81
 
@@ -103,4 +103,4 @@ module ActiveModel::Validations
103
103
  end
104
104
  end
105
105
 
106
- end
106
+ end
metadata CHANGED
@@ -1,15 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spanish_vat_validators
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
5
- prerelease:
4
+ version: 0.0.4
6
5
  platform: ruby
7
6
  authors:
8
7
  - Javier Toledo
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-04-17 00:00:00.000000000 Z
11
+ date: 2014-09-21 00:00:00.000000000 Z
13
12
  dependencies: []
14
13
  description: Provides validators for spanish VAT numbers (NIF, CIF and NIE)
15
14
  email:
@@ -18,7 +17,7 @@ executables: []
18
17
  extensions: []
19
18
  extra_rdoc_files: []
20
19
  files:
21
- - .gitignore
20
+ - ".gitignore"
22
21
  - Gemfile
23
22
  - LICENSE
24
23
  - README.md
@@ -29,27 +28,26 @@ files:
29
28
  - spanish_vat_validators.gemspec
30
29
  homepage: https://github.com/agilemonkeys/spanish_vat_validators
31
30
  licenses: []
31
+ metadata: {}
32
32
  post_install_message:
33
33
  rdoc_options: []
34
34
  require_paths:
35
35
  - lib
36
36
  required_ruby_version: !ruby/object:Gem::Requirement
37
- none: false
38
37
  requirements:
39
- - - ! '>='
38
+ - - ">="
40
39
  - !ruby/object:Gem::Version
41
40
  version: '0'
42
41
  required_rubygems_version: !ruby/object:Gem::Requirement
43
- none: false
44
42
  requirements:
45
- - - ! '>='
43
+ - - ">="
46
44
  - !ruby/object:Gem::Version
47
45
  version: '0'
48
46
  requirements: []
49
47
  rubyforge_project:
50
- rubygems_version: 1.8.24
48
+ rubygems_version: 2.2.2
51
49
  signing_key:
52
- specification_version: 3
50
+ specification_version: 4
53
51
  summary: Provides Rails3 compatible validators for spanish VAT numbers (NIF, CIF and
54
52
  NIE), with support for I18n
55
53
  test_files: []