bic_validation 0.3.0 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 41030cdd80127e17ea3b852f00e3868d1961c123
4
+ data.tar.gz: ae8ad538cf76e0c2787efd30387d2c8109b57c13
5
+ SHA512:
6
+ metadata.gz: 9f61dd3004c2b425736ad8070073a7667dca8c43992b9ec86dc915e1c53721bcce9e516ea4ab47f1e75276440224ea2e9d5dc2efae27fe5ea76934fb5010c91a
7
+ data.tar.gz: 17263e94ef4c3ed3c04487aadda8606838f0ef3dbebdfa722a8c7ad7be3c2ebf929aa5186a80b4974b6f1e69277f6ab07d76491199cd5ec8bb9907c536e5a17a
data/.travis.yml CHANGED
@@ -1,9 +1,8 @@
1
1
  language: ruby
2
2
  rvm:
3
- - 1.9.3
4
3
  - 2.0.0
4
+ - 2.1.0
5
5
  - ruby-head
6
- - jruby-19mode
7
6
  - jruby-head
8
- - rbx-2.1.1
7
+ - rbx-2.6
9
8
  script: rspec
data/CHANGELOG.md ADDED
@@ -0,0 +1,8 @@
1
+ # Changelog
2
+
3
+ ## 0.3.1 (2015-12-21)
4
+
5
+ Bugfixes:
6
+
7
+ - fix wrong validation rule, concerning Romanian users in particular
8
+ (#6, @svoop)
@@ -24,6 +24,7 @@ Gem::Specification.new do |gem|
24
24
  gem.add_dependency 'activesupport'
25
25
  gem.add_dependency 'banking_data'
26
26
  gem.add_development_dependency 'rspec'
27
+ gem.add_development_dependency 'rspec-its'
27
28
  gem.add_development_dependency 'coveralls'
28
29
  gem.add_development_dependency 'pry'
29
30
  gem.add_development_dependency 'rubocop'
@@ -20,9 +20,9 @@ module BicValidation
20
20
  country_codes.include? country
21
21
  end
22
22
 
23
- def has_valid_branch_code?
23
+ def has_valid_location_code?
24
24
  # WTF? http://de.wikipedia.org/wiki/ISO_9362
25
- country[0] =~ /[^01]/ && country[1] =~ /[^O]/
25
+ location[0] =~ /[^01]/ && location[1] =~ /[^O]/
26
26
  end
27
27
 
28
28
  def known?
@@ -34,7 +34,7 @@ module BicValidation
34
34
  of_valid_length? &&
35
35
  of_valid_format? &&
36
36
  has_valid_country_code? &&
37
- has_valid_branch_code?
37
+ has_valid_location_code?
38
38
  end
39
39
 
40
40
  def invalid?
@@ -1,3 +1,3 @@
1
1
  module BicValidation
2
- VERSION = '0.3.0'
2
+ VERSION = '0.3.1'
3
3
  end
@@ -80,7 +80,7 @@ module BicValidation
80
80
  end
81
81
 
82
82
  ['DEUTDEBB', 'CRESCHZZ10S', 'UBSWCHZH86N', 'OEKOATWWXXX',
83
- 'OEKOATWW'].each do |swift|
83
+ 'OEKOATWW', 'BTRLRO22'].each do |swift|
84
84
  describe 'validity checks' do
85
85
  it "validates #{swift}" do
86
86
  bic = Bic.new(swift)
data/spec/spec_helper.rb CHANGED
@@ -1,6 +1,7 @@
1
1
  require 'simplecov'
2
2
  require 'coveralls'
3
3
  require 'pry'
4
+ require 'rspec/its'
4
5
 
5
6
  SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
6
7
  SimpleCov::Formatter::HTMLFormatter,
metadata CHANGED
@@ -1,140 +1,141 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bic_validation
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
5
- prerelease:
4
+ version: 0.3.1
6
5
  platform: ruby
7
6
  authors:
8
7
  - Frank C. Eckert
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-11-01 00:00:00.000000000 Z
11
+ date: 2015-12-21 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: activemodel
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
- - - ! '>='
17
+ - - ">="
20
18
  - !ruby/object:Gem::Version
21
19
  version: '0'
22
20
  type: :runtime
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
- - - ! '>='
24
+ - - ">="
28
25
  - !ruby/object:Gem::Version
29
26
  version: '0'
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: activesupport
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
- - - ! '>='
31
+ - - ">="
36
32
  - !ruby/object:Gem::Version
37
33
  version: '0'
38
34
  type: :runtime
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
- - - ! '>='
38
+ - - ">="
44
39
  - !ruby/object:Gem::Version
45
40
  version: '0'
46
41
  - !ruby/object:Gem::Dependency
47
42
  name: banking_data
48
43
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
44
  requirements:
51
- - - ! '>='
45
+ - - ">="
52
46
  - !ruby/object:Gem::Version
53
47
  version: '0'
54
48
  type: :runtime
55
49
  prerelease: false
56
50
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
51
  requirements:
59
- - - ! '>='
52
+ - - ">="
60
53
  - !ruby/object:Gem::Version
61
54
  version: '0'
62
55
  - !ruby/object:Gem::Dependency
63
56
  name: rspec
64
57
  requirement: !ruby/object:Gem::Requirement
65
- none: false
66
58
  requirements:
67
- - - ! '>='
59
+ - - ">="
68
60
  - !ruby/object:Gem::Version
69
61
  version: '0'
70
62
  type: :development
71
63
  prerelease: false
72
64
  version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
65
  requirements:
75
- - - ! '>='
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: rspec-its
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
76
81
  - !ruby/object:Gem::Version
77
82
  version: '0'
78
83
  - !ruby/object:Gem::Dependency
79
84
  name: coveralls
80
85
  requirement: !ruby/object:Gem::Requirement
81
- none: false
82
86
  requirements:
83
- - - ! '>='
87
+ - - ">="
84
88
  - !ruby/object:Gem::Version
85
89
  version: '0'
86
90
  type: :development
87
91
  prerelease: false
88
92
  version_requirements: !ruby/object:Gem::Requirement
89
- none: false
90
93
  requirements:
91
- - - ! '>='
94
+ - - ">="
92
95
  - !ruby/object:Gem::Version
93
96
  version: '0'
94
97
  - !ruby/object:Gem::Dependency
95
98
  name: pry
96
99
  requirement: !ruby/object:Gem::Requirement
97
- none: false
98
100
  requirements:
99
- - - ! '>='
101
+ - - ">="
100
102
  - !ruby/object:Gem::Version
101
103
  version: '0'
102
104
  type: :development
103
105
  prerelease: false
104
106
  version_requirements: !ruby/object:Gem::Requirement
105
- none: false
106
107
  requirements:
107
- - - ! '>='
108
+ - - ">="
108
109
  - !ruby/object:Gem::Version
109
110
  version: '0'
110
111
  - !ruby/object:Gem::Dependency
111
112
  name: rubocop
112
113
  requirement: !ruby/object:Gem::Requirement
113
- none: false
114
114
  requirements:
115
- - - ! '>='
115
+ - - ">="
116
116
  - !ruby/object:Gem::Version
117
117
  version: '0'
118
118
  type: :development
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
- none: false
122
121
  requirements:
123
- - - ! '>='
122
+ - - ">="
124
123
  - !ruby/object:Gem::Version
125
124
  version: '0'
126
- description: ! " BicValidation provides a simple ActiveModel::EachValidator for\n
127
- \ formally validating Business Identifier Codes (BIC) aka SWIFT-codes.\n"
125
+ description: |2
126
+ BicValidation provides a simple ActiveModel::EachValidator for
127
+ formally validating Business Identifier Codes (BIC) aka SWIFT-codes.
128
128
  email:
129
129
  - frank.eckert@boost-project.com
130
130
  executables: []
131
131
  extensions: []
132
132
  extra_rdoc_files: []
133
133
  files:
134
- - .gitignore
135
- - .rspec
136
- - .rubocop.yml
137
- - .travis.yml
134
+ - ".gitignore"
135
+ - ".rspec"
136
+ - ".rubocop.yml"
137
+ - ".travis.yml"
138
+ - CHANGELOG.md
138
139
  - Gemfile
139
140
  - LICENSE.txt
140
141
  - README.md
@@ -152,30 +153,28 @@ files:
152
153
  - spec/spec_helper.rb
153
154
  homepage: https://github.com/opahk/bic_validation
154
155
  licenses: []
156
+ metadata: {}
155
157
  post_install_message:
156
158
  rdoc_options: []
157
159
  require_paths:
158
160
  - lib
159
161
  required_ruby_version: !ruby/object:Gem::Requirement
160
- none: false
161
162
  requirements:
162
- - - ! '>='
163
+ - - ">="
163
164
  - !ruby/object:Gem::Version
164
165
  version: '0'
165
166
  required_rubygems_version: !ruby/object:Gem::Requirement
166
- none: false
167
167
  requirements:
168
- - - ! '>='
168
+ - - ">="
169
169
  - !ruby/object:Gem::Version
170
170
  version: '0'
171
171
  requirements: []
172
172
  rubyforge_project:
173
- rubygems_version: 1.8.25
173
+ rubygems_version: 2.2.2
174
174
  signing_key:
175
- specification_version: 3
175
+ specification_version: 4
176
176
  summary: ActiveModel BIC validator
177
177
  test_files:
178
178
  - spec/bic_validation/bic_spec.rb
179
179
  - spec/bic_validation/bic_validator_spec.rb
180
180
  - spec/spec_helper.rb
181
- has_rdoc: