indefinite_article 0.2.4 → 0.2.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/indefinite_article.gemspec +1 -0
- data/lib/indefinite_article/version.rb +1 -1
- data/lib/indefinite_article.rb +2 -2
- data/test/test_indefinite_article.rb +1 -3
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 1f5faf302e7c83820b0e3b7ac410c53c1630659e92cecd3940db64fe1eb3a96e
|
4
|
+
data.tar.gz: d16f0405b26aabc3050dca91ea8b2007da8c7d13e8dd259dd51226191c95bc98
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 80fa09844e8d2f243b673f8f700ecc14138d568bc2e5c0016d1ae5266e7f0a7327804889c9787b57acb2125145d4bd1d906d502fc12ac913e605c80cb5e4f8d3
|
7
|
+
data.tar.gz: e91d67fc16f4f75db4403322e672238d262750b3839744f64bf3763f7e02deec46df320d8a7d8c42f8ffb8e300959b9a69958353e1b4ecd9b0fb026290a2e372
|
data/indefinite_article.gemspec
CHANGED
@@ -5,6 +5,7 @@ require "indefinite_article/version"
|
|
5
5
|
Gem::Specification.new do |s|
|
6
6
|
s.name = "indefinite_article"
|
7
7
|
s.version = IndefiniteArticle::VERSION
|
8
|
+
s.licenses = ['MIT']
|
8
9
|
s.authors = ["Andrew Rossmeissl", 'Shane Brinkman-Davis']
|
9
10
|
s.email = ["andy@rossmeissl.net"]
|
10
11
|
s.homepage = "http://github.com/rossmeissl/indefinite_article"
|
data/lib/indefinite_article.rb
CHANGED
@@ -3,10 +3,10 @@ require 'active_support/core_ext/string'
|
|
3
3
|
|
4
4
|
module IndefiniteArticle
|
5
5
|
|
6
|
-
A_REQUIRING_PATTERNS = /^(([bcdgjkpqtuvwyz]|onc?e|onearmed|onetime|ouija
|
6
|
+
A_REQUIRING_PATTERNS = /^(([bcdgjkpqtuvwyz]|onc?e|onearmed|onetime|ouija)$|e[uw]|uk|ubi|ubo|oaxaca|ufo|ur[aeiou]|use|ut([^t])|unani|uni(l[^l]|[a-ko-z]))/i
|
7
7
|
AN_REQUIRING_PATTERNS = /^([aefhilmnorsx]$|hono|honest|hour|heir|[aeiou]|8|11)/i
|
8
8
|
UPCASE_A_REQUIRING_PATTERNS = /^(UN$)/
|
9
|
-
UPCASE_AN_REQUIRING_PATTERNS =
|
9
|
+
UPCASE_AN_REQUIRING_PATTERNS = /^(NDA)$/ #need if we decide to support acronyms like "XL" (extra-large)
|
10
10
|
|
11
11
|
def indefinite_article
|
12
12
|
first_word = to_s.split(/[- ]/).first
|
@@ -17,6 +17,7 @@ class TestIndefiniteArticle < Minitest::Test
|
|
17
17
|
hour
|
18
18
|
honest
|
19
19
|
heir
|
20
|
+
NDA
|
20
21
|
utter
|
21
22
|
urgent
|
22
23
|
a e f h i l m n o r s x
|
@@ -28,9 +29,6 @@ class TestIndefiniteArticle < Minitest::Test
|
|
28
29
|
UN
|
29
30
|
uk
|
30
31
|
oaxaca
|
31
|
-
oaxacan
|
32
|
-
oaxacania
|
33
|
-
oaxacanthaxia
|
34
32
|
ufo
|
35
33
|
unanimous
|
36
34
|
one
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: indefinite_article
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Rossmeissl
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2022-04-18 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activesupport
|
@@ -79,7 +79,8 @@ files:
|
|
79
79
|
- lib/indefinite_article/version.rb
|
80
80
|
- test/test_indefinite_article.rb
|
81
81
|
homepage: http://github.com/rossmeissl/indefinite_article
|
82
|
-
licenses:
|
82
|
+
licenses:
|
83
|
+
- MIT
|
83
84
|
metadata: {}
|
84
85
|
post_install_message:
|
85
86
|
rdoc_options: []
|
@@ -96,8 +97,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
96
97
|
- !ruby/object:Gem::Version
|
97
98
|
version: '0'
|
98
99
|
requirements: []
|
99
|
-
|
100
|
-
rubygems_version: 2.2.2
|
100
|
+
rubygems_version: 3.1.2
|
101
101
|
signing_key:
|
102
102
|
specification_version: 4
|
103
103
|
summary: Adds indefinite article methods to String and Symbol
|