validates_russian 0.0.9 → 0.1.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 895f186530e57b3009037436810f6f832baeb63c
4
- data.tar.gz: 3828f4bae242c267b5ccf8a0ef6e0538afd267c4
3
+ metadata.gz: de37de7e412401b4d9c142e22ea9ae420ccca77b
4
+ data.tar.gz: 6748e144d35c50d42fe20705ff7fe829d2c0249c
5
5
  SHA512:
6
- metadata.gz: aae5bd3478e863d862037eca35fcb3311d76772a4db021b804f03a1fdd116d44cad5b978bae26d673d3f5dd9807219e6af612a127db9b10947e3bb8a097b0671
7
- data.tar.gz: bc282cb216daba3c485c3fdd41e476a4ff352fe8774e23c44f8c3cdc522ce725a7a9612b3744e5069fe110c7b0ce2e4682ab35812bdca2d0321e571e840cc7bd
6
+ metadata.gz: 7ed5b062e211951c80192e8fad2aa3cb9192e5bad1cc65117a1b8bc90dbddadcfe105c65ff7f6fd9bf41ea5680d269bbbb16190de085f07e215182516b022b61
7
+ data.tar.gz: e1cff7a6f374ad2c6f67c14440a67803c63dd08b39b6a7c507736f084e8a62f8b9a726ad8e3f5d8720c8c7fa79554cec46f564a3a446be0e124914cc0c42b9f8
data/CHANGELOG.md CHANGED
@@ -1,7 +1,11 @@
1
+ ### 0.0.9
2
+
3
+ * Fixed OkpoValidator
4
+
1
5
  ### 0.0.8
2
6
 
3
7
  * Validate the Crimea region numbers
4
- * Speeding up a validators
8
+ * Speeding up validators
5
9
 
6
10
  ### 0.0.7
7
11
 
@@ -1,3 +1,3 @@
1
1
  module ValidatesRussian
2
- VERSION = '0.0.9'
2
+ VERSION = '0.1.0'
3
3
  end
@@ -1,6 +1,7 @@
1
1
  class BikFormatValidator < ValidatesRussian::Validator
2
2
  validates_using do |bik|
3
3
  next false unless bik =~ /^\d+$/
4
+ next false unless bik.length == 9
4
5
  next false unless bik[0..1] == '04'
5
6
  next false unless ValidatesRussian::OKATO_REGION_NUMBERS.include?(bik[2..3])
6
7
  end
@@ -25,6 +25,7 @@ describe BikFormatValidator do
25
25
 
26
26
  it 'should not be valid for invalid values' do
27
27
  invalid_biks = %w(
28
+ 04452595
28
29
  040205770
29
30
  549205770
30
31
  #ffff
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: validates_russian
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.9
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alex Antonov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-10-27 00:00:00.000000000 Z
11
+ date: 2015-11-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activemodel
@@ -133,7 +133,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
133
133
  version: '0'
134
134
  requirements: []
135
135
  rubyforge_project:
136
- rubygems_version: 2.4.8
136
+ rubygems_version: 2.4.6
137
137
  signing_key:
138
138
  specification_version: 4
139
139
  summary: validates specific russian values