postkode 0.4.0 → 0.4.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/postkode.rb +2 -3
  3. metadata +60 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: bca6338640f4dc4a6aedb862d8065b681e2bb6ca
4
- data.tar.gz: 279c9e6c14171ee348bf6fb90abb0523dab4471b
3
+ metadata.gz: 93b72ebbbe466236b348ee9cbc43924983869c88
4
+ data.tar.gz: a5f125d130732ced681c4ee6352b5feebaa1729f
5
5
  SHA512:
6
- metadata.gz: cf27be6284a05bef246e3851f0ab23592cae2082f603949bcfd27292a50753147402ac7e1d6689d25a3f60308a9537fba8ee43650d2d82c738ce879e95f1fd4d
7
- data.tar.gz: 2e9304709f696fc3585ce2dd097d5275ea1d6dac9eeac785b3bb728a65b8242d0ee31222fb5291b6d5d393c25faf51c380d411a55324905ecb46aebbe2a5c190
6
+ metadata.gz: cf44120cd4e28516ed865053d5ca9d35c247f3a202d167c44be3b6564bac42898002ef09ddc526d8fbe046bc8f9eed613e55ce18f7902caa220e0467d53a51a6
7
+ data.tar.gz: 42c70ae86f5f2450c2925258fdff9e190efa3a82fc51398b1d71560c8475962a82a05a36db9d8424e918f06a8c0d6326547f72311384e8ee6c4dbcf5171c90b3
data/lib/postkode.rb CHANGED
@@ -1,4 +1,3 @@
1
- # encoding: utf-8
2
1
  require_relative 'strrand'
3
2
 
4
3
  # Handles validation of UK-style postcodes
@@ -72,12 +71,12 @@ class Postkode
72
71
  end
73
72
 
74
73
  def self.find_in_string(string)
75
- res = string.scan(NORMAL_POSTCODE_PATTERN)
74
+ res = string.upcase.scan(NORMAL_POSTCODE_PATTERN)
76
75
  res.length > 0 ? res : nil
77
76
  end
78
77
 
79
78
  def self.find_partial_in_string(string)
80
- res = string.scan(NORMAL_PART_POSTCODE_PATTERN)
79
+ res = string.upcase.scan(NORMAL_PART_POSTCODE_PATTERN)
81
80
  res.length > 0 ? res : nil
82
81
  end
83
82
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: postkode
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - K M Lawrence
@@ -10,8 +10,64 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2015-03-28 00:00:00.000000000 Z
14
- dependencies: []
13
+ date: 2017-06-20 00:00:00.000000000 Z
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: rspec
17
+ requirement: !ruby/object:Gem::Requirement
18
+ requirements:
19
+ - - "~>"
20
+ - !ruby/object:Gem::Version
21
+ version: '3.0'
22
+ type: :development
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ requirements:
26
+ - - "~>"
27
+ - !ruby/object:Gem::Version
28
+ version: '3.0'
29
+ - !ruby/object:Gem::Dependency
30
+ name: simplecov
31
+ requirement: !ruby/object:Gem::Requirement
32
+ requirements:
33
+ - - ">="
34
+ - !ruby/object:Gem::Version
35
+ version: '0'
36
+ type: :development
37
+ prerelease: false
38
+ version_requirements: !ruby/object:Gem::Requirement
39
+ requirements:
40
+ - - ">="
41
+ - !ruby/object:Gem::Version
42
+ version: '0'
43
+ - !ruby/object:Gem::Dependency
44
+ name: rubycritic
45
+ requirement: !ruby/object:Gem::Requirement
46
+ requirements:
47
+ - - ">="
48
+ - !ruby/object:Gem::Version
49
+ version: '0'
50
+ type: :development
51
+ prerelease: false
52
+ version_requirements: !ruby/object:Gem::Requirement
53
+ requirements:
54
+ - - ">="
55
+ - !ruby/object:Gem::Version
56
+ version: '0'
57
+ - !ruby/object:Gem::Dependency
58
+ name: rspec_junit_formatter
59
+ requirement: !ruby/object:Gem::Requirement
60
+ requirements:
61
+ - - '='
62
+ - !ruby/object:Gem::Version
63
+ version: 0.2.2
64
+ type: :development
65
+ prerelease: false
66
+ version_requirements: !ruby/object:Gem::Requirement
67
+ requirements:
68
+ - - '='
69
+ - !ruby/object:Gem::Version
70
+ version: 0.2.2
15
71
  description: Postcode validation module
16
72
  email: keith.lawrence@upbeatproductions.com
17
73
  executables: []
@@ -40,7 +96,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
40
96
  version: '0'
41
97
  requirements: []
42
98
  rubyforge_project:
43
- rubygems_version: 2.4.5
99
+ rubygems_version: 2.6.8
44
100
  signing_key:
45
101
  specification_version: 4
46
102
  summary: postkode