bank_account_number_validator 0.0.1 → 0.0.2

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: d423c20cc8cb6ea3f77ddaa1b47517e87f53e981
4
- data.tar.gz: 5b66bc28a530257085e38c67c282dd7d817f29c1
3
+ metadata.gz: 23279b52e4ec9c0af8727a4f360d033dfef2cd57
4
+ data.tar.gz: 0e3f5dae5a24ec443271fae6a3a42a49705fcf47
5
5
  SHA512:
6
- metadata.gz: 9391e7b05d276f634ef2e635b08a033ffdb6f7b5ce67d9728d3460371abb8980819ddce58aafde5bc7b7a01cbb6ab0f11f1d7cc374bd6b745250588a438d1734
7
- data.tar.gz: e203d7d23ac89956c252354c3d006787c6dc93b268620bf6808de1a2a3461f9d89aff27a58a821bccc52029e33306f8eb9778a4d67177aaf01774699c826e3e6
6
+ metadata.gz: 532fbdd8f1f471ed89eaa9cc5a5cf82256738a5cc957686d2d9962cfb1a9d5427335a0e3bbd766ac68973f64192a4bb0894c8c2a1b349f56f397f47de3985546
7
+ data.tar.gz: ed0ff7f92d1a935ea6701d6b8c24d88ab94c794bcc65b6785f679a1ae6f987d754fbbc20b2fc4b4fb3993099ed30f7ed5a29314e1cfd8ff222738e33b90638df
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |gem|
6
6
  gem.name = "bank_account_number_validator"
7
- gem.version = '0.0.1'
7
+ gem.version = '0.0.2'
8
8
  gem.authors = ["jacoobb"]
9
9
  gem.email = ["mikrut.jakub@gmail.com"]
10
10
  gem.summary = %q{Bank account number validator}
@@ -1,2 +1,17 @@
1
1
  #!/usr/bin/env ruby
2
- require 'bank_account_number_validator'
2
+ require 'bank_account_number_validator'
3
+
4
+ class DummyClass
5
+ include ActiveModel::Validations
6
+
7
+ attr_reader :number
8
+
9
+ validates :number, bank_account_number: true
10
+
11
+ def initialize number: nil
12
+ @number = number
13
+ end
14
+ end
15
+
16
+ c = DummyClass.new number: '12'
17
+ p c.valid?
@@ -6,4 +6,6 @@ class BankAccountNumberValidator < ActiveModel::EachValidator
6
6
  record.errors[attribute] << (options[:message] || "wrong format")
7
7
  end
8
8
  end
9
- end
9
+ end
10
+
11
+ require 'bank_account_number_validator/validator'
@@ -21,4 +21,6 @@ class BankAccountNumberValidator::Validator
21
21
  BankAccountNumberValidator::Validator::Pl.new value: value
22
22
  end
23
23
  end
24
- end
24
+ end
25
+
26
+ require 'bank_account_number_validator/validator/pl'
data/spec/spec_helper.rb CHANGED
@@ -3,4 +3,4 @@ require 'active_model'
3
3
 
4
4
  require_relative '../lib/bank_account_number_validator'
5
5
  require_relative '../lib/bank_account_number_validator/validator'
6
- require_relative '../lib/bank_account_number_validator/validator/pl.rb'
6
+ require_relative '../lib/bank_account_number_validator/validator/pl'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bank_account_number_validator
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - jacoobb
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-05-05 00:00:00.000000000 Z
11
+ date: 2015-05-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activemodel
@@ -72,7 +72,6 @@ files:
72
72
  - lib/bank_account_number_validator.rb
73
73
  - lib/bank_account_number_validator/validator.rb
74
74
  - lib/bank_account_number_validator/validator/pl.rb
75
- - lib/bank_account_number_validator/version.rb
76
75
  - spec/fixtures/bank_account_number_validator/dummy_class.rb
77
76
  - spec/lib/bank_account_number_validator/validator/pl_spec.rb
78
77
  - spec/lib/bank_account_number_validator/validator_spec.rb
@@ -1,3 +0,0 @@
1
- module BankAccountNumberValidator
2
- VERSION = "0.0.1"
3
- end