fat_core 0.1.13 → 0.1.14

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
  SHA1:
3
- metadata.gz: a8e08e0c1225985c5745b361c5d4610b227fdec3
4
- data.tar.gz: 00e25d12b59957fd9324cbfb68d73a2ddb890bdf
3
+ metadata.gz: 743fbec5e5360c89047ded7e33b30772b0029d5d
4
+ data.tar.gz: afa6788b68f43119c4bf5f90b580bc9e9c997968
5
5
  SHA512:
6
- metadata.gz: 35b470d0c1eda2d523b81448284578a9497a9fbfc354f52d99fb54046dfea3abbf8e777f5e9d1858c2df41c4a1a9cb41a8b31f60c8f3a74c006a61208e4a1bd9
7
- data.tar.gz: 1755e9ee66a5f791be2cd17b93d74e00e3441d3dc0082f2fb40291454580ca2ec774a5ade9b44712c86bf1f1b59fe2c9d76428ff4debc86a73567dd66a5830d6
6
+ metadata.gz: a56a07d6f10c84655fa00684ea1f9fa769e9bc2d75b1b09c072550d9ca5b664885a1f62a67622aa4df093c68f00c46d34f2a8089ed277bc2fa9a26039b64c722
7
+ data.tar.gz: d20b8c5c3abf1884e3689f15bcbf214440a994207d85d38f1d59774e97651f5fa09a90d92302264be95b8eee34c2a5c53e1db0612de5f5edae5e35ddbe12a4cf
@@ -140,8 +140,11 @@ class String
140
140
  # Other runs starting with numbers,
141
141
  # like 3-A
142
142
  newwords.push(w.upcase)
143
- elsif w =~ %r[^[^aeiouy]*$]i
144
- # All consonants, probably abbr
143
+ elsif w =~ %r[^(N|S|E|W|NE|NW|SE|SW)$]i
144
+ # Compass directions all caps
145
+ newwords.push(w.upcase)
146
+ elsif w =~ %r[^[^aeiouy]*$]i && w.size > 2
147
+ # All consonants and at least 3 chars, probably abbr
145
148
  newwords.push(w.upcase)
146
149
  elsif w =~ %r[^(\w+)-(\w+)$]i
147
150
  # Hypenated double word
@@ -1,7 +1,7 @@
1
1
  module FatCore
2
2
  MAJOR = 0
3
3
  MINOR = 1
4
- PATCH = 13
4
+ PATCH = 14
5
5
 
6
6
  VERSION = [MAJOR, MINOR, PATCH].compact.join('.')
7
7
  end
@@ -176,6 +176,9 @@ the people, for the people, shall not perish from the earth."
176
176
  expect("the cat in the hat".entitle).to eq('The Cat in the Hat')
177
177
  expect("dr".entitle).to eq('Dr')
178
178
  expect("cr".entitle).to eq('Cr')
179
+ # Capitalize all consonants size if >= 3
180
+ expect("tr".entitle).to eq('Tr')
181
+ expect("trd".entitle).to eq('TRD')
179
182
  # Don't capitalize c/o
180
183
  expect("IBM c/o watson".entitle).to eq('Ibm c/o Watson')
181
184
  # Capitlaize p.o.
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fat_core
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.13
4
+ version: 0.1.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel E. Doherty
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-11-29 00:00:00.000000000 Z
11
+ date: 2014-11-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: simplecov