Sha256: e5da3bb26017b396c8115c77db153932a026827e462c4d8e694144006f413cb9
Contents?: true
Size: 727 Bytes
Versions: 1
Compression:
Stored size: 727 Bytes
Contents
::YARD::Templates::Engine.register_template_path File.dirname(__FILE__) + '/../templates' # TODO (farleyknight@gmail.com): Rename this to yard-github class YARD::Nowpunk class << self def parse_github_url_from_git_config remote_origin = Git.open(Dir.pwd).config["remote.origin.url"] @url ||= if remote_origin =~ /@/ gsub("git@", "").gsub(":", "/") else gsub("git://", "") end end def project_name parse_github_url_from_git_config.match(/github\.com\/(.*)\/(.*)/)[2] end def github_url "http://" + parse_github_url_from_git_config end def github_master github_url + "/tree/master/" end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
yard-nowpunk-0.2.28 | lib/yard-nowpunk.rb |