law_string 1.2.0 → 1.2.3

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: 3ea200f0e77915f4e4ac7e20013731cb64224c017c48b73ca6287943d2b5d372
4
- data.tar.gz: f46191e76441e1d05b4643f026395151c7d39b42243c5f125c1d25f5d313837d
3
+ metadata.gz: ce2fa623d1bc3ad730ffc6be0d773db7217ed0a062eefec97a4ba1473b6fc7e3
4
+ data.tar.gz: 0232445e2d84685ec0b738af425220b9bb259f2c3c83ae12f4801d5f9fb327e2
5
5
  SHA512:
6
- metadata.gz: 1b5e6944a4cb85927bee3d9cc772ea3a541123b48fa3fec0f097ccdcc480810c2561949d8a5ae74612d8bea05de2c71093be892179974556e1eaa709d34adeb9
7
- data.tar.gz: 4ef6701fe230b1ef645204b0788f9cf5c3ee6c9270d8ffa0c3e950fd47485214bc4399f8a54aaf40e452a7f793c4522aa7e2a22b22ece31d7eca05daf7871211
6
+ metadata.gz: 4e19883a936c6192ab1302a56e593883232a49806bf8486c906684852f9f6a8ad4018f3146652c700b2214bfd51c9904efb9d28cf4b5e4c524dc3ba7a7d51818
7
+ data.tar.gz: 40bd2cb853167794e47fdd6012dfd18607b9a278b5bfc9a9fd7559d55af8e08cc38d89b8f4d31cc94dbb4c0ccaff24e6748311e80b020ce8a6a311b607194641
@@ -0,0 +1,34 @@
1
+ # This workflow uses actions that are not certified by GitHub.
2
+ # They are provided by a third-party and are governed by
3
+ # separate terms of service, privacy policy, and support
4
+ # documentation.
5
+ # This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake
6
+ # For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby
7
+
8
+ name: Ruby
9
+
10
+ on:
11
+ push:
12
+ branches: [ master ]
13
+ pull_request:
14
+ branches: [ master ]
15
+
16
+ jobs:
17
+ test:
18
+
19
+ runs-on: ubuntu-latest
20
+ strategy:
21
+ matrix:
22
+ ruby-version: ['2.7', '3.0', '3.1']
23
+
24
+ steps:
25
+ - uses: actions/checkout@v2
26
+ - name: Set up Ruby
27
+ # To automatically get bug fixes and new Ruby versions for ruby/setup-ruby,
28
+ # change this to (see https://github.com/ruby/setup-ruby#versioning):
29
+ uses: ruby/setup-ruby@v1
30
+ with:
31
+ ruby-version: ${{ matrix.ruby-version }}
32
+ bundler-cache: true # runs 'bundle install' and caches installed gems automatically
33
+ - name: Run tests
34
+ run: bundle exec rake
data/Gemfile.lock CHANGED
@@ -1,42 +1,42 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- law_string (1.2.0)
4
+ law_string (1.2.3)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
8
8
  specs:
9
- diff-lcs (1.3)
10
- docile (1.3.1)
11
- json (2.1.0)
12
- rake (10.5.0)
13
- rspec (3.8.0)
14
- rspec-core (~> 3.8.0)
15
- rspec-expectations (~> 3.8.0)
16
- rspec-mocks (~> 3.8.0)
17
- rspec-core (3.8.0)
18
- rspec-support (~> 3.8.0)
19
- rspec-expectations (3.8.1)
9
+ diff-lcs (1.5.0)
10
+ docile (1.4.0)
11
+ rake (13.0.6)
12
+ rspec (3.12.0)
13
+ rspec-core (~> 3.12.0)
14
+ rspec-expectations (~> 3.12.0)
15
+ rspec-mocks (~> 3.12.0)
16
+ rspec-core (3.12.2)
17
+ rspec-support (~> 3.12.0)
18
+ rspec-expectations (3.12.3)
20
19
  diff-lcs (>= 1.2.0, < 2.0)
21
- rspec-support (~> 3.8.0)
22
- rspec-mocks (3.8.0)
20
+ rspec-support (~> 3.12.0)
21
+ rspec-mocks (3.12.5)
23
22
  diff-lcs (>= 1.2.0, < 2.0)
24
- rspec-support (~> 3.8.0)
25
- rspec-support (3.8.0)
26
- simplecov (0.16.1)
23
+ rspec-support (~> 3.12.0)
24
+ rspec-support (3.12.1)
25
+ simplecov (0.22.0)
27
26
  docile (~> 1.1)
28
- json (>= 1.8, < 3)
29
- simplecov-html (~> 0.10.0)
30
- simplecov-html (0.10.2)
27
+ simplecov-html (~> 0.11)
28
+ simplecov_json_formatter (~> 0.1)
29
+ simplecov-html (0.12.3)
30
+ simplecov_json_formatter (0.1.4)
31
31
 
32
32
  PLATFORMS
33
33
  ruby
