ama_validators 0.0.10 → 0.0.11

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 570dc6f79ec53b7d9248f197e7450e6ed7e09933
4
- data.tar.gz: 4cdd03c9082bc952a0659c7e3dc8b1aefb6c96d1
3
+ metadata.gz: a026248ccb4a71bc69715c6b753a07b11985d312
4
+ data.tar.gz: 932897f6b2e9d95eb48e09470f2ad93d5e9e36a9
5
5
  SHA512:
6
- metadata.gz: 2392bef81b470fa6bb6eb90c8b47a51b5b2009ff7d5488fdc7b8b892c442fc5a8ce30a71caa59b2d5d7aefe2d655081103c9076977893292d482271eaf20c00d
7
- data.tar.gz: e6a50b53b03d3e726077db4f14e4a086c40379d5bb3be5defbe6554af02558a955dc520e18692eb97b57515f819dda78595b384d249bd76702bd8652167e07fc
6
+ metadata.gz: 4266690a6061879729cdf5c1fad7e95d03160dc10e5455ab8524f190a20841f05277739db614e3eb9cb3d9c5574a7ff67e3f18f9380e4f7dadabdab4202554d2
7
+ data.tar.gz: 31afdd523cb66ce072c6d60a2e18f1d95890d855f49e754e1aab710ef1d0f1a19357c676159cb6feec7b28fb9d6c7b4cfa4c45673f5f8698a3c467a4b0d775ac
@@ -1,7 +1,7 @@
1
1
  class MembershipNumberFormatValidator < ActiveModel::EachValidator
2
2
  def validate_each(object, attribute, value)
3
3
  unless value =~ /\A(620272)(\d){10}\z/
4
- object.errors[attribute] << (options[:message] || "must be a valid membership number")
4
+ object.errors[attribute] << (options[:message] || "must be a valid 16-digit membership number")
5
5
  end
6
6
  end
7
7
  end
@@ -1,3 +1,3 @@
1
1
  module AmaValidators
2
- VERSION = "0.0.10"
2
+ VERSION = "0.0.11"
3
3
  end
@@ -17,7 +17,7 @@ describe MembershipNumberFormatValidator do
17
17
  it 'it returns error message expecified on the validator' do
18
18
  n = subject.new( { attributes: attribute } )
19
19
  invalid_membership_numbers.each do |invalid_membership_number|
20
- expect(n.validate_each(object, attribute, invalid_membership_number)).to include('must be a valid membership number')
20
+ expect(n.validate_each(object, attribute, invalid_membership_number)).to include('must be a valid 16-digit membership number')
21
21
  end
22
22
  end
23
23
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ama_validators
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.10
4
+ version: 0.0.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael van den Beuken
@@ -13,7 +13,7 @@ authors:
13
13
  autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
- date: 2015-12-07 00:00:00.000000000 Z
16
+ date: 2016-05-09 00:00:00.000000000 Z
17
17
  dependencies:
18
18
  - !ruby/object:Gem::Dependency
19
19
  name: bundler
@@ -173,7 +173,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
173
173
  version: '0'
174
174
  requirements: []
175
175
  rubyforge_project:
176
- rubygems_version: 2.4.5
176
+ rubygems_version: 2.2.0
177
177
  signing_key:
178
178
  specification_version: 4
179
179
  summary: This gem will compile the following validators - Credit card - Email - Membership