naturally 2.2.0 → 2.2.2

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f7b3bdea2bec4624b2f0725d0e52e05d93cf0638fe8ddc42e8dd8c7b20696920
4
- data.tar.gz: ddc8c8f12e62e604deb0d8345df5f29464051ca859834747d2a6db1d8f51c263
3
+ metadata.gz: d6b9503d643f2bc2e137219f9572cff2e930a5565c55155d4204e2a77023f1b1
4
+ data.tar.gz: 8ba1b7379a6a5b13dc4487d8c2946e46484cc46853acf792ae0502e2debba830
5
5
  SHA512:
6
- metadata.gz: 602b9798ae11958dd850f1f992a7217cf4b981ccdb7446899b410154c5e9d009318cbf8106232e4dc83c3ba7d06b37df148f3c96770f0165d259d92032e9872f
7
- data.tar.gz: ee6d95f697088d3a6196f64b863dbac96cb2cfc5bf83357af029ed6aa00d0c49cd24345356d12c616ef2780d30785d2bd40a60c42c4321e07047f990094c9b60
6
+ metadata.gz: e7a58a43c54c821703e9eedc9455a37433d7c80cca3ccb1eeaafed11f43e5095a48e11cebb0d421d1bf36116f73a336b3ad78b5ce904895becb739e36d8655a4
7
+ data.tar.gz: a78a9c67ed7267bdb77eb2f7cb5fd5de79b22fe8297aaf634b2f30370ad00c401f22ea7ee4cc5949f3439995ea57aed86f69badfe7400731c78da27110005349
data/.travis.yml CHANGED
@@ -2,3 +2,5 @@ language: ruby
2
2
  rvm:
3
3
  - 2.4
4
4
  - 2.5
5
+ - 2.6
6
+ - 2.7
data/Gemfile CHANGED
@@ -2,7 +2,7 @@ source 'https://rubygems.org'
2
2
 
3
3
  group :test do
4
4
  gem 'rspec', '~> 3'
5
- gem 'rake', '~> 10'
5
+ gem 'rake', '>= 12.3.3'
6
6
  end
7
7
 
8
8
  # Specify your gem's dependencies in naturally.gemspec
data/README.md CHANGED
@@ -1,9 +1,13 @@
1
1
  # Naturally
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
- [![Maintainability](https://api.codeclimate.com/v1/badges/0ebf4ef97723f2622105/maintainability)](https://codeclimate.com/github/dogweather/naturally/maintainability)
2
+ [![Gem Version](https://badge.fury.io/rb/naturally.svg)](https://badge.fury.io/rb/naturally)
4
3
 
5
- Natural (version number) sorting with support for **legal document numbering**, **college course codes**, and **Unicode**.
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/).
4
+ Natural ("version number") sorting with support for:
5
+
6
+ * **legal document numbering**,
7
+ * **college course codes**, and
8
+ * **Unicode**.
9
+
10
+ See Jeff Atwood's [Sorting for Humans: Natural Sort Order](https://blog.codinghorror.com/sorting-for-humans-natural-sort-order/) and my post [Counting to 10 in Californian](https://blog.public.law/2012/08/07/counting-from-1-to-10-in-californian/).
7
11
 
8
12
  ## Installation
9
13
 
@@ -16,8 +20,11 @@ $ gem install naturally
16
20
  ```Ruby
17
21
  require 'naturally'
18
22
 
19
- # Sort a simple array of strings
23
+ # Sort a simple array of strings with legal numbering
20
24
  Naturally.sort(["336", "335a", "335", "335.1"]) # => ["335", "335.1", "335a", "336"]
25
+
26
+ # Sort version numbers
27
+ Naturally.sort(["13.10", "13.04", "10.10", "10.04.4"]) # => ["10.04.4", "10.10", "13.04", "13.10"]
21
28
  ```
22
29
 
23
30
  Usually the library is used to sort an array of objects:
@@ -38,7 +45,7 @@ releases = [
38
45
  ]
39
46
 
40
47
  # Sort by version number
41
- sorted = Naturally.sort releases, by: :version
48
+ sorted = Naturally.sort(releases, by: :version)
42
49
 
43
50
  # Check what we have
44
51
  expect(sorted.map(&:name)).to eq [
@@ -51,7 +58,7 @@ expect(sorted.map(&:name)).to eq [
51
58
  ]
52
59
  ```
53
60
 
54
- [More examples are in the specs](https://github.com/dogweather/naturally/blob/master/spec/naturally_spec.rb).
61
+ [More examples are in the specs](https://github.com/public-law/naturally/blob/master/spec/naturally_spec.rb).
55
62
 
56
63
 
57
64
  ## Implementation Notes
@@ -1,4 +1,4 @@
1
1
  module Naturally
2
2
  # Gem version
3
- VERSION = '2.2.0'
3
+ VERSION = '2.2.2'
4
4
  end
data/naturally.gemspec CHANGED
@@ -10,7 +10,7 @@ Gem::Specification.new do |gem|
10
10
  gem.email = ["robb@public.law"]
11
11
  gem.summary = %q{Sorts numbers according to the way people are used to seeing them.}
12
12
  gem.description = %q{Natural Sorting with support for legal numbering, course numbers, and other number/letter mixes.}
13
- gem.homepage = "http://github.com/dogweather/naturally"
13
+ gem.homepage = "http://github.com/public-law/naturally"
14
14
  gem.required_ruby_version = '>= 2.0'
15
15
 
16
16
  gem.files = `git ls-files`.split($/)
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: naturally
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.0
4
+ version: 2.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Robb Shecter
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2018-06-03 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies: []
13
12
  description: Natural Sorting with support for legal numbering, course numbers, and
14
13
  other number/letter mixes.
@@ -29,11 +28,10 @@ files:
29
28
  - lib/naturally/version.rb
30
29
  - naturally.gemspec
31
30
  - spec/naturally_spec.rb
32
- homepage: http://github.com/dogweather/naturally
31
+ homepage: http://github.com/public-law/naturally
33
32
  licenses:
34
33
  - MIT
35
34
  metadata: {}
36
- post_install_message:
37
35
  rdoc_options: []
38
36
  require_paths:
39
37
  - lib
@@ -48,9 +46,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
48
46
  - !ruby/object:Gem::Version
49
47
  version: '0'
50
48
  requirements: []
51
- rubyforge_project:
52
- rubygems_version: 2.7.4
53
- signing_key:
49
+ rubygems_version: 3.6.9
54
50
  specification_version: 4
55
51
  summary: Sorts numbers according to the way people are used to seeing them.
56
52
  test_files: