Module: Osrcry
- Defined in:
- lib/osrcry.rb,
lib/osrcry/stale.rb,
lib/osrcry/license.rb,
lib/osrcry/version.rb,
lib/osrcry/contributors.rb
Defined Under Namespace
Classes: Contributors, License, Stale
Constant Summary
collapse
- VERSION =
"0.0.1"
Class Method Summary
collapse
Class Method Details
.remote ⇒ Object
9
10
11
|
# File 'lib/osrcry.rb', line 9
def self.remote
@remote ||= `git remote -v`.split("\n").detect {|line| line =~ /^origin/}
end
|
.repo ⇒ Object
13
14
15
|
# File 'lib/osrcry.rb', line 13
def self.repo
@repo ||= remote.match(%r{github.com[:\/](\w+)\/(\w+)}).captures.last
end
|
.user ⇒ Object
17
18
19
|
# File 'lib/osrcry.rb', line 17
def self.user
@user ||= remote.match(%r{github.com[:\/](\w+)\/(\w+)}).captures.first
end
|