Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename list of values to strip #118

Merged
merged 1 commit into from
Feb 17, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions lib/geo_combine/ogp.rb
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ def slug
sluggify(filter_name(name))
end

SLUG_BLACKLIST = %w[
SLUG_STRIP_VALUES = %w[
SDE_DATA.
SDE.
SDE2.
Expand All @@ -218,8 +218,8 @@ def slug

def filter_name(name)
# strip out schema and usernames
SLUG_BLACKLIST.each do |blacklisted|
name.sub!(blacklisted, '')
SLUG_STRIP_VALUES.each do |strip_val|
name.sub!(strip_val, '')
end
unless name.size > 1
# use first word of title is empty name
Expand Down