name_tamer 0.6.1 → 1.0.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.
@@ -0,0 +1,148 @@
1
+ # frozen_string_literal: true
2
+
3
+ # When strings are mistakenly encoded as single-byte character sets, instead
4
+ # of UTF-8, there are some distinctive character combinations that we can spot
5
+ # and fix
6
+ # Useful table here http://www.i18nqa.com/debug/utf8-debug.html
7
+ module NameTamer
8
+ module Strings
9
+ extend self
10
+
11
+ # Strings that were wrongly encoded with single-byte encodings sometimes
12
+ # have tell-tale substrings that we can put back into the correct UTF-8
13
+ # character
14
+ def fix_encoding_errors(string)
15
+ string.gsub(BAD_ENCODING_PATTERNS) { |substring| BAD_ENCODING[substring] || substring }
16
+ end
17
+
18
+ BAD_ENCODING = {
19
+ "\xC3\x8D" => 'Í',
20
+ "\xC3\x8F" => 'Ï',
21
+ "\xC3\x90" => 'Ð',
22
+ "\xC3\x9D" => 'Ý',
23
+ ' ' => ' ',
24
+ '¡' => '¡',
25
+ '¢' => '¢',
26
+ '£' => '£',
27
+ '¤' => '¤',
28
+ 'Â¥' => '¥',
29
+ '¦' => '¦',
30
+ '§' => '§',
31
+ '¨' => '¨',
32
+ '©' => '©',
33
+ 'ª' => 'ª',
34
+ '«' => '«',
35
+ '¬' => '¬',
36
+ '­' => '­',
37
+ '®' => '®',
38
+ '¯' => '¯',
39
+ '°' => '°',
40
+ '±' => '±',
41
+ '²' => '²',
42
+ '³' => '³',
43
+ '´' => '´',
44
+ 'µ' => 'µ',
45
+ '¶' => '¶',
46
+ '·' => '·',
47
+ '¸' => '¸',
48
+ '¹' => '¹',
49
+ 'º' => 'º',
50
+ '»' => '»',
51
+ '¼' => '¼',
52
+ '½' => '½',
53
+ '¾' => '¾',
54
+ '¿' => '¿',
55
+ '€' => '€',
56
+ 'â„¢' => '™',
57
+ '”' => '”', # Note the invisible Ux009D in the key
58
+ '†' => '†',
59
+ '‡' => '‡',
60
+ '•' => '•',
61
+ '…' => '…',
62
+ '‰' => '‰',
63
+ '′' => '′', # Manually added. Some seem to use this instead of Ux2019
64
+ '‹' => '‹',
65
+ '›' => '›',
66
+ '“' => '“',
67
+ '‚' => '‚',
68
+ '„' => '„',
69
+ '‘' => '‘',
70
+ '–' => '–',
71
+ '—' => '—',
72
+ '’' => '’',
73
+ 'à' => 'à',
74
+ 'á' => 'á',
75
+ 'â' => 'â',
76
+ 'ã' => 'ã',
77
+ 'ä' => 'ä',
78
+ 'Ã¥' => 'å',
79
+ 'æ' => 'æ',
80
+ 'ç' => 'ç',
81
+ 'è' => 'è',
82
+ 'é' => 'é',
83
+ 'ê' => 'ê',
84
+ 'ë' => 'ë',
85
+ 'ì' => 'ì',
86
+ 'í' => 'í',
87
+ 'î' => 'î',
88
+ 'ï' => 'ï',
89
+ 'ð' => 'ð',
90
+ 'ñ' => 'ñ',
91
+ 'ò' => 'ò',
92
+ 'ó' => 'ó',
93
+ 'ô' => 'ô',
94
+ 'õ' => 'õ',
95
+ 'ö' => 'ö',
96
+ '÷' => '÷',
97
+ 'ø' => 'ø',
98
+ 'ù' => 'ù',
99
+ 'ú' => 'ú',
100
+ 'û' => 'û',
101
+ 'ü' => 'ü',
102
+ 'ý' => 'ý',
103
+ 'þ' => 'þ',
104
+ 'ÿ' => 'ÿ',
105
+ 'ß' => 'ß',
106
+ 'ÃŒ' => 'Ì',
107
+ 'Ü' => 'Ü',
108
+ 'Ê' => 'Ê',
109
+ 'Ú' => 'Ú',
110
+ 'ÃŽ' => 'Î',
111
+ 'Þ' => 'Þ',
112
+ 'Ã' => 'Ã',
113
+ 'È' => 'È',
114
+ 'Ø' => 'Ø',
115
+ 'Ö' => 'Ö',
116
+ '×' => '×',
117
+ 'Ñ' => 'Ñ',
118
+ 'Ã’' => 'Ò',
119
+ 'Â' => 'Â',
120
+ 'Ó' => 'Ó',
121
+ 'Ô' => 'Ô',
122
+ 'Ä' => 'Ä',
123
+ 'Æ' => 'Æ',
124
+ 'Ç' => 'Ç',
125
+ 'Õ' => 'Õ',
126
+ 'Ã…' => 'Å',
127
+ 'É' => 'É',
128
+ 'Ë' => 'Ë',
129
+ 'Û' => 'Û',
130
+ 'À' => 'À',
131
+ 'Ù' => 'Ù',
132
+ "Ã\uFFFD" => 'Á', # second byte of mangled Á decodes to U+FFFD REPLACEMENT CHARACTER
133
+ 'Å ' => 'Š',
134
+ 'Å¡' => 'š',
135
+ 'Ÿ' => 'Ÿ',
136
+ 'Ž' => 'Ž',
137
+ 'ž' => 'ž',
138
+ 'Å’' => 'Œ',
139
+ 'Å“' => 'œ',
140
+ 'Æ’' => 'ƒ',
141
+ 'Ëœ' => '˜',
142
+ 'ˆ' => 'ˆ',
143
+ "\x00" => '', # Manually added to avoid Bad Argument exception
144
+ }.freeze
145
+
146
+ BAD_ENCODING_PATTERNS = /(#{BAD_ENCODING.keys.join('|')})/
147
+ end
148
+ end
@@ -0,0 +1,46 @@
1
+ # frozen_string_literal: true
2
+
3
+ module NameTamer
4
+ module Strings
5
+ extend self
6
+
7
+ def upcase_first_letter(string)
8
+ string.gsub(/\b\w/, &:upcase)
9
+ end
10
+
11
+ def downcase_after_apostrophe(string)
12
+ string.gsub(/'\w\b/, &:downcase) # Lowercase 's
13
+ end
14
+
15
+ # Our list of terminal characters that indicate a non-celtic name used
16
+ # to include o but we removed it because of MacMurdo.
17
+ def fix_mac(string)
18
+ return string unless /\bMac[A-Za-z]{2,}[^acizj]\b/.match?(string) || /\bMc/.match?(string)
19
+
20
+ fixed = string.gsub(/\b(Ma?c)([A-Za-z]+)/) { Regexp.last_match[1] + Regexp.last_match[2].capitalize }
21
+
22
+ # Fix Mac exceptions
23
+ MAC_EXCEPTIONS.reduce(fixed) { |name, mac_name| name.gsub(/\b#{mac_name}/, mac_name.capitalize) }
24
+ end
25
+
26
+ # Fix ff wierdybonks
27
+ def fix_ff(string)
28
+ FF_NAMES.reduce(string) { |name, ff_name| name.gsub(ff_name, ff_name.downcase) }
29
+ end
30
+
31
+ # Upcase words with no vowels, e.g JPR Williams
32
+ # Except Ng http://en.wikipedia.org/wiki/Ng
33
+ def upcase_initials(string)
34
+ string
35
+ .gsub(/\b([bcdfghjklmnpqrstvwxz]+)\b/i) { Regexp.last_match[1].upcase }
36
+ .gsub(/\b(NG)\b/i) { Regexp.last_match[1].capitalize }
37
+ end
38
+
39
+ MAC_EXCEPTIONS = %w[
40
+ MacEdo MacEvicius MacHado MacHar MacHin MacHlin MacIas MacIulis MacKie
41
+ MacKle MacKlin MacKmin MacKmurdo MacQuarie MacLise MacKenzie
42
+ ].freeze
43
+
44
+ FF_NAMES = %w[Fforbes Fforde Ffinch Ffrench Ffoulkes].freeze
45
+ end
46
+ end
@@ -0,0 +1,34 @@
1
+ # frozen_string_literal: true
2
+
3
+ module NameTamer
4
+ module Strings
5
+ extend self
6
+
7
+ # Fix known last names that have spaces (not hyphens!)
8
+ def nbsp_in_compound_name(string)
9
+ COMPOUND_NAMES.reduce(string) do |name, compound_name|
10
+ name.gsub(compound_name, compound_name.tr(ASCII_SPACE, NONBREAKING_SPACE))
11
+ end
12
+ end
13
+
14
+ COMPOUND_NAMES = [
15
+ # Known families with a space in their surname
16
+ 'Baron Cohen',
17
+ 'Bonham Carter',
18
+ 'Holmes a Court',
19
+ 'Holmes à Court',
20
+ 'Lane Fox',
21
+ 'Lloyd Webber',
22
+ 'Pitt Rivers',
23
+ 'Sebag Montefiore',
24
+ 'Strang Steel',
25
+ 'Wedgwood Benn',
26
+ 'Wingfield Digby',
27
+ # Sometimes companies appear as people
28
+ 'Corporation Company',
29
+ 'Corporation System',
30
+ 'Incorporations Limited',
31
+ 'Service Company',
32
+ ].freeze
33
+ end
34
+ end
@@ -0,0 +1,62 @@
1
+ # frozen_string_literal: true
2
+
3
+ module NameTamer
4
+ # Pure string transformations used throughout the gem. Every method
5
+ # takes a string and returns a new string; arguments are never mutated.
6
+ module Strings
7
+ extend self
8
+
9
+ def presence(string)
10
+ string unless string.empty?
11
+ end
12
+
13
+ # Change any whitespace into our separator character
14
+ def whitespace_to(string, separator)
15
+ string.gsub(/[[:space:]]+/, separator)
16
+ end
17
+
18
+ # Change some characters embedded in words to our separator character
19
+ # e.g. example.com -> example-com
20
+ def invalid_chars_to(string, separator)
21
+ string.gsub(%r{(?<![[:space:]])[./](?![[:space:]])}, separator)
22
+ end
23
+
24
+ # Remove HTML entities
25
+ def unescape_html(string)
26
+ CGI.unescapeHTML string
27
+ end
28
+
29
+ # Make sure separators are not where they shouldn't be
30
+ def fix_separators(string, separator)
31
+ return string if separator.nil? || separator.empty?
32
+
33
+ r = Regexp.escape(separator)
34
+
35
+ # No more than one separator in a row, no leading or trailing separator
36
+ string.gsub(/#{r}{2,}/, separator).gsub(/^#{r}|#{r}$/i, '')
37
+ end
38
+
39
+ def remove_periods_from_initials(string)
40
+ string.gsub(/\b([a-z])\./i) { Regexp.last_match[1] }
41
+ end
42
+
43
+ # Strip unwanted characters out completely
44
+ def strip_unwanted(string, filter)
45
+ string.gsub(filter, '')
46
+ end
47
+
48
+ # Unescape percent-encoded characters
49
+ # This might introduce UTF-8 invalid byte sequence
50
+ # so we take precautions
51
+ def safe_unescape(string)
52
+ unescaped = CGI.unescape(string.gsub('+', '%2B'))
53
+ return string if string == unescaped
54
+
55
+ ensure_safe(unescaped)
56
+ end
57
+
58
+ def ensure_safe(string)
59
+ string.encode('UTF-8', invalid: :replace, undef: :replace, replace: '')
60
+ end
61
+ end
62
+ end
@@ -0,0 +1,51 @@
1
+ # frozen_string_literal: true
2
+
3
+ module NameTamer
4
+ module Strings
5
+ extend self
6
+
7
+ # Fixes for name modifiers followed by space
8
+ # Also replaces spaces with non-breaking spaces
9
+ # Fixes for name modifiers followed by an apostrophe,
10
+ # e.g. d'Artagnan, Commedia dell'Arte
11
+ def fix_name_modifiers(string)
12
+ fixed = NAME_MODIFIERS.reduce(string) do |name, modifier|
13
+ name.gsub(/((?:[[:space:]]|^)#{modifier})([[:space:]]+|-)/) do
14
+ "#{Regexp.last_match[1].rstrip.downcase}#{Regexp.last_match[2].tr(ASCII_SPACE, NONBREAKING_SPACE)}"
15
+ end
16
+ end
17
+
18
+ fix_apostrophe_modifiers(fixed)
19
+ end
20
+
21
+ def fix_apostrophe_modifiers(string)
22
+ %w[Dell D].reduce(string) do |name, modifier|
23
+ name.gsub(/(.#{modifier}')(\w)/) { "#{Regexp.last_match[1].rstrip.downcase}#{Regexp.last_match[2]}" }
24
+ end
25
+ end
26
+
27
+ def nbsp_in_name_modifier(string)
28
+ NAME_MODIFIERS.reduce(string) do |name, modifier|
29
+ name.gsub(/([[:space:]]#{modifier})([[:space:]])/i) { "#{Regexp.last_match[1]}#{NONBREAKING_SPACE}" }
30
+ end
31
+ end
32
+
33
+ NAME_MODIFIERS = [
34
+ 'Al',
35
+ 'Ap',
36
+ 'Ben',
37
+ 'D[aeiou]',
38
+ 'D[ao]s',
39
+ 'De[lrn]',
40
+ 'Dell[ae]',
41
+ 'El',
42
+ 'L[eo]',
43
+ 'La',
44
+ 'Of',
45
+ 'San',
46
+ 'St[\.]?',
47
+ 'V[ao]n',
48
+ 'Zur',
49
+ ].freeze
50
+ end
51
+ end
@@ -0,0 +1,22 @@
1
+ # frozen_string_literal: true
2
+
3
+ module NameTamer
4
+ module Strings
5
+ extend self
6
+
7
+ # Ensure commas have exactly one space after them
8
+ def space_around_comma(string)
9
+ string.gsub(/[[:space:]]*,[[:space:]]*/, ', ')
10
+ end
11
+
12
+ def remove_spaces_from_initials(string)
13
+ string.gsub(/\b([a-z])(\.)* \b(?![a-z0-9'À-ÿ]{2,})/i) do
14
+ "#{Regexp.last_match[1]}#{Regexp.last_match[2]}"
15
+ end
16
+ end
17
+
18
+ def ensure_space_after_initials(string)
19
+ string.gsub(/\b([a-z]\.)(?=[a-z0-9]{2,})/i) { "#{Regexp.last_match[1]} " }
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative 'strings/core'
4
+ require_relative 'strings/approximations'
5
+ require_relative 'strings/bad_encoding'
6
+ require_relative 'strings/capitalization'
7
+ require_relative 'strings/compound_names'
8
+ require_relative 'strings/name_modifiers'
9
+ require_relative 'strings/spacing'
@@ -10,29 +10,35 @@ module NameTamer
10
10
 
11
11
  # Split the string into segments (e.g. sentences)
12
12
  def segments
13
- string.split(%r{(?:[\.\?,:;!]|[[:space:]][/-])[[:space:]]})
13
+ string.split(%r{(?:[.?,:;!]|[[:space:]][/-])[[:space:]]})
14
14
  end
15
15
 
16
16
  # The string as a slug
17
17
  def parameterize
18
- @parameterize ||= (
19
- string
20
- .dup
21
- .whitespace_to!(separator)
22
- .invalid_chars_to!(separator)
23
- .strip_unwanted!(filter)
24
- .fix_separators!(separator)
25
- .approximate_latin_chars!
26
- .presence || +'_'
27
- ).downcase
18
+ @parameterize ||= begin
19
+ slug = Strings.whitespace_to(string, separator)
20
+ slug = Strings.invalid_chars_to(slug, separator)
21
+ slug = Strings.strip_unwanted(slug, filter)
22
+ slug = Strings.fix_separators(slug, separator)
23
+ slug = Strings.approximate_latin_chars(slug)
24
+
25
+ (Strings.presence(slug) || '_').downcase
26
+ end
28
27
  end
29
28
 
30
29
  def neighbours
31
- @neighbours ||= NameTamer[string].array.neighbours.map { |a| a.join('-') }
30
+ @neighbours ||= contiguous_slices(NameTamer[string].array).map { |words| words.join('-') }
32
31
  end
33
32
 
34
33
  private
35
34
 
35
+ # All the contiguous sub-arrays of an array,
36
+ # e.g. [1, 2] -> [[1], [1, 2], [2]]
37
+ def contiguous_slices(array)
38
+ last_index = array.length - 1
39
+ 0.upto(last_index).flat_map { |i| i.upto(last_index).map { |j| array[i..j] } }
40
+ end
41
+
36
42
  attr_reader :string, :args
37
43
 
38
44
  def initialize(string, args = {})
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module NameTamer
4
- VERSION = '0.6.1'
4
+ VERSION = '1.0.2'
5
5
  end
data/lib/name_tamer.rb CHANGED
@@ -1,8 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'cgi'
4
- require 'name_tamer/string'
5
- require 'name_tamer/array'
4
+ require 'name_tamer/strings'
6
5
  require 'name_tamer/constants'
7
6
 
8
7
  module NameTamer
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: name_tamer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dominic Sayers
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2018-08-19 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies: []
13
12
  description: Useful methods for taming names
14
13
  email:
@@ -17,35 +16,38 @@ executables: []
17
16
  extensions: []
18
17
  extra_rdoc_files: []
19
18
  files:
20
- - ".codeclimate.yml"
21
- - ".env"
22
- - ".gitignore"
23
- - ".hound.yml"
24
- - ".rspec"
25
- - ".rubocop.yml"
26
- - ".travis.yml"
27
- - Gemfile
28
- - Guardfile
19
+ - CHANGELOG.md
29
20
  - LICENSE
30
21
  - README.md
31
- - Rakefile
32
- - doc/maintenance.rake
33
- - doc/prefixes.csv
34
- - doc/suffixes.csv
35
22
  - lib/name-tamer.rb
36
23
  - lib/name_tamer.rb
37
- - lib/name_tamer/array.rb
38
24
  - lib/name_tamer/constants.rb
25
+ - lib/name_tamer/constants/adfixes_prefix_person
26
+ - lib/name_tamer/constants/adfixes_suffix_organization
27
+ - lib/name_tamer/constants/adfixes_suffix_person
39
28
  - lib/name_tamer/name.rb
40
- - lib/name_tamer/string.rb
29
+ - lib/name_tamer/name/private_methods_nice_name.rb
30
+ - lib/name_tamer/name/private_methods_simple_name.rb
31
+ - lib/name_tamer/name/utilities.rb
32
+ - lib/name_tamer/strings.rb
33
+ - lib/name_tamer/strings/approximations.rb
34
+ - lib/name_tamer/strings/bad_encoding.rb
35
+ - lib/name_tamer/strings/capitalization.rb
36
+ - lib/name_tamer/strings/compound_names.rb
37
+ - lib/name_tamer/strings/core.rb
38
+ - lib/name_tamer/strings/name_modifiers.rb
39
+ - lib/name_tamer/strings/spacing.rb
41
40
  - lib/name_tamer/text.rb
42
41
  - lib/name_tamer/version.rb
43
- - name_tamer.gemspec
44
42
  homepage: https://github.com/dominicsayers/name_tamer
45
43
  licenses:
46
44
  - MIT
47
- metadata: {}
48
- post_install_message:
45
+ metadata:
46
+ homepage_uri: https://github.com/dominicsayers/name_tamer
47
+ source_code_uri: https://github.com/dominicsayers/name_tamer
48
+ changelog_uri: https://github.com/dominicsayers/name_tamer/blob/main/CHANGELOG.md
49
+ bug_tracker_uri: https://github.com/dominicsayers/name_tamer/issues
50
+ rubygems_mfa_required: 'true'
49
51
  rdoc_options: []
50
52
  require_paths:
51
53
  - lib
@@ -53,16 +55,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
53
55
  requirements:
54
56
  - - ">="
55
57
  - !ruby/object:Gem::Version
56
- version: '0'
58
+ version: '3.3'
57
59
  required_rubygems_version: !ruby/object:Gem::Requirement
58
60
  requirements:
59
61
  - - ">="
60
62
  - !ruby/object:Gem::Version
61
63
  version: '0'
62
64
  requirements: []
63
- rubyforge_project:
64
- rubygems_version: 2.7.7
65
- signing_key:
65
+ rubygems_version: 4.0.16
66
66
  specification_version: 4
67
67
  summary: 'Example: NameTamer[''Mr. John Q. Smith III, MD''].simple_name # => John
68
68
  Smith'
data/.codeclimate.yml DELETED
@@ -1,18 +0,0 @@
1
- ---
2
- engines:
3
- duplication:
4
- enabled: true
5
- config:
6
- languages:
7
- - ruby
8
- fixme:
9
- enabled: true
10
- rubocop:
11
- enabled: true
12
- ratings:
13
- paths:
14
- - "**.rb"
15
- exclude_paths:
16
- - script/
17
- - spec/
18
- - doc/
data/.env DELETED
@@ -1 +0,0 @@
1
- PATH=/home/build/.rvm/gems/ruby-2.1.1/bin:/home/build/.rvm/gems/ruby-2.1.1@global/bin:/home/build/.rvm/rubies/ruby-2.1.1/bin:/home/build/.rvm/bin:/usr/local/heroku/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/build/.rvm/gems/ruby-2.1.1@global/bin/bundle
data/.gitignore DELETED
@@ -1,27 +0,0 @@
1
- *.gem
2
-
3
- *.rbc
4
- capybara-*.html
5
- /log
6
- /tmp
7
- /db/*.sqlite3
8
- /public/system
9
- /coverage/
10
- /spec/tmp
11
- **.orig
12
- rerun.txt
13
- pickle-email-*.html
14
- config/initializers/secret_token.rb
15
- config/secrets.yml
16
-
17
- ## Environment normalisation:
18
- /.bundle
19
- /vendor/bundle
20
-
21
- .ruby-version
22
- .ruby-gemset
23
- Gemfile.lock
24
- .byebug_history
25
-
26
- # unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
27
- .rvmrc
data/.hound.yml DELETED
@@ -1,6 +0,0 @@
1
- ---
2
- ruby:
3
- enabled: true
4
- config_file: .rubocop.yml
5
- coffee_script:
6
- enabled: true
data/.rspec DELETED
@@ -1,2 +0,0 @@
1
- --color
2
- --require spec_helper
data/.rubocop.yml DELETED
@@ -1,61 +0,0 @@
1
- ---
2
- AllCops:
3
- DisplayCopNames: true
4
- DisplayStyleGuide: true
5
- Exclude:
6
- - bin/**/*
7
- - tmp/**/*
8
- - '**/*.rake'
9
-
10
- Layout/DotPosition:
11
- EnforcedStyle: leading
12
- Enabled: true
13
-
14
- Layout/ExtraSpacing:
15
- Enabled: true
16
-
17
- Metrics/BlockLength:
18
- CountComments: false # count full line comments?
19
- Exclude:
20
- - '**/*_spec.rb'
21
-
22
- Metrics/ClassLength:
23
- CountComments: false # count full line comments?
24
- Exclude:
25
- - lib/name_tamer/name.rb
26
- - lib/name_tamer/string.rb
27
-
28
- Metrics/CyclomaticComplexity:
29
- Max: 8
30
-
31
- Metrics/LineLength:
32
- Max: 120
33
- Enabled: true
34
-
35
- Metrics/MethodLength:
36
- Max: 23
37
- Enabled: true
38
-
39
- Metrics/ModuleLength:
40
- CountComments: false # count full line comments?
41
- Exclude:
42
- - lib/name_tamer/constants.rb
43
-
44
- Naming/FileName:
45
- Enabled: false
46
-
47
- Style/Documentation:
48
- Enabled: false
49
-
50
- Style/MutableConstant:
51
- Enabled: true
52
-
53
- Style/StringLiterals:
54
- EnforcedStyle: single_quotes
55
- Enabled: true
56
-
57
- Style/TrailingCommaInArrayLiteral:
58
- EnforcedStyleForMultiline: comma
59
-
60
- Style/TrailingCommaInHashLiteral:
61
- EnforcedStyleForMultiline: comma
data/.travis.yml DELETED
@@ -1,11 +0,0 @@
1
- ---
2
- language: ruby
3
- dist: trusty
4
- rvm:
5
- - 2.5
6
- - 2.4
7
- - 2.3
8
- before_install:
9
- - gem update bundler
10
- script: bundle exec rspec
11
- after_success: bundle exec codeclimate-test-reporter