Module: Bananajour

Extended by:
BigBananajour::EmailMangleHelper
Defined in:
lib/bigbananajour/bananajour/bananajour.rb,
lib/bigbananajour/bananajour/repository.rb

Overview

Monkeypatch bananajour to override ports and repository resolution behaviour.

Defined Under Namespace

Modules: Bonjour, Commands Classes: Eater, Repository

Class Method Summary collapse

Methods included from BigBananajour::EmailMangleHelper

demangle_email, mangle_email

Class Method Details

.git_portObject



18
19
20
# File 'lib/bigbananajour/bananajour/bananajour.rb', line 18

def git_port
  9419 
end

.git_uriObject



22
23
24
# File 'lib/bigbananajour/bananajour/bananajour.rb', line 22

def git_uri
  "git://#{host_name}:#{git_port}/"
end

.people_that_have_repository(repository_name) ⇒ Object



30
31
32
# File 'lib/bigbananajour/bananajour/bananajour.rb', line 30

def people_that_have_repository(repository_name)
  repositories.select{|r| r.name == repository_name}.map{|r| demangle_email(r.path.expand_path.to_s.split("/")[-2]) }.sort
end

.repositoriesObject



26
27
28
# File 'lib/bigbananajour/bananajour/bananajour.rb', line 26

def repositories
  repositories_path.children.map {|dir| Fancypath(dir).children.map{|r| Repository.new(r)}.sort_by{|r| r.name}}.flatten
end

.repositories_pathObject



10
11
12
# File 'lib/bigbananajour/bananajour/bananajour.rb', line 10

def repositories_path
  path/"mirrored_repositories"
end

.web_portObject



14
15
16
# File 'lib/bigbananajour/bananajour/bananajour.rb', line 14

def web_port
  9332 
end