naturalsorter 3.0.12 → 3.0.13

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: b2dfabc180135b204d332e4ba86d5b0d958a701b
4
- data.tar.gz: 4bdc68dab8743afda6368ae4b5ba6d397112a646
3
+ metadata.gz: 15cab37f9f3a0893043acaa9a9eda71e647895b8
4
+ data.tar.gz: 4f18b69b08800dfc853dfb7957a9cf9634c05831
5
5
  SHA512:
6
- metadata.gz: c378640fab039c1d2109f8935e53a2a039369ec2ddd640063de24d4bd27ab80bcdc775e81cb9860dae5cfa0f5f76aed5500e2e50b43a35e3ba509f52c7315cfd
7
- data.tar.gz: 518a7cc52e061986970797ce99a66b2bf036048f7d458936e01b8248d7d988b7dbd7c3e4f78ee519610eb0bded365b143432a09a8dd2899f3f4557bcbd2e385e
6
+ metadata.gz: 5d41201fb10c574f33d537c17863512f98722fc559d77dc077d2cc36c82190a35f038187f4a2e32d45a15de38eaaf53bfdfa982d71876e0a258018f1ef06e517
7
+ data.tar.gz: 9d76fa451ff3a21597bedd0c435b11ece6626c41d7bc19d68220024377ac0ac7cc1898a16b6c6750839ba7e5ad117d205307217d0de6d18d4bf26994e76794c3
data/README.markdown CHANGED
@@ -27,7 +27,7 @@ Because the default sort method does not recognize the numbers in the string. Th
27
27
 
28
28
  You should add this line to your Gemfile
29
29
 
30
- `gem 'naturalsorter', '3.0.12'`
30
+ `gem 'naturalsorter', '3.0.13'`
31
31
 
32
32
  and run this command in your app root directory
33
33
 
@@ -1,3 +1,3 @@
1
1
  module Naturalsorter
2
- VERSION = "3.0.12"
2
+ VERSION = "3.0.13"
3
3
  end
data/lib/versioncmp.rb CHANGED
@@ -71,6 +71,9 @@ class Versioncmp
71
71
  part1 = Versioncmp.get_a_piece_of_the_cake offsets[0], ab[0]
72
72
  part2 = Versioncmp.get_a_piece_of_the_cake offsets[0], ab[1]
73
73
 
74
+ part1 = '' if part1.nil?
75
+ part2 = '' if part2.nil?
76
+
74
77
  return -1 if Versioncmp.timestamp?(part1) && part2.length() < 8
75
78
  return 1 if Versioncmp.timestamp?(part2) && part1.length() < 8
76
79
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: naturalsorter
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.12
4
+ version: 3.0.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - reiz
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2016-02-03 00:00:00.000000000 Z
12
+ date: 2016-02-04 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec