Class: XCPretty::RepoParser
- Inherits:
-
Object
- Object
- XCPretty::RepoParser
- Defined in:
- lib/xcpretty/reporters/learn.rb
Class Method Summary collapse
Class Method Details
.die ⇒ Object
150 151 152 |
# File 'lib/xcpretty/reporters/learn.rb', line 150 def self.die exit end |
.get_repo ⇒ Object
137 138 139 140 141 142 143 144 145 146 147 148 |
# File 'lib/xcpretty/reporters/learn.rb', line 137 def self.get_repo begin repo = Git.open(File.(".", Dir.pwd)) rescue puts "Not a valid Git repository" die end url = repo.remote.url repo_name = url.match(/(?:https:\/\/|git@).*\/(.+)(?:\.git)/)[1] end |