naturally 2.2.0 → 2.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +1 -1
- data/README.md +5 -2
- data/lib/naturally/version.rb +1 -1
- metadata +6 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 71953ca154c0b7db095ccc5f8f877afed7142eb0bcf59a5118779ba2c8f79aa1
|
4
|
+
data.tar.gz: 302ae86df325c4e526e1b8158dc669c497b27ae9b5ffe60d32bdcb206285eb46
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c7f607e695090c2d12a67b1410960312fbc4d9b7d046f1dea91513653fd00da13e01ebf92c1405efdb498a32029baae4733ddd022cee78becf67db7b4988bedd
|
7
|
+
data.tar.gz: 3110d73168c9797628ad7490e1713785921abbce1651d54e9d8e1e2c6e2c65d9e5cbf77ad1c8b693ac49d2d4a7741ffb1198480f17a1f4b1fa9af2ca264d4c5f
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
[![Gem Version](https://badge.fury.io/rb/naturally.png)](http://badge.fury.io/rb/naturally) [![Build Status](https://travis-ci.org/public-law/naturally.png)](https://travis-ci.org/public-law/naturally)
|
3
3
|
[![Maintainability](https://api.codeclimate.com/v1/badges/0ebf4ef97723f2622105/maintainability)](https://codeclimate.com/github/dogweather/naturally/maintainability)
|
4
4
|
|
5
|
-
Natural (version number) sorting with support for **legal document numbering**, **college course codes**, and **Unicode**.
|
5
|
+
Natural ("version number") sorting with support for **legal document numbering**, **college course codes**, and **Unicode**.
|
6
6
|
See Jeff Atwood's [Sorting for Humans: Natural Sort Order](http://www.codinghorror.com/blog/2007/12/sorting-for-humans-natural-sort-order.html) and the Public.Law post [Counting to 10 in Californian](https://blog.public.law/2012/08/07/counting-from-1-to-10-in-californian/).
|
7
7
|
|
8
8
|
## Installation
|
@@ -16,8 +16,11 @@ $ gem install naturally
|
|
16
16
|
```Ruby
|
17
17
|
require 'naturally'
|
18
18
|
|
19
|
-
# Sort a simple array of strings
|
19
|
+
# Sort a simple array of strings with legal numbering
|
20
20
|
Naturally.sort(["336", "335a", "335", "335.1"]) # => ["335", "335.1", "335a", "336"]
|
21
|
+
|
22
|
+
# Sort version numbers
|
23
|
+
Naturally.sort(["13.10", "13.04", "10.10", "10.04.4"]) # => ["10.04.4", "10.10", "13.04", "13.10"]
|
21
24
|
```
|
22
25
|
|
23
26
|
Usually the library is used to sort an array of objects:
|
data/lib/naturally/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: naturally
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.2.
|
4
|
+
version: 2.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Robb Shecter
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-01-18 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Natural Sorting with support for legal numbering, course numbers, and
|
14
14
|
other number/letter mixes.
|
@@ -33,7 +33,7 @@ homepage: http://github.com/dogweather/naturally
|
|
33
33
|
licenses:
|
34
34
|
- MIT
|
35
35
|
metadata: {}
|
36
|
-
post_install_message:
|
36
|
+
post_install_message:
|
37
37
|
rdoc_options: []
|
38
38
|
require_paths:
|
39
39
|
- lib
|
@@ -48,9 +48,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
48
48
|
- !ruby/object:Gem::Version
|
49
49
|
version: '0'
|
50
50
|
requirements: []
|
51
|
-
|
52
|
-
|
53
|
-
signing_key:
|
51
|
+
rubygems_version: 3.2.5
|
52
|
+
signing_key:
|
54
53
|
specification_version: 4
|
55
54
|
summary: Sorts numbers according to the way people are used to seeing them.
|
56
55
|
test_files:
|