Sha256: 5ff7f1a8cfc006f102099b10995647634b3de3fce660bc1185206c0c006ca52b
Contents?: true
Size: 355 Bytes
Versions: 2
Compression:
Stored size: 355 Bytes
Contents
# frozen_string_literal: true module JekyllPush # # module Utils # # @return [String] def self.slugify(str) safe = str.to_s.downcase.strip.gsub(' ', '-').gsub(/[^\w-]/, '') warn Rainbow("Warning: '#{str}' is not an acceptable branch name. Using '#{safe}' instead.").orange unless safe.eql?(str) safe end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
jekyll_push-0.1.2 | lib/jekyll_push/utils.rb |
jekyll_push-0.1.1 | lib/jekyll_push/utils.rb |