Class: Janky::App

Inherits:
Sinatra::Base
  • Object
show all
Defined in:
lib/janky/app.rb

Instance Method Summary collapse

Instance Method Details

#authorize_indexObject



29
30
31
32
33
# File 'lib/janky/app.rb', line 29

def authorize_index
  if github_team_id
    github_team_authenticate!(github_team_id)
  end
end

#authorize_repo(repo) ⇒ Object



35
36
37
38
39
# File 'lib/janky/app.rb', line 35

def authorize_repo(repo)
  if team_id = (repo.github_team_id || github_team_id)
    github_team_authenticate!(team_id)
  end
end

#github_organizationObject



21
22
23
# File 'lib/janky/app.rb', line 21

def github_organization
  settings.respond_to?(:github_organization) && settings.github_organization
end

#github_team_idObject



25
26
27
# File 'lib/janky/app.rb', line 25

def github_team_id
  settings.respond_to?(:github_team_id) && settings.github_team_id
end