Skip to content

Commit

Permalink
Drop unicode gem (#376)
Browse files Browse the repository at this point in the history
As of Ruby 2.4 strings can natively handle unicode capitalization
and the (very old) unicode gem is no longer required.
  • Loading branch information
ehelms authored Aug 1, 2023
1 parent b5e8b52 commit 327f191
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
1 change: 0 additions & 1 deletion hammer_cli.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ EOF
s.add_dependency 'clamp', '>= 1.3.1', '< 2.0.0'
s.add_dependency 'logging'
s.add_dependency 'unicode-display_width'
s.add_dependency 'unicode'
s.add_dependency 'amazing_print'
s.add_dependency 'highline'
s.add_dependency 'fast_gettext'
Expand Down
3 changes: 1 addition & 2 deletions lib/hammer_cli/help/builder.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
require 'unicode'
module HammerCLI
module Help
class Builder < Clamp::Help::Builder
Expand Down Expand Up @@ -46,7 +45,7 @@ def add_list(heading, items)
else
item.help
end
description.gsub(/^(.)/) { Unicode.capitalize(Regexp.last_match(1)) }.wrap.each_line do |line|
description.gsub(/^(.)/) { Regexp.last_match(1).capitalize }.wrap.each_line do |line|
line " %-#{label_width}s %s" % [label, line]
label = ''
end
Expand Down

0 comments on commit 327f191

Please sign in to comment.