Sha256: 5848aed57b87d5f3e7c39a877c9d04405a2ba6cfe5b1bd3118a8f6cf28537f13
Contents?: true
Size: 769 Bytes
Versions: 3
Compression:
Stored size: 769 Bytes
Contents
::YARD::Templates::Engine.register_template_path File.dirname(__FILE__) + '/../templates' require 'git' # 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 =~ /@/ remote_origin.gsub("git@", "").gsub(":", "/") else remote_origin.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
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
yard-nowpunk-0.2.33 | lib/yard-nowpunk.rb |
yard-nowpunk-0.2.32 | lib/yard-nowpunk.rb |
yard-nowpunk-0.2.31 | lib/yard-nowpunk.rb |