cellularity 0.0.2 → 0.0.2.1

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: 75aaa9b6f4b60b625705c946904ec9f81b26aee0
4
- data.tar.gz: 13b1a0d00cb90e1cc61074ea0fecdc3c7a7f8f9c
3
+ metadata.gz: a45b9bf4d0c6797332b1bc9dc9c980fd9511690b
4
+ data.tar.gz: d2fa86c953129642a4c3f040b7ece7452b875413
5
5
  SHA512:
6
- metadata.gz: 68972f790a34a1bb2106654305340cf5f542b8a2adcfa3e30a23eb6d68f3a91ee6e59d93a567f89fc1f22e80ab8ad8c5186c5d23e2ada8e319ff2ca6b3fbac7d
7
- data.tar.gz: 94a7ad6aa69851a36b7b3414c86fb55c9e28b5184c7b4da895aabe994ee49f1390b8999a61b493d7ed05cc3be728095d3a3457b85b476b040fdcad72a39f84aa
6
+ metadata.gz: f78fbb49d80750af0eb5120945f9b2f6d4571e71bcf8ad72cf3f5162e187d12b67f02212f9664e58739305f3f1997b55fbd56b5c3b1a88b6772019963778c9a8
7
+ data.tar.gz: 4022296557b2ad970e6795980d1ca73c70843a1ffae344a861250c05a2a7255754dccf70e1b8beed9cfd73f8bb557f2c66574f87fd6c01c1bfba25f6b2963f53
@@ -15,7 +15,8 @@ module Cellularity
15
15
  end
16
16
 
17
17
  def is_valid_decimal?
18
- !!Integer(self.esn)
18
+ # Remove leading zeros so Integer doesn't think it's an octal.
19
+ !!Integer(self.esn.gsub(/^0+/, ''))
19
20
  rescue ArgumentError, TypeError
20
21
  false
21
22
  end
@@ -1,3 +1,3 @@
1
1
  module Cellularity
2
- VERSION = "0.0.2"
3
- end
2
+ VERSION = "0.0.2.1"
3
+ end
@@ -3,7 +3,7 @@ require 'spec_helper'
3
3
  describe Cellularity::Esn do
4
4
 
5
5
  let(:invalid_esn) { ['blah', 12345, :abcdfeghj, '0x123456'] }
6
- let(:valid_esn) { [12345678909, '0xabc12345', 'abc12345'] }
6
+ let(:valid_esn) { [12345678909, '0xabc12345', 'abc12345', '01234567890'] }
7
7
 
8
8
  it 'should think that valid esns are, in fact, valid' do
9
9
  valid_esn.each { |esn| Cellularity::Esn.new(esn).valid?.should be_true }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cellularity
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - johnotander
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-06-13 00:00:00.000000000 Z
11
+ date: 2013-06-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec