Skip to content

Commit

Permalink
improvements for houndci to bark less
Browse files Browse the repository at this point in the history
  • Loading branch information
telzul committed Nov 17, 2015
1 parent 151e0ed commit dcd1197
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
4 changes: 1 addition & 3 deletions lib/stringex/localization/converter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ def translate!(*conversions)
end
end


protected

def unreadable_control_characters
Expand Down Expand Up @@ -106,14 +105,13 @@ def html_entities
string.squeeze! ' '
end


def vulgar_fractions
expressions.vulgar_fractions.each do |key, expression|
string.gsub! expression, translate(key, :vulgar_fractions)
end
end

private
private

def expressions
ConversionExpressions
Expand Down
5 changes: 2 additions & 3 deletions test/unit/string_extensions_test.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# encoding: UTF-8
# encoding: utf-8

require "test_helper"
require "stringex"
Expand Down Expand Up @@ -285,12 +285,11 @@ def to_ascii
end

def test_remove_nonreadable_characters
cases = { "Jörg Immendor\u0014. Les théâtres de la peinture" => "jorg-immendor-les-theatres-de-la-peinture",
cases = { "Jörg Immendor\u0014. Les théâtres" => "jorg-immendor-les-theatres",
}
cases.each do |plain, converted|
assert_equal converted, plain.to_url
end

end

if defined?(RedCloth)
Expand Down

0 comments on commit dcd1197

Please sign in to comment.