name-tamer 0.3.0 → 0.4.0

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: cbf8a73410b3e5575cf42adc919e7b42f23b080f
4
- data.tar.gz: c27236356141b3023dc14aa5e590383f0662d8d2
3
+ metadata.gz: d27bffbd8c84ab7c9494017659166c56d1c686b0
4
+ data.tar.gz: 419038fdd3ef60f3b19138ec670cc06176acb737
5
5
  SHA512:
6
- metadata.gz: 117f98cf5609b0811dc806d74383f94787cbd74293e51edbe2f9e78f26a0d877142119a77c93e3ffb4a74afbc04053110e66acf5032e26d4712e7862da72f331
7
- data.tar.gz: da4f7a8598c5b05d60e947f1c94c93c55b838b91a8fc2f00c7e5774d288f613864bd8e440c279eef0ec9e134394e07774f8e9f3407a0d1a33b0a9573bcca32bb
6
+ metadata.gz: f6982d1d027a2774c4fc01f30a14c1b5bdb1f9795cb9a789ed270ab141c7b2c6650f34a62d283d281cd627ef4b6fbb880a2d75045d2ede4c668cc8650d011c45
7
+ data.tar.gz: 0985d15ac64ed550bb4584b588864f216fe89e02b60cec65ff4b6746f8bc9397a01c670e2dc3946642c00a5fd789cf4e8c79b77a19021f267f0c246230793347
data/.gitignore CHANGED
@@ -18,7 +18,8 @@ config/secrets.yml
18
18
  /vendor/bundle
19
19
 
20
20
  # these should all be checked in to normalise the environment:
21
- # Gemfile.lock, .ruby-version, .ruby-gemset
21
+ # .ruby-version, .ruby-gemset
22
+ Gemfile.lock
22
23
 
23
24
  # unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
24
25
  .rvmrc
@@ -1 +1 @@
1
- 2.2.2
1
+ 2.3.0
data/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
  ![Gem Version](http://img.shields.io/gem/v/name-tamer.svg?style=flat)&nbsp;[![Code Climate](http://img.shields.io/codeclimate/github/Xenapto/name-tamer.svg?style=flat)](https://codeclimate.com/github/Xenapto/name-tamer)&nbsp;[![Coverage Status](https://img.shields.io/coveralls/Xenapto/name-tamer.svg?style=flat)](https://coveralls.io/r/Xenapto/name-tamer?branch=master)
4
4
  [![Developer status](http://img.shields.io/badge/developer-awesome-brightgreen.svg?style=flat)](http://xenapto.com)
5
5
  ![build status](https://circleci.com/gh/Xenapto/name-tamer.png?circle-token=2293f2a1d8463a948c2a2ce4bb3bd99786958c59)
6
- [ ![Codeship Status for Xenapto/name-tamer](https://www.codeship.io/projects/e3453410-f32f-0131-b8b8-428432402276/status)](https://www.codeship.io/projects/27835)
6
+ [ ![Codeship Status for Xenapto/name-tamer](https://www.codeship.io/projects/e3453410-f32f-0131-b8b8-428432402276/status)](https://www.codeship.io/projects/27835) [![Join the chat at https://gitter.im/Xenapto/name-tamer](https://badges.gitter.im/Xenapto/name-tamer.svg)](https://gitter.im/Xenapto/name-tamer?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
7
7
 
8
8
  NameTamer: making sense of names
9
9
 
@@ -1,4 +1,5 @@
1
1
  # encoding: utf-8
2
+ require 'cgi'
2
3
  require 'string_extras'
3
4
 
4
5
  # References:
@@ -131,7 +132,7 @@ class NameTamer
131
132
  #--------------------------------------------------------
132
133
 
133
134
  def unescape
134
- @tidy_name.ensure_safe!.safe_unescape!
135
+ @tidy_name.ensure_safe!.safe_unescape!.unescape_html!
135
136
  end
136
137
 
137
138
  def remove_zero_width
@@ -1,3 +1,3 @@
1
1
  class NameTamer
2
- VERSION = '0.3.0'
2
+ VERSION = '0.4.0'
3
3
  end
@@ -38,6 +38,11 @@ class String
38
38
  ensure_safe!
39
39
  end
40
40
 
41
+ # Remove HTML entities
42
+ def unescape_html!
43
+ replace CGI.unescapeHTML self
44
+ end
45
+
41
46
  # Make sure separators are not where they shouldn't be
42
47
  def fix_separators!(separator)
43
48
  return self if separator.nil? || separator.empty?
@@ -17,7 +17,6 @@ Gem::Specification.new do |spec|
17
17
  spec.test_files = spec.files.grep(%r{^(test|spec|features|coverage)\/})
18
18
  spec.require_paths = ['lib']
19
19
 
20
- #- spec.add_development_dependency 'bundler', '~> 1.10'
21
20
  spec.add_development_dependency 'rake', '~> 10'
22
21
  spec.add_development_dependency 'rspec', '~> 3.3'
23
22
  spec.add_development_dependency 'gem-release', '~> 0.7'
@@ -203,7 +203,11 @@ describe NameTamer do
203
203
  nn: 'Janen Moyer-Pesso',
204
204
  sn: 'Janen Moyer-Pesso',
205
205
  s: 'janen-moyer-pesso'
206
- }
206
+ },
207
+ { n: 'Dibble &amp; Grub LLP', t: :organization,
208
+ nn: 'Dibble & Grub',
209
+ sn: 'Dibble and Grub',
210
+ s: 'dibble-and-grub' },
207
211
  ]
208
212
  end
209
213
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: name-tamer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Xenapto
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-06-24 00:00:00.000000000 Z
11
+ date: 2016-03-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -150,7 +150,6 @@ files:
150
150
  - ".ruby-gemset"
151
151
  - ".ruby-version"
152
152
  - Gemfile
153
- - Gemfile.lock
154
153
  - Guardfile
155
154
  - LICENSE
156
155
  - README.md
@@ -184,7 +183,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
184
183
  version: '0'
185
184
  requirements: []
186
185
  rubyforge_project:
187
- rubygems_version: 2.4.8
186
+ rubygems_version: 2.5.1
188
187
  signing_key:
189
188
  specification_version: 4
190
189
  summary: 'Example: NameTamer[''Mr. John Q. Smith III, MD''].simple_name # => John
@@ -192,4 +191,3 @@ summary: 'Example: NameTamer[''Mr. John Q. Smith III, MD''].simple_name # => Joh
192
191
  test_files:
193
192
  - spec/name_tamer_spec.rb
194
193
  - spec/spec_helper.rb
195
- has_rdoc:
@@ -1,130 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- name-tamer (0.3.0)
5
-
6
- GEM
7
- remote: https://rubygems.org/
8
- specs:
9
- ast (2.0.0)
10
- astrolabe (1.3.0)
11
- parser (>= 2.2.0.pre.3, < 3.0)
12
- celluloid (0.16.0)
13
- timers (~> 4.0.0)
14
- coderay (1.1.0)
15
- coveralls (0.8.2)
16
- json (~> 1.8)
17
- rest-client (>= 1.6.8, < 2)
18
- simplecov (~> 0.10.0)
19
- term-ansicolor (~> 1.3)
20
- thor (~> 0.19.1)
21
- diff-lcs (1.2.5)
22
- docile (1.1.5)
23
- domain_name (0.5.24)
24
- unf (>= 0.0.5, < 1.0.0)
25
- ffi (1.9.8)
26
- formatador (0.2.5)
27
- gem-release (0.7.3)
28
- guard (2.12.6)
29
- formatador (>= 0.2.4)
30
- listen (~> 2.7)
31
- lumberjack (~> 1.0)
32
- nenv (~> 0.1)
33
- notiffany (~> 0.0)
34
- pry (>= 0.9.12)
35
- shellany (~> 0.0)
36
- thor (>= 0.18.1)
37
- guard-compat (1.2.1)
38
- guard-rspec (4.5.2)
39
- guard (~> 2.1)
40
- guard-compat (~> 1.1)
41
- rspec (>= 2.99.0, < 4.0)
42
- guard-rubocop (1.2.0)
43
- guard (~> 2.0)
44
- rubocop (~> 0.20)
45
- hitimes (1.2.2)
46
- http-cookie (1.0.2)
47
- domain_name (~> 0.5)
48
- json (1.8.3)
49
- listen (2.10.1)
50
- celluloid (~> 0.16.0)
51
- rb-fsevent (>= 0.9.3)
52
- rb-inotify (>= 0.9)
53
- lumberjack (1.0.9)
54
- method_source (0.8.2)
55
- mime-types (2.6.1)
56
- nenv (0.2.0)
57
- netrc (0.10.3)
58
- notiffany (0.0.6)
59
- nenv (~> 0.1)
60
- shellany (~> 0.0)
61
- parser (2.2.2.5)
62
- ast (>= 1.1, < 3.0)
63
- powerpack (0.1.1)
64
- pry (0.10.1)
65
- coderay (~> 1.1.0)
66
- method_source (~> 0.8.1)
67
- slop (~> 3.4)
68
- rainbow (2.0.0)
69
- rake (10.4.2)
70
- rb-fsevent (0.9.5)
71
- rb-inotify (0.9.5)
72
- ffi (>= 0.5.0)
73
- rest-client (1.8.0)
74
- http-cookie (>= 1.0.2, < 2.0)
75
- mime-types (>= 1.16, < 3.0)
76
- netrc (~> 0.7)
77
- rspec (3.3.0)
78
- rspec-core (~> 3.3.0)
79
- rspec-expectations (~> 3.3.0)
80
- rspec-mocks (~> 3.3.0)
81
- rspec-core (3.3.1)
82
- rspec-support (~> 3.3.0)
83
- rspec-expectations (3.3.0)
84
- diff-lcs (>= 1.2.0, < 2.0)
85
- rspec-support (~> 3.3.0)
86
- rspec-mocks (3.3.1)
87
- diff-lcs (>= 1.2.0, < 2.0)
88
- rspec-support (~> 3.3.0)
89
- rspec-support (3.3.0)
90
- rubocop (0.32.1)
91
- astrolabe (~> 1.3)
92
- parser (>= 2.2.2.5, < 3.0)
93
- powerpack (~> 0.1)
94
- rainbow (>= 1.99.1, < 3.0)
95
- ruby-progressbar (~> 1.4)
96
- ruby-progressbar (1.7.5)
97
- shellany (0.0.1)
98
- simplecov (0.10.0)
99
- docile (~> 1.1.0)
100
- json (~> 1.8)
101
- simplecov-html (~> 0.10.0)
102
- simplecov-html (0.10.0)
103
- slop (3.6.0)
104
- term-ansicolor (1.3.2)
105
- tins (~> 1.0)
106
- thor (0.19.1)
107
- timers (4.0.1)
108
- hitimes
109
- tins (1.5.4)
110
- unf (0.1.4)
111
- unf_ext
112
- unf_ext (0.0.7.1)
113
-
114
- PLATFORMS
115
- ruby
116
-
117
- DEPENDENCIES
118
- coveralls (~> 0.8)
119
- gem-release (~> 0.7)
120
- guard (~> 2.12)
121
- guard-rspec (~> 4.5)
122
- guard-rubocop (~> 1.2)
123
- name-tamer!
124
- rake (~> 10)
125
- rspec (~> 3.3)
126
- rubocop (~> 0.32)
127
- simplecov (~> 0.10)
128
-
129
- BUNDLED WITH
130
- 1.10.4