34
34
 
35
35
  DEPENDENCIES
36
36
  law_string!
37
- rake (~> 10.0)
38
- rspec (~> 3.0)
37
+ rake
38
+ rspec
39
39
  simplecov
40
40
 
41
41
  BUNDLED WITH
42
- 2.1.4
42
+ 2.4.15
data/README.md CHANGED
@@ -1,6 +1,5 @@
1
- # LawString
2
-
3
- [![Build Status](https://travis-ci.org/public-law/law_string.svg?branch=master)](https://travis-ci.org/public-law/law_string)
1
+ LawString
2
+ =========
4
3
 
5
4
  A few string util functions which support the [Public.Law](https://www.public.law) apps. Optimized for reduced object instantiation
6
5
  at the expense of readability.
@@ -25,7 +24,8 @@ Or install it yourself as:
25
24
 
26
25
  Provides;
27
26
 
28
- * `#add_typograpy` e.g., changing ASCII quotes to true double quotes
27
+ * `#add_typograpy` e.g., changing ASCII quotes to true UTF-8 double quotes.
28
+ * `#add_html_typograhy` improvements which require HTML.
29
29
  * `#initialism?` to detect, e.g., "ATM". Very rudimentary.
30
30
  * `#initials?` to detect, e.g., "A.S.C.A.P."
31
31
  * `#titleize` enhanced for English-language legal texts, coded to reduce memory allocations.
data/law_string.gemspec CHANGED
@@ -5,7 +5,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
5
5
 
6
6
  Gem::Specification.new do |spec|
7
7
  spec.name = 'law_string'
8
- spec.version = '1.2.0'
8
+ spec.version = '1.2.3'
9
9
  spec.authors = ['Robb Shecter']
10
10
  spec.email = ['robb@public.law']
11
11
 
@@ -21,7 +21,7 @@ Gem::Specification.new do |spec|
21
21
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
22
22
  spec.require_paths = ['lib']
23
23
 
24
- spec.add_development_dependency 'rake', '~> 10.0'
25
- spec.add_development_dependency 'rspec', '~> 3.0'
24
+ spec.add_development_dependency 'rake'
25
+ spec.add_development_dependency 'rspec'
26
26
  spec.add_development_dependency 'simplecov'
27
27
  end
data/lib/law_string.rb CHANGED
@@ -6,8 +6,40 @@ require 'set'
6
6
  # Specialized #titleize and #add_typography methods.
7
7
  class String
8
8
  # For AP Style Titles
9
- NOT_CAPITALIZED = Set.new %w[a an and at but by for in nor of on or out so the to up yet].freeze
10
- INITIALISMS = Set.new %w[atm].freeze
9
+ # A decent article: https://prowritingaid.com/list-of-words-not-capitalized-in-titles
10
+ NOT_CAPITALIZED = Set.new %w[
11
+ a
12
+ an
13
+ and
14
+ as
15
+ at
16
+ but
17
+ by
18
+ down
19
+ for
20
+ from
21
+ if
22
+ in
23
+ into
24
+ near
25
+ nor
26
+ of
27
+ on
28
+ onto
29
+ or
30
+ over
31
+ out
32
+ so
33
+ than
34
+ that
35
+ the
36
+ to
37
+ up
38
+ with
39
+ yet
40
+ ].freeze
41
+
42
+ INITIALISMS = Set.new %w[atm usa].freeze
11
43
 
12
44
  INITIALS_REGEX = /^([a-zA-Z]\.)+$/.freeze
13
45
  WHITESPACES_REGEX = /[[:space:]]/.freeze
metadata CHANGED
@@ -1,43 +1,43 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: law_string
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Robb Shecter
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-06-11 00:00:00.000000000 Z
11
+ date: 2023-07-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '10.0'
19
+ version: '0'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - "~>"
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: '10.0'
26
+ version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rspec
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "~>"
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: '3.0'
33
+ version: '0'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - "~>"
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
- version: '3.0'
40
+ version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: simplecov
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -60,9 +60,9 @@ executables: []
60
60
  extensions: []
61
61
  extra_rdoc_files: []
62
62
  files:
63
+ - ".github/workflows/ruby.yml"
63
64
  - ".gitignore"
64
65
  - ".rspec"
65
- - ".travis.yml"
66
66
  - Gemfile
67
67
  - Gemfile.lock
68
68
  - LICENSE.txt
@@ -91,7 +91,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
91
91
  - !ruby/object:Gem::Version
92
92
  version: '0'
93
93
  requirements: []
94
- rubygems_version: 3.1.4
94
+ rubygems_version: 3.4.15
95
95
  signing_key:
96
96
  specification_version: 4
97
97
  summary: 'String Utils including a specialized #titleize.'
data/.travis.yml DELETED
@@ -1,5 +0,0 @@
1
- sudo: false
2
- language: ruby
3
- rvm:
4
- - 2.5.1
5
- before_install: gem install bundler -v 1.16.1