Module: Dpl::Github

Extended by:
Github
Includes:
Transliterate
Included in:
Github, Providers::Releases
Defined in:
lib/dpl/helper/github.rb

Constant Summary

Constants included from Transliterate

Transliterate::APPROXIMATIONS

Instance Method Summary collapse

Methods included from Transliterate

#transliterate

Instance Method Details

#normalize_filename(str) ⇒ Object



11
12
13
14
15
16
# File 'lib/dpl/helper/github.rb', line 11

def normalize_filename(str)
  str = File.basename(str)
  str = str.split(' ').first
  str = transliterate(str)
  str.gsub(/[^\w@+\-_]/, '.')
end