credit_card_support 2.0.2 → 2.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.
data/README.md CHANGED
@@ -8,6 +8,22 @@ Intro
8
8
  * At the moment knows AMEX, DinersClub, Discover, Enroute, Maestro, MasterCard, JCB, Solo, VISA (if you need more, create an issue and request for it :)
9
9
 
10
10
 
11
+ Installation
12
+ ------------
13
+
14
+ Into your Gemfile add:
15
+
16
+ ```ruby
17
+ gem 'credit_card_support'
18
+ ```
19
+
20
+ Or in shell:
21
+
22
+ ```bash
23
+ gem install credit_card_support
24
+ ```
25
+
26
+
11
27
  Basic usage
12
28
  -----------
13
29
 
@@ -7,7 +7,7 @@ module ActiveModel
7
7
  def validate_each(record, attribute, value)
8
8
  @record = record
9
9
  @attribute = attribute
10
- @value = value
10
+ @value = "#{value}"
11
11
 
12
12
  @value.extend(CreditCardSupport::CreditCardNumber)
13
13
 
@@ -1,8 +1,8 @@
1
1
  module CreditCardSupport
2
2
  module Version
3
3
  MAJOR = 2
4
- MINOR = 0
5
- PATCH = 2
4
+ MINOR = 1
5
+ PATCH = 0
6
6
 
7
7
  STRING = [MAJOR, MINOR, PATCH].compact.join('.')
8
8
  end
@@ -48,7 +48,7 @@ end
48
48
 
49
49
 
50
50
  describe ActiveModel::Validations::CreditCardNumberValidator do
51
- subject { CreditCardTest.new(number: '4012888888881881') }
51
+ subject { CreditCardTest.new(number: '4012888888881881'.freeze) }
52
52
 
53
53
  it "is valid" do
54
54
  subject.should be_valid
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: credit_card_support
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.2
4
+ version: 2.1.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-09-26 00:00:00.000000000 Z
12
+ date: 2013-08-07 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: Detects issuer from a number, has ActiveModel validations and translations
15
15
  support.