diff --git a/Gemfile b/Gemfile index 7539132d..a167be0b 100644 --- a/Gemfile +++ b/Gemfile @@ -118,6 +118,9 @@ group :development do # Better errors handler gem 'better_errors' gem 'binding_of_caller' + + # Docs generator + gem "sdoc" end group :development, :test do diff --git a/Gemfile.lock b/Gemfile.lock index fd543191..3bef4bdb 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -393,6 +393,9 @@ GEM railties (~> 3.2.0) sass (>= 3.1.10) tilt (~> 1.3) + sdoc (0.3.20) + json (>= 1.1.3) + rdoc (~> 3.10) seed-fu (2.2.0) activerecord (~> 3.1) activesupport (~> 3.1) @@ -529,6 +532,7 @@ DEPENDENCIES resque_spec rspec-rails sass-rails (~> 3.2.5) + sdoc seed-fu settingslogic shoulda-matchers (= 1.3.0) diff --git a/doc/app/Ability.html b/doc/app/Ability.html deleted file mode 100644 index f780d067..00000000 --- a/doc/app/Ability.html +++ /dev/null @@ -1,570 +0,0 @@ - - - - - - -class Ability - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

class Ability

- -
- -
- - - - -
- - - - - - - - - - -
-

Public Class Methods

- - -
- -
- allowed(object, subject) - click to toggle source -
- - -
- - - - - -
-
# File app/models/ability.rb, line 3
-def allowed(object, subject)
-  case subject.class.name
-  when "Project" then project_abilities(object, subject)
-  when "Issue" then issue_abilities(object, subject)
-  when "Note" then note_abilities(object, subject)
-  when "Snippet" then snippet_abilities(object, subject)
-  when "MergeRequest" then merge_request_abilities(object, subject)
-  else []
-  end
-end
-
- -
- - - - -
- - -
- -
- project_abilities(user, project) - click to toggle source -
- - -
- - - - - -
-
# File app/models/ability.rb, line 14
-def project_abilities(user, project)
-  rules = []
-
-  rules << [
-    :read_project,
-    :read_wiki,
-    :read_issue,
-    :read_milestone,
-    :read_snippet,
-    :read_team_member,
-    :read_merge_request,
-    :read_note,
-    :write_project,
-    :write_issue,
-    :write_note
-  ] if project.guest_access_for?(user)
-
-  rules << [
-    :download_code,
-    :write_merge_request,
-    :write_snippet
-  ] if project.report_access_for?(user)
-
-  rules << [
-    :write_wiki,
-    :push_code
-  ] if project.dev_access_for?(user)
-
-  rules << [
-    :push_code_to_protected_branches
-  ] if project.master_access_for?(user)
-
-  rules << [
-    :modify_issue,
-    :modify_snippet,
-    :modify_merge_request,
-    :admin_project,
-    :admin_issue,
-    :admin_milestone,
-    :admin_snippet,
-    :admin_team_member,
-    :admin_merge_request,
-    :admin_note,
-    :accept_mr,
-    :admin_wiki
-  ] if project.master_access_for?(user) || project.owner == user
-
-  rules.flatten
-end
-
- -
- - - - -
- - -
- -
- -
- - - - diff --git a/doc/app/Account.html b/doc/app/Account.html deleted file mode 100644 index 58f65758..00000000 --- a/doc/app/Account.html +++ /dev/null @@ -1,881 +0,0 @@ - - - - - - -module Account - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

module Account

- -
- -
- - - - -
- - - - - - - - - - -
-

Public Instance Methods

- - -
- -
- block() - click to toggle source -
- - -
- -

Remove user from all projects and set blocked attribute to true

- - - -
-
# File app/roles/account.rb, line 47
-def block
-  users_projects.find_each do |membership|
-    return false unless membership.destroy
-  end
-
-  self.blocked = true
-  save
-end
-
- -
- - - - -
- - -
- -
- can_create_group?() - click to toggle source -
- - -
- - - - - -
-
# File app/roles/account.rb, line 25
-def can_create_group?
-  is_admin?
-end
-
- -
- - - - -
- - -
- -
- can_create_project?() - click to toggle source -
- - -
- - - - - -
-
# File app/roles/account.rb, line 21
-def can_create_project?
-  projects_limit > my_own_projects.count
-end
-
- -
- - - - -
- - -
- -
- cared_merge_requests() - click to toggle source -
- - -
- - - - - -
-
# File app/roles/account.rb, line 37
-def cared_merge_requests
-  MergeRequest.where("author_id = :id or assignee_id = :id", id: self.id).opened
-end
-
- -
- - - - -
- - -
- -
- first_name() - click to toggle source -
- - -
- - - - - -
-
# File app/roles/account.rb, line 33
-def first_name
-  name.split.first unless name.blank?
-end
-
- -
- - - - -
- - -
- -
- identifier() - click to toggle source -
- - -
- -

Returns a string for use as a Gitolite user identifier

- -

Note that Gitolite 2.x requires the following -pattern for users:

- -
^@?[0-9a-zA-Z][0-9a-zA-Z._\@+-]*$
- - - -
-
# File app/roles/account.rb, line 7
-def identifier
-  # Replace non-word chars with underscores, then make sure it starts with
-  # valid chars
-  email.gsub(%r\W/, '_').gsub(%r\A([\W\_])+/, '')
-end
-
- -
- - - - -
- - -
- -
- is_admin?() - click to toggle source -
- - -
- - - - - -
-
# File app/roles/account.rb, line 13
-def is_admin?
-  admin
-end
-
- -
- - - - -
- - -
- -
- last_activity_project() - click to toggle source -
- - -
- - - - - -
-
# File app/roles/account.rb, line 29
-def last_activity_project
-  projects.first
-end
-
- -
- - - - -
- - -
- -
- project_ids() - click to toggle source -
- - -
- - - - - -
-
# File app/roles/account.rb, line 41
-def project_ids
-  projects.map(&:id)
-end
-
- -
- - - - -
- - -
- -
- projects_limit_percent() - click to toggle source -
- - -
- - - - - -
-
# File app/roles/account.rb, line 56
-def projects_limit_percent
-  return 100 if projects_limit.zero?
-  (my_own_projects.count.to_f / projects_limit) * 100
-end
-
- -
- - - - -
- - -
- -
- projects_with_events() - click to toggle source -
- - -
- - - - - -
-
# File app/roles/account.rb, line 70
-def projects_with_events
-  projects.includes(:events).order("events.created_at DESC")
-end
-
- -
- - - - -
- - -
- -
- recent_push(project_id = nil) - click to toggle source -
- - -
- - - - - -
-
# File app/roles/account.rb, line 61
-def recent_push project_id = nil
-  # Get push events not earlier than 2 hours ago
-  events = recent_events.code_push.where("created_at > ?", Time.now - 2.hours)
-  events = events.where(project_id: project_id) if project_id
-
-  # Take only latest one
-  events = events.recent.limit(1).first
-end
-
- -
- - - - -
- - -
- -
- require_ssh_key?() - click to toggle source -
- - -
- - - - - -
-
# File app/roles/account.rb, line 17
-def require_ssh_key?
-  keys.count == 0
-end
-
- -
- - - - -
- - -
- -
- -
- - - - diff --git a/doc/app/ActivityObserver.html b/doc/app/ActivityObserver.html deleted file mode 100644 index 3b31271d..00000000 --- a/doc/app/ActivityObserver.html +++ /dev/null @@ -1,531 +0,0 @@ - - - - - - -class ActivityObserver - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

class ActivityObserver

- -
- -
- - - - -
- - - - - - - - - - -
-

Public Instance Methods

- - -
- -
- after_create(record) - click to toggle source -
- - -
- - - - - -
-
# File app/observers/activity_observer.rb, line 4
-def after_create(record)
-  Event.create(
-    project: record.project,
-    target_id: record.id,
-    target_type: record.class.name,
-    action: Event.determine_action(record),
-    author_id: record.author_id
-  )
-end
-
- -
- - - - -
- - -
- -
- after_save(record) - click to toggle source -
- - -
- - - - - -
-
# File app/observers/activity_observer.rb, line 14
-def after_save(record)
-  if record.changed.include?("closed") 
-    Event.create(
-      project: record.project,
-      target_id: record.id,
-      target_type: record.class.name,
-      action: (record.closed ? Event::Closed : Event::Reopened),
-      author_id: record.author_id_of_changes
-    )
-  end
-end
-
- -
- - - - -
- - -
- -
- -
- - - - diff --git a/doc/app/Admin.html b/doc/app/Admin.html deleted file mode 100644 index 94fb27ef..00000000 --- a/doc/app/Admin.html +++ /dev/null @@ -1,432 +0,0 @@ - - - - - - -module Admin - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

module Admin

- -
- -
- - - - -
- - - - - - - - - - -
- -
- - - - diff --git a/doc/app/Admin/DashboardController.html b/doc/app/Admin/DashboardController.html deleted file mode 100644 index 00154b3d..00000000 --- a/doc/app/Admin/DashboardController.html +++ /dev/null @@ -1,488 +0,0 @@ - - - - - - -class Admin::DashboardController - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

class Admin::DashboardController

- -
- -
- - - - -
- - - - - - - - - - -
-

Public Instance Methods

- - -
- -
- index() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/admin/dashboard_controller.rb, line 2
-def index
-  @workers = Resque.workers
-  @pending_jobs = Resque.size(:post_receive)
-  @projects = Project.order("created_at DESC").limit(10)
-  @users = User.order("created_at DESC").limit(10)
-end
-
- -
- - - - -
- - -
- -
- -
- - - - diff --git a/doc/app/Admin/GroupsController.html b/doc/app/Admin/GroupsController.html deleted file mode 100644 index ef4dae9e..00000000 --- a/doc/app/Admin/GroupsController.html +++ /dev/null @@ -1,771 +0,0 @@ - - - - - - -class Admin::GroupsController - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

class Admin::GroupsController

- -
- -
- - - - -
- - - - - - - - - - -
-

Public Instance Methods

- - -
- -
- create() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/admin/groups_controller.rb, line 23
-def create
-  @group = Group.new(params[:group])
-  @group.owner = current_user
-
-  if @group.save
-    redirect_to [:admin, @group], notice: 'Group was successfully created.'
-  else
-    render action: "new"
-  end
-end
-
- -
- - - - -
- - -
- -
- destroy() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/admin/groups_controller.rb, line 64
-def destroy
-  @group.destroy
-
-  redirect_to admin_groups_path, notice: 'Group was successfully deleted.'
-end
-
- -
- - - - -
- - -
- -
- edit() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/admin/groups_controller.rb, line 20
-def edit
-end
-
- -
- - - - -
- - -
- -
- index() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/admin/groups_controller.rb, line 4
-def index
-  @groups = Group.scoped
-  @groups = @groups.search(params[:name]) if params[:name].present?
-  @groups = @groups.page(params[:page]).per(20)
-end
-
- -
- - - - -
- - -
- -
- new() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/admin/groups_controller.rb, line 16
-def new
-  @group = Group.new
-end
-
- -
- - - - -
- - -
- -
- project_update() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/admin/groups_controller.rb, line 49
-def project_update
-  project_ids = params[:project_ids]
-  Project.where(id: project_ids).update_all(group_id: @group.id)
-
-  redirect_to :back, notice: 'Group was successfully updated.'
-end
-
- -
- - - - -
- - -
- -
- remove_project() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/admin/groups_controller.rb, line 56
-def remove_project
-  @project = Project.find(params[:project_id])
-  @project.group_id = nil
-  @project.save
-
-  redirect_to :back, notice: 'Group was successfully updated.'
-end
-
- -
- - - - -
- - -
- -
- show() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/admin/groups_controller.rb, line 10
-def show
-  @projects = Project.scoped
-  @projects = @projects.not_in_group(@group) if @group.projects.present?
-  @projects = @projects.all
-end
-
- -
- - - - -
- - -
- -
- update() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/admin/groups_controller.rb, line 34
-def update
-  group_params = params[:group].dup
-  owner_id =group_params.delete(:owner_id)
-
-  if owner_id
-    @group.owner = User.find(owner_id)
-  end
-
-  if @group.update_attributes(group_params)
-    redirect_to [:admin, @group], notice: 'Group was successfully updated.'
-  else
-    render action: "edit"
-  end
-end
-
- -
- - - - -
- - -
- -
- -
- - - - diff --git a/doc/app/Admin/HooksController.html b/doc/app/Admin/HooksController.html deleted file mode 100644 index 48cd5d00..00000000 --- a/doc/app/Admin/HooksController.html +++ /dev/null @@ -1,603 +0,0 @@ - - - - - - -class Admin::HooksController - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

class Admin::HooksController

- -
- -
- - - - -
- - - - - - - - - - -
-

Public Instance Methods

- - -
- -
- create() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/admin/hooks_controller.rb, line 7
-def create
-  @hook = SystemHook.new(params[:hook])
-
-  if @hook.save
-    redirect_to admin_hooks_path, notice: 'Hook was successfully created.'
-  else
-    @hooks = SystemHook.all
-    render :index
-  end
-end
-
- -
- - - - -
- - -
- -
- destroy() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/admin/hooks_controller.rb, line 18
-def destroy
-  @hook = SystemHook.find(params[:id])
-  @hook.destroy
-
-  redirect_to admin_hooks_path
-end
-
- -
- - - - -
- - -
- -
- index() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/admin/hooks_controller.rb, line 2
-def index
-  @hooks = SystemHook.all
-  @hook = SystemHook.new
-end
-
- -
- - - - -
- - -
- -
- test() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/admin/hooks_controller.rb, line 26
-def test
-  @hook = SystemHook.find(params[:hook_id])
-  data = {
-    event_name: "project_create",
-    name: "Ruby",
-    path: "ruby",
-    project_id: 1,
-    owner_name: "Someone",
-    owner_email: "example@gitlabhq.com"
-  }
-  @hook.execute(data)
-
-  redirect_to :back
-end
-
- -
- - - - -
- - -
- -
- -
- - - - diff --git a/doc/app/Admin/LogsController.html b/doc/app/Admin/LogsController.html deleted file mode 100644 index 8f70b1ad..00000000 --- a/doc/app/Admin/LogsController.html +++ /dev/null @@ -1,439 +0,0 @@ - - - - - - -class Admin::LogsController - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

class Admin::LogsController

- -
- -
- - - - -
- - - - - - - - - - -
- -
- - - - diff --git a/doc/app/Admin/ProjectsController.html b/doc/app/Admin/ProjectsController.html deleted file mode 100644 index 5744746b..00000000 --- a/doc/app/Admin/ProjectsController.html +++ /dev/null @@ -1,733 +0,0 @@ - - - - - - -class Admin::ProjectsController - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

class Admin::ProjectsController

- -
- -
- - - - -
- - - - - - - - - - -
-

Public Instance Methods

- - -
- -
- create() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/admin/projects_controller.rb, line 29
-def create
-  @admin_project = Project.new(params[:project])
-  @admin_project.owner = current_user
-
-  if @admin_project.save
-    redirect_to [:admin, @admin_project], notice: 'Project was successfully created.'
-  else
-    render action: "new"
-  end
-end
-
- -
- - - - -
- - -
- -
- destroy() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/admin/projects_controller.rb, line 54
-def destroy
-  @admin_project.destroy
-
-  redirect_to admin_projects_url, notice: 'Project was successfully deleted.'
-end
-
- -
- - - - -
- - -
- -
- edit() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/admin/projects_controller.rb, line 20
-def edit
-end
-
- -
- - - - -
- - -
- -
- index() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/admin/projects_controller.rb, line 4
-def index
-  @admin_projects = Project.scoped
-  @admin_projects = @admin_projects.search(params[:name]) if params[:name].present?
-  @admin_projects = @admin_projects.page(params[:page]).per(20)
-end
-
- -
- - - - -
- - -
- -
- new() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/admin/projects_controller.rb, line 16
-def new
-  @admin_project = Project.new
-end
-
- -
- - - - -
- - -
- -
- show() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/admin/projects_controller.rb, line 10
-def show
-  @users = User.scoped
-  @users = @users.not_in_project(@admin_project) if @admin_project.users.present?
-  @users = @users.all
-end
-
- -
- - - - -
- - -
- -
- team_update() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/admin/projects_controller.rb, line 23
-def team_update
-  @admin_project.add_users_ids_to_team(params[:user_ids], params[:project_access])
-
-  redirect_to [:admin, @admin_project], notice: 'Project was successfully updated.'
-end
-
- -
- - - - -
- - -
- -
- update() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/admin/projects_controller.rb, line 40
-def update
-  owner_id = params[:project].delete(:owner_id)
-
-  if owner_id
-    @admin_project.owner = User.find(owner_id)
-  end
-
-  if @admin_project.update_attributes(params[:project])
-    redirect_to [:admin, @admin_project], notice: 'Project was successfully updated.'
-  else
-    render action: "edit"
-  end
-end
-
- -
- - - - -
- - -
- -
- -
- - - - diff --git a/doc/app/Admin/ResqueController.html b/doc/app/Admin/ResqueController.html deleted file mode 100644 index db73599b..00000000 --- a/doc/app/Admin/ResqueController.html +++ /dev/null @@ -1,484 +0,0 @@ - - - - - - -class Admin::ResqueController - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

class Admin::ResqueController

- -
- -
- - - - -
- - - - - - - - - - -
-

Public Instance Methods

- - -
- -
- show() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/admin/resque_controller.rb, line 2
-def show
-end
-
- -
- - - - -
- - -
- -
- -
- - - - diff --git a/doc/app/Admin/TeamMembersController.html b/doc/app/Admin/TeamMembersController.html deleted file mode 100644 index 907bf279..00000000 --- a/doc/app/Admin/TeamMembersController.html +++ /dev/null @@ -1,558 +0,0 @@ - - - - - - -class Admin::TeamMembersController - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

class Admin::TeamMembersController

- -
- -
- - - - -
- - - - - - - - - - -
-

Public Instance Methods

- - -
- -
- destroy() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/admin/team_members_controller.rb, line 16
-def destroy
-  @admin_team_member = UsersProject.find(params[:id])
-  @admin_team_member.destroy
-
-  redirect_to :back
-end
-
- -
- - - - -
- - -
- -
- edit() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/admin/team_members_controller.rb, line 2
-def edit
-  @admin_team_member = UsersProject.find(params[:id])
-end
-
- -
- - - - -
- - -
- -
- update() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/admin/team_members_controller.rb, line 6
-def update
-  @admin_team_member = UsersProject.find(params[:id])
-
-  if @admin_team_member.update_attributes(params[:team_member])
-    redirect_to [:admin, @admin_team_member.project],  notice: 'Project Access was successfully updated.'
-  else
-    render action: "edit"
-  end
-end
-
- -
- - - - -
- - -
- -
- -
- - - - diff --git a/doc/app/Admin/UsersController.html b/doc/app/Admin/UsersController.html deleted file mode 100644 index b300e4f7..00000000 --- a/doc/app/Admin/UsersController.html +++ /dev/null @@ -1,839 +0,0 @@ - - - - - - -class Admin::UsersController - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

class Admin::UsersController

- -
- -
- - - - -
- - - - - - - - - - -
-

Public Instance Methods

- - -
- -
- block() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/admin/users_controller.rb, line 40
-def block
-  @admin_user = User.find(params[:id])
-
-  if @admin_user.block
-    redirect_to :back, alert: "Successfully blocked"
-  else
-    redirect_to :back, alert: "Error occured. User was not blocked"
-  end
-end
-
- -
- - - - -
- - -
- -
- create() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/admin/users_controller.rb, line 60
-def create
-  admin = params[:user].delete("admin")
-
-  @admin_user = User.new(params[:user], as: :admin)
-  @admin_user.admin = (admin && admin.to_i > 0)
-
-  respond_to do |format|
-    if @admin_user.save
-      format.html { redirect_to [:admin, @admin_user], notice: 'User was successfully created.' }
-      format.json { render json: @admin_user, status: :created, location: @admin_user }
-    else
-      format.html { render action: "new" }
-      format.json { render json: @admin_user.errors, status: :unprocessable_entity }
-    end
-  end
-end
-
- -
- - - - -
- - -
- -
- destroy() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/admin/users_controller.rb, line 99
-def destroy
-  @admin_user = User.find(params[:id])
-  @admin_user.destroy
-
-  respond_to do |format|
-    format.html { redirect_to admin_users_url }
-    format.json { head :ok }
-  end
-end
-
- -
- - - - -
- - -
- -
- edit() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/admin/users_controller.rb, line 36
-def edit
-  @admin_user = User.find(params[:id])
-end
-
- -
- - - - -
- - -
- -
- index() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/admin/users_controller.rb, line 2
-def index
-  @admin_users = User.scoped
-  @admin_users = @admin_users.filter(params[:filter])
-  @admin_users = @admin_users.search(params[:name]) if params[:name].present?
-  @admin_users = @admin_users.order("updated_at DESC").page(params[:page])
-end
-
- -
- - - - -
- - -
- -
- new() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/admin/users_controller.rb, line 32
-def new
-  @admin_user = User.new({ projects_limit: Gitlab.config.default_projects_limit }, as: :admin)
-end
-
- -
- - - - -
- - -
- -
- show() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/admin/users_controller.rb, line 9
-def show
-  @admin_user = User.find(params[:id])
-
-  @projects = if @admin_user.projects.empty?
-             Project
-           else
-             Project.without_user(@admin_user)
-           end.all
-end
-
- -
- - - - -
- - -
- -
- team_update() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/admin/users_controller.rb, line 19
-def team_update
-  @admin_user = User.find(params[:id])
-
-  UsersProject.user_bulk_import(
-    @admin_user,
-    params[:project_ids],
-    params[:project_access]
-  )
-
-  redirect_to [:admin, @admin_user], notice: 'Teams were successfully updated.'
-end
-
- -
- - - - -
- - -
- -
- unblock() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/admin/users_controller.rb, line 50
-def unblock
-  @admin_user = User.find(params[:id])
-
-  if @admin_user.update_attribute(:blocked, false)
-    redirect_to :back, alert: "Successfully unblocked"
-  else
-    redirect_to :back, alert: "Error occured. User was not unblocked"
-  end
-end
-
- -
- - - - -
- - -
- -
- update() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/admin/users_controller.rb, line 77
-def update
-  admin = params[:user].delete("admin")
-
-  if params[:user][:password].blank?
-    params[:user].delete(:password)
-    params[:user].delete(:password_confirmation)
-  end
-
-  @admin_user = User.find(params[:id])
-  @admin_user.admin = (admin && admin.to_i > 0)
-
-  respond_to do |format|
-    if @admin_user.update_attributes(params[:user], as: :admin)
-      format.html { redirect_to [:admin, @admin_user], notice: 'User was successfully updated.' }
-      format.json { head :ok }
-    else
-      format.html { render action: "edit" }
-      format.json { render json: @admin_user.errors, status: :unprocessable_entity }
-    end
-  end
-end
-
- -
- - - - -
- - -
- -
- -
- - - - diff --git a/doc/app/AdminController.html b/doc/app/AdminController.html deleted file mode 100644 index bdda7958..00000000 --- a/doc/app/AdminController.html +++ /dev/null @@ -1,490 +0,0 @@ - - - - - - -class AdminController - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

class AdminController

- -
- -

Provides a base class for Admin controllers to -subclass

- -

Automatically sets the layout and ensures an administrator is logged in

- -
- - - - -
- - - - - - - - - - -
-

Public Instance Methods

- - -
- -
- authenticate_admin!() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/admin_controller.rb, line 8
-def authenticate_admin!
-  return render_404 unless current_user.is_admin?
-end
-
- -
- - - - -
- - -
- -
- -
- - - - diff --git a/doc/app/ApplicationController.html b/doc/app/ApplicationController.html deleted file mode 100644 index dafa3413..00000000 --- a/doc/app/ApplicationController.html +++ /dev/null @@ -1,1015 +0,0 @@ - - - - - - -class ApplicationController - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

class ApplicationController

- -
- -
- - - - -
- - - - - - - - - - -
-

Protected Instance Methods

- - -
- -
- abilities() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/application_controller.rb, line 48
-def abilities
-  @abilities ||= Six.new
-end
-
- -
- - - - -
- - -
- -
- access_denied!() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/application_controller.rb, line 73
-def access_denied!
-  render "errors/access_denied", layout: "errors", status: 404
-end
-
- -
- - - - -
- - -
- -
- add_project_abilities() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/application_controller.rb, line 61
-def add_project_abilities
-  abilities << Ability
-end
-
- -
- - - - -
- - -
- -
- after_sign_in_path_for(resource) - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/application_controller.rb, line 33
-def after_sign_in_path_for resource
-  if resource.is_a?(User) && resource.respond_to?(:blocked) && resource.blocked
-    sign_out resource
-    flash[:alert] = "Your account was blocked"
-    new_user_session_path
-  else
-    super
-  end
-end
-
- -
- - - - -
- - -
- -
- authorize_code_access!() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/application_controller.rb, line 69
-def authorize_code_access!
-  return access_denied! unless can?(current_user, :download_code, project)
-end
-
- -
- - - - -
- - -
- -
- authorize_project!(action) - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/application_controller.rb, line 65
-def authorize_project!(action)
-  return access_denied! unless can?(current_user, action, project)
-end
-
- -
- - - - -
- - -
- -
- can?(object, action, subject) - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/application_controller.rb, line 52
-def can?(object, action, subject)
-  abilities.allowed?(object, action, subject)
-end
-
- -
- - - - -
- - -
- -
- dev_tools() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/application_controller.rb, line 107
-def dev_tools
-  Rack::MiniProfiler.authorize_request
-end
-
- -
- - - - -
- - -
- -
- git_not_found!() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/application_controller.rb, line 81
-def git_not_found!
-  render "errors/git_not_found", layout: "errors", status: 404
-end
-
- -
- - - - -
- - -
- -
- method_missing(method_sym, *arguments, &block) - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/application_controller.rb, line 85
-def method_missing(method_sym, *arguments, &block)
-  if method_sym.to_s =~ %r^authorize_(.*)!$/
-    authorize_project!($1.to_sym)
-  else
-    super
-  end
-end
-
- -
- - - - -
- - -
- -
- no_cache_headers() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/application_controller.rb, line 101
-def no_cache_headers
-  response.headers["Cache-Control"] = "no-cache, no-store, max-age=0, must-revalidate"
-  response.headers["Pragma"] = "no-cache"
-  response.headers["Expires"] = "Fri, 01 Jan 1990 00:00:00 GMT"
-end
-
- -
- - - - -
- - -
- -
- not_found!() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/application_controller.rb, line 77
-def not_found!
-  render "errors/not_found", layout: "errors", status: 404
-end
-
- -
- - - - -
- - -
- -
- project() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/application_controller.rb, line 56
-def project
-  @project ||= current_user.projects.find_by_code(params[:project_id] || params[:id])
-  @project || render_404
-end
-
- -
- - - - -
- - -
- -
- reject_blocked!() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/application_controller.rb, line 25
-def reject_blocked!
-  if current_user && current_user.blocked
-    sign_out current_user
-    flash[:alert] = "Your account was blocked"
-    redirect_to new_user_session_path
-  end
-end
-
- -
- - - - -
- - -
- -
- render_404() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/application_controller.rb, line 93
-def render_404
-  render file: Rails.root.join("public", "404"), layout: false, status: "404"
-end
-
- -
- - - - -
- - -
- -
- require_non_empty_project() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/application_controller.rb, line 97
-def require_non_empty_project
-  redirect_to @project if @project.empty_repo?
-end
-
- -
- - - - -
- - -
- -
- set_current_user_for_observers() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/application_controller.rb, line 43
-def set_current_user_for_observers
-  MergeRequestObserver.current_user = current_user
-  IssueObserver.current_user = current_user
-end
-
- -
- - - - -
- - -
- -
- -
- - - - diff --git a/doc/app/ApplicationDecorator.html b/doc/app/ApplicationDecorator.html deleted file mode 100644 index 72a459bb..00000000 --- a/doc/app/ApplicationDecorator.html +++ /dev/null @@ -1,439 +0,0 @@ - - - - - - -class ApplicationDecorator - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

class ApplicationDecorator

- -
- -
- - - - -
- - - - - - - - - - -
- -
- - - - diff --git a/doc/app/ApplicationHelper.html b/doc/app/ApplicationHelper.html deleted file mode 100644 index 9bc4243e..00000000 --- a/doc/app/ApplicationHelper.html +++ /dev/null @@ -1,1018 +0,0 @@ - - - - - - -module ApplicationHelper - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

module ApplicationHelper

- -
- -
- - - - -
- - - - - - - - - - -
-

Public Instance Methods

- - -
- -
- app_theme() - click to toggle source -
- - -
- - - - - -
-
# File app/helpers/application_helper.rb, line 125
-def app_theme
-  Gitlab::Theme.css_class_by_id(current_user.try(:theme_id))
-end
-
- -
- - - - -
- - -
- -
- authbutton(provider, size = 64) - click to toggle source -
- - -
- - - - - -
-
# File app/helpers/application_helper.rb, line 150
-def authbutton(provider, size = 64)
-  file_name = "#{provider.to_s.split('_').first}_#{size}.png"
-  image_tag("authbuttons/#{file_name}",
-            alt: "Sign in with #{provider.to_s.titleize}")
-end
-
- -
- - - - -
- - -
- -
- current_action?(*args) - click to toggle source -
- - -
- -

Check if a partcular action is the current one

- -

args - One or more action names to check

- -

Examples

- -
# On Projects#new
-current_action?(:new)           # => true
-current_action?(:create)        # => false
-current_action?(:new, :create)  # => true
-
- - - -
-
# File app/helpers/application_helper.rb, line 29
-def current_action?(*args)
-  args.any? { |v| v.to_s.downcase == action_name }
-end
-
- -
- - - - -
- - -
- -
- current_controller?(*args) - click to toggle source -
- - -
- -

Check if a particular controller is the current one

- -

args - One or more controller names to check

- -

Examples

- -
# On TreeController
-current_controller?(:tree)           # => true
-current_controller?(:commits)        # => false
-current_controller?(:commits, :tree) # => true
-
- - - -
-
# File app/helpers/application_helper.rb, line 15
-def current_controller?(*args)
-  args.any? { |v| v.to_s.downcase == controller.controller_name }
-end
-
- -
- - - - -
- - -
- -
- emoji_autocomplete_source() - click to toggle source -
- - -
- - - - - -
-
# File app/helpers/application_helper.rb, line 115
-def emoji_autocomplete_source
-  # should be an array of strings
-  # so to_s can be called, because it is sufficient and to_json is too slow
-  Emoji.names.to_s
-end
-
- -
- - - - -
- - -
- -
- gravatar_icon(user_email = '', size = 40) - click to toggle source -
- - -
- - - - - -
-
# File app/helpers/application_helper.rb, line 33
-def gravatar_icon(user_email = '', size = 40)
-  if Gitlab.config.disable_gravatar? || user_email.blank?
-    'no_avatar.png'
-  else
-    gravatar_prefix = request.ssl? ? "https://secure" : "http://www"
-    user_email.strip!
-    "#{gravatar_prefix}.gravatar.com/avatar/#{Digest::MD5.hexdigest(user_email.downcase)}?s=#{size}&d=identicon"
-  end
-end
-
- -
- - - - -
- - -
- -
- grouped_options_refs(destination = :tree) - click to toggle source -
- - -
- - - - - -
-
# File app/helpers/application_helper.rb, line 61
-def grouped_options_refs(destination = :tree)
-  options = [
-    ["Branch", @project.branch_names ],
-    [ "Tag", @project.tag_names ]
-  ]
-
-  # If reference is commit id -
-  # we should add it to branch/tag selectbox
-  if(@ref && !options.flatten.include?(@ref) &&
-     @ref =~ %r^[0-9a-zA-Z]{6,52}$/)
-    options << ["Commit", [@ref]]
-  end
-
-  grouped_options_for_select(options, @ref || @project.default_branch)
-end
-
- -
- - - - -
- - -
- -
- hexdigest(string) - click to toggle source -
- - -
- - - - - -
-
# File app/helpers/application_helper.rb, line 137
-def hexdigest(string)
-  Digest::SHA1.hexdigest string
-end
-
- -
- - - - -
- - -
- -
- last_commit(project) - click to toggle source -
- - -
- - - - - -
-
# File app/helpers/application_helper.rb, line 51
-def last_commit(project)
-  if project.repo_exists?
-    time_ago_in_words(project.commit.committed_date) + " ago"
-  else
-    "Never"
-  end
-rescue
-  "Never"
-end
-
- -
- - - - -
- - -
- -
- ldap_enable?() - click to toggle source -
- - -
- - - - - -
-
# File app/helpers/application_helper.rb, line 121
-def ldap_enable?
-  Devise.omniauth_providers.include?(:ldap)
-end
-
- -
- - - - -
- - -
- -
- project_last_activity(project) - click to toggle source -
- - -
- - - - - -
-
# File app/helpers/application_helper.rb, line 141
-def project_last_activity project
-  activity = project.last_activity
-  if activity && activity.created_at
-    time_ago_in_words(activity.created_at) + " ago"
-  else
-    "Never"
-  end
-end
-
- -
- - - - -
- - -
- -
- request_protocol() - click to toggle source -
- - -
- - - - - -
-
# File app/helpers/application_helper.rb, line 43
-def request_protocol
-  request.ssl? ? "https" : "http"
-end
-
- -
- - - - -
- - -
- -
- search_autocomplete_source() - click to toggle source -
- - -
- - - - - -
-
# File app/helpers/application_helper.rb, line 77
-def search_autocomplete_source
-  projects = current_user.projects.map{ |p| { label: p.name, url: project_path(p) } }
-
-  default_nav = [
-    { label: "My Profile", url: profile_path },
-    { label: "My SSH Keys", url: keys_path },
-    { label: "My Dashboard", url: root_path },
-    { label: "Admin Section", url: admin_root_path },
-  ]
-
-  help_nav = [
-    { label: "Workflow Help", url: help_workflow_path },
-    { label: "Permissions Help", url: help_permissions_path },
-    { label: "Web Hooks Help", url: help_web_hooks_path },
-    { label: "System Hooks Help", url: help_system_hooks_path },
-    { label: "API Help", url: help_api_path },
-    { label: "Markdown Help", url: help_markdown_path },
-    { label: "SSH Keys Help", url: help_ssh_path },
-  ]
-
-  project_nav = []
-  if @project && !@project.new_record?
-    project_nav = [
-      { label: "#{@project.name} Issues",   url: project_issues_path(@project) },
-      { label: "#{@project.name} Commits",  url: project_commits_path(@project, @ref || @project.root_ref) },
-      { label: "#{@project.name} Merge Requests", url: project_merge_requests_path(@project) },
-      { label: "#{@project.name} Milestones", url: project_milestones_path(@project) },
-      { label: "#{@project.name} Snippets", url: project_snippets_path(@project) },
-      { label: "#{@project.name} Team",     url: project_team_index_path(@project) },
-      { label: "#{@project.name} Tree",     url: project_tree_path(@project, @ref || @project.root_ref) },
-      { label: "#{@project.name} Wall",     url: wall_project_path(@project) },
-      { label: "#{@project.name} Wiki",     url: project_wikis_path(@project) },
-    ]
-  end
-
-  [projects, default_nav, project_nav, help_nav].flatten.to_json
-end
-
- -
- - - - -
- - -
- -
- show_last_push_widget?(event) - click to toggle source -
- - -
- - - - - -
-
# File app/helpers/application_helper.rb, line 129
-def show_last_push_widget?(event)
-  event &&
-    event.last_push_to_non_root? &&
-    !event.rm_ref? &&
-    event.project &&
-    event.project.merge_requests_enabled
-end
-
- -
- - - - -
- - -
- -
- web_app_url() - click to toggle source -
- - -
- - - - - -
-
# File app/helpers/application_helper.rb, line 47
-def web_app_url
-  "#{request_protocol}://#{Gitlab.config.web_host}/"
-end
-
- -
- - - - -
- - -
- -
- -
- - - - diff --git a/doc/app/AttachmentUploader.html b/doc/app/AttachmentUploader.html deleted file mode 100644 index b6e9d1ba..00000000 --- a/doc/app/AttachmentUploader.html +++ /dev/null @@ -1,486 +0,0 @@ - - - - - - -class AttachmentUploader - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

class AttachmentUploader

- -
- -
- - - - -
- - - - - - - - - - -
-

Public Instance Methods

- - -
- -
- store_dir() - click to toggle source -
- - -
- -

Override the directory where uploaded files will be stored. This is a -sensible default for uploaders that are meant to be mounted:

- - - -
-
# File app/uploaders/attachment_uploader.rb, line 15
-def store_dir
-  "uploads/#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}"
-end
-
- -
- - - - -
- - -
- -
- -
- - - - diff --git a/doc/app/Authority.html b/doc/app/Authority.html deleted file mode 100644 index 92f46c55..00000000 --- a/doc/app/Authority.html +++ /dev/null @@ -1,782 +0,0 @@ - - - - - - -module Authority - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

module Authority

- -
- -
- - - - -
- - - - - - - - - - -
-

Public Instance Methods

- - -
- -
- add_access(user, *access) - click to toggle source -
- - -
- -

Compatible with all access rights Should be rewrited for new access rights

- - - -
-
# File app/roles/authority.rb, line 4
-def add_access(user, *access)
-  access = if access.include?(:admin)
-             { project_access: UsersProject::MASTER }
-           elsif access.include?(:write)
-             { project_access: UsersProject::DEVELOPER }
-           else
-             { project_access: UsersProject::REPORTER }
-           end
-  opts = { user: user }
-  opts.merge!(access)
-  users_projects.create(opts)
-end
-
- -
- - - - -
- - -
- -
- allow_read_for?(user) - click to toggle source -
- - -
- - - - - -
-
# File app/roles/authority.rb, line 39
-def allow_read_for?(user)
-  !users_projects.where(user_id: user.id).empty?
-end
-
- -
- - - - -
- - -
- -
- dev_access_for?(user) - click to toggle source -
- - -
- - - - - -
-
# File app/roles/authority.rb, line 51
-def dev_access_for?(user)
-  !users_projects.where(user_id: user.id, project_access: [UsersProject::DEVELOPER, UsersProject::MASTER]).empty?
-end
-
- -
- - - - -
- - -
- -
- guest_access_for?(user) - click to toggle source -
- - -
- - - - - -
-
# File app/roles/authority.rb, line 43
-def guest_access_for?(user)
-  !users_projects.where(user_id: user.id).empty?
-end
-
- -
- - - - -
- - -
- -
- master_access_for?(user) - click to toggle source -
- - -
- - - - - -
-
# File app/roles/authority.rb, line 55
-def master_access_for?(user)
-  !users_projects.where(user_id: user.id, project_access: [UsersProject::MASTER]).empty?
-end
-
- -
- - - - -
- - -
- -
- report_access_for?(user) - click to toggle source -
- - -
- - - - - -
-
# File app/roles/authority.rb, line 47
-def report_access_for?(user)
-  !users_projects.where(user_id: user.id, project_access: [UsersProject::REPORTER, UsersProject::DEVELOPER, UsersProject::MASTER]).empty?
-end
-
- -
- - - - -
- - -
- -
- repository_masters() - click to toggle source -
- - -
- - - - - -
-
# File app/roles/authority.rb, line 33
-def repository_masters
-  keys = Key.joins({user: :users_projects}).
-    where("users_projects.project_id = ? AND users_projects.project_access = ?", id, UsersProject::MASTER)
-  keys.map(&:identifier)
-end
-
- -
- - - - -
- - -
- -
- repository_readers() - click to toggle source -
- - -
- - - - - -
-
# File app/roles/authority.rb, line 21
-def repository_readers
-  keys = Key.joins({user: :users_projects}).
-    where("users_projects.project_id = ? AND users_projects.project_access = ?", id, UsersProject::REPORTER)
-  keys.map(&:identifier) + deploy_keys.map(&:identifier)
-end
-
- -
- - - - -
- - -
- -
- repository_writers() - click to toggle source -
- - -
- - - - - -
-
# File app/roles/authority.rb, line 27
-def repository_writers
-  keys = Key.joins({user: :users_projects}).
-    where("users_projects.project_id = ? AND users_projects.project_access = ?", id, UsersProject::DEVELOPER)
-  keys.map(&:identifier)
-end
-
- -
- - - - -
- - -
- -
- reset_access(user) - click to toggle source -
- - -
- - - - - -
-
# File app/roles/authority.rb, line 17
-def reset_access(user)
-  users_projects.where(project_id: self.id, user_id: user.id).destroy if self.id
-end
-
- -
- - - - -
- - -
- -
- -
- - - - diff --git a/doc/app/BaseContext.html b/doc/app/BaseContext.html deleted file mode 100644 index b9c46738..00000000 --- a/doc/app/BaseContext.html +++ /dev/null @@ -1,605 +0,0 @@ - - - - - - -class BaseContext - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

class BaseContext

- -
- -
- - - - -
- - - - - - - - -
-

Attributes

- - -
-
- current_user[RW] -
- -
- - - -
-
- -
-
- params[RW] -
- -
- - - -
-
- -
-
- project[RW] -
- -
- - - -
-
- -
- - - - -
-

Public Class Methods

- - -
- -
- new(project, user, params) - click to toggle source -
- - -
- - - - - -
-
# File app/contexts/base_context.rb, line 4
-def initialize(project, user, params)
-  @project, @current_user, @params = project, user, params.dup
-end
-
- -
- - - - -
- - -
- -
-

Public Instance Methods

- - -
- -
- abilities() - click to toggle source -
- - -
- - - - - -
-
# File app/contexts/base_context.rb, line 8
-def abilities
-  @abilities ||= begin
-                   abilities = Six.new
-                   abilities << Ability
-                   abilities
-                 end
-end
-
- -
- - - - -
- - -
- -
- can?(object, action, subject) - click to toggle source -
- - -
- - - - - -
-
# File app/contexts/base_context.rb, line 16
-def can?(object, action, subject)
-  abilities.allowed?(object, action, subject)
-end
-
- -
- - - - -
- - -
- -
- -
- - - - diff --git a/doc/app/BlameController.html b/doc/app/BlameController.html deleted file mode 100644 index 4b23b227..00000000 --- a/doc/app/BlameController.html +++ /dev/null @@ -1,500 +0,0 @@ - - - - - - -class BlameController - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

class BlameController

- -
- -

Controller for viewing a file’s blame

- -
- - - - -
- - - - - - - - - - -
-

Public Instance Methods

- - -
- -
- show() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/blame_controller.rb, line 12
-def show
-  @repo = @project.repo
-  @blame = Grit::Blob.blame(@repo, @commit.id, @path)
-end
-
- -
- - - - -
- - -
- -
- -
- - - - diff --git a/doc/app/BlobController.html b/doc/app/BlobController.html deleted file mode 100644 index e8f069c2..00000000 --- a/doc/app/BlobController.html +++ /dev/null @@ -1,519 +0,0 @@ - - - - - - -class BlobController - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

class BlobController

- -
- -

Controller for viewing a file’s blame

- -
- - - - -
- - - - - - - - - - -
-

Public Instance Methods

- - -
- -
- show() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/blob_controller.rb, line 13
-def show
-  if @tree.is_blob?
-    if @tree.text?
-      encoding = detect_encoding(@tree.data)
-      mime_type = encoding ? "text/plain; charset=#{encoding}" : "text/plain"
-    else
-      mime_type = @tree.mime_type
-    end
-
-    send_data(
-      @tree.data,
-      type: mime_type,
-      disposition: 'inline',
-      filename: @tree.name
-    )
-  else
-    not_found!
-  end
-end
-
- -
- - - - -
- - -
- -
- -
- - - - diff --git a/doc/app/Commit.html b/doc/app/Commit.html deleted file mode 100644 index 05a3f3ce..00000000 --- a/doc/app/Commit.html +++ /dev/null @@ -1,1191 +0,0 @@ - - - - - - -class Commit - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

class Commit

- -
- -
- - - - -
- - - - - - - - -
-

Attributes

- - -
-
- commit[RW] -
- -
- - - -
-
- -
-
- head[RW] -
- -
- - - -
-
- -
-
- refs[RW] -
- -
- - - -
-
- -
- - - - -
-

Public Class Methods

- - -
- -
- commits(repo, ref, path = nil, limit = nil, offset = nil) - click to toggle source -
- - -
- - - - - -
-
# File app/models/commit.rb, line 58
-def commits(repo, ref, path = nil, limit = nil, offset = nil)
-  if path
-    repo.log(ref, path, max_count: limit, skip: offset)
-  elsif limit && offset
-    repo.commits(ref, limit, offset)
-  else
-    repo.commits(ref)
-  end.map{ |c| Commit.new(c) }
-end
-
- -
- - - - -
- - -
- -
- commits_between(repo, from, to) - click to toggle source -
- - -
- - - - - -
-
# File app/models/commit.rb, line 68
-def commits_between(repo, from, to)
-  repo.commits_between(from, to).map { |c| Commit.new(c) }
-end
-
- -
- - - - -
- - -
- -
- commits_since(repo, date) - click to toggle source -
- - -
- - - - - -
-
# File app/models/commit.rb, line 46
-def commits_since(repo, date)
-  commits = repo.heads.map do |h|
-    repo.log(h.name, nil, since: date).each { |c| Commit.new(c, h) }
-  end.flatten.uniq { |c| c.id }
-
-  commits.sort! do |x, y|
-    y.committed_date <=> x.committed_date
-  end
-
-  commits
-end
-
- -
- - - - -
- - -
- -
- commits_with_refs(repo, n = 20) - click to toggle source -
- - -
- - - - - -
-
# File app/models/commit.rb, line 36
-def commits_with_refs(repo, n = 20)
-  commits = repo.branches.map { |ref| Commit.new(ref.commit, ref) }
-
-  commits.sort! do |x, y|
-    y.committed_date <=> x.committed_date
-  end
-
-  commits[0..n]
-end
-
- -
- - - - -
- - -
- -
- compare(project, from, to) - click to toggle source -
- - -
- - - - - -
-
# File app/models/commit.rb, line 72
-def compare(project, from, to)
-  result = {
-    commits: [],
-    diffs: [],
-    commit: nil,
-    same: false
-  }
-
-  return result unless from && to
-
-  first = project.commit(to.try(:strip))
-  last = project.commit(from.try(:strip))
-
-  if first && last
-    commits = [first, last].sort_by(&:created_at)
-    younger = commits.first
-    older = commits.last
-
-    result[:same] = (younger.id == older.id)
-    result[:commits] = project.repo.commits_between(younger.id, older.id).map {|c| Commit.new(c)}
-    result[:diffs] = project.repo.diff(younger.id, older.id) rescue []
-    result[:commit] = Commit.new(older)
-  end
-
-  result
-end
-
- -
- - - - -
- - -
- -
- find_or_first(repo, commit_id = nil, root_ref) - click to toggle source -
- - -
- - - - - -
-
# File app/models/commit.rb, line 14
-def find_or_first(repo, commit_id = nil, root_ref)
-  commit = if commit_id
-             repo.commit(commit_id)
-           else
-             repo.commits(root_ref).first
-           end
-
-  Commit.new(commit) if commit
-end
-
- -
- - - - -
- - -
- -
- fresh_commits(repo, n = 10) - click to toggle source -
- - -
- - - - - -
-
# File app/models/commit.rb, line 24
-def fresh_commits(repo, n = 10)
-  commits = repo.heads.map do |h|
-    repo.commits(h.name, n).map { |c| Commit.new(c, h) }
-  end.flatten.uniq { |c| c.id }
-
-  commits.sort! do |x, y|
-    y.committed_date <=> x.committed_date
-  end
-
-  commits[0...n]
-end
-
- -
- - - - -
- - -
- -
- new(raw_commit, head = nil) - click to toggle source -
- - -
- - - - - -
-
# File app/models/commit.rb, line 100
-def initialize(raw_commit, head = nil)
-  @commit = raw_commit
-  @head = head
-end
-
- -
- - - - -
- - -
- -
-

Public Instance Methods

- - -
- -
- author_email() - click to toggle source -
- - -
- - - - - -
-
# File app/models/commit.rb, line 117
-def author_email
-  author.email
-end
-
- -
- - - - -
- - -
- -
- author_name() - click to toggle source -
- - -
- - - - - -
-
# File app/models/commit.rb, line 121
-def author_name
-  utf8 author.name
-end
-
- -
- - - - -
- - -
- -
- committer_email() - click to toggle source -
- - -
- - - - - -
-
# File app/models/commit.rb, line 134
-def committer_email
-  committer.email
-end
-
- -
- - - - -
- - -
- -
- committer_name() - click to toggle source -
- - -
- - - - - -
-
# File app/models/commit.rb, line 130
-def committer_name
-  utf8 committer.name
-end
-
- -
- - - - -
- - -
- -
- created_at() - click to toggle source -
- - -
- - - - - -
-
# File app/models/commit.rb, line 113
-def created_at
-  committed_date
-end
-
- -
- - - - -
- - -
- -
- different_committer?() - click to toggle source -
- - -
- -

Was this commit committed by a different person than the original author?

- - - -
-
# File app/models/commit.rb, line 126
-def different_committer?
-  author_name != committer_name || author_email != committer_email
-end
-
- -
- - - - -
- - -
- -
- parents_count() - click to toggle source -
- - -
- - - - - -
-
# File app/models/commit.rb, line 146
-def parents_count
-  parents && parents.count || 0
-end
-
- -
- - - - -
- - -
- -
- prev_commit() - click to toggle source -
- - -
- - - - - -
-
# File app/models/commit.rb, line 138
-def prev_commit
-  parents.try :first
-end
-
- -
- - - - -
- - -
- -
- prev_commit_id() - click to toggle source -
- - -
- - - - - -
-
# File app/models/commit.rb, line 142
-def prev_commit_id
-  prev_commit.try :id
-end
-
- -
- - - - -
- - -
- -
- safe_message() - click to toggle source -
- - -
- - - - - -
-
# File app/models/commit.rb, line 109
-def safe_message
-  @safe_message ||= utf8 message
-end
-
- -
- - - - -
- - -
- -
- short_id(length = 10) - click to toggle source -
- - -
- - - - - -
-
# File app/models/commit.rb, line 105
-def short_id(length = 10)
-  id.to_s[0..length]
-end
-
- -
- - - - -
- - -
- -
- -
- - - - diff --git a/doc/app/CommitController.html b/doc/app/CommitController.html deleted file mode 100644 index 564161e9..00000000 --- a/doc/app/CommitController.html +++ /dev/null @@ -1,509 +0,0 @@ - - - - - - -class CommitController - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

class CommitController

- -
- -

Controller for a specific Commit

- -

Not to be confused with CommitsController, plural.

- -
- - - - -
- - - - - - - - - - -
-

Public Instance Methods

- - -
- -
- show() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/commit_controller.rb, line 10
-def show
-  result = CommitLoadContext.new(project, current_user, params).execute
-
-  @commit = result[:commit]
-  git_not_found! unless @commit
-
-  @suppress_diff    = result[:suppress_diff]
-  @note             = result[:note]
-  @line_notes       = result[:line_notes]
-  @notes_count      = result[:notes_count]
-  @comments_allowed = true
-
-  respond_to do |format|
-    format.html do
-      if result[:status] == :huge_commit
-        render "huge_commit" and return
-      end
-    end
-
-    format.patch
-  end
-end
-
- -
- - - - -
- - -
- -
- -
- - - - diff --git a/doc/app/CommitDecorator.html b/doc/app/CommitDecorator.html deleted file mode 100644 index 3cca57a4..00000000 --- a/doc/app/CommitDecorator.html +++ /dev/null @@ -1,663 +0,0 @@ - - - - - - -class CommitDecorator - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

class CommitDecorator

- -
- -
- - - - -
- - - - - - - - - - -
-

Public Instance Methods

- - - - - -
- -
- description() - click to toggle source -
- - -
- -

Returns the commits description

- -

cut off, ellipses (`&hellp;`) are prepended to the commit message.

- - - -
-
# File app/decorators/commit_decorator.rb, line 34
-def description
-  description = safe_message
-
-  title_end = description.index(%r\n/)
-  if (!title_end && description.length > 80) || (title_end && title_end > 80)
-    "&hellip;".html_safe << description[70..-1]
-  else
-    description.split(%r\n/, 2)[1].try(:chomp)
-  end
-end
-
- -
- - - - -
- - - - - -
- -
- title() - click to toggle source -
- - -
- -

Returns the commits title.

- -

Usually, the commit title is the first line of the commit message. In case -this first line is longer than 80 characters, it is cut off after 70 -characters and ellipses (`&hellp;`) are appended.

- - - -
-
# File app/decorators/commit_decorator.rb, line 18
-def title
-  title = safe_message
-
-  return no_commit_message if title.blank?
-
-  title_end = title.index(%r\n/)
-  if (!title_end && title.length > 80) || (title_end && title_end > 80)
-    title[0..69] << "&hellip;".html_safe
-  else
-    title.split(%r\n/, 2).first
-  end
-end
-
- -
- - - - -
- - -
- -
-

Protected Instance Methods

- - -
- -
- no_commit_message() - click to toggle source -
- - -
- - - - - -
-
# File app/decorators/commit_decorator.rb, line 69
-def no_commit_message
-  "--no commit message"
-end
-
- -
- - - - -
- - -
- -
- -
- - - - diff --git a/doc/app/CommitLoadContext.html b/doc/app/CommitLoadContext.html deleted file mode 100644 index feb6dbf4..00000000 --- a/doc/app/CommitLoadContext.html +++ /dev/null @@ -1,513 +0,0 @@ - - - - - - -class CommitLoadContext - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

class CommitLoadContext

- -
- -
- - - - -
- - - - - - - - - - -
-

Public Instance Methods

- - -
- -
- execute() - click to toggle source -
- - -
- - - - - -
-
# File app/contexts/commit_load_context.rb, line 2
-def execute
-  result = {
-    commit: nil,
-    suppress_diff: false,
-    line_notes: [],
-    notes_count: 0,
-    note: nil,
-    status: :ok
-  }
-
-  commit = project.commit(params[:id])
-
-  if commit
-    commit = CommitDecorator.decorate(commit)
-    line_notes = project.commit_line_notes(commit)
-
-    result[:commit] = commit
-    result[:note] = project.build_commit_note(commit)
-    result[:line_notes] = line_notes
-    result[:notes_count] = line_notes.count + project.commit_notes(commit).count
-
-    begin
-      result[:suppress_diff] = true if commit.diffs.size > 200 && !params[:force_show_diff]
-    rescue Grit::Git::GitTimeout
-      result[:suppress_diff] = true
-      result[:status] = :huge_commit
-    end
-  end
-
-  result
-end
-
- -
- - - - -
- - -
- -
- -
- - - - diff --git a/doc/app/CommitsController.html b/doc/app/CommitsController.html deleted file mode 100644 index 52eaad04..00000000 --- a/doc/app/CommitsController.html +++ /dev/null @@ -1,507 +0,0 @@ - - - - - - -class CommitsController - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

class CommitsController

- -
- -
- - - - -
- - - - - - - - - - -
-

Public Instance Methods

- - -
- -
- show() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/commits_controller.rb, line 11
-def show
-  @repo = @project.repo
-  @limit, @offset = (params[:limit] || 40), (params[:offset] || 0)
-
-  @commits = @project.commits(@ref, @path, @limit, @offset)
-  @commits = CommitDecorator.decorate(@commits)
-
-  respond_to do |format|
-    format.html # index.html.erb
-    format.js
-    format.atom { render layout: false }
-  end
-end
-
- -
- - - - -
- - -
- -
- -
- - - - diff --git a/doc/app/CommitsHelper.html b/doc/app/CommitsHelper.html deleted file mode 100644 index 58844bec..00000000 --- a/doc/app/CommitsHelper.html +++ /dev/null @@ -1,625 +0,0 @@ - - - - - - -module CommitsHelper - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

module CommitsHelper

- -
- -
- - - - -
- - - - - - - - - - -
-

Public Instance Methods

- - -
- -
- build_line_anchor(index, line_new, line_old) - click to toggle source -
- - -
- - - - - -
-
# File app/helpers/commits_helper.rb, line 12
-def build_line_anchor(index, line_new, line_old)
-  "#{index}_#{line_old}_#{line_new}"
-end
-
- -
- - - - -
- - -
- -
- each_diff_line(diff_arr, index) { |full_line, type, nil, nil, nil| ... } - click to toggle source -
- - -
- - - - - -
-
# File app/helpers/commits_helper.rb, line 16
-def each_diff_line(diff_arr, index)
-  line_old = 1
-  line_new = 1
-  type = nil
-
-  lines_arr = ::Gitlab::InlineDiff.processing diff_arr
-  lines_arr.each do |line|
-    next if line.match(%r^\-\-\- \/dev\/null/)
-    next if line.match(%r^\+\+\+ \/dev\/null/)
-    next if line.match(%r^\-\-\- a/)
-    next if line.match(%r^\+\+\+ b/)
-
-    full_line = html_escape(line.gsub(%r\n/, ''))
-    full_line = ::Gitlab::InlineDiff.replace_markers full_line
-
-    if line.match(%r^@@ -/)
-      type = "match"
-
-      line_old = line.match(%r\-[0-9]*/)[0].to_i.abs rescue 0
-      line_new = line.match(%r\+[0-9]*/)[0].to_i.abs rescue 0
-
-      next if line_old == 1 && line_new == 1 #top of file
-      yield(full_line, type, nil, nil, nil)
-      next
-    else
-      type = identification_type(line)
-      line_code = build_line_anchor(index, line_new, line_old)
-      yield(full_line, type, line_code, line_new, line_old)
-    end
-
-
-    if line[0] == "+"
-      line_new += 1
-    elsif line[0] == "-"
-      line_old += 1
-    else
-      line_new += 1
-      line_old += 1
-    end
-  end
-end
-
- -
- - - - -
- - -
- -
- identification_type(line) - click to toggle source -
- - -
- - - - - -
-
# File app/helpers/commits_helper.rb, line 2
-def identification_type(line)
-  if line[0] == "+"
-    "new"
-  elsif line[0] == "-"
-    "old"
-  else
-    nil
-  end
-end
-
- -
- - - - -
- - -
- -
- image_diff_class(diff) - click to toggle source -
- - -
- - - - - -
-
# File app/helpers/commits_helper.rb, line 58
-def image_diff_class(diff)
-  if diff.deleted_file
-    "diff_image_removed"
-  elsif diff.new_file
-    "diff_image_added"
-  else
-    nil
-  end
-end
-
- -
- - - - -
- - -
- -
- -
- - - - diff --git a/doc/app/CompareController.html b/doc/app/CompareController.html deleted file mode 100644 index 177e22d2..00000000 --- a/doc/app/CompareController.html +++ /dev/null @@ -1,556 +0,0 @@ - - - - - - -class CompareController - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

class CompareController

- -
- -
- - - - -
- - - - - - - - - - -
-

Public Instance Methods

- - -
- -
- create() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/compare_controller.rb, line 22
-def create
-  redirect_to project_compare_path(@project, params[:from], params[:to])
-end
-
- -
- - - - -
- - -
- -
- index() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/compare_controller.rb, line 7
-def index
-end
-
- -
- - - - -
- - -
- -
- show() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/compare_controller.rb, line 10
-def show
-  result = Commit.compare(project, params[:from], params[:to])
-
-  @commits       = result[:commits]
-  @commit        = result[:commit]
-  @diffs         = result[:diffs]
-  @refs_are_same = result[:same]
-  @line_notes    = []
-
-  @commits = CommitDecorator.decorate(@commits)
-end
-
- -
- - - - -
- - -
- -
- -
- - - - diff --git a/doc/app/DashboardController.html b/doc/app/DashboardController.html deleted file mode 100644 index e3f4d1b4..00000000 --- a/doc/app/DashboardController.html +++ /dev/null @@ -1,569 +0,0 @@ - - - - - - -class DashboardController - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

class DashboardController

- -
- -
- - - - -
- - - - - - - - - - -
-

Public Instance Methods

- - -
- -
- index() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/dashboard_controller.rb, line 4
-def index
-  @groups = Group.where(id: current_user.projects.pluck(:group_id))
-  @projects = current_user.projects_with_events
-  @projects = @projects.page(params[:page]).per(30)
-
-  @events = Event.in_projects(current_user.project_ids).limit(20).offset(params[:offset] || 0)
-  @last_push = current_user.recent_push
-
-  respond_to do |format|
-    format.html
-    format.js
-    format.atom { render layout: false }
-  end
-end
-
- -
- - - - -
- - -
- -
- issues() - click to toggle source -
- - -
- -

Get only assigned issues

- - - -
-
# File app/controllers/dashboard_controller.rb, line 26
-def issues
-  @projects = current_user.projects.all
-  @user   = current_user
-  @issues = current_user.assigned_issues.opened.recent.page(params[:page]).per(20)
-  @issues = @issues.includes(:author, :project)
-
-  respond_to do |format|
-    format.html
-    format.atom { render layout: false }
-  end
-end
-
- -
- - - - -
- - -
- -
- merge_requests() - click to toggle source -
- - -
- -

Get authored or assigned open merge requests

- - - -
-
# File app/controllers/dashboard_controller.rb, line 20
-def merge_requests
-  @projects = current_user.projects.all
-  @merge_requests = current_user.cared_merge_requests.recent.page(params[:page]).per(20)
-end
-
- -
- - - - -
- - -
- -
- -
- - - - diff --git a/doc/app/DeployKeysController.html b/doc/app/DeployKeysController.html deleted file mode 100644 index 318a1441..00000000 --- a/doc/app/DeployKeysController.html +++ /dev/null @@ -1,626 +0,0 @@ - - - - - - -class DeployKeysController - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

class DeployKeysController

- -
- -
- - - - -
- - - - - - - - - - -
-

Public Instance Methods

- - -
- -
- create() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/deploy_keys_controller.rb, line 21
-def create
-  @key = @project.deploy_keys.new(params[:key])
-  if @key.save
-    redirect_to project_deploy_keys_path(@project)
-  else
-    render "new"
-  end
-end
-
- -
- - - - -
- - -
- -
- destroy() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/deploy_keys_controller.rb, line 30
-def destroy
-  @key = @project.deploy_keys.find(params[:id])
-  @key.destroy
-
-  respond_to do |format|
-    format.html { redirect_to project_deploy_keys_url }
-    format.js { render nothing: true }
-  end
-end
-
- -
- - - - -
- - -
- -
- index() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/deploy_keys_controller.rb, line 7
-def index
-  @keys = @project.deploy_keys.all
-end
-
- -
- - - - -
- - -
- -
- new() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/deploy_keys_controller.rb, line 15
-def new
-  @key = @project.deploy_keys.new
-
-  respond_with(@key)
-end
-
- -
- - - - -
- - -
- -
- show() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/deploy_keys_controller.rb, line 11
-def show
-  @key = @project.deploy_keys.find(params[:id])
-end
-
- -
- - - - -
- - -
- -
- -
- - - - diff --git a/doc/app/ErrorsController.html b/doc/app/ErrorsController.html deleted file mode 100644 index e77a67d7..00000000 --- a/doc/app/ErrorsController.html +++ /dev/null @@ -1,485 +0,0 @@ - - - - - - -class ErrorsController - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

class ErrorsController

- -
- -
- - - - -
- - - - - - - - - - -
-

Public Instance Methods

- - -
- -
- githost() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/errors_controller.rb, line 2
-def githost
-  render "errors/gitolite"
-end
-
- -
- - - - -
- - -
- -
- -
- - - - diff --git a/doc/app/Event.html b/doc/app/Event.html deleted file mode 100644 index 1347cda3..00000000 --- a/doc/app/Event.html +++ /dev/null @@ -1,1222 +0,0 @@ - - - - - - -class Event - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

class Event

- -
- -
- - - - -
- - - - - - -
-

Constants

-
- -
Closed - -
- - -
Commented - -
- - -
Created - -
- - -
Joined - -
- - -
Left - -
- - -
Merged - -
- - -
Pushed - -
- - -
Reopened - -
- - -
Updated - -
- - -
-
- - - - - - -
-

Public Class Methods

- - -
- -
- determine_action(record) - click to toggle source -
- - -
- - - - - -
-
# File app/models/event.rb, line 36
-def determine_action(record)
-  if [Issue, MergeRequest].include? record.class
-    Event::Created
-  elsif record.kind_of? Note
-    Event::Commented
-  end
-end
-
- -
- - - - -
- - -
- -
-

Public Instance Methods

- - -
- -
- action_name() - click to toggle source -
- - -
- - - - - -
-
# File app/models/event.rb, line 133
-def action_name
-  if closed?
-    "closed"
-  elsif merged?
-    "merged"
-  elsif joined?
-    'joined'
-  elsif left?
-    'left'
-  else
-    "opened"
-  end
-end
-
- -
- - - - -
- - -
- -
- allowed?() - click to toggle source -
- - -
- -

Next events currently enabled for system

- -
- push
-- new issue
-- merge request
- - - -
-
# File app/models/event.rb, line 49
-def allowed?
-  push? || issue? || merge_request? || membership_changed?
-end
-
- -
- - - - -
- - -
- -
- author() - click to toggle source -
- - -
- - - - - -
-
# File app/models/event.rb, line 129
-def author
-  @author ||= User.find(author_id)
-end
-
- -
- - - - -
- - -
- -
- changed_issue?() - click to toggle source -
- - -
- - - - - -
-
# File app/models/event.rb, line 104
-def changed_issue?
-  target_type == "Issue" &&
-    [Closed, Reopened].include?(action)
-end
-
- -
- - - - -
- - -
- -
- changed_merge_request?() - click to toggle source -
- - -
- - - - - -
-
# File app/models/event.rb, line 99
-def changed_merge_request?
-  target_type == "MergeRequest" &&
-    [Closed, Reopened].include?(action)
-end
-
- -
- - - - -
- - -
- -
- closed?() - click to toggle source -
- - -
- - - - - -
-
# File app/models/event.rb, line 73
-def closed?
-  action == self.class::Closed
-end
-
- -
- - - - -
- - -
- -
- issue() - click to toggle source -
- - -
- - - - - -
-
# File app/models/event.rb, line 121
-def issue
-  target if target_type == "Issue"
-end
-
- -
- - - - -
- - -
- -
- issue?() - click to toggle source -
- - -
- - - - - -
-
# File app/models/event.rb, line 81
-def issue?
-  target_type == "Issue"
-end
-
- -
- - - - -
- - -
- -
- joined?() - click to toggle source -
- - -
- - - - - -
-
# File app/models/event.rb, line 109
-def joined?
-  action == Joined
-end
-
- -
- - - - -
- - -
- -
- left?() - click to toggle source -
- - -
- - - - - -
-
# File app/models/event.rb, line 113
-def left?
-  action == Left
-end
-
- -
- - - - -
- - -
- -
- membership_changed?() - click to toggle source -
- - -
- - - - - -
-
# File app/models/event.rb, line 117
-def membership_changed?
-  joined? || left?
-end
-
- -
- - - - -
- - -
- -
- merge_request() - click to toggle source -
- - -
- - - - - -
-
# File app/models/event.rb, line 125
-def merge_request
-  target if target_type == "MergeRequest"
-end
-
- -
- - - - -
- - -
- -
- merge_request?() - click to toggle source -
- - -
- - - - - -
-
# File app/models/event.rb, line 85
-def merge_request?
-  target_type == "MergeRequest"
-end
-
- -
- - - - -
- - -
- -
- merged?() - click to toggle source -
- - -
- - - - - -
-
# File app/models/event.rb, line 69
-def merged?
-  action == self.class::Merged
-end
-
- -
- - - - -
- - -
- -
- new_issue?() - click to toggle source -
- - -
- - - - - -
-
# File app/models/event.rb, line 89
-def new_issue?
-  target_type == "Issue" &&
-    action == Created
-end
-
- -
- - - - -
- - -
- -
- new_merge_request?() - click to toggle source -
- - -
- - - - - -
-
# File app/models/event.rb, line 94
-def new_merge_request?
-  target_type == "MergeRequest" &&
-    action == Created
-end
-
- -
- - - - -
- - -
- -
- project_name() - click to toggle source -
- - -
- - - - - -
-
# File app/models/event.rb, line 53
-def project_name
-  if project
-    project.name
-  else
-    "(deleted project)"
-  end
-end
-
- -
- - - - -
- - -
- -
- push?() - click to toggle source -
- - -
- - - - - -
-
# File app/models/event.rb, line 65
-def push?
-  action == self.class::Pushed && valid_push?
-end
-
- -
- - - - -
- - -
- -
- reopened?() - click to toggle source -
- - -
- - - - - -
-
# File app/models/event.rb, line 77
-def reopened?
-  action == self.class::Reopened
-end
-
- -
- - - - -
- - -
- -
- target_title() - click to toggle source -
- - -
- - - - - -
-
# File app/models/event.rb, line 61
-def target_title
-  target.try :title
-end
-
- -
- - - - -
- - -
- -
- -
- - - - diff --git a/doc/app/EventDecorator.html b/doc/app/EventDecorator.html deleted file mode 100644 index dddb98a6..00000000 --- a/doc/app/EventDecorator.html +++ /dev/null @@ -1,578 +0,0 @@ - - - - - - -class EventDecorator - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

class EventDecorator

- -
- -
- - - - -
- - - - - - - - - - -
-

Public Instance Methods

- - -
- -
- feed_summary() - click to toggle source -
- - -
- - - - - -
-
# File app/decorators/event_decorator.rb, line 37
-def feed_summary
-  if self.issue?
-    h.render "events/event_issue", issue: self.issue
-  elsif self.push?
-    h.render "events/event_push", event: self
-  end
-end
-
- -
- - - - -
- - -
- -
- feed_title() - click to toggle source -
- - -
- - - - - -
-
# File app/decorators/event_decorator.rb, line 4
-def feed_title
-  if self.issue?
-    "#{self.author_name} #{self.action_name} issue ##{self.target_id}: #{self.issue_title} at #{self.project.name}"
-  elsif self.merge_request?
-    "#{self.author_name} #{self.action_name} MR ##{self.target_id}: #{self.merge_request_title} at #{self.project.name}"
-  elsif self.push?
-    "#{self.author_name} #{self.push_action_name} #{self.ref_type} #{self.ref_name} at #{self.project.name}"
-  elsif self.membership_changed?
-    "#{self.author_name} #{self.action_name} #{self.project.name}"
-  else
-    ""
-  end
-end
-
- -
- - - - -
- - -
- -
- feed_url() - click to toggle source -
- - -
- - - - - -
-
# File app/decorators/event_decorator.rb, line 18
-def feed_url
-  if self.issue?
-    h.project_issue_url(self.project, self.issue)
-  elsif self.merge_request?
-    h.project_merge_request_url(self.project, self.merge_request)
-
-  elsif self.push?
-    if self.push_with_commits?
-      if self.commits_count > 1
-        h.project_compare_url(self.project, :from => self.parent_commit.id, :to => self.last_commit.id)
-      else
-        h.project_commit_url(self.project, :id => self.last_commit.id)
-      end
-    else
-      h.project_commits_url(self.project, self.ref_name)
-    end
-  end
-end
-
- -
- - - - -
- - -
- -
- -
- - - - diff --git a/doc/app/EventsHelper.html b/doc/app/EventsHelper.html deleted file mode 100644 index 4f7c0454..00000000 --- a/doc/app/EventsHelper.html +++ /dev/null @@ -1,566 +0,0 @@ - - - - - - -module EventsHelper - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

module EventsHelper

- -
- -
- - - - -
- - - - - - - - - - -
-

Public Instance Methods

- - -
- -
- event_action_name(event) - click to toggle source -
- - -
- - - - - -
-
# File app/helpers/events_helper.rb, line 13
-def event_action_name(event)
-  target = if event.target_type
-             event.target_type.titleize.downcase
-           else
-             'project'
-           end
-
-  [event.action_name, target].join(" ")
-end
-
- -
- - - - -
- - -
- -
- event_image(event) - click to toggle source -
- - -
- - - - - -
-
# File app/helpers/events_helper.rb, line 23
-def event_image event
-  event_image_path = if event.push?
-                 "event_push.png"
-               elsif event.merged?
-                 "event_mr_merged.png"
-               end
-
-  return nil unless event_image_path
-
-  content_tag :div, class: 'event_icon' do
-    image_tag event_image_path
-  end
-end
-
- -
- - - - -
- - - - - -
- -
- -
- - - - diff --git a/doc/app/ExtractsPath.html b/doc/app/ExtractsPath.html deleted file mode 100644 index e3825307..00000000 --- a/doc/app/ExtractsPath.html +++ /dev/null @@ -1,614 +0,0 @@ - - - - - - -module ExtractsPath - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

module ExtractsPath

- -
- -

Module providing methods for dealing with separating a tree-ish string and -a file path string when combined in a request parameter

- -
- - - - -
- - - - - - - - - - -
-

Public Instance Methods

- - -
- -
- assign_ref_vars() - click to toggle source -
- - -
- -

Assigns common instance variables for views working with Git tree-ish -objects

- -

Assignments are:

-
  • -

    @id - A string representing the joined ref and path

    -
  • -

    @ref - A string representing the ref (e.g., the branch, tag, or commit -SHA)

    -
  • -

    @path - A string representing the filesystem path

    -
  • -

    @commit - A CommitDecorator representing -the commit from the given ref

    -
  • -

    @tree - A TreeDecorator representing the -tree at the given ref/path

    -
- -

If the :id parameter appears to be requesting a specific response format, -that will be handled as well.

- -

Automatically renders `not_found!` if a valid tree path could not be -resolved (e.g., when a user inserts an invalid path or ref).

- - - -
-
# File lib/extracts_path.rb, line 94
-def assign_ref_vars
-  # Handle formats embedded in the id
-  if params[:id].ends_with?('.atom')
-    params[:id].gsub!(%r\.atom$/, '')
-    request.format = :atom
-  end
-
-  @ref, @path = extract_ref(params[:id])
-
-  @id = File.join(@ref, @path)
-
-  @commit = CommitDecorator.decorate(@project.commit(@ref))
-
-  @tree = Tree.new(@commit.tree, @project, @ref, @path)
-  @tree = TreeDecorator.new(@tree)
-
-  raise InvalidPathError if @tree.invalid?
-rescue NoMethodError, InvalidPathError
-  not_found!
-end
-
- -
- - - - -
- - -
- -
- extract_ref(input) - click to toggle source -
- - -
- -

Given a string containing both a Git tree-ish, such as a branch or tag, and -a filesystem path joined by forward slashes, attempts to separate the two.

- -

Expects a @project instance variable to contain the active project. This is -used to check the input against a list of valid repository refs.

- -

Examples

- -
# No @project available
-extract_ref('master')
-# => ['', '']
-
-extract_ref('master')
-# => ['master', '']
-
-extract_ref("f4b14494ef6abf3d144c28e4af0c20143383e062/CHANGELOG")
-# => ['f4b14494ef6abf3d144c28e4af0c20143383e062', 'CHANGELOG']
-
-extract_ref("v2.0.0/README.md")
-# => ['v2.0.0', 'README.md']
-
-extract_ref('issues/1234/app/models/project.rb')
-# => ['issues/1234', 'app/models/project.rb']
-
-# Given an invalid branch, we fall back to just splitting on the first slash
-extract_ref('non/existent/branch/README.md')
-# => ['non', 'existent/branch/README.md']
-
- -

Returns an Array where the first value is the tree-ish and the second is -the path

- - - -
-
# File lib/extracts_path.rb, line 45
-def extract_ref(input)
-  pair = ['', '']
-
-  return pair unless @project
-
-  if input.match(%r^([[:alnum:]]{40})(.+)/)
-    # If the ref appears to be a SHA, we're done, just split the string
-    pair = $~.captures
-  else
-    # Otherwise, attempt to detect the ref using a list of the project's
-    # branches and tags
-
-    # Append a trailing slash if we only get a ref and no file path
-    id = input
-    id += '/' unless id.ends_with?('/')
-
-    valid_refs = @project.ref_names
-    valid_refs.select! { |v| id.start_with?("#{v}/") }
-
-    if valid_refs.length != 1
-      # No exact ref match, so just try our best
-      pair = id.match(%r([^\/]+)(.*)/).captures
-    else
-      # Partition the string into the ref and the path, ignoring the empty first value
-      pair = id.partition(valid_refs.first)[1..-1]
-    end
-  end
-
-  # Remove ending slashes from path
-  pair[1].gsub!(%r^\/|\/$/, '')
-
-  pair
-end
-
- -
- - - - -
- - -
- -
- -
- - - - diff --git a/doc/app/ExtractsPath/InvalidPathError.html b/doc/app/ExtractsPath/InvalidPathError.html deleted file mode 100644 index 3c8c60fc..00000000 --- a/doc/app/ExtractsPath/InvalidPathError.html +++ /dev/null @@ -1,441 +0,0 @@ - - - - - - -class ExtractsPath::InvalidPathError - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

class ExtractsPath::InvalidPathError

- -
- -

Raised when given an invalid file path

- -
- - - - -
- - - - - - - - - - -
- -
- - - - diff --git a/doc/app/FileSizeValidator.html b/doc/app/FileSizeValidator.html deleted file mode 100644 index 5acdf291..00000000 --- a/doc/app/FileSizeValidator.html +++ /dev/null @@ -1,652 +0,0 @@ - - - - - - -class FileSizeValidator - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

class FileSizeValidator

- -
- -
- - - - -
- - - - - - -
-

Constants

-
- -
CHECKS - -
- - -
DEFAULT_TOKENIZER - -
- - -
MESSAGES - -
- - -
RESERVED_OPTIONS - -
- - -
-
- - - - - - -
-

Public Class Methods

- - -
- -
- new(options) - click to toggle source -
- - -
- - - - - -
-
# File lib/file_size_validator.rb, line 8
-def initialize(options)
-  if range = (options.delete(:in) || options.delete(:within))
-    raise ArgumentError, ":in and :within must be a Range" unless range.is_a?(Range)
-    options[:minimum], options[:maximum] = range.begin, range.end
-    options[:maximum] -= 1 if range.exclude_end?
-  end
-
-  super
-end
-
- -
- - - - -
- - -
- -
-

Public Instance Methods

- - -
- -
- check_validity!() - click to toggle source -
- - -
- - - - - -
-
# File lib/file_size_validator.rb, line 18
-def check_validity!
-  keys = CHECKS.keys & options.keys
-
-  if keys.empty?
-    raise ArgumentError, 'Range unspecified. Specify the :within, :maximum, :minimum, or :is option.'
-  end
-
-  keys.each do |key|
-    value = options[key]
-
-    unless value.is_a?(Integer) && value >= 0
-      raise ArgumentError, ":#{key} must be a nonnegative Integer"
-    end
-  end
-end
-
- -
- - - - -
- - -
- -
- help() - click to toggle source -
- - -
- - - - - -
-
# File lib/file_size_validator.rb, line 57
-def help
-  Helper.instance
-end
-
- -
- - - - -
- - -
- -
- validate_each(record, attribute, value) - click to toggle source -
- - -
- - - - - -
-
# File lib/file_size_validator.rb, line 34
-def validate_each(record, attribute, value)
-  raise(ArgumentError, "A CarrierWave::Uploader::Base object was expected") unless value.kind_of? CarrierWave::Uploader::Base
-
-  value = (options[:tokenizer] || DEFAULT_TOKENIZER).call(value) if value.kind_of?(String)
-
-  CHECKS.each do |key, validity_check|
-    next unless check_value = options[key]
-
-    value ||= [] if key == :maximum
-
-    value_size = value.size
-    next if value_size.send(validity_check, check_value)
-
-    errors_options = options.except(*RESERVED_OPTIONS)
-    errors_options[:file_size] = help.number_to_human_size check_value
-
-    default_message = options[MESSAGES[key]]
-    errors_options[:message] ||= default_message if default_message
-
-    record.errors.add(attribute, MESSAGES[key], errors_options)
-  end
-end
-
- -
- - - - -
- - -
- -
- -
- - - - diff --git a/doc/app/FileSizeValidator/Helper.html b/doc/app/FileSizeValidator/Helper.html deleted file mode 100644 index 4fd146c2..00000000 --- a/doc/app/FileSizeValidator/Helper.html +++ /dev/null @@ -1,455 +0,0 @@ - - - - - - -class FileSizeValidator::Helper - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

class FileSizeValidator::Helper

- -
- -
- - - - -
- - - - - - - - - - -
- -
- - - - diff --git a/doc/app/GitHost.html b/doc/app/GitHost.html deleted file mode 100644 index 3197a73f..00000000 --- a/doc/app/GitHost.html +++ /dev/null @@ -1,479 +0,0 @@ - - - - - - -module GitHost - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

module GitHost

- -
- -
- - - - -
- - - - - - - - - - -
-

Public Instance Methods

- - -
- -
- git_host() - click to toggle source -
- - -
- - - - - -
-
# File app/roles/git_host.rb, line 2
-def git_host
-  Gitlab::Gitolite.new
-end
-
- -
- - - - -
- - -
- -
- -
- - - - diff --git a/doc/app/Gitlab.html b/doc/app/Gitlab.html deleted file mode 100644 index 0e28a24b..00000000 --- a/doc/app/Gitlab.html +++ /dev/null @@ -1,454 +0,0 @@ - - - - - - -module Gitlab - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

module Gitlab

- -
- -
- - - - -
- - - - - - - - - - -
- -
- - - - diff --git a/doc/app/Gitlab/API.html b/doc/app/Gitlab/API.html deleted file mode 100644 index 8fad1eec..00000000 --- a/doc/app/Gitlab/API.html +++ /dev/null @@ -1,452 +0,0 @@ - - - - - - -class Gitlab::API - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

class Gitlab::API

- -
- -
- - - - -
- - - - - - -
-

Constants

-
- -
VERSION - -
- - -
-
- - - - - - -
- -
- - - - diff --git a/doc/app/Gitlab/APIHelpers.html b/doc/app/Gitlab/APIHelpers.html deleted file mode 100644 index 47bf3fb1..00000000 --- a/doc/app/Gitlab/APIHelpers.html +++ /dev/null @@ -1,846 +0,0 @@ - - - - - - -module Gitlab::APIHelpers - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

module Gitlab::APIHelpers

- -
- -
- - - - -
- - - - - - - - - - -
-

Public Instance Methods

- - -
- -
- attributes_for_keys(keys) - click to toggle source -
- - -
- - - - - -
-
# File lib/api/helpers.rb, line 35
-def attributes_for_keys(keys)
-  attrs = {}
-  keys.each do |key|
-    attrs[key] = params[key] if params[key].present?
-  end
-  attrs
-end
-
- -
- - - - -
- - -
- -
- authenticate!() - click to toggle source -
- - -
- - - - - -
-
# File lib/api/helpers.rb, line 21
-def authenticate!
-  unauthorized! unless current_user
-end
-
- -
- - - - -
- - -
- -
- authenticated_as_admin!() - click to toggle source -
- - -
- - - - - -
-
# File lib/api/helpers.rb, line 25
-def authenticated_as_admin!
-  forbidden! unless current_user.is_admin?
-end
-
- -
- - - - -
- - -
- -
- authorize!(action, subject) - click to toggle source -
- - -
- - - - - -
-
# File lib/api/helpers.rb, line 29
-def authorize! action, subject
-  unless abilities.allowed?(current_user, action, subject)
-    forbidden!
-  end
-end
-
- -
- - - - -
- - -
- -
- current_user() - click to toggle source -
- - -
- - - - - -
-
# File lib/api/helpers.rb, line 3
-def current_user
-  @current_user ||= User.find_by_authentication_token(params[:private_token] || env["HTTP_PRIVATE_TOKEN"])
-end
-
- -
- - - - -
- - -
- -
- forbidden!() - click to toggle source -
- - -
- -

error helpers

- - - -
-
# File lib/api/helpers.rb, line 45
-def forbidden!
-  render_api_error!('403 Forbidden', 403)
-end
-
- -
- - - - -
- - -
- -
- not_allowed!() - click to toggle source -
- - -
- - - - - -
-
# File lib/api/helpers.rb, line 60
-def not_allowed!
-  render_api_error!('Method Not Allowed', 405)
-end
-
- -
- - - - -
- - -
- -
- not_found!(resource = nil) - click to toggle source -
- - -
- - - - - -
-
# File lib/api/helpers.rb, line 49
-def not_found!(resource = nil)
-  message = ["404"]
-  message << resource if resource
-  message << "Not Found"
-  render_api_error!(message.join(' '), 404)
-end
-
- -
- - - - -
- - -
- -
- paginate(object) - click to toggle source -
- - -
- - - - - -
-
# File lib/api/helpers.rb, line 17
-def paginate(object)
-  object.page(params[:page]).per(params[:per_page].to_i)
-end
-
- -
- - - - -
- - -
- -
- render_api_error!(message, status) - click to toggle source -
- - -
- - - - - -
-
# File lib/api/helpers.rb, line 64
-def render_api_error!(message, status)
-  error!({'message' => message}, status)
-end
-
- -
- - - - -
- - -
- -
- unauthorized!() - click to toggle source -
- - -
- - - - - -
-
# File lib/api/helpers.rb, line 56
-def unauthorized!
-  render_api_error!('401 Unauthorized', 401)
-end
-
- -
- - - - -
- - -
- -
- user_project() - click to toggle source -
- - -
- - - - - -
-
# File lib/api/helpers.rb, line 7
-def user_project
-  if @project ||= current_user.projects.find_by_id(params[:id]) ||
-                  current_user.projects.find_by_code(params[:id])
-  else
-    not_found!
-  end
-
-  @project
-end
-
- -
- - - - -
- - -
- -
- -
- - - - diff --git a/doc/app/Gitlab/AppLogger.html b/doc/app/Gitlab/AppLogger.html deleted file mode 100644 index e3a352af..00000000 --- a/doc/app/Gitlab/AppLogger.html +++ /dev/null @@ -1,523 +0,0 @@ - - - - - - -class Gitlab::AppLogger - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

class Gitlab::AppLogger

- -
- -
- - - - -
- - - - - - - - - - -
-

Public Class Methods

- - -
- -
- file_name() - click to toggle source -
- - -
- - - - - -
-
# File lib/gitlab/app_logger.rb, line 3
-def self.file_name
-  'application.log'
-end
-
- -
- - - - -
- - -
- -
-

Public Instance Methods

- - -
- -
- format_message(severity, timestamp, progname, msg) - click to toggle source -
- - -
- - - - - -
-
# File lib/gitlab/app_logger.rb, line 7
-def format_message(severity, timestamp, progname, msg)
-  "#{timestamp.to_s(:long)}: #{msg}\n"
-end
-
- -
- - - - -
- - -
- -
- -
- - - - diff --git a/doc/app/Gitlab/Auth.html b/doc/app/Gitlab/Auth.html deleted file mode 100644 index ac4fd556..00000000 --- a/doc/app/Gitlab/Auth.html +++ /dev/null @@ -1,630 +0,0 @@ - - - - - - -class Gitlab::Auth - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

class Gitlab::Auth

- -
- -
- - - - -
- - - - - - - - - - -
-

Public Instance Methods

- - -
- -
- create_from_omniauth(auth, ldap = false) - click to toggle source -
- - -
- - - - - -
-
# File lib/gitlab/auth.rb, line 20
-def create_from_omniauth(auth, ldap = false)
-  provider = auth.provider
-  uid = auth.info.uid || auth.uid
-  name = auth.info.name.force_encoding("utf-8")
-  email = auth.info.email.downcase unless auth.info.email.nil?
-
-  ldap_prefix = ldap ? '(LDAP) ' : ''
-  raise OmniAuth::Error, "#{ldap_prefix}#{provider} does not provide an email"         " address" if auth.info.email.blank?
-
-  log.info "#{ldap_prefix}Creating user from #{provider} login"         " {uid => #{uid}, name => #{name}, email => #{email}}"
-  password = Devise.friendly_token[0, 8].downcase
-  @user = User.new({
-    extern_uid: uid,
-    provider: provider,
-    name: name,
-    email: email,
-    password: password,
-    password_confirmation: password,
-    projects_limit: Gitlab.config.default_projects_limit,
-  }, as: :admin)
-  if Gitlab.config.omniauth['block_auto_created_users'] && !ldap
-    @user.blocked = true
-  end
-  @user.save!
-  @user
-end
-
- -
- - - - -
- - -
- -
- find_for_ldap_auth(auth, signed_in_resource = nil) - click to toggle source -
- - -
- - - - - -
-
# File lib/gitlab/auth.rb, line 3
-def find_for_ldap_auth(auth, signed_in_resource = nil)
-  uid = auth.info.uid
-  provider = auth.provider
-  email = auth.info.email.downcase unless auth.info.email.nil?
-  raise OmniAuth::Error, "LDAP accounts must provide an uid and email address" if uid.nil? or email.nil?
-
-  if @user = User.find_by_extern_uid_and_provider(uid, provider)
-    @user
-  elsif @user = User.find_by_email(email)
-    log.info "Updating legacy LDAP user #{email} with extern_uid => #{uid}"
-    @user.update_attributes(:extern_uid => uid, :provider => provider)
-    @user
-  else
-    create_from_omniauth(auth, true)
-  end
-end
-
- -
- - - - -
- - -
- -
- find_or_new_for_omniauth(auth) - click to toggle source -
- - -
- - - - - -
-
# File lib/gitlab/auth.rb, line 49
-def find_or_new_for_omniauth(auth)
-  provider, uid = auth.provider, auth.uid
-  email = auth.info.email.downcase unless auth.info.email.nil?
-
-  if @user = User.find_by_provider_and_extern_uid(provider, uid)
-    @user
-  elsif @user = User.find_by_email(email)
-    @user.update_attributes(:extern_uid => uid, :provider => provider)
-    @user
-  else
-    if Gitlab.config.omniauth['allow_single_sign_on']
-      @user = create_from_omniauth(auth)
-      @user
-    end
-  end
-end
-
- -
- - - - -
- - -
- -
- log() - click to toggle source -
- - -
- - - - - -
-
# File lib/gitlab/auth.rb, line 66
-def log
-  Gitlab::AppLogger
-end
-
- -
- - - - -
- - -
- -
- -
- - - - diff --git a/doc/app/Gitlab/Encode.html b/doc/app/Gitlab/Encode.html deleted file mode 100644 index 387e0db2..00000000 --- a/doc/app/Gitlab/Encode.html +++ /dev/null @@ -1,537 +0,0 @@ - - - - - - -module Gitlab::Encode - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

module Gitlab::Encode

- -
- -
- - - - -
- - - - - - - - - - -
-

Public Instance Methods

- - -
- -
- detect_encoding(message) - click to toggle source -
- - -
- - - - - -
-
# File lib/gitlab/encode.rb, line 34
-def detect_encoding message
-  return nil unless message
-
-  hash = CharlockHolmes::EncodingDetector.detect(message) rescue {}
-  return hash[:encoding] ? hash[:encoding] : nil
-end
-
- -
- - - - -
- - -
- -
- utf8(message) - click to toggle source -
- - -
- - - - - -
-
# File lib/gitlab/encode.rb, line 7
-def utf8 message
-  # return nil if message is nil
-  return nil unless message
-
-  message.force_encoding("utf-8")
-  # return message if message type is binary
-  detect = CharlockHolmes::EncodingDetector.detect(message)
-  return message if detect[:type] == :binary
-
-  # if message is utf-8 encoding, just return it
-  return message if message.valid_encoding?
-
-  # if message is not utf-8 encoding, convert it
-  if detect[:encoding]
-    message.force_encoding(detect[:encoding])
-    message.encode!("utf-8", detect[:encoding], undef: :replace, replace: "", invalid: :replace)
-  end
-
-  # ensure message encoding is utf8
-  message.valid_encoding? ? message : raise
-
-# Prevent app from crash cause of encoding errors
-rescue
-  encoding = detect ? detect[:encoding] : "unknown"
-  "--broken encoding: #{encoding}"
-end
-
- -
- - - - -
- - -
- -
- -
- - - - diff --git a/doc/app/Gitlab/Entities.html b/doc/app/Gitlab/Entities.html deleted file mode 100644 index 8cd0d837..00000000 --- a/doc/app/Gitlab/Entities.html +++ /dev/null @@ -1,433 +0,0 @@ - - - - - - -module Gitlab::Entities - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

module Gitlab::Entities

- -
- -
- - - - -
- - - - - - - - - - -
- -
- - - - diff --git a/doc/app/Gitlab/Entities/Hook.html b/doc/app/Gitlab/Entities/Hook.html deleted file mode 100644 index c9eba832..00000000 --- a/doc/app/Gitlab/Entities/Hook.html +++ /dev/null @@ -1,439 +0,0 @@ - - - - - - -class Gitlab::Entities::Hook - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

class Gitlab::Entities::Hook

- -
- -
- - - - -
- - - - - - - - - - -
- -
- - - - diff --git a/doc/app/Gitlab/Entities/Issue.html b/doc/app/Gitlab/Entities/Issue.html deleted file mode 100644 index f713b7ab..00000000 --- a/doc/app/Gitlab/Entities/Issue.html +++ /dev/null @@ -1,439 +0,0 @@ - - - - - - -class Gitlab::Entities::Issue - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

class Gitlab::Entities::Issue

- -
- -
- - - - -
- - - - - - - - - - -
- -
- - - - diff --git a/doc/app/Gitlab/Entities/Milestone.html b/doc/app/Gitlab/Entities/Milestone.html deleted file mode 100644 index f762ad29..00000000 --- a/doc/app/Gitlab/Entities/Milestone.html +++ /dev/null @@ -1,439 +0,0 @@ - - - - - - -class Gitlab::Entities::Milestone - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

class Gitlab::Entities::Milestone

- -
- -
- - - - -
- - - - - - - - - - -
- -
- - - - diff --git a/doc/app/Gitlab/Entities/Project.html b/doc/app/Gitlab/Entities/Project.html deleted file mode 100644 index 725e6b75..00000000 --- a/doc/app/Gitlab/Entities/Project.html +++ /dev/null @@ -1,439 +0,0 @@ - - - - - - -class Gitlab::Entities::Project - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

class Gitlab::Entities::Project

- -
- -
- - - - -
- - - - - - - - - - -
- -
- - - - diff --git a/doc/app/Gitlab/Entities/ProjectMember.html b/doc/app/Gitlab/Entities/ProjectMember.html deleted file mode 100644 index 468d3dc1..00000000 --- a/doc/app/Gitlab/Entities/ProjectMember.html +++ /dev/null @@ -1,439 +0,0 @@ - - - - - - -class Gitlab::Entities::ProjectMember - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

class Gitlab::Entities::ProjectMember

- -
- -
- - - - -
- - - - - - - - - - -
- -
- - - - diff --git a/doc/app/Gitlab/Entities/ProjectSnippet.html b/doc/app/Gitlab/Entities/ProjectSnippet.html deleted file mode 100644 index e19fad75..00000000 --- a/doc/app/Gitlab/Entities/ProjectSnippet.html +++ /dev/null @@ -1,439 +0,0 @@ - - - - - - -class Gitlab::Entities::ProjectSnippet - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

class Gitlab::Entities::ProjectSnippet

- -
- -
- - - - -
- - - - - - - - - - -
- -
- - - - diff --git a/doc/app/Gitlab/Entities/RepoCommit.html b/doc/app/Gitlab/Entities/RepoCommit.html deleted file mode 100644 index 04c118a3..00000000 --- a/doc/app/Gitlab/Entities/RepoCommit.html +++ /dev/null @@ -1,439 +0,0 @@ - - - - - - -class Gitlab::Entities::RepoCommit - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

class Gitlab::Entities::RepoCommit

- -
- -
- - - - -
- - - - - - - - - - -
- -
- - - - diff --git a/doc/app/Gitlab/Entities/RepoObject.html b/doc/app/Gitlab/Entities/RepoObject.html deleted file mode 100644 index 27f928c1..00000000 --- a/doc/app/Gitlab/Entities/RepoObject.html +++ /dev/null @@ -1,439 +0,0 @@ - - - - - - -class Gitlab::Entities::RepoObject - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

class Gitlab::Entities::RepoObject

- -
- -
- - - - -
- - - - - - - - - - -
- -
- - - - diff --git a/doc/app/Gitlab/Entities/SSHKey.html b/doc/app/Gitlab/Entities/SSHKey.html deleted file mode 100644 index 43ed0f01..00000000 --- a/doc/app/Gitlab/Entities/SSHKey.html +++ /dev/null @@ -1,439 +0,0 @@ - - - - - - -class Gitlab::Entities::SSHKey - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

class Gitlab::Entities::SSHKey

- -
- -
- - - - -
- - - - - - - - - - -
- -
- - - - diff --git a/doc/app/Gitlab/Entities/User.html b/doc/app/Gitlab/Entities/User.html deleted file mode 100644 index fb978194..00000000 --- a/doc/app/Gitlab/Entities/User.html +++ /dev/null @@ -1,439 +0,0 @@ - - - - - - -class Gitlab::Entities::User - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

class Gitlab::Entities::User

- -
- -
- - - - -
- - - - - - - - - - -
- -
- - - - diff --git a/doc/app/Gitlab/Entities/UserBasic.html b/doc/app/Gitlab/Entities/UserBasic.html deleted file mode 100644 index dcb1e782..00000000 --- a/doc/app/Gitlab/Entities/UserBasic.html +++ /dev/null @@ -1,439 +0,0 @@ - - - - - - -class Gitlab::Entities::UserBasic - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

class Gitlab::Entities::UserBasic

- -
- -
- - - - -
- - - - - - - - - - -
- -
- - - - diff --git a/doc/app/Gitlab/Entities/UserLogin.html b/doc/app/Gitlab/Entities/UserLogin.html deleted file mode 100644 index fde77335..00000000 --- a/doc/app/Gitlab/Entities/UserLogin.html +++ /dev/null @@ -1,439 +0,0 @@ - - - - - - -class Gitlab::Entities::UserLogin - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

class Gitlab::Entities::UserLogin

- -
- -
- - - - -
- - - - - - - - - - -
- -
- - - - diff --git a/doc/app/Gitlab/FileEditor.html b/doc/app/Gitlab/FileEditor.html deleted file mode 100644 index 0916d63c..00000000 --- a/doc/app/Gitlab/FileEditor.html +++ /dev/null @@ -1,647 +0,0 @@ - - - - - - -class Gitlab::FileEditor - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

class Gitlab::FileEditor

- -
- -

GitLab file editor

- -

It gives you ability to make changes to files & commit this changes -from GitLab UI.

- -
- - - - -
- - - - - - - - -
-

Attributes

- - -
-
- project[RW] -
- -
- - - -
-
- -
-
- ref[RW] -
- -
- - - -
-
- -
-
- user[RW] -
- -
- - - -
-
- -
- - - - -
-

Public Class Methods

- - -
- -
- new(user, project, ref) - click to toggle source -
- - -
- - - - - -
-
# File lib/gitlab/file_editor.rb, line 9
-def initialize(user, project, ref)
-  self.user = user
-  self.project = project
-  self.ref = ref
-end
-
- -
- - - - -
- - -
- -
-

Public Instance Methods

- - -
- -
- update(path, content, commit_message, last_commit) - click to toggle source -
- - -
- - - - - -
-
# File lib/gitlab/file_editor.rb, line 15
-def update(path, content, commit_message, last_commit)
-  return false unless can_edit?(path, last_commit)
-
-  Grit::Git.with_timeout(10.seconds) do
-    lock_file = Rails.root.join("tmp", "#{project.path}.lock")
-
-    File.open(lock_file, "w+") do |f|
-      f.flock(File::LOCK_EX)
-
-      unless project.satellite.exists?
-        raise "Satellite doesn't exist"
-      end
-
-      project.satellite.clear
-
-      Dir.chdir(project.satellite.path) do
-        r = Grit::Repo.new('.')
-        r.git.sh "git reset --hard"
-        r.git.sh "git fetch origin"
-        r.git.sh "git config user.name \"#{user.name}\""
-        r.git.sh "git config user.email \"#{user.email}\""
-        r.git.sh "git checkout -b #{ref} origin/#{ref}"
-        File.open(path, 'w'){|f| f.write(content)}
-        r.git.sh "git add ."
-        r.git.sh "git commit -am '#{commit_message}'"
-        output = r.git.sh "git push origin #{ref}"
-
-        if output =~ %rreject/
-          return false
-        end
-      end
-    end
-  end
-  true
-end
-
- -
- - - - -
- - -
- -
-

Protected Instance Methods

- - -
- -
- can_edit?(path, last_commit) - click to toggle source -
- - -
- - - - - -
-
# File lib/gitlab/file_editor.rb, line 53
-def can_edit?(path, last_commit)
-  current_last_commit = @project.last_commit_for(ref, path).sha
-  last_commit == current_last_commit
-end
-
- -
- - - - -
- - -
- -
- -
- - - - diff --git a/doc/app/Gitlab/GitLogger.html b/doc/app/Gitlab/GitLogger.html deleted file mode 100644 index c37bce98..00000000 --- a/doc/app/Gitlab/GitLogger.html +++ /dev/null @@ -1,523 +0,0 @@ - - - - - - -class Gitlab::GitLogger - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

class Gitlab::GitLogger

- -
- -
- - - - -
- - - - - - - - - - -
-

Public Class Methods

- - -
- -
- file_name() - click to toggle source -
- - -
- - - - - -
-
# File lib/gitlab/git_logger.rb, line 3
-def self.file_name
-  'githost.log'
-end
-
- -
- - - - -
- - -
- -
-

Public Instance Methods

- - -
- -
- format_message(severity, timestamp, progname, msg) - click to toggle source -
- - -
- - - - - -
-
# File lib/gitlab/git_logger.rb, line 7
-def format_message(severity, timestamp, progname, msg)
-  "#{timestamp.to_s(:long)} -> #{severity} -> #{msg}\n"
-end
-
- -
- - - - -
- - -
- -
- -
- - - - diff --git a/doc/app/Gitlab/Gitolite.html b/doc/app/Gitlab/Gitolite.html deleted file mode 100644 index 60ef3b13..00000000 --- a/doc/app/Gitlab/Gitolite.html +++ /dev/null @@ -1,716 +0,0 @@ - - - - - - -class Gitlab::Gitolite - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

class Gitlab::Gitolite

- -
- -
- - - - -
- - - - - - - - - - -
-

Public Instance Methods

- - -
- -
- config() - click to toggle source -
- - -
- - - - - -
-
# File lib/gitlab/backend/gitolite.rb, line 7
-def config
-  Gitlab::GitoliteConfig.new
-end
-
- -
- - - - -
- - -
- -
- create_repository(project) - click to toggle source -
- - -
- - - - - -
- - - - -
- Alias for: update_repository -
- -
- - -
- -
- enable_automerge() - click to toggle source -
- - -
- - - - - -
-
# File lib/gitlab/backend/gitolite.rb, line 37
-def enable_automerge
-  config.admin_all_repo!
-end
-
- -
- - - - -
- - -
- -
- remove_key(key_id, projects) - click to toggle source -
- - -
- - - - - -
-
# File lib/gitlab/backend/gitolite.rb, line 18
-def remove_key key_id, projects
-  config.apply do |config|
-    config.rm_key(key_id)
-    config.update_projects(projects)
-  end
-end
-
- -
- - - - -
- - -
- -
- remove_repository(project) - click to toggle source -
- - -
- - - - - -
-
# File lib/gitlab/backend/gitolite.rb, line 29
-def remove_repository project
-  config.destroy_project!(project)
-end
-
- -
- - - - -
- - -
- -
- set_key(key_id, key_content, projects) - click to toggle source -
- - -
- - - - - -
-
# File lib/gitlab/backend/gitolite.rb, line 11
-def set_key key_id, key_content, projects
-  config.apply do |config|
-    config.write_key(key_id, key_content)
-    config.update_projects(projects)
-  end
-end
-
- -
- - - - -
- - -
- -
- update_repository(project) - click to toggle source -
- - -
- - - - - -
-
# File lib/gitlab/backend/gitolite.rb, line 25
-def update_repository project
-  config.update_project!(project.path, project)
-end
-
- -
- - -
- Also aliased as: create_repository -
- - - -
- - -
- -
- url_to_repo(path) - click to toggle source -
- - -
- - - - - -
-
# File lib/gitlab/backend/gitolite.rb, line 33
-def url_to_repo path
-  Gitlab.config.ssh_path + "#{path}.git"
-end
-
- -
- - - - -
- - -
- -
- -
- - - - diff --git a/doc/app/Gitlab/Gitolite/AccessDenied.html b/doc/app/Gitlab/Gitolite/AccessDenied.html deleted file mode 100644 index 64a3b17a..00000000 --- a/doc/app/Gitlab/Gitolite/AccessDenied.html +++ /dev/null @@ -1,439 +0,0 @@ - - - - - - -class Gitlab::Gitolite::AccessDenied - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

class Gitlab::Gitolite::AccessDenied

- -
- -
- - - - -
- - - - - - - - - - -
- -
- - - - diff --git a/doc/app/Gitlab/GitoliteConfig.html b/doc/app/Gitlab/GitoliteConfig.html deleted file mode 100644 index 19671089..00000000 --- a/doc/app/Gitlab/GitoliteConfig.html +++ /dev/null @@ -1,994 +0,0 @@ - - - - - - -class Gitlab::GitoliteConfig - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

class Gitlab::GitoliteConfig

- -
- -
- - - - -
- - - - - - - - -
-

Attributes

- - -
-
- conf[R] -
- -
- - - -
-
- -
-
- config_tmp_dir[R] -
- -
- - - -
-
- -
-
- ga_repo[R] -
- -
- - - -
-
- -
- - - - -
-

Public Instance Methods

- - -
- -
- admin_all_repo() - click to toggle source -
- - -
- -

Enable access to all repos for gitolite admin. We use it for accept merge -request feature

- - - -
-
# File lib/gitlab/backend/gitolite_config.rb, line 162
-def admin_all_repo
-  owner_name = Gitlab.config.gitolite_admin_key
-
-  # @ALL repos premission for gitolite owner
-  repo_name = "@all"
-  repo = if conf.has_repo?(repo_name)
-           conf.get_repo(repo_name)
-         else
-           ::Gitolite::Config::Repo.new(repo_name)
-         end
-
-  repo.add_permission("RW+", "", owner_name)
-  conf.add_repo(repo, true)
-end
-
- -
- - - - -
- - -
- -
- admin_all_repo!() - click to toggle source -
- - -
- - - - - -
-
# File lib/gitlab/backend/gitolite_config.rb, line 177
-def admin_all_repo!
-  apply { |config| config.admin_all_repo }
-end
-
- -
- - - - -
- - -
- -
- apply() { |self| ... } - click to toggle source -
- - -
- - - - - -
-
# File lib/gitlab/backend/gitolite_config.rb, line 20
-def apply
-  Timeout::timeout(30) do
-    File.open(Rails.root.join('tmp', "gitlabhq-gitolite.lock"), "w+") do |f|
-      begin
-        # Set exclusive lock
-        # to prevent race condition
-        f.flock(File::LOCK_EX)
-
-        # Pull gitolite-admin repo
-        # in tmp dir before do any changes
-        pull(config_tmp_dir)
-
-        # Build ga_repo object and @conf
-        # to access gitolite-admin configuration
-        @conf = ga_repo.config
-
-        # Do any changes
-        # in gitolite-admin
-        # config here
-        yield(self)
-
-        # Save changes in
-        # gitolite-admin repo
-        # before push it
-        ga_repo.save
-
-        # Push gitolite-admin repo
-        # to apply all changes
-        push(config_tmp_dir)
-      ensure
-        # Remove tmp dir
-        # removing the gitolite folder first is important to avoid
-        # NFS issues.
-        FileUtils.rm_rf(File.join(config_tmp_dir, 'gitolite'))
-
-        # Remove parent tmp dir
-        FileUtils.rm_rf(config_tmp_dir)
-
-        # Unlock so other task can access
-        # gitolite configuration
-        f.flock(File::LOCK_UN)
-      end
-    end
-  end
-rescue PullError => ex
-  log("Pull error ->  " + ex.message)
-  raise Gitolite::AccessDenied, ex.message
-
-rescue PushError => ex
-  log("Push error ->  " + " " + ex.message)
-  raise Gitolite::AccessDenied, ex.message
-
-rescue Exception => ex
-  log(ex.class.name + " " + ex.message)
-  raise Gitolite::AccessDenied.new("gitolite timeout")
-end
-
- -
- - - - -
- - -
- -
- destroy_project(project) - click to toggle source -
- - -
- - - - - -
-
# File lib/gitlab/backend/gitolite_config.rb, line 81
-def destroy_project(project)
-  FileUtils.rm_rf(project.path_to_repo)
-  conf.rm_repo(project.path)
-end
-
- -
- - - - -
- - -
- -
- destroy_project!(project) - click to toggle source -
- - -
- - - - - -
-
# File lib/gitlab/backend/gitolite_config.rb, line 86
-def destroy_project!(project)
-  apply do |config|
-    config.destroy_project(project)
-  end
-end
-
- -
- - - - -
- - -
- -
- log(message) - click to toggle source -
- - -
- - - - - -
-
# File lib/gitlab/backend/gitolite_config.rb, line 77
-def log message
-  Gitlab::GitLogger.error(message)
-end
-
- -
- - - - -
- - -
- -
- rm_key(user) - click to toggle source -
- - -
- - - - - -
-
# File lib/gitlab/backend/gitolite_config.rb, line 98
-def rm_key(user)
-  key_path = File.join(config_tmp_dir, 'gitolite/keydir', "#{user}.pub")
-  ga_key = ::Gitolite::SSHKey.from_file(key_path)
-  ga_repo.rm_key(ga_key)
-end
-
- -
- - - - -
- - -
- -
- update_project(repo_name, project) - click to toggle source -
- - -
- -

update or create

- - - -
-
# File lib/gitlab/backend/gitolite_config.rb, line 105
-def update_project(repo_name, project)
-  repo = update_project_config(project, conf)
-  conf.add_repo(repo, true)
-end
-
- -
- - - - -
- - -
- -
- update_project!(repo_name, project) - click to toggle source -
- - -
- - - - - -
-
# File lib/gitlab/backend/gitolite_config.rb, line 110
-def update_project!(repo_name, project)
-  apply do |config|
-    config.update_project(repo_name, project)
-  end
-end
-
- -
- - - - -
- - -
- -
- update_project_config(project, conf) - click to toggle source -
- - -
- - - - - -
-
# File lib/gitlab/backend/gitolite_config.rb, line 125
-def update_project_config(project, conf)
-  repo_name = project.path
-
-  repo = if conf.has_repo?(repo_name)
-           conf.get_repo(repo_name)
-         else
-           ::Gitolite::Config::Repo.new(repo_name)
-         end
-
-  name_readers = project.repository_readers
-  name_writers = project.repository_writers
-  name_masters = project.repository_masters
-
-  pr_br = project.protected_branches.map(&:name).join("$ ")
-
-  repo.clean_permissions
-
-  # Deny access to protected branches for writers
-  unless name_writers.blank? || pr_br.blank?
-    repo.add_permission("-", pr_br.strip + "$ ", name_writers)
-  end
-
-  # Add read permissions
-  repo.add_permission("R", "", name_readers) unless name_readers.blank?
-
-  # Add write permissions
-  repo.add_permission("RW+", "", name_writers) unless name_writers.blank?
-  repo.add_permission("RW+", "", name_masters) unless name_masters.blank?
-
-  # Add sharedRepository config
-  repo.set_git_config("core.sharedRepository", "0660")
-
-  repo
-end
-
- -
- - - - -
- - -
- -
- update_projects(projects) - click to toggle source -
- - -
- -

Updates many projects and uses project.path as the repo path An order of -magnitude faster than #update_project

- - - -
-
# File lib/gitlab/backend/gitolite_config.rb, line 118
-def update_projects(projects)
-  projects.each do |project|
-    repo = update_project_config(project, conf)
-    conf.add_repo(repo, true)
-  end
-end
-
- -
- - - - -
- - -
- -
- write_key(id, key) - click to toggle source -
- - -
- - - - - -
-
# File lib/gitlab/backend/gitolite_config.rb, line 92
-def write_key(id, key)
-  File.open(File.join(config_tmp_dir, 'gitolite/keydir',"#{id}.pub"), 'w') do |f|
-    f.write(key.gsub(%r\n/,''))
-  end
-end
-
- -
- - - - -
- - -
- -
- -
- - - - diff --git a/doc/app/Gitlab/GitoliteConfig/PullError.html b/doc/app/Gitlab/GitoliteConfig/PullError.html deleted file mode 100644 index 8e5a1510..00000000 --- a/doc/app/Gitlab/GitoliteConfig/PullError.html +++ /dev/null @@ -1,439 +0,0 @@ - - - - - - -class Gitlab::GitoliteConfig::PullError - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

class Gitlab::GitoliteConfig::PullError

- -
- -
- - - - -
- - - - - - - - - - -
- -
- - - - diff --git a/doc/app/Gitlab/GitoliteConfig/PushError.html b/doc/app/Gitlab/GitoliteConfig/PushError.html deleted file mode 100644 index c1541f49..00000000 --- a/doc/app/Gitlab/GitoliteConfig/PushError.html +++ /dev/null @@ -1,439 +0,0 @@ - - - - - - -class Gitlab::GitoliteConfig::PushError - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

class Gitlab::GitoliteConfig::PushError

- -
- -
- - - - -
- - - - - - - - - - -
- -
- - - - diff --git a/doc/app/Gitlab/GraphCommit.html b/doc/app/Gitlab/GraphCommit.html deleted file mode 100644 index b8ffa6f4..00000000 --- a/doc/app/Gitlab/GraphCommit.html +++ /dev/null @@ -1,967 +0,0 @@ - - - - - - -class Gitlab::GraphCommit - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

class Gitlab::GraphCommit

- -
- -
- - - - -
- - - - - - - - -
-

Attributes

- - -
-
- refs[RW] -
- -
- - - -
-
- -
-
- space[RW] -
- -
- - - -
-
- -
-
- time[RW] -
- -
- - - -
-
- -
- - - - -
-

Public Class Methods

- - -
- -
- find_free_space(time_range) - click to toggle source -
- - -
- - - - - -
-
# File lib/gitlab/graph_commit.rb, line 113
-def self.find_free_space(time_range)
-  reserved = []
-  for day in time_range
-      reserved += @_reserved[day]
-  end
-  space = 1
-  while reserved.include? space do
-    space += 1
-  end
-  space
-end
-
- -
- - - - -
- - -
- -
- index_commits(commits) - click to toggle source -
- - -
- -

Method is adding time and space on the list of commits. As well as returns -date list corelated with time set on commits.

- -

@param [Array<GraphCommit>] comits to index

- -

@return [Array<TimeDate>] list of commit dates corelated with time on -commits

- - - -
-
# File lib/gitlab/graph_commit.rb, line 33
-def self.index_commits(commits)
-  days, heads = [], []
-  map = {}
-
-  commits.reverse.each_with_index do |c,i|
-    c.time = i
-    days[i] = c.committed_date
-    map[c.id] = c
-    heads += c.refs unless c.refs.nil?
-  end
-
-  heads.select!{|h| h.is_a? Grit::Head or h.is_a? Grit::Remote}
-  # sort heads so the master is top and current branches are closer
-  heads.sort! do |a,b|
-    if a.name == "master"
-      -1
-    elsif b.name == "master"
-      1
-    else
-      b.commit.committed_date <=> a.commit.committed_date
-    end
-  end
-
-  @_reserved = {}
-  days.each_index do |i|
-    @_reserved[i] = []
-  end
-
-  heads.each do |h|
-    if map.include? h.commit.id then
-      place_chain(map[h.commit.id], map)
-    end
-  end
-  days
-end
-
- -
- - - - -
- - -
- -
- mark_reserved(time_range, space) - click to toggle source -
- - -
- - - - - -
-
# File lib/gitlab/graph_commit.rb, line 107
-def self.mark_reserved(time_range, space)
-  for day in time_range
-    @_reserved[day].push(space)
-  end
-end
-
- -
- - - - -
- - -
- -
- new(commit) - click to toggle source -
- - -
- - - - - -
-
# File lib/gitlab/graph_commit.rb, line 148
-def initialize(commit)
-  @_commit = commit
-  @time = -1
-  @space = 0
-end
-
- -
- - - - -
- - -
- -
- place_chain(commit, map, parent_time = nil) - click to toggle source -
- - -
- -

Add space mark on commit and its parents

- -

@param [GraphCommit] the commit object. @param -[Hash<String,GraphCommit>] map of commits

- - - -
-
# File lib/gitlab/graph_commit.rb, line 73
-def self.place_chain(commit, map, parent_time = nil)
-  leaves = take_left_leaves(commit, map)
-  if leaves.empty? then
-    return
-  end
-  space = find_free_space(leaves.last.time..leaves.first.time)
-  leaves.each{|l| l.space = space}
-  # and mark it as reserved
-  min_time = leaves.last.time
-  parents = leaves.last.parents.collect
-  parents.each do |p|
-    if map.include? p.id then
-      parent = map[p.id]
-      if parent.time < min_time then
-        min_time = parent.time
-      end
-    end
-  end
-  if parent_time.nil? then
-    max_time = leaves.first.time
-  else
-    max_time = parent_time - 1
-  end
-  mark_reserved(min_time..max_time, space)
-  # Visit branching chains
-  leaves.each do |l|
-    parents = l.parents.collect
-      .select{|p| map.include? p.id and map[p.id].space == 0}
-    for p in parents
-      place_chain(map[p.id], map, l.time)
-    end
-  end
-end
-
- -
- - - - -
- - -
- -
- take_left_leaves(commit, map) - click to toggle source -
- - -
- -

Takes most left subtree branch of commits which don’t have space mark yet.

- -

@param [GraphCommit] the commit object. @param -[Hash<String,GraphCommit>] map of commits

- -

@return [Array<GraphCommit>] list of branch commits

- - - -
-
# File lib/gitlab/graph_commit.rb, line 132
-def self.take_left_leaves(commit, map)
-  leaves = []
-  leaves.push(commit)  if commit.space == 0
-  while true
-    parent = commit.parents.collect
-      .select{|p| map.include? p.id and map[p.id].space == 0}
-    if parent.count == 0 then
-      return leaves
-    else
-      commit = map[parent.first.id]
-      leaves.push(commit)
-    end
-  end
-end
-
- -
- - - - -
- - -
- -
- to_graph(project) - click to toggle source -
- - -
- - - - - -
-
# File lib/gitlab/graph_commit.rb, line 10
-def self.to_graph(project)
-  @repo = project.repo
-  commits = Grit::Commit.find_all(@repo, nil, {max_count: 650})
-
-  ref_cache = {}
-
-  commits.map! {|c| GraphCommit.new(Commit.new(c))}
-  commits.each { |commit| commit.add_refs(ref_cache, @repo) }
-
-  days = GraphCommit.index_commits(commits)
-  @days_json = days.compact.collect{|d| [d.day, d.strftime("%b")] }.to_json
-  @commits_json = commits.map(&:to_graph_hash).to_json
-
-  return @days_json, @commits_json
-end
-
- -
- - - - -
- - -
- -
-

Public Instance Methods

- - -
- -
- add_refs(ref_cache, repo) - click to toggle source -
- - -
- - - - - -
-
# File lib/gitlab/graph_commit.rb, line 174
-def add_refs(ref_cache, repo)
-  if ref_cache.empty?
-    repo.refs.each do |ref|
-      ref_cache[ref.commit.id] ||= []
-      ref_cache[ref.commit.id] << ref
-    end
-  end
-  @refs = ref_cache[@_commit.id] if ref_cache.include?(@_commit.id)
-  @refs ||= []
-end
-
- -
- - - - -
- - -
- -
- method_missing(m, *args, &block) - click to toggle source -
- - -
- - - - - -
-
# File lib/gitlab/graph_commit.rb, line 154
-def method_missing(m, *args, &block)
-  @_commit.send(m, *args, &block)
-end
-
- -
- - - - -
- - -
- -
- to_graph_hash() - click to toggle source -
- - -
- - - - - -
-
# File lib/gitlab/graph_commit.rb, line 158
-def to_graph_hash
-  h = {}
-  h[:parents] = self.parents.collect do |p|
-    [p.id,0,0]
-  end
-  h[:author]  = Gitlab::Encode.utf8(author.name)
-  h[:time]    = time
-  h[:space]   = space
-  h[:refs]    = refs.collect{|r|r.name}.join(" ") unless refs.nil?
-  h[:id]      = sha
-  h[:date]    = date
-  h[:message] = escape_once(Gitlab::Encode.utf8(message))
-  h[:login]   = author.email
-  h
-end
-
- -
- - - - -
- - -
- -
- -
- - - - diff --git a/doc/app/Gitlab/InlineDiff.html b/doc/app/Gitlab/InlineDiff.html deleted file mode 100644 index 91eeae9c..00000000 --- a/doc/app/Gitlab/InlineDiff.html +++ /dev/null @@ -1,611 +0,0 @@ - - - - - - -class Gitlab::InlineDiff - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

class Gitlab::InlineDiff

- -
- -
- - - - -
- - - - - - -
-

Constants

-
- -
FINISH - -
- - -
START - -
- - -
-
- - - - - - -
-

Public Class Methods

- - -
- -
- _indexes_of_changed_lines(diff_arr) - click to toggle source -
- - -
- - - - - -
-
# File lib/gitlab/inline_diff.rb, line 42
-def _indexes_of_changed_lines diff_arr
-  chain_of_first_symbols = ""
-  diff_arr.each_with_index do |line, i|
-    chain_of_first_symbols += line[0]
-  end
-  chain_of_first_symbols.gsub!(%r[^\-\+]/, "#")
-
-  offset = 0
-  indexes = []
-  while index = chain_of_first_symbols.index("#-+#", offset)
-    indexes << index
-    offset = index + 1
-  end
-  indexes
-end
-
- -
- - - - -
- - -
- -
- processing(diff_arr) - click to toggle source -
- - -
- - - - - -
-
# File lib/gitlab/inline_diff.rb, line 8
-def processing diff_arr
-  indexes = _indexes_of_changed_lines diff_arr
-
-  indexes.each do |index|
-    first_line = diff_arr[index+1]
-    second_line = diff_arr[index+2]
-    max_length = [first_line.size, second_line.size].max
-
-    first_the_same_symbols = 0
-    (0..max_length + 1).each do |i|
-      first_the_same_symbols = i - 1
-      if first_line[i] != second_line[i] && i > 0
-        break
-      end
-    end
-    first_token = first_line[0..first_the_same_symbols][1..-1]
-    diff_arr[index+1].sub!(first_token, first_token + START)
-    diff_arr[index+2].sub!(first_token, first_token + START)
-    last_the_same_symbols = 0
-    (1..max_length + 1).each do |i|
-      last_the_same_symbols = -i
-      shortest_line = second_line.size > first_line.size ? first_line : second_line
-      if ( first_line[-i] != second_line[-i] ) || "#{first_token}#{START}".size == shortest_line[1..-i].size
-        break
-      end
-    end
-    last_the_same_symbols += 1
-    last_token = first_line[last_the_same_symbols..-1]
-    diff_arr[index+1].sub!(%r#{Regexp.escape(last_token)}$/, FINISH + last_token)
-    diff_arr[index+2].sub!(%r#{Regexp.escape(last_token)}$/, FINISH + last_token)
-  end
-  diff_arr
-end
-
- -
- - - - -
- - -
- -
- replace_markers(line) - click to toggle source -
- - -
- - - - - -
-
# File lib/gitlab/inline_diff.rb, line 58
-def replace_markers line
-  line.gsub!(START, "<span class='idiff'>")
-  line.gsub!(FINISH, "</span>")
-  line
-end
-
- -
- - - - -
- - -
- -
- -
- - - - diff --git a/doc/app/Gitlab/Issues.html b/doc/app/Gitlab/Issues.html deleted file mode 100644 index eda99ed1..00000000 --- a/doc/app/Gitlab/Issues.html +++ /dev/null @@ -1,441 +0,0 @@ - - - - - - -class Gitlab::Issues - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

class Gitlab::Issues

- -
- -

Issues API

- -
- - - - -
- - - - - - - - - - -
- -
- - - - diff --git a/doc/app/Gitlab/Logger.html b/doc/app/Gitlab/Logger.html deleted file mode 100644 index 8cc6cdea..00000000 --- a/doc/app/Gitlab/Logger.html +++ /dev/null @@ -1,583 +0,0 @@ - - - - - - -class Gitlab::Logger - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

class Gitlab::Logger

- -
- -
- - - - -
- - - - - - - - - - -
-

Public Class Methods

- - -
- -
- build() - click to toggle source -
- - -
- - - - - -
-
# File lib/gitlab/logger.rb, line 17
-def self.build
-  new(Rails.root.join("log", file_name))
-end
-
- -
- - - - -
- - -
- -
- error(message) - click to toggle source -
- - -
- - - - - -
-
# File lib/gitlab/logger.rb, line 3
-def self.error(message)
-  build.error(message)
-end
-
- -
- - - - -
- - -
- -
- info(message) - click to toggle source -
- - -
- - - - - -
-
# File lib/gitlab/logger.rb, line 7
-def self.info(message)
-  build.info(message)
-end
-
- -
- - - - -
- - -
- -
- read_latest() - click to toggle source -
- - -
- - - - - -
-
# File lib/gitlab/logger.rb, line 11
-def self.read_latest
-  path = Rails.root.join("log", file_name)
-  self.build unless File.exist?(path)
-  logs = File.read(path).split("\n")
-end
-
- -
- - - - -
- - -
- -
- -
- - - - diff --git a/doc/app/Gitlab/Markdown.html b/doc/app/Gitlab/Markdown.html deleted file mode 100644 index 12691455..00000000 --- a/doc/app/Gitlab/Markdown.html +++ /dev/null @@ -1,580 +0,0 @@ - - - - - - -module Gitlab::Markdown - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

module Gitlab::Markdown

- -
- -

Custom parser for GitLab-flavored Markdown

- -

It replaces references in the text with links to the appropriate items in -GitLab.

- -

Supported reference formats are:

- -
* @foo for team members
-* #123 for issues
-* !123 for merge requests
-* $123 for snippets
-* 123456 for commits
- -

It also parses Emoji codes to insert images. See www.emoji-cheat-sheet.com/ for -a list of the supported icons.

- -

Examples

- -
>> gfm("Hey @david, can you fix this?")
-=> "Hey <a href="/gitlab/team_members/1">@david</a>, can you fix this?"
-
->> gfm("Commit 35d5f7c closes #1234")
-=> "Commit <a href="/gitlab/commits/35d5f7c">35d5f7c</a> closes <a href="/gitlab/issues/1234">#1234</a>"
-
->> gfm(":trollface:")
-=> "<img alt=\":trollface:\" class=\"emoji\" src=\"/images/trollface.png" title=\":trollface:\" />
-
- -
- - - - -
- - - - - - -
-

Constants

-
- -
EMOJI_PATTERN - -
- - -
REFERENCE_PATTERN - -
- - -
-
- - - - -
-

Attributes

- - -
-
- html_options[R] -
- -
- - - -
-
- -
- - - - -
-

Public Instance Methods

- - -
- -
- gfm(text, html_options = {}) - click to toggle source -
- - -
- -

Public: Parse the provided text with GitLab-Flavored Markdown

- -

text - the source text #html_options - extra -options for the reference links as given to link_to

- -

Note: reference links will only be generated if @project is set

- - - -
-
# File lib/gitlab/markdown.rb, line 48
-def gfm(text, html_options = {})
-  return text if text.nil?
-
-  # Duplicate the string so we don't alter the original, then call to_str
-  # to cast it back to a String instead of a SafeBuffer. This is required
-  # for gsub calls to work as we need them to.
-  text = text.dup.to_str
-
-  @html_options = html_options
-
-  # Extract pre blocks so they are not altered
-  # from http://github.github.com/github-flavored-markdown/
-  extractions = {}
-  text.gsub!(%r{<pre>.*?</pre>|<code>.*?</code>}) do |match|
-    md5 = Digest::MD5.hexdigest(match)
-    extractions[md5] = match
-    "{gfm-extraction-#{md5}}"
-  end
-
-  # TODO: add popups with additional information
-
-  text = parse(text)
-
-  # Insert pre block extractions
-  text.gsub!(%r\{gfm-extraction-(\h{32})\}/) do
-    extractions[$1]
-  end
-
-  sanitize text.html_safe, attributes: ActionView::Base.sanitized_allowed_attributes + %w(id class)
-end
-
- -
- - - - -
- - -
- -
- -
- - - - diff --git a/doc/app/Gitlab/Merge.html b/doc/app/Gitlab/Merge.html deleted file mode 100644 index 99a66cd5..00000000 --- a/doc/app/Gitlab/Merge.html +++ /dev/null @@ -1,628 +0,0 @@ - - - - - - -class Gitlab::Merge - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

class Gitlab::Merge

- -
- -
- - - - -
- - - - - - - - -
-

Attributes

- - -
-
- merge_request[RW] -
- -
- - - -
-
- -
-
- project[RW] -
- -
- - - -
-
- -
-
- user[RW] -
- -
- - - -
-
- -
- - - - -
-

Public Class Methods

- - -
- -
- new(merge_request, user) - click to toggle source -
- - -
- - - - - -
-
# File lib/gitlab/merge.rb, line 5
-def initialize(merge_request, user)
-  @merge_request = merge_request
-  @project = merge_request.project
-  @user = user
-end
-
- -
- - - - -
- - -
- -
-

Public Instance Methods

- - -
- -
- can_be_merged?() - click to toggle source -
- - -
- - - - - -
-
# File lib/gitlab/merge.rb, line 11
-def can_be_merged?
-  in_locked_and_timed_satellite do |merge_repo|
-    merge_in_satellite!(merge_repo)
-  end
-end
-
- -
- - - - -
- - -
- -
- merge!() - click to toggle source -
- - -
- -

Merges the source branch into the target branch in the satellite and pushes -it back to Gitolite. It also removes the source -branch if requested in the merge request.

- -

Returns false if the merge produced conflicts Returns false if pushing from -the satallite to Gitolite failed or was -rejected Returns true otherwise

- - - -
-
# File lib/gitlab/merge.rb, line 24
-def merge!
-  in_locked_and_timed_satellite do |merge_repo|
-    if merge_in_satellite!(merge_repo)
-      # push merge back to Gitolite
-      # will raise CommandFailed when push fails
-      merge_repo.git.push({raise: true}, :origin, merge_request.target_branch)
-
-      # remove source branch
-      if merge_request.should_remove_source_branch && !project.root_ref?(merge_request.source_branch)
-        # will raise CommandFailed when push fails
-        merge_repo.git.push({raise: true}, :origin, ":#{merge_request.source_branch}")
-      end
-
-      # merge, push and branch removal successful
-      true
-    end
-  end
-rescue Grit::Git::CommandFailed
-  false
-end
-
- -
- - - - -
- - -
- -
- -
- - - - diff --git a/doc/app/Gitlab/Milestones.html b/doc/app/Gitlab/Milestones.html deleted file mode 100644 index aac605b2..00000000 --- a/doc/app/Gitlab/Milestones.html +++ /dev/null @@ -1,441 +0,0 @@ - - - - - - -class Gitlab::Milestones - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

class Gitlab::Milestones

- -
- -

Milestones API

- -
- - - - -
- - - - - - - - - - -
- -
- - - - diff --git a/doc/app/Gitlab/Projects.html b/doc/app/Gitlab/Projects.html deleted file mode 100644 index a44cba3c..00000000 --- a/doc/app/Gitlab/Projects.html +++ /dev/null @@ -1,441 +0,0 @@ - - - - - - -class Gitlab::Projects - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

class Gitlab::Projects

- -
- -

Projects API

- -
- - - - -
- - - - - - - - - - -
- -
- - - - diff --git a/doc/app/Gitlab/Satellite.html b/doc/app/Gitlab/Satellite.html deleted file mode 100644 index 4615d1c6..00000000 --- a/doc/app/Gitlab/Satellite.html +++ /dev/null @@ -1,664 +0,0 @@ - - - - - - -class Gitlab::Satellite - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

class Gitlab::Satellite

- -
- -
- - - - -
- - - - - - -
-

Constants

-
- -
PARKING_BRANCH - -
- - -
-
- - - - -
-

Attributes

- - -
-
- project[RW] -
- -
- - - -
-
- -
- - - - -
-

Public Class Methods

- - -
- -
- new(project) - click to toggle source -
- - -
- - - - - -
-
# File lib/gitlab/satellite.rb, line 8
-def initialize project
-  self.project = project
-end
-
- -
- - - - -
- - -
- -
-

Public Instance Methods

- - -
- -
- clear() - click to toggle source -
- - -
- -

will be deleted all branches except PARKING_BRANCH

- - - -
-
# File lib/gitlab/satellite.rb, line 25
-def clear
-  Dir.chdir(path) do
-    heads = Grit::Repo.new(".").heads.map{|head| head.name}
-    if heads.include? PARKING_BRANCH
-      %xgit checkout #{PARKING_BRANCH}`
-    else
-      %xgit checkout -b #{PARKING_BRANCH}`
-    end
-    heads.delete(PARKING_BRANCH)
-    heads.each do |head|
-      %xgit branch -D #{head}`
-    end
-  end
-end
-
- -
- - - - -
- - -
- -
- create() - click to toggle source -
- - -
- - - - - -
-
# File lib/gitlab/satellite.rb, line 12
-def create
-  %xgit clone #{project.url_to_repo} #{path}`
-end
-
- -
- - - - -
- - -
- -
- exists?() - click to toggle source -
- - -
- - - - - -
-
# File lib/gitlab/satellite.rb, line 20
-def exists?
-  File.exists? path
-end
-
- -
- - - - -
- - -
- -
- path() - click to toggle source -
- - -
- - - - - -
-
# File lib/gitlab/satellite.rb, line 16
-def path
-  Rails.root.join("tmp", "repo_satellites", project.path)
-end
-
- -
- - - - -
- - -
- -
- -
- - - - diff --git a/doc/app/Gitlab/Session.html b/doc/app/Gitlab/Session.html deleted file mode 100644 index 12f3433e..00000000 --- a/doc/app/Gitlab/Session.html +++ /dev/null @@ -1,441 +0,0 @@ - - - - - - -class Gitlab::Session - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

class Gitlab::Session

- -
- -

Users API

- -
- - - - -
- - - - - - - - - - -
- -
- - - - diff --git a/doc/app/Gitlab/Theme.html b/doc/app/Gitlab/Theme.html deleted file mode 100644 index 00b3e5f6..00000000 --- a/doc/app/Gitlab/Theme.html +++ /dev/null @@ -1,493 +0,0 @@ - - - - - - -class Gitlab::Theme - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

class Gitlab::Theme

- -
- -
- - - - -
- - - - - - - - - - -
-

Public Class Methods

- - -
- -
- css_class_by_id(id) - click to toggle source -
- - -
- - - - - -
-
# File lib/gitlab/theme.rb, line 3
-def self.css_class_by_id(id)
-  themes = { 
-    1 => "ui_basic",
-    2 => "ui_mars",
-    3 => "ui_modern"
-  }
-
-  id ||= 1
-
-  return themes[id]
-end
-
- -
- - - - -
- - -
- -
- -
- - - - diff --git a/doc/app/Gitlab/Users.html b/doc/app/Gitlab/Users.html deleted file mode 100644 index c9712874..00000000 --- a/doc/app/Gitlab/Users.html +++ /dev/null @@ -1,441 +0,0 @@ - - - - - - -class Gitlab::Users - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

class Gitlab::Users

- -
- -

Users API

- -
- - - - -
- - - - - - - - - - -
- -
- - - - diff --git a/doc/app/GitlabMarkdownHelper.html b/doc/app/GitlabMarkdownHelper.html deleted file mode 100644 index 6bf172ac..00000000 --- a/doc/app/GitlabMarkdownHelper.html +++ /dev/null @@ -1,559 +0,0 @@ - - - - - - -module GitlabMarkdownHelper - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

module GitlabMarkdownHelper

- -
- -
- - - - -
- - - - - - - - - - -
-

Public Instance Methods

- - - - - -
- -
- markdown(text) - click to toggle source -
- - -
- - - - - -
-
# File app/helpers/gitlab_markdown_helper.rb, line 25
-def markdown(text)
-  unless @markdown
-    gitlab_renderer = Redcarpet::Render::GitlabHTML.new(self,
-                        # see https://github.com/vmg/redcarpet#darling-i-packed-you-a-couple-renderers-for-lunch-
-                        filter_html: true,
-                        with_toc_data: true,
-                        hard_wrap: true)
-    @markdown = Redcarpet::Markdown.new(gitlab_renderer,
-                    # see https://github.com/vmg/redcarpet#and-its-like-really-simple-to-use
-                    no_intra_emphasis: true,
-                    tables: true,
-                    fenced_code_blocks: true,
-                    autolink: true,
-                    strikethrough: true,
-                    lax_html_blocks: true,
-                    space_after_headers: true,
-                    superscript: true)
-  end
-
-  @markdown.render(text).html_safe
-end
-
- -
- - - - -
- - -
- -
- -
- - - - diff --git a/doc/app/Grack.html b/doc/app/Grack.html deleted file mode 100644 index e3c5bbd4..00000000 --- a/doc/app/Grack.html +++ /dev/null @@ -1,433 +0,0 @@ - - - - - - -module Grack - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

module Grack

- -
- -
- - - - -
- - - - - - - - - - -
- -
- - - - diff --git a/doc/app/Grack/Auth.html b/doc/app/Grack/Auth.html deleted file mode 100644 index 5da483f7..00000000 --- a/doc/app/Grack/Auth.html +++ /dev/null @@ -1,734 +0,0 @@ - - - - - - -class Grack::Auth - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

class Grack::Auth

- -
- -
- - - - -
- - - - - - - - -
-

Attributes

- - -
-
- project[RW] -
- -
- - - -
-
- -
-
- user[RW] -
- -
- - - -
-
- -
- - - - -
-

Public Instance Methods

- - -
- -
- can?(object, action, subject) - click to toggle source -
- - -
- - - - - -
-
# File lib/gitlab/backend/grack_auth.rb, line 56
-def can?(object, action, subject)
-  abilities.allowed?(object, action, subject)
-end
-
- -
- - - - -
- - -
- -
- current_ref() - click to toggle source -
- - -
- - - - - -
-
# File lib/gitlab/backend/grack_auth.rb, line 60
-def current_ref
-  if @env["HTTP_CONTENT_ENCODING"] =~ %rgzip/
-    input = Zlib::GzipReader.new(@request.body).read
-  else
-    input = @request.body.read
-  end
-  # Need to reset seek point
-  @request.body.rewind
-  %rrefs\/heads\/([\w-]+)/.match(input).to_a.first
-end
-
- -
- - - - -
- - -
- -
- valid?() - click to toggle source -
- - -
- - - - - -
-
# File lib/gitlab/backend/grack_auth.rb, line 5
-def valid?
-  # Authentication with username and password
-  email, password = @auth.credentials
-  self.user = User.find_by_email(email)
-  return false unless user.try(:valid_password?, password)
-
-  # Set GL_USER env variable
-  ENV['GL_USER'] = email
-  # Pass Gitolite update hook
-  ENV['GL_BYPASS_UPDATE_HOOK'] = "true"
-
-  # Need this patch due to the rails mount
-  @env['PATH_INFO'] = @request.path
-  @env['SCRIPT_NAME'] = ""
-
-  # Find project by PATH_INFO from env
-  if m = %r^\/([\w-]+).git/.match(@request.path_info).to_a
-    self.project = Project.find_by_path(m.last)
-    return false unless project
-  end
-
-  # Git upload and receive
-  if @request.get?
-    validate_get_request
-  elsif @request.post?
-    validate_post_request
-  else
-    false
-  end
-end
-
- -
- - - - -
- - -
- -
- validate_get_request() - click to toggle source -
- - -
- - - - - -
-
# File lib/gitlab/backend/grack_auth.rb, line 36
-def validate_get_request
-  true
-end
-
- -
- - - - -
- - -
- -
- validate_post_request() - click to toggle source -
- - -
- - - - - -
-
# File lib/gitlab/backend/grack_auth.rb, line 40
-def validate_post_request
-  if @request.path_info.end_with?('git-upload-pack')
-    can?(user, :push_code, project)
-  elsif @request.path_info.end_with?('git-receive-pack')
-    action = if project.protected_branch?(current_ref)
-               :push_code_to_protected_branches
-             else
-               :push_code
-             end
-
-    can?(user, action, project)
-  else
-    false
-  end
-end
-
- -
- - - - -
- - -
- -
-

Protected Instance Methods

- - -
- -
- abilities() - click to toggle source -
- - -
- - - - - -
-
# File lib/gitlab/backend/grack_auth.rb, line 73
-def abilities
-  @abilities ||= begin
-                   abilities = Six.new
-                   abilities << Ability
-                   abilities
-                 end
-end
-
- -
- - - - -
- - -
- -
- -
- - - - diff --git a/doc/app/Group.html b/doc/app/Group.html deleted file mode 100644 index a23e1da6..00000000 --- a/doc/app/Group.html +++ /dev/null @@ -1,555 +0,0 @@ - - - - - - -class Group - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

class Group

- -
- -
- - - - -
- - - - - - - - - - -
-

Public Class Methods

- - - - - -
- -
-

Public Instance Methods

- - -
- -
- to_param() - click to toggle source -
- - -
- - - - - -
-
# File app/models/group.rb, line 17
-def to_param
-  code
-end
-
- -
- - - - -
- - -
- -
- users() - click to toggle source -
- - -
- - - - - -
-
# File app/models/group.rb, line 21
-def users
-  User.joins(:users_projects).where(users_projects: {project_id: project_ids}).uniq
-end
-
- -
- - - - -
- - -
- -
- -
- - - - diff --git a/doc/app/GroupsController.html b/doc/app/GroupsController.html deleted file mode 100644 index 72e1022c..00000000 --- a/doc/app/GroupsController.html +++ /dev/null @@ -1,735 +0,0 @@ - - - - - - -class GroupsController - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

class GroupsController

- -
- -
- - - - -
- - - - - - - - - - -
-

Public Instance Methods

- - -
- -
- issues() - click to toggle source -
- - -
- -

Get only assigned issues

- - - -
-
# File app/controllers/groups_controller.rb, line 26
-def issues
-  @user   = current_user
-  @issues = current_user.assigned_issues.opened
-  @issues = @issues.of_group(@group).recent.page(params[:page]).per(20)
-  @issues = @issues.includes(:author, :project)
-
-  respond_to do |format|
-    format.html
-    format.atom { render layout: false }
-  end
-end
-
- -
- - - - -
- - -
- -
- merge_requests() - click to toggle source -
- - -
- -

Get authored or assigned open merge requests

- - - -
-
# File app/controllers/groups_controller.rb, line 20
-def merge_requests
-  @merge_requests = current_user.cared_merge_requests
-  @merge_requests = @merge_requests.of_group(@group).recent.page(params[:page]).per(20)
-end
-
- -
- - - - -
- - -
- -
- people() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/groups_controller.rb, line 46
-def people
-  @users = group.users.all
-end
-
- -
- - - - -
- - - - - -
- -
- show() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/groups_controller.rb, line 8
-def show
-  @events = Event.in_projects(project_ids).limit(20).offset(params[:offset] || 0)
-  @last_push = current_user.recent_push
-
-  respond_to do |format|
-    format.html
-    format.js
-    format.atom { render layout: false }
-  end
-end
-
- -
- - - - -
- - -
- -
-

Protected Instance Methods

- - -
- -
- group() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/groups_controller.rb, line 52
-def group
-  @group ||= Group.find_by_code(params[:id])
-end
-
- -
- - - - -
- - -
- -
- project_ids() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/groups_controller.rb, line 60
-def project_ids
-  projects.map(&:id)
-end
-
- -
- - - - -
- - -
- -
- projects() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/groups_controller.rb, line 56
-def projects
-  @projects ||= current_user.projects_with_events.where(group_id: @group.id)
-end
-
- -
- - - - -
- - -
- -
- -
- - - - diff --git a/doc/app/HelpController.html b/doc/app/HelpController.html deleted file mode 100644 index afbbeb0b..00000000 --- a/doc/app/HelpController.html +++ /dev/null @@ -1,484 +0,0 @@ - - - - - - -class HelpController - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

class HelpController

- -
- -
- - - - -
- - - - - - - - - - -
-

Public Instance Methods

- - -
- -
- index() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/help_controller.rb, line 2
-def index
-end
-
- -
- - - - -
- - -
- -
- -
- - - - diff --git a/doc/app/HooksController.html b/doc/app/HooksController.html deleted file mode 100644 index 70fd89c3..00000000 --- a/doc/app/HooksController.html +++ /dev/null @@ -1,595 +0,0 @@ - - - - - - -class HooksController - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

class HooksController

- -
- -
- - - - -
- - - - - - - - - - -
-

Public Instance Methods

- - -
- -
- create() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/hooks_controller.rb, line 13
-def create
-  @hook = @project.hooks.new(params[:hook])
-  @hook.save
-
-  if @hook.valid?
-    redirect_to project_hooks_path(@project)
-  else
-    @hooks = @project.hooks.all
-    render :index
-  end
-end
-
- -
- - - - -
- - -
- -
- destroy() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/hooks_controller.rb, line 31
-def destroy
-  @hook = @project.hooks.find(params[:id])
-  @hook.destroy
-
-  redirect_to project_hooks_path(@project)
-end
-
- -
- - - - -
- - -
- -
- index() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/hooks_controller.rb, line 8
-def index
-  @hooks = @project.hooks.all
-  @hook = ProjectHook.new
-end
-
- -
- - - - -
- - -
- -
- test() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/hooks_controller.rb, line 25
-def test
-  TestHookContext.new(project, current_user, params).execute
-
-  redirect_to :back
-end
-
- -
- - - - -
- - -
- -
- -
- - - - diff --git a/doc/app/Issue.html b/doc/app/Issue.html deleted file mode 100644 index e8a7881c..00000000 --- a/doc/app/Issue.html +++ /dev/null @@ -1,501 +0,0 @@ - - - - - - -class Issue - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

class Issue

- -
- -
- - - - -
- - - - - - - - - - -
-

Public Class Methods

- - -
- -
- open_for(user) - click to toggle source -
- - -
- - - - - -
-
# File app/models/issue.rb, line 14
-def self.open_for(user)
-  opened.assigned(user)
-end
-
- -
- - - - -
- - -
- -
- -
- - - - diff --git a/doc/app/IssueCommonality.html b/doc/app/IssueCommonality.html deleted file mode 100644 index 336580d8..00000000 --- a/doc/app/IssueCommonality.html +++ /dev/null @@ -1,641 +0,0 @@ - - - - - - -module IssueCommonality - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

module IssueCommonality

- -
- -

Contains common functionality shared between Issues and MergeRequests

- -
- - - - -
- - - - - - - - - - -
-

Public Instance Methods

- - -
- -
- is_assigned?() - click to toggle source -
- - -
- - - - - -
-
# File app/roles/issue_commonality.rb, line 50
-def is_assigned?
-  !!assignee_id
-end
-
- -
- - - - -
- - -
- -
- is_being_closed?() - click to toggle source -
- - -
- - - - - -
-
# File app/roles/issue_commonality.rb, line 58
-def is_being_closed?
-  closed_changed? && closed
-end
-
- -
- - - - -
- - -
- -
- is_being_reassigned?() - click to toggle source -
- - -
- - - - - -
-
# File app/roles/issue_commonality.rb, line 54
-def is_being_reassigned?
-  assignee_id_changed?
-end
-
- -
- - - - -
- - -
- -
- is_being_reopened?() - click to toggle source -
- - -
- - - - - -
-
# File app/roles/issue_commonality.rb, line 62
-def is_being_reopened?
-  closed_changed? && !closed
-end
-
- -
- - - - -
- - -
- -
- new?() - click to toggle source -
- - -
- - - - - -
-
# File app/roles/issue_commonality.rb, line 46
-def new?
-  today? && created_at == updated_at
-end
-
- -
- - - - -
- - -
- -
- today?() - click to toggle source -
- - -
- - - - - -
-
# File app/roles/issue_commonality.rb, line 42
-def today?
-  Date.today == created_at.to_date
-end
-
- -
- - - - -
- - -
- -
- -
- - - - diff --git a/doc/app/IssueCommonality/ClassMethods.html b/doc/app/IssueCommonality/ClassMethods.html deleted file mode 100644 index d4ab179d..00000000 --- a/doc/app/IssueCommonality/ClassMethods.html +++ /dev/null @@ -1,479 +0,0 @@ - - - - - - -module IssueCommonality::ClassMethods - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

module IssueCommonality::ClassMethods

- -
- -
- - - - -
- - - - - - - - - - -
-

Public Instance Methods

- - - - - -
- -
- -
- - - - diff --git a/doc/app/IssueObserver.html b/doc/app/IssueObserver.html deleted file mode 100644 index 7f16a865..00000000 --- a/doc/app/IssueObserver.html +++ /dev/null @@ -1,571 +0,0 @@ - - - - - - -class IssueObserver - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

class IssueObserver

- -
- -
- - - - -
- - - - - - - - - - -
-

Public Instance Methods

- - -
- -
- after_create(issue) - click to toggle source -
- - -
- - - - - -
-
# File app/observers/issue_observer.rb, line 4
-def after_create(issue)
-  if issue.assignee && issue.assignee != current_user
-    Notify.new_issue_email(issue.id).deliver 
-  end
-end
-
- -
- - - - -
- - -
- -
- after_update(issue) - click to toggle source -
- - -
- - - - - -
-
# File app/observers/issue_observer.rb, line 10
-def after_update(issue)
-  send_reassigned_email(issue) if issue.is_being_reassigned?
-
-  status = nil
-  status = 'closed' if issue.is_being_closed?
-  status = 'reopened' if issue.is_being_reopened?
-  if status
-    Note.create_status_change_note(issue, current_user, status) 
-    [issue.author, issue.assignee].compact.each do |recipient| 
-      Notify.issue_status_changed_email(recipient.id, issue.id, status, current_user)
-    end
-  end
-end
-
- -
- - - - -
- - -
- -
-

Protected Instance Methods

- - -
- -
- send_reassigned_email(issue) - click to toggle source -
- - -
- - - - - -
-
# File app/observers/issue_observer.rb, line 26
-def send_reassigned_email(issue)
-  recipient_ids = [issue.assignee_id, issue.assignee_id_was].keep_if {|id| id && id != current_user.id }
-
-  recipient_ids.each do |recipient_id|
-    Notify.reassigned_issue_email(recipient_id, issue.id, issue.assignee_id_was).deliver
-  end
-end
-
- -
- - - - -
- - -
- -
- -
- - - - diff --git a/doc/app/IssuesBulkUpdateContext.html b/doc/app/IssuesBulkUpdateContext.html deleted file mode 100644 index 1d87a757..00000000 --- a/doc/app/IssuesBulkUpdateContext.html +++ /dev/null @@ -1,503 +0,0 @@ - - - - - - -class IssuesBulkUpdateContext - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

class IssuesBulkUpdateContext

- -
- -
- - - - -
- - - - - - - - - - -
-

Public Instance Methods

- - -
- -
- execute() - click to toggle source -
- - -
- - - - - -
-
# File app/contexts/issues_bulk_update_context.rb, line 2
-def execute
-  update_data = params[:update]
-
-  issues_ids   = update_data[:issues_ids].split(",")
-  milestone_id = update_data[:milestone_id]
-  assignee_id  = update_data[:assignee_id]
-  status       = update_data[:status]
-
-  opts = {} 
-  opts[:milestone_id] = milestone_id if milestone_id.present?
-  opts[:assignee_id] = assignee_id if assignee_id.present?
-  opts[:closed] = (status == "closed") if status.present?
-
-  issues = Issue.where(id: issues_ids).all
-  issues = issues.select { |issue| can?(current_user, :modify_issue, issue) }
-  issues.each { |issue| issue.update_attributes(opts) }
-  { 
-    count: issues.count,
-    success: !issues.count.zero?
-  }
-end
-
- -
- - - - -
- - -
- -
- -
- - - - diff --git a/doc/app/IssuesController.html b/doc/app/IssuesController.html deleted file mode 100644 index 6b3edbb6..00000000 --- a/doc/app/IssuesController.html +++ /dev/null @@ -1,996 +0,0 @@ - - - - - - -class IssuesController - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

class IssuesController

- -
- -
- - - - -
- - - - - - - - - - -
-

Public Instance Methods

- - -
- -
- bulk_update() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/issues_controller.rb, line 111
-def bulk_update
-  result = IssuesBulkUpdateContext.new(project, current_user, params).execute
-  redirect_to :back, notice: "#{result[:count]} issues updated"
-end
-
- -
- - - - -
- - -
- -
- create() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/issues_controller.rb, line 48
-def create
-  @issue = @project.issues.new(params[:issue])
-  @issue.author = current_user
-  @issue.save
-
-  respond_to do |format|
-    format.html do
-      if @issue.valid?
-        redirect_to project_issue_path(@project, @issue)
-      else
-        render :new
-      end
-    end
-    format.js
-  end
-end
-
- -
- - - - -
- - -
- -
- destroy() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/issues_controller.rb, line 80
-def destroy
-  @issue.destroy
-
-  respond_to do |format|
-    format.html { redirect_to project_issues_path }
-    format.js { render nothing: true }
-  end
-end
-
- -
- - - - -
- - -
- -
- edit() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/issues_controller.rb, line 35
-def edit
-  respond_with(@issue)
-end
-
- -
- - - - -
- - -
- -
- index() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/issues_controller.rb, line 19
-def index
-  @issues = issues_filtered
-  @issues = @issues.page(params[:page]).per(20)
-
-  respond_to do |format|
-    format.html # index.html.erb
-    format.js
-    format.atom { render layout: false }
-  end
-end
-
- -
- - - - -
- - -
- -
- new() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/issues_controller.rb, line 30
-def new
-  @issue = @project.issues.new(params[:issue])
-  respond_with(@issue)
-end
-
- -
- - - - -
- - - - - -
- -
- show() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/issues_controller.rb, line 39
-def show
-  @note = @project.notes.new(noteable: @issue)
-
-  respond_to do |format|
-    format.html
-    format.js
-  end
-end
-
- -
- - - - -
- - -
- -
- sort() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/issues_controller.rb, line 89
-def sort
-  return render_404 unless can?(current_user, :admin_issue, @project)
-
-  @issues = @project.issues.where(id: params['issue'])
-  @issues.each do |issue|
-    issue.position = params['issue'].index(issue.id.to_s) + 1
-    issue.save
-  end
-
-  render nothing: true
-end
-
- -
- - - - -
- - -
- -
- update() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/issues_controller.rb, line 65
-def update
-  @issue.update_attributes(params[:issue].merge(author_id_of_changes: current_user.id))
-
-  respond_to do |format|
-    format.js
-    format.html do
-      if @issue.valid?
-        redirect_to [@project, @issue]
-      else
-        render :edit
-      end
-    end
-  end
-end
-
- -
- - - - -
- - -
- -
-

Protected Instance Methods

- - -
- -
- authorize_admin_issue!() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/issues_controller.rb, line 126
-def authorize_admin_issue!
-  return render_404 unless can?(current_user, :admin_issue, @issue)
-end
-
- -
- - - - -
- - -
- -
- authorize_modify_issue!() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/issues_controller.rb, line 122
-def authorize_modify_issue!
-  return render_404 unless can?(current_user, :modify_issue, @issue)
-end
-
- -
- - - - -
- - -
- -
- issue() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/issues_controller.rb, line 118
-def issue
-  @issue ||= @project.issues.find(params[:id])
-end
-
- -
- - - - -
- - -
- -
- issues_filtered() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/issues_controller.rb, line 134
-def issues_filtered
-  @issues = IssuesListContext.new(project, current_user, params).execute
-end
-
- -
- - - - -
- - -
- -
- module_enabled() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/issues_controller.rb, line 130
-def module_enabled
-  return render_404 unless @project.issues_enabled
-end
-
- -
- - - - -
- - -
- -
- -
- - - - diff --git a/doc/app/IssuesHelper.html b/doc/app/IssuesHelper.html deleted file mode 100644 index d58a5f7f..00000000 --- a/doc/app/IssuesHelper.html +++ /dev/null @@ -1,698 +0,0 @@ - - - - - - -module IssuesHelper - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

module IssuesHelper

- -
- -
- - - - -
- - - - - - - - - - -
-

Public Instance Methods

- - -
- -
- issue_css_classes(issue) - click to toggle source -
- - -
- - - - - -
-
# File app/helpers/issues_helper.rb, line 29
-def issue_css_classes issue
-  classes = "issue"
-  classes << " closed" if issue.closed
-  classes << " today" if issue.today?
-  classes
-end
-
- -
- - - - -
- - -
- -
- issue_tags() - click to toggle source -
- - -
- - - - - -
-
# File app/helpers/issues_helper.rb, line 36
-def issue_tags
-  @project.issues.tag_counts_on(:labels).map(&:name)
-end
-
- -
- - - - -
- - -
- -
- issues_filter() - click to toggle source -
- - -
- - - - - -
-
# File app/helpers/issues_helper.rb, line 47
-def issues_filter
-  {
-    all: "all",
-    closed: "closed",
-    to_me: "assigned-to-me",
-    open: "open"
-  }
-end
-
- -
- - - - -
- - - - - - - - -
- -
- project_issues_filter_path(project, params = {}) - click to toggle source -
- - -
- - - - - -
-
# File app/helpers/issues_helper.rb, line 2
-def project_issues_filter_path project, params = {}
-  params[:f] ||= cookies['issue_filter']
-  project_issues_path project, params
-end
-
- -
- - - - -
- - -
- -
- unassigned_filter() - click to toggle source -
- - -
- -

Returns an OpenStruct object suitable for use by -options_from_collection_for_select to allow filtering issues -by an unassigned User or Milestone

- - - -
-
# File app/helpers/issues_helper.rb, line 42
-def unassigned_filter
-  # Milestone uses :title, Issue uses :name
-  OpenStruct.new(id: 0, title: 'Unspecified', name: 'Unassigned')
-end
-
- -
- - - - -
- - -
- -
- -
- - - - diff --git a/doc/app/IssuesListContext.html b/doc/app/IssuesListContext.html deleted file mode 100644 index 01acec45..00000000 --- a/doc/app/IssuesListContext.html +++ /dev/null @@ -1,537 +0,0 @@ - - - - - - -class IssuesListContext - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

class IssuesListContext

- -
- -
- - - - -
- - - - - - - - -
-

Attributes

- - -
-
- issues[RW] -
- -
- - - -
-
- -
- - - - -
-

Public Instance Methods

- - -
- -
- execute() - click to toggle source -
- - -
- - - - - -
-
# File app/contexts/issues_list_context.rb, line 6
-def execute
-  @issues = case params[:f]
-            when issues_filter[:all] then @project.issues
-            when issues_filter[:closed] then @project.issues.closed
-            when issues_filter[:to_me] then @project.issues.opened.assigned(current_user)
-            else @project.issues.opened
-            end
-
-  @issues = @issues.tagged_with(params[:label_name]) if params[:label_name].present?
-  @issues = @issues.includes(:author, :project).order("updated_at")
-
-  # Filter by specific assignee_id (or lack thereof)?
-  if params[:assignee_id].present?
-    @issues = @issues.where(assignee_id: (params[:assignee_id] == '0' ? nil : params[:assignee_id]))
-  end
-
-  # Filter by specific milestone_id (or lack thereof)?
-  if params[:milestone_id].present?
-    @issues = @issues.where(milestone_id: (params[:milestone_id] == '0' ? nil : params[:milestone_id]))
-  end
-
-  @issues
-end
-
- -
- - - - -
- - -
- -
- -
- - - - diff --git a/doc/app/Key.html b/doc/app/Key.html deleted file mode 100644 index afbcea93..00000000 --- a/doc/app/Key.html +++ /dev/null @@ -1,700 +0,0 @@ - - - - - - -class Key - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

class Key

- -
- -
- - - - -
- - - - - - - - - - -
-

Public Instance Methods

- - -
- -
- fingerprintable_key() - click to toggle source -
- - -
- - - - - -
-
# File app/models/key.rb, line 30
-def fingerprintable_key
-  return true unless key # Don't test if there is no key.
-  # `ssh-keygen -lf /dev/stdin <<< "#{key}"` errors with: redirection unexpected
-  file = Tempfile.new('key_file')
-  begin
-    file.puts key
-    file.rewind
-    fingerprint_output = %xssh-keygen -lf #{file.path} 2>&1` # Catch stderr.
-  ensure
-    file.close
-    file.unlink # deletes the temp file
-  end
-  errors.add(:key, "can't be fingerprinted") if fingerprint_output.match("failed")
-end
-
- -
- - - - -
- - -
- -
- is_deploy_key() - click to toggle source -
- - -
- - - - - -
-
# File app/models/key.rb, line 53
-def is_deploy_key
-  true if project_id
-end
-
- -
- - - - -
- - -
- -
- last_deploy?() - click to toggle source -
- - -
- - - - - -
-
# File app/models/key.rb, line 66
-def last_deploy?
-  Key.where(identifier: identifier).count == 0
-end
-
- -
- - - - -
- - -
- -
- projects() - click to toggle source -
- - -
- -

projects that has this key

- - - -
-
# File app/models/key.rb, line 58
-def projects
-  if is_deploy_key
-    [project]
-  else
-    user.projects
-  end
-end
-
- -
- - - - -
- - -
- -
- set_identifier() - click to toggle source -
- - -
- - - - - -
-
# File app/models/key.rb, line 45
-def set_identifier
-  if is_deploy_key
-    self.identifier = "deploy_#{Digest::MD5.hexdigest(key)}"
-  else
-    self.identifier = "#{user.identifier}_#{Time.now.to_i}"
-  end
-end
-
- -
- - - - -
- - -
- -
- strip_white_space() - click to toggle source -
- - -
- - - - - -
-
# File app/models/key.rb, line 18
-def strip_white_space
-  self.key = self.key.strip unless self.key.blank?
-end
-
- -
- - - - -
- - -
- -
- unique_key() - click to toggle source -
- - -
- - - - - -
-
# File app/models/key.rb, line 22
-def unique_key
-  query = Key.where(key: key)
-  query = query.where('(project_id IS NULL OR project_id = ?)', project_id) if project_id
-  if (query.count > 0)
-    errors.add :key, 'already exist.'
-  end
-end
-
- -
- - - - -
- - -
- -
- -
- - - - diff --git a/doc/app/KeyObserver.html b/doc/app/KeyObserver.html deleted file mode 100644 index bdaf9f84..00000000 --- a/doc/app/KeyObserver.html +++ /dev/null @@ -1,530 +0,0 @@ - - - - - - -class KeyObserver - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

class KeyObserver

- -
- -
- - - - -
- - - - - - - - - - -
-

Public Instance Methods

- - -
- -
- after_destroy(key) - click to toggle source -
- - -
- - - - - -
-
# File app/observers/key_observer.rb, line 8
-def after_destroy(key)
-  return if key.is_deploy_key && !key.last_deploy?
-  git_host.remove_key(key.identifier, key.projects)
-end
-
- -
- - - - -
- - -
- -
- after_save(key) - click to toggle source -
- - -
- - - - - -
-
# File app/observers/key_observer.rb, line 4
-def after_save(key)
-  git_host.set_key(key.identifier, key.key, key.projects)
-end
-
- -
- - - - -
- - -
- -
- -
- - - - diff --git a/doc/app/KeysController.html b/doc/app/KeysController.html deleted file mode 100644 index 13fac402..00000000 --- a/doc/app/KeysController.html +++ /dev/null @@ -1,624 +0,0 @@ - - - - - - -class KeysController - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

class KeysController

- -
- -
- - - - -
- - - - - - - - - - -
-

Public Instance Methods

- - -
- -
- create() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/keys_controller.rb, line 19
-def create
-  @key = current_user.keys.new(params[:key])
-  @key.save
-
-  respond_with(@key)
-end
-
- -
- - - - -
- - -
- -
- destroy() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/keys_controller.rb, line 26
-def destroy
-  @key = current_user.keys.find(params[:id])
-  @key.destroy
-
-  respond_to do |format|
-    format.html { redirect_to keys_url }
-    format.js { render nothing: true }
-  end
-end
-
- -
- - - - -
- - -
- -
- index() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/keys_controller.rb, line 5
-def index
-  @keys = current_user.keys.all
-end
-
- -
- - - - -
- - -
- -
- new() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/keys_controller.rb, line 13
-def new
-  @key = current_user.keys.new
-
-  respond_with(@key)
-end
-
- -
- - - - -
- - -
- -
- show() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/keys_controller.rb, line 9
-def show
-  @key = current_user.keys.find(params[:id])
-end
-
- -
- - - - -
- - -
- -
- -
- - - - diff --git a/doc/app/LabelsController.html b/doc/app/LabelsController.html deleted file mode 100644 index 7dece840..00000000 --- a/doc/app/LabelsController.html +++ /dev/null @@ -1,523 +0,0 @@ - - - - - - -class LabelsController - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

class LabelsController

- -
- -
- - - - -
- - - - - - - - - - -
-

Public Instance Methods

- - -
- -
- index() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/labels_controller.rb, line 9
-def index
-  @labels = @project.issues_labels.order('count DESC')
-end
-
- -
- - - - -
- - -
- -
-

Protected Instance Methods

- - -
- -
- module_enabled() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/labels_controller.rb, line 15
-def module_enabled
-  return render_404 unless @project.issues_enabled
-end
-
- -
- - - - -
- - -
- -
- -
- - - - diff --git a/doc/app/MergeRequest.html b/doc/app/MergeRequest.html deleted file mode 100644 index 7dbe6f4f..00000000 --- a/doc/app/MergeRequest.html +++ /dev/null @@ -1,1478 +0,0 @@ - - - - - - -class MergeRequest - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

class MergeRequest

- -
- -
- - - - -
- - - - - - -
-

Constants

-
- -
BROKEN_DIFF - -
- - -
CANNOT_BE_MERGED - -
- - -
CAN_BE_MERGED - -
- - -
UNCHECKED - -
- - -
-
- - - - -
-

Attributes

- - -
-
- should_remove_source_branch[RW] -
- -
- - - -
-
- -
- - - - -
-

Public Class Methods

- - -
- -
- find_all_by_branch(branch_name) - click to toggle source -
- - -
- - - - - -
-
# File app/models/merge_request.rb, line 25
-def self.find_all_by_branch(branch_name)
-  where("source_branch LIKE :branch OR target_branch LIKE :branch", branch: branch_name)
-end
-
- -
- - - - -
- - -
- -
-

Public Instance Methods

- - -
- -
- automerge!(current_user) - click to toggle source -
- - -
- - - - - -
-
# File app/models/merge_request.rb, line 169
-def automerge!(current_user)
-  if Gitlab::Merge.new(self, current_user).merge! && self.unmerged_commits.empty?
-    self.merge!(current_user.id)
-    true
-  end
-rescue
-  self.mark_as_unmergable
-  false
-end
-
- -
- - - - -
- - -
- -
- broken_diffs?() - click to toggle source -
- - -
- - - - - -
-
# File app/models/merge_request.rb, line 86
-def broken_diffs?
-  diffs == [BROKEN_DIFF]
-end
-
- -
- - - - -
- - -
- -
- can_be_merged?() - click to toggle source -
- - -
- - - - - -
-
# File app/models/merge_request.rb, line 58
-def can_be_merged?
-  state == CAN_BE_MERGED
-end
-
- -
- - - - -
- - -
- -
- check_if_can_be_merged() - click to toggle source -
- - -
- - - - - -
-
# File app/models/merge_request.rb, line 62
-def check_if_can_be_merged
-  self.state = if Gitlab::Merge.new(self, self.author).can_be_merged?
-                 CAN_BE_MERGED
-               else
-                 CANNOT_BE_MERGED
-               end
-  self.save
-end
-
- -
- - - - -
- - -
- -
- closed_event() - click to toggle source -
- - -
- - - - - -
-
# File app/models/merge_request.rb, line 114
-def closed_event
-  self.project.events.where(target_id: self.id, target_type: "MergeRequest", action: Event::Closed).last
-end
-
- -
- - - - -
- - -
- -
- commits() - click to toggle source -
- - -
- - - - - -
-
# File app/models/merge_request.rb, line 118
-def commits
-  st_commits || []
-end
-
- -
- - - - -
- - -
- -
- diffs() - click to toggle source -
- - -
- - - - - -
-
# File app/models/merge_request.rb, line 71
-def diffs
-  st_diffs || []
-end
-
- -
- - - - -
- - -
- -
- human_state() - click to toggle source -
- - -
- - - - - -
-
# File app/models/merge_request.rb, line 29
-def human_state
-  states = {
-    CAN_BE_MERGED =>  "can_be_merged",
-    CANNOT_BE_MERGED => "cannot_be_merged",
-    UNCHECKED => "unchecked"
-  }
-  states[self.state]
-end
-
- -
- - - - -
- - -
- -
- last_commit() - click to toggle source -
- - -
- - - - - -
-
# File app/models/merge_request.rb, line 102
-def last_commit
-  commits.first
-end
-
- -
- - - - -
- - -
- -
- mark_as_merged!() - click to toggle source -
- - -
- - - - - -
-
# File app/models/merge_request.rb, line 131
-def mark_as_merged!
-  self.merged = true
-  self.closed = true
-  save
-end
-
- -
- - - - -
- - -
- -
- mark_as_unchecked() - click to toggle source -
- - -
- - - - - -
-
# File app/models/merge_request.rb, line 53
-def mark_as_unchecked
-  self.state = UNCHECKED
-  self.save
-end
-
- -
- - - - -
- - -
- -
- mark_as_unmergable() - click to toggle source -
- - -
- - - - - -
-
# File app/models/merge_request.rb, line 137
-def mark_as_unmergable
-  self.state = CANNOT_BE_MERGED
-  self.save
-end
-
- -
- - - - -
- - -
- -
- merge!(user_id) - click to toggle source -
- - -
- - - - - -
-
# File app/models/merge_request.rb, line 158
-def merge!(user_id)
-  self.mark_as_merged!
-  Event.create(
-    project: self.project,
-    action: Event::Merged,
-    target_id: self.id,
-    target_type: "MergeRequest",
-    author_id: user_id
-  )
-end
-
- -
- - - - -
- - -
- -
- merge_event() - click to toggle source -
- - -
- - - - - -
-
# File app/models/merge_request.rb, line 110
-def merge_event
-  self.project.events.where(target_id: self.id, target_type: "MergeRequest", action: Event::Merged).last
-end
-
- -
- - - - -
- - -
- -
- merged?() - click to toggle source -
- - -
- - - - - -
-
# File app/models/merge_request.rb, line 106
-def merged?
-  merged && merge_event
-end
-
- -
- - - - -
- - -
- -
- mr_and_commit_notes() - click to toggle source -
- - -
- - - - - -
-
# File app/models/merge_request.rb, line 191
-def mr_and_commit_notes
-  commit_ids = commits.map(&:id)
-  Note.where("(noteable_type = 'MergeRequest' AND noteable_id = :mr_id) OR (noteable_type = 'Commit' AND noteable_id IN (:commit_ids))", mr_id: id, commit_ids: commit_ids)
-end
-
- -
- - - - -
- - -
- -
- open?() - click to toggle source -
- - -
- - - - - -
-
# File app/models/merge_request.rb, line 127
-def open?
-  !closed
-end
-
- -
- - - - -
- - -
- -
- probably_merged?() - click to toggle source -
- - -
- - - - - -
-
# File app/models/merge_request.rb, line 122
-def probably_merged?
-  unmerged_commits.empty? &&
-    commits.any? && open?
-end
-
- -
- - - - -
- - -
- -
- reload_code() - click to toggle source -
- - -
- - - - - -
-
# File app/models/merge_request.rb, line 44
-def reload_code
-  self.reloaded_commits
-  self.reloaded_diffs
-end
-
- -
- - - - -
- - -
- -
- reloaded_commits() - click to toggle source -
- - -
- - - - - -
-
# File app/models/merge_request.rb, line 142
-def reloaded_commits
-  if open? && unmerged_commits.any?
-    self.st_commits = unmerged_commits
-    save
-  end
-  commits
-end
-
- -
- - - - -
- - -
- -
- reloaded_diffs() - click to toggle source -
- - -
- - - - - -
-
# File app/models/merge_request.rb, line 75
-def reloaded_diffs
-  if open? && unmerged_diffs.any?
-    self.st_diffs = unmerged_diffs
-    self.save
-  end
-
-rescue Grit::Git::GitTimeout
-  self.st_diffs = [BROKEN_DIFF]
-  self.save
-end
-
- -
- - - - -
- - -
- -
- to_raw() - click to toggle source -
- - -
- - - - - -
-
# File app/models/merge_request.rb, line 179
-def to_raw
-  FileUtils.mkdir_p(Rails.root.join("tmp", "patches"))
-  patch_path = Rails.root.join("tmp", "patches", "merge_request_#{self.id}.patch")
-
-  from = commits.last.id
-  to = source_branch
-
-  project.repo.git.run('', "format-patch" , " > #{patch_path.to_s}", {}, ["#{from}..#{to}", "--stdout"])
-
-  patch_path
-end
-
- -
- - - - -
- - -
- -
- unchecked?() - click to toggle source -
- - -
- - - - - -
-
# File app/models/merge_request.rb, line 49
-def unchecked?
-  state == UNCHECKED
-end
-
- -
- - - - -
- - -
- -
- unmerged_commits() - click to toggle source -
- - -
- - - - - -
-
# File app/models/merge_request.rb, line 150
-def unmerged_commits
-  self.project.repo.
-    commits_between(self.target_branch, self.source_branch).
-    map {|c| Commit.new(c)}.
-    sort_by(&:created_at).
-    reverse
-end
-
- -
- - - - -
- - -
- -
- unmerged_diffs() - click to toggle source -
- - -
- - - - - -
-
# File app/models/merge_request.rb, line 94
-def unmerged_diffs
-  # Only show what is new in the source branch compared to the target branch, not the other way around.
-  # The linex below with merge_base is equivalent to diff with three dots (git diff branch1...branch2)
-  # From the git documentation: "git diff A...B" is equivalent to "git diff $(git-merge-base A B) B"
-  common_commit = project.repo.git.native(:merge_base, {}, [target_branch, source_branch]).strip
-  diffs = project.repo.diff(common_commit, source_branch)
-end
-
- -
- - - - -
- - -
- -
- valid_diffs?() - click to toggle source -
- - -
- - - - - -
-
# File app/models/merge_request.rb, line 90
-def valid_diffs?
-  !broken_diffs?
-end
-
- -
- - - - -
- - -
- -
- validate_branches() - click to toggle source -
- - -
- - - - - -
-
# File app/models/merge_request.rb, line 38
-def validate_branches
-  if target_branch == source_branch
-    errors.add :base, "You can not use same branch for source and target branches"
-  end
-end
-
- -
- - - - -
- - -
- -
- -
- - - - diff --git a/doc/app/MergeRequestObserver.html b/doc/app/MergeRequestObserver.html deleted file mode 100644 index f2d0dbd7..00000000 --- a/doc/app/MergeRequestObserver.html +++ /dev/null @@ -1,569 +0,0 @@ - - - - - - -class MergeRequestObserver - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

class MergeRequestObserver

- -
- -
- - - - -
- - - - - - - - - - -
-

Public Instance Methods

- - -
- -
- after_create(merge_request) - click to toggle source -
- - -
- - - - - -
-
# File app/observers/merge_request_observer.rb, line 4
-def after_create(merge_request)
-  if merge_request.assignee && merge_request.assignee != current_user
-    Notify.new_merge_request_email(merge_request.id).deliver
-  end
-end
-
- -
- - - - -
- - -
- -
- after_update(merge_request) - click to toggle source -
- - -
- - - - - -
-
# File app/observers/merge_request_observer.rb, line 10
-def after_update(merge_request)
-  send_reassigned_email(merge_request) if merge_request.is_being_reassigned?
-
-  status = nil
-  status = 'closed' if merge_request.is_being_closed?
-  status = 'reopened' if merge_request.is_being_reopened?
-  if status
-    Note.create_status_change_note(merge_request, current_user, status)
-  end
-end
-
- -
- - - - -
- - -
- -
-

Protected Instance Methods

- - -
- -
- send_reassigned_email(merge_request) - click to toggle source -
- - -
- - - - - -
-
# File app/observers/merge_request_observer.rb, line 23
-def send_reassigned_email(merge_request)
-  recipients_ids = merge_request.assignee_id_was, merge_request.assignee_id
-  recipients_ids.delete current_user.id
-
-  recipients_ids.each do |recipient_id|
-    Notify.reassigned_merge_request_email(recipient_id, merge_request.id, merge_request.assignee_id_was).deliver
-  end
-end
-
- -
- - - - -
- - -
- -
- -
- - - - diff --git a/doc/app/MergeRequestsController.html b/doc/app/MergeRequestsController.html deleted file mode 100644 index ef257c6c..00000000 --- a/doc/app/MergeRequestsController.html +++ /dev/null @@ -1,1114 +0,0 @@ - - - - - - -class MergeRequestsController - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

class MergeRequestsController

- -
- -
- - - - -
- - - - - - - - - - -
-

Public Instance Methods

- - -
- -
- automerge() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/merge_requests_controller.rb, line 79
-def automerge
-  return access_denied! unless can?(current_user, :accept_mr, @project)
-  if @merge_request.open? && @merge_request.can_be_merged?
-    @merge_request.should_remove_source_branch = params[:should_remove_source_branch]
-    @merge_request.automerge!(current_user)
-    @status = true
-  else
-    @status = false
-  end
-end
-
- -
- - - - -
- - -
- -
- automerge_check() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/merge_requests_controller.rb, line 72
-def automerge_check
-  if @merge_request.unchecked?
-    @merge_request.check_if_can_be_merged
-  end
-  render json: {state: @merge_request.human_state}
-end
-
- -
- - - - -
- - -
- -
- branch_from() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/merge_requests_controller.rb, line 98
-def branch_from
-  @commit = project.commit(params[:ref])
-  @commit = CommitDecorator.decorate(@commit)
-end
-
- -
- - - - -
- - -
- -
- branch_to() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/merge_requests_controller.rb, line 103
-def branch_to
-  @commit = project.commit(params[:ref])
-  @commit = CommitDecorator.decorate(@commit)
-end
-
- -
- - - - -
- - -
- -
- create() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/merge_requests_controller.rb, line 50
-def create
-  @merge_request = @project.merge_requests.new(params[:merge_request])
-  @merge_request.author = current_user
-
-  if @merge_request.save
-    @merge_request.reload_code
-    redirect_to [@project, @merge_request], notice: 'Merge request was successfully created.'
-  else
-    render action: "new"
-  end
-end
-
- -
- - - - -
- - -
- -
- destroy() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/merge_requests_controller.rb, line 90
-def destroy
-  @merge_request.destroy
-
-  respond_to do |format|
-    format.html { redirect_to project_merge_requests_url(@project) }
-  end
-end
-
- -
- - - - -
- - -
- -
- diffs() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/merge_requests_controller.rb, line 35
-def diffs
-  @diffs = @merge_request.diffs
-  @commit = @merge_request.last_commit
-
-  @comments_allowed = true
-  @line_notes = @merge_request.notes.where("line_code is not null")
-end
-
- -
- - - - -
- - -
- -
- edit() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/merge_requests_controller.rb, line 47
-def edit
-end
-
- -
- - - - -
- - -
- -
- index() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/merge_requests_controller.rb, line 20
-def index
-  @merge_requests = MergeRequestsLoadContext.new(project, current_user, params).execute
-end
-
- -
- - - - -
- - -
- -
- new() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/merge_requests_controller.rb, line 43
-def new
-  @merge_request = @project.merge_requests.new(params[:merge_request])
-end
-
- -
- - - - -
- - -
- -
- raw() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/merge_requests_controller.rb, line 31
-def raw
-  send_file @merge_request.to_raw
-end
-
- -
- - - - -
- - -
- -
- show() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/merge_requests_controller.rb, line 24
-def show
-  respond_to do |format|
-    format.html
-    format.js
-  end
-end
-
- -
- - - - -
- - -
- -
- update() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/merge_requests_controller.rb, line 62
-def update
-  if @merge_request.update_attributes(params[:merge_request].merge(author_id_of_changes: current_user.id))
-    @merge_request.reload_code
-    @merge_request.mark_as_unchecked
-    redirect_to [@project, @merge_request], notice: 'Merge request was successfully updated.'
-  else
-    render action: "edit"
-  end
-end
-
- -
- - - - -
- - -
- -
-

Protected Instance Methods

- - -
- -
- authorize_admin_merge_request!() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/merge_requests_controller.rb, line 118
-def authorize_admin_merge_request!
-  return render_404 unless can?(current_user, :admin_merge_request, @merge_request)
-end
-
- -
- - - - -
- - -
- -
- authorize_modify_merge_request!() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/merge_requests_controller.rb, line 114
-def authorize_modify_merge_request!
-  return render_404 unless can?(current_user, :modify_merge_request, @merge_request)
-end
-
- -
- - - - -
- - -
- -
- define_show_vars() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/merge_requests_controller.rb, line 135
-def define_show_vars
-  # Build a note object for comment form
-  @note = @project.notes.new(noteable: @merge_request)
-
-  # Get commits from repository
-  # or from cache if already merged
-  @commits = @merge_request.commits
-  @commits = CommitDecorator.decorate(@commits)
-end
-
- -
- - - - -
- - -
- -
- merge_request() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/merge_requests_controller.rb, line 110
-def merge_request
-  @merge_request ||= @project.merge_requests.find(params[:id])
-end
-
- -
- - - - -
- - -
- -
- module_enabled() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/merge_requests_controller.rb, line 122
-def module_enabled
-  return render_404 unless @project.merge_requests_enabled
-end
-
- -
- - - - -
- - -
- -
- validates_merge_request() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/merge_requests_controller.rb, line 126
-def validates_merge_request
-  # Show git not found page if target branch doesnt exist
-  return git_not_found! unless @project.repo.heads.map(&:name).include?(@merge_request.target_branch)
-
-  # Show git not found page if source branch doesnt exist
-  # and there is no saved commits between source & target branch
-  return git_not_found! if !@project.repo.heads.map(&:name).include?(@merge_request.source_branch) && @merge_request.commits.blank?
-end
-
- -
- - - - -
- - -
- -
- -
- - - - diff --git a/doc/app/MergeRequestsHelper.html b/doc/app/MergeRequestsHelper.html deleted file mode 100644 index fec9b0e0..00000000 --- a/doc/app/MergeRequestsHelper.html +++ /dev/null @@ -1,599 +0,0 @@ - - - - - - -module MergeRequestsHelper - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

module MergeRequestsHelper

- -
- -
- - - - -
- - - - - - - - - - -
-

Public Instance Methods

- - - - - - - - -
- -
- mr_css_classes(mr) - click to toggle source -
- - -
- - - - - -
-
# File app/helpers/merge_requests_helper.rb, line 35
-def mr_css_classes mr
-  classes = "merge_request"
-  classes << " closed" if mr.closed
-  classes << " merged" if mr.merged?
-  classes
-end
-
- -
- - - - -
- - -
- -
- new_mr_path_from_push_event(event) - click to toggle source -
- - -
- - - - - -
-
# File app/helpers/merge_requests_helper.rb, line 24
-def new_mr_path_from_push_event(event)
-  new_project_merge_request_path(
-    event.project,
-    merge_request: {
-      source_branch: event.branch_name,
-      target_branch: event.project.root_ref,
-      title: event.branch_name.titleize
-    }
-  )
-end
-
- -
- - - - -
- - -
- -
- -
- - - - diff --git a/doc/app/MergeRequestsLoadContext.html b/doc/app/MergeRequestsLoadContext.html deleted file mode 100644 index 5c1b8829..00000000 --- a/doc/app/MergeRequestsLoadContext.html +++ /dev/null @@ -1,496 +0,0 @@ - - - - - - -class MergeRequestsLoadContext - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

class MergeRequestsLoadContext

- -
- -
- - - - -
- - - - - - - - - - -
-

Public Instance Methods

- - -
- -
- execute() - click to toggle source -
- - -
- - - - - -
-
# File app/contexts/merge_requests_load_context.rb, line 2
-def execute
-  type = params[:f]
-
-  merge_requests = project.merge_requests
-
-  merge_requests = case type
-                   when 'all' then merge_requests
-                   when 'closed' then merge_requests.closed
-                   when 'assigned-to-me' then merge_requests.opened.assigned(current_user)
-                   else merge_requests.opened
-                   end.page(params[:page]).per(20)
-
-  merge_requests.includes(:author, :project).order("closed, created_at desc")
-end
-
- -
- - - - -
- - -
- -
- -
- - - - diff --git a/doc/app/Milestone.html b/doc/app/Milestone.html deleted file mode 100644 index cc3bdc58..00000000 --- a/doc/app/Milestone.html +++ /dev/null @@ -1,589 +0,0 @@ - - - - - - -class Milestone - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

class Milestone

- -
- -
- - - - -
- - - - - - - - - - -
-

Public Class Methods

- - -
- -
- active() - click to toggle source -
- - -
- - - - - -
-
# File app/models/milestone.rb, line 10
-def self.active
-  where("due_date > ? OR due_date IS NULL", Date.today)
-end
-
- -
- - - - -
- - -
- -
-

Public Instance Methods

- - -
- -
- expires_at() - click to toggle source -
- - -
- - - - - -
-
# File app/models/milestone.rb, line 24
-def expires_at
-  "expires at #{due_date.stamp("Aug 21, 2011")}" if due_date
-end
-
- -
- - - - -
- - -
- -
- participants() - click to toggle source -
- - -
- - - - - -
-
# File app/models/milestone.rb, line 14
-def participants
-  User.where(id: issues.pluck(:assignee_id))
-end
-
- -
- - - - -
- - -
- -
- percent_complete() - click to toggle source -
- - -
- - - - - -
-
# File app/models/milestone.rb, line 18
-def percent_complete
-  ((self.issues.closed.count * 100) / self.issues.count).abs
-rescue ZeroDivisionError
-  100
-end
-
- -
- - - - -
- - -
- -
- -
- - - - diff --git a/doc/app/MilestonesController.html b/doc/app/MilestonesController.html deleted file mode 100644 index e15d6fef..00000000 --- a/doc/app/MilestonesController.html +++ /dev/null @@ -1,816 +0,0 @@ - - - - - - -class MilestonesController - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

class MilestonesController

- -
- -
- - - - -
- - - - - - - - - - -
-

Public Instance Methods

- - -
- -
- create() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/milestones_controller.rb, line 42
-def create
-  @milestone = @project.milestones.new(params[:milestone])
-
-  if @milestone.save
-    redirect_to project_milestone_path(@project, @milestone)
-  else
-    render "new"
-  end
-end
-
- -
- - - - -
- - -
- -
- destroy() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/milestones_controller.rb, line 67
-def destroy
-  return access_denied! unless can?(current_user, :admin_milestone, @milestone)
-
-  @milestone.destroy
-
-  respond_to do |format|
-    format.html { redirect_to project_milestones_path }
-    format.js { render nothing: true }
-  end
-end
-
- -
- - - - -
- - -
- -
- edit() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/milestones_controller.rb, line 28
-def edit
-  respond_with(@milestone)
-end
-
- -
- - - - -
- - -
- -
- index() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/milestones_controller.rb, line 13
-def index
-  @milestones = case params[:f]
-                when 'all'; @project.milestones
-                else @project.milestones.active
-                end
-
-  @milestones = @milestones.includes(:project).order("due_date")
-  @milestones = @milestones.page(params[:page]).per(20)
-end
-
- -
- - - - -
- - -
- -
- new() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/milestones_controller.rb, line 23
-def new
-  @milestone = @project.milestones.new
-  respond_with(@milestone)
-end
-
- -
- - - - -
- - -
- -
- show() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/milestones_controller.rb, line 32
-def show
-  @issues = @milestone.issues
-  @users = @milestone.participants
-
-  respond_to do |format|
-    format.html
-    format.js
-  end
-end
-
- -
- - - - -
- - -
- -
- update() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/milestones_controller.rb, line 52
-def update
-  @milestone.update_attributes(params[:milestone])
-
-  respond_to do |format|
-    format.js
-    format.html do
-      if @milestone.valid?
-        redirect_to [@project, @milestone]
-      else
-        render :edit
-      end
-    end
-  end
-end
-
- -
- - - - -
- - -
- -
-

Protected Instance Methods

- - -
- -
- authorize_admin_milestone!() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/milestones_controller.rb, line 84
-def authorize_admin_milestone!
-  return render_404 unless can?(current_user, :admin_milestone, @project)
-end
-
- -
- - - - -
- - -
- -
- milestone() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/milestones_controller.rb, line 80
-def milestone
-  @milestone ||= @project.milestones.find(params[:id])
-end
-
- -
- - - - -
- - -
- -
- module_enabled() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/milestones_controller.rb, line 88
-def module_enabled
-  return render_404 unless @project.issues_enabled
-end
-
- -
- - - - -
- - -
- -
- -
- - - - diff --git a/doc/app/Note.html b/doc/app/Note.html deleted file mode 100644 index 24a474b0..00000000 --- a/doc/app/Note.html +++ /dev/null @@ -1,777 +0,0 @@ - - - - - - -class Note - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

class Note

- -
- -
- - - - -
- - - - - - - - -
-

Attributes

- - -
-
- notify[RW] -
- -
- - - -
-
- -
-
- notify_author[RW] -
- -
- - - -
-
- -
- - - - -
-

Public Class Methods

- - -
- -
- create_status_change_note(noteable, author, status) - click to toggle source -
- - -
- - - - - -
-
# File app/models/note.rb, line 34
-def self.create_status_change_note(noteable, author, status)
-  create({
-    noteable: noteable,
-    project: noteable.project,
-    author: author,
-    note: "_Status changed to #{status}_"
-  }, without_protection: true)
-end
-
- -
- - - - -
- - -
- -
-

Public Instance Methods

- - -
- -
- commit_author() - click to toggle source -
- - -
- - - - - -
-
# File app/models/note.rb, line 90
-def commit_author
-  @commit_author ||=
-    project.users.find_by_email(noteable.author_email) ||
-    project.users.find_by_name(noteable.author_name)
-rescue
-  nil
-end
-
- -
- - - - -
- - -
- -
- downvote?() - click to toggle source -
- - -
- -

Returns true if this is a downvote note, otherwise false is returned

- - - -
-
# File app/models/note.rb, line 106
-def downvote?
-  note.start_with?('-1') || note.start_with?(':-1:')
-end
-
- -
- - - - -
- - -
- -
- for_commit?() - click to toggle source -
- - -
- - - - - -
-
# File app/models/note.rb, line 82
-def for_commit?
-  noteable_type == "Commit"
-end
-
- -
- - - - -
- - -
- -
- for_diff_line?() - click to toggle source -
- - -
- - - - - -
-
# File app/models/note.rb, line 86
-def for_diff_line?
-  line_code.present?
-end
-
- -
- - - - -
- - -
- -
- noteable() - click to toggle source -
- - -
- -

override to return commits, which are not active record

- - - -
-
# File app/models/note.rb, line 52
-def noteable
-  if for_commit?
-    project.commit(noteable_id)
-  else
-    super
-  end
-# Temp fix to prevent app crash
-# if note commit id doesnt exist
-rescue
-  nil
-end
-
- -
- - - - -
- - -
- -
- notify_only_author?(user) - click to toggle source -
- - -
- -

Check if we can notify commit author with email about our comment

- -

If commit author email exist in project and commit author is not passed -user we can send email to him

- -

params:

- -
user - current user
- -

return:

- -
Boolean
- - - -
-
# File app/models/note.rb, line 77
-def notify_only_author?(user)
-  for_commit? && commit_author &&
-    commit_author.email != user.email
-end
-
- -
- - - - -
- - -
- -
- upvote?() - click to toggle source -
- - -
- -

Returns true if this is an upvote note, otherwise false is returned

- - - -
-
# File app/models/note.rb, line 100
-def upvote?
-  note.start_with?('+1') || note.start_with?(':+1:')
-end
-
- -
- - - - -
- - -
- -
- -
- - - - diff --git a/doc/app/NoteObserver.html b/doc/app/NoteObserver.html deleted file mode 100644 index d0528833..00000000 --- a/doc/app/NoteObserver.html +++ /dev/null @@ -1,603 +0,0 @@ - - - - - - -class NoteObserver - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

class NoteObserver

- -
- -
- - - - -
- - - - - - - - - - -
-

Public Instance Methods

- - -
- -
- after_create(note) - click to toggle source -
- - -
- - - - - -
-
# File app/observers/note_observer.rb, line 3
-def after_create(note)
-  send_notify_mails(note)
-end
-
- -
- - - - -
- - -
- -
-

Protected Instance Methods

- - -
- -
- notify_team(note) - click to toggle source -
- - -
- -

Notifies the whole team except the author of note

- - - -
-
# File app/observers/note_observer.rb, line 22
-def notify_team(note)
-  # Note: wall posts are not "attached" to anything, so fall back to "Wall"
-  noteable_type = note.noteable_type || "Wall"
-  notify_method = "note_#{noteable_type.underscore}_email".to_sym
-
-  if Notify.respond_to? notify_method
-    team_without_note_author(note).map do |u|
-      Notify.send(notify_method, u.id, note.id).deliver
-    end
-  end
-end
-
- -
- - - - -
- - -
- -
- send_notify_mails(note) - click to toggle source -
- - -
- - - - - -
-
# File app/observers/note_observer.rb, line 9
-def send_notify_mails(note)
-  if note.notify
-    notify_team(note)
-  elsif note.notify_author
-    # Notify only author of resource
-    Notify.note_commit_email(note.commit_author.id, note.id).deliver
-  else
-    # Otherwise ignore it
-    nil
-  end
-end
-
- -
- - - - -
- - -
- -
- team_without_note_author(note) - click to toggle source -
- - -
- - - - - -
-
# File app/observers/note_observer.rb, line 34
-def team_without_note_author(note)
-  note.project.users.reject { |u| u.id == note.author.id }
-end
-
- -
- - - - -
- - -
- -
- -
- - - - diff --git a/doc/app/Notes.html b/doc/app/Notes.html deleted file mode 100644 index d6bcc540..00000000 --- a/doc/app/Notes.html +++ /dev/null @@ -1,434 +0,0 @@ - - - - - - -module Notes - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

module Notes

- -
- -
- - - - -
- - - - - - - - - - -
- -
- - - - diff --git a/doc/app/Notes/CreateContext.html b/doc/app/Notes/CreateContext.html deleted file mode 100644 index 6d4c8449..00000000 --- a/doc/app/Notes/CreateContext.html +++ /dev/null @@ -1,490 +0,0 @@ - - - - - - -class Notes::CreateContext - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

class Notes::CreateContext

- -
- -
- - - - -
- - - - - - - - - - -
-

Public Instance Methods

- - -
- -
- execute() - click to toggle source -
- - -
- - - - - -
-
# File app/contexts/notes/create_context.rb, line 3
-def execute
-  note = project.notes.new(params[:note])
-  note.author = current_user
-  note.notify = true if params[:notify] == '1'
-  note.notify_author = true if params[:notify_author] == '1'
-  note.save
-  note
-end
-
- -
- - - - -
- - -
- -
- -
- - - - diff --git a/doc/app/Notes/LoadContext.html b/doc/app/Notes/LoadContext.html deleted file mode 100644 index 273fc0f0..00000000 --- a/doc/app/Notes/LoadContext.html +++ /dev/null @@ -1,513 +0,0 @@ - - - - - - -class Notes::LoadContext - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

class Notes::LoadContext

- -
- -
- - - - -
- - - - - - - - - - -
-

Public Instance Methods

- - -
- -
- execute() - click to toggle source -
- - -
- - - - - -
-
# File app/contexts/notes/load_context.rb, line 3
-def execute
-  target_type = params[:target_type]
-  target_id   = params[:target_id]
-  after_id    = params[:after_id]
-  before_id   = params[:before_id]
-
-
-  @notes = case target_type
-           when "commit"
-             project.commit_notes(project.commit(target_id)).fresh.limit(20)
-           when "issue"
-             project.issues.find(target_id).notes.inc_author.fresh.limit(20)
-           when "merge_request"
-             project.merge_requests.find(target_id).mr_and_commit_notes.inc_author.fresh.limit(20)
-           when "snippet"
-             project.snippets.find(target_id).notes.fresh
-           when "wall"
-             # this is the only case, where the order is DESC
-             project.common_notes.order("created_at DESC, id DESC").limit(50)
-           when "wiki"
-             project.wiki_notes.limit(20)
-           end
-
-  @notes = if after_id
-             @notes.where("id > ?", after_id)
-           elsif before_id
-             @notes.where("id < ?", before_id)
-           else
-             @notes
-           end
-end
-
- -
- - - - -
- - -
- -
- -
- - - - diff --git a/doc/app/NotesController.html b/doc/app/NotesController.html deleted file mode 100644 index 5623d4a2..00000000 --- a/doc/app/NotesController.html +++ /dev/null @@ -1,636 +0,0 @@ - - - - - - -class NotesController - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

class NotesController

- -
- -
- - - - -
- - - - - - - - - - -
-

Public Instance Methods

- - -
- -
- create() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/notes_controller.rb, line 18
-def create
-  @note = Notes::CreateContext.new(project, current_user, params).execute
-
-  respond_to do |format|
-    format.html {redirect_to :back}
-    format.js
-  end
-end
-
- -
- - - - -
- - -
- -
- destroy() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/notes_controller.rb, line 27
-def destroy
-  @note = @project.notes.find(params[:id])
-  return access_denied! unless can?(current_user, :admin_note, @note)
-  @note.destroy
-
-  respond_to do |format|
-    format.js { render nothing: true }
-  end
-end
-
- -
- - - - -
- - -
- -
- index() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/notes_controller.rb, line 8
-def index
-  notes
-  if params[:target_type] == "merge_request"
-    @mixed_targets = true
-    @main_target_type = params[:target_type].camelize
-  end
-
-  respond_with(@notes)
-end
-
- -
- - - - -
- - -
- -
- preview() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/notes_controller.rb, line 37
-def preview
-  render text: view_context.markdown(params[:note])
-end
-
- -
- - - - -
- - -
- -
-

Protected Instance Methods

- - -
- -
- notes() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/notes_controller.rb, line 43
-def notes
-  @notes = Notes::LoadContext.new(project, current_user, params).execute
-end
-
- -
- - - - -
- - -
- -
- -
- - - - diff --git a/doc/app/NotesHelper.html b/doc/app/NotesHelper.html deleted file mode 100644 index c2940f8d..00000000 --- a/doc/app/NotesHelper.html +++ /dev/null @@ -1,581 +0,0 @@ - - - - - - -module NotesHelper - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

module NotesHelper

- -
- -
- - - - -
- - - - - - - - - - -
-

Public Instance Methods

- - - - - -
- -
- loading_more_notes?() - click to toggle source -
- - -
- - - - - -
-
# File app/helpers/notes_helper.rb, line 2
-def loading_more_notes?
-  params[:loading_more].present?
-end
-
- -
- - - - -
- - -
- -
- loading_new_notes?() - click to toggle source -
- - -
- - - - - -
-
# File app/helpers/notes_helper.rb, line 6
-def loading_new_notes?
-  params[:loading_new].present?
-end
-
- -
- - - - -
- - -
- -
- note_for_main_target?(note) - click to toggle source -
- - -
- -

Helps to distinguish e.g. commit notes in mr notes list

- - - -
-
# File app/helpers/notes_helper.rb, line 11
-def note_for_main_target?(note)
-  !@mixed_targets || @main_target_type == note.noteable_type
-end
-
- -
- - - - -
- - -
- -
- -
- - - - diff --git a/doc/app/Notify.html b/doc/app/Notify.html deleted file mode 100644 index 933e1cbc..00000000 --- a/doc/app/Notify.html +++ /dev/null @@ -1,883 +0,0 @@ - - - - - - -class Notify - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

class Notify

- -
- -
- - - - -
- - - - - - - - - - -
-

Public Instance Methods

- - -
- -
- issue_status_changed_email(recipient_id, issue_id, status, updated_by_user_id) - click to toggle source -
- - -
- - - - - -
-
# File app/mailers/notify.rb, line 31
-def issue_status_changed_email(recipient_id, issue_id, status, updated_by_user_id)
-  @issue = Issue.find issue_id
-  @issue_status = status
-  @updated_by = User.find updated_by_user_id
-  mail(to: recipient(recipient_id),
-      subject: subject("changed issue ##{@issue.id}", @issue.title))
-end
-
- -
- - - - -
- - -
- -
- new_issue_email(issue_id) - click to toggle source -
- - -
- -

Issue

- - - -
-
# File app/mailers/notify.rb, line 18
-def new_issue_email(issue_id)
-  @issue = Issue.find(issue_id)
-  @project = @issue.project
-  mail(to: @issue.assignee_email, subject: subject("new issue ##{@issue.id}", @issue.title))
-end
-
- -
- - - - -
- - -
- -
- new_merge_request_email(merge_request_id) - click to toggle source -
- - -
- -

Merge Request

- - - -
-
# File app/mailers/notify.rb, line 45
-def new_merge_request_email(merge_request_id)
-  @merge_request = MergeRequest.find(merge_request_id)
-  @project = @merge_request.project
-  mail(to: @merge_request.assignee_email, subject: subject("new merge request !#{@merge_request.id}", @merge_request.title))
-end
-
- -
- - - - -
- - -
- -
- new_user_email(user_id, password) - click to toggle source -
- - -
- -

User

- - - -
-
# File app/mailers/notify.rb, line 118
-def new_user_email(user_id, password)
-  @user = User.find(user_id)
-  @password = password
-  mail(to: @user.email, subject: subject("Account was created for you"))
-end
-
- -
- - - - -
- - -
- -
- note_commit_email(recipient_id, note_id) - click to toggle source -
- - -
- -

Note

- - - -
-
# File app/mailers/notify.rb, line 64
-def note_commit_email(recipient_id, note_id)
-  @note = Note.find(note_id)
-  @commit = @note.noteable
-  @commit = CommitDecorator.decorate(@commit)
-  @project = @note.project
-  mail(to: recipient(recipient_id), subject: subject("note for commit #{@commit.short_id}", @commit.title))
-end
-
- -
- - - - -
- - -
- -
- note_issue_email(recipient_id, note_id) - click to toggle source -
- - -
- - - - - -
-
# File app/mailers/notify.rb, line 72
-def note_issue_email(recipient_id, note_id)
-  @note = Note.find(note_id)
-  @issue = @note.noteable
-  @project = @note.project
-  mail(to: recipient(recipient_id), subject: subject("note for issue ##{@issue.id}"))
-end
-
- -
- - - - -
- - -
- -
- note_merge_request_email(recipient_id, note_id) - click to toggle source -
- - -
- - - - - -
-
# File app/mailers/notify.rb, line 79
-def note_merge_request_email(recipient_id, note_id)
-  @note = Note.find(note_id)
-  @merge_request = @note.noteable
-  @project = @note.project
-  mail(to: recipient(recipient_id), subject: subject("note for merge request !#{@merge_request.id}"))
-end
-
- -
- - - - -
- - -
- -
- note_wall_email(recipient_id, note_id) - click to toggle source -
- - -
- - - - - -
-
# File app/mailers/notify.rb, line 86
-def note_wall_email(recipient_id, note_id)
-  @note = Note.find(note_id)
-  @project = @note.project
-  mail(to: recipient(recipient_id), subject: subject)
-end
-
- -
- - - - -
- - -
- -
- note_wiki_email(recipient_id, note_id) - click to toggle source -
- - -
- - - - - -
-
# File app/mailers/notify.rb, line 92
-def note_wiki_email(recipient_id, note_id)
-  @note = Note.find(note_id)
-  @wiki = @note.noteable
-  @project = @note.project
-  mail(to: recipient(recipient_id), subject: subject("note for wiki"))
-end
-
- -
- - - - -
- - -
- -
- project_access_granted_email(user_project_id) - click to toggle source -
- - -
- -

Project

- - - -
-
# File app/mailers/notify.rb, line 105
-def project_access_granted_email(user_project_id)
-  @users_project = UsersProject.find user_project_id
-  @project = @users_project.project
-  mail(to: @users_project.user.email, 
-       subject: subject("access to project was granted"))
-end
-
- -
- - - - -
- - -
- -
- reassigned_issue_email(recipient_id, issue_id, previous_assignee_id) - click to toggle source -
- - -
- - - - - -
-
# File app/mailers/notify.rb, line 24
-def reassigned_issue_email(recipient_id, issue_id, previous_assignee_id)
-  @issue = Issue.find(issue_id)
-  @previous_assignee ||= User.find(previous_assignee_id)
-  @project = @issue.project
-  mail(to: recipient(recipient_id), subject: subject("changed issue ##{@issue.id}", @issue.title))
-end
-
- -
- - - - -
- - -
- -
- reassigned_merge_request_email(recipient_id, merge_request_id, previous_assignee_id) - click to toggle source -
- - -
- - - - - -
-
# File app/mailers/notify.rb, line 51
-def reassigned_merge_request_email(recipient_id, merge_request_id, previous_assignee_id)
-  @merge_request = MergeRequest.find(merge_request_id)
-  @previous_assignee ||= User.find(previous_assignee_id)
-  @project = @merge_request.project
-  mail(to: recipient(recipient_id), subject: subject("changed merge request !#{@merge_request.id}", @merge_request.title))
-end
-
- -
- - - - -
- - -
- -
- -
- - - - diff --git a/doc/app/OmniauthCallbacksController.html b/doc/app/OmniauthCallbacksController.html deleted file mode 100644 index d40a16a3..00000000 --- a/doc/app/OmniauthCallbacksController.html +++ /dev/null @@ -1,527 +0,0 @@ - - - - - - -class OmniauthCallbacksController - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

class OmniauthCallbacksController

- -
- -
- - - - -
- - - - - - - - - - -
-

Public Instance Methods

- - -
- -
- failure_message() - click to toggle source -
- - -
- -

Extend the standard message generation to accept our custom exception

- - - -
-
# File app/controllers/omniauth_callbacks_controller.rb, line 9
-def failure_message
-  exception = env["omniauth.error"]
-  error   = exception.error_reason if exception.respond_to?(:error_reason)
-  error ||= exception.error        if exception.respond_to?(:error)
-  error ||= exception.message      if exception.respond_to?(:message)
-  error ||= env["omniauth.error.type"].to_s
-  error.to_s.humanize if error
-end
-
- -
- - - - -
- - -
- -
- ldap() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/omniauth_callbacks_controller.rb, line 18
-def ldap
-  # We only find ourselves here if the authentication to LDAP was successful.
-  @user = User.find_for_ldap_auth(request.env["omniauth.auth"], current_user)
-  if @user.persisted?
-    @user.remember_me = true
-  end
-  sign_in_and_redirect @user
-end
-
- -
- - - - -
- - -
- -
- -
- - - - diff --git a/doc/app/PostReceive.html b/doc/app/PostReceive.html deleted file mode 100644 index 11468fd9..00000000 --- a/doc/app/PostReceive.html +++ /dev/null @@ -1,495 +0,0 @@ - - - - - - -class PostReceive - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

class PostReceive

- -
- -
- - - - -
- - - - - - - - - - -
-

Public Class Methods

- - -
- -
- perform(reponame, oldrev, newrev, ref, identifier) - click to toggle source -
- - -
- - - - - -
-
# File app/workers/post_receive.rb, line 4
-def self.perform(reponame, oldrev, newrev, ref, identifier)
-  project = Project.find_by_path(reponame)
-  return false if project.nil?
-
-  # Ignore push from non-gitlab users
-  if %r^[A-Z0-9._%a-z\-]+@(?:[A-Z0-9a-z\-]+\.)+[A-Za-z]{2,4}$/.match(identifier)
-    return false unless user = User.find_by_email(identifier)
-  else
-    return false unless user = Key.find_by_identifier(identifier).try(:user)
-  end
-
-  project.trigger_post_receive(oldrev, newrev, ref, user)
-end
-
- -
- - - - -
- - -
- -
- -
- - - - diff --git a/doc/app/ProfileController.html b/doc/app/ProfileController.html deleted file mode 100644 index deb4b0bc..00000000 --- a/doc/app/ProfileController.html +++ /dev/null @@ -1,683 +0,0 @@ - - - - - - -class ProfileController - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

class ProfileController

- -
- -
- - - - -
- - - - - - - - - - -
-

Public Instance Methods

- - -
- -
- design() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/profile_controller.rb, line 7
-def design
-end
-
- -
- - - - -
- - -
- -
- history() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/profile_controller.rb, line 34
-def history
-  @events = current_user.recent_events.page(params[:page]).per(20)
-end
-
- -
- - - - -
- - -
- -
- password_update() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/profile_controller.rb, line 18
-def password_update
-  params[:user].reject!{ |k, v| k != "password" && k != "password_confirmation"}
-
-  if @user.update_attributes(params[:user])
-    flash[:notice] = "Password was successfully updated. Please login with it"
-    redirect_to new_user_session_path
-  else
-    render action: "password"
-  end
-end
-
- -
- - - - -
- - -
- -
- reset_private_token() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/profile_controller.rb, line 29
-def reset_private_token
-  current_user.reset_authentication_token!
-  redirect_to profile_account_path
-end
-
- -
- - - - -
- - -
- -
- show() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/profile_controller.rb, line 4
-def show
-end
-
- -
- - - - -
- - -
- -
- token() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/profile_controller.rb, line 15
-def token
-end
-
- -
- - - - -
- - -
- -
- update() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/profile_controller.rb, line 10
-def update
-  @user.update_attributes(params[:user])
-  redirect_to :back
-end
-
- -
- - - - -
- - -
- -
- -
- - - - diff --git a/doc/app/ProfileHelper.html b/doc/app/ProfileHelper.html deleted file mode 100644 index ab7773ba..00000000 --- a/doc/app/ProfileHelper.html +++ /dev/null @@ -1,481 +0,0 @@ - - - - - - -module ProfileHelper - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

module ProfileHelper

- -
- -
- - - - -
- - - - - - - - - - -
-

Public Instance Methods

- - -
- -
- oauth_active_class(provider) - click to toggle source -
- - -
- - - - - -
-
# File app/helpers/profile_helper.rb, line 2
-def oauth_active_class provider
-  if current_user.provider == provider.to_s
-    'active'
-  end
-end
-
- -
- - - - -
- - -
- -
- -
- - - - diff --git a/doc/app/Project.html b/doc/app/Project.html deleted file mode 100644 index 55868ef1..00000000 --- a/doc/app/Project.html +++ /dev/null @@ -1,1202 +0,0 @@ - - - - - - -class Project - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

class Project

- -
- -
- - - - -
- - - - - - - - -
-

Attributes

- - -
-
- error_code[RW] -
- -
- - - -
-
- -
- - - - -
-

Public Class Methods

- - -
- -
- access_options() - click to toggle source -
- - -
- - - - - -
-
# File app/models/project.rb, line 85
-def access_options
-  UsersProject.access_roles
-end
-
- -
- - - - -
- - -
- -
- active() - click to toggle source -
- - -
- - - - - -
-
# File app/models/project.rb, line 52
-def active
-  joins(:issues, :notes, :merge_requests).order("issues.created_at, notes.created_at, merge_requests.created_at DESC")
-end
-
- -
- - - - -
- - -
- -
- create_by_user(params, user) - click to toggle source -
- - -
- - - - - -
-
# File app/models/project.rb, line 60
-def create_by_user(params, user)
-  project = Project.new params
-
-  Project.transaction do
-    project.owner = user
-    project.save!
-
-    # Add user as project master
-    project.users_projects.create!(project_access: UsersProject::MASTER, user: user)
-
-    # when project saved no team member exist so
-    # project repository should be updated after first user add
-    project.update_repository
-  end
-
-  project
-rescue Gitlab::Gitolite::AccessDenied => ex
-  project.error_code = :gitolite
-  project
-rescue => ex
-  project.error_code = :db
-  project.errors.add(:base, "Can't save project. Please try again later")
-  project
-end
-
- -
- - - - -
- - - - - -
- -
-

Public Instance Methods

- - -
- -
- build_commit_note(commit) - click to toggle source -
- - -
- - - - - -
-
# File app/models/project.rb, line 124
-def build_commit_note(commit)
-  notes.new(noteable_id: commit.id, noteable_type: "Commit")
-end
-
- -
- - - - -
- - -
- -
- check_limit() - click to toggle source -
- - -
- - - - - -
-
# File app/models/project.rb, line 98
-def check_limit
-  unless owner.can_create_project?
-    errors[:base] << ("Your own projects limit is #{owner.projects_limit}! Please contact administrator to increase it")
-  end
-rescue
-  errors[:base] << ("Can't check your ability to create project")
-end
-
- -
- - - - -
- - -
- -
- commit_line_notes(commit) - click to toggle source -
- - -
- - - - - -
-
# File app/models/project.rb, line 132
-def commit_line_notes(commit)
-  notes.where(noteable_id: commit.id, noteable_type: "Commit").where("line_code IS NOT NULL")
-end
-
- -
- - - - -
- - -
- -
- commit_notes(commit) - click to toggle source -
- - -
- - - - - -
-
# File app/models/project.rb, line 128
-def commit_notes(commit)
-  notes.where(noteable_id: commit.id, noteable_type: "Commit", line_code: nil)
-end
-
- -
- - - - -
- - -
- -
- common_notes() - click to toggle source -
- - -
- - - - - -
-
# File app/models/project.rb, line 120
-def common_notes
-  notes.where(noteable_type: ["", nil]).inc_author_project
-end
-
- -
- - - - -
- - -
- -
- git_error?() - click to toggle source -
- - -
- - - - - -
-
# File app/models/project.rb, line 90
-def git_error?
-  error_code == :gitolite
-end
-
- -
- - - - -
- - -
- -
- issues_labels() - click to toggle source -
- - -
- - - - - -
-
# File app/models/project.rb, line 160
-def issues_labels
-  issues.tag_counts_on(:labels)
-end
-
- -
- - - - -
- - -
- -
- last_activity() - click to toggle source -
- - -
- - - - - -
-
# File app/models/project.rb, line 144
-def last_activity
-  last_event
-end
-
- -
- - - - -
- - -
- -
- last_activity_date() - click to toggle source -
- - -
- - - - - -
-
# File app/models/project.rb, line 148
-def last_activity_date
-  last_event.try(:created_at) || updated_at
-end
-
- -
- - - - -
- - -
- -
- private?() - click to toggle source -
- - -
- - - - - -
-
# File app/models/project.rb, line 140
-def private?
-  private_flag
-end
-
- -
- - - - -
- - -
- -
- project_id() - click to toggle source -
- - -
- - - - - -
-
# File app/models/project.rb, line 156
-def project_id
-  self.id
-end
-
- -
- - - - -
- - -
- -
- public?() - click to toggle source -
- - -
- - - - - -
-
# File app/models/project.rb, line 136
-def public?
-  !private_flag
-end
-
- -
- - - - -
- - -
- -
- repo_name() - click to toggle source -
- - -
- - - - - -
-
# File app/models/project.rb, line 106
-def repo_name
-  if path == "gitolite-admin"
-    errors.add(:path, " like 'gitolite-admin' is not allowed")
-  end
-end
-
- -
- - - - -
- - -
- -
- saved?() - click to toggle source -
- - -
- - - - - -
-
# File app/models/project.rb, line 94
-def saved?
-  id && valid?
-end
-
- -
- - - - -
- - -
- -
- to_param() - click to toggle source -
- - -
- - - - - -
-
# File app/models/project.rb, line 112
-def to_param
-  code
-end
-
- -
- - - - -
- - -
- -
- web_url() - click to toggle source -
- - -
- - - - - -
-
# File app/models/project.rb, line 116
-def web_url
-  [Gitlab.config.url, code].join("/")
-end
-
- -
- - - - -
- - -
- -
- wiki_notes() - click to toggle source -
- - -
- - - - - -
-
# File app/models/project.rb, line 152
-def wiki_notes
-  Note.where(noteable_id: wikis.pluck(:id), noteable_type: 'Wiki', project_id: self.id)
-end
-
- -
- - - - -
- - -
- -
- -
- - - - diff --git a/doc/app/ProjectHook.html b/doc/app/ProjectHook.html deleted file mode 100644 index e5d17ef0..00000000 --- a/doc/app/ProjectHook.html +++ /dev/null @@ -1,439 +0,0 @@ - - - - - - -class ProjectHook - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

class ProjectHook

- -
- -
- - - - -
- - - - - - - - - - -
- -
- - - - diff --git a/doc/app/ProjectObserver.html b/doc/app/ProjectObserver.html deleted file mode 100644 index d4ce7824..00000000 --- a/doc/app/ProjectObserver.html +++ /dev/null @@ -1,589 +0,0 @@ - - - - - - -class ProjectObserver - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

class ProjectObserver

- -
- -
- - - - -
- - - - - - - - - - -
-

Public Instance Methods

- - -
- -
- after_create(project) - click to toggle source -
- - -
- - - - - -
-
# File app/observers/project_observer.rb, line 12
-def after_create project
-  log_info("#{project.owner.name} created a new project \"#{project.name}\"")
-end
-
- -
- - - - -
- - -
- -
- after_destroy(project) - click to toggle source -
- - -
- - - - - -
-
# File app/observers/project_observer.rb, line 6
-def after_destroy(project)
-  log_info("Project \"#{project.name}\" was removed")
-
-  project.destroy_repository
-end
-
- -
- - - - -
- - -
- -
- after_save(project) - click to toggle source -
- - -
- - - - - -
-
# File app/observers/project_observer.rb, line 2
-def after_save(project)
-  project.update_repository
-end
-
- -
- - - - -
- - -
- -
-

Protected Instance Methods

- - -
- -
- log_info(message) - click to toggle source -
- - -
- - - - - -
-
# File app/observers/project_observer.rb, line 18
-def log_info message
-  Gitlab::AppLogger.info message
-end
-
- -
- - - - -
- - -
- -
- -
- - - - diff --git a/doc/app/ProjectResourceController.html b/doc/app/ProjectResourceController.html deleted file mode 100644 index aa972617..00000000 --- a/doc/app/ProjectResourceController.html +++ /dev/null @@ -1,439 +0,0 @@ - - - - - - -class ProjectResourceController - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

class ProjectResourceController

- -
- -
- - - - -
- - - - - - - - - - -
- -
- - - - diff --git a/doc/app/ProjectsController.html b/doc/app/ProjectsController.html deleted file mode 100644 index 6982deab..00000000 --- a/doc/app/ProjectsController.html +++ /dev/null @@ -1,785 +0,0 @@ - - - - - - -class ProjectsController - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

class ProjectsController

- -
- -
- - - - -
- - - - - - - - - - -
-

Public Instance Methods

- - -
- -
- create() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/projects_controller.rb, line 20
-def create
-  @project = Project.create_by_user(params[:project], current_user)
-
-  respond_to do |format|
-    format.html do
-      if @project.saved?
-        redirect_to(@project, notice: 'Project was successfully created.')
-      else
-        render action: "new"
-      end
-    end
-    format.js
-  end
-end
-
- -
- - - - -
- - -
- -
- destroy() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/projects_controller.rb, line 85
-def destroy
-  # Disable the UsersProject update_repository call, otherwise it will be
-  # called once for every person removed from the project
-  UsersProject.skip_callback(:destroy, :after, :update_repository)
-  project.destroy
-  UsersProject.set_callback(:destroy, :after, :update_repository)
-
-  respond_to do |format|
-    format.html { redirect_to root_path }
-  end
-end
-
- -
- - - - -
- - -
- -
- edit() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/projects_controller.rb, line 17
-def edit
-end
-
- -
- - - - -
- - -
- -
- files() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/projects_controller.rb, line 64
-def files
-  @notes = @project.notes.where("attachment != 'NULL'").order("created_at DESC").limit(100)
-end
-
- -
- - - - -
- - -
- -
- graph() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/projects_controller.rb, line 81
-def graph
-  @days_json, @commits_json = Gitlab::GraphCommit.to_graph(project)
-end
-
- -
- - - - -
- - -
- -
- new() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/projects_controller.rb, line 13
-def new
-  @project = Project.new
-end
-
- -
- - - - -
- - -
- -
- show() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/projects_controller.rb, line 47
-def show
-  limit = (params[:limit] || 20).to_i
-  @events = @project.events.recent.limit(limit).offset(params[:offset] || 0)
-
-  respond_to do |format|
-    format.html do
-       unless @project.empty_repo?
-         @last_push = current_user.recent_push(@project.id)
-         render :show
-       else
-         render "projects/empty"
-       end
-    end
-    format.js
-  end
-end
-
- -
- - - - -
- - -
- -
- update() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/projects_controller.rb, line 35
-def update
-  respond_to do |format|
-    if project.update_attributes(params[:project])
-      format.html { redirect_to edit_project_path(project), notice: 'Project was successfully updated.' }
-      format.js
-    else
-      format.html { render action: "edit" }
-      format.js
-    end
-  end
-end
-
- -
- - - - -
- - -
- -
- wall() - click to toggle source -
- - -
- -

Wall

- - - -
-
# File app/controllers/projects_controller.rb, line 72
-def wall
-  return render_404 unless @project.wall_enabled
-  @note = Note.new
-
-  respond_to do |format|
-    format.html
-  end
-end
-
- -
- - - - -
- - -
- -
- -
- - - - diff --git a/doc/app/ProjectsHelper.html b/doc/app/ProjectsHelper.html deleted file mode 100644 index 5edd4592..00000000 --- a/doc/app/ProjectsHelper.html +++ /dev/null @@ -1,543 +0,0 @@ - - - - - - -module ProjectsHelper - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

module ProjectsHelper

- -
- -
- - - - -
- - - - - - - - - - -
-

Public Instance Methods

- - -
- -
- grouper_project_members(project) - click to toggle source -
- - -
- - - - - -
-
# File app/helpers/projects_helper.rb, line 2
-def grouper_project_members(project)
-  @project.users_projects.sort_by(&:project_access).reverse.group_by(&:project_access)
-end
-
- -
- - - - -
- - - - - -
- -
- remove_from_team_message(project, member) - click to toggle source -
- - -
- - - - - -
-
# File app/helpers/projects_helper.rb, line 6
-def remove_from_team_message(project, member)
-  "You are going to remove #{member.user_name} from #{project.name}. Are you sure?"
-end
-
- -
- - - - -
- - -
- -
- -
- - - - diff --git a/doc/app/ProtectedBranch.html b/doc/app/ProtectedBranch.html deleted file mode 100644 index 900646dc..00000000 --- a/doc/app/ProtectedBranch.html +++ /dev/null @@ -1,529 +0,0 @@ - - - - - - -class ProtectedBranch - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

class ProtectedBranch

- -
- -
- - - - -
- - - - - - - - - - -
-

Public Instance Methods

- - -
- -
- commit() - click to toggle source -
- - -
- - - - - -
-
# File app/models/protected_branch.rb, line 17
-def commit
-  project.commit(self.name)
-end
-
- -
- - - - -
- - -
- -
- update_repository() - click to toggle source -
- - -
- - - - - -
-
# File app/models/protected_branch.rb, line 13
-def update_repository
-  git_host.update_repository(project)
-end
-
- -
- - - - -
- - -
- -
- -
- - - - diff --git a/doc/app/ProtectedBranchesController.html b/doc/app/ProtectedBranchesController.html deleted file mode 100644 index 7eb2b1fd..00000000 --- a/doc/app/ProtectedBranchesController.html +++ /dev/null @@ -1,556 +0,0 @@ - - - - - - -class ProtectedBranchesController - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

class ProtectedBranchesController

- -
- -
- - - - -
- - - - - - - - - - -
-

Public Instance Methods

- - -
- -
- create() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/protected_branches_controller.rb, line 13
-def create
-  @project.protected_branches.create(params[:protected_branch])
-  redirect_to project_protected_branches_path(@project)
-end
-
- -
- - - - -
- - -
- -
- destroy() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/protected_branches_controller.rb, line 18
-def destroy
-  @project.protected_branches.find(params[:id]).destroy
-
-  respond_to do |format|
-    format.html { redirect_to project_protected_branches_path }
-    format.js { render nothing: true }
-  end
-end
-
- -
- - - - -
- - -
- -
- index() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/protected_branches_controller.rb, line 8
-def index
-  @branches = @project.protected_branches.all
-  @protected_branch = @project.protected_branches.new
-end
-
- -
- - - - -
- - -
- -
- -
- - - - diff --git a/doc/app/PushEvent.html b/doc/app/PushEvent.html deleted file mode 100644 index 002866a6..00000000 --- a/doc/app/PushEvent.html +++ /dev/null @@ -1,1105 +0,0 @@ - - - - - - -module PushEvent - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

module PushEvent

- -
- -
- - - - -
- - - - - - - - - - -
-

Public Instance Methods

- - -
- -
- branch?() - click to toggle source -
- - -
- - - - - -
-
# File app/roles/push_event.rb, line 12
-def branch?
-  data[:ref]["refs/heads"]
-end
-
- -
- - - - -
- - -
- -
- branch_name() - click to toggle source -
- - -
- - - - - -
-
# File app/roles/push_event.rb, line 48
-def branch_name
-  @branch_name ||= data[:ref].gsub("refs/heads/", "")
-end
-
- -
- - - - -
- - -
- -
- commit_from() - click to toggle source -
- - -
- - - - - -
-
# File app/roles/push_event.rb, line 32
-def commit_from
-  data[:before]
-end
-
- -
- - - - -
- - -
- -
- commit_to() - click to toggle source -
- - -
- - - - - -
-
# File app/roles/push_event.rb, line 36
-def commit_to
-  data[:after]
-end
-
- -
- - - - -
- - -
- -
- commits() - click to toggle source -
- - -
- -

Max 20 commits from push DESC

- - - -
-
# File app/roles/push_event.rb, line 57
-def commits
-  @commits ||= data[:commits].map { |commit| project.commit(commit[:id]) }.reverse
-end
-
- -
- - - - -
- - -
- -
- commits_count() - click to toggle source -
- - -
- - - - - -
-
# File app/roles/push_event.rb, line 61
-def commits_count 
-  data[:total_commits_count] || commits.count || 0
-end
-
- -
- - - - -
- - -
- -
- last_commit() - click to toggle source -
- - -
- - - - - -
-
# File app/roles/push_event.rb, line 85
-def last_commit
-  project.commit(commit_to)
-rescue => ex
-  nil
-end
-
- -
- - - - -
- - -
- -
- last_push_to_non_root?() - click to toggle source -
- - -
- - - - - -
-
# File app/roles/push_event.rb, line 97
-def last_push_to_non_root?
-  branch? && project.default_branch != branch_name
-end
-
- -
- - - - -
- - -
- -
- md_ref?() - click to toggle source -
- - -
- - - - - -
-
# File app/roles/push_event.rb, line 28
-def md_ref?
-  !(rm_ref? || new_ref?)
-end
-
- -
- - - - -
- - -
- -
- new_branch?() - click to toggle source -
- - -
- - - - - -
-
# File app/roles/push_event.rb, line 16
-def new_branch?
-  commit_from =~ %r^00000/
-end
-
- -
- - - - -
- - -
- -
- new_ref?() - click to toggle source -
- - -
- - - - - -
-
# File app/roles/push_event.rb, line 20
-def new_ref?
-  commit_from =~ %r^00000/
-end
-
- -
- - - - -
- - -
- -
- parent_commit() - click to toggle source -
- - -
- - - - - -
-
# File app/roles/push_event.rb, line 79
-def parent_commit
-  project.commit(commit_from)
-rescue => ex
-  nil
-end
-
- -
- - - - -
- - -
- -
- push_action_name() - click to toggle source -
- - -
- - - - - -
-
# File app/roles/push_event.rb, line 69
-def push_action_name
-  if new_ref?
-    "pushed new"
-  elsif rm_ref?
-    "deleted"
-  else
-    "pushed to"
-  end
-end
-
- -
- - - - -
- - -
- -
- push_with_commits?() - click to toggle source -
- - -
- - - - - -
-
# File app/roles/push_event.rb, line 91
-def push_with_commits? 
-  md_ref? && commits.any? && parent_commit && last_commit
-rescue Grit::NoSuchPathError
-  false
-end
-
- -
- - - - -
- - -
- -
- ref_name() - click to toggle source -
- - -
- - - - - -
-
# File app/roles/push_event.rb, line 40
-def ref_name
-  if tag?
-    tag_name
-  else
-    branch_name
-  end
-end
-
- -
- - - - -
- - -
- -
- ref_type() - click to toggle source -
- - -
- - - - - -
-
# File app/roles/push_event.rb, line 65
-def ref_type
-  tag? ? "tag" : "branch"
-end
-
- -
- - - - -
- - -
- -
- rm_ref?() - click to toggle source -
- - -
- - - - - -
-
# File app/roles/push_event.rb, line 24
-def rm_ref?
-  commit_to =~ %r^00000/
-end
-
- -
- - - - -
- - -
- -
- tag?() - click to toggle source -
- - -
- - - - - -
-
# File app/roles/push_event.rb, line 8
-def tag?
-  data[:ref]["refs/tags"]
-end
-
- -
- - - - -
- - -
- -
- tag_name() - click to toggle source -
- - -
- - - - - -
-
# File app/roles/push_event.rb, line 52
-def tag_name
-  @tag_name ||= data[:ref].gsub("refs/tags/", "")
-end
-
- -
- - - - -
- - -
- -
- valid_push?() - click to toggle source -
- - -
- - - - - -
-
# File app/roles/push_event.rb, line 2
-def valid_push?
-  data[:ref]
-rescue => ex
-  false
-end
-
- -
- - - - -
- - -
- -
- -
- - - - diff --git a/doc/app/PushObserver.html b/doc/app/PushObserver.html deleted file mode 100644 index 804447a6..00000000 --- a/doc/app/PushObserver.html +++ /dev/null @@ -1,699 +0,0 @@ - - - - - - -module PushObserver - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

module PushObserver

- -
- -

Includes methods for handling Git Push events

- -

Triggered by PostReceive job

- -
- - - - -
- - - - - - - - - - -
-

Public Instance Methods

- - -
- -
- execute_hooks(oldrev, newrev, ref, user) - click to toggle source -
- - -
- - - - - -
-
# File app/roles/push_observer.rb, line 33
-def execute_hooks(oldrev, newrev, ref, user)
-  ref_parts = ref.split('/')
-
-  # Return if this is not a push to a branch (e.g. new commits)
-  return if ref_parts[1] !~ %rheads/ || oldrev == "00000000000000000000000000000000"
-
-  data = post_receive_data(oldrev, newrev, ref, user)
-
-  hooks.each { |hook| hook.execute(data) }
-end
-
- -
- - - - -
- - -
- -
- observe_push(oldrev, newrev, ref, user) - click to toggle source -
- - -
- - - - - -
-
# File app/roles/push_observer.rb, line 5
-def observe_push(oldrev, newrev, ref, user)
-  data = post_receive_data(oldrev, newrev, ref, user)
-
-  Event.create(
-    project: self,
-    action: Event::Pushed,
-    data: data,
-    author_id: data[:user_id]
-  )
-end
-
- -
- - - - -
- - -
- -
- post_receive_data(oldrev, newrev, ref, user) - click to toggle source -
- - -
- - - - - -
-
# File app/roles/push_observer.rb, line 44
-def post_receive_data(oldrev, newrev, ref, user)
-
-  push_commits = commits_between(oldrev, newrev)
-
-  # Total commits count
-  push_commits_count = push_commits.size
-
-  # Get latest 20 commits ASC
-  push_commits_limited = push_commits.last(20)
-
-  # Hash to be passed as post_receive_data
-  data = {
-    before: oldrev,
-    after: newrev,
-    ref: ref,
-    user_id: user.id,
-    user_name: user.name,
-    repository: {
-      name: name,
-      url: web_url,
-      description: description,
-      homepage: web_url,
-    },
-    commits: [],
-    total_commits_count: push_commits_count
-  }
-
-  # For perfomance purposes maximum 20 latest commits
-  # will be passed as post receive hook data.
-  #
-  push_commits_limited.each do |commit|
-    data[:commits] << {
-      id: commit.id,
-      message: commit.safe_message,
-      timestamp: commit.date.xmlschema,
-      url: "#{Gitlab.config.url}/#{code}/commits/#{commit.id}",
-      author: {
-        name: commit.author_name,
-        email: commit.author_email
-      }
-    }
-  end
-
-  data
-end
-
- -
- - - - -
- - -
- -
- trigger_post_receive(oldrev, newrev, ref, user) - click to toggle source -
- - -
- -

This method will be called after each post receive and only if the provided -user is present in GitLab.

- -

All callbacks for post receive should be placed here.

- - - -
-
# File app/roles/push_observer.rb, line 94
-def trigger_post_receive(oldrev, newrev, ref, user)
-  # Create push event
-  self.observe_push(oldrev, newrev, ref, user)
-
-  # Close merged MR
-  self.update_merge_requests(oldrev, newrev, ref, user)
-
-  # Execute web hooks
-  self.execute_hooks(oldrev, newrev, ref, user)
-
-  # Create satellite
-  self.satellite.create unless self.satellite.exists?
-
-  # Discover the default branch, but only if it hasn't already been set to
-  # something else
-  if default_branch.nil?
-    update_attributes(default_branch: discover_default_branch)
-  end
-end
-
- -
- - - - -
- - -
- -
- update_merge_requests(oldrev, newrev, ref, user) - click to toggle source -
- - -
- - - - - -
-
# File app/roles/push_observer.rb, line 16
-def update_merge_requests(oldrev, newrev, ref, user)
-  return true unless ref =~ %rheads/
-  branch_name = ref.gsub("refs/heads/", "")
-  c_ids = self.commits_between(oldrev, newrev).map(&:id)
-
-  # Update code for merge requests
-  mrs = self.merge_requests.opened.find_all_by_branch(branch_name).all
-  mrs.each { |merge_request| merge_request.reload_code; merge_request.mark_as_unchecked }
-
-  # Close merge requests
-  mrs = self.merge_requests.opened.where(target_branch: branch_name).all
-  mrs = mrs.select(&:last_commit).select { |mr| c_ids.include?(mr.last_commit.id) }
-  mrs.each { |merge_request| merge_request.merge!(user.id) }
-
-  true
-end
-
- -
- - - - -
- - -
- -
- -
- - - - diff --git a/doc/app/Redcarpet.html b/doc/app/Redcarpet.html deleted file mode 100644 index 238b7f25..00000000 --- a/doc/app/Redcarpet.html +++ /dev/null @@ -1,432 +0,0 @@ - - - - - - -module Redcarpet - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

module Redcarpet

- -
- -
- - - - -
- - - - - - - - - - -
- -
- - - - diff --git a/doc/app/Redcarpet/Render.html b/doc/app/Redcarpet/Render.html deleted file mode 100644 index acb7ba3c..00000000 --- a/doc/app/Redcarpet/Render.html +++ /dev/null @@ -1,432 +0,0 @@ - - - - - - -module Redcarpet::Render - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

module Redcarpet::Render

- -
- -
- - - - -
- - - - - - - - - - -
- -
- - - - diff --git a/doc/app/Redcarpet/Render/GitlabHTML.html b/doc/app/Redcarpet/Render/GitlabHTML.html deleted file mode 100644 index 93212eab..00000000 --- a/doc/app/Redcarpet/Render/GitlabHTML.html +++ /dev/null @@ -1,594 +0,0 @@ - - - - - - -class Redcarpet::Render::GitlabHTML - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

class Redcarpet::Render::GitlabHTML

- -
- -
- - - - -
- - - - - - - - -
-

Attributes

- - -
-
- h[R] -
- -
- - - -
-
- -
-
- template[R] -
- -
- - - -
-
- -
- - - - -
-

Public Class Methods

- - -
- -
- new(template, options = {}) - click to toggle source -
- - -
- - - - - -
-
# File lib/redcarpet/render/gitlab_html.rb, line 6
-def initialize(template, options = {})
-  @template = template
-  @project = @template.instance_variable_get("@project")
-  super options
-end
-
- -
- - - - -
- - -
- -
-

Public Instance Methods

- - -
- -
- block_code(code, language) - click to toggle source -
- - -
- - - - - -
-
# File lib/redcarpet/render/gitlab_html.rb, line 12
-def block_code(code, language)
-  if Pygments::Lexer.find(language)
-    Pygments.highlight(code, lexer: language, options: {encoding: 'utf-8'})
-  else
-    Pygments.highlight(code, options: {encoding: 'utf-8'})
-  end
-end
-
- -
- - - - -
- - -
- -
- postprocess(full_document) - click to toggle source -
- - -
- - - - - -
-
# File lib/redcarpet/render/gitlab_html.rb, line 20
-def postprocess(full_document)
-  h.gfm(full_document)
-end
-
- -
- - - - -
- - -
- -
- -
- - - - diff --git a/doc/app/RefsController.html b/doc/app/RefsController.html deleted file mode 100644 index a8248da0..00000000 --- a/doc/app/RefsController.html +++ /dev/null @@ -1,638 +0,0 @@ - - - - - - -class RefsController - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

class RefsController

- -
- -
- - - - -
- - - - - - - - - - -
-

Public Instance Methods

- - -
- -
- logs_tree() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/refs_controller.rb, line 31
-def logs_tree
-  contents = @tree.contents
-  @logs = contents.map do |content|
-    file = params[:path] ? File.join(params[:path], content.name) : content.name
-    last_commit = @project.commits(@commit.id, file, 1).last
-    last_commit = CommitDecorator.decorate(last_commit)
-    {
-      file_name: content.name,
-      commit: last_commit
-    }
-  end
-end
-
- -
- - - - -
- - -
- -
- switch() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/refs_controller.rb, line 12
-def switch
-  respond_to do |format|
-    format.html do
-      new_path = if params[:destination] == "tree"
-                   project_tree_path(@project, @ref)
-                 else
-                   project_commits_path(@project, @ref)
-                 end
-
-      redirect_to new_path
-    end
-    format.js do
-      @ref = params[:ref]
-      define_tree_vars
-      render "tree"
-    end
-  end
-end
-
- -
- - - - -
- - -
- -
-

Protected Instance Methods

- - -
- -
- define_tree_vars() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/refs_controller.rb, line 46
-def define_tree_vars
-  params[:path] = nil if params[:path].blank?
-
-  @repo = project.repo
-  @commit = project.commit(@ref)
-  @commit = CommitDecorator.decorate(@commit)
-  @tree = Tree.new(@commit.tree, project, @ref, params[:path])
-  @tree = TreeDecorator.new(@tree)
-  @hex_path = Digest::SHA1.hexdigest(params[:path] || "")
-
-  if params[:path]
-    @logs_path = logs_file_project_ref_path(@project, @ref, params[:path])
-  else
-    @logs_path = logs_tree_project_ref_path(@project, @ref)
-  end
-rescue
-  return render_404
-end
-
- -
- - - - -
- - -
- -
- ref() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/refs_controller.rb, line 65
-def ref
-  @ref = params[:id] || params[:ref]
-end
-
- -
- - - - -
- - -
- -
- -
- - - - diff --git a/doc/app/RepositoriesController.html b/doc/app/RepositoriesController.html deleted file mode 100644 index 3a22f71e..00000000 --- a/doc/app/RepositoriesController.html +++ /dev/null @@ -1,593 +0,0 @@ - - - - - - -class RepositoriesController - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

class RepositoriesController

- -
- -
- - - - -
- - - - - - - - - - -
-

Public Instance Methods

- - -
- -
- archive() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/repositories_controller.rb, line 19
-def archive
-  unless can?(current_user, :download_code, @project)
-    render_404 and return 
-  end
-
-
-  file_path = @project.archive_repo(params[:ref])
-
-  if file_path
-    # Send file to user
-    send_file file_path
-  else
-    render_404
-  end
-end
-
- -
- - - - -
- - -
- -
- branches() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/repositories_controller.rb, line 11
-def branches
-  @branches = @project.branches
-end
-
- -
- - - - -
- - -
- -
- show() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/repositories_controller.rb, line 7
-def show
-  @activities = @project.commits_with_refs(20)
-end
-
- -
- - - - -
- - -
- -
- tags() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/repositories_controller.rb, line 15
-def tags
-  @tags = @project.tags
-end
-
- -
- - - - -
- - -
- -
- -
- - - - diff --git a/doc/app/Repository.html b/doc/app/Repository.html deleted file mode 100644 index cb68146c..00000000 --- a/doc/app/Repository.html +++ /dev/null @@ -1,1566 +0,0 @@ - - - - - - -module Repository - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

module Repository

- -
- -
- - - - -
- - - - - - - - - - -
-

Public Instance Methods

- - -
- -
- archive_repo(ref) - click to toggle source -
- - -
- -

Archive Project to .tar.gz

- -

Already packed repo archives stored at -app_root/tmp/repositories/project_name/project_name-commit-id.tag.gz

- - - -
-
# File app/roles/repository.rb, line 157
-def archive_repo(ref)
-  ref = ref || self.root_ref
-  commit = self.commit(ref)
-  return nil unless commit
-
-  # Build file path
-  file_name = self.code + "-" + commit.id.to_s + ".tar.gz"
-  storage_path = Rails.root.join("tmp", "repositories", self.code)
-  file_path = File.join(storage_path, file_name)
-
-  # Put files into a directory before archiving
-  prefix = self.code + "/"
-
-  # Create file if not exists
-  unless File.exists?(file_path)
-    FileUtils.mkdir_p storage_path
-    file = self.repo.archive_to_file(ref, prefix,  file_path)
-  end
-
-  file_path
-end
-
- -
- - - - -
- - -
- -
- branch_names() - click to toggle source -
- - -
- -

Returns an Array of branch names

- - - -
-
# File app/roles/repository.rb, line 53
-def branch_names
-  repo.branches.collect(&:name).sort
-end
-
- -
- - - - -
- - -
- -
- branches() - click to toggle source -
- - -
- -

Returns an Array of Branches

- - - -
-
# File app/roles/repository.rb, line 58
-def branches
-  repo.branches.sort_by(&:name)
-end
-
- -
- - - - -
- - -
- -
- commit(commit_id = nil) - click to toggle source -
- - -
- - - - - -
-
# File app/roles/repository.rb, line 15
-def commit(commit_id = nil)
-  Commit.find_or_first(repo, commit_id, root_ref)
-end
-
- -
- - - - -
- - -
- -
- commits(ref, path = nil, limit = nil, offset = nil) - click to toggle source -
- - -
- - - - - -
-
# File app/roles/repository.rb, line 31
-def commits(ref, path = nil, limit = nil, offset = nil)
-  Commit.commits(repo, ref, path, limit, offset)
-end
-
- -
- - - - -
- - -
- -
- commits_between(from, to) - click to toggle source -
- - -
- - - - - -
-
# File app/roles/repository.rb, line 39
-def commits_between(from, to)
-  Commit.commits_between(repo, from, to)
-end
-
- -
- - - - -
- - -
- -
- commits_since(date) - click to toggle source -
- - -
- - - - - -
-
# File app/roles/repository.rb, line 27
-def commits_since(date)
-  Commit.commits_since(repo, date)
-end
-
- -
- - - - -
- - -
- -
- commits_with_refs(n = 20) - click to toggle source -
- - -
- - - - - -
-
# File app/roles/repository.rb, line 23
-def commits_with_refs(n = 20)
-  Commit.commits_with_refs(repo, n)
-end
-
- -
- - - - -
- - -
- -
- destroy_repository() - click to toggle source -
- - -
- - - - - -
-
# File app/roles/repository.rb, line 93
-def destroy_repository
-  git_host.remove_repository(self)
-end
-
- -
- - - - -
- - -
- -
- discover_default_branch() - click to toggle source -
- - -
- -

Discovers the default branch based on the repository’s available branches

-
  • -

    If no branches are present, returns nil

    -
  • -

    If one branch is present, returns its name

    -
  • -

    If two or more branches are present, returns the one that has a name -matching #root_ref -(default_branch or ‘master’ if default_branch is nil)

    -
- - - -
-
# File app/roles/repository.rb, line 128
-def discover_default_branch
-  if branch_names.length == 0
-    nil
-  elsif branch_names.length == 1
-    branch_names.first
-  else
-    branch_names.select { |v| v == root_ref }.first
-  end
-end
-
- -
- - - - -
- - -
- -
- empty_repo?() - click to toggle source -
- - -
- - - - - -
-
# File app/roles/repository.rb, line 11
-def empty_repo?
-  !repo_exists? || !has_commits?
-end
-
- -
- - - - -
- - -
- -
- fresh_commits(n = 10) - click to toggle source -
- - -
- - - - - -
-
# File app/roles/repository.rb, line 19
-def fresh_commits(n = 10)
-  Commit.fresh_commits(repo, n)
-end
-
- -
- - - - -
- - -
- -
- has_commits?() - click to toggle source -
- - -
- - - - - -
-
# File app/roles/repository.rb, line 138
-def has_commits?
-  !!commit
-rescue Grit::NoSuchPathError
-  false
-end
-
- -
- - - - -
- - -
- -
- has_post_receive_file?() - click to toggle source -
- - -
- - - - - -
-
# File app/roles/repository.rb, line 47
-def has_post_receive_file?
-  hook_file = File.join(path_to_repo, 'hooks', 'post-receive')
-  File.exists?(hook_file)
-end
-
- -
- - - - -
- - -
- -
- heads() - click to toggle source -
- - -
- - - - - -
-
# File app/roles/repository.rb, line 103
-def heads
-  @heads ||= repo.heads
-end
-
- -
- - - - -
- - -
- -
- http_url_to_repo() - click to toggle source -
- - -
- - - - - -
-
# File app/roles/repository.rb, line 183
-def http_url_to_repo
-  http_url = [Gitlab.config.url, "/", path, ".git"].join('')
-end
-
- -
- - - - -
- - -
- -
- last_commit_for(ref, path = nil) - click to toggle source -
- - -
- - - - - -
-
# File app/roles/repository.rb, line 35
-def last_commit_for(ref, path = nil)
-  commits(ref, path, 1).first
-end
-
- -
- - - - -
- - -
- -
- open_branches() - click to toggle source -
- - -
- - - - - -
-
# File app/roles/repository.rb, line 113
-def open_branches
-  if protected_branches.empty?
-    self.repo.heads
-  else
-    pnames = protected_branches.map(&:name)
-    self.repo.heads.reject { |h| pnames.include?(h.name) }
-  end.sort_by(&:name)
-end
-
- -
- - - - -
- - -
- -
- path_to_repo() - click to toggle source -
- - -
- - - - - -
-
# File app/roles/repository.rb, line 85
-def path_to_repo
-  File.join(Gitlab.config.git_base_path, "#{path}.git")
-end
-
- -
- - - - -
- - -
- -
- protected_branch?(branch_name) - click to toggle source -
- - -
- -

Check if current branch name is marked as protected in the system

- - - -
-
# File app/roles/repository.rb, line 188
-def protected_branch? branch_name
-  protected_branches.map(&:name).include?(branch_name)
-end
-
- -
- - - - -
- - -
- -
- ref_names() - click to toggle source -
- - -
- -

Returns an Array of branch and tag names

- - - -
-
# File app/roles/repository.rb, line 73
-def ref_names
-  [branch_names + tag_names].flatten
-end
-
- -
- - - - -
- - -
- -
- repo() - click to toggle source -
- - -
- - - - - -
-
# File app/roles/repository.rb, line 77
-def repo
-  @repo ||= Grit::Repo.new(path_to_repo)
-end
-
- -
- - - - -
- - -
- -
- repo_exists?() - click to toggle source -
- - -
- - - - - -
-
# File app/roles/repository.rb, line 97
-def repo_exists?
-  @repo_exists ||= (repo && !repo.branches.empty?)
-rescue
-  @repo_exists = false
-end
-
- -
- - - - -
- - -
- -
- root_ref() - click to toggle source -
- - -
- - - - - -
-
# File app/roles/repository.rb, line 144
-def root_ref
-  default_branch || "master"
-end
-
- -
- - - - -
- - -
- -
- root_ref?(branch) - click to toggle source -
- - -
- - - - - -
-
# File app/roles/repository.rb, line 148
-def root_ref?(branch)
-  root_ref == branch
-end
-
- -
- - - - -
- - -
- -
- satellite() - click to toggle source -
- - -
- - - - - -
-
# File app/roles/repository.rb, line 43
-def satellite
-  @satellite ||= Gitlab::Satellite.new(self)
-end
-
- -
- - - - -
- - -
- -
- ssh_url_to_repo() - click to toggle source -
- - -
- - - - - -
-
# File app/roles/repository.rb, line 179
-def ssh_url_to_repo
-  url_to_repo
-end
-
- -
- - - - -
- - -
- -
- tag_names() - click to toggle source -
- - -
- -

Returns an Array of tag names

- - - -
-
# File app/roles/repository.rb, line 63
-def tag_names
-  repo.tags.collect(&:name).sort.reverse
-end
-
- -
- - - - -
- - -
- -
- tags() - click to toggle source -
- - -
- -

Returns an Array of Tags

- - - -
-
# File app/roles/repository.rb, line 68
-def tags
-  repo.tags.sort_by(&:name).reverse
-end
-
- -
- - - - -
- - -
- -
- tree(fcommit, path = nil) - click to toggle source -
- - -
- - - - - -
-
# File app/roles/repository.rb, line 107
-def tree(fcommit, path = nil)
-  fcommit = commit if fcommit == :head
-  tree = fcommit.tree
-  path ? (tree / path) : tree
-end
-
- -
- - - - -
- - -
- -
- update_repository() - click to toggle source -
- - -
- - - - - -
-
# File app/roles/repository.rb, line 89
-def update_repository
-  git_host.update_repository(self)
-end
-
- -
- - - - -
- - -
- -
- url_to_repo() - click to toggle source -
- - -
- - - - - -
-
# File app/roles/repository.rb, line 81
-def url_to_repo
-  git_host.url_to_repo(path)
-end
-
- -
- - - - -
- - -
- -
- valid_repo?() - click to toggle source -
- - -
- - - - - -
-
# File app/roles/repository.rb, line 4
-def valid_repo?
-  repo
-rescue
-  errors.add(:path, "Invalid repository path")
-  false
-end
-
- -
- - - - -
- - -
- -
- -
- - - - diff --git a/doc/app/SearchContext.html b/doc/app/SearchContext.html deleted file mode 100644 index 6a3d2bd5..00000000 --- a/doc/app/SearchContext.html +++ /dev/null @@ -1,599 +0,0 @@ - - - - - - -class SearchContext - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

class SearchContext

- -
- -
- - - - -
- - - - - - - - -
-

Attributes

- - -
-
- params[RW] -
- -
- - - -
-
- -
-
- project_ids[RW] -
- -
- - - -
-
- -
- - - - -
-

Public Class Methods

- - -
- -
- new(project_ids, params) - click to toggle source -
- - -
- - - - - -
-
# File app/contexts/search_context.rb, line 4
-def initialize(project_ids, params)
-  @project_ids, @params = project_ids, params.dup
-end
-
- -
- - - - -
- - -
- -
-

Public Instance Methods

- - -
- -
- execute() - click to toggle source -
- - -
- - - - - -
-
# File app/contexts/search_context.rb, line 8
-def execute
-  query = params[:search]
-
-  return result unless query.present?
-
-  result[:projects] = Project.where(id: project_ids).search(query).limit(10)
-  result[:merge_requests] = MergeRequest.where(project_id: project_ids).search(query).limit(10)
-  result[:issues] = Issue.where(project_id: project_ids).search(query).limit(10)
-  result
-end
-
- -
- - - - -
- - -
- -
- result() - click to toggle source -
- - -
- - - - - -
-
# File app/contexts/search_context.rb, line 19
-def result
-  @result ||= {
-    projects: [],
-    merge_requests: [],
-    issues: []
-  }
-end
-
- -
- - - - -
- - -
- -
- -
- - - - diff --git a/doc/app/SearchController.html b/doc/app/SearchController.html deleted file mode 100644 index 0c14ea8f..00000000 --- a/doc/app/SearchController.html +++ /dev/null @@ -1,489 +0,0 @@ - - - - - - -class SearchController - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

class SearchController

- -
- -
- - - - -
- - - - - - - - - - -
-

Public Instance Methods

- - -
- -
- show() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/search_controller.rb, line 2
-def show
-  result = SearchContext.new(current_user.project_ids, params).execute
-
-  @projects       = result[:projects]
-  @merge_requests = result[:merge_requests]
-  @issues         = result[:issues]
-end
-
- -
- - - - -
- - -
- -
- -
- - - - diff --git a/doc/app/Snippet.html b/doc/app/Snippet.html deleted file mode 100644 index a24e4494..00000000 --- a/doc/app/Snippet.html +++ /dev/null @@ -1,667 +0,0 @@ - - - - - - -class Snippet - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

class Snippet

- -
- -
- - - - -
- - - - - - - - - - -
-

Public Class Methods

- - -
- -
- content_types() - click to toggle source -
- - -
- - - - - -
-
# File app/models/snippet.rb, line 23
-def self.content_types
-  [
-    ".rb", ".py", ".pl", ".scala", ".c", ".cpp", ".java",
-    ".haml", ".html", ".sass", ".scss", ".xml", ".php", ".erb",
-    ".js", ".sh", ".coffee", ".yml", ".md"
-  ]
-end
-
- -
- - - - -
- - -
- -
-

Public Instance Methods

- - -
- -
- data() - click to toggle source -
- - -
- - - - - -
-
# File app/models/snippet.rb, line 31
-def data
-  content
-end
-
- -
- - - - -
- - -
- -
- expired?() - click to toggle source -
- - -
- - - - - -
-
# File app/models/snippet.rb, line 47
-def expired?
-  expires_at && expires_at < Time.current
-end
-
- -
- - - - -
- - -
- -
- mode() - click to toggle source -
- - -
- - - - - -
-
# File app/models/snippet.rb, line 43
-def mode
-  nil
-end
-
- -
- - - - -
- - -
- -
- name() - click to toggle source -
- - -
- - - - - -
-
# File app/models/snippet.rb, line 39
-def name
-  file_name
-end
-
- -
- - - - -
- - -
- -
- size() - click to toggle source -
- - -
- - - - - -
-
# File app/models/snippet.rb, line 35
-def size
-  0
-end
-
- -
- - - - -
- - -
- -
- -
- - - - diff --git a/doc/app/SnippetsController.html b/doc/app/SnippetsController.html deleted file mode 100644 index 7585a295..00000000 --- a/doc/app/SnippetsController.html +++ /dev/null @@ -1,833 +0,0 @@ - - - - - - -class SnippetsController - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

class SnippetsController

- -
- -
- - - - -
- - - - - - - - - - -
-

Public Instance Methods

- - -
- -
- create() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/snippets_controller.rb, line 26
-def create
-  @snippet = @project.snippets.new(params[:snippet])
-  @snippet.author = current_user
-  @snippet.save
-
-  if @snippet.valid?
-    redirect_to [@project, @snippet]
-  else
-    respond_with(@snippet)
-  end
-end
-
- -
- - - - -
- - -
- -
- destroy() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/snippets_controller.rb, line 55
-def destroy
-  return access_denied! unless can?(current_user, :admin_snippet, @snippet)
-
-  @snippet.destroy
-
-  redirect_to project_snippets_path(@project)
-end
-
- -
- - - - -
- - -
- -
- edit() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/snippets_controller.rb, line 38
-def edit
-end
-
- -
- - - - -
- - -
- -
- index() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/snippets_controller.rb, line 18
-def index
-  @snippets = @project.snippets
-end
-
- -
- - - - -
- - -
- -
- new() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/snippets_controller.rb, line 22
-def new
-  @snippet = @project.snippets.new
-end
-
- -
- - - - -
- - -
- -
- raw() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/snippets_controller.rb, line 63
-def raw 
-  send_data(
-    @snippet.content,
-    type: "text/plain",
-    disposition: 'inline',
-    filename: @snippet.file_name
-  )
-end
-
- -
- - - - -
- - -
- -
- show() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/snippets_controller.rb, line 51
-def show
-  @note = @project.notes.new(noteable: @snippet)
-end
-
- -
- - - - -
- - -
- -
- update() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/snippets_controller.rb, line 41
-def update
-  @snippet.update_attributes(params[:snippet])
-
-  if @snippet.valid?
-    redirect_to [@project, @snippet]
-  else
-    respond_with(@snippet)
-  end
-end
-
- -
- - - - -
- - -
- -
-

Protected Instance Methods

- - -
- -
- authorize_admin_snippet!() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/snippets_controller.rb, line 82
-def authorize_admin_snippet!
-  return render_404 unless can?(current_user, :admin_snippet, @snippet)
-end
-
- -
- - - - -
- - -
- -
- authorize_modify_snippet!() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/snippets_controller.rb, line 78
-def authorize_modify_snippet!
-  return render_404 unless can?(current_user, :modify_snippet, @snippet)
-end
-
- -
- - - - -
- - -
- -
- snippet() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/snippets_controller.rb, line 74
-def snippet
-  @snippet ||= @project.snippets.find(params[:id])
-end
-
- -
- - - - -
- - -
- -
- -
- - - - diff --git a/doc/app/SnippetsHelper.html b/doc/app/SnippetsHelper.html deleted file mode 100644 index 99c08d51..00000000 --- a/doc/app/SnippetsHelper.html +++ /dev/null @@ -1,485 +0,0 @@ - - - - - - -module SnippetsHelper - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

module SnippetsHelper

- -
- -
- - - - -
- - - - - - - - - - -
-

Public Instance Methods

- - -
- -
- lifetime_select_options() - click to toggle source -
- - -
- - - - - -
-
# File app/helpers/snippets_helper.rb, line 2
-def lifetime_select_options
-  options = [
-      ['forever', nil],
-      ['1 day',   "#{Date.current + 1.day}"],
-      ['1 week',  "#{Date.current + 1.week}"],
-      ['1 month', "#{Date.current + 1.month}"]
-  ]
-  options_for_select(options)
-end
-
- -
- - - - -
- - -
- -
- -
- - - - diff --git a/doc/app/StaticModel.html b/doc/app/StaticModel.html deleted file mode 100644 index 9dd1617c..00000000 --- a/doc/app/StaticModel.html +++ /dev/null @@ -1,648 +0,0 @@ - - - - - - -module StaticModel - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

module StaticModel

- -
- -

Provides an ActiveRecord-like interface to a model whose data is not -persisted to a database.

- -
- - - - -
- - - - - - - - - - -
-

Public Instance Methods

- - -
- -
- ==(other) - click to toggle source -
- - -
- - - - - -
-
# File app/roles/static_model.rb, line 40
-def ==(other)
-  if other.is_a? StaticModel
-    id == other.id
-  else
-    super
-  end
-end
-
- -
- - - - -
- - -
- -
- [](key) - click to toggle source -
- - -
- -

Used by AR for fetching attributes

- -

Pass it along if we respond to it.

- - - -
-
# File app/roles/static_model.rb, line 20
-def [](key)
-  send(key) if respond_to?(key)
-end
-
- -
- - - - -
- - -
- -
- destroyed?() - click to toggle source -
- - -
- - - - - -
-
# File app/roles/static_model.rb, line 36
-def destroyed?
-  false
-end
-
- -
- - - - -
- - -
- -
- new_record?() - click to toggle source -
- - -
- - - - - -
-
# File app/roles/static_model.rb, line 28
-def new_record?
-  false
-end
-
- -
- - - - -
- - -
- -
- persisted?() - click to toggle source -
- - -
- - - - - -
-
# File app/roles/static_model.rb, line 32
-def persisted?
-  false
-end
-
- -
- - - - -
- - -
- -
- to_param() - click to toggle source -
- - -
- - - - - -
-
# File app/roles/static_model.rb, line 24
-def to_param
-  id
-end
-
- -
- - - - -
- - -
- -
- -
- - - - diff --git a/doc/app/StaticModel/ClassMethods.html b/doc/app/StaticModel/ClassMethods.html deleted file mode 100644 index 27ee1373..00000000 --- a/doc/app/StaticModel/ClassMethods.html +++ /dev/null @@ -1,511 +0,0 @@ - - - - - - -module StaticModel::ClassMethods - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

module StaticModel::ClassMethods

- -
- -
- - - - -
- - - - - - - - - - -
-

Public Instance Methods

- - -
- -
- base_class() - click to toggle source -
- - -
- -

Used by ActiveRecord’s polymorphic association to set object_type

- - - -
-
# File app/roles/static_model.rb, line 12
-def base_class
-  self
-end
-
- -
- - - - -
- - -
- -
- primary_key() - click to toggle source -
- - -
- -

Used by ActiveRecord’s polymorphic association to set object_id

- - - -
-
# File app/roles/static_model.rb, line 7
-def primary_key
-  'id'
-end
-
- -
- - - - -
- - -
- -
- -
- - - - diff --git a/doc/app/SystemHook.html b/doc/app/SystemHook.html deleted file mode 100644 index 8e35bf27..00000000 --- a/doc/app/SystemHook.html +++ /dev/null @@ -1,525 +0,0 @@ - - - - - - -class SystemHook - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

class SystemHook

- -
- -
- - - - -
- - - - - - - - - - -
-

Public Class Methods

- - -
- -
- all_hooks_fire(data) - click to toggle source -
- - -
- - - - - -
-
# File app/models/system_hook.rb, line 2
-def self.all_hooks_fire(data)
-  SystemHook.all.each do |sh|
-    sh.async_execute data
-  end
-end
-
- -
- - - - -
- - -
- -
-

Public Instance Methods

- - -
- -
- async_execute(data) - click to toggle source -
- - -
- - - - - -
-
# File app/models/system_hook.rb, line 8
-def async_execute(data)
-  Resque.enqueue(SystemHookWorker, id, data)
-end
-
- -
- - - - -
- - -
- -
- -
- - - - diff --git a/doc/app/SystemHookObserver.html b/doc/app/SystemHookObserver.html deleted file mode 100644 index 20d81963..00000000 --- a/doc/app/SystemHookObserver.html +++ /dev/null @@ -1,573 +0,0 @@ - - - - - - -class SystemHookObserver - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

class SystemHookObserver

- -
- -
- - - - -
- - - - - - - - - - -
-

Public Instance Methods

- - -
- -
- after_create(model) - click to toggle source -
- - -
- - - - - -
-
# File app/observers/system_hook_observer.rb, line 4
-def after_create(model)
-  if model.kind_of? Project
-    SystemHook.all_hooks_fire({
-      event_name: "project_create",
-      name: model.name,
-      path: model.path,
-      project_id: model.id,
-      owner_name: model.owner.name,
-      owner_email: model.owner.email,
-      created_at: model.created_at
-    })
-  elsif model.kind_of? User 
-    SystemHook.all_hooks_fire({
-      event_name: "user_create",
-      name: model.name,
-      email: model.email,
-      created_at: model.created_at
-    })
-
-  elsif model.kind_of? UsersProject
-    SystemHook.all_hooks_fire({
-      event_name: "user_add_to_team",
-      project_name: model.project.name,
-      project_path: model.project.path,
-      project_id: model.project_id,
-      user_name: model.user.name,
-      user_email: model.user.email,
-      project_access: model.repo_access_human,
-      created_at: model.created_at
-    })
-
-  end
-end
-
- -
- - - - -
- - -
- -
- after_destroy(model) - click to toggle source -
- - -
- - - - - -
-
# File app/observers/system_hook_observer.rb, line 38
-def after_destroy(model)
-  if model.kind_of? Project
-    SystemHook.all_hooks_fire({
-      event_name: "project_destroy",
-      name: model.name,
-      path: model.path,
-      project_id: model.id,
-      owner_name: model.owner.name,
-      owner_email: model.owner.email,
-    })
-  elsif model.kind_of? User
-    SystemHook.all_hooks_fire({
-      event_name: "user_destroy",
-      name: model.name,
-      email: model.email
-    })
-
-  elsif model.kind_of? UsersProject
-    SystemHook.all_hooks_fire({
-      event_name: "user_remove_from_team",
-      project_name: model.project.name,
-      project_path: model.project.path,
-      project_id: model.project_id,
-      user_name: model.user.name,
-      user_email: model.user.email,
-      project_access: model.repo_access_human
-    })
-  end
-end
-
- -
- - - - -
- - -
- -
- -
- - - - diff --git a/doc/app/SystemHookWorker.html b/doc/app/SystemHookWorker.html deleted file mode 100644 index 153eb577..00000000 --- a/doc/app/SystemHookWorker.html +++ /dev/null @@ -1,485 +0,0 @@ - - - - - - -class SystemHookWorker - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

class SystemHookWorker

- -
- -
- - - - -
- - - - - - - - - - -
-

Public Class Methods

- - -
- -
- perform(hook_id, data) - click to toggle source -
- - -
- - - - - -
-
# File app/workers/system_hook_worker.rb, line 4
-def self.perform(hook_id, data)
-  SystemHook.find(hook_id).execute data
-end
-
- -
- - - - -
- - -
- -
- -
- - - - diff --git a/doc/app/TabHelper.html b/doc/app/TabHelper.html deleted file mode 100644 index 43cc08a4..00000000 --- a/doc/app/TabHelper.html +++ /dev/null @@ -1,621 +0,0 @@ - - - - - - -module TabHelper - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

module TabHelper

- -
- -
- - - - -
- - - - - - - - - - -
-

Public Instance Methods

- - -
- -
- branches_tab_class() - click to toggle source -
- - -
- - - - - -
-
# File app/helpers/tab_helper.rb, line 80
-def branches_tab_class
-  if current_page?(branches_project_repository_path(@project)) ||
-    current_controller?(:protected_branches) ||
-    current_page?(project_repository_path(@project))
-    'active'
-  end
-end
-
- -
- - - - -
- - - - - -
- -
- project_tab_class() - click to toggle source -
- - -
- - - - - -
-
# File app/helpers/tab_helper.rb, line 70
-def project_tab_class
-  [:show, :files, :edit, :update].each do |action|
-    return "active" if current_page?(controller: "projects", action: action, id: @project)
-  end
-
-  if ['snippets', 'hooks', 'deploy_keys', 'team_members'].include? controller.controller_name
-   "active"
-  end
-end
-
- -
- - - - -
- - -
- -
- -
- - - - diff --git a/doc/app/TagsHelper.html b/doc/app/TagsHelper.html deleted file mode 100644 index 3a98d61f..00000000 --- a/doc/app/TagsHelper.html +++ /dev/null @@ -1,516 +0,0 @@ - - - - - - -module TagsHelper - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

module TagsHelper

- -
- -
- - - - -
- - - - - - - - - - -
-

Public Instance Methods

- - -
- -
- tag_list(project) - click to toggle source -
- - -
- - - - - -
-
# File app/helpers/tags_helper.rb, line 6
-def tag_list project
-  html = ''
-  project.tag_list.each do |tag|
-    html += link_to tag, tag_path(tag)
-  end
-
-  html.html_safe
-end
-
- -
- - - - -
- - -
- -
- tag_path(tag) - click to toggle source -
- - -
- - - - - -
-
# File app/helpers/tags_helper.rb, line 2
-def tag_path tag
-  "/tags/#{tag}"
-end
-
- -
- - - - -
- - -
- -
- -
- - - - diff --git a/doc/app/Team.html b/doc/app/Team.html deleted file mode 100644 index 3a583694..00000000 --- a/doc/app/Team.html +++ /dev/null @@ -1,710 +0,0 @@ - - - - - - -module Team - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

module Team

- -
- -
- - - - -
- - - - - - - - - - -
-

Public Instance Methods

- - -
- -
- add_user_id_to_team(user_id, access_role) - click to toggle source -
- - -
- -

Add user to project with passed access role by user id

- - - -
-
# File app/roles/team.rb, line 26
-def add_user_id_to_team(user_id, access_role)
-  users_projects.create(
-    user_id: user_id,
-    project_access: access_role
-  )
-end
-
- -
- - - - -
- - -
- -
- add_user_to_team(user, access_role) - click to toggle source -
- - -
- -

Add user to project with passed access role

- - - -
-
# File app/roles/team.rb, line 14
-def add_user_to_team(user, access_role)
-  add_user_id_to_team(user.id, access_role)
-end
-
- -
- - - - -
- - -
- -
- add_users_ids_to_team(users_ids, access_role) - click to toggle source -
- - -
- -

Add multiple users to project with same access role by user ids

- - - -
-
# File app/roles/team.rb, line 35
-def add_users_ids_to_team(users_ids, access_role)
-  UsersProject.bulk_import(self, users_ids, access_role)
-  self.update_repository
-end
-
- -
- - - - -
- - -
- -
- add_users_to_team(users, access_role) - click to toggle source -
- - -
- -

Add multiple users to project with same access role

- - - -
-
# File app/roles/team.rb, line 20
-def add_users_to_team(users, access_role)
-  add_users_ids_to_team(users.map(&:id), access_role)
-end
-
- -
- - - - -
- - -
- -
- delete_users_ids_from_team(users_ids) - click to toggle source -
- - -
- -

Delete multiple users from project by user ids

- - - -
-
# File app/roles/team.rb, line 48
-def delete_users_ids_from_team(users_ids)
-  UsersProject.bulk_delete(self, users_ids)
-  self.update_repository
-end
-
- -
- - - - -
- - -
- -
- team_member_by_id(user_id) - click to toggle source -
- - -
- -

Get Team Member record by user id

- - - -
-
# File app/roles/team.rb, line 8
-def team_member_by_id(user_id)
-  users_projects.find_by_user_id(user_id)
-end
-
- -
- - - - -
- - -
- -
- team_member_by_name_or_email(name = nil, email = nil) - click to toggle source -
- - -
- - - - - -
-
# File app/roles/team.rb, line 2
-def team_member_by_name_or_email(name = nil, email = nil)
-  user = users.where("name like ? or email like ?", name, email).first
-  users_projects.where(user: user) if user
-end
-
- -
- - - - -
- - -
- -
- update_users_ids_to_role(users_ids, access_role) - click to toggle source -
- - -
- -

Update multiple project users to same access role by user ids

- - - -
-
# File app/roles/team.rb, line 42
-def update_users_ids_to_role(users_ids, access_role)
-  UsersProject.bulk_update(self, users_ids, access_role)
-  self.update_repository
-end
-
- -
- - - - -
- - -
- -
- -
- - - - diff --git a/doc/app/TeamMembersController.html b/doc/app/TeamMembersController.html deleted file mode 100644 index 46af7c9f..00000000 --- a/doc/app/TeamMembersController.html +++ /dev/null @@ -1,698 +0,0 @@ - - - - - - -class TeamMembersController - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

class TeamMembersController

- -
- -
- - - - -
- - - - - - - - - - -
-

Public Instance Methods

- - -
- -
- apply_import() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/team_members_controller.rb, line 47
-def apply_import
-  giver = Project.find(params[:source_project_id])
-  status = UsersProject.import_team(giver, project)
-  notice = status ? "Succesfully imported" : "Import failed"
-
-  redirect_to project_team_members_path(project), notice: notice
-end
-
- -
- - - - -
- - -
- -
- create() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/team_members_controller.rb, line 18
-def create
-  @project.add_users_ids_to_team(
-    params[:user_ids],
-    params[:project_access]
-  )
-
-  redirect_to project_team_index_path(@project)
-end
-
- -
- - - - -
- - -
- -
- destroy() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/team_members_controller.rb, line 37
-def destroy
-  @team_member = project.users_projects.find(params[:id])
-  @team_member.destroy
-
-  respond_to do |format|
-    format.html { redirect_to project_team_index_path(@project) }
-    format.js { render nothing: true }
-  end
-end
-
- -
- - - - -
- - -
- -
- index() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/team_members_controller.rb, line 6
-def index
-end
-
- -
- - - - -
- - -
- -
- new() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/team_members_controller.rb, line 14
-def new
-  @team_member = project.users_projects.new
-end
-
- -
- - - - -
- - -
- -
- show() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/team_members_controller.rb, line 9
-def show
-  @team_member = project.users_projects.find(params[:id])
-  @events = @team_member.user.recent_events.where(:project_id => @project.id).limit(7)
-end
-
- -
- - - - -
- - -
- -
- update() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/team_members_controller.rb, line 27
-def update
-  @team_member = project.users_projects.find(params[:id])
-  @team_member.update_attributes(params[:team_member])
-
-  unless @team_member.valid?
-    flash[:alert] = "User should have at least one role"
-  end
-  redirect_to project_team_index_path(@project)
-end
-
- -
- - - - -
- - -
- -
- -
- - - - diff --git a/doc/app/TestHookContext.html b/doc/app/TestHookContext.html deleted file mode 100644 index e18701cb..00000000 --- a/doc/app/TestHookContext.html +++ /dev/null @@ -1,488 +0,0 @@ - - - - - - -class TestHookContext - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

class TestHookContext

- -
- -
- - - - -
- - - - - - - - - - -
-

Public Instance Methods

- - -
- -
- execute() - click to toggle source -
- - -
- - - - - -
-
# File app/contexts/test_hook_context.rb, line 2
-def execute
-  hook = project.hooks.find(params[:id])
-  commits = project.commits(project.default_branch, nil, 3)
-  data = project.post_receive_data(commits.last.id, commits.first.id, "refs/heads/#{project.default_branch}", current_user)
-  hook.execute(data)
-end
-
- -
- - - - -
- - -
- -
- -
- - - - diff --git a/doc/app/Tree.html b/doc/app/Tree.html deleted file mode 100644 index f1f414a4..00000000 --- a/doc/app/Tree.html +++ /dev/null @@ -1,663 +0,0 @@ - - - - - - -class Tree - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

class Tree

- -
- -
- - - - -
- - - - - - - - -
-

Attributes

- - -
-
- path[RW] -
- -
- - - -
-
- -
-
- project[RW] -
- -
- - - -
-
- -
-
- ref[RW] -
- -
- - - -
-
- -
-
- tree[RW] -
- -
- - - -
-
- -
- - - - -
-

Public Class Methods

- - -
- -
- new(raw_tree, project, ref = nil, path = nil) - click to toggle source -
- - -
- - - - - -
-
# File app/models/tree.rb, line 8
-def initialize(raw_tree, project, ref = nil, path = nil)
-  @project, @ref, @path = project, ref, path
-  @tree = if path.present?
-            raw_tree / path.dup.force_encoding('ascii-8bit')
-          else
-            raw_tree
-          end
-end
-
- -
- - - - -
- - -
- -
-

Public Instance Methods

- - -
- -
- empty?() - click to toggle source -
- - -
- - - - - -
-
# File app/models/tree.rb, line 25
-def empty?
-  data.blank?
-end
-
- -
- - - - -
- - -
- -
- invalid?() - click to toggle source -
- - -
- - - - - -
-
# File app/models/tree.rb, line 21
-def invalid?
-  tree.nil?
-end
-
- -
- - - - -
- - -
- -
- is_blob?() - click to toggle source -
- - -
- - - - - -
-
# File app/models/tree.rb, line 17
-def is_blob?
-  tree.is_a?(Grit::Blob)
-end
-
- -
- - - - -
- - -
- -
- -
- - - - diff --git a/doc/app/TreeController.html b/doc/app/TreeController.html deleted file mode 100644 index 1adba0ec..00000000 --- a/doc/app/TreeController.html +++ /dev/null @@ -1,583 +0,0 @@ - - - - - - -class TreeController - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

class TreeController

- -
- -

Controller for viewing a repository’s file structure

- -
- - - - -
- - - - - - - - - - -
-

Public Instance Methods

- - -
- -
- edit() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/tree_controller.rb, line 24
-def edit
-  @last_commit = @project.last_commit_for(@ref, @path).sha
-end
-
- -
- - - - -
- - -
- -
- show() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/tree_controller.rb, line 13
-def show
-  @hex_path  = Digest::SHA1.hexdigest(@path)
-  @logs_path = logs_file_project_ref_path(@project, @ref, @path)
-
-  respond_to do |format|
-    format.html
-    # Disable cache so browser history works
-    format.js { no_cache_headers }
-  end
-end
-
- -
- - - - -
- - -
- -
- update() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/tree_controller.rb, line 28
-def update
-  file_editor = Gitlab::FileEditor.new(current_user, @project, @ref)
-  update_status = file_editor.update(
-    @path,
-    params[:content],
-    params[:commit_message],
-    params[:last_commit]
-  )
-
-  if update_status
-    redirect_to project_tree_path(@project, @id), notice: "Your changes have been successfully commited"
-  else
-    flash[:notice] = "Your changes could not be commited, because the file has been changed"
-    render :edit
-  end
-end
-
- -
- - - - -
- - -
- -
- -
- - - - diff --git a/doc/app/TreeDecorator.html b/doc/app/TreeDecorator.html deleted file mode 100644 index e6bdc0fa..00000000 --- a/doc/app/TreeDecorator.html +++ /dev/null @@ -1,597 +0,0 @@ - - - - - - -class TreeDecorator - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

class TreeDecorator

- -
- -
- - - - -
- - - - - - - - - - -
-

Public Instance Methods

- - -
- -
- breadcrumbs(max_links = 2) { |link_to("..", "| ... } - click to toggle source -
- - -
- - - - - - - -
- - - - -
- - -
- -
- readme() - click to toggle source -
- - -
- - - - - -
-
# File app/decorators/tree_decorator.rb, line 32
-def readme
-  @readme ||= contents.find { |c| c.is_a?(Grit::Blob) and c.name =~ %r^readme/ }
-end
-
- -
- - - - -
- - -
- -
- up_dir?() - click to toggle source -
- - -
- - - - - -
-
# File app/decorators/tree_decorator.rb, line 23
-def up_dir?
-  path.present?
-end
-
- -
- - - - -
- - -
- -
- up_dir_path() - click to toggle source -
- - -
- - - - - -
-
# File app/decorators/tree_decorator.rb, line 27
-def up_dir_path
-  file = File.join(path, "..")
-  h.project_tree_path(project, h.tree_join(ref, file))
-end
-
- -
- - - - -
- - -
- -
- -
- - - - diff --git a/doc/app/TreeHelper.html b/doc/app/TreeHelper.html deleted file mode 100644 index e185ba72..00000000 --- a/doc/app/TreeHelper.html +++ /dev/null @@ -1,736 +0,0 @@ - - - - - - -module TreeHelper - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

module TreeHelper

- -
- -
- - - - -
- - - - - - - - - - -
-

Public Instance Methods

- - -
- -
- allowed_tree_edit?() - click to toggle source -
- - -
- - - - - -
-
# File app/helpers/tree_helper.rb, line 63
-def allowed_tree_edit?
-  if @project.protected_branch? @ref
-    can?(current_user, :push_code_to_protected_branches, @project)
-  else
-    can?(current_user, :push_code, @project)
-  end
-end
-
- -
- - - - -
- - -
- -
- gitlab_markdown?(filename) - click to toggle source -
- - -
- - - - - -
-
# File app/helpers/tree_helper.rb, line 50
-def gitlab_markdown?(filename)
-  filename.end_with?(*%w(.mdown .md .markdown))
-end
-
- -
- - - - -
- - -
- -
- markup?(filename) - click to toggle source -
- - -
- -

Public: Determines if a given filename is compatible with GitHub::Markup.

- -

filename - Filename string to check

- -

Returns boolean

- - - -
-
# File app/helpers/tree_helper.rb, line 45
-def markup?(filename)
-  filename.end_with?(*%w(.textile .rdoc .org .creole
-                         .mediawiki .rst .asciidoc .pod))
-end
-
- -
- - - - -
- - -
- -
- plain_text_readme?(filename) - click to toggle source -
- - -
- - - - - -
-
# File app/helpers/tree_helper.rb, line 54
-def plain_text_readme? filename
-  filename == 'README'
-end
-
- -
- - - - -
- - -
- -
- render_tree(contents) - click to toggle source -
- - -
- -

Sorts a repository’s tree so that folders are before files and renders -their corresponding partials

- -

contents - A Grit::Tree object for the current tree

- - - -
-
# File app/helpers/tree_helper.rb, line 6
-def render_tree(contents)
-  # Render Folders before Files/Submodules
-  folders, files = contents.partition { |v| v.kind_of?(Grit::Tree) }
-
-  tree = ""
-
-  # Render folders if we have any
-  tree += render partial: 'tree/tree_item', collection: folders, locals: {type: 'folder'} if folders.present?
-
-  files.each do |f|
-    if f.respond_to?(:url)
-      # Object is a Submodule
-      tree += render partial: 'tree/submodule_item', object: f
-    else
-      # Object is a Blob
-      tree += render partial: 'tree/tree_item', object: f, locals: {type: 'file'}
-    end
-  end
-
-  tree.html_safe
-end
-
- -
- - - - -
- - -
- -
- tree_hex_class(content) - click to toggle source -
- - -
- - - - - -
-
# File app/helpers/tree_helper.rb, line 36
-def tree_hex_class(content)
-  "file_#{hexdigest(content.name)}"
-end
-
- -
- - - - -
- - -
- -
- tree_icon(type) - click to toggle source -
- - -
- -

Return an image icon depending on the file type

- -

type - String type of the tree item; either ‘folder’ or ‘file’

- - - -
-
# File app/helpers/tree_helper.rb, line 31
-def tree_icon(type)
-  image = type == 'folder' ? 'file_dir.png' : 'file_txt.png'
-  image_tag(image, size: '16x16')
-end
-
- -
- - - - -
- - -
- -
- tree_join(*args) - click to toggle source -
- - -
- -

Simple shortcut to File.join

- - - -
-
# File app/helpers/tree_helper.rb, line 59
-def tree_join(*args)
-  File.join(*args)
-end
-
- -
- - - - -
- - -
- -
- -
- - - - diff --git a/doc/app/User.html b/doc/app/User.html deleted file mode 100644 index 513f9644..00000000 --- a/doc/app/User.html +++ /dev/null @@ -1,755 +0,0 @@ - - - - - - -class User - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

class User

- -
- -
- - - - -
- - - - - - - - -
-

Attributes

- - -
-
- force_random_password[RW] -
- -
- - - -
-
- -
- - - - -
-

Public Class Methods

- - -
- -
- create_from_omniauth(auth, ldap = false) - click to toggle source -
- - -
- - - - - -
-
# File app/models/user.rb, line 55
-def create_from_omniauth(auth, ldap = false)
-  gitlab_auth.create_from_omniauth(auth, ldap)
-end
-
- -
- - - - -
- - -
- -
- filter(filter_name) - click to toggle source -
- - -
- - - - - -
-
# File app/models/user.rb, line 41
-def filter filter_name
-  case filter_name
-  when "admins"; self.admins
-  when "blocked"; self.blocked
-  when "wop"; self.without_projects
-  else
-    self.active
-  end
-end
-
- -
- - - - -
- - -
- -
- find_for_ldap_auth(auth, signed_in_resource = nil) - click to toggle source -
- - -
- - - - - -
-
# File app/models/user.rb, line 63
-def find_for_ldap_auth(auth, signed_in_resource = nil)
-  gitlab_auth.find_for_ldap_auth(auth, signed_in_resource)
-end
-
- -
- - - - -
- - -
- -
- find_or_new_for_omniauth(auth) - click to toggle source -
- - -
- - - - - -
-
# File app/models/user.rb, line 59
-def find_or_new_for_omniauth(auth)
-  gitlab_auth.find_or_new_for_omniauth(auth)
-end
-
- -
- - - - -
- - -
- -
- gitlab_auth() - click to toggle source -
- - -
- - - - - -
-
# File app/models/user.rb, line 67
-def gitlab_auth
-  Gitlab::Auth.new
-end
-
- -
- - - - -
- - - - - -
- -
- without_projects() - click to toggle source -
- - -
- - - - - -
-
# File app/models/user.rb, line 51
-def without_projects
-  where('id NOT IN (SELECT DISTINCT(user_id) FROM users_projects)')
-end
-
- -
- - - - -
- - -
- -
-

Public Instance Methods

- - -
- -
- generate_password() - click to toggle source -
- - -
- - - - - -
-
# File app/models/user.rb, line 76
-def generate_password
-  if self.force_random_password
-    self.password = self.password_confirmation = Devise.friendly_token.first(8)
-  end
-end
-
- -
- - - - -
- - -
- -
- -
- - - - diff --git a/doc/app/UserObserver.html b/doc/app/UserObserver.html deleted file mode 100644 index 95c7249d..00000000 --- a/doc/app/UserObserver.html +++ /dev/null @@ -1,557 +0,0 @@ - - - - - - -class UserObserver - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

class UserObserver

- -
- -
- - - - -
- - - - - - - - - - -
-

Public Instance Methods

- - -
- -
- after_create(user) - click to toggle source -
- - -
- - - - - -
-
# File app/observers/user_observer.rb, line 2
-def after_create(user)
-  log_info("User \"#{user.name}\" (#{user.email}) was created")
-
-  Notify.new_user_email(user.id, user.password).deliver
-end
-
- -
- - - - -
- - -
- -
- after_destroy(user) - click to toggle source -
- - -
- - - - - -
-
# File app/observers/user_observer.rb, line 8
-def after_destroy user
-  log_info("User \"#{user.name}\" (#{user.email})  was removed")
-end
-
- -
- - - - -
- - -
- -
-

Protected Instance Methods

- - -
- -
- log_info(message) - click to toggle source -
- - -
- - - - - -
-
# File app/observers/user_observer.rb, line 14
-def log_info message
-  Gitlab::AppLogger.info message
-end
-
- -
- - - - -
- - -
- -
- -
- - - - diff --git a/doc/app/UsersProject.html b/doc/app/UsersProject.html deleted file mode 100644 index f157832b..00000000 --- a/doc/app/UsersProject.html +++ /dev/null @@ -1,904 +0,0 @@ - - - - - - -class UsersProject - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

class UsersProject

- -
- -
- - - - -
- - - - - - -
-

Constants

-
- -
DEVELOPER - -
- - -
GUEST - -
- - -
MASTER - -
- - -
REPORTER - -
- - -
-
- - - - - - -
-

Public Class Methods

- - -
- -
- access_roles() - click to toggle source -
- - -
- - - - - -
-
# File app/models/users_project.rb, line 96
-def access_roles
-  {
-    "Guest"     => GUEST,
-    "Reporter"  => REPORTER,
-    "Developer" => DEVELOPER,
-    "Master"    => MASTER
-  }
-end
-
- -
- - - - -
- - -
- -
- bulk_delete(project, user_ids) - click to toggle source -
- - -
- - - - - -
-
# File app/models/users_project.rb, line 53
-def bulk_delete(project, user_ids)
-  UsersProject.transaction do
-    UsersProject.where(:user_id => user_ids, :project_id => project.id).each do |users_project|
-      users_project.destroy
-    end
-  end
-end
-
- -
- - - - -
- - -
- -
- bulk_import(project, user_ids, project_access) - click to toggle source -
- - -
- - - - - -
-
# File app/models/users_project.rb, line 70
-def bulk_import(project, user_ids, project_access)
-  UsersProject.transaction do
-    user_ids.each do |user_id|
-      users_project = UsersProject.new(
-        project_access: project_access,
-        user_id: user_id
-      )
-      users_project.project = project
-      users_project.save
-    end
-  end
-end
-
- -
- - - - -
- - -
- -
- bulk_update(project, user_ids, project_access) - click to toggle source -
- - -
- - - - - -
-
# File app/models/users_project.rb, line 61
-def bulk_update(project, user_ids, project_access)
-  UsersProject.transaction do
-    UsersProject.where(:user_id => user_ids, :project_id => project.id).each do |users_project|
-      users_project.project_access = project_access
-      users_project.save
-    end
-  end
-end
-
- -
- - - - -
- - -
- -
- import_team(source_project, target_project) - click to toggle source -
- - -
- - - - - -
-
# File app/models/users_project.rb, line 24
-def import_team(source_project, target_project)
-  UsersProject.without_repository_callback do
-    UsersProject.transaction do
-      team = source_project.users_projects.all
-
-      team.each do |tm|
-        # Skip if user already present in team
-        next if target_project.users.include?(tm.user)
-
-        new_tm = tm.dup
-        new_tm.id = nil
-        new_tm.project_id = target_project.id
-        new_tm.save
-      end
-    end
-  end
-
-  target_project.update_repository
-  true
-rescue
-  false
-end
-
- -
- - - - -
- - -
- -
- user_bulk_import(user, project_ids, project_access) - click to toggle source -
- - -
- - - - - -
-
# File app/models/users_project.rb, line 83
-def user_bulk_import(user, project_ids, project_access)
-  UsersProject.transaction do
-    project_ids.each do |project_id|
-      users_project = UsersProject.new(
-        project_access: project_access,
-      )
-      users_project.project_id = project_id
-      users_project.user_id = user.id
-      users_project.save
-    end
-  end
-end
-
- -
- - - - -
- - -
- -
- without_repository_callback() { || ... } - click to toggle source -
- - -
- - - - - -
-
# File app/models/users_project.rb, line 47
-def without_repository_callback
-  UsersProject.skip_callback(:destroy, :after, :update_repository)
-  yield
-  UsersProject.set_callback(:destroy, :after, :update_repository)
-end
-
- -
- - - - -
- - -
- -
-

Public Instance Methods

- - -
- -
- project_access_human() - click to toggle source -
- - -
- - - - - -
-
# File app/models/users_project.rb, line 114
-def project_access_human
-  Project.access_options.key(self.project_access)
-end
-
- -
- - - - -
- - -
- -
- repo_access_human() - click to toggle source -
- - -
- - - - - -
-
# File app/models/users_project.rb, line 118
-def repo_access_human
-  self.class.access_roles.invert[self.project_access]
-end
-
- -
- - - - -
- - -
- -
- role_access() - click to toggle source -
- - -
- - - - - -
-
# File app/models/users_project.rb, line 106
-def role_access
-  project_access
-end
-
- -
- - - - -
- - -
- -
- update_repository() - click to toggle source -
- - -
- - - - - -
-
# File app/models/users_project.rb, line 110
-def update_repository
-  git_host.update_repository(project)
-end
-
- -
- - - - -
- - -
- -
- -
- - - - diff --git a/doc/app/UsersProjectObserver.html b/doc/app/UsersProjectObserver.html deleted file mode 100644 index 7c7b90a0..00000000 --- a/doc/app/UsersProjectObserver.html +++ /dev/null @@ -1,558 +0,0 @@ - - - - - - -class UsersProjectObserver - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

class UsersProjectObserver

- -
- -
- - - - -
- - - - - - - - - - -
-

Public Instance Methods

- - -
- -
- after_commit(users_project) - click to toggle source -
- - -
- - - - - -
-
# File app/observers/users_project_observer.rb, line 2
-def after_commit(users_project)
-  return if users_project.destroyed?
-  Notify.project_access_granted_email(users_project.id).deliver
-end
-
- -
- - - - -
- - -
- -
- after_create(users_project) - click to toggle source -
- - -
- - - - - -
-
# File app/observers/users_project_observer.rb, line 7
-def after_create(users_project)
-  Event.create(
-    project_id: users_project.project.id,
-    action: Event::Joined,
-    author_id: users_project.user.id
-  )
-end
-
- -
- - - - -
- - -
- -
- after_destroy(users_project) - click to toggle source -
- - -
- - - - - -
-
# File app/observers/users_project_observer.rb, line 15
-def after_destroy(users_project)
-  Event.create(
-    project_id: users_project.project.id,
-    action: Event::Left,
-    author_id: users_project.user.id
-  )
-end
-
- -
- - - - -
- - -
- -
- -
- - - - diff --git a/doc/app/Votes.html b/doc/app/Votes.html deleted file mode 100644 index 9fa2a0b7..00000000 --- a/doc/app/Votes.html +++ /dev/null @@ -1,615 +0,0 @@ - - - - - - -module Votes - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

module Votes

- -
- -
- - - - -
- - - - - - - - - - -
-

Public Instance Methods

- - -
- -
- downvotes() - click to toggle source -
- - -
- -

Return the number of -1 comments (downvotes)

- - - -
-
# File app/roles/votes.rb, line 16
-def downvotes
-  notes.select(&:downvote?).size
-end
-
- -
- - - - -
- - -
- -
- downvotes_in_percent() - click to toggle source -
- - -
- - - - - -
-
# File app/roles/votes.rb, line 20
-def downvotes_in_percent
-  if votes_count.zero?
-    0
-  else
-    100.0 - upvotes_in_percent
-  end
-end
-
- -
- - - - -
- - -
- -
- upvotes() - click to toggle source -
- - -
- -

Return the number of +1 comments (upvotes)

- - - -
-
# File app/roles/votes.rb, line 3
-def upvotes
-  notes.select(&:upvote?).size
-end
-
- -
- - - - -
- - -
- -
- upvotes_in_percent() - click to toggle source -
- - -
- - - - - -
-
# File app/roles/votes.rb, line 7
-def upvotes_in_percent
-  if votes_count.zero?
-    0
-  else
-    100.0 / votes_count * upvotes
-  end
-end
-
- -
- - - - -
- - -
- -
- votes_count() - click to toggle source -
- - -
- -

Return the total number of votes

- - - -
-
# File app/roles/votes.rb, line 29
-def votes_count
-  upvotes + downvotes
-end
-
- -
- - - - -
- - -
- -
- -
- - - - diff --git a/doc/app/WebHook.html b/doc/app/WebHook.html deleted file mode 100644 index 44a89adb..00000000 --- a/doc/app/WebHook.html +++ /dev/null @@ -1,506 +0,0 @@ - - - - - - -class WebHook - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

class WebHook

- -
- -
- - - - -
- - - - - - - - - - -
-

Public Instance Methods

- - -
- -
- execute(data) - click to toggle source -
- - -
- - - - - -
-
# File app/models/web_hook.rb, line 12
-def execute(data)
-  parsed_url = URI.parse(url)
-  if parsed_url.userinfo.blank?
-    WebHook.post(url, body: data.to_json, headers: { "Content-Type" => "application/json" })
-  else
-    post_url = url.gsub("#{parsed_url.userinfo}@", "")
-    WebHook.post(post_url,
-                 body: data.to_json,
-                 headers: {"Content-Type" => "application/json"},
-                 basic_auth: {username: parsed_url.user, password: parsed_url.password})
-  end
-end
-
- -
- - - - -
- - -
- -
- -
- - - - diff --git a/doc/app/Wiki.html b/doc/app/Wiki.html deleted file mode 100644 index c2bf5b61..00000000 --- a/doc/app/Wiki.html +++ /dev/null @@ -1,567 +0,0 @@ - - - - - - -class Wiki - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

class Wiki

- -
- -
- - - - -
- - - - - - - - - - -
-

Protected Class Methods

- - -
- -
- regenerate_from(wiki) - click to toggle source -
- - -
- - - - - -
-
# File app/models/wiki.rb, line 20
-def self.regenerate_from wiki
-  regenerated_field = [:slug, :content, :title]
-
-  new_wiki = Wiki.new
-  regenerated_field.each do |field|
-    new_wiki.send("#{field}=", wiki.send(field))
-  end
-  new_wiki
-end
-
- -
- - - - -
- - -
- -
-

Public Instance Methods

- - -
- -
- to_param() - click to toggle source -
- - -
- - - - - -
-
# File app/models/wiki.rb, line 14
-def to_param
-  slug
-end
-
- -
- - - - -
- - -
- -
-

Protected Instance Methods

- - -
- -
- set_slug() - click to toggle source -
- - -
- - - - - -
-
# File app/models/wiki.rb, line 30
-def set_slug
-  self.slug = self.title.parameterize
-end
-
- -
- - - - -
- - -
- -
- -
- - - - diff --git a/doc/app/WikisController.html b/doc/app/WikisController.html deleted file mode 100644 index 4a4e930c..00000000 --- a/doc/app/WikisController.html +++ /dev/null @@ -1,676 +0,0 @@ - - - - - - -class WikisController - Rails Application Documentation - - - - - - - - - - - - - - - - -
-

class WikisController

- -
- -
- - - - -
- - - - - - - - - - -
-

Public Instance Methods

- - -
- -
- create() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/wikis_controller.rb, line 36
-def create
-  @wiki = @project.wikis.new(params[:wiki])
-  @wiki.user = current_user
-
-  respond_to do |format|
-    if @wiki.save
-      format.html { redirect_to [@project, @wiki], notice: 'Wiki was successfully updated.' }
-    else
-      format.html { render action: "edit" }
-    end
-  end
-end
-
- -
- - - - -
- - -
- -
- destroy() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/wikis_controller.rb, line 53
-def destroy
-  @wikis = @project.wikis.where(slug: params[:id]).delete_all
-
-  respond_to do |format|
-    format.html { redirect_to project_wiki_path(@project, :index), notice: "Page was successfully deleted" }
-  end
-end
-
- -
- - - - -
- - -
- -
- edit() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/wikis_controller.rb, line 31
-def edit
-  @wiki = @project.wikis.where(slug: params[:id]).order("created_at").last
-  @wiki = Wiki.regenerate_from @wiki
-end
-
- -
- - - - -
- - -
- -
- history() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/wikis_controller.rb, line 49
-def history
-  @wikis = @project.wikis.where(slug: params[:id]).order("created_at")
-end
-
- -
- - - - -
- - -
- -
- pages() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/wikis_controller.rb, line 6
-def pages
-  @wikis = @project.wikis.group(:slug).order("created_at")
-end
-
- -
- - - - -
- - -
- -
- show() - click to toggle source -
- - -
- - - - - -
-
# File app/controllers/wikis_controller.rb, line 10
-def show
-  if params[:old_page_id]
-    @wiki = @project.wikis.find(params[:old_page_id])
-  else
-    @wiki = @project.wikis.where(slug: params[:id]).order("created_at").last
-  end
-
-  @note = @project.notes.new(noteable: @wiki)
-
-  if @wiki
-    render 'show'
-  else
-    if can?(current_user, :write_wiki, @project)
-      @wiki = @project.wikis.new(slug: params[:id])
-      render 'edit'
-    else
-      render 'empty'
-    end
-  end
-end
-
- -
- - - - -
- - -
- -
- -
- - - - diff --git a/doc/app/created.rid b/doc/app/created.rid deleted file mode 100644 index 972a7e6f..00000000 --- a/doc/app/created.rid +++ /dev/null @@ -1,135 +0,0 @@ -Thu, 25 Oct 2012 11:45:21 +0300 -doc/README_FOR_APP Wed, 06 Jun 2012 13:56:49 +0300 -app/observers/issue_observer.rb Fri, 21 Sep 2012 15:47:07 +0300 -app/observers/key_observer.rb Fri, 21 Sep 2012 15:47:07 +0300 -app/observers/project_observer.rb Fri, 21 Sep 2012 15:47:07 +0300 -app/observers/activity_observer.rb Wed, 22 Aug 2012 14:52:27 +0300 -app/observers/user_observer.rb Fri, 21 Sep 2012 15:47:07 +0300 -app/observers/merge_request_observer.rb Mon, 22 Oct 2012 16:08:18 +0300 -app/observers/note_observer.rb Mon, 22 Oct 2012 16:08:18 +0300 -app/observers/system_hook_observer.rb Wed, 22 Aug 2012 14:52:27 +0300 -app/observers/users_project_observer.rb Mon, 22 Oct 2012 16:08:18 +0300 -app/contexts/test_hook_context.rb Wed, 22 Aug 2012 14:52:27 +0300 -app/contexts/commit_load_context.rb Mon, 22 Oct 2012 16:08:19 +0300 -app/contexts/notes/create_context.rb Wed, 22 Aug 2012 14:52:27 +0300 -app/contexts/notes/load_context.rb Mon, 22 Oct 2012 16:08:18 +0300 -app/contexts/search_context.rb Mon, 22 Oct 2012 16:08:18 +0300 -app/contexts/issues_bulk_update_context.rb Wed, 22 Aug 2012 14:52:27 +0300 -app/contexts/base_context.rb Wed, 22 Aug 2012 14:52:27 +0300 -app/contexts/merge_requests_load_context.rb Mon, 22 Oct 2012 16:08:19 +0300 -app/contexts/issues_list_context.rb Mon, 22 Oct 2012 16:08:18 +0300 -app/mailers/notify.rb Mon, 22 Oct 2012 16:08:18 +0300 -app/roles/team.rb Mon, 22 Oct 2012 16:08:18 +0300 -app/roles/push_event.rb Mon, 22 Oct 2012 16:08:18 +0300 -app/roles/votes.rb Fri, 21 Sep 2012 15:47:07 +0300 -app/roles/issue_commonality.rb Mon, 22 Oct 2012 16:08:18 +0300 -app/roles/git_host.rb Fri, 21 Sep 2012 15:47:07 +0300 -app/roles/authority.rb Mon, 22 Oct 2012 16:08:18 +0300 -app/roles/push_observer.rb Fri, 21 Sep 2012 15:47:07 +0300 -app/roles/account.rb Mon, 22 Oct 2012 16:08:18 +0300 -app/roles/static_model.rb Mon, 22 Oct 2012 16:08:18 +0300 -app/roles/repository.rb Wed, 24 Oct 2012 12:43:00 +0300 -app/workers/post_receive.rb Wed, 22 Aug 2012 14:52:27 +0300 -app/workers/system_hook_worker.rb Wed, 22 Aug 2012 14:52:27 +0300 -app/controllers/issues_controller.rb Mon, 22 Oct 2012 16:08:18 +0300 -app/controllers/labels_controller.rb Mon, 22 Oct 2012 16:08:18 +0300 -app/controllers/project_resource_controller.rb Mon, 22 Oct 2012 16:08:18 +0300 -app/controllers/dashboard_controller.rb Mon, 22 Oct 2012 16:08:18 +0300 -app/controllers/projects_controller.rb Tue, 23 Oct 2012 11:29:23 +0300 -app/controllers/repositories_controller.rb Mon, 22 Oct 2012 16:08:18 +0300 -app/controllers/milestones_controller.rb Mon, 22 Oct 2012 16:08:18 +0300 -app/controllers/hooks_controller.rb Mon, 22 Oct 2012 16:08:18 +0300 -app/controllers/blob_controller.rb Mon, 22 Oct 2012 16:08:18 +0300 -app/controllers/merge_requests_controller.rb Mon, 22 Oct 2012 16:08:18 +0300 -app/controllers/admin/logs_controller.rb Fri, 21 Sep 2012 15:47:07 +0300 -app/controllers/admin/dashboard_controller.rb Fri, 21 Sep 2012 15:47:07 +0300 -app/controllers/admin/projects_controller.rb Fri, 21 Sep 2012 15:47:07 +0300 -app/controllers/admin/hooks_controller.rb Fri, 21 Sep 2012 15:47:07 +0300 -app/controllers/admin/team_members_controller.rb Fri, 21 Sep 2012 15:47:07 +0300 -app/controllers/admin/groups_controller.rb Wed, 24 Oct 2012 12:43:00 +0300 -app/controllers/admin/users_controller.rb Mon, 22 Oct 2012 16:08:18 +0300 -app/controllers/admin/resque_controller.rb Fri, 21 Sep 2012 15:47:07 +0300 -app/controllers/blame_controller.rb Mon, 22 Oct 2012 16:08:18 +0300 -app/controllers/keys_controller.rb Wed, 26 Sep 2012 13:10:32 +0300 -app/controllers/admin_controller.rb Wed, 26 Sep 2012 13:10:32 +0300 -app/controllers/errors_controller.rb Mon, 22 Oct 2012 16:08:18 +0300 -app/controllers/help_controller.rb Wed, 06 Jun 2012 13:56:49 +0300 -app/controllers/profile_controller.rb Mon, 22 Oct 2012 16:08:18 +0300 -app/controllers/commits_controller.rb Mon, 22 Oct 2012 16:08:18 +0300 -app/controllers/team_members_controller.rb Wed, 24 Oct 2012 16:14:03 +0300 -app/controllers/omniauth_callbacks_controller.rb Fri, 21 Sep 2012 15:47:07 +0300 -app/controllers/protected_branches_controller.rb Mon, 22 Oct 2012 16:08:18 +0300 -app/controllers/snippets_controller.rb Mon, 22 Oct 2012 16:08:18 +0300 -app/controllers/groups_controller.rb Mon, 22 Oct 2012 16:08:18 +0300 -app/controllers/compare_controller.rb Mon, 22 Oct 2012 16:08:18 +0300 -app/controllers/wikis_controller.rb Mon, 22 Oct 2012 16:08:18 +0300 -app/controllers/search_controller.rb Mon, 22 Oct 2012 16:08:18 +0300 -app/controllers/deploy_keys_controller.rb Mon, 22 Oct 2012 16:08:18 +0300 -app/controllers/tree_controller.rb Mon, 22 Oct 2012 16:08:18 +0300 -app/controllers/commit_controller.rb Mon, 22 Oct 2012 16:08:18 +0300 -app/controllers/refs_controller.rb Mon, 22 Oct 2012 16:08:18 +0300 -app/controllers/application_controller.rb Wed, 24 Oct 2012 14:17:22 +0300 -app/controllers/notes_controller.rb Mon, 22 Oct 2012 16:08:18 +0300 -app/uploaders/attachment_uploader.rb Wed, 22 Aug 2012 14:52:27 +0300 -app/models/tree.rb Mon, 22 Oct 2012 16:08:18 +0300 -app/models/project.rb Mon, 22 Oct 2012 16:08:18 +0300 -app/models/issue.rb Mon, 22 Oct 2012 16:08:18 +0300 -app/models/project_hook.rb Mon, 22 Oct 2012 16:08:18 +0300 -app/models/group.rb Mon, 22 Oct 2012 16:08:18 +0300 -app/models/key.rb Mon, 22 Oct 2012 16:08:18 +0300 -app/models/snippet.rb Mon, 22 Oct 2012 16:08:18 +0300 -app/models/user.rb Mon, 22 Oct 2012 16:08:18 +0300 -app/models/note.rb Mon, 22 Oct 2012 16:08:18 +0300 -app/models/wiki.rb Mon, 22 Oct 2012 16:08:18 +0300 -app/models/users_project.rb Wed, 24 Oct 2012 16:14:03 +0300 -app/models/web_hook.rb Mon, 22 Oct 2012 16:08:18 +0300 -app/models/ability.rb Mon, 22 Oct 2012 16:08:18 +0300 -app/models/milestone.rb Mon, 22 Oct 2012 16:08:18 +0300 -app/models/commit.rb Mon, 22 Oct 2012 16:08:18 +0300 -app/models/protected_branch.rb Mon, 22 Oct 2012 16:08:18 +0300 -app/models/merge_request.rb Mon, 22 Oct 2012 16:08:18 +0300 -app/models/event.rb Mon, 22 Oct 2012 16:08:18 +0300 -app/models/system_hook.rb Mon, 22 Oct 2012 16:08:18 +0300 -app/decorators/commit_decorator.rb Mon, 22 Oct 2012 16:08:18 +0300 -app/decorators/event_decorator.rb Mon, 22 Oct 2012 16:08:18 +0300 -app/decorators/application_decorator.rb Fri, 21 Sep 2012 15:40:04 +0300 -app/decorators/tree_decorator.rb Mon, 22 Oct 2012 16:08:18 +0300 -app/helpers/tags_helper.rb Wed, 06 Jun 2012 13:56:49 +0300 -app/helpers/application_helper.rb Mon, 22 Oct 2012 16:08:18 +0300 -app/helpers/gitlab_markdown_helper.rb Fri, 21 Sep 2012 15:47:07 +0300 -app/helpers/notes_helper.rb Mon, 22 Oct 2012 16:08:18 +0300 -app/helpers/profile_helper.rb Fri, 21 Sep 2012 15:47:07 +0300 -app/helpers/tree_helper.rb Mon, 22 Oct 2012 16:08:18 +0300 -app/helpers/commits_helper.rb Mon, 22 Oct 2012 16:08:18 +0300 -app/helpers/projects_helper.rb Mon, 22 Oct 2012 16:08:18 +0300 -app/helpers/events_helper.rb Mon, 22 Oct 2012 16:08:18 +0300 -app/helpers/issues_helper.rb Mon, 22 Oct 2012 16:08:18 +0300 -app/helpers/tab_helper.rb Mon, 22 Oct 2012 16:08:18 +0300 -app/helpers/snippets_helper.rb Wed, 06 Jun 2012 13:56:49 +0300 -app/helpers/merge_requests_helper.rb Mon, 22 Oct 2012 16:08:18 +0300 -lib/file_size_validator.rb Wed, 22 Aug 2012 14:52:27 +0300 -lib/api.rb Fri, 21 Sep 2012 15:47:07 +0300 -lib/gitlab/encode.rb Wed, 22 Aug 2012 14:52:27 +0300 -lib/gitlab/graph_commit.rb Fri, 21 Sep 2012 15:47:07 +0300 -lib/gitlab/theme.rb Tue, 26 Jun 2012 16:08:37 +0300 -lib/gitlab/app_logger.rb Fri, 21 Sep 2012 15:47:07 +0300 -lib/gitlab/inline_diff.rb Mon, 22 Oct 2012 16:08:19 +0300 -lib/gitlab/merge.rb Mon, 22 Oct 2012 16:08:19 +0300 -lib/gitlab/backend/gitolite.rb Fri, 21 Sep 2012 15:47:07 +0300 -lib/gitlab/backend/grack_auth.rb Mon, 22 Oct 2012 19:02:02 +0300 -lib/gitlab/backend/gitolite_config.rb Mon, 22 Oct 2012 16:08:19 +0300 -lib/gitlab/git_logger.rb Fri, 21 Sep 2012 15:47:07 +0300 -lib/gitlab/markdown.rb Mon, 22 Oct 2012 16:08:19 +0300 -lib/gitlab/file_editor.rb Mon, 22 Oct 2012 16:08:19 +0300 -lib/gitlab/logger.rb Mon, 22 Oct 2012 16:08:19 +0300 -lib/gitlab/satellite.rb Mon, 22 Oct 2012 16:08:19 +0300 -lib/gitlab/auth.rb Mon, 22 Oct 2012 16:08:19 +0300 -lib/extracts_path.rb Mon, 22 Oct 2012 16:08:19 +0300 -lib/api/issues.rb Fri, 21 Sep 2012 15:47:07 +0300 -lib/api/projects.rb Mon, 22 Oct 2012 16:08:18 +0300 -lib/api/helpers.rb Mon, 22 Oct 2012 16:08:18 +0300 -lib/api/entities.rb Fri, 21 Sep 2012 15:47:07 +0300 -lib/api/session.rb Fri, 21 Sep 2012 15:47:07 +0300 -lib/api/users.rb Mon, 22 Oct 2012 16:08:19 +0300 -lib/api/milestones.rb Fri, 21 Sep 2012 15:47:07 +0300 -lib/redcarpet/render/gitlab_html.rb Wed, 22 Aug 2012 14:52:27 +0300 diff --git a/doc/app/doc/README_FOR_APP.html b/doc/app/doc/README_FOR_APP.html deleted file mode 100644 index 9456512e..00000000 --- a/doc/app/doc/README_FOR_APP.html +++ /dev/null @@ -1,399 +0,0 @@ - - - - - - -README_FOR_APP - Rails Application Documentation - - - - - - - - - - - - - - - - -
- -

Use this README file to introduce your application and point to useful -places in the API for learning more. Run “rake doc:app” to generate API -documentation for your models, controllers, helpers, and libraries.

- -
- - - - - diff --git a/doc/app/images/add.png b/doc/app/images/add.png deleted file mode 100755 index 6332fefe..00000000 Binary files a/doc/app/images/add.png and /dev/null differ diff --git a/doc/app/images/brick.png b/doc/app/images/brick.png deleted file mode 100644 index 7851cf34..00000000 Binary files a/doc/app/images/brick.png and /dev/null differ diff --git a/doc/app/images/brick_link.png b/doc/app/images/brick_link.png deleted file mode 100644 index 9ebf013a..00000000 Binary files a/doc/app/images/brick_link.png and /dev/null differ diff --git a/doc/app/images/bug.png b/doc/app/images/bug.png deleted file mode 100644 index 2d5fb90e..00000000 Binary files a/doc/app/images/bug.png and /dev/null differ diff --git a/doc/app/images/bullet_black.png b/doc/app/images/bullet_black.png deleted file mode 100644 index 57619706..00000000 Binary files a/doc/app/images/bullet_black.png and /dev/null differ diff --git a/doc/app/images/bullet_toggle_minus.png b/doc/app/images/bullet_toggle_minus.png deleted file mode 100644 index b47ce55f..00000000 Binary files a/doc/app/images/bullet_toggle_minus.png and /dev/null differ diff --git a/doc/app/images/bullet_toggle_plus.png b/doc/app/images/bullet_toggle_plus.png deleted file mode 100644 index 9ab4a896..00000000 Binary files a/doc/app/images/bullet_toggle_plus.png and /dev/null differ diff --git a/doc/app/images/date.png b/doc/app/images/date.png deleted file mode 100644 index 783c8335..00000000 Binary files a/doc/app/images/date.png and /dev/null differ diff --git a/doc/app/images/delete.png b/doc/app/images/delete.png deleted file mode 100755 index 08f24936..00000000 Binary files a/doc/app/images/delete.png and /dev/null differ diff --git a/doc/app/images/find.png b/doc/app/images/find.png deleted file mode 100644 index 15474796..00000000 Binary files a/doc/app/images/find.png and /dev/null differ diff --git a/doc/app/images/loadingAnimation.gif b/doc/app/images/loadingAnimation.gif deleted file mode 100644 index 82290f48..00000000 Binary files a/doc/app/images/loadingAnimation.gif and /dev/null differ diff --git a/doc/app/images/macFFBgHack.png b/doc/app/images/macFFBgHack.png deleted file mode 100644 index c6473b32..00000000 Binary files a/doc/app/images/macFFBgHack.png and /dev/null differ diff --git a/doc/app/images/package.png b/doc/app/images/package.png deleted file mode 100644 index da3c2a2d..00000000 Binary files a/doc/app/images/package.png and /dev/null differ diff --git a/doc/app/images/page_green.png b/doc/app/images/page_green.png deleted file mode 100644 index de8e003f..00000000 Binary files a/doc/app/images/page_green.png and /dev/null differ diff --git a/doc/app/images/page_white_text.png b/doc/app/images/page_white_text.png deleted file mode 100644 index 813f712f..00000000 Binary files a/doc/app/images/page_white_text.png and /dev/null differ diff --git a/doc/app/images/page_white_width.png b/doc/app/images/page_white_width.png deleted file mode 100644 index 1eb88094..00000000 Binary files a/doc/app/images/page_white_width.png and /dev/null differ diff --git a/doc/app/images/plugin.png b/doc/app/images/plugin.png deleted file mode 100644 index 6187b15a..00000000 Binary files a/doc/app/images/plugin.png and /dev/null differ diff --git a/doc/app/images/ruby.png b/doc/app/images/ruby.png deleted file mode 100644 index f763a168..00000000 Binary files a/doc/app/images/ruby.png and /dev/null differ diff --git a/doc/app/images/tag_blue.png b/doc/app/images/tag_blue.png deleted file mode 100755 index 3f02b5f8..00000000 Binary files a/doc/app/images/tag_blue.png and /dev/null differ diff --git a/doc/app/images/tag_green.png b/doc/app/images/tag_green.png deleted file mode 100644 index 83ec984b..00000000 Binary files a/doc/app/images/tag_green.png and /dev/null differ diff --git a/doc/app/images/transparent.png b/doc/app/images/transparent.png deleted file mode 100644 index d665e179..00000000 Binary files a/doc/app/images/transparent.png and /dev/null differ diff --git a/doc/app/images/wrench.png b/doc/app/images/wrench.png deleted file mode 100644 index 5c8213fe..00000000 Binary files a/doc/app/images/wrench.png and /dev/null differ diff --git a/doc/app/images/wrench_orange.png b/doc/app/images/wrench_orange.png deleted file mode 100644 index 565a9330..00000000 Binary files a/doc/app/images/wrench_orange.png and /dev/null differ diff --git a/doc/app/images/zoom.png b/doc/app/images/zoom.png deleted file mode 100644 index 908612e3..00000000 Binary files a/doc/app/images/zoom.png and /dev/null differ diff --git a/doc/app/index.html b/doc/app/index.html deleted file mode 100644 index a46b4fbc..00000000 --- a/doc/app/index.html +++ /dev/null @@ -1,392 +0,0 @@ - - - - - - -Rails Application Documentation - - - - - - - - - - - - - - - - -

This is the API documentation for Rails Application Documentation. - - -

- diff --git a/doc/app/js/darkfish.js b/doc/app/js/darkfish.js deleted file mode 100644 index 4be722fa..00000000 --- a/doc/app/js/darkfish.js +++ /dev/null @@ -1,153 +0,0 @@ -/** - * - * Darkfish Page Functions - * $Id: darkfish.js 53 2009-01-07 02:52:03Z deveiant $ - * - * Author: Michael Granger - * - */ - -/* Provide console simulation for firebug-less environments */ -if (!("console" in window) || !("firebug" in console)) { - var names = ["log", "debug", "info", "warn", "error", "assert", "dir", "dirxml", - "group", "groupEnd", "time", "timeEnd", "count", "trace", "profile", "profileEnd"]; - - window.console = {}; - for (var i = 0; i < names.length; ++i) - window.console[names[i]] = function() {}; -}; - - -/** - * Unwrap the first element that matches the given @expr@ from the targets and return them. - */ -$.fn.unwrap = function( expr ) { - return this.each( function() { - $(this).parents( expr ).eq( 0 ).after( this ).remove(); - }); -}; - - -function showSource( e ) { - var target = e.target; - var codeSections = $(target). - parents('.method-detail'). - find('.method-source-code'); - - $(target). - parents('.method-detail'). - find('.method-source-code'). - slideToggle(); -}; - -function hookSourceViews() { - $('.method-heading').click( showSource ); -}; - -function toggleDebuggingSection() { - $('.debugging-section').slideToggle(); -}; - -function hookDebuggingToggle() { - $('#debugging-toggle img').click( toggleDebuggingSection ); -}; - -function hookTableOfContentsToggle() { - $('.indexpage li .toc-toggle').each( function() { - $(this).click( function() { - $(this).toggleClass('open'); - }); - - var section = $(this).next(); - - $(this).click( function() { - section.slideToggle(); - }); - }); -} - -function hookSearch() { - var input = $('#search-field').eq(0); - var result = $('#search-results').eq(0); - $(result).show(); - - var search_section = $('#search-section').get(0); - $(search_section).show(); - - var search = new Search(search_data, input, result); - - search.renderItem = function(result) { - var li = document.createElement('li'); - var html = ''; - - // TODO add relative path to - - - - - - - - - - -

Table of Contents - Rails Application Documentation

- -

Pages

- - -

Classes/Modules

- - -

Methods

- - - - - diff --git a/doc/code/apple-touch-icon.png b/doc/code/apple-touch-icon.png new file mode 100644 index 00000000..50f98b0f Binary files /dev/null and b/doc/code/apple-touch-icon.png differ diff --git a/doc/code/classes/Ability.html b/doc/code/classes/Ability.html new file mode 100644 index 00000000..c50e5d3e --- /dev/null +++ b/doc/code/classes/Ability.html @@ -0,0 +1,507 @@ + + + + + Ability + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + +
Methods
+
+ +
A
+
+ +
+ +
G
+
+ +
+ +
P
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + +
Class Public methods
+ +
+
+ + allowed(object, subject) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/ability.rb, line 3
+def allowed(object, subject)
+  case subject.class.name
+  when "Project" then project_abilities(object, subject)
+  when "Issue" then issue_abilities(object, subject)
+  when "Note" then note_abilities(object, subject)
+  when "Snippet" then snippet_abilities(object, subject)
+  when "MergeRequest" then merge_request_abilities(object, subject)
+  when "Group" then group_abilities(object, subject)
+  else []
+  end
+end
+
+
+ +
+ +
+
+ + group_abilities(user, group) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/ability.rb, line 107
+def group_abilities user, group
+  rules = []
+
+  rules << [
+    :manage_group
+  ] if group.owner == user
+
+  rules.flatten
+end
+
+
+ +
+ +
+
+ + project_abilities(user, project) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/ability.rb, line 15
+def project_abilities(user, project)
+  rules = []
+
+  # Rules based on role in project
+  if project.master_access_for?(user)
+    rules << project_master_rules
+
+  elsif project.dev_access_for?(user)
+    rules << project_dev_rules
+
+  elsif project.report_access_for?(user)
+    rules << project_report_rules
+
+  elsif project.guest_access_for?(user)
+    rules << project_guest_rules
+  end
+
+  if project.namespace
+    # If user own project namespace
+    # (Ex. group owner or account owner)
+    if project.namespace.owner == user
+      rules << project_admin_rules
+    end
+  else
+    # For compatibility with global projects
+    # use projects.owner_id
+    if project.owner == user
+      rules << project_admin_rules
+    end
+  end
+
+
+  rules.flatten
+end
+
+
+ +
+ +
+
+ + project_admin_rules() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/ability.rb, line 99
+def project_admin_rules
+  project_master_rules + [
+    :change_namespace,
+    :rename_project,
+    :remove_project
+  ]
+end
+
+
+ +
+ +
+
+ + project_dev_rules() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/ability.rb, line 74
+def project_dev_rules
+  project_report_rules + [
+    :write_wiki,
+    :push_code
+  ]
+end
+
+
+ +
+ +
+
+ + project_guest_rules() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/ability.rb, line 50
+def project_guest_rules
+  [
+    :read_project,
+    :read_wiki,
+    :read_issue,
+    :read_milestone,
+    :read_snippet,
+    :read_team_member,
+    :read_merge_request,
+    :read_note,
+    :write_project,
+    :write_issue,
+    :write_note
+  ]
+end
+
+
+ +
+ +
+
+ + project_master_rules() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/ability.rb, line 81
+def project_master_rules
+  project_dev_rules + [
+    :push_code_to_protected_branches,
+    :modify_issue,
+    :modify_snippet,
+    :modify_merge_request,
+    :admin_issue,
+    :admin_milestone,
+    :admin_snippet,
+    :admin_team_member,
+    :admin_merge_request,
+    :admin_note,
+    :accept_mr,
+    :admin_wiki,
+    :admin_project
+  ]
+end
+
+
+ +
+ +
+
+ + project_report_rules() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/ability.rb, line 66
+def project_report_rules
+  project_guest_rules + [
+    :download_code,
+    :write_merge_request,
+    :write_snippet
+  ]
+end
+
+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/Account.html b/doc/code/classes/Account.html new file mode 100644 index 00000000..21119cc8 --- /dev/null +++ b/doc/code/classes/Account.html @@ -0,0 +1,1032 @@ + + + + + Account + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + +
Methods
+
+ +
A
+
+ +
+ +
B
+
+ +
+ +
C
+
+ +
+ +
F
+
+ +
+ +
I
+
+ +
+ +
L
+
+ +
+ +
M
+
+ +
+ +
N
+
+ +
+ +
P
+
+ +
+ +
R
+
+ +
+ +
S
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + +
Instance Public methods
+ +
+
+ + abilities() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/roles/account.rb, line 29
+def abilities
+  @abilities ||= begin
+                   abilities = Six.new
+                   abilities << Ability
+                   abilities
+                 end
+end
+
+
+ +
+ +
+
+ + authorized_groups() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/roles/account.rb, line 109
+def authorized_groups
+  @authorized_groups ||= begin
+                         groups = Group.where(id: self.projects.pluck(:namespace_id)).all
+                         groups = groups + self.groups
+                         groups.uniq
+                       end
+end
+
+
+ +
+ +
+
+ + authorized_projects() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/roles/account.rb, line 117
+def authorized_projects
+  Project.authorized_for(self)
+end
+
+
+ +
+ +
+
+ + block() + + +
+ + +
+

Remove user from all projects and set blocked attribute to true

+
+ + + + + + +
+ + +
+
# File app/roles/account.rb, line 59
+def block
+  users_projects.find_each do |membership|
+    return false unless membership.destroy
+  end
+
+  self.blocked = true
+  save
+end
+
+
+ +
+ +
+
+ + can?(action, subject) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/roles/account.rb, line 37
+def can? action, subject
+  abilities.allowed?(self, action, subject)
+end
+
+
+ +
+ +
+
+ + can_create_group?() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/roles/account.rb, line 25
+def can_create_group?
+  is_admin?
+end
+
+
+ +
+ +
+
+ + can_create_project?() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/roles/account.rb, line 21
+def can_create_project?
+  projects_limit > my_own_projects.count
+end
+
+
+ +
+ +
+
+ + cared_merge_requests() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/roles/account.rb, line 49
+def cared_merge_requests
+  MergeRequest.where("author_id = :id or assignee_id = :id", id: self.id)
+end
+
+
+ +
+ +
+
+ + first_name() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/roles/account.rb, line 45
+def first_name
+  name.split.first unless name.blank?
+end
+
+
+ +
+ +
+
+ + identifier() + + +
+ + +
+

Returns a string for use as a Gitolite user identifier

+ +

Note that Gitolite 2.x requires the following +pattern for users:

+ +
^@?[0-9a-zA-Z][0-9a-zA-Z._\@+-]*$
+
+ + + + + + +
+ + +
+
# File app/roles/account.rb, line 7
+def identifier
+  # Replace non-word chars with underscores, then make sure it starts with
+  # valid chars
+  email.gsub(%r\W/, '_').gsub(%r\A([\W\_])+/, '')
+end
+
+
+ +
+ +
+
+ + is_admin?() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/roles/account.rb, line 13
+def is_admin?
+  admin
+end
+
+
+ +
+ +
+
+ + last_activity_project() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/roles/account.rb, line 41
+def last_activity_project
+  projects.first
+end
+
+
+ +
+ +
+
+ + my_own_projects() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/roles/account.rb, line 121
+def my_own_projects
+  Project.personal(self)
+end
+
+
+ +
+ +
+
+ + namespace_id() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/roles/account.rb, line 105
+def namespace_id
+  namespace.try :id
+end
+
+
+ +
+ +
+
+ + namespaces() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/roles/account.rb, line 86
+def namespaces
+  namespaces = []
+
+  # Add user account namespace
+  namespaces << self.namespace if self.namespace
+
+  # Add groups you can manage
+  namespaces += if admin
+                  Group.all
+                else
+                  groups.all
+                end
+  namespaces
+end
+
+
+ +
+ +
+
+ + project_ids() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/roles/account.rb, line 53
+def project_ids
+  projects.map(&:id)
+end
+
+
+ +
+ +
+
+ + projects_limit_percent() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/roles/account.rb, line 68
+def projects_limit_percent
+  return 100 if projects_limit.zero?
+  (my_own_projects.count.to_f / projects_limit) * 100
+end
+
+
+ +
+ +
+
+ + projects_sorted_by_activity() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/roles/account.rb, line 82
+def projects_sorted_by_activity
+  projects.sorted_by_activity
+end
+
+
+ +
+ +
+
+ + recent_push(project_id = nil) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/roles/account.rb, line 73
+def recent_push project_id = nil
+  # Get push events not earlier than 2 hours ago
+  events = recent_events.code_push.where("created_at > ?", Time.now - 2.hours)
+  events = events.where(project_id: project_id) if project_id
+
+  # Take only latest one
+  events = events.recent.limit(1).first
+end
+
+
+ +
+ +
+
+ + require_ssh_key?() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/roles/account.rb, line 17
+def require_ssh_key?
+  keys.count == 0
+end
+
+
+ +
+ +
+
+ + several_namespaces?() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/roles/account.rb, line 101
+def several_namespaces?
+  namespaces.size > 1
+end
+
+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/ActiveRecord.html b/doc/code/classes/ActiveRecord.html new file mode 100644 index 00000000..fdf88c1c --- /dev/null +++ b/doc/code/classes/ActiveRecord.html @@ -0,0 +1,79 @@ + + + + + ActiveRecord + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/ActiveRecord/ConnectionAdapters.html b/doc/code/classes/ActiveRecord/ConnectionAdapters.html new file mode 100644 index 00000000..ec389166 --- /dev/null +++ b/doc/code/classes/ActiveRecord/ConnectionAdapters.html @@ -0,0 +1,86 @@ + + + + + ActiveRecord::ConnectionAdapters + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/ActiveRecord/ConnectionAdapters/Mysql2Adapter.html b/doc/code/classes/ActiveRecord/ConnectionAdapters/Mysql2Adapter.html new file mode 100644 index 00000000..2c8d740a --- /dev/null +++ b/doc/code/classes/ActiveRecord/ConnectionAdapters/Mysql2Adapter.html @@ -0,0 +1,167 @@ + + + + + ActiveRecord::ConnectionAdapters::Mysql2Adapter + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + +
Methods
+
+ +
E
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + +
Instance Public methods
+ +
+
+ + execute(*args) + + +
+ + +
+ +
+ + + +
+ Also aliased as: execute_without_retry +
+ + + + +
+ + +
+
# File config/initializers/connection_fix.rb, line 21
+def execute(*args)
+  execute_without_retry(*args)
+rescue ActiveRecord::StatementInvalid => e
+  if e.message =~ %rserver has gone away/
+    warn "Server timed out, retrying"
+    reconnect!
+    retry
+  else
+    raise e
+  end
+end
+
+
+ +
+ +
+
+ + execute_without_retry(*args) + + +
+ + +
+ +
+ + + + + +
+
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/ActiveRecord/ConnectionAdapters/PostgreSQLAdapter.html b/doc/code/classes/ActiveRecord/ConnectionAdapters/PostgreSQLAdapter.html new file mode 100644 index 00000000..0ee82105 --- /dev/null +++ b/doc/code/classes/ActiveRecord/ConnectionAdapters/PostgreSQLAdapter.html @@ -0,0 +1,191 @@ + + + + + ActiveRecord::ConnectionAdapters::PostgreSQLAdapter + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + +
Namespace
+ + + + + + +
Methods
+
+ +
A
+
+ +
+ +
C
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + +
Instance Public methods
+ +
+
+ + add_column_with_limit_filter(table_name, column_name, type, options = {}) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File config/initializers/postgresql_limit_fix.rb, line 13
+def add_column_with_limit_filter(table_name, column_name, type, options = {})
+  options.delete(:limit) if type == :text
+  add_column_without_limit_filter(table_name, column_name, type, options)
+end
+
+
+ +
+ +
+
+ + change_column_with_limit_filter(table_name, column_name, type, options = {}) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File config/initializers/postgresql_limit_fix.rb, line 18
+def change_column_with_limit_filter(table_name, column_name, type, options = {})
+  options.delete(:limit) if type == :text
+  change_column_without_limit_filter(table_name, column_name, type, options)
+end
+
+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/ActiveRecord/ConnectionAdapters/PostgreSQLAdapter/TableDefinition.html b/doc/code/classes/ActiveRecord/ConnectionAdapters/PostgreSQLAdapter/TableDefinition.html new file mode 100644 index 00000000..f2ea0db4 --- /dev/null +++ b/doc/code/classes/ActiveRecord/ConnectionAdapters/PostgreSQLAdapter/TableDefinition.html @@ -0,0 +1,135 @@ + + + + + ActiveRecord::ConnectionAdapters::PostgreSQLAdapter::TableDefinition + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + +
Methods
+
+ +
T
+
+
    + + +
  • + text +
  • + +
+
+ +
+ + + + + + + + + + + + + + + + + + + + +
Instance Public methods
+ +
+
+ + text(*args) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File config/initializers/postgresql_limit_fix.rb, line 4
+def text(*args)
+  options = args.extract_options!
+  options.delete(:limit)
+  column_names = args
+  type = :text
+  column_names.each { |name| column(name, type, options) }
+end
+
+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/ActivityObserver.html b/doc/code/classes/ActivityObserver.html new file mode 100644 index 00000000..31f4982e --- /dev/null +++ b/doc/code/classes/ActivityObserver.html @@ -0,0 +1,194 @@ + + + + + ActivityObserver + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + +
Methods
+
+ +
A
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + +
Instance Public methods
+ +
+
+ + after_create(record) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/observers/activity_observer.rb, line 4
+def after_create(record)
+  event_author_id = record.author_id
+
+  # Skip status notes
+  if record.kind_of?(Note) && record.note.include?("_Status changed to ")
+    return true
+  end
+
+  if event_author_id
+    Event.create(
+      project: record.project,
+      target_id: record.id,
+      target_type: record.class.name,
+      action: Event.determine_action(record),
+      author_id: event_author_id
+    )
+  end
+end
+
+
+ +
+ +
+
+ + after_save(record) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/observers/activity_observer.rb, line 23
+def after_save(record)
+  if record.changed.include?("closed") && record.author_id_of_changes
+    Event.create(
+      project: record.project,
+      target_id: record.id,
+      target_type: record.class.name,
+      action: (record.closed ? Event::Closed : Event::Reopened),
+      author_id: record.author_id_of_changes
+    )
+  end
+end
+
+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/Admin.html b/doc/code/classes/Admin.html new file mode 100644 index 00000000..ba82287d --- /dev/null +++ b/doc/code/classes/Admin.html @@ -0,0 +1,114 @@ + + + + + Admin + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/Admin/DashboardController.html b/doc/code/classes/Admin/DashboardController.html new file mode 100644 index 00000000..02643b7f --- /dev/null +++ b/doc/code/classes/Admin/DashboardController.html @@ -0,0 +1,139 @@ + + + + + Admin::DashboardController + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + +
Methods
+
+ +
I
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + +
Instance Public methods
+ +
+
+ + index() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/admin/dashboard_controller.rb, line 2
+def index
+  @projects = Project.order("created_at DESC").limit(10)
+  @users = User.order("created_at DESC").limit(10)
+
+  @resque_accessible = true
+  @workers = Resque.workers
+  @pending_jobs = Resque.size(:post_receive)
+
+rescue Redis::InheritedError
+  @resque_accessible = false
+end
+
+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/Admin/GroupsController.html b/doc/code/classes/Admin/GroupsController.html new file mode 100644 index 00000000..b3651e8b --- /dev/null +++ b/doc/code/classes/Admin/GroupsController.html @@ -0,0 +1,586 @@ + + + + + Admin::GroupsController + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + +
Methods
+
+ +
C
+
+ +
+ +
D
+
+ +
+ +
E
+
+
    + + +
  • + edit +
  • + +
+
+ +
I
+
+ +
+ +
N
+
+
    + + +
  • + new +
  • + +
+
+ +
P
+
+ +
+ +
R
+
+ +
+ +
S
+
+
    + + +
  • + show +
  • + +
+
+ +
U
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + +
Instance Public methods
+ +
+
+ + create() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/admin/groups_controller.rb, line 26
+def create
+  @group = Group.new(params[:group])
+  @group.path = @group.name.dup.parameterize if @group.name
+  @group.owner = current_user
+
+  if @group.save
+    redirect_to [:admin, @group], notice: 'Group was successfully created.'
+  else
+    render action: "new"
+  end
+end
+
+
+ +
+ +
+
+ + destroy() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/admin/groups_controller.rb, line 75
+def destroy
+  @group.truncate_teams
+
+  @group.destroy
+
+  redirect_to admin_groups_path, notice: 'Group was successfully deleted.'
+end
+
+
+ +
+ +
+
+ + edit() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/admin/groups_controller.rb, line 23
+def edit
+end
+
+
+ +
+ +
+
+ + index() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/admin/groups_controller.rb, line 4
+def index
+  @groups = Group.order('name ASC')
+  @groups = @groups.search(params[:name]) if params[:name].present?
+  @groups = @groups.page(params[:page]).per(20)
+end
+
+
+ +
+ +
+
+ + new() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/admin/groups_controller.rb, line 19
+def new
+  @group = Group.new
+end
+
+
+ +
+ +
+
+ + project_teams_update() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/admin/groups_controller.rb, line 70
+def project_teams_update
+  @group.add_users_to_project_teams(params[:user_ids], params[:project_access])
+  redirect_to [:admin, @group], notice: 'Users was successfully added.'
+end
+
+
+ +
+ +
+
+ + project_update() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/admin/groups_controller.rb, line 53
+def project_update
+  project_ids = params[:project_ids]
+
+  Project.where(id: project_ids).each do |project|
+    project.transfer(@group)
+  end
+
+  redirect_to :back, notice: 'Group was successfully updated.'
+end
+
+
+ +
+ +
+
+ + remove_project() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/admin/groups_controller.rb, line 63
+def remove_project
+  @project = Project.find(params[:project_id])
+  @project.transfer(nil)
+
+  redirect_to :back, notice: 'Group was successfully updated.'
+end
+
+
+ +
+ +
+
+ + show() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/admin/groups_controller.rb, line 10
+def show
+  @projects = Project.scoped
+  @projects = @projects.not_in_group(@group) if @group.projects.present?
+  @projects = @projects.all
+  @projects.reject!(&:empty_repo?)
+
+  @users = User.active
+end
+
+
+ +
+ +
+
+ + update() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/admin/groups_controller.rb, line 38
+def update
+  group_params = params[:group].dup
+  owner_id =group_params.delete(:owner_id)
+
+  if owner_id
+    @group.owner = User.find(owner_id)
+  end
+
+  if @group.update_attributes(group_params)
+    redirect_to [:admin, @group], notice: 'Group was successfully updated.'
+  else
+    render action: "edit"
+  end
+end
+
+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/Admin/HooksController.html b/doc/code/classes/Admin/HooksController.html new file mode 100644 index 00000000..1d56fbc7 --- /dev/null +++ b/doc/code/classes/Admin/HooksController.html @@ -0,0 +1,294 @@ + + + + + Admin::HooksController + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + +
Methods
+
+ +
C
+
+ +
+ +
D
+
+ +
+ +
I
+
+ +
+ +
T
+
+
    + + +
  • + test +
  • + +
+
+ +
+ + + + + + + + + + + + + + + + + + + + +
Instance Public methods
+ +
+
+ + create() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/admin/hooks_controller.rb, line 7
+def create
+  @hook = SystemHook.new(params[:hook])
+
+  if @hook.save
+    redirect_to admin_hooks_path, notice: 'Hook was successfully created.'
+  else
+    @hooks = SystemHook.all
+    render :index
+  end
+end
+
+
+ +
+ +
+
+ + destroy() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/admin/hooks_controller.rb, line 18
+def destroy
+  @hook = SystemHook.find(params[:id])
+  @hook.destroy
+
+  redirect_to admin_hooks_path
+end
+
+
+ +
+ +
+
+ + index() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/admin/hooks_controller.rb, line 2
+def index
+  @hooks = SystemHook.all
+  @hook = SystemHook.new
+end
+
+
+ +
+ +
+
+ + test() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/admin/hooks_controller.rb, line 26
+def test
+  @hook = SystemHook.find(params[:hook_id])
+  data = {
+    event_name: "project_create",
+    name: "Ruby",
+    path: "ruby",
+    project_id: 1,
+    owner_name: "Someone",
+    owner_email: "example@gitlabhq.com"
+  }
+  @hook.execute(data)
+
+  redirect_to :back
+end
+
+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/Admin/LogsController.html b/doc/code/classes/Admin/LogsController.html new file mode 100644 index 00000000..8782d95f --- /dev/null +++ b/doc/code/classes/Admin/LogsController.html @@ -0,0 +1,76 @@ + + + + + Admin::LogsController + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/Admin/ProjectsController.html b/doc/code/classes/Admin/ProjectsController.html new file mode 100644 index 00000000..1a0bd492 --- /dev/null +++ b/doc/code/classes/Admin/ProjectsController.html @@ -0,0 +1,436 @@ + + + + + Admin::ProjectsController + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + +
Methods
+
+ +
D
+
+ +
+ +
E
+
+
    + + +
  • + edit +
  • + +
+
+ +
I
+
+ +
+ +
P
+
+ +
+ +
S
+
+
    + + +
  • + show +
  • + +
+
+ +
T
+
+ +
+ +
U
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + +
Instance Public methods
+ +
+
+ + destroy() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/admin/projects_controller.rb, line 37
+def destroy
+  # Delete team first in order to prevent multiple gitolite calls
+  @project.truncate_team
+
+  @project.destroy
+
+  redirect_to admin_projects_path, notice: 'Project was successfully deleted.'
+end
+
+
+ +
+ +
+
+ + edit() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/admin/projects_controller.rb, line 18
+def edit
+end
+
+
+ +
+ +
+
+ + index() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/admin/projects_controller.rb, line 4
+def index
+  @projects = Project.scoped
+  @projects = @projects.where(namespace_id: params[:namespace_id]) if params[:namespace_id].present?
+  @projects = @projects.where(namespace_id: nil) if params[:namespace_id] == Namespace.global_id
+  @projects = @projects.search(params[:name]) if params[:name].present?
+  @projects = @projects.includes(:namespace).order("namespaces.path, projects.name ASC").page(params[:page]).per(20)
+end
+
+
+ +
+ +
+
+ + show() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/admin/projects_controller.rb, line 12
+def show
+  @users = User.active
+  @users = @users.not_in_project(@project) if @project.users.present?
+  @users = @users.all
+end
+
+
+ +
+ +
+
+ + team_update() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/admin/projects_controller.rb, line 21
+def team_update
+  @project.add_users_ids_to_team(params[:user_ids], params[:project_access])
+
+  redirect_to [:admin, @project], notice: 'Project was successfully updated.'
+end
+
+
+ +
+ +
+
+ + update() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/admin/projects_controller.rb, line 27
+def update
+  status = ProjectUpdateContext.new(project, current_user, params).execute(:admin)
+
+  if status
+    redirect_to [:admin, @project], notice: 'Project was successfully updated.'
+  else
+    render action: "edit"
+  end
+end
+
+
+ +
+ +
Instance Protected methods
+ +
+
+ + project() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/admin/projects_controller.rb, line 48
+def project
+  id = params[:project_id] || params[:id]
+
+  @project = Project.find_with_namespace(id)
+  @project || render_404
+end
+
+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/Admin/ResqueController.html b/doc/code/classes/Admin/ResqueController.html new file mode 100644 index 00000000..52cb2f87 --- /dev/null +++ b/doc/code/classes/Admin/ResqueController.html @@ -0,0 +1,130 @@ + + + + + Admin::ResqueController + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + +
Methods
+
+ +
S
+
+
    + + +
  • + show +
  • + +
+
+ +
+ + + + + + + + + + + + + + + + + + + + +
Instance Public methods
+ +
+
+ + show() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/admin/resque_controller.rb, line 2
+def show
+end
+
+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/Admin/TeamMembersController.html b/doc/code/classes/Admin/TeamMembersController.html new file mode 100644 index 00000000..b055f509 --- /dev/null +++ b/doc/code/classes/Admin/TeamMembersController.html @@ -0,0 +1,234 @@ + + + + + Admin::TeamMembersController + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + +
Methods
+
+ +
D
+
+ +
+ +
E
+
+
    + + +
  • + edit +
  • + +
+
+ +
U
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + +
Instance Public methods
+ +
+
+ + destroy() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/admin/team_members_controller.rb, line 16
+def destroy
+  @admin_team_member = UsersProject.find(params[:id])
+  @admin_team_member.destroy
+
+  redirect_to :back
+end
+
+
+ +
+ +
+
+ + edit() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/admin/team_members_controller.rb, line 2
+def edit
+  @admin_team_member = UsersProject.find(params[:id])
+end
+
+
+ +
+ +
+
+ + update() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/admin/team_members_controller.rb, line 6
+def update
+  @admin_team_member = UsersProject.find(params[:id])
+
+  if @admin_team_member.update_attributes(params[:team_member])
+    redirect_to [:admin, @admin_team_member.project],  notice: 'Project Access was successfully updated.'
+  else
+    render action: "edit"
+  end
+end
+
+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/Admin/UsersController.html b/doc/code/classes/Admin/UsersController.html new file mode 100644 index 00000000..cfe1e514 --- /dev/null +++ b/doc/code/classes/Admin/UsersController.html @@ -0,0 +1,616 @@ + + + + + Admin::UsersController + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + +
Methods
+
+ +
B
+
+ +
+ +
C
+
+ +
+ +
D
+
+ +
+ +
E
+
+
    + + +
  • + edit +
  • + +
+
+ +
I
+
+ +
+ +
N
+
+
    + + +
  • + new +
  • + +
+
+ +
S
+
+
    + + +
  • + show +
  • + +
+
+ +
T
+
+ +
+ +
U
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + +
Instance Public methods
+ +
+
+ + block() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/admin/users_controller.rb, line 40
+def block
+  @admin_user = User.find(params[:id])
+
+  if @admin_user.block
+    redirect_to :back, alert: "Successfully blocked"
+  else
+    redirect_to :back, alert: "Error occured. User was not blocked"
+  end
+end
+
+
+ +
+ +
+
+ + create() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/admin/users_controller.rb, line 60
+def create
+  admin = params[:user].delete("admin")
+
+  @admin_user = User.new(params[:user], as: :admin)
+  @admin_user.admin = (admin && admin.to_i > 0)
+
+  respond_to do |format|
+    if @admin_user.save
+      format.html { redirect_to [:admin, @admin_user], notice: 'User was successfully created.' }
+      format.json { render json: @admin_user, status: :created, location: @admin_user }
+    else
+      format.html { render action: "new" }
+      format.json { render json: @admin_user.errors, status: :unprocessable_entity }
+    end
+  end
+end
+
+
+ +
+ +
+
+ + destroy() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/admin/users_controller.rb, line 99
+def destroy
+  @admin_user = User.find(params[:id])
+  if @admin_user.my_own_projects.count > 0
+    redirect_to admin_users_path, alert: "User is a project owner and can't be removed." and return
+  end
+  @admin_user.destroy
+
+  respond_to do |format|
+    format.html { redirect_to admin_users_url }
+    format.json { head :ok }
+  end
+end
+
+
+ +
+ +
+
+ + edit() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/admin/users_controller.rb, line 36
+def edit
+  @admin_user = User.find(params[:id])
+end
+
+
+ +
+ +
+
+ + index() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/admin/users_controller.rb, line 2
+def index
+  @admin_users = User.scoped
+  @admin_users = @admin_users.filter(params[:filter])
+  @admin_users = @admin_users.search(params[:name]) if params[:name].present?
+  @admin_users = @admin_users.alphabetically.page(params[:page])
+end
+
+
+ +
+ +
+
+ + new() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/admin/users_controller.rb, line 32
+def new
+  @admin_user = User.new({ projects_limit: Gitlab.config.gitlab.default_projects_limit }, as: :admin)
+end
+
+
+ +
+ +
+
+ + show() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/admin/users_controller.rb, line 9
+def show
+  @admin_user = User.find(params[:id])
+
+  @projects = if @admin_user.projects.empty?
+             Project
+           else
+             Project.without_user(@admin_user)
+           end.all
+end
+
+
+ +
+ +
+
+ + team_update() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/admin/users_controller.rb, line 19
+def team_update
+  @admin_user = User.find(params[:id])
+
+  UsersProject.user_bulk_import(
+    @admin_user,
+    params[:project_ids],
+    params[:project_access]
+  )
+
+  redirect_to [:admin, @admin_user], notice: 'Teams were successfully updated.'
+end
+
+
+ +
+ +
+
+ + unblock() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/admin/users_controller.rb, line 50
+def unblock
+  @admin_user = User.find(params[:id])
+
+  if @admin_user.update_attribute(:blocked, false)
+    redirect_to :back, alert: "Successfully unblocked"
+  else
+    redirect_to :back, alert: "Error occured. User was not unblocked"
+  end
+end
+
+
+ +
+ +
+
+ + update() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/admin/users_controller.rb, line 77
+def update
+  admin = params[:user].delete("admin")
+
+  if params[:user][:password].blank?
+    params[:user].delete(:password)
+    params[:user].delete(:password_confirmation)
+  end
+
+  @admin_user = User.find(params[:id])
+  @admin_user.admin = (admin && admin.to_i > 0)
+
+  respond_to do |format|
+    if @admin_user.update_attributes(params[:user], as: :admin)
+      format.html { redirect_to [:admin, @admin_user], notice: 'User was successfully updated.' }
+      format.json { head :ok }
+    else
+      format.html { render action: "edit" }
+      format.json { render json: @admin_user.errors, status: :unprocessable_entity }
+    end
+  end
+end
+
+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/AdminController.html b/doc/code/classes/AdminController.html new file mode 100644 index 00000000..629a30fe --- /dev/null +++ b/doc/code/classes/AdminController.html @@ -0,0 +1,140 @@ + + + + + AdminController + + + + + + + + + + + + + +
+
+ +
+ +

Provides a base class for Admin controllers to +subclass

+ +

Automatically sets the layout and ensures an administrator is logged in

+ +
+ + + + + + + + + + + + + + + +
Methods
+
+ +
A
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + +
Instance Public methods
+ +
+
+ + authenticate_admin!() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/admin_controller.rb, line 8
+def authenticate_admin!
+  return render_404 unless current_user.is_admin?
+end
+
+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/ApplicationController.html b/doc/code/classes/ApplicationController.html new file mode 100644 index 00000000..f1c3bed9 --- /dev/null +++ b/doc/code/classes/ApplicationController.html @@ -0,0 +1,942 @@ + + + + + ApplicationController + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + +
Methods
+
+ +
A
+
+ +
+ +
C
+
+
    + + +
  • + can? +
  • + +
+
+ +
D
+
+ +
+ +
G
+
+ +
+ +
L
+
+ +
+ +
M
+
+ +
+ +
N
+
+ +
+ +
P
+
+ +
+ +
R
+
+ +
+ +
S
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + +
Instance Protected methods
+ +
+
+ + abilities() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/application_controller.rb, line 58
+def abilities
+  @abilities ||= Six.new
+end
+
+
+ +
+ +
+
+ + access_denied!() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/application_controller.rb, line 91
+def access_denied!
+  render "errors/access_denied", layout: "errors", status: 404
+end
+
+
+ +
+ +
+
+ + add_abilities() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/application_controller.rb, line 79
+def add_abilities
+  abilities << Ability
+end
+
+
+ +
+ +
+
+ + after_sign_in_path_for(resource) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/application_controller.rb, line 43
+def after_sign_in_path_for resource
+  if resource.is_a?(User) && resource.respond_to?(:blocked) && resource.blocked
+    sign_out resource
+    flash[:alert] = "Your account is blocked. Retry when an admin unblock it."
+    new_user_session_path
+  else
+    super
+  end
+end
+
+
+ +
+ +
+
+ + authorize_code_access!() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/application_controller.rb, line 87
+def authorize_code_access!
+  return access_denied! unless can?(current_user, :download_code, project)
+end
+
+
+ +
+ +
+
+ + authorize_project!(action) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/application_controller.rb, line 83
+def authorize_project!(action)
+  return access_denied! unless can?(current_user, action, project)
+end
+
+
+ +
+ +
+
+ + can?(object, action, subject) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/application_controller.rb, line 62
+def can?(object, action, subject)
+  abilities.allowed?(object, action, subject)
+end
+
+
+ +
+ +
+
+ + dev_tools() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/application_controller.rb, line 129
+def dev_tools
+  Rack::MiniProfiler.authorize_request
+end
+
+
+ +
+ +
+
+ + git_not_found!() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/application_controller.rb, line 99
+def git_not_found!
+  render "errors/git_not_found", layout: "errors", status: 404
+end
+
+
+ +
+ +
+
+ + log_exception(exception) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/application_controller.rb, line 29
+def log_exception(exception)
+  application_trace = ActionDispatch::ExceptionWrapper.new(env, exception).application_trace
+  application_trace.map!{ |t| "  #{t}\n" }
+  logger.error "\n#{exception.class.name} (#{exception.message}):\n#{application_trace.join}"
+end
+
+
+ +
+ +
+
+ + method_missing(method_sym, *arguments, &block) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/application_controller.rb, line 103
+def method_missing(method_sym, *arguments, &block)
+  if method_sym.to_s =~ %r^authorize_(.*)!$/
+    authorize_project!($1.to_sym)
+  else
+    super
+  end
+end
+
+
+ +
+ +
+
+ + no_cache_headers() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/application_controller.rb, line 123
+def no_cache_headers
+  response.headers["Cache-Control"] = "no-cache, no-store, max-age=0, must-revalidate"
+  response.headers["Pragma"] = "no-cache"
+  response.headers["Expires"] = "Fri, 01 Jan 1990 00:00:00 GMT"
+end
+
+
+ +
+ +
+
+ + not_found!() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/application_controller.rb, line 95
+def not_found!
+  render "errors/not_found", layout: "errors", status: 404
+end
+
+
+ +
+ +
+
+ + project() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/application_controller.rb, line 66
+def project
+  id = params[:project_id] || params[:id]
+
+  @project = Project.find_with_namespace(id)
+
+  if @project and can?(current_user, :read_project, @project)
+    @project
+  else
+    @project = nil
+    render_404
+  end
+end
+
+
+ +
+ +
+
+ + reject_blocked!() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/application_controller.rb, line 35
+def reject_blocked!
+  if current_user && current_user.blocked
+    sign_out current_user
+    flash[:alert] = "Your account is blocked. Retry when an admin unblock it."
+    redirect_to new_user_session_path
+  end
+end
+
+
+ +
+ +
+
+ + render_403() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/application_controller.rb, line 115
+def render_403
+  render file: Rails.root.join("public", "403"), layout: false, status: "403"
+end
+
+
+ +
+ +
+
+ + render_404() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/application_controller.rb, line 111
+def render_404
+  render file: Rails.root.join("public", "404"), layout: false, status: "404"
+end
+
+
+ +
+ +
+
+ + require_non_empty_project() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/application_controller.rb, line 119
+def require_non_empty_project
+  redirect_to @project if @project.empty_repo?
+end
+
+
+ +
+ +
+
+ + set_current_user_for_observers() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/application_controller.rb, line 53
+def set_current_user_for_observers
+  MergeRequestObserver.current_user = current_user
+  IssueObserver.current_user = current_user
+end
+
+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/ApplicationDecorator.html b/doc/code/classes/ApplicationDecorator.html new file mode 100644 index 00000000..348cf42a --- /dev/null +++ b/doc/code/classes/ApplicationDecorator.html @@ -0,0 +1,76 @@ + + + + + ApplicationDecorator + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/ApplicationHelper.html b/doc/code/classes/ApplicationHelper.html new file mode 100644 index 00000000..2c3a82bb --- /dev/null +++ b/doc/code/classes/ApplicationHelper.html @@ -0,0 +1,890 @@ + + + + + ApplicationHelper + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + +
Methods
+
+ +
A
+
+ +
+ +
C
+
+ +
+ +
E
+
+ +
+ +
G
+
+ +
+ +
H
+
+ +
+ +
L
+
+ +
+ +
P
+
+ +
+ +
R
+
+ +
+ +
S
+
+ +
+ +
U
+
+ +
+ +
W
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + +
Instance Public methods
+ +
+
+ + app_theme() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/helpers/application_helper.rb, line 130
+def app_theme
+  Gitlab::Theme.css_class_by_id(current_user.try(:theme_id))
+end
+
+
+ +
+ +
+
+ + authbutton(provider, size = 64) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/helpers/application_helper.rb, line 159
+def authbutton(provider, size = 64)
+  file_name = "#{provider.to_s.split('_').first}_#{size}.png"
+  image_tag("authbuttons/#{file_name}",
+            alt: "Sign in with #{provider.to_s.titleize}")
+end
+
+
+ +
+ +
+
+ + current_action?(*args) + + +
+ + +
+

Check if a partcular action is the current one

+ +

args - One or more action names to check

+ +

Examples

+ +
# On Projects#new
+current_action?(:new)           # => true
+current_action?(:create)        # => false
+current_action?(:new, :create)  # => true
+
+
+ + + + + + +
+ + +
+
# File app/helpers/application_helper.rb, line 30
+def current_action?(*args)
+  args.any? { |v| v.to_s.downcase == action_name }
+end
+
+
+ +
+ +
+
+ + current_controller?(*args) + + +
+ + +
+

Check if a particular controller is the current one

+ +

args - One or more controller names to check

+ +

Examples

+ +
# On TreeController
+current_controller?(:tree)           # => true
+current_controller?(:commits)        # => false
+current_controller?(:commits, :tree) # => true
+
+
+ + + + + + +
+ + +
+
# File app/helpers/application_helper.rb, line 16
+def current_controller?(*args)
+  args.any? { |v| v.to_s.downcase == controller.controller_name }
+end
+
+
+ +
+ +
+
+ + emoji_autocomplete_source() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/helpers/application_helper.rb, line 120
+def emoji_autocomplete_source
+  # should be an array of strings
+  # so to_s can be called, because it is sufficient and to_json is too slow
+  Emoji.names.to_s
+end
+
+
+ +
+ +
+
+ + gravatar_icon(user_email = '', size = nil) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/helpers/application_helper.rb, line 34
+def gravatar_icon(user_email = '', size = nil)
+  size = 40 if size.nil? || size <= 0
+
+  if !Gitlab.config.gravatar.enabled || user_email.blank?
+    'no_avatar.png'
+  else
+    gravatar_url = request.ssl? ? Gitlab.config.gravatar.ssl_url : Gitlab.config.gravatar.plain_url
+    user_email.strip!
+    sprintf(gravatar_url, {:hash => Digest::MD5.hexdigest(user_email.downcase), :email => URI.escape(user_email), :size => size})
+  end
+end
+
+
+ +
+ +
+
+ + grouped_options_refs(destination = :tree) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/helpers/application_helper.rb, line 64
+def grouped_options_refs(destination = :tree)
+  options = [
+    ["Branch", @project.branch_names ],
+    [ "Tag", @project.tag_names ]
+  ]
+
+  # If reference is commit id -
+  # we should add it to branch/tag selectbox
+  if(@ref && !options.flatten.include?(@ref) &&
+     @ref =~ %r^[0-9a-zA-Z]{6,52}$/)
+    options << ["Commit", [@ref]]
+  end
+
+  grouped_options_for_select(options, @ref || @project.default_branch)
+end
+
+
+ +
+ +
+
+ + hexdigest(string) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/helpers/application_helper.rb, line 146
+def hexdigest(string)
+  Digest::SHA1.hexdigest string
+end
+
+
+ +
+ +
+
+ + last_commit(project) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/helpers/application_helper.rb, line 54
+def last_commit(project)
+  if project.repo_exists?
+    time_ago_in_words(project.commit.committed_date) + " ago"
+  else
+    "Never"
+  end
+rescue
+  "Never"
+end
+
+
+ +
+ +
+
+ + ldap_enable?() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/helpers/application_helper.rb, line 126
+def ldap_enable?
+  Devise.omniauth_providers.include?(:ldap)
+end
+
+
+ +
+ +
+
+ + project_last_activity(project) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/helpers/application_helper.rb, line 150
+def project_last_activity project
+  activity = project.last_activity
+  if activity && activity.created_at
+    time_ago_in_words(activity.created_at) + " ago"
+  else
+    "Never"
+  end
+end
+
+
+ +
+ +
+
+ + request_protocol() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/helpers/application_helper.rb, line 46
+def request_protocol
+  request.ssl? ? "https" : "http"
+end
+
+
+ +
+ +
+
+ + search_autocomplete_source() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/helpers/application_helper.rb, line 80
+def search_autocomplete_source
+  projects = current_user.authorized_projects.map { |p| { label: p.name_with_namespace, url: project_path(p) } }
+  groups = current_user.authorized_groups.map { |group| { label: "<group> #{group.name}", url: group_path(group) } }
+
+  default_nav = [
+    { label: "My Profile", url: profile_path },
+    { label: "My SSH Keys", url: keys_path },
+    { label: "My Dashboard", url: root_path },
+    { label: "Admin Section", url: admin_root_path },
+  ]
+
+  help_nav = [
+    { label: "Workflow Help", url: help_workflow_path },
+    { label: "Permissions Help", url: help_permissions_path },
+    { label: "Web Hooks Help", url: help_web_hooks_path },
+    { label: "System Hooks Help", url: help_system_hooks_path },
+    { label: "API Help", url: help_api_path },
+    { label: "Markdown Help", url: help_markdown_path },
+    { label: "SSH Keys Help", url: help_ssh_path },
+    { label: "Gitlab Rake Tasks Help", url: help_raketasks_path },
+  ]
+
+  project_nav = []
+  if @project && !@project.new_record?
+    project_nav = [
+      { label: "#{@project.name} Issues",   url: project_issues_path(@project) },
+      { label: "#{@project.name} Commits",  url: project_commits_path(@project, @ref || @project.root_ref) },
+      { label: "#{@project.name} Merge Requests", url: project_merge_requests_path(@project) },
+      { label: "#{@project.name} Milestones", url: project_milestones_path(@project) },
+      { label: "#{@project.name} Snippets", url: project_snippets_path(@project) },
+      { label: "#{@project.name} Team",     url: project_team_index_path(@project) },
+      { label: "#{@project.name} Tree",     url: project_tree_path(@project, @ref || @project.root_ref) },
+      { label: "#{@project.name} Wall",     url: wall_project_path(@project) },
+      { label: "#{@project.name} Wiki",     url: project_wikis_path(@project) },
+    ]
+  end
+
+  [groups, projects, default_nav, project_nav, help_nav].flatten.to_json
+end
+
+
+ +
+ +
+
+ + show_last_push_widget?(event) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/helpers/application_helper.rb, line 138
+def show_last_push_widget?(event)
+  event &&
+    event.last_push_to_non_root? &&
+    !event.rm_ref? &&
+    event.project &&
+    event.project.merge_requests_enabled
+end
+
+
+ +
+ +
+
+ + user_color_scheme_class() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/helpers/application_helper.rb, line 134
+def user_color_scheme_class
+  current_user.dark_scheme ? :black : :white
+end
+
+
+ +
+ +
+
+ + web_app_url() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/helpers/application_helper.rb, line 50
+def web_app_url
+  "#{request_protocol}://#{Gitlab.config.gitlab.host}/"
+end
+
+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/AttachmentUploader.html b/doc/code/classes/AttachmentUploader.html new file mode 100644 index 00000000..79bc7c98 --- /dev/null +++ b/doc/code/classes/AttachmentUploader.html @@ -0,0 +1,132 @@ + + + + + AttachmentUploader + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + +
Methods
+
+ +
S
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + +
Instance Public methods
+ +
+
+ + store_dir() + + +
+ + +
+

Override the directory where uploaded files will be stored. This is a +sensible default for uploaders that are meant to be mounted:

+
+ + + + + + +
+ + +
+
# File app/uploaders/attachment_uploader.rb, line 15
+def store_dir
+  "uploads/#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}"
+end
+
+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/Authority.html b/doc/code/classes/Authority.html new file mode 100644 index 00000000..fc93f4be --- /dev/null +++ b/doc/code/classes/Authority.html @@ -0,0 +1,528 @@ + + + + + Authority + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + +
Methods
+
+ +
A
+
+ +
+ +
D
+
+ +
+ +
G
+
+ +
+ +
M
+
+ +
+ +
R
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + +
Instance Public methods
+ +
+
+ + add_access(user, *access) + + +
+ + +
+

Compatible with all access rights Should be rewrited for new access rights

+
+ + + + + + +
+ + +
+
# File app/roles/authority.rb, line 4
+def add_access(user, *access)
+  access = if access.include?(:admin)
+             { project_access: UsersProject::MASTER }
+           elsif access.include?(:write)
+             { project_access: UsersProject::DEVELOPER }
+           else
+             { project_access: UsersProject::REPORTER }
+           end
+  opts = { user: user }
+  opts.merge!(access)
+  users_projects.create(opts)
+end
+
+
+ +
+ +
+
+ + allow_read_for?(user) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/roles/authority.rb, line 39
+def allow_read_for?(user)
+  !users_projects.where(user_id: user.id).empty?
+end
+
+
+ +
+ +
+
+ + dev_access_for?(user) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/roles/authority.rb, line 51
+def dev_access_for?(user)
+  !users_projects.where(user_id: user.id, project_access: [UsersProject::DEVELOPER, UsersProject::MASTER]).empty?
+end
+
+
+ +
+ +
+
+ + guest_access_for?(user) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/roles/authority.rb, line 43
+def guest_access_for?(user)
+  !users_projects.where(user_id: user.id).empty?
+end
+
+
+ +
+ +
+
+ + master_access_for?(user) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/roles/authority.rb, line 55
+def master_access_for?(user)
+  !users_projects.where(user_id: user.id, project_access: [UsersProject::MASTER]).empty?
+end
+
+
+ +
+ +
+
+ + report_access_for?(user) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/roles/authority.rb, line 47
+def report_access_for?(user)
+  !users_projects.where(user_id: user.id, project_access: [UsersProject::REPORTER, UsersProject::DEVELOPER, UsersProject::MASTER]).empty?
+end
+
+
+ +
+ +
+
+ + repository_masters() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/roles/authority.rb, line 33
+def repository_masters
+  keys = Key.joins({user: :users_projects}).
+    where("users_projects.project_id = ? AND users_projects.project_access = ?", id, UsersProject::MASTER)
+  keys.map(&:identifier)
+end
+
+
+ +
+ +
+
+ + repository_readers() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/roles/authority.rb, line 21
+def repository_readers
+  keys = Key.joins({user: :users_projects}).
+    where("users_projects.project_id = ? AND users_projects.project_access = ?", id, UsersProject::REPORTER)
+  keys.map(&:identifier) + deploy_keys.map(&:identifier)
+end
+
+
+ +
+ +
+
+ + repository_writers() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/roles/authority.rb, line 27
+def repository_writers
+  keys = Key.joins({user: :users_projects}).
+    where("users_projects.project_id = ? AND users_projects.project_access = ?", id, UsersProject::DEVELOPER)
+  keys.map(&:identifier)
+end
+
+
+ +
+ +
+
+ + reset_access(user) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/roles/authority.rb, line 17
+def reset_access(user)
+  users_projects.where(project_id: self.id, user_id: user.id).destroy if self.id
+end
+
+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/BaseContext.html b/doc/code/classes/BaseContext.html new file mode 100644 index 00000000..3fbc76bf --- /dev/null +++ b/doc/code/classes/BaseContext.html @@ -0,0 +1,261 @@ + + + + + BaseContext + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + +
Methods
+
+ +
A
+
+ +
+ +
C
+
+
    + + +
  • + can? +
  • + +
+
+ +
N
+
+
    + + +
  • + new +
  • + +
+
+ +
+ + + + + + + + + + + + + + + + + +
Attributes
+ + + + + + + + + + + + + + + + + + + + +
+ [RW] + current_user
+ [RW] + params
+ [RW] + project
+ + + + + +
Class Public methods
+ +
+
+ + new(project, user, params) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/contexts/base_context.rb, line 4
+def initialize(project, user, params)
+  @project, @current_user, @params = project, user, params.dup
+end
+
+
+ +
+ +
Instance Public methods
+ +
+
+ + abilities() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/contexts/base_context.rb, line 8
+def abilities
+  @abilities ||= begin
+                   abilities = Six.new
+                   abilities << Ability
+                   abilities
+                 end
+end
+
+
+ +
+ +
+
+ + can?(object, action, subject) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/contexts/base_context.rb, line 16
+def can?(object, action, subject)
+  abilities.allowed?(object, action, subject)
+end
+
+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/BlameController.html b/doc/code/classes/BlameController.html new file mode 100644 index 00000000..2d641cb0 --- /dev/null +++ b/doc/code/classes/BlameController.html @@ -0,0 +1,152 @@ + + + + + BlameController + + + + + + + + + + + + + +
+
+ +
+ +

Controller for viewing a file’s blame

+ +
+ + + + + + + + + + + + + + + +
Methods
+
+ +
S
+
+
    + + +
  • + show +
  • + +
+
+ +
+ + + + +
Included Modules
+ + + + + + + + + + + + + + + + + + + +
Instance Public methods
+ +
+
+ + show() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/blame_controller.rb, line 12
+def show
+  @repo = @project.repo
+  @blame = Grit::Blob.blame(@repo, @commit.id, @path)
+end
+
+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/BlobController.html b/doc/code/classes/BlobController.html new file mode 100644 index 00000000..22df013f --- /dev/null +++ b/doc/code/classes/BlobController.html @@ -0,0 +1,160 @@ + + + + + BlobController + + + + + + + + + + + + + +
+
+ +
+ +

Controller for viewing a file’s blame

+ +
+ + + + + + + + + + + + + + + +
Methods
+
+ +
S
+
+
    + + +
  • + show +
  • + +
+
+ +
+ + + + +
Included Modules
+ + + + + + + + + + + + + + + + + + + +
Instance Public methods
+ +
+
+ + show() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/blob_controller.rb, line 12
+def show
+  if @tree.is_blob?
+    send_data(
+      @tree.data,
+      type: @tree.mime_type,
+      disposition: 'inline',
+      filename: @tree.name
+    )
+  else
+    not_found!
+  end
+end
+
+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/Commit.html b/doc/code/classes/Commit.html new file mode 100644 index 00000000..15369b89 --- /dev/null +++ b/doc/code/classes/Commit.html @@ -0,0 +1,1077 @@ + + + + + Commit + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + +
Methods
+
+ +
A
+
+ +
+ +
C
+
+ +
+ +
D
+
+ +
+ +
F
+
+ +
+ +
N
+
+
    + + +
  • + new +
  • + +
+
+ +
P
+
+ +
+ +
S
+
+ +
+ +
T
+
+ +
+ +
+ + + + +
Included Modules
+ + + + + + + + + + + + + +
Constants
+ + + + + + + + + + + + + + +
DIFF_SAFE_SIZE=100
 

Safe amount of files with diffs in one commit to render Used to prevent 500 +error on huge commits by suppressing diff

+ + + + + +
Attributes
+ + + + + + + + + + + + + + + + + + + + +
+ [RW] + commit
+ [RW] + head
+ [RW] + refs
+ + + + + +
Class Public methods
+ +
+
+ + commits(repo, ref, path = nil, limit = nil, offset = nil) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/commit.rb, line 62
+def commits(repo, ref, path = nil, limit = nil, offset = nil)
+  if path
+    repo.log(ref, path, max_count: limit, skip: offset)
+  elsif limit && offset
+    repo.commits(ref, limit, offset)
+  else
+    repo.commits(ref)
+  end.map{ |c| Commit.new(c) }
+end
+
+
+ +
+ +
+
+ + commits_between(repo, from, to) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/commit.rb, line 72
+def commits_between(repo, from, to)
+  repo.commits_between(from, to).map { |c| Commit.new(c) }
+end
+
+
+ +
+ +
+
+ + commits_since(repo, date) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/commit.rb, line 50
+def commits_since(repo, date)
+  commits = repo.heads.map do |h|
+    repo.log(h.name, nil, since: date).each { |c| Commit.new(c, h) }
+  end.flatten.uniq { |c| c.id }
+
+  commits.sort! do |x, y|
+    y.committed_date <=> x.committed_date
+  end
+
+  commits
+end
+
+
+ +
+ +
+
+ + commits_with_refs(repo, n = 20) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/commit.rb, line 40
+def commits_with_refs(repo, n = 20)
+  commits = repo.branches.map { |ref| Commit.new(ref.commit, ref) }
+
+  commits.sort! do |x, y|
+    y.committed_date <=> x.committed_date
+  end
+
+  commits[0..n]
+end
+
+
+ +
+ +
+
+ + compare(project, from, to) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/commit.rb, line 76
+def compare(project, from, to)
+  result = {
+    commits: [],
+    diffs: [],
+    commit: nil,
+    same: false
+  }
+
+  return result unless from && to
+
+  first = project.commit(to.try(:strip))
+  last = project.commit(from.try(:strip))
+
+  if first && last
+    result[:same] = (first.id == last.id)
+    result[:commits] = project.repo.commits_between(last.id, first.id).map {|c| Commit.new(c)}
+    result[:diffs] = project.repo.diff(last.id, first.id) rescue []
+    result[:commit] = Commit.new(first)
+  end
+
+  result
+end
+
+
+ +
+ +
+
+ + find_or_first(repo, commit_id = nil, root_ref) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/commit.rb, line 18
+def find_or_first(repo, commit_id = nil, root_ref)
+  commit = if commit_id
+             repo.commit(commit_id)
+           else
+             repo.commits(root_ref).first
+           end
+
+  Commit.new(commit) if commit
+end
+
+
+ +
+ +
+
+ + fresh_commits(repo, n = 10) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/commit.rb, line 28
+def fresh_commits(repo, n = 10)
+  commits = repo.heads.map do |h|
+    repo.commits(h.name, n).map { |c| Commit.new(c, h) }
+  end.flatten.uniq { |c| c.id }
+
+  commits.sort! do |x, y|
+    y.committed_date <=> x.committed_date
+  end
+
+  commits[0...n]
+end
+
+
+ +
+ +
+
+ + new(raw_commit, head = nil) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/commit.rb, line 100
+def initialize(raw_commit, head = nil)
+  @commit = raw_commit
+  @head = head
+end
+
+
+ +
+ +
Instance Public methods
+ +
+
+ + author_email() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/commit.rb, line 117
+def author_email
+  author.email
+end
+
+
+ +
+ +
+
+ + author_name() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/commit.rb, line 121
+def author_name
+  author.name
+end
+
+
+ +
+ +
+
+ + committer_email() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/commit.rb, line 134
+def committer_email
+  committer.email
+end
+
+
+ +
+ +
+
+ + committer_name() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/commit.rb, line 130
+def committer_name
+  committer.name
+end
+
+
+ +
+ +
+
+ + created_at() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/commit.rb, line 113
+def created_at
+  committed_date
+end
+
+
+ +
+ +
+
+ + different_committer?() + + +
+ + +
+

Was this commit committed by a different person than the original author?

+
+ + + + + + +
+ + +
+
# File app/models/commit.rb, line 126
+def different_committer?
+  author_name != committer_name || author_email != committer_email
+end
+
+
+ +
+ +
+
+ + parents_count() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/commit.rb, line 146
+def parents_count
+  parents && parents.count || 0
+end
+
+
+ +
+ +
+
+ + prev_commit() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/commit.rb, line 138
+def prev_commit
+  parents.try :first
+end
+
+
+ +
+ +
+
+ + prev_commit_id() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/commit.rb, line 142
+def prev_commit_id
+  prev_commit.try :id
+end
+
+
+ +
+ +
+
+ + safe_message() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/commit.rb, line 109
+def safe_message
+  @safe_message ||= message
+end
+
+
+ +
+ +
+
+ + short_id(length = 10) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/commit.rb, line 105
+def short_id(length = 10)
+  id.to_s[0..length]
+end
+
+
+ +
+ +
+
+ + to_diff() + + +
+ + +
+

Shows the diff between the commit’s parent and the commit.

+ +

Cuts out the header and stats from to_patch and returns only the diff.

+
+ + + + + + +
+ + +
+
# File app/models/commit.rb, line 153
+def to_diff
+  # see Grit::Commit#show
+  patch = to_patch
+
+  # discard lines before the diff
+  lines = patch.split("\n")
+  while !lines.first.start_with?("diff --git") do
+    lines.shift
+  end
+  lines.pop if lines.last =~ %r^[\d.]+$/ # Git version
+  lines.pop if lines.last == "-- "      # end of diff
+  lines.join("\n")
+end
+
+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/CommitController.html b/doc/code/classes/CommitController.html new file mode 100644 index 00000000..5f0bbe9e --- /dev/null +++ b/doc/code/classes/CommitController.html @@ -0,0 +1,160 @@ + + + + + CommitController + + + + + + + + + + + + + +
+
+ +
+ +

Controller for a specific Commit

+ +

Not to be confused with CommitsController, plural.

+ +
+ + + + + + + + + + + + + + + +
Methods
+
+ +
S
+
+
    + + +
  • + show +
  • + +
+
+ +
+ + + + + + + + + + + + + + + + + + + + +
Instance Public methods
+ +
+
+ + show() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/commit_controller.rb, line 10
+def show
+  result = CommitLoadContext.new(project, current_user, params).execute
+
+  @commit = result[:commit]
+  git_not_found! unless @commit
+
+  @suppress_diff    = result[:suppress_diff]
+  @note             = result[:note]
+  @line_notes       = result[:line_notes]
+  @notes_count      = result[:notes_count]
+  @comments_allowed = true
+
+  respond_to do |format|
+    format.html do
+      if result[:status] == :huge_commit
+        render "huge_commit" and return
+      end
+    end
+
+    format.diff  { render text: @commit.to_diff }
+    format.patch { render text: @commit.to_patch }
+  end
+end
+
+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/CommitDecorator.html b/doc/code/classes/CommitDecorator.html new file mode 100644 index 00000000..90630578 --- /dev/null +++ b/doc/code/classes/CommitDecorator.html @@ -0,0 +1,472 @@ + + + + + CommitDecorator + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + +
Methods
+
+ +
A
+
+ +
+ +
C
+
+ +
+ +
D
+
+ +
+ +
L
+
+ +
+ +
N
+
+ +
+ +
P
+
+ +
+ +
T
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + +
Instance Public methods
+ +
+ + + +
+

Returns a link to the commit author. If the author has a matching user and +is a member of the current @project it will link to the team member page. +Otherwise it will link to the author email as specified in the commit.

+ +

options:

+ +
avatar: true will prepend the avatar image
+size:   size of the avatar image in px
+
+ + + + + + +
+ + + +
+ +
+ +
+ + + +
+

Just like author_link but for +the committer.

+
+ + + + + + +
+ + + +
+ +
+ +
+
+ + description() + + +
+ + +
+

Returns the commits description

+ +

cut off, ellipses (`&hellp;`) are prepended to the commit message.

+
+ + + + + + +
+ + +
+
# File app/decorators/commit_decorator.rb, line 34
+def description
+  description = safe_message
+
+  title_end = description.index(%r\n/)
+  if (!title_end && description.length > 80) || (title_end && title_end > 80)
+    "&hellip;".html_safe << description[70..-1]
+  else
+    description.split(%r\n/, 2)[1].try(:chomp)
+  end
+end
+
+
+ +
+ +
+ + + +
+

Returns a string describing the commit for use in a link title

+ +

Example

+ +
"Commit: Alex Denisov - Project git clone panel"
+
+ + + + + + +
+ + + +
+ +
+ +
+
+ + title() + + +
+ + +
+

Returns the commits title.

+ +

Usually, the commit title is the first line of the commit message. In case +this first line is longer than 80 characters, it is cut off after 70 +characters and ellipses (`&hellp;`) are appended.

+
+ + + + + + +
+ + +
+
# File app/decorators/commit_decorator.rb, line 18
+def title
+  title = safe_message
+
+  return no_commit_message if title.blank?
+
+  title_end = title.index(%r\n/)
+  if (!title_end && title.length > 80) || (title_end && title_end > 80)
+    title[0..69] << "&hellip;".html_safe
+  else
+    title.split(%r\n/, 2).first
+  end
+end
+
+
+ +
+ +
Instance Protected methods
+ +
+
+ + no_commit_message() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/decorators/commit_decorator.rb, line 63
+def no_commit_message
+  "--no commit message"
+end
+
+
+ +
+ +
+ + + +
+

Private: Returns a link to a person. If the person has a matching user and +is a member of the current @project it will link to the team member page. +Otherwise it will link to the person email as specified in the commit.

+ +

options:

+ +
source: one of :author or :committer
+avatar: true will prepend the avatar image
+size:   size of the avatar image in px
+
+ + + + + + +
+ + + +
+ +
+
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/CommitLoadContext.html b/doc/code/classes/CommitLoadContext.html new file mode 100644 index 00000000..82c04feb --- /dev/null +++ b/doc/code/classes/CommitLoadContext.html @@ -0,0 +1,159 @@ + + + + + CommitLoadContext + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + +
Methods
+
+ +
E
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + +
Instance Public methods
+ +
+
+ + execute() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/contexts/commit_load_context.rb, line 2
+def execute
+  result = {
+    commit: nil,
+    suppress_diff: false,
+    line_notes: [],
+    notes_count: 0,
+    note: nil,
+    status: :ok
+  }
+
+  commit = project.commit(params[:id])
+
+  if commit
+    commit = CommitDecorator.decorate(commit)
+    line_notes = project.commit_line_notes(commit)
+
+    result[:commit] = commit
+    result[:note] = project.build_commit_note(commit)
+    result[:line_notes] = line_notes
+    result[:notes_count] = line_notes.count + project.commit_notes(commit).count
+
+    begin
+      result[:suppress_diff] = true if commit.diffs.size > Commit::DIFF_SAFE_SIZE && !params[:force_show_diff]
+    rescue Grit::Git::GitTimeout
+      result[:suppress_diff] = true
+      result[:status] = :huge_commit
+    end
+  end
+
+  result
+end
+
+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/CommitsController.html b/doc/code/classes/CommitsController.html new file mode 100644 index 00000000..53d32967 --- /dev/null +++ b/doc/code/classes/CommitsController.html @@ -0,0 +1,155 @@ + + + + + CommitsController + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + +
Methods
+
+ +
S
+
+
    + + +
  • + show +
  • + +
+
+ +
+ + + + +
Included Modules
+ + + + + + + + + + + + + + + + + + + +
Instance Public methods
+ +
+
+ + show() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/commits_controller.rb, line 11
+def show
+  @repo = @project.repo
+  @limit, @offset = (params[:limit] || 40), (params[:offset] || 0)
+
+  @commits = @project.commits(@ref, @path, @limit, @offset)
+  @commits = CommitDecorator.decorate(@commits)
+
+  respond_to do |format|
+    format.html # index.html.erb
+    format.js
+    format.atom { render layout: false }
+  end
+end
+
+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/CommitsHelper.html b/doc/code/classes/CommitsHelper.html new file mode 100644 index 00000000..4e4addfb --- /dev/null +++ b/doc/code/classes/CommitsHelper.html @@ -0,0 +1,409 @@ + + + + + CommitsHelper + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + +
Methods
+
+ +
B
+
+ +
+ +
C
+
+ +
+ +
D
+
+ +
+ +
E
+
+ +
+ +
I
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + +
Instance Public methods
+ +
+
+ + build_line_anchor(index, line_new, line_old) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/helpers/commits_helper.rb, line 12
+def build_line_anchor(index, line_new, line_old)
+  "#{index}_#{line_old}_#{line_new}"
+end
+
+
+ +
+ +
+
+ + commit_to_html(commit) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/helpers/commits_helper.rb, line 68
+def commit_to_html commit
+  if commit.model
+    escape_javascript(render 'commits/commit', commit: commit)
+  end
+end
+
+
+ +
+ +
+
+ + diff_line_content(line) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/helpers/commits_helper.rb, line 74
+def diff_line_content(line)
+  if line.blank?
+    " &nbsp;"
+  else
+    line
+  end
+end
+
+
+ +
+ +
+
+ + each_diff_line(diff_arr, index) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/helpers/commits_helper.rb, line 16
+def each_diff_line(diff_arr, index)
+  line_old = 1
+  line_new = 1
+  type = nil
+
+  lines_arr = ::Gitlab::InlineDiff.processing diff_arr
+  lines_arr.each do |line|
+    next if line.match(%r^\-\-\- \/dev\/null/)
+    next if line.match(%r^\+\+\+ \/dev\/null/)
+    next if line.match(%r^\-\-\- a/)
+    next if line.match(%r^\+\+\+ b/)
+
+    full_line = html_escape(line.gsub(%r\n/, ''))
+    full_line = ::Gitlab::InlineDiff.replace_markers full_line
+
+    if line.match(%r^@@ -/)
+      type = "match"
+
+      line_old = line.match(%r\-[0-9]*/)[0].to_i.abs rescue 0
+      line_new = line.match(%r\+[0-9]*/)[0].to_i.abs rescue 0
+
+      next if line_old == 1 && line_new == 1 #top of file
+      yield(full_line, type, nil, nil, nil)
+      next
+    else
+      type = identification_type(line)
+      line_code = build_line_anchor(index, line_new, line_old)
+      yield(full_line, type, line_code, line_new, line_old)
+    end
+
+
+    if line[0] == "+"
+      line_new += 1
+    elsif line[0] == "-"
+      line_old += 1
+    else
+      line_new += 1
+      line_old += 1
+    end
+  end
+end
+
+
+ +
+ +
+
+ + identification_type(line) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/helpers/commits_helper.rb, line 2
+def identification_type(line)
+  if line[0] == "+"
+    "new"
+  elsif line[0] == "-"
+    "old"
+  else
+    nil
+  end
+end
+
+
+ +
+ +
+
+ + image_diff_class(diff) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/helpers/commits_helper.rb, line 58
+def image_diff_class(diff)
+  if diff.deleted_file
+    "diff_removed"
+  elsif diff.new_file
+    "diff_added"
+  else
+    nil
+  end
+end
+
+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/CompareController.html b/doc/code/classes/CompareController.html new file mode 100644 index 00000000..3db60f96 --- /dev/null +++ b/doc/code/classes/CompareController.html @@ -0,0 +1,232 @@ + + + + + CompareController + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + +
Methods
+
+ +
C
+
+ +
+ +
I
+
+ +
+ +
S
+
+
    + + +
  • + show +
  • + +
+
+ +
+ + + + + + + + + + + + + + + + + + + + +
Instance Public methods
+ +
+
+ + create() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/compare_controller.rb, line 22
+def create
+  redirect_to project_compare_path(@project, params[:from], params[:to])
+end
+
+
+ +
+ +
+
+ + index() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/compare_controller.rb, line 7
+def index
+end
+
+
+ +
+ +
+
+ + show() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/compare_controller.rb, line 10
+def show
+  result = Commit.compare(project, params[:from], params[:to])
+
+  @commits       = result[:commits]
+  @commit        = result[:commit]
+  @diffs         = result[:diffs]
+  @refs_are_same = result[:same]
+  @line_notes    = []
+
+  @commits = CommitDecorator.decorate(@commits)
+end
+
+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/DashboardController.html b/doc/code/classes/DashboardController.html new file mode 100644 index 00000000..ae8b126d --- /dev/null +++ b/doc/code/classes/DashboardController.html @@ -0,0 +1,411 @@ + + + + + DashboardController + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + +
Methods
+
+ +
D
+
+ +
+ +
E
+
+ +
+ +
I
+
+ +
+ +
M
+
+ +
+ +
P
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + +
Instance Public methods
+ +
+
+ + index() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/dashboard_controller.rb, line 7
+def index
+  @groups = current_user.authorized_groups
+
+  @has_authorized_projects = @projects.count > 0
+
+  @projects = case params[:scope]
+              when 'personal' then
+                @projects.personal(current_user)
+              when 'joined' then
+                @projects.joined(current_user)
+              else
+                @projects
+              end
+
+  @projects = @projects.page(params[:page]).per(30)
+
+  @events = Event.in_projects(current_user.project_ids)
+  @events = @event_filter.apply_filter(@events)
+  @events = @events.limit(20).offset(params[:offset] || 0)
+
+  @last_push = current_user.recent_push
+
+  respond_to do |format|
+    format.html
+    format.js
+    format.atom { render layout: false }
+  end
+end
+
+
+ +
+ +
+
+ + issues() + + +
+ + +
+

Get only assigned issues

+
+ + + + + + +
+ + +
+
# File app/controllers/dashboard_controller.rb, line 44
+def issues
+  @issues = current_user.assigned_issues
+  @issues = dashboard_filter(@issues)
+  @issues = @issues.recent.page(params[:page]).per(20)
+  @issues = @issues.includes(:author, :project)
+
+  respond_to do |format|
+    format.html
+    format.atom { render layout: false }
+  end
+end
+
+
+ +
+ +
+
+ + merge_requests() + + +
+ + +
+

Get authored or assigned open merge requests

+
+ + + + + + +
+ + +
+
# File app/controllers/dashboard_controller.rb, line 37
+def merge_requests
+  @merge_requests = current_user.cared_merge_requests
+  @merge_requests = dashboard_filter(@merge_requests)
+  @merge_requests = @merge_requests.recent.page(params[:page]).per(20)
+end
+
+
+ +
+ +
Instance Protected methods
+ +
+
+ + dashboard_filter(items) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/dashboard_controller.rb, line 66
+def dashboard_filter items
+  if params[:project_id]
+    items = items.where(project_id: params[:project_id])
+  end
+
+  if params[:search].present?
+    items = items.search(params[:search])
+  end
+
+  case params[:status]
+  when 'closed'
+    items.closed
+  when 'all'
+    items
+  else
+    items.opened
+  end
+end
+
+
+ +
+ +
+
+ + event_filter() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/dashboard_controller.rb, line 62
+def event_filter
+  @event_filter ||= EventFilter.new(params[:event_filter])
+end
+
+
+ +
+ +
+
+ + projects() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/dashboard_controller.rb, line 58
+def projects
+  @projects = current_user.authorized_projects.sorted_by_activity
+end
+
+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/DashboardHelper.html b/doc/code/classes/DashboardHelper.html new file mode 100644 index 00000000..6fcb426c --- /dev/null +++ b/doc/code/classes/DashboardHelper.html @@ -0,0 +1,195 @@ + + + + + DashboardHelper + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + +
Methods
+
+ +
D
+
+ +
+ +
E
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + +
Instance Public methods
+ +
+
+ + dashboard_filter_path(entity, options={}) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/helpers/dashboard_helper.rb, line 2
+def dashboard_filter_path(entity, options={})
+  exist_opts = {
+    status: params[:status],
+    project_id: params[:project_id],
+  }
+
+  options = exist_opts.merge(options)
+
+  case entity
+  when 'issue' then
+    dashboard_issues_path(options)
+  when 'merge_request'
+    dashboard_merge_requests_path(options)
+  end
+end
+
+
+ +
+ +
+
+ + entities_per_project(project, entity) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/helpers/dashboard_helper.rb, line 18
+def entities_per_project project, entity
+  items = project.items_for(entity)
+
+  items = case params[:status]
+          when 'closed'
+            items.closed
+          when 'all'
+            items
+          else
+            items.opened
+          end
+
+  items.where(assignee_id: current_user.id).count
+end
+
+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/DeployKeysController.html b/doc/code/classes/DeployKeysController.html new file mode 100644 index 00000000..952d295c --- /dev/null +++ b/doc/code/classes/DeployKeysController.html @@ -0,0 +1,332 @@ + + + + + DeployKeysController + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + +
Methods
+
+ +
C
+
+ +
+ +
D
+
+ +
+ +
I
+
+ +
+ +
N
+
+
    + + +
  • + new +
  • + +
+
+ +
S
+
+
    + + +
  • + show +
  • + +
+
+ +
+ + + + + + + + + + + + + + + + + + + + +
Instance Public methods
+ +
+
+ + create() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/deploy_keys_controller.rb, line 21
+def create
+  @key = @project.deploy_keys.new(params[:key])
+  if @key.save
+    redirect_to project_deploy_keys_path(@project)
+  else
+    render "new"
+  end
+end
+
+
+ +
+ +
+
+ + destroy() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/deploy_keys_controller.rb, line 30
+def destroy
+  @key = @project.deploy_keys.find(params[:id])
+  @key.destroy
+
+  respond_to do |format|
+    format.html { redirect_to project_deploy_keys_url }
+    format.js { render nothing: true }
+  end
+end
+
+
+ +
+ +
+
+ + index() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/deploy_keys_controller.rb, line 7
+def index
+  @keys = @project.deploy_keys.all
+end
+
+
+ +
+ +
+
+ + new() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/deploy_keys_controller.rb, line 15
+def new
+  @key = @project.deploy_keys.new
+
+  respond_with(@key)
+end
+
+
+ +
+ +
+
+ + show() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/deploy_keys_controller.rb, line 11
+def show
+  @key = @project.deploy_keys.find(params[:id])
+end
+
+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/ErrorsController.html b/doc/code/classes/ErrorsController.html new file mode 100644 index 00000000..b03cc04c --- /dev/null +++ b/doc/code/classes/ErrorsController.html @@ -0,0 +1,131 @@ + + + + + ErrorsController + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + +
Methods
+
+ +
G
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + +
Instance Public methods
+ +
+
+ + githost() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/errors_controller.rb, line 2
+def githost
+  render "errors/gitolite"
+end
+
+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/Event.html b/doc/code/classes/Event.html new file mode 100644 index 00000000..608db599 --- /dev/null +++ b/doc/code/classes/Event.html @@ -0,0 +1,1266 @@ + + + + + Event + + + + + + + + + + + + + +
+
+ +
+ +

Schema Information

+ +

Table name: events

+ +
id          :integer          not null, primary key
+target_type :string(255)
+target_id   :integer
+title       :string(255)
+data        :text
+project_id  :integer
+created_at  :datetime         not null
+updated_at  :datetime         not null
+action      :integer
+author_id   :integer
+ +
+ + + + + + + + + + + + + + + +
Methods
+
+ +
A
+
+ +
+ +
C
+
+ +
+ +
D
+
+ +
+ +
I
+
+ +
+ +
J
+
+ +
+ +
L
+
+ +
+ +
M
+
+ +
+ +
N
+
+ +
+ +
P
+
+ +
+ +
R
+
+ +
+ +
T
+
+ +
+ +
+ + + + +
Included Modules
+ + + + + + + + + + + + + +
Constants
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Created=1
 
Updated=2
 
Closed=3
 
Reopened=4
 
Pushed=5
 
Commented=6
 
Merged=7
 
Joined=8
 
Left=9
 
+ + + + + + + + +
Class Public methods
+ +
+
+ + determine_action(record) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/event.rb, line 53
+def determine_action(record)
+  if [Issue, MergeRequest].include? record.class
+    Event::Created
+  elsif record.kind_of? Note
+    Event::Commented
+  end
+end
+
+
+ +
+ +
Instance Public methods
+ +
+
+ + action_name() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/event.rb, line 160
+def action_name
+  if closed?
+    "closed"
+  elsif merged?
+    "merged"
+  elsif joined?
+    'joined'
+  elsif left?
+    'left'
+  else
+    "opened"
+  end
+end
+
+
+ +
+ +
+
+ + author() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/event.rb, line 156
+def author
+  @author ||= User.find(author_id)
+end
+
+
+ +
+ +
+
+ + changed_issue?() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/event.rb, line 131
+def changed_issue?
+  target_type == "Issue" &&
+    [Closed, Reopened].include?(action)
+end
+
+
+ +
+ +
+
+ + changed_merge_request?() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/event.rb, line 126
+def changed_merge_request?
+  target_type == "MergeRequest" &&
+    [Closed, Reopened].include?(action)
+end
+
+
+ +
+ +
+
+ + closed?() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/event.rb, line 92
+def closed?
+  action == self.class::Closed
+end
+
+
+ +
+ +
+
+ + issue() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/event.rb, line 148
+def issue
+  target if target_type == "Issue"
+end
+
+
+ +
+ +
+
+ + issue?() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/event.rb, line 108
+def issue?
+  target_type == "Issue"
+end
+
+
+ +
+ +
+
+ + joined?() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/event.rb, line 136
+def joined?
+  action == Joined
+end
+
+
+ +
+ +
+
+ + left?() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/event.rb, line 140
+def left?
+  action == Left
+end
+
+
+ +
+ +
+
+ + membership_changed?() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/event.rb, line 144
+def membership_changed?
+  joined? || left?
+end
+
+
+ +
+ +
+
+ + merge_request() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/event.rb, line 152
+def merge_request
+  target if target_type == "MergeRequest"
+end
+
+
+ +
+ +
+
+ + merge_request?() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/event.rb, line 112
+def merge_request?
+  target_type == "MergeRequest"
+end
+
+
+ +
+ +
+
+ + merged?() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/event.rb, line 88
+def merged?
+  action == self.class::Merged
+end
+
+
+ +
+ +
+
+ + milestone?() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/event.rb, line 100
+def milestone?
+  target_type == "Milestone"
+end
+
+
+ +
+ +
+
+ + new_issue?() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/event.rb, line 116
+def new_issue?
+  target_type == "Issue" &&
+    action == Created
+end
+
+
+ +
+ +
+
+ + new_merge_request?() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/event.rb, line 121
+def new_merge_request?
+  target_type == "MergeRequest" &&
+    action == Created
+end
+
+
+ +
+ +
+
+ + note?() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/event.rb, line 104
+def note?
+  target_type == "Note"
+end
+
+
+ +
+ +
+
+ + project_name() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/event.rb, line 72
+def project_name
+  if project
+    project.name
+  else
+    "(deleted project)"
+  end
+end
+
+
+ +
+ +
+
+ + proper?() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/event.rb, line 62
+def proper?
+  if push?
+    true
+  elsif membership_changed?
+    true
+  else
+    (issue? || merge_request? || note? || milestone?) && target
+  end
+end
+
+
+ +
+ +
+
+ + push?() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/event.rb, line 84
+def push?
+  action == self.class::Pushed && valid_push?
+end
+
+
+ +
+ +
+
+ + reopened?() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/event.rb, line 96
+def reopened?
+  action == self.class::Reopened
+end
+
+
+ +
+ +
+
+ + target_title() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/event.rb, line 80
+def target_title
+  target.try :title
+end
+
+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/EventDecorator.html b/doc/code/classes/EventDecorator.html new file mode 100644 index 00000000..1fdf7f5c --- /dev/null +++ b/doc/code/classes/EventDecorator.html @@ -0,0 +1,240 @@ + + + + + EventDecorator + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + +
Methods
+
+ +
F
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + +
Instance Public methods
+ +
+
+ + feed_summary() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/decorators/event_decorator.rb, line 37
+def feed_summary
+  if self.issue?
+    h.render "events/event_issue", issue: self.issue
+  elsif self.push?
+    h.render "events/event_push", event: self
+  end
+end
+
+
+ +
+ +
+
+ + feed_title() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/decorators/event_decorator.rb, line 4
+def feed_title
+  if self.issue?
+    "#{self.author_name} #{self.action_name} issue ##{self.target_id}: #{self.issue_title} at #{self.project.name}"
+  elsif self.merge_request?
+    "#{self.author_name} #{self.action_name} MR ##{self.target_id}: #{self.merge_request_title} at #{self.project.name}"
+  elsif self.push?
+    "#{self.author_name} #{self.push_action_name} #{self.ref_type} #{self.ref_name} at #{self.project.name}"
+  elsif self.membership_changed?
+    "#{self.author_name} #{self.action_name} #{self.project.name}"
+  else
+    ""
+  end
+end
+
+
+ +
+ +
+
+ + feed_url() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/decorators/event_decorator.rb, line 18
+def feed_url
+  if self.issue?
+    h.project_issue_url(self.project, self.issue)
+  elsif self.merge_request?
+    h.project_merge_request_url(self.project, self.merge_request)
+
+  elsif self.push?
+    if self.push_with_commits?
+      if self.commits_count > 1
+        h.project_compare_url(self.project, :from => self.parent_commit.id, :to => self.last_commit.id)
+      else
+        h.project_commit_url(self.project, :id => self.last_commit.id)
+      end
+    else
+      h.project_commits_url(self.project, self.ref_name)
+    end
+  end
+end
+
+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/EventFilter.html b/doc/code/classes/EventFilter.html new file mode 100644 index 00000000..5bf01133 --- /dev/null +++ b/doc/code/classes/EventFilter.html @@ -0,0 +1,543 @@ + + + + + EventFilter + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + +
Methods
+
+ +
A
+
+ +
+ +
C
+
+ +
+ +
D
+
+ +
+ +
M
+
+ +
+ +
N
+
+
    + + +
  • + new +
  • + +
+
+ +
O
+
+ +
+ +
P
+
+
    + + +
  • + push +
  • + +
+
+ +
T
+
+
    + + +
  • + team +
  • + +
+
+ +
+ + + + + + + + + + + + + + + + + +
Attributes
+ + + + + + + + +
+ [RW] + params
+ + + + + +
Class Public methods
+ +
+
+ + comments() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File lib/event_filter.rb, line 17
+def comments
+  'comments'
+end
+
+
+ +
+ +
+
+ + default_filter() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File lib/event_filter.rb, line 5
+def default_filter
+  %w{ push issues merge_requests team}
+end
+
+
+ +
+ +
+
+ + merged() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File lib/event_filter.rb, line 13
+def merged
+  'merged'
+end
+
+
+ +
+ +
+
+ + new(params) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File lib/event_filter.rb, line 26
+def initialize params
+  @params = if params
+              params.dup
+            else
+              []#EventFilter.default_filter
+            end
+end
+
+
+ +
+ +
+
+ + push() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File lib/event_filter.rb, line 9
+def push
+  'push'
+end
+
+
+ +
+ +
+
+ + team() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File lib/event_filter.rb, line 21
+def team
+  'team'
+end
+
+
+ +
+ +
Instance Public methods
+ +
+
+ + active?(key) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File lib/event_filter.rb, line 65
+def active? key
+  params.include? key
+end
+
+
+ +
+ +
+
+ + apply_filter(events) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File lib/event_filter.rb, line 34
+def apply_filter events
+  return events unless params.present?
+
+  filter = params.dup
+
+  actions = []
+  actions << Event::Pushed if filter.include? 'push'
+  actions << Event::Merged if filter.include? 'merged'
+
+  if filter.include? 'team'
+    actions << Event::Joined
+    actions << Event::Left
+  end
+
+  actions << Event::Commented if filter.include? 'comments'
+
+  events = events.where(action: actions)
+end
+
+
+ +
+ +
+
+ + options(key) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File lib/event_filter.rb, line 53
+def options key
+  filter = params.dup
+
+  if filter.include? key
+    filter.delete key
+  else
+    filter << key
+  end
+
+  filter
+end
+
+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/EventsHelper.html b/doc/code/classes/EventsHelper.html new file mode 100644 index 00000000..7c7041c6 --- /dev/null +++ b/doc/code/classes/EventsHelper.html @@ -0,0 +1,289 @@ + + + + + EventsHelper + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + +
Methods
+
+ +
E
+
+ +
+ +
L
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + +
Instance Public methods
+ +
+
+ + event_action_name(event) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/helpers/events_helper.rb, line 13
+def event_action_name(event)
+  target = if event.target_type
+             event.target_type.titleize.downcase
+           else
+             'project'
+           end
+
+  [event.action_name, target].join(" ")
+end
+
+
+ +
+ +
+ + + +
+ +
+ + + + + + +
+ + + +
+ +
+ +
+
+ + event_image(event) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/helpers/events_helper.rb, line 23
+def event_image event
+  event_image_path = if event.push?
+                 "event_push.png"
+               elsif event.merged?
+                 "event_mr_merged.png"
+               end
+
+  return nil unless event_image_path
+
+  content_tag :div, class: 'event_icon' do
+    image_tag event_image_path
+  end
+end
+
+
+ +
+ +
+ + + +
+ +
+ + + + + + +
+ + + +
+ +
+
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/ExtractsPath.html b/doc/code/classes/ExtractsPath.html new file mode 100644 index 00000000..0b8c0c26 --- /dev/null +++ b/doc/code/classes/ExtractsPath.html @@ -0,0 +1,300 @@ + + + + + ExtractsPath + + + + + + + + + + + + + +
+
+ +
+ +

Module providing methods for dealing with separating a tree-ish string and +a file path string when combined in a request parameter

+ +
+ + + + + + + + + + + + +
Namespace
+ + + + + + +
Methods
+
+ +
A
+
+ +
+ +
E
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + +
Instance Public methods
+ +
+
+ + assign_ref_vars() + + +
+ + +
+

Assigns common instance variables for views working with Git tree-ish +objects

+ +

Assignments are:

+
  • +

    @id - A string representing the joined ref and path

    +
  • +

    @ref - A string representing the ref (e.g., the branch, tag, or commit +SHA)

    +
  • +

    @path - A string representing the filesystem path

    +
  • +

    @commit - A CommitDecorator representing +the commit from the given ref

    +
  • +

    @tree - A TreeDecorator representing the +tree at the given ref/path

    +
+ +

If the :id parameter appears to be requesting a specific response format, +that will be handled as well.

+ +

Automatically renders `not_found!` if a valid tree path could not be +resolved (e.g., when a user inserts an invalid path or ref).

+
+ + + + + + +
+ + +
+
# File lib/extracts_path.rb, line 104
+def assign_ref_vars
+  # Handle formats embedded in the id
+  if params[:id].ends_with?('.atom')
+    params[:id].gsub!(%r\.atom$/, '')
+    request.format = :atom
+  end
+
+  @ref, @path = extract_ref(request.fullpath)
+
+  @id = File.join(@ref, @path)
+
+  @commit = CommitDecorator.decorate(@project.commit(@ref))
+
+  @tree = Tree.new(@commit.tree, @project, @ref, @path)
+  @tree = TreeDecorator.new(@tree)
+
+  raise InvalidPathError if @tree.invalid?
+rescue NoMethodError, InvalidPathError
+  not_found!
+end
+
+
+ +
+ +
+
+ + extract_ref(input) + + +
+ + +
+

Given a string containing both a Git tree-ish, such as a branch or tag, and +a filesystem path joined by forward slashes, attempts to separate the two.

+ +

Expects a @project instance variable to contain the active project. This is +used to check the input against a list of valid repository refs.

+ +

Examples

+ +
# No @project available
+extract_ref('master')
+# => ['', '']
+
+extract_ref('master')
+# => ['master', '']
+
+extract_ref("f4b14494ef6abf3d144c28e4af0c20143383e062/CHANGELOG")
+# => ['f4b14494ef6abf3d144c28e4af0c20143383e062', 'CHANGELOG']
+
+extract_ref("v2.0.0/README.md")
+# => ['v2.0.0', 'README.md']
+
+extract_ref('/gitlab/vagrant/tree/master/app/models/project.rb')
+# => ['master', 'app/models/project.rb']
+
+extract_ref('issues/1234/app/models/project.rb')
+# => ['issues/1234', 'app/models/project.rb']
+
+# Given an invalid branch, we fall back to just splitting on the first slash
+extract_ref('non/existent/branch/README.md')
+# => ['non', 'existent/branch/README.md']
+
+ +

Returns an Array where the first value is the tree-ish and the second is +the path

+
+ + + + + + +
+ + +
+
# File lib/extracts_path.rb, line 48
+def extract_ref(input)
+  pair = ['', '']
+
+  return pair unless @project
+
+  # Remove project, actions and all other staff from path
+  input.gsub!("/#{@project.path_with_namespace}", "")
+  input.gsub!(%r^\/(tree|commits|blame|blob)\//, "") # remove actions
+  input.gsub!(%r\?.*$/, "") # remove stamps suffix
+  input.gsub!(%r.atom$/, "") # remove rss feed
+  input.gsub!(%r\/edit$/, "") # remove edit route part
+
+  if input.match(%r^([[:alnum:]]{40})(.+)/)
+    # If the ref appears to be a SHA, we're done, just split the string
+    pair = $~.captures
+  else
+    # Otherwise, attempt to detect the ref using a list of the project's
+    # branches and tags
+
+    # Append a trailing slash if we only get a ref and no file path
+    id = input
+    id += '/' unless id.ends_with?('/')
+
+    valid_refs = @project.ref_names
+    valid_refs.select! { |v| id.start_with?("#{v}/") }
+
+    if valid_refs.length != 1
+      # No exact ref match, so just try our best
+      pair = id.match(%r([^\/]+)(.*)/).captures
+    else
+      # Partition the string into the ref and the path, ignoring the empty first value
+      pair = id.partition(valid_refs.first)[1..-1]
+    end
+  end
+
+  # Remove ending slashes from path
+  pair[1].gsub!(%r^\/|\/$/, '')
+
+  pair
+end
+
+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/ExtractsPath/InvalidPathError.html b/doc/code/classes/ExtractsPath/InvalidPathError.html new file mode 100644 index 00000000..67632e3b --- /dev/null +++ b/doc/code/classes/ExtractsPath/InvalidPathError.html @@ -0,0 +1,82 @@ + + + + + ExtractsPath::InvalidPathError + + + + + + + + + + + + + +
+
+ +
+ +

Raised when given an invalid file path

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/FileSizeValidator.html b/doc/code/classes/FileSizeValidator.html new file mode 100644 index 00000000..b1da2752 --- /dev/null +++ b/doc/code/classes/FileSizeValidator.html @@ -0,0 +1,376 @@ + + + + + FileSizeValidator + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + +
Namespace
+ + + + + + +
Methods
+
+ +
C
+
+ +
+ +
H
+
+
    + + +
  • + help +
  • + +
+
+ +
N
+
+
    + + +
  • + new +
  • + +
+
+ +
V
+
+ +
+ +
+ + + + + + + + + + + + + + +
Constants
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
MESSAGES={ is: :wrong_size, minimum: :size_too_small, maximum: :size_too_big }.freeze
 
CHECKS={ is: :==, minimum: :>=, maximum: :<= }.freeze
 
DEFAULT_TOKENIZER=lambda { |value| value.split(//) }
 
RESERVED_OPTIONS=[:minimum, :maximum, :within, :is, :tokenizer, :too_short, :too_long]
 
+ + + + + + + + +
Class Public methods
+ +
+
+ + new(options) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File lib/file_size_validator.rb, line 8
+def initialize(options)
+  if range = (options.delete(:in) || options.delete(:within))
+    raise ArgumentError, ":in and :within must be a Range" unless range.is_a?(Range)
+    options[:minimum], options[:maximum] = range.begin, range.end
+    options[:maximum] -= 1 if range.exclude_end?
+  end
+
+  super
+end
+
+
+ +
+ +
Instance Public methods
+ +
+
+ + check_validity!() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File lib/file_size_validator.rb, line 18
+def check_validity!
+  keys = CHECKS.keys & options.keys
+
+  if keys.empty?
+    raise ArgumentError, 'Range unspecified. Specify the :within, :maximum, :minimum, or :is option.'
+  end
+
+  keys.each do |key|
+    value = options[key]
+
+    unless value.is_a?(Integer) && value >= 0
+      raise ArgumentError, ":#{key} must be a nonnegative Integer"
+    end
+  end
+end
+
+
+ +
+ +
+
+ + help() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File lib/file_size_validator.rb, line 57
+def help
+  Helper.instance
+end
+
+
+ +
+ +
+
+ + validate_each(record, attribute, value) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File lib/file_size_validator.rb, line 34
+def validate_each(record, attribute, value)
+  raise(ArgumentError, "A CarrierWave::Uploader::Base object was expected") unless value.kind_of? CarrierWave::Uploader::Base
+
+  value = (options[:tokenizer] || DEFAULT_TOKENIZER).call(value) if value.kind_of?(String)
+
+  CHECKS.each do |key, validity_check|
+    next unless check_value = options[key]
+
+    value ||= [] if key == :maximum
+
+    value_size = value.size
+    next if value_size.send(validity_check, check_value)
+
+    errors_options = options.except(*RESERVED_OPTIONS)
+    errors_options[:file_size] = help.number_to_human_size check_value
+
+    default_message = options[MESSAGES[key]]
+    errors_options[:message] ||= default_message if default_message
+
+    record.errors.add(attribute, MESSAGES[key], errors_options)
+  end
+end
+
+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/FileSizeValidator/Helper.html b/doc/code/classes/FileSizeValidator/Helper.html new file mode 100644 index 00000000..c11d89b3 --- /dev/null +++ b/doc/code/classes/FileSizeValidator/Helper.html @@ -0,0 +1,94 @@ + + + + + FileSizeValidator::Helper + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + +
Included Modules
+
    + +
  • + + Singleton + +
  • + +
  • + + ActionView::Helpers::NumberHelper + +
  • + +
+ + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/GitHost.html b/doc/code/classes/GitHost.html new file mode 100644 index 00000000..52ea8b32 --- /dev/null +++ b/doc/code/classes/GitHost.html @@ -0,0 +1,125 @@ + + + + + GitHost + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + +
Methods
+
+ +
G
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + +
Instance Public methods
+ +
+
+ + git_host() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/roles/git_host.rb, line 2
+def git_host
+  Gitlab::Gitolite.new
+end
+
+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/Gitlab.html b/doc/code/classes/Gitlab.html new file mode 100644 index 00000000..5127be6e --- /dev/null +++ b/doc/code/classes/Gitlab.html @@ -0,0 +1,265 @@ + + + + + Gitlab + + + + + + + + + + + + + +
+
+ +
+ +

ProjectMover class

+ +

Used for moving project repositories from one subdir to another

+ +
+ + + + + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/Gitlab/API.html b/doc/code/classes/Gitlab/API.html new file mode 100644 index 00000000..fe2ccc76 --- /dev/null +++ b/doc/code/classes/Gitlab/API.html @@ -0,0 +1,76 @@ + + + + + Gitlab::API + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/Gitlab/APIHelpers.html b/doc/code/classes/Gitlab/APIHelpers.html new file mode 100644 index 00000000..603443dd --- /dev/null +++ b/doc/code/classes/Gitlab/APIHelpers.html @@ -0,0 +1,703 @@ + + + + + Gitlab::APIHelpers + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + +
Methods
+
+ +
A
+
+ +
+ +
C
+
+ +
+ +
F
+
+ +
+ +
N
+
+ +
+ +
P
+
+ +
+ +
R
+
+ +
+ +
U
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + +
Instance Public methods
+ +
+
+ + attributes_for_keys(keys) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File lib/api/helpers.rb, line 44
+def attributes_for_keys(keys)
+  attrs = {}
+  keys.each do |key|
+    attrs[key] = params[key] if params[key].present?
+  end
+  attrs
+end
+
+
+ +
+ +
+
+ + authenticate!() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File lib/api/helpers.rb, line 26
+def authenticate!
+  unauthorized! unless current_user
+end
+
+
+ +
+ +
+
+ + authenticated_as_admin!() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File lib/api/helpers.rb, line 30
+def authenticated_as_admin!
+  forbidden! unless current_user.is_admin?
+end
+
+
+ +
+ +
+
+ + authorize!(action, subject) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File lib/api/helpers.rb, line 34
+def authorize! action, subject
+  unless abilities.allowed?(current_user, action, subject)
+    forbidden!
+  end
+end
+
+
+ +
+ +
+
+ + can?(object, action, subject) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File lib/api/helpers.rb, line 40
+def can?(object, action, subject)
+  abilities.allowed?(object, action, subject)
+end
+
+
+ +
+ +
+
+ + current_user() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File lib/api/helpers.rb, line 3
+def current_user
+  @current_user ||= User.find_by_authentication_token(params[:private_token] || env["HTTP_PRIVATE_TOKEN"])
+end
+
+
+ +
+ +
+
+ + find_project() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File lib/api/helpers.rb, line 12
+def find_project
+  project = Project.find_by_id(params[:id]) || Project.find_with_namespace(params[:id])
+
+  if project && can?(current_user, :read_project, project)
+    project
+  else
+    nil
+  end
+end
+
+
+ +
+ +
+
+ + forbidden!() + + +
+ + +
+

error helpers

+
+ + + + + + +
+ + +
+
# File lib/api/helpers.rb, line 54
+def forbidden!
+  render_api_error!('403 Forbidden', 403)
+end
+
+
+ +
+ +
+
+ + not_allowed!() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File lib/api/helpers.rb, line 69
+def not_allowed!
+  render_api_error!('Method Not Allowed', 405)
+end
+
+
+ +
+ +
+
+ + not_found!(resource = nil) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File lib/api/helpers.rb, line 58
+def not_found!(resource = nil)
+  message = ["404"]
+  message << resource if resource
+  message << "Not Found"
+  render_api_error!(message.join(' '), 404)
+end
+
+
+ +
+ +
+
+ + paginate(object) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File lib/api/helpers.rb, line 22
+def paginate(object)
+  object.page(params[:page]).per(params[:per_page].to_i)
+end
+
+
+ +
+ +
+
+ + render_api_error!(message, status) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File lib/api/helpers.rb, line 73
+def render_api_error!(message, status)
+  error!({'message' => message}, status)
+end
+
+
+ +
+ +
+
+ + unauthorized!() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File lib/api/helpers.rb, line 65
+def unauthorized!
+  render_api_error!('401 Unauthorized', 401)
+end
+
+
+ +
+ +
+
+ + user_project() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File lib/api/helpers.rb, line 7
+def user_project
+  @project ||= find_project
+  @project || not_found!
+end
+
+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/Gitlab/AppLogger.html b/doc/code/classes/Gitlab/AppLogger.html new file mode 100644 index 00000000..2f4dc534 --- /dev/null +++ b/doc/code/classes/Gitlab/AppLogger.html @@ -0,0 +1,173 @@ + + + + + Gitlab::AppLogger + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + +
Methods
+
+ +
F
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + +
Class Public methods
+ +
+
+ + file_name() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File lib/gitlab/app_logger.rb, line 3
+def self.file_name
+  'application.log'
+end
+
+
+ +
+ +
Instance Public methods
+ +
+
+ + format_message(severity, timestamp, progname, msg) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File lib/gitlab/app_logger.rb, line 7
+def format_message(severity, timestamp, progname, msg)
+  "#{timestamp.to_s(:long)}: #{msg}\n"
+end
+
+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/Gitlab/Application.html b/doc/code/classes/Gitlab/Application.html new file mode 100644 index 00000000..c8a1e3c2 --- /dev/null +++ b/doc/code/classes/Gitlab/Application.html @@ -0,0 +1,76 @@ + + + + + Gitlab::Application + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/Gitlab/Auth.html b/doc/code/classes/Gitlab/Auth.html new file mode 100644 index 00000000..4eeb3fec --- /dev/null +++ b/doc/code/classes/Gitlab/Auth.html @@ -0,0 +1,315 @@ + + + + + Gitlab::Auth + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + +
Methods
+
+ +
C
+
+ +
+ +
F
+
+ +
+ +
L
+
+
    + + +
  • + log +
  • + +
+
+ +
+ + + + + + + + + + + + + + + + + + + + +
Instance Public methods
+ +
+
+ + create_from_omniauth(auth, ldap = false) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File lib/gitlab/auth.rb, line 20
+def create_from_omniauth(auth, ldap = false)
+  provider = auth.provider
+  uid = auth.info.uid || auth.uid
+  name = auth.info.name.force_encoding("utf-8")
+  email = auth.info.email.downcase unless auth.info.email.nil?
+
+  ldap_prefix = ldap ? '(LDAP) ' : ''
+  raise OmniAuth::Error, "#{ldap_prefix}#{provider} does not provide an email"         " address" if auth.info.email.blank?
+
+  log.info "#{ldap_prefix}Creating user from #{provider} login"         " {uid => #{uid}, name => #{name}, email => #{email}}"
+  password = Devise.friendly_token[0, 8].downcase
+  @user = User.new({
+    extern_uid: uid,
+    provider: provider,
+    name: name,
+    username: email.match(%r^[^@]*/)[0],
+    email: email,
+    password: password,
+    password_confirmation: password,
+    projects_limit: Gitlab.config.gitlab.default_projects_limit,
+  }, as: :admin)
+  if Gitlab.config.omniauth['block_auto_created_users'] && !ldap
+    @user.blocked = true
+  end
+  @user.save!
+  @user
+end
+
+
+ +
+ +
+
+ + find_for_ldap_auth(auth, signed_in_resource = nil) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File lib/gitlab/auth.rb, line 3
+def find_for_ldap_auth(auth, signed_in_resource = nil)
+  uid = auth.info.uid
+  provider = auth.provider
+  email = auth.info.email.downcase unless auth.info.email.nil?
+  raise OmniAuth::Error, "LDAP accounts must provide an uid and email address" if uid.nil? or email.nil?
+
+  if @user = User.find_by_extern_uid_and_provider(uid, provider)
+    @user
+  elsif @user = User.find_by_email(email)
+    log.info "Updating legacy LDAP user #{email} with extern_uid => #{uid}"
+    @user.update_attributes(:extern_uid => uid, :provider => provider)
+    @user
+  else
+    create_from_omniauth(auth, true)
+  end
+end
+
+
+ +
+ +
+
+ + find_or_new_for_omniauth(auth) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File lib/gitlab/auth.rb, line 50
+def find_or_new_for_omniauth(auth)
+  provider, uid = auth.provider, auth.uid
+  email = auth.info.email.downcase unless auth.info.email.nil?
+
+  if @user = User.find_by_provider_and_extern_uid(provider, uid)
+    @user
+  elsif @user = User.find_by_email(email)
+    @user.update_attributes(:extern_uid => uid, :provider => provider)
+    @user
+  else
+    if Gitlab.config.omniauth['allow_single_sign_on']
+      @user = create_from_omniauth(auth)
+      @user
+    end
+  end
+end
+
+
+ +
+ +
+
+ + log() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File lib/gitlab/auth.rb, line 67
+def log
+  Gitlab::AppLogger
+end
+
+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/Gitlab/Entities.html b/doc/code/classes/Gitlab/Entities.html new file mode 100644 index 00000000..8cb9ed35 --- /dev/null +++ b/doc/code/classes/Gitlab/Entities.html @@ -0,0 +1,151 @@ + + + + + Gitlab::Entities + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/Gitlab/Entities/Hook.html b/doc/code/classes/Gitlab/Entities/Hook.html new file mode 100644 index 00000000..a42cc91d --- /dev/null +++ b/doc/code/classes/Gitlab/Entities/Hook.html @@ -0,0 +1,76 @@ + + + + + Gitlab::Entities::Hook + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/Gitlab/Entities/Issue.html b/doc/code/classes/Gitlab/Entities/Issue.html new file mode 100644 index 00000000..432c6f4b --- /dev/null +++ b/doc/code/classes/Gitlab/Entities/Issue.html @@ -0,0 +1,76 @@ + + + + + Gitlab::Entities::Issue + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/Gitlab/Entities/MRNote.html b/doc/code/classes/Gitlab/Entities/MRNote.html new file mode 100644 index 00000000..e05a43b8 --- /dev/null +++ b/doc/code/classes/Gitlab/Entities/MRNote.html @@ -0,0 +1,76 @@ + + + + + Gitlab::Entities::MRNote + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/Gitlab/Entities/MergeRequest.html b/doc/code/classes/Gitlab/Entities/MergeRequest.html new file mode 100644 index 00000000..e6807716 --- /dev/null +++ b/doc/code/classes/Gitlab/Entities/MergeRequest.html @@ -0,0 +1,76 @@ + + + + + Gitlab::Entities::MergeRequest + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/Gitlab/Entities/Milestone.html b/doc/code/classes/Gitlab/Entities/Milestone.html new file mode 100644 index 00000000..3c375faa --- /dev/null +++ b/doc/code/classes/Gitlab/Entities/Milestone.html @@ -0,0 +1,76 @@ + + + + + Gitlab::Entities::Milestone + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/Gitlab/Entities/Note.html b/doc/code/classes/Gitlab/Entities/Note.html new file mode 100644 index 00000000..f0ba6567 --- /dev/null +++ b/doc/code/classes/Gitlab/Entities/Note.html @@ -0,0 +1,76 @@ + + + + + Gitlab::Entities::Note + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/Gitlab/Entities/Project.html b/doc/code/classes/Gitlab/Entities/Project.html new file mode 100644 index 00000000..a111b19f --- /dev/null +++ b/doc/code/classes/Gitlab/Entities/Project.html @@ -0,0 +1,76 @@ + + + + + Gitlab::Entities::Project + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/Gitlab/Entities/ProjectMember.html b/doc/code/classes/Gitlab/Entities/ProjectMember.html new file mode 100644 index 00000000..151abf27 --- /dev/null +++ b/doc/code/classes/Gitlab/Entities/ProjectMember.html @@ -0,0 +1,76 @@ + + + + + Gitlab::Entities::ProjectMember + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/Gitlab/Entities/ProjectSnippet.html b/doc/code/classes/Gitlab/Entities/ProjectSnippet.html new file mode 100644 index 00000000..61259d0c --- /dev/null +++ b/doc/code/classes/Gitlab/Entities/ProjectSnippet.html @@ -0,0 +1,76 @@ + + + + + Gitlab::Entities::ProjectSnippet + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/Gitlab/Entities/RepoCommit.html b/doc/code/classes/Gitlab/Entities/RepoCommit.html new file mode 100644 index 00000000..3d181a6f --- /dev/null +++ b/doc/code/classes/Gitlab/Entities/RepoCommit.html @@ -0,0 +1,76 @@ + + + + + Gitlab::Entities::RepoCommit + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/Gitlab/Entities/RepoObject.html b/doc/code/classes/Gitlab/Entities/RepoObject.html new file mode 100644 index 00000000..ee6a10e7 --- /dev/null +++ b/doc/code/classes/Gitlab/Entities/RepoObject.html @@ -0,0 +1,76 @@ + + + + + Gitlab::Entities::RepoObject + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/Gitlab/Entities/SSHKey.html b/doc/code/classes/Gitlab/Entities/SSHKey.html new file mode 100644 index 00000000..cbc4d1a3 --- /dev/null +++ b/doc/code/classes/Gitlab/Entities/SSHKey.html @@ -0,0 +1,76 @@ + + + + + Gitlab::Entities::SSHKey + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/Gitlab/Entities/User.html b/doc/code/classes/Gitlab/Entities/User.html new file mode 100644 index 00000000..5c296676 --- /dev/null +++ b/doc/code/classes/Gitlab/Entities/User.html @@ -0,0 +1,76 @@ + + + + + Gitlab::Entities::User + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/Gitlab/Entities/UserBasic.html b/doc/code/classes/Gitlab/Entities/UserBasic.html new file mode 100644 index 00000000..a17b808d --- /dev/null +++ b/doc/code/classes/Gitlab/Entities/UserBasic.html @@ -0,0 +1,76 @@ + + + + + Gitlab::Entities::UserBasic + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/Gitlab/Entities/UserLogin.html b/doc/code/classes/Gitlab/Entities/UserLogin.html new file mode 100644 index 00000000..d73be2ca --- /dev/null +++ b/doc/code/classes/Gitlab/Entities/UserLogin.html @@ -0,0 +1,76 @@ + + + + + Gitlab::Entities::UserLogin + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/Gitlab/GitLogger.html b/doc/code/classes/Gitlab/GitLogger.html new file mode 100644 index 00000000..19018c0f --- /dev/null +++ b/doc/code/classes/Gitlab/GitLogger.html @@ -0,0 +1,173 @@ + + + + + Gitlab::GitLogger + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + +
Methods
+
+ +
F
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + +
Class Public methods
+ +
+
+ + file_name() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File lib/gitlab/git_logger.rb, line 3
+def self.file_name
+  'githost.log'
+end
+
+
+ +
+ +
Instance Public methods
+ +
+
+ + format_message(severity, timestamp, progname, msg) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File lib/gitlab/git_logger.rb, line 7
+def format_message(severity, timestamp, progname, msg)
+  "#{timestamp.to_s(:long)} -> #{severity} -> #{msg}\n"
+end
+
+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/Gitlab/GitStats.html b/doc/code/classes/Gitlab/GitStats.html new file mode 100644 index 00000000..fabe18bb --- /dev/null +++ b/doc/code/classes/Gitlab/GitStats.html @@ -0,0 +1,506 @@ + + + + + Gitlab::GitStats + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + +
Methods
+
+ +
A
+
+ +
+ +
B
+
+ +
+ +
C
+
+ +
+ +
F
+
+ +
+ +
G
+
+ +
+ +
N
+
+
    + + +
  • + new +
  • + +
+
+ +
+ + + + + + + + + + + + + + + + + +
Attributes
+ + + + + + + + + + + + + + +
+ [RW] + ref
+ [RW] + repo
+ + + + + +
Class Public methods
+ +
+
+ + new(repo, ref) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File lib/gitlab/git_stats.rb, line 5
+def initialize repo, ref
+  @repo, @ref = repo, ref
+end
+
+
+ +
+ +
Instance Public methods
+ +
+
+ + authors() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File lib/gitlab/git_stats.rb, line 9
+def authors
+  @authors ||= collect_authors
+end
+
+
+ +
+ +
+
+ + authors_count() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File lib/gitlab/git_stats.rb, line 22
+def authors_count
+  authors.size
+end
+
+
+ +
+ +
+
+ + commits_count() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File lib/gitlab/git_stats.rb, line 13
+def commits_count
+  @commits_count ||= repo.commit_count(ref)
+end
+
+
+ +
+ +
+
+ + files_count() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File lib/gitlab/git_stats.rb, line 17
+def files_count
+  args = [ref, '-r', '--name-only' ]
+  repo.git.run(nil, 'ls-tree', nil, {}, args).split("\n").count
+end
+
+
+ +
+ +
+
+ + graph() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File lib/gitlab/git_stats.rb, line 26
+def graph
+  @graph ||= build_graph
+end
+
+
+ +
+ +
Instance Protected methods
+ +
+
+ + build_graph(n = 4) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File lib/gitlab/git_stats.rb, line 54
+def build_graph n = 4
+  from, to = (Date.today - n.weeks), Date.today
+  args = ['--all', "--since=#{from.to_s(:date)}", '--format=%ad' ]
+  rev_list = repo.git.run(nil, 'rev-list', nil, {}, args).split("\n")
+
+  commits_dates = rev_list.values_at(* rev_list.each_index.select {|i| i.odd?})
+  commits_dates = commits_dates.map { |date_str| Time.parse(date_str).to_date.to_s(:date) }
+
+  commits_per_day = from.upto(to).map do |day|
+    commits_dates.count(day.to_date.to_s(:date))
+  end
+
+  OpenStruct.new(
+    labels: from.upto(to).map { |day| day.stamp('Aug 23') },
+    commits: commits_per_day,
+    weeks: n
+  )
+end
+
+
+ +
+ +
+
+ + collect_authors() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File lib/gitlab/git_stats.rb, line 32
+def collect_authors
+  shortlog = repo.git.shortlog({e: true, s: true }, ref)
+
+  authors = []
+
+  lines = shortlog.split("\n")
+
+  lines.each do |line|
+    data = line.split("\t")
+    commits = data.first
+    author = Grit::Actor.from_string(data.last)
+
+    authors << OpenStruct.new(
+      name: author.name,
+      email: author.email,
+      commits: commits.to_i
+    )
+  end
+
+  authors.sort_by(&:commits).reverse
+end
+
+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/Gitlab/Gitolite.html b/doc/code/classes/Gitlab/Gitolite.html new file mode 100644 index 00000000..8cf9c58c --- /dev/null +++ b/doc/code/classes/Gitlab/Gitolite.html @@ -0,0 +1,536 @@ + + + + + Gitlab::Gitolite + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + +
Namespace
+ + + + + + +
Methods
+
+ +
C
+
+ +
+ +
E
+
+ +
+ +
M
+
+ +
+ +
R
+
+ +
+ +
S
+
+ +
+ +
U
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + +
Instance Public methods
+ +
+
+ + config() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File lib/gitlab/backend/gitolite.rb, line 7
+def config
+  Gitlab::GitoliteConfig.new
+end
+
+
+ +
+ +
+
+ + create_repository(project) + + +
+ + +
+ +
+ + + + + +
+ +
+
+ + enable_automerge() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File lib/gitlab/backend/gitolite.rb, line 44
+def enable_automerge
+  config.admin_all_repo!
+end
+
+
+ +
+ +
+
+ + move_repository(old_repo, project) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File lib/gitlab/backend/gitolite.rb, line 29
+def move_repository(old_repo, project)
+  config.apply do |config|
+    config.clean_repo(old_repo)
+    config.update_project(project)
+  end
+end
+
+
+ +
+ +
+
+ + remove_key(key_id, projects) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File lib/gitlab/backend/gitolite.rb, line 18
+def remove_key key_id, projects
+  config.apply do |config|
+    config.rm_key(key_id)
+    config.update_projects(projects)
+  end
+end
+
+
+ +
+ +
+
+ + remove_repository(project) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File lib/gitlab/backend/gitolite.rb, line 36
+def remove_repository project
+  config.destroy_project!(project)
+end
+
+
+ +
+ +
+
+ + set_key(key_id, key_content, projects) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File lib/gitlab/backend/gitolite.rb, line 11
+def set_key key_id, key_content, projects
+  config.apply do |config|
+    config.write_key(key_id, key_content)
+    config.update_projects(projects)
+  end
+end
+
+
+ +
+ +
+
+ + update_repositories(projects) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File lib/gitlab/backend/gitolite.rb, line 48
+def update_repositories projects
+  config.apply do |config|
+    config.update_projects(projects)
+  end
+end
+
+
+ +
+ +
+
+ + update_repository(project) + + +
+ + +
+ +
+ + + +
+ Also aliased as: create_repository +
+ + + + +
+ + +
+
# File lib/gitlab/backend/gitolite.rb, line 25
+def update_repository project
+  config.update_project!(project)
+end
+
+
+ +
+ +
+
+ + url_to_repo(path) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File lib/gitlab/backend/gitolite.rb, line 40
+def url_to_repo path
+  Gitlab.config.gitolite.ssh_path_prefix + "#{path}.git"
+end
+
+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/Gitlab/Gitolite/AccessDenied.html b/doc/code/classes/Gitlab/Gitolite/AccessDenied.html new file mode 100644 index 00000000..8a45dae1 --- /dev/null +++ b/doc/code/classes/Gitlab/Gitolite/AccessDenied.html @@ -0,0 +1,76 @@ + + + + + Gitlab::Gitolite::AccessDenied + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/Gitlab/GitoliteConfig.html b/doc/code/classes/Gitlab/GitoliteConfig.html new file mode 100644 index 00000000..11026f5c --- /dev/null +++ b/doc/code/classes/Gitlab/GitoliteConfig.html @@ -0,0 +1,810 @@ + + + + + Gitlab::GitoliteConfig + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + +
Namespace
+ + + + + + +
Methods
+
+ +
A
+
+ +
+ +
C
+
+ +
+ +
D
+
+ +
+ +
L
+
+
    + + +
  • + log +
  • + +
+
+ +
R
+
+ +
+ +
U
+
+ +
+ +
W
+
+ +
+ +
+ + + + + + + + + + + + + + + + + +
Attributes
+ + + + + + + + + + + + + + + + + + + + +
+ [R] + conf
+ [R] + config_tmp_dir
+ [R] + ga_repo
+ + + + + +
Instance Public methods
+ +
+
+ + admin_all_repo() + + +
+ + +
+

Enable access to all repos for gitolite admin. We use it for accept merge +request feature

+
+ + + + + + +
+ + +
+
# File lib/gitlab/backend/gitolite_config.rb, line 169
+def admin_all_repo
+  owner_name = Gitlab.config.gitolite.admin_key
+
+  # @ALL repos premission for gitolite owner
+  repo_name = "@all"
+  repo = if conf.has_repo?(repo_name)
+           conf.get_repo(repo_name)
+         else
+           ::Gitolite::Config::Repo.new(repo_name)
+         end
+
+  repo.add_permission("RW+", "", owner_name)
+  conf.add_repo(repo, true)
+end
+
+
+ +
+ +
+
+ + admin_all_repo!() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File lib/gitlab/backend/gitolite_config.rb, line 184
+def admin_all_repo!
+  apply { |config| config.admin_all_repo }
+end
+
+
+ +
+ +
+
+ + apply() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File lib/gitlab/backend/gitolite_config.rb, line 23
+def apply
+  Timeout::timeout(30) do
+    File.open(Rails.root.join('tmp', "gitlabhq-gitolite.lock"), "w+") do |f|
+      begin
+        # Set exclusive lock
+        # to prevent race condition
+        f.flock(File::LOCK_EX)
+
+        # Pull gitolite-admin repo
+        # in tmp dir before do any changes
+        pull(config_tmp_dir)
+
+        # Build ga_repo object and @conf
+        # to access gitolite-admin configuration
+        @conf = ga_repo.config
+
+        # Do any changes
+        # in gitolite-admin
+        # config here
+        yield(self)
+
+        # Save changes in
+        # gitolite-admin repo
+        # before push it
+        ga_repo.save
+
+        # Push gitolite-admin repo
+        # to apply all changes
+        push(config_tmp_dir)
+      ensure
+        # Remove tmp dir
+        # removing the gitolite folder first is important to avoid
+        # NFS issues.
+        FileUtils.rm_rf(File.join(config_tmp_dir, 'gitolite'))
+
+        # Remove parent tmp dir
+        FileUtils.rm_rf(config_tmp_dir)
+
+        # Unlock so other task can access
+        # gitolite configuration
+        f.flock(File::LOCK_UN)
+      end
+    end
+  end
+rescue PullError => ex
+  log("Pull error ->  " + ex.message)
+  raise Gitolite::AccessDenied, ex.message
+
+rescue PushError => ex
+  log("Push error ->  " + " " + ex.message)
+  raise Gitolite::AccessDenied, ex.message
+
+rescue Exception => ex
+  log(ex.class.name + " " + ex.message)
+  raise Gitolite::AccessDenied.new("gitolite timeout")
+end
+
+
+ +
+ +
+
+ + clean_repo(repo_name) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File lib/gitlab/backend/gitolite_config.rb, line 89
+def clean_repo repo_name
+  conf.rm_repo(repo_name)
+end
+
+
+ +
+ +
+
+ + destroy_project(project) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File lib/gitlab/backend/gitolite_config.rb, line 84
+def destroy_project(project)
+  FileUtils.rm_rf(project.path_to_repo)
+  conf.rm_repo(project.path_with_namespace)
+end
+
+
+ +
+ +
+
+ + destroy_project!(project) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File lib/gitlab/backend/gitolite_config.rb, line 93
+def destroy_project!(project)
+  apply do |config|
+    config.destroy_project(project)
+  end
+end
+
+
+ +
+ +
+
+ + log(message) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File lib/gitlab/backend/gitolite_config.rb, line 80
+def log message
+  Gitlab::GitLogger.error(message)
+end
+
+
+ +
+ +
+
+ + rm_key(user) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File lib/gitlab/backend/gitolite_config.rb, line 105
+def rm_key(user)
+  key_path = File.join(config_tmp_dir, 'gitolite/keydir', "#{user}.pub")
+  ga_key = ::Gitolite::SSHKey.from_file(key_path)
+  ga_repo.rm_key(ga_key)
+end
+
+
+ +
+ +
+
+ + update_project(project) + + +
+ + +
+

update or create

+
+ + + + + + +
+ + +
+
# File lib/gitlab/backend/gitolite_config.rb, line 112
+def update_project(project)
+  repo = update_project_config(project, conf)
+  conf.add_repo(repo, true)
+end
+
+
+ +
+ +
+
+ + update_project!( project) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File lib/gitlab/backend/gitolite_config.rb, line 117
+def update_project!( project)
+  apply do |config|
+    config.update_project(project)
+  end
+end
+
+
+ +
+ +
+
+ + update_project_config(project, conf) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File lib/gitlab/backend/gitolite_config.rb, line 132
+def update_project_config(project, conf)
+  repo_name = project.path_with_namespace
+
+  repo = if conf.has_repo?(repo_name)
+           conf.get_repo(repo_name)
+         else
+           ::Gitolite::Config::Repo.new(repo_name)
+         end
+
+  name_readers = project.repository_readers
+  name_writers = project.repository_writers
+  name_masters = project.repository_masters
+
+  pr_br = project.protected_branches.map(&:name).join("$ ")
+
+  repo.clean_permissions
+
+  # Deny access to protected branches for writers
+  unless name_writers.blank? || pr_br.blank?
+    repo.add_permission("-", pr_br.strip + "$ ", name_writers)
+  end
+
+  # Add read permissions
+  repo.add_permission("R", "", name_readers) unless name_readers.blank?
+
+  # Add write permissions
+  repo.add_permission("RW+", "", name_writers) unless name_writers.blank?
+  repo.add_permission("RW+", "", name_masters) unless name_masters.blank?
+
+  # Add sharedRepository config
+  repo.set_git_config("core.sharedRepository", "0660")
+
+  repo
+end
+
+
+ +
+ +
+
+ + update_projects(projects) + + +
+ + +
+

Updates many projects and uses project.path_with_namespace as the repo path +An order of magnitude faster than #update_project

+
+ + + + + + +
+ + +
+
# File lib/gitlab/backend/gitolite_config.rb, line 125
+def update_projects(projects)
+  projects.each do |project|
+    repo = update_project_config(project, conf)
+    conf.add_repo(repo, true)
+  end
+end
+
+
+ +
+ +
+
+ + write_key(id, key) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File lib/gitlab/backend/gitolite_config.rb, line 99
+def write_key(id, key)
+  File.open(File.join(config_tmp_dir, 'gitolite/keydir',"#{id}.pub"), 'w') do |f|
+    f.write(key.gsub(%r\n/,''))
+  end
+end
+
+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/Gitlab/GitoliteConfig/PullError.html b/doc/code/classes/Gitlab/GitoliteConfig/PullError.html new file mode 100644 index 00000000..35c46f38 --- /dev/null +++ b/doc/code/classes/Gitlab/GitoliteConfig/PullError.html @@ -0,0 +1,76 @@ + + + + + Gitlab::GitoliteConfig::PullError + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/Gitlab/GitoliteConfig/PushError.html b/doc/code/classes/Gitlab/GitoliteConfig/PushError.html new file mode 100644 index 00000000..53efe1e8 --- /dev/null +++ b/doc/code/classes/Gitlab/GitoliteConfig/PushError.html @@ -0,0 +1,76 @@ + + + + + Gitlab::GitoliteConfig::PushError + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/Gitlab/Graph.html b/doc/code/classes/Gitlab/Graph.html new file mode 100644 index 00000000..e0827c84 --- /dev/null +++ b/doc/code/classes/Gitlab/Graph.html @@ -0,0 +1,88 @@ + + + + + Gitlab::Graph + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/Gitlab/Graph/Commit.html b/doc/code/classes/Gitlab/Graph/Commit.html new file mode 100644 index 00000000..0198b3f0 --- /dev/null +++ b/doc/code/classes/Gitlab/Graph/Commit.html @@ -0,0 +1,337 @@ + + + + + Gitlab::Graph::Commit + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + +
Methods
+
+ +
A
+
+ +
+ +
M
+
+ +
+ +
N
+
+
    + + +
  • + new +
  • + +
+
+ +
T
+
+ +
+ +
+ + + + +
Included Modules
+
    + +
  • + + ActionView::Helpers::TagHelper + +
  • + +
+ + + + + + + + + + + + + + + +
Attributes
+ + + + + + + + + + + + + + + + + + + + +
+ [RW] + refs
+ [RW] + space
+ [RW] + time
+ + + + + +
Class Public methods
+ +
+
+ + new(commit) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File lib/gitlab/graph/commit.rb, line 10
+def initialize(commit)
+  @_commit = commit
+  @time = -1
+  @space = 0
+end
+
+
+ +
+ +
Instance Public methods
+ +
+
+ + add_refs(ref_cache, repo) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File lib/gitlab/graph/commit.rb, line 36
+def add_refs(ref_cache, repo)
+  if ref_cache.empty?
+    repo.refs.each do |ref|
+      ref_cache[ref.commit.id] ||= []
+      ref_cache[ref.commit.id] << ref
+    end
+  end
+  @refs = ref_cache[@_commit.id] if ref_cache.include?(@_commit.id)
+  @refs ||= []
+end
+
+
+ +
+ +
+
+ + method_missing(m, *args, &block) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File lib/gitlab/graph/commit.rb, line 16
+def method_missing(m, *args, &block)
+  @_commit.send(m, *args, &block)
+end
+
+
+ +
+ +
+
+ + to_graph_hash() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File lib/gitlab/graph/commit.rb, line 20
+def to_graph_hash
+  h = {}
+  h[:parents] = self.parents.collect do |p|
+    [p.id,0,0]
+  end
+  h[:author]  = author.name
+  h[:time]    = time
+  h[:space]   = space
+  h[:refs]    = refs.collect{|r|r.name}.join(" ") unless refs.nil?
+  h[:id]      = sha
+  h[:date]    = date
+  h[:message] = message
+  h[:login]   = author.email
+  h
+end
+
+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/Gitlab/Graph/JsonBuilder.html b/doc/code/classes/Gitlab/Graph/JsonBuilder.html new file mode 100644 index 00000000..b410947b --- /dev/null +++ b/doc/code/classes/Gitlab/Graph/JsonBuilder.html @@ -0,0 +1,707 @@ + + + + + Gitlab::Graph::JsonBuilder + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + +
Methods
+
+ +
B
+
+ +
+ +
C
+
+ +
+ +
F
+
+ +
+ +
I
+
+ +
+ +
M
+
+ +
+ +
N
+
+
    + + +
  • + new +
  • + +
+
+ +
P
+
+ +
+ +
T
+
+ +
+ +
+ + + + + + + + + + + + + + + + + +
Attributes
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+ [RW] + commits
+ [RW] + days
+ [RW] + ref_cache
+ [RW] + repo
+ + + + + +
Class Public methods
+ +
+
+ + max_count() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File lib/gitlab/graph/json_builder.rb, line 8
+def self.max_count
+  @max_count ||= 650
+end
+
+
+ +
+ +
+
+ + new(project) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File lib/gitlab/graph/json_builder.rb, line 12
+def initialize project
+  @project = project
+  @repo = project.repo
+  @ref_cache = {}
+
+  @commits = collect_commits
+  @days = index_commits
+end
+
+
+ +
+ +
Instance Public methods
+ +
+
+ + to_json(*args) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File lib/gitlab/graph/json_builder.rb, line 21
+def to_json(*args)
+  {
+    days: @days.compact.map { |d| [d.day, d.strftime("%b")] },
+    commits: @commits.map(&:to_graph_hash)
+  }.to_json(*args)
+end
+
+
+ +
+ +
Instance Protected methods
+ +
+
+ + base_space(leaves, map) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File lib/gitlab/graph/json_builder.rb, line 148
+def base_space(leaves, map)
+  parents = []
+  leaves.each do |l|
+    parents.concat l.parents.collect.select{|p| map.include? p.id and map[p.id].space.nonzero?}
+  end
+
+  space = parents.map{|p| map[p.id].space}.max || 0
+  space += 1
+end
+
+
+ +
+ +
+
+ + collect_commits() + + +
+ + +
+

Get commits from repository

+
+ + + + + + +
+ + +
+
# File lib/gitlab/graph/json_builder.rb, line 32
+def collect_commits
+  @commits = Grit::Commit.find_all(repo, nil, {max_count: self.class.max_count}).dup
+
+  # Decorate with app/models/commit.rb
+  @commits.map! { |commit| ::Commit.new(commit) }
+
+  # Decorate with lib/gitlab/graph/commit.rb
+  @commits.map! { |commit| Gitlab::Graph::Commit.new(commit) }
+
+  # add refs to each commit
+  @commits.each { |commit| commit.add_refs(ref_cache, repo) }
+
+  @commits
+end
+
+
+ +
+ +
+
+ + find_free_space(leaves, map) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File lib/gitlab/graph/json_builder.rb, line 135
+def find_free_space(leaves, map)
+  time_range = leaves.last.time..leaves.first.time
+  reserved = []
+  for day in time_range
+    reserved += @_reserved[day]
+  end
+  space = base_space(leaves, map)
+  while reserved.include? space do
+    space += 1
+  end
+  space
+end
+
+
+ +
+ +
+
+ + index_commits() + + +
+ + +
+

Method is adding time and space on the list of commits. As well as returns +date list corelated with time set on commits.

+ +

@param [Array<Graph::Commit>] comits to index

+ +

@return [Array<TimeDate>] list of commit dates corelated with time on +commits

+
+ + + + + + +
+ + +
+
# File lib/gitlab/graph/json_builder.rb, line 54
+def index_commits
+  days, heads = [], []
+  map = {}
+
+  commits.reverse.each_with_index do |c,i|
+    c.time = i
+    days[i] = c.committed_date
+    map[c.id] = c
+    heads += c.refs unless c.refs.nil?
+  end
+
+  heads.select!{|h| h.is_a? Grit::Head or h.is_a? Grit::Remote}
+  # sort heads so the master is top and current branches are closer
+  heads.sort! do |a,b|
+    if a.name == "master"
+      -1
+    elsif b.name == "master"
+      1
+    else
+      b.commit.committed_date <=> a.commit.committed_date
+    end
+  end
+
+  @_reserved = {}
+  days.each_index do |i|
+    @_reserved[i] = []
+  end
+
+  heads.each do |h|
+    if map.include? h.commit.id then
+      place_chain(map[h.commit.id], map)
+    end
+  end
+
+  days
+end
+
+
+ +
+ +
+
+ + mark_reserved(time_range, space) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File lib/gitlab/graph/json_builder.rb, line 129
+def mark_reserved(time_range, space)
+  for day in time_range
+    @_reserved[day].push(space)
+  end
+end
+
+
+ +
+ +
+
+ + place_chain(commit, map, parent_time = nil) + + +
+ + +
+

Add space mark on commit and its parents

+ +

@param [Graph::Commit] the commit object. @param +[Hash<String,Graph::Commit>] map of commits

+
+ + + + + + +
+ + +
+
# File lib/gitlab/graph/json_builder.rb, line 95
+def place_chain(commit, map, parent_time = nil)
+  leaves = take_left_leaves(commit, map)
+  if leaves.empty?
+    return
+  end
+  space = find_free_space(leaves, map)
+  leaves.each{|l| l.space = space}
+  # and mark it as reserved
+  min_time = leaves.last.time
+  parents = leaves.last.parents.collect
+  parents.each do |p|
+    if map.include? p.id
+      parent = map[p.id]
+      if parent.time < min_time
+        min_time = parent.time
+      end
+    end
+  end
+  if parent_time.nil?
+    max_time = leaves.first.time
+  else
+    max_time = parent_time - 1
+  end
+  mark_reserved(min_time..max_time, space)
+
+  # Visit branching chains
+  leaves.each do |l|
+    parents = l.parents.collect.select{|p| map.include? p.id and map[p.id].space.zero?}
+    for p in parents
+      place_chain(map[p.id], map, l.time)
+    end
+  end
+end
+
+
+ +
+ +
+
+ + take_left_leaves(commit, map) + + +
+ + +
+

Takes most left subtree branch of commits which don’t have space mark yet.

+ +

@param [Graph::Commit] the commit object. @param +[Hash<String,Graph::Commit>] map of commits

+ +

@return [Array<Graph::Commit>] list of branch commits

+
+ + + + + + +
+ + +
+
# File lib/gitlab/graph/json_builder.rb, line 165
+def take_left_leaves(commit, map)
+  leaves = []
+  leaves.push(commit) if commit.space.zero?
+
+  while true
+    return leaves if commit.parents.count.zero?
+    return leaves unless map.include? commit.parents.first.id
+
+    commit = map[commit.parents.first.id]
+
+    return leaves unless commit.space.zero?
+
+    leaves.push(commit)
+  end
+end
+
+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/Gitlab/InlineDiff.html b/doc/code/classes/Gitlab/InlineDiff.html new file mode 100644 index 00000000..cd04b7d0 --- /dev/null +++ b/doc/code/classes/Gitlab/InlineDiff.html @@ -0,0 +1,299 @@ + + + + + Gitlab::InlineDiff + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + +
Methods
+
+ +
#
+
+ +
+ +
P
+
+ +
+ +
R
+
+ +
+ +
+ + + + + + + + + + + + + + +
Constants
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
START="#!idiff-start!#"
 
FINISH="#!idiff-finish!#"
 
+ + + + + + + + +
Class Public methods
+ +
+
+ + _indexes_of_changed_lines(diff_arr) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File lib/gitlab/inline_diff.rb, line 42
+def _indexes_of_changed_lines diff_arr
+  chain_of_first_symbols = ""
+  diff_arr.each_with_index do |line, i|
+    chain_of_first_symbols += line[0]
+  end
+  chain_of_first_symbols.gsub!(%r[^\-\+]/, "#")
+
+  offset = 0
+  indexes = []
+  while index = chain_of_first_symbols.index("#-+#", offset)
+    indexes << index
+    offset = index + 1
+  end
+  indexes
+end
+
+
+ +
+ +
+
+ + processing(diff_arr) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File lib/gitlab/inline_diff.rb, line 8
+def processing diff_arr
+  indexes = _indexes_of_changed_lines diff_arr
+
+  indexes.each do |index|
+    first_line = diff_arr[index+1]
+    second_line = diff_arr[index+2]
+    max_length = [first_line.size, second_line.size].max
+
+    first_the_same_symbols = 0
+    (0..max_length + 1).each do |i|
+      first_the_same_symbols = i - 1
+      if first_line[i] != second_line[i] && i > 0
+        break
+      end
+    end
+    first_token = first_line[0..first_the_same_symbols][1..-1]
+    diff_arr[index+1].sub!(first_token, first_token + START)
+    diff_arr[index+2].sub!(first_token, first_token + START)
+    last_the_same_symbols = 0
+    (1..max_length + 1).each do |i|
+      last_the_same_symbols = -i
+      shortest_line = second_line.size > first_line.size ? first_line : second_line
+      if ( first_line[-i] != second_line[-i] ) || "#{first_token}#{START}".size == shortest_line[1..-i].size
+        break
+      end
+    end
+    last_the_same_symbols += 1
+    last_token = first_line[last_the_same_symbols..-1]
+    diff_arr[index+1].sub!(%r#{Regexp.escape(last_token)}$/, FINISH + last_token)
+    diff_arr[index+2].sub!(%r#{Regexp.escape(last_token)}$/, FINISH + last_token)
+  end
+  diff_arr
+end
+
+
+ +
+ +
+
+ + replace_markers(line) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File lib/gitlab/inline_diff.rb, line 58
+def replace_markers line
+  line.gsub!(START, "<span class='idiff'>")
+  line.gsub!(FINISH, "</span>")
+  line
+end
+
+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/Gitlab/Issues.html b/doc/code/classes/Gitlab/Issues.html new file mode 100644 index 00000000..91c6dead --- /dev/null +++ b/doc/code/classes/Gitlab/Issues.html @@ -0,0 +1,82 @@ + + + + + Gitlab::Issues + + + + + + + + + + + + + +
+
+ +
+ +

Issues API

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/Gitlab/Logger.html b/doc/code/classes/Gitlab/Logger.html new file mode 100644 index 00000000..2c523c19 --- /dev/null +++ b/doc/code/classes/Gitlab/Logger.html @@ -0,0 +1,315 @@ + + + + + Gitlab::Logger + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + +
Methods
+
+ +
B
+
+ +
+ +
E
+
+ +
+ +
I
+
+
    + + +
  • + info +
  • + +
+
+ +
R
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + +
Class Public methods
+ +
+
+ + build() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File lib/gitlab/logger.rb, line 22
+def self.build
+  new(Rails.root.join("log", file_name))
+end
+
+
+ +
+ +
+
+ + error(message) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File lib/gitlab/logger.rb, line 3
+def self.error(message)
+  build.error(message)
+end
+
+
+ +
+ +
+
+ + info(message) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File lib/gitlab/logger.rb, line 7
+def self.info(message)
+  build.info(message)
+end
+
+
+ +
+ +
+
+ + read_latest() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File lib/gitlab/logger.rb, line 11
+def self.read_latest
+  path = Rails.root.join("log", file_name)
+  self.build unless File.exist?(path)
+  logs = %xtail -n 2000 #{path}`.split("\n")
+end
+
+
+ +
+ +
+
+ + read_latest_for(filename) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File lib/gitlab/logger.rb, line 17
+def self.read_latest_for filename
+  path = Rails.root.join("log", filename)
+  logs = %xtail -n 2000 #{path}`.split("\n")
+end
+
+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/Gitlab/Markdown.html b/doc/code/classes/Gitlab/Markdown.html new file mode 100644 index 00000000..45d853f3 --- /dev/null +++ b/doc/code/classes/Gitlab/Markdown.html @@ -0,0 +1,258 @@ + + + + + Gitlab::Markdown + + + + + + + + + + + + + +
+
+ +
+ +

Custom parser for GitLab-flavored Markdown

+ +

It replaces references in the text with links to the appropriate items in +GitLab.

+ +

Supported reference formats are:

+ +
* @foo for team members
+* #123 for issues
+* !123 for merge requests
+* $123 for snippets
+* 123456 for commits
+ +

It also parses Emoji codes to insert images. See www.emoji-cheat-sheet.com/ for +a list of the supported icons.

+ +

Examples

+ +
>> gfm("Hey @david, can you fix this?")
+=> "Hey <a href="/gitlab/team_members/1">@david</a>, can you fix this?"
+
+>> gfm("Commit 35d5f7c closes #1234")
+=> "Commit <a href="/gitlab/commits/35d5f7c">35d5f7c</a> closes <a href="/gitlab/issues/1234">#1234</a>"
+
+>> gfm(":trollface:")
+=> "<img alt=\":trollface:\" class=\"emoji\" src=\"/images/trollface.png" title=\":trollface:\" />
+
+ +
+ + + + + + + + + + + + + + + +
Methods
+
+ +
G
+
+
    + + +
  • + gfm +
  • + +
+
+ +
+ + + + + + + + + + + + + + +
Constants
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
REFERENCE_PATTERN=%r{ +(?<prefix>\W)? # Prefix +( # Reference +@(?<user>[a-zA-Z][a-zA-Z0-9_\-\.]*) # User name +|\#(?<issue>\d+) # Issue ID +|!(?<merge_request>\d+) # MR ID +|\$(?<snippet>\d+) # Snippet ID +|(?<commit>[\h]{6,40}) # Commit ID +) +(?<suffix>\W)? # Suffix +}x.freeze
 
TYPES=[:user, :issue, :merge_request, :snippet, :commit].freeze
 
EMOJI_PATTERN=%r{(:(\S+):)}.freeze
 
+ + + + + +
Attributes
+ + + + + + + + +
+ [R] + html_options
+ + + + + +
Instance Public methods
+ +
+
+ + gfm(text, html_options = {}) + + +
+ + +
+

Public: Parse the provided text with GitLab-Flavored Markdown

+ +

text - the source text #html_options - extra +options for the reference links as given to link_to

+ +

Note: reference links will only be generated if @project is set

+
+ + + + + + +
+ + +
+
# File lib/gitlab/markdown.rb, line 52
+def gfm(text, html_options = {})
+  return text if text.nil?
+
+  # Duplicate the string so we don't alter the original, then call to_str
+  # to cast it back to a String instead of a SafeBuffer. This is required
+  # for gsub calls to work as we need them to.
+  text = text.dup.to_str
+
+  @html_options = html_options
+
+  # Extract pre blocks so they are not altered
+  # from http://github.github.com/github-flavored-markdown/
+  extractions = {}
+  text.gsub!(%r{<pre>.*?</pre>|<code>.*?</code>}) do |match|
+    md5 = Digest::MD5.hexdigest(match)
+    extractions[md5] = match
+    "{gfm-extraction-#{md5}}"
+  end
+
+  # TODO: add popups with additional information
+
+  text = parse(text)
+
+  # Insert pre block extractions
+  text.gsub!(%r\{gfm-extraction-(\h{32})\}/) do
+    extractions[$1]
+  end
+
+  sanitize text.html_safe, attributes: ActionView::Base.sanitized_allowed_attributes + %w(id class)
+end
+
+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/Gitlab/MergeRequests.html b/doc/code/classes/Gitlab/MergeRequests.html new file mode 100644 index 00000000..556f2b01 --- /dev/null +++ b/doc/code/classes/Gitlab/MergeRequests.html @@ -0,0 +1,82 @@ + + + + + Gitlab::MergeRequests + + + + + + + + + + + + + +
+
+ +
+ +

MergeRequest API

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/Gitlab/Milestones.html b/doc/code/classes/Gitlab/Milestones.html new file mode 100644 index 00000000..4226dab3 --- /dev/null +++ b/doc/code/classes/Gitlab/Milestones.html @@ -0,0 +1,82 @@ + + + + + Gitlab::Milestones + + + + + + + + + + + + + +
+
+ +
+ +

Milestones API

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/Gitlab/Notes.html b/doc/code/classes/Gitlab/Notes.html new file mode 100644 index 00000000..90d3e7af --- /dev/null +++ b/doc/code/classes/Gitlab/Notes.html @@ -0,0 +1,100 @@ + + + + + Gitlab::Notes + + + + + + + + + + + + + +
+
+ +
+ +

Notes API

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
Constants
+ + + + + + + + + + + + + + +
NOTEABLE_TYPES=[Issue, Snippet]
 
+ + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/Gitlab/ProjectMover.html b/doc/code/classes/Gitlab/ProjectMover.html new file mode 100644 index 00000000..d13cf13d --- /dev/null +++ b/doc/code/classes/Gitlab/ProjectMover.html @@ -0,0 +1,290 @@ + + + + + Gitlab::ProjectMover + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + +
Namespace
+ + + + + + +
Methods
+
+ +
E
+
+ +
+ +
L
+
+ +
+ +
N
+
+
    + + +
  • + new +
  • + +
+
+ +
+ + + + + + + + + + + + + + + + + +
Attributes
+ + + + + + + + + + + + + + + + + + + + +
+ [R] + new_dir
+ [R] + old_dir
+ [R] + project
+ + + + + +
Class Public methods
+ +
+
+ + new(project, old_dir, new_dir) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File lib/gitlab/project_mover.rb, line 10
+def initialize(project, old_dir, new_dir)
+  @project = project
+  @old_dir = old_dir
+  @new_dir = new_dir
+end
+
+
+ +
+ +
Instance Public methods
+ +
+
+ + execute() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File lib/gitlab/project_mover.rb, line 16
+def execute
+  # Create new dir if missing
+  new_dir_path = File.join(Gitlab.config.gitolite.repos_path, new_dir)
+  system("mkdir -m 770 #{new_dir_path}") unless File.exists?(new_dir_path)
+
+  old_path = File.join(Gitlab.config.gitolite.repos_path, old_dir, "#{project.path}.git")
+  new_path = File.join(new_dir_path, "#{project.path}.git")
+
+  if File.exists? new_path
+    raise ProjectMoveError.new("Destination #{new_path} already exists")
+  end
+
+  if system("mv #{old_path} #{new_path}")
+    log_info "Project #{project.name} was moved from #{old_path} to #{new_path}"
+    true
+  else
+    message = "Project #{project.name} cannot be moved from #{old_path} to #{new_path}"
+    log_info "Error! #{message}"
+    raise ProjectMoveError.new(message)
+  end
+end
+
+
+ +
+ +
Instance Protected methods
+ +
+
+ + log_info(message) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File lib/gitlab/project_mover.rb, line 40
+def log_info message
+  Gitlab::AppLogger.info message
+end
+
+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/Gitlab/ProjectMover/ProjectMoveError.html b/doc/code/classes/Gitlab/ProjectMover/ProjectMoveError.html new file mode 100644 index 00000000..0071ba0c --- /dev/null +++ b/doc/code/classes/Gitlab/ProjectMover/ProjectMoveError.html @@ -0,0 +1,76 @@ + + + + + Gitlab::ProjectMover::ProjectMoveError + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/Gitlab/Projects.html b/doc/code/classes/Gitlab/Projects.html new file mode 100644 index 00000000..9005134e --- /dev/null +++ b/doc/code/classes/Gitlab/Projects.html @@ -0,0 +1,82 @@ + + + + + Gitlab::Projects + + + + + + + + + + + + + +
+
+ +
+ +

Projects API

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/Gitlab/Regex.html b/doc/code/classes/Gitlab/Regex.html new file mode 100644 index 00000000..674df322 --- /dev/null +++ b/doc/code/classes/Gitlab/Regex.html @@ -0,0 +1,261 @@ + + + + + Gitlab::Regex + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + +
Methods
+
+ +
D
+
+ +
+ +
P
+
+ +
+ +
U
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + +
Instance Public methods
+ +
+
+ + path_regex() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File lib/gitlab/regex.rb, line 13
+def path_regex
+  default_regex
+end
+
+
+ +
+ +
+
+ + project_name_regex() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File lib/gitlab/regex.rb, line 9
+def project_name_regex
+  %r\A[a-zA-Z][a-zA-Z0-9_\-\. ]*\z/
+end
+
+
+ +
+ +
+
+ + username_regex() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File lib/gitlab/regex.rb, line 5
+def username_regex
+  default_regex
+end
+
+
+ +
+ +
Instance Protected methods
+ +
+
+ + default_regex() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File lib/gitlab/regex.rb, line 19
+def default_regex
+  %r\A[a-zA-Z][a-zA-Z0-9_\-\.]*\z/
+end
+
+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/Gitlab/Satellite.html b/doc/code/classes/Gitlab/Satellite.html new file mode 100644 index 00000000..943bbf8e --- /dev/null +++ b/doc/code/classes/Gitlab/Satellite.html @@ -0,0 +1,102 @@ + + + + + Gitlab::Satellite + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/Gitlab/Satellite/Action.html b/doc/code/classes/Gitlab/Satellite/Action.html new file mode 100644 index 00000000..abe7411e --- /dev/null +++ b/doc/code/classes/Gitlab/Satellite/Action.html @@ -0,0 +1,305 @@ + + + + + Gitlab::Satellite::Action + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + +
Methods
+
+ +
I
+
+ +
+ +
N
+
+
    + + +
  • + new +
  • + +
+
+ +
P
+
+ +
+ +
+ + + + + + + + + + + + + + +
Constants
+ + + + + + + + + + + + + + +
DEFAULT_OPTIONS={ git_timeout: 30.seconds }
 
+ + + + + +
Attributes
+ + + + + + + + + + + + + + + + + + + + +
+ [RW] + options
+ [RW] + project
+ [RW] + user
+ + + + + +
Class Public methods
+ +
+
+ + new(user, project, options = {}) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File lib/gitlab/satellite/action.rb, line 8
+def initialize(user, project, options = {})
+  @options = DEFAULT_OPTIONS.merge(options)
+  @project = project
+  @user = user
+end
+
+
+ +
+ +
Instance Protected methods
+ +
+
+ + in_locked_and_timed_satellite() + + +
+ + +
+
  • +

    Sets a 30s timeout for Git

    +
  • +

    Locks the satellite repo

    +
  • +

    Yields the prepared satellite repo

    +
+
+ + + + + + +
+ + +
+
# File lib/gitlab/satellite/action.rb, line 19
+def in_locked_and_timed_satellite
+  Grit::Git.with_timeout(options[:git_timeout]) do
+    project.satellite.lock do
+      return yield project.satellite.repo
+    end
+  end
+rescue Errno::ENOMEM => ex
+  Gitlab::GitLogger.error(ex.message)
+  return false
+rescue Grit::Git::GitTimeout => ex
+  Gitlab::GitLogger.error(ex.message)
+  return false
+end
+
+
+ +
+ +
+
+ + prepare_satellite!(repo) + + +
+ + +
+
  • +

    Clears the satellite

    +
  • +

    Updates the satellite from Gitolite

    +
  • +

    Sets up Git variables for the user

    +
+ +

Note: use this within in_locked_and_timed_satellite

+
+ + + + + + +
+ + +
+
# File lib/gitlab/satellite/action.rb, line 38
+def prepare_satellite!(repo)
+  project.satellite.clear_and_update!
+
+  repo.git.config({}, "user.name", user.name)
+  repo.git.config({}, "user.email", user.email)
+end
+
+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/Gitlab/Satellite/EditFileAction.html b/doc/code/classes/Gitlab/Satellite/EditFileAction.html new file mode 100644 index 00000000..3a35aa22 --- /dev/null +++ b/doc/code/classes/Gitlab/Satellite/EditFileAction.html @@ -0,0 +1,284 @@ + + + + + Gitlab::Satellite::EditFileAction + + + + + + + + + + + + + +
+
+ +
+ +

GitLab server-side file update and commit

+ +
+ + + + + + + + + + + + + + + +
Methods
+
+ +
C
+
+ +
+ +
N
+
+
    + + +
  • + new +
  • + +
+
+ +
+ + + + + + + + + + + + + + + + + +
Attributes
+ + + + + + + + + + + + + + +
+ [RW] + file_path
+ [RW] + ref
+ + + + + +
Class Public methods
+ +
+
+ + new(user, project, ref, file_path) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File lib/gitlab/satellite/edit_file_action.rb, line 7
+def initialize(user, project, ref, file_path)
+  super user, project, git_timeout: 10.seconds
+  @file_path = file_path
+  @ref = ref
+end
+
+
+ +
+ +
Instance Public methods
+ +
+
+ + commit!(content, commit_message, last_commit) + + +
+ + +
+

Updates the files content and creates a new commit for it

+ +

Returns false if the ref has been updated while editing the file Returns +false if commiting the change fails Returns false if pushing from the +satellite to Gitolite failed or was rejected +Returns true otherwise

+
+ + + + + + +
+ + +
+
# File lib/gitlab/satellite/edit_file_action.rb, line 19
+def commit!(content, commit_message, last_commit)
+  return false unless can_edit?(last_commit)
+
+  in_locked_and_timed_satellite do |repo|
+    prepare_satellite!(repo)
+
+    # create target branch in satellite at the corresponding commit from Gitolite
+    repo.git.checkout({raise: true, timeout: true, b: true}, ref, "origin/#{ref}")
+
+    # update the file in the satellite's working dir
+    file_path_in_satellite = File.join(repo.working_dir, file_path)
+    File.open(file_path_in_satellite, 'w') { |f| f.write(content) }
+
+    # commit the changes
+    # will raise CommandFailed when commit fails
+    repo.git.commit(raise: true, timeout: true, a: true, m: commit_message)
+
+
+    # push commit back to Gitolite
+    # will raise CommandFailed when push fails
+    repo.git.push({raise: true, timeout: true}, :origin, ref)
+
+    # everything worked
+    true
+  end
+rescue Grit::Git::CommandFailed => ex
+  Gitlab::GitLogger.error(ex.message)
+  false
+end
+
+
+ +
+ +
Instance Protected methods
+ +
+
+ + can_edit?(last_commit) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File lib/gitlab/satellite/edit_file_action.rb, line 51
+def can_edit?(last_commit)
+  current_last_commit = @project.last_commit_for(ref, file_path).sha
+  last_commit == current_last_commit
+end
+
+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/Gitlab/Satellite/MergeAction.html b/doc/code/classes/Gitlab/Satellite/MergeAction.html new file mode 100644 index 00000000..064c4f06 --- /dev/null +++ b/doc/code/classes/Gitlab/Satellite/MergeAction.html @@ -0,0 +1,274 @@ + + + + + Gitlab::Satellite::MergeAction + + + + + + + + + + + + + +
+
+ +
+ +

GitLab server-side merge

+ +
+ + + + + + + + + + + + + + + +
Methods
+
+ +
C
+
+ +
+ +
M
+
+ +
+ +
N
+
+
    + + +
  • + new +
  • + +
+
+ +
+ + + + + + + + + + + + + + + + + +
Attributes
+ + + + + + + + +
+ [RW] + merge_request
+ + + + + +
Class Public methods
+ +
+
+ + new(user, merge_request) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File lib/gitlab/satellite/merge_action.rb, line 7
+def initialize(user, merge_request)
+  super user, merge_request.project
+  @merge_request = merge_request
+end
+
+
+ +
+ +
Instance Public methods
+ +
+
+ + can_be_merged?() + + +
+ + +
+

Checks if a merge request can be executed without user interaction

+
+ + + + + + +
+ + +
+
# File lib/gitlab/satellite/merge_action.rb, line 13
+def can_be_merged?
+  in_locked_and_timed_satellite do |merge_repo|
+    merge_in_satellite!(merge_repo)
+  end
+end
+
+
+ +
+ +
+
+ + merge!() + + +
+ + +
+

Merges the source branch into the target branch in the satellite and pushes +it back to Gitolite. It also removes the +source branch if requested in the merge request.

+ +

Returns false if the merge produced conflicts Returns false if pushing from +the satellite to Gitolite failed or was +rejected Returns true otherwise

+
+ + + + + + +
+ + +
+
# File lib/gitlab/satellite/merge_action.rb, line 26
+def merge!
+  in_locked_and_timed_satellite do |merge_repo|
+    if merge_in_satellite!(merge_repo)
+      # push merge back to Gitolite
+      # will raise CommandFailed when push fails
+      merge_repo.git.push({raise: true, timeout: true}, :origin, merge_request.target_branch)
+
+      # remove source branch
+      if merge_request.should_remove_source_branch && !project.root_ref?(merge_request.source_branch)
+        # will raise CommandFailed when push fails
+        merge_repo.git.push({raise: true, timeout: true}, :origin, ":#{merge_request.source_branch}")
+      end
+
+      # merge, push and branch removal successful
+      true
+    end
+  end
+rescue Grit::Git::CommandFailed => ex
+  Gitlab::GitLogger.error(ex.message)
+  false
+end
+
+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/Gitlab/Satellite/Satellite.html b/doc/code/classes/Gitlab/Satellite/Satellite.html new file mode 100644 index 00000000..86d82e6a --- /dev/null +++ b/doc/code/classes/Gitlab/Satellite/Satellite.html @@ -0,0 +1,506 @@ + + + + + Gitlab::Satellite::Satellite + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + +
Methods
+
+ +
C
+
+ +
+ +
E
+
+ +
+ +
L
+
+ +
+ +
N
+
+
    + + +
  • + new +
  • + +
+
+ +
P
+
+
    + + +
  • + path +
  • + +
+
+ +
R
+
+
    + + +
  • + repo +
  • + +
+
+ +
+ + + + + + + + + + + + + + +
Constants
+ + + + + + + + + + + + + + +
PARKING_BRANCH="__parking_branch"
 
+ + + + + +
Attributes
+ + + + + + + + +
+ [RW] + project
+ + + + + +
Class Public methods
+ +
+
+ + new(project) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File lib/gitlab/satellite/satellite.rb, line 8
+def initialize(project)
+  @project = project
+end
+
+
+ +
+ +
Instance Public methods
+ +
+
+ + clear_and_update!() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File lib/gitlab/satellite/satellite.rb, line 12
+def clear_and_update!
+  raise "Satellite doesn't exist" unless exists?
+
+  delete_heads!
+  clear_working_dir!
+  update_from_source!
+end
+
+
+ +
+ +
+
+ + create() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File lib/gitlab/satellite/satellite.rb, line 20
+def create
+  create_cmd = "git clone #{project.url_to_repo} #{path}"
+  if system(create_cmd)
+    true
+  else
+    Gitlab::GitLogger.error("Failed to create satellite for #{project.name_with_namespace}")
+    false
+  end
+end
+
+
+ +
+ +
+
+ + exists?() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File lib/gitlab/satellite/satellite.rb, line 30
+def exists?
+  File.exists? path
+end
+
+
+ +
+ +
+
+ + lock() + + +
+ + +
+
  • +

    Locks the satellite

    +
  • +

    Changes the current directory to the satellite’s working dir

    +
  • +

    Yields

    +
+
+ + + + + + +
+ + +
+
# File lib/gitlab/satellite/satellite.rb, line 37
+def lock
+  raise "Satellite doesn't exist" unless exists?
+
+  File.open(lock_file, "w+") do |f|
+    f.flock(File::LOCK_EX)
+
+    Dir.chdir(path) do
+      return yield
+    end
+  end
+end
+
+
+ +
+ +
+
+ + lock_file() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File lib/gitlab/satellite/satellite.rb, line 49
+def lock_file
+  Rails.root.join("tmp", "satellite_#{project.id}.lock")
+end
+
+
+ +
+ +
+
+ + path() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File lib/gitlab/satellite/satellite.rb, line 53
+def path
+  Rails.root.join("tmp", "repo_satellites", project.path_with_namespace)
+end
+
+
+ +
+ +
+
+ + repo() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File lib/gitlab/satellite/satellite.rb, line 57
+def repo
+  raise "Satellite doesn't exist" unless exists?
+
+  @repo ||= Grit::Repo.new(path)
+end
+
+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/Gitlab/Seeder.html b/doc/code/classes/Gitlab/Seeder.html new file mode 100644 index 00000000..a62c96a5 --- /dev/null +++ b/doc/code/classes/Gitlab/Seeder.html @@ -0,0 +1,134 @@ + + + + + Gitlab::Seeder + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + +
Methods
+
+ +
Q
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + +
Class Public methods
+ +
+
+ + quiet() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File lib/gitlab/seeder.rb, line 3
+def self.quiet
+  SeedFu.quiet = true
+  yield
+  SeedFu.quiet = false
+  puts "\nOK".green
+end
+
+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/Gitlab/Session.html b/doc/code/classes/Gitlab/Session.html new file mode 100644 index 00000000..ad14adc0 --- /dev/null +++ b/doc/code/classes/Gitlab/Session.html @@ -0,0 +1,82 @@ + + + + + Gitlab::Session + + + + + + + + + + + + + +
+
+ +
+ +

Users API

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/Gitlab/Theme.html b/doc/code/classes/Gitlab/Theme.html new file mode 100644 index 00000000..8f918b35 --- /dev/null +++ b/doc/code/classes/Gitlab/Theme.html @@ -0,0 +1,141 @@ + + + + + Gitlab::Theme + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + +
Methods
+
+ +
C
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + +
Class Public methods
+ +
+
+ + css_class_by_id(id) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File lib/gitlab/theme.rb, line 3
+def self.css_class_by_id(id)
+  themes = {
+    1 => "ui_basic",
+    2 => "ui_mars",
+    3 => "ui_modern",
+    4 => "ui_gray",
+    5 => "ui_color"
+  }
+
+  id ||= 1
+
+  return themes[id]
+end
+
+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/Gitlab/Users.html b/doc/code/classes/Gitlab/Users.html new file mode 100644 index 00000000..50ba3131 --- /dev/null +++ b/doc/code/classes/Gitlab/Users.html @@ -0,0 +1,82 @@ + + + + + Gitlab::Users + + + + + + + + + + + + + +
+
+ +
+ +

Users API

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/GitlabCiService.html b/doc/code/classes/GitlabCiService.html new file mode 100644 index 00000000..a56f614f --- /dev/null +++ b/doc/code/classes/GitlabCiService.html @@ -0,0 +1,371 @@ + + + + + GitlabCiService + + + + + + + + + + + + + +
+
+ +
+ +

Schema Information

+ +

Table name: services

+ +
id          :integer          not null, primary key
+type        :string(255)
+title       :string(255)
+token       :string(255)
+project_id  :integer          not null
+created_at  :datetime         not null
+updated_at  :datetime         not null
+active      :boolean          default(FALSE), not null
+project_url :string(255)
+ +
+ + + + + + + + + + + + + + + +
Methods
+
+ +
A
+
+ +
+ +
B
+
+ +
+ +
C
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + +
Instance Public methods
+ +
+
+ + activated?() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/gitlab_ci_service.rb, line 26
+def activated?
+  active
+end
+
+
+ +
+ +
+
+ + build_page(sha) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/gitlab_ci_service.rb, line 54
+def build_page sha
+  project_url + "/builds/#{sha}"
+end
+
+
+ +
+ +
+
+ + commit_badge_path(sha) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/gitlab_ci_service.rb, line 36
+def commit_badge_path sha
+  project_url + "/status?sha=#{sha}"
+end
+
+
+ +
+ +
+
+ + commit_status(sha) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/gitlab_ci_service.rb, line 44
+def commit_status sha
+  response = HTTParty.get(commit_status_path(sha))
+
+  if response.code == 200 and response["status"]
+    response["status"]
+  else
+    :error
+  end
+end
+
+
+ +
+ +
+
+ + commit_status_path(sha) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/gitlab_ci_service.rb, line 40
+def commit_status_path sha
+  project_url + "/builds/#{sha}/status.json?token=#{token}"
+end
+
+
+ +
+ +
+
+ + compose_service_hook() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/gitlab_ci_service.rb, line 30
+def compose_service_hook
+  hook = service_hook || build_service_hook
+  hook.url = [project_url, "/build", "?token=#{token}"].join("")
+  hook.save
+end
+
+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/GitlabMarkdownHelper.html b/doc/code/classes/GitlabMarkdownHelper.html new file mode 100644 index 00000000..32ae5f82 --- /dev/null +++ b/doc/code/classes/GitlabMarkdownHelper.html @@ -0,0 +1,222 @@ + + + + + GitlabMarkdownHelper + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + +
Methods
+
+ +
L
+
+ +
+ +
M
+
+ +
+ +
+ + + + +
Included Modules
+ + + + + + + + + + + + + + + + + + + +
Instance Public methods
+ +
+ + + +
+

Use this in places where you would normally use link_to(gfm(…), …).

+ +

It solves a problem occurring with nested links (i.e. “<a>outer text +<a>gfm ref</a> more outer text</a>”). This will not be +interpreted as intended. Browsers will parse something like “<a>outer +text </a><a>gfm ref</a> more outer text” (notice the last +part is not linked any more). #link_to_gfm +corrects that. It wraps all parts to explicitly produce the correct linking +behavior (i.e. “<a>outer text </a><a>gfm +ref</a><a> more outer text</a>”).

+
+ + + + + + +
+ + + +
+ +
+ +
+
+ + markdown(text) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/helpers/gitlab_markdown_helper.rb, line 25
+def markdown(text)
+  unless @markdown
+    gitlab_renderer = Redcarpet::Render::GitlabHTML.new(self,
+                        # see https://github.com/vmg/redcarpet#darling-i-packed-you-a-couple-renderers-for-lunch-
+                        filter_html: true,
+                        with_toc_data: true,
+                        hard_wrap: true)
+    @markdown = Redcarpet::Markdown.new(gitlab_renderer,
+                    # see https://github.com/vmg/redcarpet#and-its-like-really-simple-to-use
+                    no_intra_emphasis: true,
+                    tables: true,
+                    fenced_code_blocks: true,
+                    autolink: true,
+                    strikethrough: true,
+                    lax_html_blocks: true,
+                    space_after_headers: true,
+                    superscript: true)
+  end
+
+  @markdown.render(text).html_safe
+end
+
+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/Grack.html b/doc/code/classes/Grack.html new file mode 100644 index 00000000..9261c356 --- /dev/null +++ b/doc/code/classes/Grack.html @@ -0,0 +1,81 @@ + + + + + Grack + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/Grack/Auth.html b/doc/code/classes/Grack/Auth.html new file mode 100644 index 00000000..a1350e2f --- /dev/null +++ b/doc/code/classes/Grack/Auth.html @@ -0,0 +1,419 @@ + + + + + Grack::Auth + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + +
Methods
+
+ +
A
+
+ +
+ +
C
+
+ +
+ +
V
+
+ +
+ +
+ + + + + + + + + + + + + + + + + +
Attributes
+ + + + + + + + + + + + + + +
+ [RW] + project
+ [RW] + user
+ + + + + +
Instance Public methods
+ +
+
+ + can?(object, action, subject) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File lib/gitlab/backend/grack_auth.rb, line 56
+def can?(object, action, subject)
+  abilities.allowed?(object, action, subject)
+end
+
+
+ +
+ +
+
+ + current_ref() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File lib/gitlab/backend/grack_auth.rb, line 60
+def current_ref
+  if @env["HTTP_CONTENT_ENCODING"] =~ %rgzip/
+    input = Zlib::GzipReader.new(@request.body).read
+  else
+    input = @request.body.read
+  end
+  # Need to reset seek point
+  @request.body.rewind
+  %rrefs\/heads\/([\w\.-]+)/.match(input).to_a.first
+end
+
+
+ +
+ +
+
+ + valid?() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File lib/gitlab/backend/grack_auth.rb, line 5
+def valid?
+  # Authentication with username and password
+  login, password = @auth.credentials
+
+  self.user = User.find_by_email(login) || User.find_by_username(login)
+
+  return false unless user.try(:valid_password?, password)
+
+  email = user.email
+
+  # Set GL_USER env variable
+  ENV['GL_USER'] = email
+  # Pass Gitolite update hook
+  ENV['GL_BYPASS_UPDATE_HOOK'] = "true"
+
+  # Find project by PATH_INFO from env
+  if m = %r^\/([\w\.\/-]+)\.git/.match(@request.path_info).to_a
+    self.project = Project.find_with_namespace(m.last)
+    return false unless project
+  end
+
+  # Git upload and receive
+  if @request.get?
+    validate_get_request
+  elsif @request.post?
+    validate_post_request
+  else
+    false
+  end
+end
+
+
+ +
+ +
+
+ + validate_get_request() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File lib/gitlab/backend/grack_auth.rb, line 36
+def validate_get_request
+  can?(user, :download_code, project)
+end
+
+
+ +
+ +
+
+ + validate_post_request() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File lib/gitlab/backend/grack_auth.rb, line 40
+def validate_post_request
+  if @request.path_info.end_with?('git-upload-pack')
+    can?(user, :download_code, project)
+  elsif @request.path_info.end_with?('git-receive-pack')
+    action = if project.protected_branch?(current_ref)
+               :push_code_to_protected_branches
+             else
+               :push_code
+             end
+
+    can?(user, action, project)
+  else
+    false
+  end
+end
+
+
+ +
+ +
Instance Protected methods
+ +
+
+ + abilities() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File lib/gitlab/backend/grack_auth.rb, line 73
+def abilities
+  @abilities ||= begin
+                   abilities = Six.new
+                   abilities << Ability
+                   abilities
+                 end
+end
+
+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/Group.html b/doc/code/classes/Group.html new file mode 100644 index 00000000..cf61c3ea --- /dev/null +++ b/doc/code/classes/Group.html @@ -0,0 +1,294 @@ + + + + + Group + + + + + + + + + + + + + +
+
+ +
+ +

Schema Information

+ +

Table name: namespaces

+ +
id         :integer          not null, primary key
+name       :string(255)      not null
+path       :string(255)      not null
+owner_id   :integer          not null
+created_at :datetime         not null
+updated_at :datetime         not null
+type       :string(255)
+ +
+ + + + + + + + + + + + + + + +
Methods
+
+ +
A
+
+ +
+ +
H
+
+ +
+ +
T
+
+ +
+ +
U
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + +
Instance Public methods
+ +
+
+ + add_users_to_project_teams(user_ids, project_access) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/group.rb, line 15
+def add_users_to_project_teams(user_ids, project_access)
+  UsersProject.add_users_into_projects(
+    projects.map(&:id),
+    user_ids,
+    project_access
+  )
+end
+
+
+ +
+ +
+
+ + human_name() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/group.rb, line 29
+def human_name
+  name
+end
+
+
+ +
+ +
+
+ + truncate_teams() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/group.rb, line 33
+def truncate_teams
+  UsersProject.truncate_teams(project_ids)
+end
+
+
+ +
+ +
+
+ + users() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/group.rb, line 23
+def users
+  users = User.joins(:users_projects).where(users_projects: {project_id: project_ids})
+  users = users << owner
+  users.uniq
+end
+
+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/GroupsController.html b/doc/code/classes/GroupsController.html new file mode 100644 index 00000000..dbca1708 --- /dev/null +++ b/doc/code/classes/GroupsController.html @@ -0,0 +1,566 @@ + + + + + GroupsController + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + +
Methods
+
+ +
A
+
+ +
+ +
G
+
+ +
+ +
I
+
+ +
+ +
M
+
+ +
+ +
P
+
+ +
+ +
S
+
+ +
+ +
T
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + +
Instance Public methods
+ +
+
+ + issues() + + +
+ + +
+

Get only assigned issues

+
+ + + + + + +
+ + +
+
# File app/controllers/groups_controller.rb, line 29
+def issues
+  @user   = current_user
+  @issues = current_user.assigned_issues.opened
+  @issues = @issues.of_group(@group).recent.page(params[:page]).per(20)
+  @issues = @issues.includes(:author, :project)
+
+  respond_to do |format|
+    format.html
+    format.atom { render layout: false }
+  end
+end
+
+
+ +
+ +
+
+ + merge_requests() + + +
+ + +
+

Get authored or assigned open merge requests

+
+ + + + + + +
+ + +
+
# File app/controllers/groups_controller.rb, line 23
+def merge_requests
+  @merge_requests = current_user.cared_merge_requests.opened
+  @merge_requests = @merge_requests.of_group(@group).recent.page(params[:page]).per(20)
+end
+
+
+ +
+ +
+
+ + people() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/groups_controller.rb, line 49
+def people
+  @project = group.projects.find(params[:project_id]) if params[:project_id]
+  @users = @project ? @project.users : group.users
+  @users.sort_by!(&:name)
+
+  if @project
+    @team_member = @project.users_projects.new
+  else
+    @team_member = UsersProject.new
+  end
+end
+
+
+ +
+ +
+ + + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/groups_controller.rb, line 41
+def search
+  result = SearchContext.new(project_ids, params).execute
+
+  @projects       = result[:projects]
+  @merge_requests = result[:merge_requests]
+  @issues         = result[:issues]
+end
+
+
+ +
+ +
+
+ + show() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/groups_controller.rb, line 11
+def show
+  @events = Event.in_projects(project_ids).limit(20).offset(params[:offset] || 0)
+  @last_push = current_user.recent_push
+
+  respond_to do |format|
+    format.html
+    format.js
+    format.atom { render layout: false }
+  end
+end
+
+
+ +
+ +
+
+ + team_members() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/groups_controller.rb, line 61
+def team_members
+  @group.add_users_to_project_teams(params[:user_ids], params[:project_access])
+  redirect_to people_group_path(@group), notice: 'Users was successfully added.'
+end
+
+
+ +
+ +
Instance Protected methods
+ +
+
+ + authorize_read_group!() + + +
+ + +
+

Dont allow unauthorized access to group

+
+ + + + + + +
+ + +
+
# File app/controllers/groups_controller.rb, line 81
+def authorize_read_group!
+  unless projects.present? or can?(current_user, :manage_group, @group)
+    return render_404
+  end
+end
+
+
+ +
+ +
+
+ + group() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/groups_controller.rb, line 68
+def group
+  @group ||= Group.find_by_path(params[:id])
+end
+
+
+ +
+ +
+
+ + project_ids() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/groups_controller.rb, line 76
+def project_ids
+  projects.map(&:id)
+end
+
+
+ +
+ +
+
+ + projects() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/groups_controller.rb, line 72
+def projects
+  @projects ||= group.projects.authorized_for(current_user).sorted_by_activity
+end
+
+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/HelpController.html b/doc/code/classes/HelpController.html new file mode 100644 index 00000000..fbb76563 --- /dev/null +++ b/doc/code/classes/HelpController.html @@ -0,0 +1,130 @@ + + + + + HelpController + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + +
Methods
+
+ +
I
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + +
Instance Public methods
+ +
+
+ + index() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/help_controller.rb, line 2
+def index
+end
+
+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/HooksController.html b/doc/code/classes/HooksController.html new file mode 100644 index 00000000..511e05f0 --- /dev/null +++ b/doc/code/classes/HooksController.html @@ -0,0 +1,286 @@ + + + + + HooksController + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + +
Methods
+
+ +
C
+
+ +
+ +
D
+
+ +
+ +
I
+
+ +
+ +
T
+
+
    + + +
  • + test +
  • + +
+
+ +
+ + + + + + + + + + + + + + + + + + + + +
Instance Public methods
+ +
+
+ + create() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/hooks_controller.rb, line 13
+def create
+  @hook = @project.hooks.new(params[:hook])
+  @hook.save
+
+  if @hook.valid?
+    redirect_to project_hooks_path(@project)
+  else
+    @hooks = @project.hooks.all
+    render :index
+  end
+end
+
+
+ +
+ +
+
+ + destroy() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/hooks_controller.rb, line 31
+def destroy
+  @hook = @project.hooks.find(params[:id])
+  @hook.destroy
+
+  redirect_to project_hooks_path(@project)
+end
+
+
+ +
+ +
+
+ + index() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/hooks_controller.rb, line 8
+def index
+  @hooks = @project.hooks.all
+  @hook = ProjectHook.new
+end
+
+
+ +
+ +
+
+ + test() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/hooks_controller.rb, line 25
+def test
+  TestHookContext.new(project, current_user, params).execute
+
+  redirect_to :back
+end
+
+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/Issue.html b/doc/code/classes/Issue.html new file mode 100644 index 00000000..6f71ea72 --- /dev/null +++ b/doc/code/classes/Issue.html @@ -0,0 +1,174 @@ + + + + + Issue + + + + + + + + + + + + + +
+
+ +
+ +

Schema Information

+ +

Table name: issues

+ +
id           :integer          not null, primary key
+title        :string(255)
+assignee_id  :integer
+author_id    :integer
+project_id   :integer
+created_at   :datetime         not null
+updated_at   :datetime         not null
+closed       :boolean          default(FALSE), not null
+position     :integer          default(0)
+branch_name  :string(255)
+description  :text
+milestone_id :integer
+ +
+ + + + + + + + + + + + + + + +
Methods
+
+ +
O
+
+ +
+ +
+ + + + +
Included Modules
+ + + + + + + + + + + + + + + + + + + +
Class Public methods
+ +
+
+ + open_for(user) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/issue.rb, line 30
+def self.open_for(user)
+  opened.assigned(user)
+end
+
+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/IssueCommonality.html b/doc/code/classes/IssueCommonality.html new file mode 100644 index 00000000..7398308a --- /dev/null +++ b/doc/code/classes/IssueCommonality.html @@ -0,0 +1,356 @@ + + + + + IssueCommonality + + + + + + + + + + + + + +
+
+ +
+ +

Contains common functionality shared between Issues and MergeRequests

+ +
+ + + + + + + + + + + + +
Namespace
+ + + + + + +
Methods
+
+ +
I
+
+ +
+ +
N
+
+
    + + +
  • + new? +
  • + +
+
+ +
T
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + +
Instance Public methods
+ +
+
+ + is_assigned?() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/roles/issue_commonality.rb, line 51
+def is_assigned?
+  !!assignee_id
+end
+
+
+ +
+ +
+
+ + is_being_closed?() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/roles/issue_commonality.rb, line 59
+def is_being_closed?
+  closed_changed? && closed
+end
+
+
+ +
+ +
+
+ + is_being_reassigned?() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/roles/issue_commonality.rb, line 55
+def is_being_reassigned?
+  assignee_id_changed?
+end
+
+
+ +
+ +
+
+ + is_being_reopened?() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/roles/issue_commonality.rb, line 63
+def is_being_reopened?
+  closed_changed? && !closed
+end
+
+
+ +
+ +
+
+ + new?() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/roles/issue_commonality.rb, line 47
+def new?
+  today? && created_at == updated_at
+end
+
+
+ +
+ +
+
+ + today?() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/roles/issue_commonality.rb, line 43
+def today?
+  Date.today == created_at.to_date
+end
+
+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/IssueCommonality/ClassMethods.html b/doc/code/classes/IssueCommonality/ClassMethods.html new file mode 100644 index 00000000..5c3ca9b2 --- /dev/null +++ b/doc/code/classes/IssueCommonality/ClassMethods.html @@ -0,0 +1,125 @@ + + + + + IssueCommonality::ClassMethods + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + +
Methods
+
+ +
S
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + +
Instance Public methods
+ +
+ + + +
+ +
+ + + + + + +
+ + +
+
# File app/roles/issue_commonality.rb, line 38
+def search(query)
+  where("title like :query", query: "%#{query}%")
+end
+
+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/IssueObserver.html b/doc/code/classes/IssueObserver.html new file mode 100644 index 00000000..1600c0f0 --- /dev/null +++ b/doc/code/classes/IssueObserver.html @@ -0,0 +1,236 @@ + + + + + IssueObserver + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + +
Methods
+
+ +
A
+
+ +
+ +
S
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + +
Instance Public methods
+ +
+
+ + after_create(issue) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/observers/issue_observer.rb, line 4
+def after_create(issue)
+  if issue.assignee && issue.assignee != current_user
+    Notify.new_issue_email(issue.id).deliver
+  end
+end
+
+
+ +
+ +
+
+ + after_update(issue) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/observers/issue_observer.rb, line 10
+def after_update(issue)
+  send_reassigned_email(issue) if issue.is_being_reassigned?
+
+  status = nil
+  status = 'closed' if issue.is_being_closed?
+  status = 'reopened' if issue.is_being_reopened?
+  if status
+    Note.create_status_change_note(issue, current_user, status)
+    [issue.author, issue.assignee].compact.each do |recipient|
+      Notify.issue_status_changed_email(recipient.id, issue.id, status, current_user.id).deliver
+    end
+  end
+end
+
+
+ +
+ +
Instance Protected methods
+ +
+
+ + send_reassigned_email(issue) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/observers/issue_observer.rb, line 26
+def send_reassigned_email(issue)
+  recipient_ids = [issue.assignee_id, issue.assignee_id_was].keep_if {|id| id && id != current_user.id }
+
+  recipient_ids.each do |recipient_id|
+    Notify.reassigned_issue_email(recipient_id, issue.id, issue.assignee_id_was).deliver
+  end
+end
+
+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/IssuesBulkUpdateContext.html b/doc/code/classes/IssuesBulkUpdateContext.html new file mode 100644 index 00000000..0214d217 --- /dev/null +++ b/doc/code/classes/IssuesBulkUpdateContext.html @@ -0,0 +1,149 @@ + + + + + IssuesBulkUpdateContext + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + +
Methods
+
+ +
E
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + +
Instance Public methods
+ +
+
+ + execute() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/contexts/issues_bulk_update_context.rb, line 2
+def execute
+  update_data = params[:update]
+
+  issues_ids   = update_data[:issues_ids].split(",")
+  milestone_id = update_data[:milestone_id]
+  assignee_id  = update_data[:assignee_id]
+  status       = update_data[:status]
+
+  opts = {} 
+  opts[:milestone_id] = milestone_id if milestone_id.present?
+  opts[:assignee_id] = assignee_id if assignee_id.present?
+  opts[:closed] = (status == "closed") if status.present?
+
+  issues = Issue.where(id: issues_ids).all
+  issues = issues.select { |issue| can?(current_user, :modify_issue, issue) }
+  issues.each { |issue| issue.update_attributes(opts) }
+  { 
+    count: issues.count,
+    success: !issues.count.zero?
+  }
+end
+
+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/IssuesController.html b/doc/code/classes/IssuesController.html new file mode 100644 index 00000000..1e18d7a8 --- /dev/null +++ b/doc/code/classes/IssuesController.html @@ -0,0 +1,761 @@ + + + + + IssuesController + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + +
Methods
+
+ +
A
+
+ +
+ +
B
+
+ +
+ +
C
+
+ +
+ +
E
+
+
    + + +
  • + edit +
  • + +
+
+ +
I
+
+ +
+ +
M
+
+ +
+ +
N
+
+
    + + +
  • + new +
  • + +
+
+ +
S
+
+ +
+ +
U
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + +
Instance Public methods
+ +
+
+ + bulk_update() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/issues_controller.rb, line 99
+def bulk_update
+  result = IssuesBulkUpdateContext.new(project, current_user, params).execute
+  redirect_to :back, notice: "#{result[:count]} issues updated"
+end
+
+
+ +
+ +
+
+ + create() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/issues_controller.rb, line 45
+def create
+  @issue = @project.issues.new(params[:issue])
+  @issue.author = current_user
+  @issue.save
+
+  respond_to do |format|
+    format.html do
+      if @issue.valid?
+        redirect_to project_issue_path(@project, @issue)
+      else
+        render :new
+      end
+    end
+    format.js
+  end
+end
+
+
+ +
+ +
+
+ + edit() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/issues_controller.rb, line 32
+def edit
+  respond_with(@issue)
+end
+
+
+ +
+ +
+
+ + index() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/issues_controller.rb, line 16
+def index
+  @issues = issues_filtered
+  @issues = @issues.page(params[:page]).per(20)
+
+  respond_to do |format|
+    format.html # index.html.erb
+    format.js
+    format.atom { render layout: false }
+  end
+end
+
+
+ +
+ +
+
+ + new() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/issues_controller.rb, line 27
+def new
+  @issue = @project.issues.new(params[:issue])
+  respond_with(@issue)
+end
+
+
+ +
+ +
+ + + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/issues_controller.rb, line 89
+def search
+  terms = params['terms']
+
+  @issues = issues_filtered
+  @issues = @issues.where("title LIKE ?", "%#{terms}%") unless terms.blank?
+  @issues = @issues.page(params[:page]).per(100)
+
+  render partial: 'issues'
+end
+
+
+ +
+ +
+
+ + show() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/issues_controller.rb, line 36
+def show
+  @note = @project.notes.new(noteable: @issue)
+
+  respond_to do |format|
+    format.html
+    format.js
+  end
+end
+
+
+ +
+ +
+
+ + sort() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/issues_controller.rb, line 77
+def sort
+  return render_404 unless can?(current_user, :admin_issue, @project)
+
+  @issues = @project.issues.where(id: params['issue'])
+  @issues.each do |issue|
+    issue.position = params['issue'].index(issue.id.to_s) + 1
+    issue.save
+  end
+
+  render nothing: true
+end
+
+
+ +
+ +
+
+ + update() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/issues_controller.rb, line 62
+def update
+  @issue.update_attributes(params[:issue].merge(author_id_of_changes: current_user.id))
+
+  respond_to do |format|
+    format.js
+    format.html do
+      if @issue.valid?
+        redirect_to [@project, @issue]
+      else
+        render :edit
+      end
+    end
+  end
+end
+
+
+ +
+ +
Instance Protected methods
+ +
+
+ + authorize_admin_issue!() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/issues_controller.rb, line 114
+def authorize_admin_issue!
+  return render_404 unless can?(current_user, :admin_issue, @issue)
+end
+
+
+ +
+ +
+
+ + authorize_modify_issue!() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/issues_controller.rb, line 110
+def authorize_modify_issue!
+  return render_404 unless can?(current_user, :modify_issue, @issue)
+end
+
+
+ +
+ +
+
+ + issue() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/issues_controller.rb, line 106
+def issue
+  @issue ||= @project.issues.find(params[:id])
+end
+
+
+ +
+ +
+
+ + issues_filtered() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/issues_controller.rb, line 122
+def issues_filtered
+  @issues = IssuesListContext.new(project, current_user, params).execute
+end
+
+
+ +
+ +
+
+ + module_enabled() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/issues_controller.rb, line 118
+def module_enabled
+  return render_404 unless @project.issues_enabled
+end
+
+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/IssuesHelper.html b/doc/code/classes/IssuesHelper.html new file mode 100644 index 00000000..7b751045 --- /dev/null +++ b/doc/code/classes/IssuesHelper.html @@ -0,0 +1,401 @@ + + + + + IssuesHelper + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + +
Methods
+
+ +
I
+
+ +
+ +
L
+
+ +
+ +
P
+
+ +
+ +
U
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + +
Instance Public methods
+ +
+
+ + issue_css_classes(issue) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/helpers/issues_helper.rb, line 7
+def issue_css_classes issue
+  classes = "issue"
+  classes << " closed" if issue.closed
+  classes << " today" if issue.today?
+  classes
+end
+
+
+ +
+ +
+
+ + issue_tags() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/helpers/issues_helper.rb, line 14
+def issue_tags
+  @project.issues.tag_counts_on(:labels).map(&:name)
+end
+
+
+ +
+ +
+
+ + issues_active_milestones() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/helpers/issues_helper.rb, line 40
+def issues_active_milestones
+  @project.milestones.active.order("id desc").all
+end
+
+
+ +
+ +
+
+ + issues_filter() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/helpers/issues_helper.rb, line 25
+def issues_filter
+  {
+    all: "all",
+    closed: "closed",
+    to_me: "assigned-to-me",
+    open: "open"
+  }
+end
+
+
+ +
+ +
+
+ + labels_autocomplete_source() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/helpers/issues_helper.rb, line 34
+def labels_autocomplete_source
+  labels = @project.issues_labels.order('count DESC')
+  labels = labels.map{ |l| { label: l.name, value: l.name } }
+  labels.to_json
+end
+
+
+ +
+ +
+
+ + project_issues_filter_path(project, params = {}) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/helpers/issues_helper.rb, line 2
+def project_issues_filter_path project, params = {}
+  params[:f] ||= cookies['issue_filter']
+  project_issues_path project, params
+end
+
+
+ +
+ +
+
+ + unassigned_filter() + + +
+ + +
+

Returns an OpenStruct object suitable for use by +options_from_collection_for_select to allow filtering issues +by an unassigned User or Milestone

+
+ + + + + + +
+ + +
+
# File app/helpers/issues_helper.rb, line 20
+def unassigned_filter
+  # Milestone uses :title, Issue uses :name
+  OpenStruct.new(id: 0, title: 'Unspecified', name: 'Unassigned')
+end
+
+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/IssuesListContext.html b/doc/code/classes/IssuesListContext.html new file mode 100644 index 00000000..0298ec75 --- /dev/null +++ b/doc/code/classes/IssuesListContext.html @@ -0,0 +1,179 @@ + + + + + IssuesListContext + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + +
Methods
+
+ +
E
+
+ +
+ +
+ + + + +
Included Modules
+ + + + + + + + + + + + + + + + +
Attributes
+ + + + + + + + +
+ [RW] + issues
+ + + + + +
Instance Public methods
+ +
+
+ + execute() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/contexts/issues_list_context.rb, line 6
+def execute
+  @issues = case params[:f]
+            when issues_filter[:all] then @project.issues
+            when issues_filter[:closed] then @project.issues.closed
+            when issues_filter[:to_me] then @project.issues.opened.assigned(current_user)
+            else @project.issues.opened
+            end
+
+  @issues = @issues.tagged_with(params[:label_name]) if params[:label_name].present?
+  @issues = @issues.includes(:author, :project).order("updated_at")
+
+  # Filter by specific assignee_id (or lack thereof)?
+  if params[:assignee_id].present?
+    @issues = @issues.where(assignee_id: (params[:assignee_id] == '0' ? nil : params[:assignee_id]))
+  end
+
+  # Filter by specific milestone_id (or lack thereof)?
+  if params[:milestone_id].present?
+    @issues = @issues.where(milestone_id: (params[:milestone_id] == '0' ? nil : params[:milestone_id]))
+  end
+
+  @issues
+end
+
+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/Key.html b/doc/code/classes/Key.html new file mode 100644 index 00000000..0935e486 --- /dev/null +++ b/doc/code/classes/Key.html @@ -0,0 +1,429 @@ + + + + + Key + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + +
Methods
+
+ +
F
+
+ +
+ +
I
+
+ +
+ +
L
+
+ +
+ +
P
+
+ +
+ +
S
+
+ +
+ +
U
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + +
Instance Public methods
+ +
+
+ + fingerprintable_key() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/key.rb, line 44
+def fingerprintable_key
+  return true unless key # Don't test if there is no key.
+  # `ssh-keygen -lf /dev/stdin <<< "#{key}"` errors with: redirection unexpected
+  file = Tempfile.new('key_file')
+  begin
+    file.puts key
+    file.rewind
+    fingerprint_output = %xssh-keygen -lf #{file.path} 2>&1` # Catch stderr.
+  ensure
+    file.close
+    file.unlink # deletes the temp file
+  end
+  errors.add(:key, "can't be fingerprinted") if fingerprint_output.match("failed")
+end
+
+
+ +
+ +
+
+ + is_deploy_key() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/key.rb, line 67
+def is_deploy_key
+  true if project_id
+end
+
+
+ +
+ +
+
+ + last_deploy?() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/key.rb, line 80
+def last_deploy?
+  Key.where(identifier: identifier).count == 0
+end
+
+
+ +
+ +
+
+ + projects() + + +
+ + +
+

projects that has this key

+
+ + + + + + +
+ + +
+
# File app/models/key.rb, line 72
+def projects
+  if is_deploy_key
+    [project]
+  else
+    user.projects
+  end
+end
+
+
+ +
+ +
+
+ + set_identifier() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/key.rb, line 59
+def set_identifier
+  if is_deploy_key
+    self.identifier = "deploy_#{Digest::MD5.hexdigest(key)}"
+  else
+    self.identifier = "#{user.identifier}_#{Time.now.to_i}"
+  end
+end
+
+
+ +
+ +
+
+ + strip_white_space() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/key.rb, line 32
+def strip_white_space
+  self.key = self.key.strip unless self.key.blank?
+end
+
+
+ +
+ +
+
+ + unique_key() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/key.rb, line 36
+def unique_key
+  query = Key.where(key: key)
+  query = query.where('(project_id IS NULL OR project_id = ?)', project_id) if project_id
+  if (query.count > 0)
+    errors.add :key, 'already exist.'
+  end
+end
+
+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/KeyObserver.html b/doc/code/classes/KeyObserver.html new file mode 100644 index 00000000..1044ea2f --- /dev/null +++ b/doc/code/classes/KeyObserver.html @@ -0,0 +1,186 @@ + + + + + KeyObserver + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + +
Methods
+
+ +
A
+
+ +
+ +
+ + + + +
Included Modules
+ + + + + + + + + + + + + + + + + + + +
Instance Public methods
+ +
+
+ + after_destroy(key) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/observers/key_observer.rb, line 8
+def after_destroy(key)
+  return if key.is_deploy_key && !key.last_deploy?
+  git_host.remove_key(key.identifier, key.projects)
+end
+
+
+ +
+ +
+
+ + after_save(key) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/observers/key_observer.rb, line 4
+def after_save(key)
+  git_host.set_key(key.identifier, key.key, key.projects)
+end
+
+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/KeysController.html b/doc/code/classes/KeysController.html new file mode 100644 index 00000000..9caccb75 --- /dev/null +++ b/doc/code/classes/KeysController.html @@ -0,0 +1,330 @@ + + + + + KeysController + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + +
Methods
+
+ +
C
+
+ +
+ +
D
+
+ +
+ +
I
+
+ +
+ +
N
+
+
    + + +
  • + new +
  • + +
+
+ +
S
+
+
    + + +
  • + show +
  • + +
+
+ +
+ + + + + + + + + + + + + + + + + + + + +
Instance Public methods
+ +
+
+ + create() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/keys_controller.rb, line 19
+def create
+  @key = current_user.keys.new(params[:key])
+  @key.save
+
+  respond_with(@key)
+end
+
+
+ +
+ +
+
+ + destroy() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/keys_controller.rb, line 26
+def destroy
+  @key = current_user.keys.find(params[:id])
+  @key.destroy
+
+  respond_to do |format|
+    format.html { redirect_to keys_url }
+    format.js { render nothing: true }
+  end
+end
+
+
+ +
+ +
+
+ + index() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/keys_controller.rb, line 5
+def index
+  @keys = current_user.keys.all
+end
+
+
+ +
+ +
+
+ + new() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/keys_controller.rb, line 13
+def new
+  @key = current_user.keys.new
+
+  respond_with(@key)
+end
+
+
+ +
+ +
+
+ + show() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/keys_controller.rb, line 9
+def show
+  @key = current_user.keys.find(params[:id])
+end
+
+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/LabelsController.html b/doc/code/classes/LabelsController.html new file mode 100644 index 00000000..53d54c6b --- /dev/null +++ b/doc/code/classes/LabelsController.html @@ -0,0 +1,180 @@ + + + + + LabelsController + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + +
Methods
+
+ +
I
+
+ +
+ +
M
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + +
Instance Public methods
+ +
+
+ + index() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/labels_controller.rb, line 9
+def index
+  @labels = @project.issues_labels.order('count DESC')
+end
+
+
+ +
+ +
Instance Protected methods
+ +
+
+ + module_enabled() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/labels_controller.rb, line 15
+def module_enabled
+  return render_404 unless @project.issues_enabled
+end
+
+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/MergeRequest.html b/doc/code/classes/MergeRequest.html new file mode 100644 index 00000000..cd404609 --- /dev/null +++ b/doc/code/classes/MergeRequest.html @@ -0,0 +1,1569 @@ + + + + + MergeRequest + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + +
Methods
+
+ +
A
+
+ +
+ +
B
+
+ +
+ +
C
+
+ +
+ +
D
+
+ +
+ +
F
+
+ +
+ +
H
+
+ +
+ +
L
+
+ +
+ +
M
+
+ +
+ +
O
+
+ +
+ +
P
+
+ +
+ +
R
+
+ +
+ +
T
+
+ +
+ +
U
+
+ +
+ +
V
+
+ +
+ +
+ + + + +
Included Modules
+ + + + + + + + + + + + + +
Constants
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
BROKEN_DIFF="--broken-diff"
 
UNCHECKED=1
 
CAN_BE_MERGED=2
 
CANNOT_BE_MERGED=3
 
+ + + + + +
Attributes
+ + + + + + + + +
+ [RW] + should_remove_source_branch
+ + + + + +
Class Public methods
+ +
+
+ + find_all_by_branch(branch_name) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/merge_request.rb, line 47
+def self.find_all_by_branch(branch_name)
+  where("source_branch LIKE :branch OR target_branch LIKE :branch", branch: branch_name)
+end
+
+
+ +
+ +
+
+ + find_all_by_milestone(milestone) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/merge_request.rb, line 51
+def self.find_all_by_milestone(milestone)
+  where("milestone_id = :milestone_id", milestone_id: milestone)
+end
+
+
+ +
+ +
Instance Public methods
+ +
+
+ + automerge!(current_user) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/merge_request.rb, line 195
+def automerge!(current_user)
+  if Gitlab::Satellite::MergeAction.new(current_user, self).merge! && self.unmerged_commits.empty?
+    self.merge!(current_user.id)
+    true
+  end
+rescue
+  self.mark_as_unmergable
+  false
+end
+
+
+ +
+ +
+
+ + broken_diffs?() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/merge_request.rb, line 112
+def broken_diffs?
+  diffs == [BROKEN_DIFF]
+end
+
+
+ +
+ +
+
+ + can_be_merged?() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/merge_request.rb, line 84
+def can_be_merged?
+  state == CAN_BE_MERGED
+end
+
+
+ +
+ +
+
+ + check_if_can_be_merged() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/merge_request.rb, line 88
+def check_if_can_be_merged
+  self.state = if Gitlab::Satellite::MergeAction.new(self.author, self).can_be_merged?
+                 CAN_BE_MERGED
+               else
+                 CANNOT_BE_MERGED
+               end
+  self.save
+end
+
+
+ +
+ +
+
+ + closed_event() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/merge_request.rb, line 140
+def closed_event
+  self.project.events.where(target_id: self.id, target_type: "MergeRequest", action: Event::Closed).last
+end
+
+
+ +
+ +
+
+ + commits() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/merge_request.rb, line 144
+def commits
+  st_commits || []
+end
+
+
+ +
+ +
+
+ + diffs() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/merge_request.rb, line 97
+def diffs
+  st_diffs || []
+end
+
+
+ +
+ +
+
+ + human_state() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/merge_request.rb, line 55
+def human_state
+  states = {
+    CAN_BE_MERGED =>  "can_be_merged",
+    CANNOT_BE_MERGED => "cannot_be_merged",
+    UNCHECKED => "unchecked"
+  }
+  states[self.state]
+end
+
+
+ +
+ +
+
+ + last_commit() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/merge_request.rb, line 128
+def last_commit
+  commits.first
+end
+
+
+ +
+ +
+
+ + last_commit_short_sha() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/merge_request.rb, line 224
+def last_commit_short_sha
+  @last_commit_short_sha ||= last_commit.sha[0..10]
+end
+
+
+ +
+ +
+
+ + mark_as_merged!() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/merge_request.rb, line 157
+def mark_as_merged!
+  self.merged = true
+  self.closed = true
+  save
+end
+
+
+ +
+ +
+
+ + mark_as_unchecked() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/merge_request.rb, line 79
+def mark_as_unchecked
+  self.state = UNCHECKED
+  self.save
+end
+
+
+ +
+ +
+
+ + mark_as_unmergable() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/merge_request.rb, line 163
+def mark_as_unmergable
+  self.state = CANNOT_BE_MERGED
+  self.save
+end
+
+
+ +
+ +
+
+ + merge!(user_id) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/merge_request.rb, line 184
+def merge!(user_id)
+  self.mark_as_merged!
+  Event.create(
+    project: self.project,
+    action: Event::Merged,
+    target_id: self.id,
+    target_type: "MergeRequest",
+    author_id: user_id
+  )
+end
+
+
+ +
+ +
+
+ + merge_event() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/merge_request.rb, line 136
+def merge_event
+  self.project.events.where(target_id: self.id, target_type: "MergeRequest", action: Event::Merged).last
+end
+
+
+ +
+ +
+
+ + merged?() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/merge_request.rb, line 132
+def merged?
+  merged && merge_event
+end
+
+
+ +
+ +
+
+ + mr_and_commit_notes() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/merge_request.rb, line 205
+def mr_and_commit_notes
+  commit_ids = commits.map(&:id)
+  Note.where("(noteable_type = 'MergeRequest' AND noteable_id = :mr_id) OR (noteable_type = 'Commit' AND commit_id IN (:commit_ids))", mr_id: id, commit_ids: commit_ids)
+end
+
+
+ +
+ +
+
+ + open?() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/merge_request.rb, line 153
+def open?
+  !closed
+end
+
+
+ +
+ +
+
+ + probably_merged?() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/merge_request.rb, line 148
+def probably_merged?
+  unmerged_commits.empty? &&
+    commits.any? && open?
+end
+
+
+ +
+ +
+
+ + reload_code() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/merge_request.rb, line 70
+def reload_code
+  self.reloaded_commits
+  self.reloaded_diffs
+end
+
+
+ +
+ +
+
+ + reloaded_commits() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/merge_request.rb, line 168
+def reloaded_commits
+  if open? && unmerged_commits.any?
+    self.st_commits = unmerged_commits
+    save
+  end
+  commits
+end
+
+
+ +
+ +
+
+ + reloaded_diffs() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/merge_request.rb, line 101
+def reloaded_diffs
+  if open? && unmerged_diffs.any?
+    self.st_diffs = unmerged_diffs
+    self.save
+  end
+
+rescue Grit::Git::GitTimeout
+  self.st_diffs = [BROKEN_DIFF]
+  self.save
+end
+
+
+ +
+ +
+
+ + to_diff() + + +
+ + +
+

Returns the raw diff for this merge request

+ +

see “git diff”

+
+ + + + + + +
+ + +
+
# File app/models/merge_request.rb, line 213
+def to_diff
+  project.repo.git.native(:diff, {timeout: 30, raise: true}, "#{target_branch}...#{source_branch}")
+end
+
+
+ +
+ +
+
+ + to_patch() + + +
+ + +
+

Returns the commit as a series of email patches.

+ +

see “git format-patch”

+
+ + + + + + +
+ + +
+
# File app/models/merge_request.rb, line 220
+def to_patch
+  project.repo.git.format_patch({timeout: 30, raise: true, stdout: true}, "#{target_branch}..#{source_branch}")
+end
+
+
+ +
+ +
+
+ + unchecked?() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/merge_request.rb, line 75
+def unchecked?
+  state == UNCHECKED
+end
+
+
+ +
+ +
+
+ + unmerged_commits() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/merge_request.rb, line 176
+def unmerged_commits
+  self.project.repo.
+    commits_between(self.target_branch, self.source_branch).
+    map {|c| Commit.new(c)}.
+    sort_by(&:created_at).
+    reverse
+end
+
+
+ +
+ +
+
+ + unmerged_diffs() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/merge_request.rb, line 120
+def unmerged_diffs
+  # Only show what is new in the source branch compared to the target branch, not the other way around.
+  # The linex below with merge_base is equivalent to diff with three dots (git diff branch1...branch2)
+  # From the git documentation: "git diff A...B" is equivalent to "git diff $(git-merge-base A B) B"
+  common_commit = project.repo.git.native(:merge_base, {}, [target_branch, source_branch]).strip
+  diffs = project.repo.diff(common_commit, source_branch)
+end
+
+
+ +
+ +
+
+ + valid_diffs?() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/merge_request.rb, line 116
+def valid_diffs?
+  !broken_diffs?
+end
+
+
+ +
+ +
+
+ + validate_branches() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/merge_request.rb, line 64
+def validate_branches
+  if target_branch == source_branch
+    errors.add :base, "You can not use same branch for source and target branches"
+  end
+end
+
+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/MergeRequestObserver.html b/doc/code/classes/MergeRequestObserver.html new file mode 100644 index 00000000..364e0346 --- /dev/null +++ b/doc/code/classes/MergeRequestObserver.html @@ -0,0 +1,234 @@ + + + + + MergeRequestObserver + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + +
Methods
+
+ +
A
+
+ +
+ +
S
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + +
Instance Public methods
+ +
+
+ + after_create(merge_request) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/observers/merge_request_observer.rb, line 4
+def after_create(merge_request)
+  if merge_request.assignee && merge_request.assignee != current_user
+    Notify.new_merge_request_email(merge_request.id).deliver
+  end
+end
+
+
+ +
+ +
+
+ + after_update(merge_request) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/observers/merge_request_observer.rb, line 10
+def after_update(merge_request)
+  send_reassigned_email(merge_request) if merge_request.is_being_reassigned?
+
+  status = nil
+  status = 'closed' if merge_request.is_being_closed?
+  status = 'reopened' if merge_request.is_being_reopened?
+  if status
+    Note.create_status_change_note(merge_request, current_user, status)
+  end
+end
+
+
+ +
+ +
Instance Protected methods
+ +
+
+ + send_reassigned_email(merge_request) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/observers/merge_request_observer.rb, line 23
+def send_reassigned_email(merge_request)
+  recipients_ids = merge_request.assignee_id_was, merge_request.assignee_id
+  recipients_ids.delete current_user.id
+
+  recipients_ids.each do |recipient_id|
+    Notify.reassigned_merge_request_email(recipient_id, merge_request.id, merge_request.assignee_id_was).deliver
+  end
+end
+
+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/MergeRequestsController.html b/doc/code/classes/MergeRequestsController.html new file mode 100644 index 00000000..4cf181fa --- /dev/null +++ b/doc/code/classes/MergeRequestsController.html @@ -0,0 +1,932 @@ + + + + + MergeRequestsController + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + +
Methods
+
+ +
A
+
+ +
+ +
B
+
+ +
+ +
C
+
+ +
+ +
D
+
+ +
+ +
E
+
+
    + + +
  • + edit +
  • + +
+
+ +
I
+
+ +
+ +
M
+
+ +
+ +
N
+
+
    + + +
  • + new +
  • + +
+
+ +
S
+
+
    + + +
  • + show +
  • + +
+
+ +
U
+
+ +
+ +
V
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + +
Instance Public methods
+ +
+
+ + automerge() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/merge_requests_controller.rb, line 74
+def automerge
+  return access_denied! unless can?(current_user, :accept_mr, @project)
+  if @merge_request.open? && @merge_request.can_be_merged?
+    @merge_request.should_remove_source_branch = params[:should_remove_source_branch]
+    @merge_request.automerge!(current_user)
+    @status = true
+  else
+    @status = false
+  end
+end
+
+
+ +
+ +
+
+ + automerge_check() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/merge_requests_controller.rb, line 67
+def automerge_check
+  if @merge_request.unchecked?
+    @merge_request.check_if_can_be_merged
+  end
+  render json: {state: @merge_request.human_state}
+end
+
+
+ +
+ +
+
+ + branch_from() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/merge_requests_controller.rb, line 85
+def branch_from
+  @commit = project.commit(params[:ref])
+  @commit = CommitDecorator.decorate(@commit)
+end
+
+
+ +
+ +
+
+ + branch_to() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/merge_requests_controller.rb, line 90
+def branch_to
+  @commit = project.commit(params[:ref])
+  @commit = CommitDecorator.decorate(@commit)
+end
+
+
+ +
+ +
+
+ + ci_status() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/merge_requests_controller.rb, line 95
+def ci_status
+  status = project.gitlab_ci_service.commit_status(merge_request.last_commit.sha)
+  response = { status: status }
+
+  render json: response
+end
+
+
+ +
+ +
+
+ + create() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/merge_requests_controller.rb, line 45
+def create
+  @merge_request = @project.merge_requests.new(params[:merge_request])
+  @merge_request.author = current_user
+
+  if @merge_request.save
+    @merge_request.reload_code
+    redirect_to [@project, @merge_request], notice: 'Merge request was successfully created.'
+  else
+    render action: "new"
+  end
+end
+
+
+ +
+ +
+
+ + diffs() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/merge_requests_controller.rb, line 30
+def diffs
+  @diffs = @merge_request.diffs
+  @commit = @merge_request.last_commit
+
+  @comments_allowed = true
+  @line_notes = @merge_request.notes.where("line_code is not null")
+end
+
+
+ +
+ +
+
+ + edit() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/merge_requests_controller.rb, line 42
+def edit
+end
+
+
+ +
+ +
+
+ + index() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/merge_requests_controller.rb, line 16
+def index
+  @merge_requests = MergeRequestsLoadContext.new(project, current_user, params).execute
+end
+
+
+ +
+ +
+
+ + new() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/merge_requests_controller.rb, line 38
+def new
+  @merge_request = @project.merge_requests.new(params[:merge_request])
+end
+
+
+ +
+ +
+
+ + show() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/merge_requests_controller.rb, line 20
+def show
+  respond_to do |format|
+    format.html
+    format.js
+
+    format.diff  { render text: @merge_request.to_diff }
+    format.patch { render text: @merge_request.to_patch }
+  end
+end
+
+
+ +
+ +
+
+ + update() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/merge_requests_controller.rb, line 57
+def update
+  if @merge_request.update_attributes(params[:merge_request].merge(author_id_of_changes: current_user.id))
+    @merge_request.reload_code
+    @merge_request.mark_as_unchecked
+    redirect_to [@project, @merge_request], notice: 'Merge request was successfully updated.'
+  else
+    render action: "edit"
+  end
+end
+
+
+ +
+ +
Instance Protected methods
+ +
+
+ + authorize_admin_merge_request!() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/merge_requests_controller.rb, line 112
+def authorize_admin_merge_request!
+  return render_404 unless can?(current_user, :admin_merge_request, @merge_request)
+end
+
+
+ +
+ +
+
+ + authorize_modify_merge_request!() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/merge_requests_controller.rb, line 108
+def authorize_modify_merge_request!
+  return render_404 unless can?(current_user, :modify_merge_request, @merge_request)
+end
+
+
+ +
+ +
+
+ + define_show_vars() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/merge_requests_controller.rb, line 129
+def define_show_vars
+  # Build a note object for comment form
+  @note = @project.notes.new(noteable: @merge_request)
+
+  # Get commits from repository
+  # or from cache if already merged
+  @commits = @merge_request.commits
+  @commits = CommitDecorator.decorate(@commits)
+end
+
+
+ +
+ +
+
+ + merge_request() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/merge_requests_controller.rb, line 104
+def merge_request
+  @merge_request ||= @project.merge_requests.find(params[:id])
+end
+
+
+ +
+ +
+
+ + module_enabled() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/merge_requests_controller.rb, line 116
+def module_enabled
+  return render_404 unless @project.merge_requests_enabled
+end
+
+
+ +
+ +
+
+ + validates_merge_request() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/merge_requests_controller.rb, line 120
+def validates_merge_request
+  # Show git not found page if target branch doesnt exist
+  return git_not_found! unless @project.repo.heads.map(&:name).include?(@merge_request.target_branch)
+
+  # Show git not found page if source branch doesnt exist
+  # and there is no saved commits between source & target branch
+  return git_not_found! if !@project.repo.heads.map(&:name).include?(@merge_request.source_branch) && @merge_request.commits.blank?
+end
+
+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/MergeRequestsHelper.html b/doc/code/classes/MergeRequestsHelper.html new file mode 100644 index 00000000..33725cf7 --- /dev/null +++ b/doc/code/classes/MergeRequestsHelper.html @@ -0,0 +1,229 @@ + + + + + MergeRequestsHelper + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + +
Methods
+
+ +
C
+
+ +
+ +
M
+
+ +
+ +
N
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + +
Instance Public methods
+ +
+
+ + ci_build_details_path(merge_request) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/helpers/merge_requests_helper.rb, line 20
+def ci_build_details_path merge_request
+  merge_request.project.gitlab_ci_service.build_page(merge_request.last_commit.sha)
+end
+
+
+ +
+ +
+
+ + mr_css_classes(mr) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/helpers/merge_requests_helper.rb, line 13
+def mr_css_classes mr
+  classes = "merge_request"
+  classes << " closed" if mr.closed
+  classes << " merged" if mr.merged?
+  classes
+end
+
+
+ +
+ +
+
+ + new_mr_path_from_push_event(event) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/helpers/merge_requests_helper.rb, line 2
+def new_mr_path_from_push_event(event)
+  new_project_merge_request_path(
+    event.project,
+    merge_request: {
+      source_branch: event.branch_name,
+      target_branch: event.project.root_ref,
+      title: event.branch_name.titleize
+    }
+  )
+end
+
+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/MergeRequestsLoadContext.html b/doc/code/classes/MergeRequestsLoadContext.html new file mode 100644 index 00000000..5e2501c7 --- /dev/null +++ b/doc/code/classes/MergeRequestsLoadContext.html @@ -0,0 +1,162 @@ + + + + + MergeRequestsLoadContext + + + + + + + + + + + + + +
+
+ +
+ +

Build collection of Merge Requests based on filtering passed via params for +@project

+ +
+ + + + + + + + + + + + + + + +
Methods
+
+ +
E
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + +
Instance Public methods
+ +
+
+ + execute() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/contexts/merge_requests_load_context.rb, line 4
+def execute
+  type = params[:f]
+
+  merge_requests = project.merge_requests
+
+  merge_requests = case type
+                   when 'all' then merge_requests
+                   when 'closed' then merge_requests.closed
+                   when 'assigned-to-me' then merge_requests.opened.assigned(current_user)
+                   else merge_requests.opened
+                   end
+
+  merge_requests = merge_requests.page(params[:page]).per(20)
+  merge_requests = merge_requests.includes(:author, :project).order("closed, created_at desc")
+
+  # Filter by specific assignee_id (or lack thereof)?
+  if params[:assignee_id].present?
+    merge_requests = merge_requests.where(assignee_id: (params[:assignee_id] == '0' ? nil : params[:assignee_id]))
+  end
+
+  # Filter by specific milestone_id (or lack thereof)?
+  if params[:milestone_id].present?
+    merge_requests = merge_requests.where(milestone_id: (params[:milestone_id] == '0' ? nil : params[:milestone_id]))
+  end
+
+  merge_requests
+end
+
+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/Milestone.html b/doc/code/classes/Milestone.html new file mode 100644 index 00000000..5f275210 --- /dev/null +++ b/doc/code/classes/Milestone.html @@ -0,0 +1,616 @@ + + + + + Milestone + + + + + + + + + + + + + +
+
+ +
+ +

Schema Information

+ +

Table name: milestones

+ +
id          :integer          not null, primary key
+title       :string(255)      not null
+project_id  :integer          not null
+description :text
+due_date    :date
+closed      :boolean          default(FALSE), not null
+created_at  :datetime         not null
+updated_at  :datetime         not null
+ +
+ + + + + + + + + + + + + + + +
Methods
+
+ +
A
+
+ +
+ +
C
+
+ +
+ +
E
+
+ +
+ +
I
+
+ +
+ +
O
+
+ +
+ +
P
+
+ +
+ +
T
+
+ +
+ +
+ + + + + + + + + + + + + + + + + +
Attributes
+ + + + + + + + +
+ [RW] + author_id_of_changes
+ + + + + +
Instance Public methods
+ +
+
+ + author_id() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/milestone.rb, line 82
+def author_id
+  author_id_of_changes
+end
+
+
+ +
+ +
+
+ + can_be_closed?() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/milestone.rb, line 70
+def can_be_closed?
+  open? && issues.opened.count.zero?
+end
+
+
+ +
+ +
+
+ + closed_items_count() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/milestone.rb, line 46
+def closed_items_count
+  self.issues.closed.count + self.merge_requests.closed.count
+end
+
+
+ +
+ +
+
+ + expired?() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/milestone.rb, line 30
+def expired?
+  if due_date
+    due_date.past?
+  else
+    false
+  end
+end
+
+
+ +
+ +
+
+ + expires_at() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/milestone.rb, line 60
+def expires_at
+  if due_date
+    if due_date.past?
+      "expired at #{due_date.stamp("Aug 21, 2011")}"
+    else
+      "expires at #{due_date.stamp("Aug 21, 2011")}"  
+    end
+  end  
+end
+
+
+ +
+ +
+
+ + is_empty?() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/milestone.rb, line 74
+def is_empty?
+  total_items_count.zero?
+end
+
+
+ +
+ +
+
+ + open?() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/milestone.rb, line 78
+def open?
+  !closed
+end
+
+
+ +
+ +
+
+ + open_items_count() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/milestone.rb, line 42
+def open_items_count
+  self.issues.opened.count + self.merge_requests.opened.count
+end
+
+
+ +
+ +
+
+ + participants() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/milestone.rb, line 38
+def participants
+  User.where(id: issues.pluck(:assignee_id))
+end
+
+
+ +
+ +
+
+ + percent_complete() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/milestone.rb, line 54
+def percent_complete
+  ((closed_items_count * 100) / total_items_count).abs
+rescue ZeroDivisionError
+  100
+end
+
+
+ +
+ +
+
+ + total_items_count() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/milestone.rb, line 50
+def total_items_count
+  self.issues.count + self.merge_requests.count
+end
+
+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/MilestonesController.html b/doc/code/classes/MilestonesController.html new file mode 100644 index 00000000..48a3beb6 --- /dev/null +++ b/doc/code/classes/MilestonesController.html @@ -0,0 +1,589 @@ + + + + + MilestonesController + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + +
Methods
+
+ +
A
+
+ +
+ +
C
+
+ +
+ +
D
+
+ +
+ +
E
+
+
    + + +
  • + edit +
  • + +
+
+ +
I
+
+ +
+ +
M
+
+ +
+ +
N
+
+
    + + +
  • + new +
  • + +
+
+ +
S
+
+
    + + +
  • + show +
  • + +
+
+ +
U
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + +
Instance Public methods
+ +
+
+ + create() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/milestones_controller.rb, line 44
+def create
+  @milestone = @project.milestones.new(params[:milestone])
+  @milestone.author_id_of_changes = current_user.id
+
+  if @milestone.save
+    redirect_to project_milestone_path(@project, @milestone)
+  else
+    render "new"
+  end
+end
+
+
+ +
+ +
+
+ + destroy() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/milestones_controller.rb, line 70
+def destroy
+  return access_denied! unless can?(current_user, :admin_milestone, @milestone)
+
+  @milestone.destroy
+
+  respond_to do |format|
+    format.html { redirect_to project_milestones_path }
+    format.js { render nothing: true }
+  end
+end
+
+
+ +
+ +
+
+ + edit() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/milestones_controller.rb, line 29
+def edit
+  respond_with(@milestone)
+end
+
+
+ +
+ +
+
+ + index() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/milestones_controller.rb, line 13
+def index
+  @milestones = case params[:f]
+                when 'all'; @project.milestones.order("closed, due_date DESC")
+                when 'closed'; @project.milestones.closed.order("due_date DESC")
+                else @project.milestones.active.order("due_date ASC")
+                end
+
+  @milestones = @milestones.includes(:project)
+  @milestones = @milestones.page(params[:page]).per(20)
+end
+
+
+ +
+ +
+
+ + new() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/milestones_controller.rb, line 24
+def new
+  @milestone = @project.milestones.new
+  respond_with(@milestone)
+end
+
+
+ +
+ +
+
+ + show() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/milestones_controller.rb, line 33
+def show
+  @issues = @milestone.issues
+  @users = UserDecorator.decorate(@milestone.participants)
+  @merge_requests = @milestone.merge_requests
+
+  respond_to do |format|
+    format.html
+    format.js
+  end
+end
+
+
+ +
+ +
+
+ + update() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/milestones_controller.rb, line 55
+def update
+  @milestone.update_attributes(params[:milestone].merge(author_id_of_changes: current_user.id))
+
+  respond_to do |format|
+    format.js
+    format.html do
+      if @milestone.valid?
+        redirect_to [@project, @milestone]
+      else
+        render :edit
+      end
+    end
+  end
+end
+
+
+ +
+ +
Instance Protected methods
+ +
+
+ + authorize_admin_milestone!() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/milestones_controller.rb, line 87
+def authorize_admin_milestone!
+  return render_404 unless can?(current_user, :admin_milestone, @project)
+end
+
+
+ +
+ +
+
+ + milestone() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/milestones_controller.rb, line 83
+def milestone
+  @milestone ||= @project.milestones.find(params[:id])
+end
+
+
+ +
+ +
+
+ + module_enabled() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/milestones_controller.rb, line 91
+def module_enabled
+  return render_404 unless @project.issues_enabled
+end
+
+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/Namespace.html b/doc/code/classes/Namespace.html new file mode 100644 index 00000000..02c9b7e4 --- /dev/null +++ b/doc/code/classes/Namespace.html @@ -0,0 +1,629 @@ + + + + + Namespace + + + + + + + + + + + + + +
+
+ +
+ +

Schema Information

+ +

Table name: namespaces

+ +
id         :integer          not null, primary key
+name       :string(255)      not null
+path       :string(255)      not null
+owner_id   :integer          not null
+created_at :datetime         not null
+updated_at :datetime         not null
+type       :string(255)
+ +
+ + + + + + + + + + + + + + + +
Methods
+
+ +
D
+
+ +
+ +
E
+
+ +
+ +
G
+
+ +
+ +
H
+
+ +
+ +
M
+
+ +
+ +
N
+
+ +
+ +
R
+
+ +
+ +
S
+
+ +
+ +
T
+
+ +
+ +
U
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + +
Class Public methods
+ +
+
+ + global_id() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/namespace.rb, line 41
+def self.global_id
+  'GLN'
+end
+
+
+ +
+ +
+ + + +
+ +
+ + + + + + +
+ + +
+
# File app/models/namespace.rb, line 37
+def self.search query
+  where("name LIKE :query OR path LIKE :query", query: "%#{query}%")
+end
+
+
+ +
+ +
Instance Public methods
+ +
+
+ + dir_exists?() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/namespace.rb, line 59
+def dir_exists?
+  File.exists?(namespace_full_path)
+end
+
+
+ +
+ +
+
+ + ensure_dir_exist() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/namespace.rb, line 53
+def ensure_dir_exist
+  unless dir_exists?
+    system("mkdir -m 770 #{namespace_full_path}")
+  end
+end
+
+
+ +
+ +
+
+ + human_name() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/namespace.rb, line 49
+def human_name
+  owner_name
+end
+
+
+ +
+ +
+
+ + move_dir() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/namespace.rb, line 67
+def move_dir
+  if path_changed?
+    old_path = File.join(Gitlab.config.gitolite.repos_path, path_was)
+    new_path = File.join(Gitlab.config.gitolite.repos_path, path)
+    if File.exists?(new_path)
+      raise "Already exists"
+    end
+
+    if system("mv #{old_path} #{new_path}")
+      send_update_instructions
+      @require_update_gitolite = true
+    else
+      raise "Namespace move error #{old_path} #{new_path}"
+    end
+  end
+end
+
+
+ +
+ +
+
+ + namespace_full_path() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/namespace.rb, line 63
+def namespace_full_path
+  @namespace_full_path ||= File.join(Gitlab.config.gitolite.repos_path, path)
+end
+
+
+ +
+ +
+
+ + rm_dir() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/namespace.rb, line 89
+def rm_dir
+  dir_path = File.join(Gitlab.config.gitolite.repos_path, path)
+  system("rm -rf #{dir_path}")
+end
+
+
+ +
+ +
+
+ + send_update_instructions() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/namespace.rb, line 94
+def send_update_instructions
+  projects.each(&:send_move_instructions)
+end
+
+
+ +
+ +
+
+ + to_param() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/namespace.rb, line 45
+def to_param
+  path
+end
+
+
+ +
+ +
+
+ + update_gitolite() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/namespace.rb, line 84
+def update_gitolite
+  @require_update_gitolite = false
+  projects.each(&:update_repository)
+end
+
+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/NamespacedProject.html b/doc/code/classes/NamespacedProject.html new file mode 100644 index 00000000..976338e8 --- /dev/null +++ b/doc/code/classes/NamespacedProject.html @@ -0,0 +1,344 @@ + + + + + NamespacedProject + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + +
Methods
+
+ +
C
+
+ +
+ +
N
+
+ +
+ +
P
+
+ +
+ +
T
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + +
Instance Public methods
+ +
+
+ + chief() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/roles/namespaced_project.rb, line 44
+def chief
+  if namespace
+    namespace_owner
+  else
+    owner
+  end
+end
+
+
+ +
+ +
+
+ + name_with_namespace() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/roles/namespaced_project.rb, line 30
+def name_with_namespace
+  @name_with_namespace ||= begin
+                             if namespace
+                               namespace.human_name + " / " + name
+                             else
+                               name
+                             end
+                           end
+end
+
+
+ +
+ +
+
+ + namespace_owner() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/roles/namespaced_project.rb, line 40
+def namespace_owner
+  namespace.try(:owner)
+end
+
+
+ +
+ +
+
+ + path_with_namespace() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/roles/namespaced_project.rb, line 52
+def path_with_namespace
+  if namespace
+    namespace.path + '/' + path
+  else
+    path
+  end
+end
+
+
+ +
+ +
+
+ + transfer(new_namespace) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/roles/namespaced_project.rb, line 2
+def transfer(new_namespace)
+  Project.transaction do
+    old_namespace = namespace
+    self.namespace = new_namespace
+
+    old_dir = old_namespace.try(:path) || ''
+    new_dir = new_namespace.try(:path) || ''
+
+    old_repo = if old_dir.present?
+                 File.join(old_dir, self.path)
+               else
+                 self.path
+               end
+
+    if Project.where(path: self.path, namespace_id: new_namespace.try(:id)).present?
+      raise TransferError.new("Project with same path in target namespace already exists")
+    end
+
+    Gitlab::ProjectMover.new(self, old_dir, new_dir).execute
+
+    git_host.move_repository(old_repo, self)
+
+    save!
+  end
+rescue Gitlab::ProjectMover::ProjectMoveError => ex
+  raise Project::TransferError.new(ex.message)
+end
+
+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/NamespacesHelper.html b/doc/code/classes/NamespacesHelper.html new file mode 100644 index 00000000..28d485d9 --- /dev/null +++ b/doc/code/classes/NamespacesHelper.html @@ -0,0 +1,146 @@ + + + + + NamespacesHelper + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + +
Methods
+
+ +
N
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + +
Instance Public methods
+ +
+
+ + namespaces_options(selected = :current_user, scope = :default) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/helpers/namespaces_helper.rb, line 2
+def namespaces_options(selected = :current_user, scope = :default)
+  groups = current_user.namespaces.select {|n| n.type == 'Group'}
+
+  users = if scope == :all
+            Namespace.root
+          else
+            current_user.namespaces.reject {|n| n.type == 'Group'}
+          end
+
+  global_opts = ["Global", [['/', Namespace.global_id]] ]
+  group_opts = ["Groups", groups.map {|g| [g.human_name, g.id]} ]
+  users_opts = [ "Users", users.map {|u| [u.human_name, u.id]} ]
+
+  options = []
+  options << global_opts if current_user.admin
+  options << group_opts
+  options << users_opts
+
+  if selected == :current_user && current_user.namespace
+    selected = current_user.namespace.id
+  end
+
+  grouped_options_for_select(options, selected)
+end
+
+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/Note.html b/doc/code/classes/Note.html new file mode 100644 index 00000000..4ec1c4dc --- /dev/null +++ b/doc/code/classes/Note.html @@ -0,0 +1,536 @@ + + + + + Note + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + +
Methods
+
+ +
C
+
+ +
+ +
D
+
+ +
+ +
F
+
+ +
+ +
N
+
+ +
+ +
U
+
+ +
+ +
+ + + + + + + + + + + + + + + + + +
Attributes
+ + + + + + + + + + + + + + +
+ [RW] + notify
+ [RW] + notify_author
+ + + + + +
Class Public methods
+ +
+
+ + create_status_change_note(noteable, author, status) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/note.rb, line 53
+def self.create_status_change_note(noteable, author, status)
+  create({
+    noteable: noteable,
+    project: noteable.project,
+    author: author,
+    note: "_Status changed to #{status}_"
+  }, without_protection: true)
+end
+
+
+ +
+ +
Instance Public methods
+ +
+
+ + commit_author() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/note.rb, line 109
+def commit_author
+  @commit_author ||=
+    project.users.find_by_email(noteable.author_email) ||
+    project.users.find_by_name(noteable.author_name)
+rescue
+  nil
+end
+
+
+ +
+ +
+
+ + downvote?() + + +
+ + +
+

Returns true if this is a downvote note, otherwise false is returned

+
+ + + + + + +
+ + +
+
# File app/models/note.rb, line 125
+def downvote?
+  note.start_with?('-1') || note.start_with?(':-1:')
+end
+
+
+ +
+ +
+
+ + for_commit?() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/note.rb, line 101
+def for_commit?
+  noteable_type == "Commit"
+end
+
+
+ +
+ +
+
+ + for_diff_line?() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/note.rb, line 105
+def for_diff_line?
+  line_code.present?
+end
+
+
+ +
+ +
+
+ + noteable() + + +
+ + +
+

override to return commits, which are not active record

+
+ + + + + + +
+ + +
+
# File app/models/note.rb, line 71
+def noteable
+  if for_commit?
+    project.commit(commit_id)
+  else
+    super
+  end
+# Temp fix to prevent app crash
+# if note commit id doesnt exist
+rescue
+  nil
+end
+
+
+ +
+ +
+
+ + noteable_type_name() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/note.rb, line 129
+def noteable_type_name
+  if noteable_type.present?
+    noteable_type.downcase
+  else
+    "wall"
+  end
+end
+
+
+ +
+ +
+
+ + notify_only_author?(user) + + +
+ + +
+

Check if we can notify commit author with email about our comment

+ +

If commit author email exist in project and commit author is not passed +user we can send email to him

+ +

params:

+ +
user - current user
+ +

return:

+ +
Boolean
+
+ + + + + + +
+ + +
+
# File app/models/note.rb, line 96
+def notify_only_author?(user)
+  for_commit? && commit_author &&
+    commit_author.email != user.email
+end
+
+
+ +
+ +
+
+ + upvote?() + + +
+ + +
+

Returns true if this is an upvote note, otherwise false is returned

+
+ + + + + + +
+ + +
+
# File app/models/note.rb, line 119
+def upvote?
+  note.start_with?('+1') || note.start_with?(':+1:')
+end
+
+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/NoteEvent.html b/doc/code/classes/NoteEvent.html new file mode 100644 index 00000000..0817d170 --- /dev/null +++ b/doc/code/classes/NoteEvent.html @@ -0,0 +1,380 @@ + + + + + NoteEvent + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + +
Methods
+
+ +
N
+
+ +
+ +
W
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + +
Instance Public methods
+ +
+
+ + note_commit?() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/roles/note_event.rb, line 10
+def note_commit?
+  target.noteable_type == "Commit"
+end
+
+
+ +
+ +
+
+ + note_commit_id() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/roles/note_event.rb, line 2
+def note_commit_id
+  target.commit_id
+end
+
+
+ +
+ +
+
+ + note_short_commit_id() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/roles/note_event.rb, line 6
+def note_short_commit_id
+  note_commit_id[0..8]
+end
+
+
+ +
+ +
+
+ + note_target() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/roles/note_event.rb, line 14
+def note_target
+  target.noteable
+end
+
+
+ +
+ +
+
+ + note_target_id() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/roles/note_event.rb, line 18
+def note_target_id
+  if note_commit?
+    target.commit_id
+  else
+    target.noteable_id.to_s
+  end
+end
+
+
+ +
+ +
+
+ + note_target_type() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/roles/note_event.rb, line 30
+def note_target_type
+  if target.noteable_type.present?
+    target.noteable_type.titleize
+  else
+    "Wall"
+  end.downcase
+end
+
+
+ +
+ +
+
+ + wall_note?() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/roles/note_event.rb, line 26
+def wall_note?
+  target.noteable_type.blank?
+end
+
+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/NoteObserver.html b/doc/code/classes/NoteObserver.html new file mode 100644 index 00000000..cc0e5156 --- /dev/null +++ b/doc/code/classes/NoteObserver.html @@ -0,0 +1,290 @@ + + + + + NoteObserver + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + +
Methods
+
+ +
A
+
+ +
+ +
N
+
+ +
+ +
S
+
+ +
+ +
T
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + +
Instance Public methods
+ +
+
+ + after_create(note) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/observers/note_observer.rb, line 3
+def after_create(note)
+  send_notify_mails(note)
+end
+
+
+ +
+ +
Instance Protected methods
+ +
+
+ + notify_team(note) + + +
+ + +
+

Notifies the whole team except the author of note

+
+ + + + + + +
+ + +
+
# File app/observers/note_observer.rb, line 22
+def notify_team(note)
+  # Note: wall posts are not "attached" to anything, so fall back to "Wall"
+  noteable_type = note.noteable_type.presence || "Wall"
+  notify_method = "note_#{noteable_type.underscore}_email".to_sym
+
+  if Notify.respond_to? notify_method
+    team_without_note_author(note).map do |u|
+      Notify.send(notify_method, u.id, note.id).deliver
+    end
+  end
+end
+
+
+ +
+ +
+
+ + send_notify_mails(note) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/observers/note_observer.rb, line 9
+def send_notify_mails(note)
+  if note.notify
+    notify_team(note)
+  elsif note.notify_author
+    # Notify only author of resource
+    Notify.note_commit_email(note.commit_author.id, note.id).deliver
+  else
+    # Otherwise ignore it
+    nil
+  end
+end
+
+
+ +
+ +
+
+ + team_without_note_author(note) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/observers/note_observer.rb, line 34
+def team_without_note_author(note)
+  note.project.users.reject { |u| u.id == note.author.id }
+end
+
+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/Notes.html b/doc/code/classes/Notes.html new file mode 100644 index 00000000..19b8dd38 --- /dev/null +++ b/doc/code/classes/Notes.html @@ -0,0 +1,88 @@ + + + + + Notes + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/Notes/CreateContext.html b/doc/code/classes/Notes/CreateContext.html new file mode 100644 index 00000000..adb3a46f --- /dev/null +++ b/doc/code/classes/Notes/CreateContext.html @@ -0,0 +1,136 @@ + + + + + Notes::CreateContext + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + +
Methods
+
+ +
E
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + +
Instance Public methods
+ +
+
+ + execute() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/contexts/notes/create_context.rb, line 3
+def execute
+  note = project.notes.new(params[:note])
+  note.author = current_user
+  note.notify = true if params[:notify] == '1'
+  note.notify_author = true if params[:notify_author] == '1'
+  note.save
+  note
+end
+
+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/Notes/LoadContext.html b/doc/code/classes/Notes/LoadContext.html new file mode 100644 index 00000000..24731bc4 --- /dev/null +++ b/doc/code/classes/Notes/LoadContext.html @@ -0,0 +1,157 @@ + + + + + Notes::LoadContext + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + +
Methods
+
+ +
E
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + +
Instance Public methods
+ +
+
+ + execute() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/contexts/notes/load_context.rb, line 3
+def execute
+  target_type = params[:target_type]
+  target_id   = params[:target_id]
+  after_id    = params[:after_id]
+  before_id   = params[:before_id]
+
+
+  @notes = case target_type
+           when "commit"
+             project.commit_notes(project.commit(target_id)).fresh.limit(20)
+           when "issue"
+             project.issues.find(target_id).notes.inc_author.fresh.limit(20)
+           when "merge_request"
+             project.merge_requests.find(target_id).mr_and_commit_notes.inc_author.fresh.limit(20)
+           when "snippet"
+             project.snippets.find(target_id).notes.fresh
+           when "wall"
+             # this is the only case, where the order is DESC
+             project.common_notes.order("created_at DESC, id DESC").limit(50)
+           end
+
+  @notes = if after_id
+             @notes.where("id > ?", after_id)
+           elsif before_id
+             @notes.where("id < ?", before_id)
+           else
+             @notes
+           end
+end
+
+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/NotesController.html b/doc/code/classes/NotesController.html new file mode 100644 index 00000000..12cc98fa --- /dev/null +++ b/doc/code/classes/NotesController.html @@ -0,0 +1,338 @@ + + + + + NotesController + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + +
Methods
+
+ +
C
+
+ +
+ +
D
+
+ +
+ +
I
+
+ +
+ +
N
+
+ +
+ +
P
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + +
Instance Public methods
+ +
+
+ + create() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/notes_controller.rb, line 18
+def create
+  @note = Notes::CreateContext.new(project, current_user, params).execute
+
+  respond_to do |format|
+    format.html {redirect_to :back}
+    format.js
+  end
+end
+
+
+ +
+ +
+
+ + destroy() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/notes_controller.rb, line 27
+def destroy
+  @note = @project.notes.find(params[:id])
+  return access_denied! unless can?(current_user, :admin_note, @note)
+  @note.destroy
+
+  respond_to do |format|
+    format.js { render nothing: true }
+  end
+end
+
+
+ +
+ +
+
+ + index() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/notes_controller.rb, line 8
+def index
+  notes
+  if params[:target_type] == "merge_request"
+    @mixed_targets = true
+    @main_target_type = params[:target_type].camelize
+  end
+
+  respond_with(@notes)
+end
+
+
+ +
+ +
+
+ + preview() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/notes_controller.rb, line 37
+def preview
+  render text: view_context.markdown(params[:note])
+end
+
+
+ +
+ +
Instance Protected methods
+ +
+
+ + notes() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/notes_controller.rb, line 43
+def notes
+  @notes = Notes::LoadContext.new(project, current_user, params).execute
+end
+
+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/NotesHelper.html b/doc/code/classes/NotesHelper.html new file mode 100644 index 00000000..39ff6794 --- /dev/null +++ b/doc/code/classes/NotesHelper.html @@ -0,0 +1,258 @@ + + + + + NotesHelper + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + +
Methods
+
+ +
L
+
+ +
+ +
N
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + +
Instance Public methods
+ +
+ + + +
+ +
+ + + + + + +
+ + + +
+ +
+ +
+
+ + loading_more_notes?() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/helpers/notes_helper.rb, line 2
+def loading_more_notes?
+  params[:loading_more].present?
+end
+
+
+ +
+ +
+
+ + loading_new_notes?() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/helpers/notes_helper.rb, line 6
+def loading_new_notes?
+  params[:loading_new].present?
+end
+
+
+ +
+ +
+
+ + note_for_main_target?(note) + + +
+ + +
+

Helps to distinguish e.g. commit notes in mr notes list

+
+ + + + + + +
+ + +
+
# File app/helpers/notes_helper.rb, line 11
+def note_for_main_target?(note)
+  !@mixed_targets || @main_target_type == note.noteable_type
+end
+
+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/Notify.html b/doc/code/classes/Notify.html new file mode 100644 index 00000000..ea740381 --- /dev/null +++ b/doc/code/classes/Notify.html @@ -0,0 +1,639 @@ + + + + + Notify + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + +
Methods
+
+ +
I
+
+ +
+ +
N
+
+ +
+ +
P
+
+ +
+ +
R
+
+ +
+ +
+ + + + +
Included Modules
+
    + +
  • + + Resque::Mailer + +
  • + +
+ + + + + + + + + + + + + + + + + + +
Instance Public methods
+ +
+
+ + issue_status_changed_email(recipient_id, issue_id, status, updated_by_user_id) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/mailers/notify.rb, line 32
+def issue_status_changed_email(recipient_id, issue_id, status, updated_by_user_id)
+  @issue = Issue.find issue_id
+  @issue_status = status
+  @project = @issue.project
+  @updated_by = User.find updated_by_user_id
+  mail(to: recipient(recipient_id),
+      subject: subject("changed issue ##{@issue.id}", @issue.title))
+end
+
+
+ +
+ +
+
+ + new_issue_email(issue_id) + + +
+ + +
+

Issue

+
+ + + + + + +
+ + +
+
# File app/mailers/notify.rb, line 19
+def new_issue_email(issue_id)
+  @issue = Issue.find(issue_id)
+  @project = @issue.project
+  mail(to: @issue.assignee_email, subject: subject("new issue ##{@issue.id}", @issue.title))
+end
+
+
+ +
+ +
+
+ + new_merge_request_email(merge_request_id) + + +
+ + +
+

Merge Request

+
+ + + + + + +
+ + +
+
# File app/mailers/notify.rb, line 47
+def new_merge_request_email(merge_request_id)
+  @merge_request = MergeRequest.find(merge_request_id)
+  @project = @merge_request.project
+  mail(to: @merge_request.assignee_email, subject: subject("new merge request !#{@merge_request.id}", @merge_request.title))
+end
+
+
+ +
+ +
+
+ + new_user_email(user_id, password) + + +
+ + +
+

User

+
+ + + + + + +
+ + +
+
# File app/mailers/notify.rb, line 118
+def new_user_email(user_id, password)
+  @user = User.find(user_id)
+  @password = password
+  mail(to: @user.email, subject: subject("Account was created for you"))
+end
+
+
+ +
+ +
+
+ + note_commit_email(recipient_id, note_id) + + +
+ + +
+

Note

+
+ + + + + + +
+ + +
+
# File app/mailers/notify.rb, line 66
+def note_commit_email(recipient_id, note_id)
+  @note = Note.find(note_id)
+  @commit = @note.noteable
+  @commit = CommitDecorator.decorate(@commit)
+  @project = @note.project
+  mail(to: recipient(recipient_id), subject: subject("note for commit #{@commit.short_id}", @commit.title))
+end
+
+
+ +
+ +
+
+ + note_issue_email(recipient_id, note_id) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/mailers/notify.rb, line 74
+def note_issue_email(recipient_id, note_id)
+  @note = Note.find(note_id)
+  @issue = @note.noteable
+  @project = @note.project
+  mail(to: recipient(recipient_id), subject: subject("note for issue ##{@issue.id}"))
+end
+
+
+ +
+ +
+
+ + note_merge_request_email(recipient_id, note_id) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/mailers/notify.rb, line 81
+def note_merge_request_email(recipient_id, note_id)
+  @note = Note.find(note_id)
+  @merge_request = @note.noteable
+  @project = @note.project
+  mail(to: recipient(recipient_id), subject: subject("note for merge request !#{@merge_request.id}"))
+end
+
+
+ +
+ +
+
+ + note_wall_email(recipient_id, note_id) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/mailers/notify.rb, line 88
+def note_wall_email(recipient_id, note_id)
+  @note = Note.find(note_id)
+  @project = @note.project
+  mail(to: recipient(recipient_id), subject: subject)
+end
+
+
+ +
+ +
+
+ + project_access_granted_email(user_project_id) + + +
+ + +
+

Project

+
+ + + + + + +
+ + +
+
# File app/mailers/notify.rb, line 99
+def project_access_granted_email(user_project_id)
+  @users_project = UsersProject.find user_project_id
+  @project = @users_project.project
+  mail(to: @users_project.user.email,
+       subject: subject("access to project was granted"))
+end
+
+
+ +
+ +
+
+ + project_was_moved_email(user_project_id) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/mailers/notify.rb, line 107
+def project_was_moved_email(user_project_id)
+  @users_project = UsersProject.find user_project_id
+  @project = @users_project.project
+  mail(to: @users_project.user.email,
+       subject: subject("project was moved"))
+end
+
+
+ +
+ +
+
+ + reassigned_issue_email(recipient_id, issue_id, previous_assignee_id) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/mailers/notify.rb, line 25
+def reassigned_issue_email(recipient_id, issue_id, previous_assignee_id)
+  @issue = Issue.find(issue_id)
+  @previous_assignee ||= User.find(previous_assignee_id)
+  @project = @issue.project
+  mail(to: recipient(recipient_id), subject: subject("changed issue ##{@issue.id}", @issue.title))
+end
+
+
+ +
+ +
+
+ + reassigned_merge_request_email(recipient_id, merge_request_id, previous_assignee_id) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/mailers/notify.rb, line 53
+def reassigned_merge_request_email(recipient_id, merge_request_id, previous_assignee_id)
+  @merge_request = MergeRequest.find(merge_request_id)
+  @previous_assignee ||= User.find(previous_assignee_id)
+  @project = @merge_request.project
+  mail(to: recipient(recipient_id), subject: subject("changed merge request !#{@merge_request.id}", @merge_request.title))
+end
+
+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/Object.html b/doc/code/classes/Object.html new file mode 100644 index 00000000..5ebc2dcd --- /dev/null +++ b/doc/code/classes/Object.html @@ -0,0 +1,88 @@ + + + + + Object + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + +
Included Modules
+
    + +
  • + + Linguist::BlobHelper + +
  • + +
+ + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/OmniauthCallbacksController.html b/doc/code/classes/OmniauthCallbacksController.html new file mode 100644 index 00000000..5f54fc02 --- /dev/null +++ b/doc/code/classes/OmniauthCallbacksController.html @@ -0,0 +1,188 @@ + + + + + OmniauthCallbacksController + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + +
Methods
+
+ +
F
+
+ +
+ +
L
+
+
    + + +
  • + ldap +
  • + +
+
+ +
+ + + + + + + + + + + + + + + + + + + + +
Instance Public methods
+ +
+
+ + failure_message() + + +
+ + +
+

Extend the standard message generation to accept our custom exception

+
+ + + + + + +
+ + +
+
# File app/controllers/omniauth_callbacks_controller.rb, line 9
+def failure_message
+  exception = env["omniauth.error"]
+  error   = exception.error_reason if exception.respond_to?(:error_reason)
+  error ||= exception.error        if exception.respond_to?(:error)
+  error ||= exception.message      if exception.respond_to?(:message)
+  error ||= env["omniauth.error.type"].to_s
+  error.to_s.humanize if error
+end
+
+
+ +
+ +
+
+ + ldap() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/omniauth_callbacks_controller.rb, line 18
+def ldap
+  # We only find ourselves here if the authentication to LDAP was successful.
+  @user = User.find_for_ldap_auth(request.env["omniauth.auth"], current_user)
+  if @user.persisted?
+    @user.remember_me = true
+  end
+  sign_in_and_redirect @user
+end
+
+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/PostReceive.html b/doc/code/classes/PostReceive.html new file mode 100644 index 00000000..d078e65e --- /dev/null +++ b/doc/code/classes/PostReceive.html @@ -0,0 +1,149 @@ + + + + + PostReceive + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + +
Methods
+
+ +
P
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + +
Class Public methods
+ +
+
+ + perform(repo_path, oldrev, newrev, ref, identifier) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/workers/post_receive.rb, line 4
+def self.perform(repo_path, oldrev, newrev, ref, identifier)
+  repo_path.gsub!(Gitlab.config.gitolite.repos_path.to_s, "")
+  repo_path.gsub!(%r.git$/, "")
+  repo_path.gsub!(%r^\//, "")
+
+  project = Project.find_with_namespace(repo_path)
+  return false if project.nil?
+
+  # Ignore push from non-gitlab users
+  user = if identifier.eql? Gitlab.config.gitolite.admin_key
+    email = project.commit(newrev).author.email rescue nil
+    User.find_by_email(email) if email
+  elsif %r^[A-Z0-9._%a-z\-]+@(?:[A-Z0-9a-z\-]+\.)+[A-Za-z]{2,4}$/.match(identifier)
+    User.find_by_email(identifier)
+  else
+    Key.find_by_identifier(identifier).try(:user)
+  end
+  return false unless user
+
+  project.trigger_post_receive(oldrev, newrev, ref, user)
+end
+
+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/ProfileHelper.html b/doc/code/classes/ProfileHelper.html new file mode 100644 index 00000000..edab6952 --- /dev/null +++ b/doc/code/classes/ProfileHelper.html @@ -0,0 +1,127 @@ + + + + + ProfileHelper + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + +
Methods
+
+ +
O
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + +
Instance Public methods
+ +
+
+ + oauth_active_class(provider) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/helpers/profile_helper.rb, line 2
+def oauth_active_class provider
+  if current_user.provider == provider.to_s
+    'active'
+  end
+end
+
+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/ProfilesController.html b/doc/code/classes/ProfilesController.html new file mode 100644 index 00000000..faf4874a --- /dev/null +++ b/doc/code/classes/ProfilesController.html @@ -0,0 +1,513 @@ + + + + + ProfilesController + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + +
Methods
+
+ +
A
+
+ +
+ +
D
+
+ +
+ +
H
+
+ +
+ +
R
+
+ +
+ +
S
+
+
    + + +
  • + show +
  • + +
+
+ +
T
+
+ +
+ +
U
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + +
Instance Public methods
+ +
+
+ + account() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/profiles_controller.rb, line 11
+def account
+end
+
+
+ +
+ +
+
+ + design() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/profiles_controller.rb, line 8
+def design
+end
+
+
+ +
+ +
+
+ + history() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/profiles_controller.rb, line 49
+def history
+  @events = current_user.recent_events.page(params[:page]).per(20)
+end
+
+
+ +
+ +
+
+ + reset_private_token() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/profiles_controller.rb, line 41
+def reset_private_token
+  if current_user.reset_authentication_token!
+    flash[:notice] = "Token was successfully updated"
+  end
+
+  redirect_to account_profile_path
+end
+
+
+ +
+ +
+
+ + show() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/profiles_controller.rb, line 5
+def show
+end
+
+
+ +
+ +
+
+ + token() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/profiles_controller.rb, line 27
+def token
+end
+
+
+ +
+ +
+
+ + update() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/profiles_controller.rb, line 14
+def update
+  if @user.update_attributes(params[:user])
+    flash[:notice] = "Profile was successfully updated"
+  else
+    flash[:alert] = "Failed to update profile"
+  end
+
+  respond_to do |format|
+    format.html { redirect_to :back }
+    format.js
+  end
+end
+
+
+ +
+ +
+
+ + update_password() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/profiles_controller.rb, line 30
+def update_password
+  params[:user].reject!{ |k, v| k != "password" && k != "password_confirmation"}
+
+  if @user.update_attributes(params[:user])
+    flash[:notice] = "Password was successfully updated. Please login with it"
+    redirect_to new_user_session_path
+  else
+    render 'account'
+  end
+end
+
+
+ +
+ +
+
+ + update_username() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/profiles_controller.rb, line 53
+def update_username
+  @user.update_attributes(username: params[:user][:username])
+
+  respond_to do |format|
+    format.js
+  end
+end
+
+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/Project.html b/doc/code/classes/Project.html new file mode 100644 index 00000000..00428548 --- /dev/null +++ b/doc/code/classes/Project.html @@ -0,0 +1,1392 @@ + + + + + Project + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + +
Namespace
+ + + + + + +
Methods
+
+ +
A
+
+ +
+ +
B
+
+ +
+ +
C
+
+ +
+ +
F
+
+ +
+ +
G
+
+ +
+ +
I
+
+ +
+ +
L
+
+ +
+ +
P
+
+ +
+ +
R
+
+ +
+ +
S
+
+ +
+ +
T
+
+ +
+ +
W
+
+ +
+ +
+ + + + +
Included Modules
+ + + + + + + + + + + + + + + + +
Attributes
+ + + + + + + + +
+ [RW] + error_code
+ + + + + +
Class Public methods
+ +
+
+ + access_options() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/project.rb, line 163
+def access_options
+  UsersProject.access_roles
+end
+
+
+ +
+ +
+
+ + active() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/project.rb, line 96
+def active
+  joins(:issues, :notes, :merge_requests).order("issues.created_at, notes.created_at, merge_requests.created_at DESC")
+end
+
+
+ +
+ +
+
+ + authorized_for(user) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/project.rb, line 91
+def authorized_for user
+  projects = includes(:users_projects, :namespace)
+  projects = projects.where("users_projects.user_id = :user_id or projects.owner_id = :user_id or namespaces.owner_id = :user_id", user_id: user.id)
+end
+
+
+ +
+ +
+
+ + create_by_user(params, user) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/project.rb, line 114
+def create_by_user(params, user)
+  namespace_id = params.delete(:namespace_id)
+
+  project = Project.new params
+
+  Project.transaction do
+
+    # Parametrize path for project
+    #
+    # Ex.
+    #  'GitLab HQ'.parameterize => "gitlab-hq"
+    #
+    project.path = project.name.dup.parameterize
+
+    project.owner = user
+
+    # Apply namespace if user has access to it
+    # else fallback to user namespace
+    if namespace_id != Namespace.global_id
+      project.namespace_id = user.namespace_id
+
+      if namespace_id
+        group = Group.find_by_id(namespace_id)
+        if user.can? :manage_group, group
+          project.namespace_id = namespace_id
+        end
+      end
+    end
+
+    project.save!
+
+    # Add user as project master
+    project.users_projects.create!(project_access: UsersProject::MASTER, user: user)
+
+    # when project saved no team member exist so
+    # project repository should be updated after first user add
+    project.update_repository
+  end
+
+  project
+rescue Gitlab::Gitolite::AccessDenied => ex
+  project.error_code = :gitolite
+  project
+rescue => ex
+  project.error_code = :db
+  project.errors.add(:base, "Can't save project. Please try again later")
+  project
+end
+
+
+ +
+ +
+
+ + find_with_namespace(id) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/project.rb, line 104
+def find_with_namespace(id)
+  if id.include?("/")
+    id = id.split("/")
+    namespace_id = Namespace.find_by_path(id.first).id
+    where(namespace_id: namespace_id).find_by_path(id.second)
+  else
+    where(path: id, namespace_id: nil).last
+  end
+end
+
+
+ +
+ +
+ + + +
+ +
+ + + + + + +
+ + +
+
# File app/models/project.rb, line 100
+def search query
+  where("projects.name LIKE :query OR projects.path LIKE :query", query: "%#{query}%")
+end
+
+
+ +
+ +
Instance Public methods
+ +
+
+ + build_commit_note(commit) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/project.rb, line 208
+def build_commit_note(commit)
+  notes.new(commit_id: commit.id, noteable_type: "Commit")
+end
+
+
+ +
+ +
+
+ + check_limit() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/project.rb, line 176
+def check_limit
+  unless owner.can_create_project?
+    errors[:base] << ("Your own projects limit is #{owner.projects_limit}! Please contact administrator to increase it")
+  end
+rescue
+  errors[:base] << ("Can't check your ability to create project")
+end
+
+
+ +
+ +
+
+ + code() + + +
+ + +
+

For compatibility with old code

+
+ + + + + + +
+ + +
+
# File app/models/project.rb, line 253
+def code
+  path
+end
+
+
+ +
+ +
+
+ + commit_line_notes(commit) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/project.rb, line 216
+def commit_line_notes(commit)
+  notes.where(commit_id: commit.id, noteable_type: "Commit").where("line_code IS NOT NULL")
+end
+
+
+ +
+ +
+
+ + commit_notes(commit) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/project.rb, line 212
+def commit_notes(commit)
+  notes.where(commit_id: commit.id, noteable_type: "Commit", line_code: nil)
+end
+
+
+ +
+ +
+
+ + common_notes() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/project.rb, line 204
+def common_notes
+  notes.where(noteable_type: ["", nil]).inc_author_project
+end
+
+
+ +
+ +
+
+ + git_error?() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/project.rb, line 168
+def git_error?
+  error_code == :gitolite
+end
+
+
+ +
+ +
+
+ + gitlab_ci?() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/project.rb, line 248
+def gitlab_ci?
+  gitlab_ci_service && gitlab_ci_service.active
+end
+
+
+ +
+ +
+
+ + issues_labels() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/project.rb, line 240
+def issues_labels
+  issues.tag_counts_on(:labels)
+end
+
+
+ +
+ +
+
+ + items_for(entity) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/project.rb, line 257
+def items_for entity
+  case entity
+  when 'issue' then
+    issues
+  when 'merge_request' then
+    merge_requests
+  end
+end
+
+
+ +
+ +
+
+ + last_activity() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/project.rb, line 228
+def last_activity
+  last_event
+end
+
+
+ +
+ +
+
+ + last_activity_date() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/project.rb, line 232
+def last_activity_date
+  last_event.try(:created_at) || updated_at
+end
+
+
+ +
+ +
+
+ + private?() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/project.rb, line 224
+def private?
+  private_flag
+end
+
+
+ +
+ +
+
+ + project_id() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/project.rb, line 236
+def project_id
+  self.id
+end
+
+
+ +
+ +
+
+ + public?() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/project.rb, line 220
+def public?
+  !private_flag
+end
+
+
+ +
+ +
+
+ + repo_name() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/project.rb, line 184
+def repo_name
+  denied_paths = %w(gitolite-admin admin dashboard groups help profile projects search)
+
+  if denied_paths.include?(path)
+    errors.add(:path, "like #{path} is not allowed")
+  end
+end
+
+
+ +
+ +
+
+ + saved?() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/project.rb, line 172
+def saved?
+  id && valid?
+end
+
+
+ +
+ +
+
+ + send_move_instructions() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/project.rb, line 266
+def send_move_instructions
+  self.users_projects.each do |member|
+    Notify.project_was_moved_email(member.id).deliver
+  end
+end
+
+
+ +
+ +
+
+ + services() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/project.rb, line 244
+def services
+  [gitlab_ci_service].compact
+end
+
+
+ +
+ +
+
+ + to_param() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/project.rb, line 192
+def to_param
+  if namespace
+    namespace.path + "/" + path
+  else
+    path
+  end
+end
+
+
+ +
+ +
+
+ + web_url() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/project.rb, line 200
+def web_url
+  [Gitlab.config.gitlab.url, path_with_namespace].join("/")
+end
+
+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/Project/TransferError.html b/doc/code/classes/Project/TransferError.html new file mode 100644 index 00000000..2d0be3a4 --- /dev/null +++ b/doc/code/classes/Project/TransferError.html @@ -0,0 +1,76 @@ + + + + + Project::TransferError + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/ProjectHook.html b/doc/code/classes/ProjectHook.html new file mode 100644 index 00000000..3fa9c759 --- /dev/null +++ b/doc/code/classes/ProjectHook.html @@ -0,0 +1,92 @@ + + + + + ProjectHook + + + + + + + + + + + + + +
+
+ +
+ +

Schema Information

+ +

Table name: web_hooks

+ +
id         :integer          not null, primary key
+url        :string(255)
+project_id :integer
+created_at :datetime         not null
+updated_at :datetime         not null
+type       :string(255)      default("ProjectHook")
+service_id :integer
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/ProjectObserver.html b/doc/code/classes/ProjectObserver.html new file mode 100644 index 00000000..bf2292a5 --- /dev/null +++ b/doc/code/classes/ProjectObserver.html @@ -0,0 +1,262 @@ + + + + + ProjectObserver + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + +
Methods
+
+ +
A
+
+ +
+ +
L
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + +
Instance Public methods
+ +
+
+ + after_create(project) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/observers/project_observer.rb, line 2
+def after_create(project)
+  project.update_repository
+end
+
+
+ +
+ +
+
+ + after_destroy(project) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/observers/project_observer.rb, line 10
+def after_destroy(project)
+  log_info("Project \"#{project.name}\" was removed")
+
+  project.destroy_repository
+end
+
+
+ +
+ +
+
+ + after_update(project) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/observers/project_observer.rb, line 6
+def after_update(project)
+  project.send_move_instructions if project.namespace_id_changed?
+end
+
+
+ +
+ +
Instance Protected methods
+ +
+
+ + log_info(message) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/observers/project_observer.rb, line 22
+def log_info message
+  Gitlab::AppLogger.info message
+end
+
+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/ProjectResourceController.html b/doc/code/classes/ProjectResourceController.html new file mode 100644 index 00000000..757055ab --- /dev/null +++ b/doc/code/classes/ProjectResourceController.html @@ -0,0 +1,76 @@ + + + + + ProjectResourceController + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/ProjectUpdateContext.html b/doc/code/classes/ProjectUpdateContext.html new file mode 100644 index 00000000..3fe3f4d6 --- /dev/null +++ b/doc/code/classes/ProjectUpdateContext.html @@ -0,0 +1,148 @@ + + + + + ProjectUpdateContext + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + +
Methods
+
+ +
E
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + +
Instance Public methods
+ +
+
+ + execute(role = :default) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/contexts/project_update_context.rb, line 2
+def execute(role = :default)
+  namespace_id = params[:project].delete(:namespace_id)
+
+  allowed_transfer = can?(current_user, :change_namespace, project) || role == :admin
+
+  if allowed_transfer && namespace_id.present?
+    if namespace_id == Namespace.global_id
+      if project.namespace.present?
+        # Transfer to global namespace from anyone
+        project.transfer(nil)
+      end
+    elsif namespace_id.to_i != project.namespace_id
+      # Transfer to someone namespace
+      namespace = Namespace.find(namespace_id)
+      project.transfer(namespace)
+    end
+  end
+
+  project.update_attributes(params[:project], as: role)
+end
+
+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/ProjectsController.html b/doc/code/classes/ProjectsController.html new file mode 100644 index 00000000..3cc6dd07 --- /dev/null +++ b/doc/code/classes/ProjectsController.html @@ -0,0 +1,566 @@ + + + + + ProjectsController + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + +
Methods
+
+ +
C
+
+ +
+ +
D
+
+ +
+ +
E
+
+
    + + +
  • + edit +
  • + +
+
+ +
F
+
+ +
+ +
G
+
+ +
+ +
N
+
+
    + + +
  • + new +
  • + +
+
+ +
S
+
+
    + + +
  • + show +
  • + +
+
+ +
U
+
+ +
+ +
W
+
+
    + + +
  • + wall +
  • + +
+
+ +
+ + + + + + + + + + + + + + + + + + + + +
Instance Public methods
+ +
+
+ + create() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/projects_controller.rb, line 20
+def create
+  @project = Project.create_by_user(params[:project], current_user)
+
+  respond_to do |format|
+    flash[:notice] = 'Project was successfully created.' if @project.saved?
+    format.html do
+      if @project.saved?
+        redirect_to @project
+      else
+        render action: "new"
+      end
+    end
+    format.js
+  end
+end
+
+
+ +
+ +
+
+ + destroy() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/projects_controller.rb, line 99
+def destroy
+  return access_denied! unless can?(current_user, :remove_project, project)
+
+  # Delete team first in order to prevent multiple gitolite calls
+  project.truncate_team
+
+  project.destroy
+
+  respond_to do |format|
+    format.html { redirect_to root_path }
+  end
+end
+
+
+ +
+ +
+
+ + edit() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/projects_controller.rb, line 17
+def edit
+end
+
+
+ +
+ +
+
+ + files() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/projects_controller.rb, line 72
+def files
+  @notes = @project.notes.where("attachment != 'NULL'").order("created_at DESC").limit(100)
+end
+
+
+ +
+ +
+
+ + graph() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/projects_controller.rb, line 89
+def graph
+  respond_to do |format|
+    format.html
+    format.json do
+      graph = Gitlab::Graph::JsonBuilder.new(project)
+      render :json => graph.to_json
+    end
+  end
+end
+
+
+ +
+ +
+
+ + new() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/projects_controller.rb, line 13
+def new
+  @project = Project.new
+end
+
+
+ +
+ +
+
+ + show() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/projects_controller.rb, line 55
+def show
+  limit = (params[:limit] || 20).to_i
+  @events = @project.events.recent.limit(limit).offset(params[:offset] || 0)
+
+  respond_to do |format|
+    format.html do
+      unless @project.empty_repo?
+        @last_push = current_user.recent_push(@project.id)
+        render :show
+      else
+        render "projects/empty"
+      end
+    end
+    format.js
+  end
+end
+
+
+ +
+ +
+
+ + update() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/projects_controller.rb, line 36
+def update
+  status = ProjectUpdateContext.new(project, current_user, params).execute
+
+  respond_to do |format|
+    if status
+      flash[:notice] = 'Project was successfully updated.'
+      format.html { redirect_to edit_project_path(project), notice: 'Project was successfully updated.' }
+      format.js
+    else
+      format.html { render action: "edit" }
+      format.js
+    end
+  end
+
+rescue Project::TransferError => ex
+  @error = ex
+  render :update_failed
+end
+
+
+ +
+ +
+
+ + wall() + + +
+ + +
+

Wall

+
+ + + + + + +
+ + +
+
# File app/controllers/projects_controller.rb, line 80
+def wall
+  return render_404 unless @project.wall_enabled
+  @note = Note.new
+
+  respond_to do |format|
+    format.html
+  end
+end
+
+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/ProjectsHelper.html b/doc/code/classes/ProjectsHelper.html new file mode 100644 index 00000000..a2084279 --- /dev/null +++ b/doc/code/classes/ProjectsHelper.html @@ -0,0 +1,384 @@ + + + + + ProjectsHelper + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + +
Methods
+
+ +
G
+
+ +
+ +
L
+
+ +
+ +
P
+
+ +
+ +
R
+
+ +
+ +
T
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + +
Instance Public methods
+ +
+
+ + grouper_project_members(project) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/helpers/projects_helper.rb, line 2
+def grouper_project_members(project)
+  @project.users_projects.sort_by(&:project_access).reverse.group_by(&:project_access)
+end
+
+
+ +
+ +
+ + + +
+ +
+ + + + + + +
+ + + +
+ +
+ +
+ + + +
+ +
+ + + + + + +
+ + + +
+ +
+ +
+
+ + project_title(project) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/helpers/projects_helper.rb, line 49
+def project_title project
+  if project.group
+    project.name_with_namespace
+  else
+    project.name
+  end
+end
+
+
+ +
+ +
+
+ + remove_from_team_message(project, member) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/helpers/projects_helper.rb, line 6
+def remove_from_team_message(project, member)
+  "You are going to remove #{member.user_name} from #{project.name}. Are you sure?"
+end
+
+
+ +
+ +
+
+ + tm_path(team_member) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/helpers/projects_helper.rb, line 45
+def tm_path team_member
+  project_team_member_path(@project, team_member)
+end
+
+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/ProtectedBranch.html b/doc/code/classes/ProtectedBranch.html new file mode 100644 index 00000000..c5399ed4 --- /dev/null +++ b/doc/code/classes/ProtectedBranch.html @@ -0,0 +1,206 @@ + + + + + ProtectedBranch + + + + + + + + + + + + + +
+
+ +
+ +

Schema Information

+ +

Table name: protected_branches

+ +
id         :integer          not null, primary key
+project_id :integer          not null
+name       :string(255)      not null
+created_at :datetime         not null
+updated_at :datetime         not null
+ +
+ + + + + + + + + + + + + + + +
Methods
+
+ +
C
+
+ +
+ +
U
+
+ +
+ +
+ + + + +
Included Modules
+ + + + + + + + + + + + + + + + + + + +
Instance Public methods
+ +
+
+ + commit() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/protected_branch.rb, line 28
+def commit
+  project.commit(self.name)
+end
+
+
+ +
+ +
+
+ + update_repository() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/protected_branch.rb, line 24
+def update_repository
+  git_host.update_repository(project)
+end
+
+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/ProtectedBranchesController.html b/doc/code/classes/ProtectedBranchesController.html new file mode 100644 index 00000000..f1175852 --- /dev/null +++ b/doc/code/classes/ProtectedBranchesController.html @@ -0,0 +1,232 @@ + + + + + ProtectedBranchesController + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + +
Methods
+
+ +
C
+
+ +
+ +
D
+
+ +
+ +
I
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + +
Instance Public methods
+ +
+
+ + create() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/protected_branches_controller.rb, line 13
+def create
+  @project.protected_branches.create(params[:protected_branch])
+  redirect_to project_protected_branches_path(@project)
+end
+
+
+ +
+ +
+
+ + destroy() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/protected_branches_controller.rb, line 18
+def destroy
+  @project.protected_branches.find(params[:id]).destroy
+
+  respond_to do |format|
+    format.html { redirect_to project_protected_branches_path }
+    format.js { render nothing: true }
+  end
+end
+
+
+ +
+ +
+
+ + index() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/protected_branches_controller.rb, line 8
+def index
+  @branches = @project.protected_branches.all
+  @protected_branch = @project.protected_branches.new
+end
+
+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/PushEvent.html b/doc/code/classes/PushEvent.html new file mode 100644 index 00000000..8b74ebee --- /dev/null +++ b/doc/code/classes/PushEvent.html @@ -0,0 +1,959 @@ + + + + + PushEvent + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + +
Methods
+
+ +
B
+
+ +
+ +
C
+
+ +
+ +
L
+
+ +
+ +
M
+
+ +
+ +
N
+
+ +
+ +
P
+
+ +
+ +
R
+
+ +
+ +
T
+
+ +
+ +
V
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + +
Instance Public methods
+ +
+
+ + branch?() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/roles/push_event.rb, line 12
+def branch?
+  data[:ref]["refs/heads"]
+end
+
+
+ +
+ +
+
+ + branch_name() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/roles/push_event.rb, line 48
+def branch_name
+  @branch_name ||= data[:ref].gsub("refs/heads/", "")
+end
+
+
+ +
+ +
+
+ + commit_from() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/roles/push_event.rb, line 32
+def commit_from
+  data[:before]
+end
+
+
+ +
+ +
+
+ + commit_to() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/roles/push_event.rb, line 36
+def commit_to
+  data[:after]
+end
+
+
+ +
+ +
+
+ + commits() + + +
+ + +
+

Max 20 commits from push DESC

+
+ + + + + + +
+ + +
+
# File app/roles/push_event.rb, line 57
+def commits
+  @commits ||= data[:commits].map { |commit| project.commit(commit[:id]) }.reverse
+end
+
+
+ +
+ +
+
+ + commits_count() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/roles/push_event.rb, line 61
+def commits_count 
+  data[:total_commits_count] || commits.count || 0
+end
+
+
+ +
+ +
+
+ + last_commit() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/roles/push_event.rb, line 85
+def last_commit
+  project.commit(commit_to)
+rescue => ex
+  nil
+end
+
+
+ +
+ +
+
+ + last_push_to_non_root?() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/roles/push_event.rb, line 97
+def last_push_to_non_root?
+  branch? && project.default_branch != branch_name
+end
+
+
+ +
+ +
+
+ + md_ref?() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/roles/push_event.rb, line 28
+def md_ref?
+  !(rm_ref? || new_ref?)
+end
+
+
+ +
+ +
+
+ + new_branch?() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/roles/push_event.rb, line 16
+def new_branch?
+  commit_from =~ %r^00000/
+end
+
+
+ +
+ +
+
+ + new_ref?() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/roles/push_event.rb, line 20
+def new_ref?
+  commit_from =~ %r^00000/
+end
+
+
+ +
+ +
+
+ + parent_commit() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/roles/push_event.rb, line 79
+def parent_commit
+  project.commit(commit_from)
+rescue => ex
+  nil
+end
+
+
+ +
+ +
+
+ + push_action_name() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/roles/push_event.rb, line 69
+def push_action_name
+  if new_ref?
+    "pushed new"
+  elsif rm_ref?
+    "deleted"
+  else
+    "pushed to"
+  end
+end
+
+
+ +
+ +
+
+ + push_with_commits?() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/roles/push_event.rb, line 91
+def push_with_commits? 
+  md_ref? && commits.any? && parent_commit && last_commit
+rescue Grit::NoSuchPathError
+  false
+end
+
+
+ +
+ +
+
+ + ref_name() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/roles/push_event.rb, line 40
+def ref_name
+  if tag?
+    tag_name
+  else
+    branch_name
+  end
+end
+
+
+ +
+ +
+
+ + ref_type() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/roles/push_event.rb, line 65
+def ref_type
+  tag? ? "tag" : "branch"
+end
+
+
+ +
+ +
+
+ + rm_ref?() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/roles/push_event.rb, line 24
+def rm_ref?
+  commit_to =~ %r^00000/
+end
+
+
+ +
+ +
+
+ + tag?() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/roles/push_event.rb, line 8
+def tag?
+  data[:ref]["refs/tags"]
+end
+
+
+ +
+ +
+
+ + tag_name() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/roles/push_event.rb, line 52
+def tag_name
+  @tag_name ||= data[:ref].gsub("refs/tags/", "")
+end
+
+
+ +
+ +
+
+ + valid_push?() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/roles/push_event.rb, line 2
+def valid_push?
+  data[:ref]
+rescue => ex
+  false
+end
+
+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/PushObserver.html b/doc/code/classes/PushObserver.html new file mode 100644 index 00000000..f747fb4a --- /dev/null +++ b/doc/code/classes/PushObserver.html @@ -0,0 +1,512 @@ + + + + + PushObserver + + + + + + + + + + + + + +
+
+ +
+ +

Includes methods for handling Git Push events

+ +

Triggered by PostReceive job

+ +
+ + + + + + + + + + + + + + + +
Methods
+
+ +
E
+
+ +
+ +
O
+
+ +
+ +
P
+
+ +
+ +
T
+
+ +
+ +
U
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + +
Instance Public methods
+ +
+
+ + execute_hooks(data) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/roles/push_observer.rb, line 52
+def execute_hooks(data)
+  hooks.each { |hook| hook.execute(data) }
+end
+
+
+ +
+ +
+
+ + execute_services(data) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/roles/push_observer.rb, line 56
+def execute_services(data)
+  services.each do |service|
+
+    # Call service hook only if it is active
+    service.execute(data) if service.active
+  end
+end
+
+
+ +
+ +
+
+ + observe_push(data) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/roles/push_observer.rb, line 43
+def observe_push(data)
+  Event.create(
+    project: self,
+    action: Event::Pushed,
+    data: data,
+    author_id: data[:user_id]
+  )
+end
+
+
+ +
+ +
+
+ + post_receive_data(oldrev, newrev, ref, user) + + +
+ + +
+

Produce a hash of post-receive data

+ +

data = {

+ +
before: String,
+after: String,
+ref: String,
+user_id: String,
+user_name: String,
+repository: {
+  name: String,
+  url: String,
+  description: String,
+  homepage: String,
+},
+commits: Array,
+total_commits_count: Fixnum
+ +

}

+
+ + + + + + +
+ + +
+
# File app/roles/push_observer.rb, line 82
+def post_receive_data(oldrev, newrev, ref, user)
+
+  push_commits = commits_between(oldrev, newrev)
+
+  # Total commits count
+  push_commits_count = push_commits.size
+
+  # Get latest 20 commits ASC
+  push_commits_limited = push_commits.last(20)
+
+  # Hash to be passed as post_receive_data
+  data = {
+    before: oldrev,
+    after: newrev,
+    ref: ref,
+    user_id: user.id,
+    user_name: user.name,
+    repository: {
+      name: name,
+      url: url_to_repo,
+      description: description,
+      homepage: web_url,
+    },
+    commits: [],
+    total_commits_count: push_commits_count
+  }
+
+  # For perfomance purposes maximum 20 latest commits
+  # will be passed as post receive hook data.
+  #
+  push_commits_limited.each do |commit|
+    data[:commits] << {
+      id: commit.id,
+      message: commit.safe_message,
+      timestamp: commit.date.xmlschema,
+      url: "#{Gitlab.config.gitlab.url}/#{path_with_namespace}/commit/#{commit.id}",
+      author: {
+        name: commit.author_name,
+        email: commit.author_email
+      }
+    }
+  end
+
+  data
+end
+
+
+ +
+ +
+
+ + push_to_branch?(ref, oldrev) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/roles/push_observer.rb, line 36
+def push_to_branch? ref, oldrev
+  ref_parts = ref.split('/')
+
+  # Return if this is not a push to a branch (e.g. new commits)
+  !(ref_parts[1] !~ %rheads/ || oldrev == "00000000000000000000000000000000")
+end
+
+
+ +
+ +
+
+ + trigger_post_receive(oldrev, newrev, ref, user) + + +
+ + +
+

This method will be called after each post receive and only if the provided +user is present in GitLab.

+ +

All callbacks for post receive should be placed here.

+
+ + + + + + +
+ + +
+
# File app/roles/push_observer.rb, line 9
+def trigger_post_receive(oldrev, newrev, ref, user)
+  data = post_receive_data(oldrev, newrev, ref, user)
+
+  # Create push event
+  self.observe_push(data)
+
+  if push_to_branch? ref, oldrev
+    # Close merged MR
+    self.update_merge_requests(oldrev, newrev, ref, user)
+
+    # Execute web hooks
+    self.execute_hooks(data.dup)
+
+    # Execute project services
+    self.execute_services(data.dup)
+  end
+
+  # Create satellite
+  self.satellite.create unless self.satellite.exists?
+
+  # Discover the default branch, but only if it hasn't already been set to
+  # something else
+  if default_branch.nil?
+    update_attributes(default_branch: discover_default_branch)
+  end
+end
+
+
+ +
+ +
+
+ + update_merge_requests(oldrev, newrev, ref, user) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/roles/push_observer.rb, line 128
+def update_merge_requests(oldrev, newrev, ref, user)
+  return true unless ref =~ %rheads/
+  branch_name = ref.gsub("refs/heads/", "")
+  c_ids = self.commits_between(oldrev, newrev).map(&:id)
+
+  # Update code for merge requests
+  mrs = self.merge_requests.opened.find_all_by_branch(branch_name).all
+  mrs.each { |merge_request| merge_request.reload_code; merge_request.mark_as_unchecked }
+
+  # Close merge requests
+  mrs = self.merge_requests.opened.where(target_branch: branch_name).all
+  mrs = mrs.select(&:last_commit).select { |mr| c_ids.include?(mr.last_commit.id) }
+  mrs.each { |merge_request| merge_request.merge!(user.id) }
+
+  true
+end
+
+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/Redcarpet.html b/doc/code/classes/Redcarpet.html new file mode 100644 index 00000000..e1b53d96 --- /dev/null +++ b/doc/code/classes/Redcarpet.html @@ -0,0 +1,79 @@ + + + + + Redcarpet + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/Redcarpet/Render.html b/doc/code/classes/Redcarpet/Render.html new file mode 100644 index 00000000..29a76394 --- /dev/null +++ b/doc/code/classes/Redcarpet/Render.html @@ -0,0 +1,79 @@ + + + + + Redcarpet::Render + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/Redcarpet/Render/GitlabHTML.html b/doc/code/classes/Redcarpet/Render/GitlabHTML.html new file mode 100644 index 00000000..664207dd --- /dev/null +++ b/doc/code/classes/Redcarpet/Render/GitlabHTML.html @@ -0,0 +1,264 @@ + + + + + Redcarpet::Render::GitlabHTML + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + +
Methods
+
+ +
B
+
+ +
+ +
N
+
+
    + + +
  • + new +
  • + +
+
+ +
P
+
+ +
+ +
+ + + + + + + + + + + + + + + + + +
Attributes
+ + + + + + + + + + + + + + +
+ [R] + h
+ [R] + template
+ + + + + +
Class Public methods
+ +
+
+ + new(template, options = {}) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File lib/redcarpet/render/gitlab_html.rb, line 6
+def initialize(template, options = {})
+  @template = template
+  @project = @template.instance_variable_get("@project")
+  super options
+end
+
+
+ +
+ +
Instance Public methods
+ +
+
+ + block_code(code, language) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File lib/redcarpet/render/gitlab_html.rb, line 12
+  def block_code(code, language)
+    options = { options: {encoding: 'utf-8'} }
+    options.merge!(lexer: language.downcase) if Pygments::Lexer.find(language)
+
+    # New lines are placed to fix an rendering issue
+    # with code wrapped inside <h1> tag for next case:
+    #
+    # # Title kinda h1
+    #
+    #     ruby code here
+    #
+    "
+       <div class="#{h.user_color_scheme_class}">#{Pygments.highlight(code, options)}</div>
+
+"
+  end
+
+
+ +
+ +
+
+ + postprocess(full_document) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File lib/redcarpet/render/gitlab_html.rb, line 30
+def postprocess(full_document)
+  h.gfm(full_document)
+end
+
+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/RefsController.html b/doc/code/classes/RefsController.html new file mode 100644 index 00000000..971b8fcb --- /dev/null +++ b/doc/code/classes/RefsController.html @@ -0,0 +1,313 @@ + + + + + RefsController + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + +
Methods
+
+ +
D
+
+ +
+ +
L
+
+ +
+ +
R
+
+
    + + +
  • + ref +
  • + +
+
+ +
S
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + +
Instance Public methods
+ +
+
+ + logs_tree() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/refs_controller.rb, line 30
+def logs_tree
+  contents = @tree.contents
+  @logs = contents.map do |content|
+    file = params[:path] ? File.join(params[:path], content.name) : content.name
+    last_commit = @project.commits(@commit.id, file, 1).last
+    last_commit = CommitDecorator.decorate(last_commit)
+    {
+      file_name: content.name,
+      commit: last_commit
+    }
+  end
+end
+
+
+ +
+ +
+
+ + switch() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/refs_controller.rb, line 11
+def switch
+  respond_to do |format|
+    format.html do
+      new_path = if params[:destination] == "tree"
+                   project_tree_path(@project, @ref)
+                 else
+                   project_commits_path(@project, @ref)
+                 end
+
+      redirect_to new_path
+    end
+    format.js do
+      @ref = params[:ref]
+      define_tree_vars
+      render "tree"
+    end
+  end
+end
+
+
+ +
+ +
Instance Protected methods
+ +
+
+ + define_tree_vars() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/refs_controller.rb, line 45
+def define_tree_vars
+  params[:path] = nil if params[:path].blank?
+
+  @repo = project.repo
+  @commit = project.commit(@ref)
+  @commit = CommitDecorator.decorate(@commit)
+  @tree = Tree.new(@commit.tree, project, @ref, params[:path])
+  @tree = TreeDecorator.new(@tree)
+  @hex_path = Digest::SHA1.hexdigest(params[:path] || "")
+
+  if params[:path]
+    @logs_path = logs_file_project_ref_path(@project, @ref, params[:path])
+  else
+    @logs_path = logs_tree_project_ref_path(@project, @ref)
+  end
+rescue
+  return render_404
+end
+
+
+ +
+ +
+
+ + ref() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/refs_controller.rb, line 64
+def ref
+  @ref = params[:id] || params[:ref]
+end
+
+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/RepositoriesController.html b/doc/code/classes/RepositoriesController.html new file mode 100644 index 00000000..cd661646 --- /dev/null +++ b/doc/code/classes/RepositoriesController.html @@ -0,0 +1,325 @@ + + + + + RepositoriesController + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + +
Methods
+
+ +
A
+
+ +
+ +
B
+
+ +
+ +
S
+
+ +
+ +
T
+
+
    + + +
  • + tags +
  • + +
+
+ +
+ + + + + + + + + + + + + + + + + + + + +
Instance Public methods
+ +
+
+ + archive() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/repositories_controller.rb, line 24
+def archive
+  unless can?(current_user, :download_code, @project)
+    render_404 and return
+  end
+
+
+  file_path = @project.archive_repo(params[:ref])
+
+  if file_path
+    # Send file to user
+    send_file file_path
+  else
+    render_404
+  end
+end
+
+
+ +
+ +
+
+ + branches() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/repositories_controller.rb, line 11
+def branches
+  @branches = @project.branches
+end
+
+
+ +
+ +
+
+ + show() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/repositories_controller.rb, line 7
+def show
+  @activities = @project.commits_with_refs(20)
+end
+
+
+ +
+ +
+
+ + stats() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/repositories_controller.rb, line 19
+def stats
+  @stats = Gitlab::GitStats.new(@project.repo, @project.root_ref)
+  @graph = @stats.graph
+end
+
+
+ +
+ +
+
+ + tags() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/repositories_controller.rb, line 15
+def tags
+  @tags = @project.tags
+end
+
+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/Repository.html b/doc/code/classes/Repository.html new file mode 100644 index 00000000..a6266790 --- /dev/null +++ b/doc/code/classes/Repository.html @@ -0,0 +1,1737 @@ + + + + + Repository + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + +
Methods
+
+ +
A
+
+ +
+ +
B
+
+ +
+ +
C
+
+ +
+ +
D
+
+ +
+ +
E
+
+ +
+ +
F
+
+ +
+ +
H
+
+ +
+ +
L
+
+ +
+ +
N
+
+ +
+ +
O
+
+ +
+ +
P
+
+ +
+ +
R
+
+ +
+ +
S
+
+ +
+ +
T
+
+ +
+ +
U
+
+ +
+ +
V
+
+ +
+ +
+ + + + +
Included Modules
+ + + + + + + + + + + + + + + + + + + +
Instance Public methods
+ +
+
+ + archive_repo(ref) + + +
+ + +
+

Archive Project to .tar.gz

+ +

Already packed repo archives stored at +app_root/tmp/repositories/project_name/project_name-commit-id.tag.gz

+
+ + + + + + +
+ + +
+
# File app/roles/repository.rb, line 175
+def archive_repo(ref)
+  ref = ref || self.root_ref
+  commit = self.commit(ref)
+  return nil unless commit
+
+  # Build file path
+  file_name = self.path + "-" + commit.id.to_s + ".tar.gz"
+  storage_path = Rails.root.join("tmp", "repositories", self.path_with_namespace)
+  file_path = File.join(storage_path, file_name)
+
+  # Put files into a directory before archiving
+  prefix = self.path + "/"
+
+  # Create file if not exists
+  unless File.exists?(file_path)
+    FileUtils.mkdir_p storage_path
+    file = self.repo.archive_to_file(ref, prefix,  file_path)
+  end
+
+  file_path
+end
+
+
+ +
+ +
+
+ + branch_names() + + +
+ + +
+

Returns an Array of branch names

+
+ + + + + + +
+ + +
+
# File app/roles/repository.rb, line 67
+def branch_names
+  repo.branches.collect(&:name).sort
+end
+
+
+ +
+ +
+
+ + branches() + + +
+ + +
+

Returns an Array of Branches

+
+ + + + + + +
+ + +
+
# File app/roles/repository.rb, line 72
+def branches
+  repo.branches.sort_by(&:name)
+end
+
+
+ +
+ +
+
+ + commit(commit_id = nil) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/roles/repository.rb, line 15
+def commit(commit_id = nil)
+  Commit.find_or_first(repo, commit_id, root_ref)
+end
+
+
+ +
+ +
+
+ + commits(ref, path = nil, limit = nil, offset = nil) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/roles/repository.rb, line 31
+def commits(ref, path = nil, limit = nil, offset = nil)
+  Commit.commits(repo, ref, path, limit, offset)
+end
+
+
+ +
+ +
+
+ + commits_between(from, to) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/roles/repository.rb, line 39
+def commits_between(from, to)
+  Commit.commits_between(repo, from, to)
+end
+
+
+ +
+ +
+
+ + commits_since(date) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/roles/repository.rb, line 27
+def commits_since(date)
+  Commit.commits_since(repo, date)
+end
+
+
+ +
+ +
+
+ + commits_with_refs(n = 20) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/roles/repository.rb, line 23
+def commits_with_refs(n = 20)
+  Commit.commits_with_refs(repo, n)
+end
+
+
+ +
+ +
+
+ + destroy_repository() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/roles/repository.rb, line 111
+def destroy_repository
+  git_host.remove_repository(self)
+end
+
+
+ +
+ +
+
+ + discover_default_branch() + + +
+ + +
+

Discovers the default branch based on the repository’s available branches

+
  • +

    If no branches are present, returns nil

    +
  • +

    If one branch is present, returns its name

    +
  • +

    If two or more branches are present, returns the one that has a name +matching #root_ref +(default_branch or ‘master’ if default_branch is nil)

    +
+
+ + + + + + +
+ + +
+
# File app/roles/repository.rb, line 146
+def discover_default_branch
+  if branch_names.length == 0
+    nil
+  elsif branch_names.length == 1
+    branch_names.first
+  else
+    branch_names.select { |v| v == root_ref }.first
+  end
+end
+
+
+ +
+ +
+
+ + empty_repo?() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/roles/repository.rb, line 11
+def empty_repo?
+  !repo_exists? || !has_commits?
+end
+
+
+ +
+ +
+
+ + fresh_commits(n = 10) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/roles/repository.rb, line 19
+def fresh_commits(n = 10)
+  Commit.fresh_commits(repo, n)
+end
+
+
+ +
+ +
+
+ + has_commits?() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/roles/repository.rb, line 156
+def has_commits?
+  !!commit
+rescue Grit::NoSuchPathError
+  false
+end
+
+
+ +
+ +
+
+ + has_post_receive_file?() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/roles/repository.rb, line 47
+def has_post_receive_file?
+  !!hook_file
+end
+
+
+ +
+ +
+
+ + heads() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/roles/repository.rb, line 121
+def heads
+  @heads ||= repo.heads
+end
+
+
+ +
+ +
+
+ + hook_file() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/roles/repository.rb, line 59
+def hook_file
+  @hook_file ||= begin
+                   hook_path = File.join(path_to_repo, 'hooks', 'post-receive')
+                   File.read(hook_path) if File.exists?(hook_path)
+                 end
+end
+
+
+ +
+ +
+
+ + http_url_to_repo() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/roles/repository.rb, line 201
+def http_url_to_repo
+  http_url = [Gitlab.config.gitlab.url, "/", path_with_namespace, ".git"].join('')
+end
+
+
+ +
+ +
+
+ + last_commit_for(ref, path = nil) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/roles/repository.rb, line 35
+def last_commit_for(ref, path = nil)
+  commits(ref, path, 1).first
+end
+
+
+ +
+ +
+
+ + namespace_dir() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/roles/repository.rb, line 103
+def namespace_dir
+  namespace.try(:path) || ''
+end
+
+
+ +
+ +
+
+ + open_branches() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/roles/repository.rb, line 131
+def open_branches
+  if protected_branches.empty?
+    self.repo.heads
+  else
+    pnames = protected_branches.map(&:name)
+    self.repo.heads.reject { |h| pnames.include?(h.name) }
+  end.sort_by(&:name)
+end
+
+
+ +
+ +
+
+ + path_to_repo() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/roles/repository.rb, line 99
+def path_to_repo
+  File.join(Gitlab.config.gitolite.repos_path, "#{path_with_namespace}.git")
+end
+
+
+ +
+ +
+
+ + protected_branch?(branch_name) + + +
+ + +
+

Check if current branch name is marked as protected in the system

+
+ + + + + + +
+ + +
+
# File app/roles/repository.rb, line 206
+def protected_branch? branch_name
+  protected_branches.map(&:name).include?(branch_name)
+end
+
+
+ +
+ +
+
+ + ref_names() + + +
+ + +
+

Returns an Array of branch and tag names

+
+ + + + + + +
+ + +
+
# File app/roles/repository.rb, line 87
+def ref_names
+  [branch_names + tag_names].flatten
+end
+
+
+ +
+ +
+
+ + repo() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/roles/repository.rb, line 91
+def repo
+  @repo ||= Grit::Repo.new(path_to_repo)
+end
+
+
+ +
+ +
+
+ + repo_exists?() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/roles/repository.rb, line 115
+def repo_exists?
+  @repo_exists ||= (repo && !repo.branches.empty?)
+rescue
+  @repo_exists = false
+end
+
+
+ +
+ +
+
+ + root_ref() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/roles/repository.rb, line 162
+def root_ref
+  default_branch || "master"
+end
+
+
+ +
+ +
+
+ + root_ref?(branch) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/roles/repository.rb, line 166
+def root_ref?(branch)
+  root_ref == branch
+end
+
+
+ +
+ +
+
+ + satellite() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/roles/repository.rb, line 43
+def satellite
+  @satellite ||= Gitlab::Satellite::Satellite.new(self)
+end
+
+
+ +
+ +
+
+ + ssh_url_to_repo() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/roles/repository.rb, line 197
+def ssh_url_to_repo
+  url_to_repo
+end
+
+
+ +
+ +
+
+ + tag_names() + + +
+ + +
+

Returns an Array of tag names

+
+ + + + + + +
+ + +
+
# File app/roles/repository.rb, line 77
+def tag_names
+  repo.tags.collect(&:name).sort.reverse
+end
+
+
+ +
+ +
+
+ + tags() + + +
+ + +
+

Returns an Array of Tags

+
+ + + + + + +
+ + +
+
# File app/roles/repository.rb, line 82
+def tags
+  repo.tags.sort_by(&:name).reverse
+end
+
+
+ +
+ +
+
+ + tree(fcommit, path = nil) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/roles/repository.rb, line 125
+def tree(fcommit, path = nil)
+  fcommit = commit if fcommit == :head
+  tree = fcommit.tree
+  path ? (tree / path) : tree
+end
+
+
+ +
+ +
+
+ + update_repository() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/roles/repository.rb, line 107
+def update_repository
+  git_host.update_repository(self)
+end
+
+
+ +
+ +
+
+ + url_to_repo() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/roles/repository.rb, line 95
+def url_to_repo
+  git_host.url_to_repo(path_with_namespace)
+end
+
+
+ +
+ +
+
+ + valid_hook_file() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/roles/repository.rb, line 55
+def valid_hook_file
+  @valid_hook_file ||= File.read(Rails.root.join('lib', 'hooks', 'post-receive'))
+end
+
+
+ +
+ +
+
+ + valid_post_receive_file?() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/roles/repository.rb, line 51
+def valid_post_receive_file?
+  valid_hook_file == hook_file
+end
+
+
+ +
+ +
+
+ + valid_repo?() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/roles/repository.rb, line 4
+def valid_repo?
+  repo
+rescue
+  errors.add(:path, "Invalid repository path")
+  false
+end
+
+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/ResqueAuthentication.html b/doc/code/classes/ResqueAuthentication.html new file mode 100644 index 00000000..ec3fc9e4 --- /dev/null +++ b/doc/code/classes/ResqueAuthentication.html @@ -0,0 +1,182 @@ + + + + + ResqueAuthentication + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + +
Methods
+
+ +
C
+
+
    + + +
  • + call +
  • + +
+
+ +
N
+
+
    + + +
  • + new +
  • + +
+
+ +
+ + + + + + + + + + + + + + + + + + + + +
Class Public methods
+ +
+
+ + new(app) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File config/initializers/4_resque.rb, line 14
+def initialize(app)
+  @app = app
+end
+
+
+ +
+ +
Instance Public methods
+ +
+
+ + call(env) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File config/initializers/4_resque.rb, line 18
+def call(env)
+  account = env['warden'].authenticate!(:database_authenticatable, :rememberable, scope: :user)
+  raise "Access denied" if !account.admin?
+  @app.call(env)
+end
+
+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/SearchContext.html b/doc/code/classes/SearchContext.html new file mode 100644 index 00000000..b8ecb2e7 --- /dev/null +++ b/doc/code/classes/SearchContext.html @@ -0,0 +1,262 @@ + + + + + SearchContext + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + +
Methods
+
+ +
E
+
+ +
+ +
N
+
+
    + + +
  • + new +
  • + +
+
+ +
R
+
+ +
+ +
+ + + + + + + + + + + + + + + + + +
Attributes
+ + + + + + + + + + + + + + +
+ [RW] + params
+ [RW] + project_ids
+ + + + + +
Class Public methods
+ +
+
+ + new(project_ids, params) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/contexts/search_context.rb, line 4
+def initialize(project_ids, params)
+  @project_ids, @params = project_ids, params.dup
+end
+
+
+ +
+ +
Instance Public methods
+ +
+
+ + execute() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/contexts/search_context.rb, line 8
+def execute
+  query = params[:search]
+
+  return result unless query.present?
+
+  result[:projects] = Project.where(id: project_ids).search(query).limit(10)
+  result[:merge_requests] = MergeRequest.where(project_id: project_ids).search(query).limit(10)
+  result[:issues] = Issue.where(project_id: project_ids).search(query).limit(10)
+  result[:wiki_pages] = Wiki.where(project_id: project_ids).search(query).limit(10)
+  result
+end
+
+
+ +
+ +
+
+ + result() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/contexts/search_context.rb, line 20
+def result
+  @result ||= {
+    projects: [],
+    merge_requests: [],
+    issues: [],
+    wiki_pages: []
+  }
+end
+
+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/SearchController.html b/doc/code/classes/SearchController.html new file mode 100644 index 00000000..5f26c934 --- /dev/null +++ b/doc/code/classes/SearchController.html @@ -0,0 +1,136 @@ + + + + + SearchController + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + +
Methods
+
+ +
S
+
+
    + + +
  • + show +
  • + +
+
+ +
+ + + + + + + + + + + + + + + + + + + + +
Instance Public methods
+ +
+
+ + show() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/search_controller.rb, line 2
+def show
+  result = SearchContext.new(current_user.project_ids, params).execute
+
+  @projects       = result[:projects]
+  @merge_requests = result[:merge_requests]
+  @issues         = result[:issues]
+  @wiki_pages     = result[:wiki_pages]
+end
+
+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/Service.html b/doc/code/classes/Service.html new file mode 100644 index 00000000..f4973cb3 --- /dev/null +++ b/doc/code/classes/Service.html @@ -0,0 +1,94 @@ + + + + + Service + + + + + + + + + + + + + +
+
+ +
+ +

Schema Information

+ +

Table name: services

+ +
id          :integer          not null, primary key
+type        :string(255)
+title       :string(255)
+token       :string(255)
+project_id  :integer          not null
+created_at  :datetime         not null
+updated_at  :datetime         not null
+active      :boolean          default(FALSE), not null
+project_url :string(255)
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/ServiceHook.html b/doc/code/classes/ServiceHook.html new file mode 100644 index 00000000..faff9256 --- /dev/null +++ b/doc/code/classes/ServiceHook.html @@ -0,0 +1,92 @@ + + + + + ServiceHook + + + + + + + + + + + + + +
+
+ +
+ +

Schema Information

+ +

Table name: web_hooks

+ +
id         :integer          not null, primary key
+url        :string(255)
+project_id :integer
+created_at :datetime         not null
+updated_at :datetime         not null
+type       :string(255)      default("ProjectHook")
+service_id :integer
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/ServicesController.html b/doc/code/classes/ServicesController.html new file mode 100644 index 00000000..c0165b09 --- /dev/null +++ b/doc/code/classes/ServicesController.html @@ -0,0 +1,287 @@ + + + + + ServicesController + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + +
Methods
+
+ +
E
+
+
    + + +
  • + edit +
  • + +
+
+ +
I
+
+ +
+ +
T
+
+
    + + +
  • + test +
  • + +
+
+ +
U
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + +
Instance Public methods
+ +
+
+ + edit() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/services_controller.rb, line 11
+def edit
+  @service = @project.gitlab_ci_service
+
+  # Create if missing
+  @service = @project.create_gitlab_ci_service unless @service
+end
+
+
+ +
+ +
+
+ + index() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/services_controller.rb, line 7
+def index
+  @gitlab_ci_service = @project.gitlab_ci_service
+end
+
+
+ +
+ +
+
+ + test() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/services_controller.rb, line 28
+def test
+  commits = project.commits(project.default_branch, nil, 3)
+  data = project.post_receive_data(commits.last.id, commits.first.id, "refs/heads/#{project.default_branch}", current_user)
+
+  @service = project.gitlab_ci_service
+  @service.execute(data)
+
+  redirect_to :back
+end
+
+
+ +
+ +
+
+ + update() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/services_controller.rb, line 18
+def update
+  @service = @project.gitlab_ci_service
+
+  if @service.update_attributes(params[:service])
+    redirect_to edit_project_service_path(@project, :gitlab_ci)
+  else
+    render 'edit'
+  end
+end
+
+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/Settings.html b/doc/code/classes/Settings.html new file mode 100644 index 00000000..05219228 --- /dev/null +++ b/doc/code/classes/Settings.html @@ -0,0 +1,131 @@ + + + + + Settings + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + +
Methods
+
+ +
G
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + +
Class Public methods
+ +
+
+ + gitlab_on_non_standard_port?() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File config/initializers/1_settings.rb, line 5
+def gitlab_on_non_standard_port?
+  ![443, 80].include?(gitlab.port.to_i)
+end
+
+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/Snippet.html b/doc/code/classes/Snippet.html new file mode 100644 index 00000000..a71f1316 --- /dev/null +++ b/doc/code/classes/Snippet.html @@ -0,0 +1,402 @@ + + + + + Snippet + + + + + + + + + + + + + +
+
+ +
+ +

Schema Information

+ +

Table name: snippets

+ +
id         :integer          not null, primary key
+title      :string(255)
+content    :text
+author_id  :integer          not null
+project_id :integer          not null
+created_at :datetime         not null
+updated_at :datetime         not null
+file_name  :string(255)
+expires_at :datetime
+ +
+ + + + + + + + + + + + + + + +
Methods
+
+ +
C
+
+ +
+ +
D
+
+
    + + +
  • + data +
  • + +
+
+ +
E
+
+ +
+ +
M
+
+
    + + +
  • + mode +
  • + +
+
+ +
N
+
+
    + + +
  • + name +
  • + +
+
+ +
S
+
+
    + + +
  • + size +
  • + +
+
+ +
+ + + + +
Included Modules
+
    + +
  • + + Linguist::BlobHelper + +
  • + +
+ + + + + + + + + + + + + + + + + + +
Class Public methods
+ +
+
+ + content_types() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/snippet.rb, line 38
+def self.content_types
+  [
+    ".rb", ".py", ".pl", ".scala", ".c", ".cpp", ".java",
+    ".haml", ".html", ".sass", ".scss", ".xml", ".php", ".erb",
+    ".js", ".sh", ".coffee", ".yml", ".md"
+  ]
+end
+
+
+ +
+ +
Instance Public methods
+ +
+
+ + data() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/snippet.rb, line 46
+def data
+  content
+end
+
+
+ +
+ +
+
+ + expired?() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/snippet.rb, line 62
+def expired?
+  expires_at && expires_at < Time.current
+end
+
+
+ +
+ +
+
+ + mode() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/snippet.rb, line 58
+def mode
+  nil
+end
+
+
+ +
+ +
+
+ + name() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/snippet.rb, line 54
+def name
+  file_name
+end
+
+
+ +
+ +
+
+ + size() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/snippet.rb, line 50
+def size
+  0
+end
+
+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/SnippetsController.html b/doc/code/classes/SnippetsController.html new file mode 100644 index 00000000..fd7e0fe6 --- /dev/null +++ b/doc/code/classes/SnippetsController.html @@ -0,0 +1,611 @@ + + + + + SnippetsController + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + +
Methods
+
+ +
A
+
+ +
+ +
C
+
+ +
+ +
D
+
+ +
+ +
E
+
+
    + + +
  • + edit +
  • + +
+
+ +
I
+
+ +
+ +
N
+
+
    + + +
  • + new +
  • + +
+
+ +
R
+
+
    + + +
  • + raw +
  • + +
+
+ +
S
+
+ +
+ +
U
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + +
Instance Public methods
+ +
+
+ + create() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/snippets_controller.rb, line 26
+def create
+  @snippet = @project.snippets.new(params[:snippet])
+  @snippet.author = current_user
+  @snippet.save
+
+  if @snippet.valid?
+    redirect_to [@project, @snippet]
+  else
+    respond_with(@snippet)
+  end
+end
+
+
+ +
+ +
+
+ + destroy() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/snippets_controller.rb, line 55
+def destroy
+  return access_denied! unless can?(current_user, :admin_snippet, @snippet)
+
+  @snippet.destroy
+
+  redirect_to project_snippets_path(@project)
+end
+
+
+ +
+ +
+
+ + edit() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/snippets_controller.rb, line 38
+def edit
+end
+
+
+ +
+ +
+
+ + index() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/snippets_controller.rb, line 18
+def index
+  @snippets = @project.snippets.fresh
+end
+
+
+ +
+ +
+
+ + new() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/snippets_controller.rb, line 22
+def new
+  @snippet = @project.snippets.new
+end
+
+
+ +
+ +
+
+ + raw() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/snippets_controller.rb, line 63
+def raw
+  send_data(
+    @snippet.content,
+    type: "text/plain",
+    disposition: 'inline',
+    filename: @snippet.file_name
+  )
+end
+
+
+ +
+ +
+
+ + show() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/snippets_controller.rb, line 51
+def show
+  @note = @project.notes.new(noteable: @snippet)
+end
+
+
+ +
+ +
+
+ + update() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/snippets_controller.rb, line 41
+def update
+  @snippet.update_attributes(params[:snippet])
+
+  if @snippet.valid?
+    redirect_to [@project, @snippet]
+  else
+    respond_with(@snippet)
+  end
+end
+
+
+ +
+ +
Instance Protected methods
+ +
+
+ + authorize_admin_snippet!() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/snippets_controller.rb, line 82
+def authorize_admin_snippet!
+  return render_404 unless can?(current_user, :admin_snippet, @snippet)
+end
+
+
+ +
+ +
+
+ + authorize_modify_snippet!() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/snippets_controller.rb, line 78
+def authorize_modify_snippet!
+  return render_404 unless can?(current_user, :modify_snippet, @snippet)
+end
+
+
+ +
+ +
+
+ + snippet() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/snippets_controller.rb, line 74
+def snippet
+  @snippet ||= @project.snippets.find(params[:id])
+end
+
+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/SnippetsHelper.html b/doc/code/classes/SnippetsHelper.html new file mode 100644 index 00000000..4230a0cc --- /dev/null +++ b/doc/code/classes/SnippetsHelper.html @@ -0,0 +1,131 @@ + + + + + SnippetsHelper + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + +
Methods
+
+ +
L
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + +
Instance Public methods
+ +
+
+ + lifetime_select_options() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/helpers/snippets_helper.rb, line 2
+def lifetime_select_options
+  options = [
+      ['forever', nil],
+      ['1 day',   "#{Date.current + 1.day}"],
+      ['1 week',  "#{Date.current + 1.week}"],
+      ['1 month', "#{Date.current + 1.month}"]
+  ]
+  options_for_select(options)
+end
+
+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/StaticModel.html b/doc/code/classes/StaticModel.html new file mode 100644 index 00000000..46ead776 --- /dev/null +++ b/doc/code/classes/StaticModel.html @@ -0,0 +1,377 @@ + + + + + StaticModel + + + + + + + + + + + + + +
+
+ +
+ +

Provides an ActiveRecord-like interface to a model whose data is not +persisted to a database.

+ +
+ + + + + + + + + + + + +
Namespace
+ + + + + + +
Methods
+
+ +
#
+
+
    + + +
  • + ==, +
  • + + +
  • + [] +
  • + +
+
+ +
D
+
+ +
+ +
N
+
+ +
+ +
P
+
+ +
+ +
T
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + +
Instance Public methods
+ +
+
+ + ==(other) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/roles/static_model.rb, line 40
+def ==(other)
+  if other.is_a? StaticModel
+    id == other.id
+  else
+    super
+  end
+end
+
+
+ +
+ +
+
+ + [](key) + + +
+ + +
+

Used by AR for fetching attributes

+ +

Pass it along if we respond to it.

+
+ + + + + + +
+ + +
+
# File app/roles/static_model.rb, line 20
+def [](key)
+  send(key) if respond_to?(key)
+end
+
+
+ +
+ +
+
+ + destroyed?() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/roles/static_model.rb, line 36
+def destroyed?
+  false
+end
+
+
+ +
+ +
+
+ + new_record?() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/roles/static_model.rb, line 28
+def new_record?
+  false
+end
+
+
+ +
+ +
+
+ + persisted?() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/roles/static_model.rb, line 32
+def persisted?
+  false
+end
+
+
+ +
+ +
+
+ + to_param() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/roles/static_model.rb, line 24
+def to_param
+  id
+end
+
+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/StaticModel/ClassMethods.html b/doc/code/classes/StaticModel/ClassMethods.html new file mode 100644 index 00000000..38508f6d --- /dev/null +++ b/doc/code/classes/StaticModel/ClassMethods.html @@ -0,0 +1,172 @@ + + + + + StaticModel::ClassMethods + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + +
Methods
+
+ +
B
+
+ +
+ +
P
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + +
Instance Public methods
+ +
+
+ + base_class() + + +
+ + +
+

Used by ActiveRecord’s polymorphic association to set object_type

+
+ + + + + + +
+ + +
+
# File app/roles/static_model.rb, line 12
+def base_class
+  self
+end
+
+
+ +
+ +
+
+ + primary_key() + + +
+ + +
+

Used by ActiveRecord’s polymorphic association to set object_id

+
+ + + + + + +
+ + +
+
# File app/roles/static_model.rb, line 7
+def primary_key
+  'id'
+end
+
+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/SystemHook.html b/doc/code/classes/SystemHook.html new file mode 100644 index 00000000..4f1ce71f --- /dev/null +++ b/doc/code/classes/SystemHook.html @@ -0,0 +1,191 @@ + + + + + SystemHook + + + + + + + + + + + + + +
+
+ +
+ +

Schema Information

+ +

Table name: web_hooks

+ +
id         :integer          not null, primary key
+url        :string(255)
+project_id :integer
+created_at :datetime         not null
+updated_at :datetime         not null
+type       :string(255)      default("ProjectHook")
+service_id :integer
+ +
+ + + + + + + + + + + + + + + +
Methods
+
+ +
A
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + +
Class Public methods
+ +
+
+ + all_hooks_fire(data) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/system_hook.rb, line 15
+def self.all_hooks_fire(data)
+  SystemHook.all.each do |sh|
+    sh.async_execute data
+  end
+end
+
+
+ +
+ +
Instance Public methods
+ +
+
+ + async_execute(data) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/system_hook.rb, line 21
+def async_execute(data)
+  Resque.enqueue(SystemHookWorker, id, data)
+end
+
+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/SystemHookObserver.html b/doc/code/classes/SystemHookObserver.html new file mode 100644 index 00000000..24609a5c --- /dev/null +++ b/doc/code/classes/SystemHookObserver.html @@ -0,0 +1,227 @@ + + + + + SystemHookObserver + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + +
Methods
+
+ +
A
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + +
Instance Public methods
+ +
+
+ + after_create(model) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/observers/system_hook_observer.rb, line 4
+def after_create(model)
+  if model.kind_of? Project
+    SystemHook.all_hooks_fire({
+      event_name: "project_create",
+      name: model.name,
+      path: model.path,
+      project_id: model.id,
+      owner_name: model.owner.name,
+      owner_email: model.owner.email,
+      created_at: model.created_at
+    })
+  elsif model.kind_of? User 
+    SystemHook.all_hooks_fire({
+      event_name: "user_create",
+      name: model.name,
+      email: model.email,
+      created_at: model.created_at
+    })
+
+  elsif model.kind_of? UsersProject
+    SystemHook.all_hooks_fire({
+      event_name: "user_add_to_team",
+      project_name: model.project.name,
+      project_path: model.project.path,
+      project_id: model.project_id,
+      user_name: model.user.name,
+      user_email: model.user.email,
+      project_access: model.repo_access_human,
+      created_at: model.created_at
+    })
+
+  end
+end
+
+
+ +
+ +
+
+ + after_destroy(model) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/observers/system_hook_observer.rb, line 38
+def after_destroy(model)
+  if model.kind_of? Project
+    SystemHook.all_hooks_fire({
+      event_name: "project_destroy",
+      name: model.name,
+      path: model.path,
+      project_id: model.id,
+      owner_name: model.owner.name,
+      owner_email: model.owner.email,
+    })
+  elsif model.kind_of? User
+    SystemHook.all_hooks_fire({
+      event_name: "user_destroy",
+      name: model.name,
+      email: model.email
+    })
+
+  elsif model.kind_of? UsersProject
+    SystemHook.all_hooks_fire({
+      event_name: "user_remove_from_team",
+      project_name: model.project.name,
+      project_path: model.project.path,
+      project_id: model.project_id,
+      user_name: model.user.name,
+      user_email: model.user.email,
+      project_access: model.repo_access_human
+    })
+  end
+end
+
+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/SystemHookWorker.html b/doc/code/classes/SystemHookWorker.html new file mode 100644 index 00000000..9c114ba6 --- /dev/null +++ b/doc/code/classes/SystemHookWorker.html @@ -0,0 +1,131 @@ + + + + + SystemHookWorker + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + +
Methods
+
+ +
P
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + +
Class Public methods
+ +
+
+ + perform(hook_id, data) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/workers/system_hook_worker.rb, line 4
+def self.perform(hook_id, data)
+  SystemHook.find(hook_id).execute data
+end
+
+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/TabHelper.html b/doc/code/classes/TabHelper.html new file mode 100644 index 00000000..c7b4c790 --- /dev/null +++ b/doc/code/classes/TabHelper.html @@ -0,0 +1,346 @@ + + + + + TabHelper + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + +
Methods
+
+ +
B
+
+ +
+ +
N
+
+ +
+ +
P
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + +
Instance Public methods
+ +
+
+ + branches_tab_class() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/helpers/tab_helper.rb, line 80
+def branches_tab_class
+  if current_page?(branches_project_repository_path(@project)) ||
+    current_controller?(:protected_branches) ||
+    current_page?(project_repository_path(@project))
+    'active'
+  end
+end
+
+
+ +
+ +
+ + + +
+

Navigation link helper

+ +

Returns an `li` element with an ‘active’ class if the supplied +controller(s) and/or action(s) are currently active. The content of the +element is the value passed to the block.

+ +

options - The options hash used to determine if the element is “active” +(default: {})

+ +
:controller   - One or more controller names to check (optional).
+:action       - One or more action names to check (optional).
+:path         - A shorthand path, such as 'dashboard#index', to check (optional).
+:html_options - Extra options to be passed to the list element (optional).
+ +

block - An optional block that will become the contents of the returned

+ +
`li` element.
+ +

When both :controller and :action are specified, BOTH must match in order +to be marked as active. When only one is given, either can match.

+ +

Examples

+ +
# Assuming we're on TreeController#show
+
+# Controller matches, but action doesn't
+nav_link(controller: [:tree, :refs], action: :edit) { "Hello" }
+# => '<li>Hello</li>'
+
+# Controller matches
+nav_link(controller: [:tree, :refs]) { "Hello" }
+# => '<li class="active">Hello</li>'
+
+# Shorthand path
+nav_link(path: 'tree#show') { "Hello" }
+# => '<li class="active">Hello</li>'
+
+# Supplying custom options for the list element
+nav_link(controller: :tree, html_options: {class: 'home'}) { "Hello" }
+# => '<li class="home active">Hello</li>'
+
+ +

Returns a list item element String

+
+ + + + + + +
+ + + +
+ +
+ +
+
+ + nav_tab(key, value, &block) + + +
+ + +
+

Use #nav_tab for save +controller/action but different params

+
+ + + + + + +
+ + +
+
# File app/helpers/tab_helper.rb, line 89
+def nav_tab key, value, &block
+  o = {}
+  o[:class] = ""
+  o[:class] << " active" if params[key] == value
+
+  if block_given?
+    content_tag(:li, capture(&block), o)
+  else
+    content_tag(:li, nil, o)
+  end
+end
+
+
+ +
+ +
+
+ + project_tab_class() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/helpers/tab_helper.rb, line 70
+def project_tab_class
+  [:show, :files, :edit, :update].each do |action|
+    return "active" if current_page?(controller: "projects", action: action, id: @project)
+  end
+
+  if ['snippets', 'services', 'hooks', 'deploy_keys', 'team_members'].include? controller.controller_name
+   "active"
+  end
+end
+
+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/TagsHelper.html b/doc/code/classes/TagsHelper.html new file mode 100644 index 00000000..cf30b011 --- /dev/null +++ b/doc/code/classes/TagsHelper.html @@ -0,0 +1,170 @@ + + + + + TagsHelper + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + +
Methods
+
+ +
T
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + +
Instance Public methods
+ +
+
+ + tag_list(project) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/helpers/tags_helper.rb, line 6
+def tag_list project
+  html = ''
+  project.tag_list.each do |tag|
+    html += link_to tag, tag_path(tag)
+  end
+
+  html.html_safe
+end
+
+
+ +
+ +
+
+ + tag_path(tag) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/helpers/tags_helper.rb, line 2
+def tag_path tag
+  "/tags/#{tag}"
+end
+
+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/Team.html b/doc/code/classes/Team.html new file mode 100644 index 00000000..08d2c07e --- /dev/null +++ b/doc/code/classes/Team.html @@ -0,0 +1,470 @@ + + + + + Team + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + +
Methods
+
+ +
A
+
+ +
+ +
D
+
+ +
+ +
T
+
+ +
+ +
U
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + +
Instance Public methods
+ +
+
+ + add_user_id_to_team(user_id, access_role) + + +
+ + +
+

Add user to project with passed access role by user id

+
+ + + + + + +
+ + +
+
# File app/roles/team.rb, line 26
+def add_user_id_to_team(user_id, access_role)
+  users_projects.create(
+    user_id: user_id,
+    project_access: access_role
+  )
+end
+
+
+ +
+ +
+
+ + add_user_to_team(user, access_role) + + +
+ + +
+

Add user to project with passed access role

+
+ + + + + + +
+ + +
+
# File app/roles/team.rb, line 14
+def add_user_to_team(user, access_role)
+  add_user_id_to_team(user.id, access_role)
+end
+
+
+ +
+ +
+
+ + add_users_ids_to_team(users_ids, access_role) + + +
+ + +
+

Add multiple users to project with same access role by user ids

+
+ + + + + + +
+ + +
+
# File app/roles/team.rb, line 35
+def add_users_ids_to_team(users_ids, access_role)
+  UsersProject.bulk_import(self, users_ids, access_role)
+end
+
+
+ +
+ +
+
+ + add_users_to_team(users, access_role) + + +
+ + +
+

Add multiple users to project with same access role

+
+ + + + + + +
+ + +
+
# File app/roles/team.rb, line 20
+def add_users_to_team(users, access_role)
+  add_users_ids_to_team(users.map(&:id), access_role)
+end
+
+
+ +
+ +
+
+ + delete_users_ids_from_team(users_ids) + + +
+ + +
+

Delete multiple users from project by user ids

+
+ + + + + + +
+ + +
+
# File app/roles/team.rb, line 46
+def delete_users_ids_from_team(users_ids)
+  UsersProject.bulk_delete(self, users_ids)
+end
+
+
+ +
+ +
+
+ + team_member_by_id(user_id) + + +
+ + +
+

Get Team Member record by user id

+
+ + + + + + +
+ + +
+
# File app/roles/team.rb, line 8
+def team_member_by_id(user_id)
+  users_projects.find_by_user_id(user_id)
+end
+
+
+ +
+ +
+
+ + team_member_by_name_or_email(name = nil, email = nil) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/roles/team.rb, line 2
+def team_member_by_name_or_email(name = nil, email = nil)
+  user = users.where("name like ? or email like ?", name, email).first
+  users_projects.where(user: user) if user
+end
+
+
+ +
+ +
+
+ + truncate_team() + + +
+ + +
+

Remove all users from project team

+
+ + + + + + +
+ + +
+
# File app/roles/team.rb, line 51
+def truncate_team
+  UsersProject.truncate_team(self)
+end
+
+
+ +
+ +
+
+ + update_users_ids_to_role(users_ids, access_role) + + +
+ + +
+

Update multiple project users to same access role by user ids

+
+ + + + + + +
+ + +
+
# File app/roles/team.rb, line 41
+def update_users_ids_to_role(users_ids, access_role)
+  UsersProject.bulk_update(self, users_ids, access_role)
+end
+
+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/TeamMembersController.html b/doc/code/classes/TeamMembersController.html new file mode 100644 index 00000000..f411dfd1 --- /dev/null +++ b/doc/code/classes/TeamMembersController.html @@ -0,0 +1,438 @@ + + + + + TeamMembersController + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + +
Methods
+
+ +
A
+
+ +
+ +
C
+
+ +
+ +
D
+
+ +
+ +
I
+
+ +
+ +
N
+
+
    + + +
  • + new +
  • + +
+
+ +
S
+
+
    + + +
  • + show +
  • + +
+
+ +
U
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + +
Instance Public methods
+ +
+
+ + apply_import() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/team_members_controller.rb, line 51
+def apply_import
+  giver = Project.find(params[:source_project_id])
+  status = UsersProject.import_team(giver, project)
+  notice = status ? "Succesfully imported" : "Import failed"
+
+  redirect_to project_team_members_path(project), notice: notice
+end
+
+
+ +
+ +
+
+ + create() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/team_members_controller.rb, line 18
+def create
+  @project.add_users_ids_to_team(
+    params[:user_ids],
+    params[:project_access]
+  )
+
+  if params[:redirect_to]
+    redirect_to params[:redirect_to]
+  else
+    redirect_to project_team_index_path(@project)
+  end
+end
+
+
+ +
+ +
+
+ + destroy() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/team_members_controller.rb, line 41
+def destroy
+  @team_member = project.users_projects.find(params[:id])
+  @team_member.destroy
+
+  respond_to do |format|
+    format.html { redirect_to project_team_index_path(@project) }
+    format.js { render nothing: true }
+  end
+end
+
+
+ +
+ +
+
+ + index() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/team_members_controller.rb, line 6
+def index
+end
+
+
+ +
+ +
+
+ + new() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/team_members_controller.rb, line 14
+def new
+  @team_member = project.users_projects.new
+end
+
+
+ +
+ +
+
+ + show() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/team_members_controller.rb, line 9
+def show
+  @team_member = project.users_projects.find(params[:id])
+  @events = @team_member.user.recent_events.where(:project_id => @project.id).limit(7)
+end
+
+
+ +
+ +
+
+ + update() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/team_members_controller.rb, line 31
+def update
+  @team_member = project.users_projects.find(params[:id])
+  @team_member.update_attributes(params[:team_member])
+
+  unless @team_member.valid?
+    flash[:alert] = "User should have at least one role"
+  end
+  redirect_to project_team_index_path(@project)
+end
+
+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/TestHookContext.html b/doc/code/classes/TestHookContext.html new file mode 100644 index 00000000..5b9b6478 --- /dev/null +++ b/doc/code/classes/TestHookContext.html @@ -0,0 +1,134 @@ + + + + + TestHookContext + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + +
Methods
+
+ +
E
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + +
Instance Public methods
+ +
+
+ + execute() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/contexts/test_hook_context.rb, line 2
+def execute
+  hook = project.hooks.find(params[:id])
+  commits = project.commits(project.default_branch, nil, 3)
+  data = project.post_receive_data(commits.last.id, commits.first.id, "refs/heads/#{project.default_branch}", current_user)
+  hook.execute(data)
+end
+
+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/Tree.html b/doc/code/classes/Tree.html new file mode 100644 index 00000000..e71dfa3f --- /dev/null +++ b/doc/code/classes/Tree.html @@ -0,0 +1,322 @@ + + + + + Tree + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + +
Methods
+
+ +
E
+
+ +
+ +
I
+
+ +
+ +
N
+
+
    + + +
  • + new +
  • + +
+
+ +
+ + + + +
Included Modules
+
    + +
  • + + Linguist::BlobHelper + +
  • + +
+ + + + + + + + + + + + + + + +
Attributes
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+ [RW] + path
+ [RW] + project
+ [RW] + ref
+ [RW] + tree
+ + + + + +
Class Public methods
+ +
+
+ + new(raw_tree, project, ref = nil, path = nil) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/tree.rb, line 8
+def initialize(raw_tree, project, ref = nil, path = nil)
+  @project, @ref, @path = project, ref, path
+  @tree = if path.present?
+            raw_tree / path
+          else
+            raw_tree
+          end
+end
+
+
+ +
+ +
Instance Public methods
+ +
+
+ + empty?() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/tree.rb, line 25
+def empty?
+  data.blank?
+end
+
+
+ +
+ +
+
+ + invalid?() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/tree.rb, line 21
+def invalid?
+  tree.nil?
+end
+
+
+ +
+ +
+
+ + is_blob?() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/tree.rb, line 17
+def is_blob?
+  tree.is_a?(Grit::Blob)
+end
+
+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/TreeController.html b/doc/code/classes/TreeController.html new file mode 100644 index 00000000..35c99bc0 --- /dev/null +++ b/doc/code/classes/TreeController.html @@ -0,0 +1,264 @@ + + + + + TreeController + + + + + + + + + + + + + +
+
+ +
+ +

Controller for viewing a repository’s file structure

+ +
+ + + + + + + + + + + + + + + +
Methods
+
+ +
E
+
+
    + + +
  • + edit +
  • + +
+
+ +
S
+
+
    + + +
  • + show +
  • + +
+
+ +
U
+
+ +
+ +
+ + + + +
Included Modules
+ + + + + + + + + + + + + + + + + + + +
Instance Public methods
+ +
+
+ + edit() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/tree_controller.rb, line 24
+def edit
+  @last_commit = @project.last_commit_for(@ref, @path).sha
+end
+
+
+ +
+ +
+
+ + show() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/tree_controller.rb, line 13
+def show
+  @hex_path  = Digest::SHA1.hexdigest(@path)
+  @logs_path = logs_file_project_ref_path(@project, @ref, @path)
+
+  respond_to do |format|
+    format.html
+    # Disable cache so browser history works
+    format.js { no_cache_headers }
+  end
+end
+
+
+ +
+ +
+
+ + update() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/tree_controller.rb, line 28
+def update
+  edit_file_action = Gitlab::Satellite::EditFileAction.new(current_user, @project, @ref, @path)
+  updated_successfully = edit_file_action.commit!(
+    params[:content],
+    params[:commit_message],
+    params[:last_commit]
+  )
+
+  if updated_successfully
+    redirect_to project_tree_path(@project, @id), notice: "Your changes have been successfully commited"
+  else
+    flash[:notice] = "Your changes could not be commited, because the file has been changed"
+    render :edit
+  end
+end
+
+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/TreeDecorator.html b/doc/code/classes/TreeDecorator.html new file mode 100644 index 00000000..9b32e1c9 --- /dev/null +++ b/doc/code/classes/TreeDecorator.html @@ -0,0 +1,281 @@ + + + + + TreeDecorator + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + +
Methods
+
+ +
B
+
+ +
+ +
R
+
+ +
+ +
U
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + +
Instance Public methods
+ +
+
+ + breadcrumbs(max_links = 2) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/decorators/tree_decorator.rb, line 4
+def breadcrumbs(max_links = 2)
+  if path
+    part_path = ""
+    parts = path.split("\/")
+
+    #parts = parts[0...-1] if is_blob?
+
+    yield(h.link_to("..", "#")) if parts.count > max_links
+
+    parts.each do |part|
+      part_path = File.join(part_path, part) unless part_path.empty?
+      part_path = part if part_path.empty?
+
+      next unless parts.last(2).include?(part) if parts.count > max_links
+      yield(h.link_to(h.truncate(part, length: 40), h.project_tree_path(project, h.tree_join(ref, part_path))))
+    end
+  end
+end
+
+
+ +
+ +
+
+ + readme() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/decorators/tree_decorator.rb, line 32
+def readme
+  @readme ||= contents.find { |c| c.is_a?(Grit::Blob) and c.name =~ %r^readme/ }
+end
+
+
+ +
+ +
+
+ + up_dir?() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/decorators/tree_decorator.rb, line 23
+def up_dir?
+  path.present?
+end
+
+
+ +
+ +
+
+ + up_dir_path() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/decorators/tree_decorator.rb, line 27
+def up_dir_path
+  file = File.join(path, "..")
+  h.project_tree_path(project, h.tree_join(ref, file))
+end
+
+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/TreeHelper.html b/doc/code/classes/TreeHelper.html new file mode 100644 index 00000000..a9ca7949 --- /dev/null +++ b/doc/code/classes/TreeHelper.html @@ -0,0 +1,541 @@ + + + + + TreeHelper + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + +
Methods
+
+ +
A
+
+ +
+ +
B
+
+ +
+ +
G
+
+ +
+ +
M
+
+ +
+ +
P
+
+ +
+ +
R
+
+ +
+ +
T
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + +
Instance Public methods
+ +
+
+ + allowed_tree_edit?() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/helpers/tree_helper.rb, line 63
+def allowed_tree_edit?
+  if @project.protected_branch? @ref
+    can?(current_user, :push_code_to_protected_branches, @project)
+  else
+    can?(current_user, :push_code, @project)
+  end
+end
+
+
+ +
+ +
+
+ + breadcrumbs() + + +
+ + +
+

Breadcrumb links for a Project and, if +applicable, a tree path

+
+ + + + + + +
+ + +
+
# File app/helpers/tree_helper.rb, line 72
+def breadcrumbs
+  return unless @project && @ref
+
+  # Add the root project link and the arrow icon
+  crumbs = content_tag(:li) do
+    content_tag(:span, nil, class: 'arrow') +
+    link_to(@project.name, project_commits_path(@project, @ref))
+  end
+
+  if @path
+    parts = @path.split('/')
+
+    parts.each_with_index do |part, i|
+      crumbs += content_tag(:span, '/', class: 'divider')
+      crumbs += content_tag(:li) do
+        # The text is just the individual part, but the link needs all the parts before it
+        link_to part, project_commits_path(@project, tree_join(@ref, parts[0..i].join('/')))
+      end
+    end
+  end
+
+  crumbs.html_safe
+end
+
+
+ +
+ +
+
+ + gitlab_markdown?(filename) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/helpers/tree_helper.rb, line 50
+def gitlab_markdown?(filename)
+  filename.end_with?(*%w(.mdown .md .markdown))
+end
+
+
+ +
+ +
+
+ + markup?(filename) + + +
+ + +
+

Public: Determines if a given filename is compatible with GitHub::Markup.

+ +

filename - Filename string to check

+ +

Returns boolean

+
+ + + + + + +
+ + +
+
# File app/helpers/tree_helper.rb, line 45
+def markup?(filename)
+  filename.end_with?(*%w(.textile .rdoc .org .creole
+                         .mediawiki .rst .asciidoc .pod))
+end
+
+
+ +
+ +
+
+ + plain_text_readme?(filename) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/helpers/tree_helper.rb, line 54
+def plain_text_readme? filename
+  filename == 'README'
+end
+
+
+ +
+ +
+
+ + render_tree(contents) + + +
+ + +
+

Sorts a repository’s tree so that folders are before files and renders +their corresponding partials

+ +

contents - A Grit::Tree object for the current tree

+
+ + + + + + +
+ + +
+
# File app/helpers/tree_helper.rb, line 6
+def render_tree(contents)
+  # Render Folders before Files/Submodules
+  folders, files = contents.partition { |v| v.kind_of?(Grit::Tree) }
+
+  tree = ""
+
+  # Render folders if we have any
+  tree += render partial: 'tree/tree_item', collection: folders, locals: {type: 'folder'} if folders.present?
+
+  files.each do |f|
+    if f.respond_to?(:url)
+      # Object is a Submodule
+      tree += render partial: 'tree/submodule_item', object: f
+    else
+      # Object is a Blob
+      tree += render partial: 'tree/tree_item', object: f, locals: {type: 'file'}
+    end
+  end
+
+  tree.html_safe
+end
+
+
+ +
+ +
+
+ + tree_hex_class(content) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/helpers/tree_helper.rb, line 36
+def tree_hex_class(content)
+  "file_#{hexdigest(content.name)}"
+end
+
+
+ +
+ +
+
+ + tree_icon(type) + + +
+ + +
+

Return an image icon depending on the file type

+ +

type - String type of the tree item; either ‘folder’ or ‘file’

+
+ + + + + + +
+ + +
+
# File app/helpers/tree_helper.rb, line 31
+def tree_icon(type)
+  image = type == 'folder' ? 'file_dir.png' : 'file_txt.png'
+  image_tag(image, size: '16x16')
+end
+
+
+ +
+ +
+
+ + tree_join(*args) + + +
+ + +
+

Simple shortcut to File.join

+
+ + + + + + +
+ + +
+
# File app/helpers/tree_helper.rb, line 59
+def tree_join(*args)
+  File.join(*args)
+end
+
+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/User.html b/doc/code/classes/User.html new file mode 100644 index 00000000..661b143e --- /dev/null +++ b/doc/code/classes/User.html @@ -0,0 +1,566 @@ + + + + + User + + + + + + + + + + + + + +
+
+ +
+ +

Schema Information

+ +

Table name: users

+ +
id                     :integer          not null, primary key
+email                  :string(255)      default(""), not null
+encrypted_password     :string(255)      default(""), not null
+reset_password_token   :string(255)
+reset_password_sent_at :datetime
+remember_created_at    :datetime
+sign_in_count          :integer          default(0)
+current_sign_in_at     :datetime
+last_sign_in_at        :datetime
+current_sign_in_ip     :string(255)
+last_sign_in_ip        :string(255)
+created_at             :datetime         not null
+updated_at             :datetime         not null
+name                   :string(255)
+admin                  :boolean          default(FALSE), not null
+projects_limit         :integer          default(10)
+skype                  :string(255)      default(""), not null
+linkedin               :string(255)      default(""), not null
+twitter                :string(255)      default(""), not null
+authentication_token   :string(255)
+dark_scheme            :boolean          default(FALSE), not null
+theme_id               :integer          default(1), not null
+bio                    :string(255)
+blocked                :boolean          default(FALSE), not null
+failed_attempts        :integer          default(0)
+locked_at              :datetime
+extern_uid             :string(255)
+provider               :string(255)
+username               :string(255)
+ +
+ + + + + + + + + + + + + + + +
Methods
+
+ +
C
+
+ +
+ +
F
+
+ +
+ +
G
+
+ +
+ +
N
+
+ +
+ +
S
+
+ +
+ +
W
+
+ +
+ +
+ + + + +
Included Modules
+ + + + + + + + + + + + + + + + +
Attributes
+ + + + + + + + +
+ [RW] + force_random_password
+ + + + + +
Class Public methods
+ +
+
+ + create_from_omniauth(auth, ldap = false) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/user.rb, line 108
+def create_from_omniauth(auth, ldap = false)
+  gitlab_auth.create_from_omniauth(auth, ldap)
+end
+
+
+ +
+ +
+
+ + filter(filter_name) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/user.rb, line 86
+def filter filter_name
+  case filter_name
+  when "admins"; self.admins
+  when "blocked"; self.blocked
+  when "wop"; self.without_projects
+  else
+    self.active
+  end
+end
+
+
+ +
+ +
+
+ + find_for_ldap_auth(auth, signed_in_resource = nil) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/user.rb, line 116
+def find_for_ldap_auth(auth, signed_in_resource = nil)
+  gitlab_auth.find_for_ldap_auth(auth, signed_in_resource)
+end
+
+
+ +
+ +
+
+ + find_or_new_for_omniauth(auth) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/user.rb, line 112
+def find_or_new_for_omniauth(auth)
+  gitlab_auth.find_or_new_for_omniauth(auth)
+end
+
+
+ +
+ +
+
+ + gitlab_auth() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/user.rb, line 120
+def gitlab_auth
+  Gitlab::Auth.new
+end
+
+
+ +
+ +
+
+ + not_in_project(project) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/user.rb, line 96
+def not_in_project(project)
+  if project.users.present?
+    where("id not in (:ids)", ids: project.users.map(&:id) )
+  else
+    scoped
+  end
+end
+
+
+ +
+ +
+ + + +
+ +
+ + + + + + +
+ + +
+
# File app/models/user.rb, line 124
+def search query
+  where("name LIKE :query or email LIKE :query", query: "%#{query}%")
+end
+
+
+ +
+ +
+
+ + without_projects() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/user.rb, line 104
+def without_projects
+  where('id NOT IN (SELECT DISTINCT(user_id) FROM users_projects)')
+end
+
+
+ +
+ +
Instance Public methods
+ +
+
+ + generate_password() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/user.rb, line 129
+def generate_password
+  if self.force_random_password
+    self.password = self.password_confirmation = Devise.friendly_token.first(8)
+  end
+end
+
+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/UserDecorator.html b/doc/code/classes/UserDecorator.html new file mode 100644 index 00000000..24ce4b76 --- /dev/null +++ b/doc/code/classes/UserDecorator.html @@ -0,0 +1,178 @@ + + + + + UserDecorator + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + +
Methods
+
+ +
A
+
+ +
+ +
T
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + +
Instance Public methods
+ +
+
+ + avatar_image(size = 16) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/decorators/user_decorator.rb, line 4
+def avatar_image size = 16
+  h.image_tag h.gravatar_icon(self.email, size), class: "avatar #{"s#{size}"}", width: size
+end
+
+
+ +
+ +
+
+ + tm_of(project) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/decorators/user_decorator.rb, line 8
+def tm_of(project)
+  project.team_member_by_id(self.id)
+end
+
+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/UserObserver.html b/doc/code/classes/UserObserver.html new file mode 100644 index 00000000..6899937a --- /dev/null +++ b/doc/code/classes/UserObserver.html @@ -0,0 +1,268 @@ + + + + + UserObserver + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + +
Methods
+
+ +
A
+
+ +
+ +
L
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + +
Instance Public methods
+ +
+
+ + after_create(user) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/observers/user_observer.rb, line 2
+def after_create(user)
+  log_info("User \"#{user.name}\" (#{user.email}) was created")
+
+  Notify.new_user_email(user.id, user.password).deliver
+end
+
+
+ +
+ +
+
+ + after_destroy(user) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/observers/user_observer.rb, line 8
+def after_destroy user
+  log_info("User \"#{user.name}\" (#{user.email})  was removed")
+end
+
+
+ +
+ +
+
+ + after_save(user) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/observers/user_observer.rb, line 12
+def after_save user
+  if user.username_changed?
+    if user.namespace
+      user.namespace.update_attributes(path: user.username)
+    else
+      user.create_namespace!(path: user.username, name: user.username)
+    end
+  end
+end
+
+
+ +
+ +
Instance Protected methods
+ +
+
+ + log_info(message) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/observers/user_observer.rb, line 24
+def log_info message
+  Gitlab::AppLogger.info message
+end
+
+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/UsersProject.html b/doc/code/classes/UsersProject.html new file mode 100644 index 00000000..76ae5125 --- /dev/null +++ b/doc/code/classes/UsersProject.html @@ -0,0 +1,871 @@ + + + + + UsersProject + + + + + + + + + + + + + +
+
+ +
+ +

Schema Information

+ +

Table name: users_projects

+ +
id             :integer          not null, primary key
+user_id        :integer          not null
+project_id     :integer          not null
+created_at     :datetime         not null
+updated_at     :datetime         not null
+project_access :integer          default(0), not null
+ +
+ + + + + + + + + + + + + + + +
Methods
+
+ +
A
+
+ +
+ +
B
+
+ +
+ +
I
+
+ +
+ +
P
+
+ +
+ +
R
+
+ +
+ +
S
+
+ +
+ +
T
+
+ +
+ +
U
+
+ +
+ +
+ + + + +
Included Modules
+ + + + + + + + + + + + + +
Constants
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GUEST=10
 
REPORTER=20
 
DEVELOPER=30
 
MASTER=40
 
+ + + + + +
Attributes
+ + + + + + + + +
+ [RW] + skip_git
+ + + + + +
Class Public methods
+ +
+
+ + access_roles() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/users_project.rb, line 140
+def access_roles
+  {
+    "Guest"     => GUEST,
+    "Reporter"  => REPORTER,
+    "Developer" => DEVELOPER,
+    "Master"    => MASTER
+  }
+end
+
+
+ +
+ +
+
+ + add_users_into_projects(project_ids, user_ids, project_access) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/users_project.rb, line 41
+def add_users_into_projects(project_ids, user_ids, project_access)
+  UsersProject.transaction do
+    project_ids.each do |project_id|
+      user_ids.each do |user_id|
+        users_project = UsersProject.new(project_access: project_access, user_id: user_id)
+        users_project.project_id = project_id
+        users_project.skip_git = true
+        users_project.save
+      end
+    end
+    Gitlab::Gitolite.new.update_repositories(Project.where(id: project_ids))
+  end
+
+  true
+rescue
+  false
+end
+
+
+ +
+ +
+
+ + bulk_delete(project, user_ids) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/users_project.rb, line 108
+def bulk_delete(project, user_ids)
+  UsersProject.transaction do
+    UsersProject.where(user_id: user_ids, project_id: project.id).each do |users_project|
+      users_project.skip_git = true
+      users_project.destroy
+    end
+
+    project.update_repository
+  end
+end
+
+
+ +
+ +
+
+ + bulk_import(project, user_ids, project_access) + + +
+ + +
+

TODO: depreceate in future in favor of ::add_users_into_projects

+
+ + + + + + +
+ + +
+
# File app/models/users_project.rb, line 131
+def bulk_import(project, user_ids, project_access)
+  add_users_into_projects([project.id], user_ids, project_access)
+end
+
+
+ +
+ +
+
+ + bulk_update(project, user_ids, project_access) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/users_project.rb, line 119
+def bulk_update(project, user_ids, project_access)
+  UsersProject.transaction do
+    UsersProject.where(user_id: user_ids, project_id: project.id).each do |users_project|
+      users_project.project_access = project_access
+      users_project.skip_git = true
+      users_project.save
+    end
+    project.update_repository
+  end
+end
+
+
+ +
+ +
+
+ + import_team(source_project, target_project) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/users_project.rb, line 78
+def import_team(source_project, target_project)
+  source_team = source_project.users_projects.all
+  target_team = target_project.users_projects.all
+  target_user_ids = target_team.map(&:user_id)
+
+  source_team.reject! do |tm|
+    # Skip if user already present in team
+    target_user_ids.include?(tm.user_id)
+  end
+
+  source_team.map! do |tm|
+    new_tm = tm.dup
+    new_tm.id = nil
+    new_tm.project_id = target_project.id
+    new_tm.skip_git = true
+    new_tm
+  end
+
+  UsersProject.transaction do
+    source_team.each do |tm|
+      tm.save
+    end
+    target_project.update_repository
+  end
+
+  true
+rescue
+  false
+end
+
+
+ +
+ +
+
+ + truncate_team(project) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/users_project.rb, line 74
+def truncate_team project
+  truncate_teams [project.id]
+end
+
+
+ +
+ +
+
+ + truncate_teams(project_ids) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/users_project.rb, line 59
+def truncate_teams(project_ids)
+  UsersProject.transaction do
+    users_projects = UsersProject.where(project_id: project_ids)
+    users_projects.each do |users_project|
+      users_project.skip_git = true
+      users_project.destroy
+    end
+    Gitlab::Gitolite.new.update_repositories(Project.where(id: project_ids))
+  end
+
+  true
+rescue
+  false
+end
+
+
+ +
+ +
+
+ + user_bulk_import(user, project_ids, project_access) + + +
+ + +
+

TODO: depreceate in future in favor of ::add_users_into_projects

+
+ + + + + + +
+ + +
+
# File app/models/users_project.rb, line 136
+def user_bulk_import(user, project_ids, project_access)
+  add_users_into_projects(project_ids, [user.id], project_access)
+end
+
+
+ +
+ +
Instance Public methods
+ +
+
+ + project_access_human() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/users_project.rb, line 158
+def project_access_human
+  Project.access_options.key(self.project_access)
+end
+
+
+ +
+ +
+
+ + repo_access_human() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/users_project.rb, line 162
+def repo_access_human
+  self.class.access_roles.invert[self.project_access]
+end
+
+
+ +
+ +
+
+ + role_access() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/users_project.rb, line 150
+def role_access
+  project_access
+end
+
+
+ +
+ +
+
+ + skip_git?() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/users_project.rb, line 166
+def skip_git?
+  !!@skip_git
+end
+
+
+ +
+ +
+
+ + update_repository() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/users_project.rb, line 154
+def update_repository
+  git_host.update_repository(project)
+end
+
+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/UsersProjectObserver.html b/doc/code/classes/UsersProjectObserver.html new file mode 100644 index 00000000..50b02dc7 --- /dev/null +++ b/doc/code/classes/UsersProjectObserver.html @@ -0,0 +1,220 @@ + + + + + UsersProjectObserver + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + +
Methods
+
+ +
A
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + +
Instance Public methods
+ +
+
+ + after_commit(users_project) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/observers/users_project_observer.rb, line 2
+def after_commit(users_project)
+  return if users_project.destroyed?
+  Notify.project_access_granted_email(users_project.id).deliver
+end
+
+
+ +
+ +
+
+ + after_create(users_project) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/observers/users_project_observer.rb, line 7
+def after_create(users_project)
+  Event.create(
+    project_id: users_project.project.id,
+    action: Event::Joined,
+    author_id: users_project.user.id
+  )
+end
+
+
+ +
+ +
+
+ + after_destroy(users_project) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/observers/users_project_observer.rb, line 15
+def after_destroy(users_project)
+  Event.create(
+    project_id: users_project.project.id,
+    action: Event::Left,
+    author_id: users_project.user.id
+  )
+end
+
+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/Votes.html b/doc/code/classes/Votes.html new file mode 100644 index 00000000..bb786a79 --- /dev/null +++ b/doc/code/classes/Votes.html @@ -0,0 +1,307 @@ + + + + + Votes + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + +
Methods
+
+ +
D
+
+ +
+ +
U
+
+ +
+ +
V
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + +
Instance Public methods
+ +
+
+ + downvotes() + + +
+ + +
+

Return the number of -1 comments (downvotes)

+
+ + + + + + +
+ + +
+
# File app/roles/votes.rb, line 16
+def downvotes
+  notes.select(&:downvote?).size
+end
+
+
+ +
+ +
+
+ + downvotes_in_percent() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/roles/votes.rb, line 20
+def downvotes_in_percent
+  if votes_count.zero?
+    0
+  else
+    100.0 - upvotes_in_percent
+  end
+end
+
+
+ +
+ +
+
+ + upvotes() + + +
+ + +
+

Return the number of +1 comments (upvotes)

+
+ + + + + + +
+ + +
+
# File app/roles/votes.rb, line 3
+def upvotes
+  notes.select(&:upvote?).size
+end
+
+
+ +
+ +
+
+ + upvotes_in_percent() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/roles/votes.rb, line 7
+def upvotes_in_percent
+  if votes_count.zero?
+    0
+  else
+    100.0 / votes_count * upvotes
+  end
+end
+
+
+ +
+ +
+
+ + votes_count() + + +
+ + +
+

Return the total number of votes

+
+ + + + + + +
+ + +
+
# File app/roles/votes.rb, line 29
+def votes_count
+  upvotes + downvotes
+end
+
+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/WebHook.html b/doc/code/classes/WebHook.html new file mode 100644 index 00000000..54097dd3 --- /dev/null +++ b/doc/code/classes/WebHook.html @@ -0,0 +1,168 @@ + + + + + WebHook + + + + + + + + + + + + + +
+
+ +
+ +

Schema Information

+ +

Table name: web_hooks

+ +
id         :integer          not null, primary key
+url        :string(255)
+project_id :integer
+created_at :datetime         not null
+updated_at :datetime         not null
+type       :string(255)      default("ProjectHook")
+service_id :integer
+ +
+ + + + + + + + + + + + + + + +
Methods
+
+ +
E
+
+ +
+ +
+ + + + +
Included Modules
+
    + +
  • + + HTTParty + +
  • + +
+ + + + + + + + + + + + + + + + + + +
Instance Public methods
+ +
+
+ + execute(data) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/web_hook.rb, line 25
+def execute(data)
+  parsed_url = URI.parse(url)
+  if parsed_url.userinfo.blank?
+    WebHook.post(url, body: data.to_json, headers: { "Content-Type" => "application/json" })
+  else
+    post_url = url.gsub("#{parsed_url.userinfo}@", "")
+    WebHook.post(post_url,
+                 body: data.to_json,
+                 headers: {"Content-Type" => "application/json"},
+                 basic_auth: {username: parsed_url.user, password: parsed_url.password})
+  end
+end
+
+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/Wiki.html b/doc/code/classes/Wiki.html new file mode 100644 index 00000000..ab0fe9b2 --- /dev/null +++ b/doc/code/classes/Wiki.html @@ -0,0 +1,294 @@ + + + + + Wiki + + + + + + + + + + + + + +
+
+ +
+ +

Schema Information

+ +

Table name: wikis

+ +
id         :integer          not null, primary key
+title      :string(255)
+content    :text
+project_id :integer
+created_at :datetime         not null
+updated_at :datetime         not null
+slug       :string(255)
+user_id    :integer
+ +
+ + + + + + + + + + + + + + + +
Methods
+
+ +
R
+
+ +
+ +
S
+
+ +
+ +
T
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + +
Class Public methods
+ +
+ + + +
+ +
+ + + + + + +
+ + +
+
# File app/models/wiki.rb, line 33
+def search(query)
+  where("title like :query OR content like :query", query: "%#{query}%")
+end
+
+
+ +
+ +
Class Protected methods
+ +
+
+ + regenerate_from(wiki) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/wiki.rb, line 40
+def self.regenerate_from wiki
+  regenerated_field = [:slug, :content, :title]
+
+  new_wiki = Wiki.new
+  regenerated_field.each do |field|
+    new_wiki.send("#{field}=", wiki.send(field))
+  end
+  new_wiki
+end
+
+
+ +
+ +
Instance Public methods
+ +
+
+ + to_param() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/wiki.rb, line 28
+def to_param
+  slug
+end
+
+
+ +
+ +
Instance Protected methods
+ +
+
+ + set_slug() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/models/wiki.rb, line 50
+def set_slug
+  self.slug = self.title.parameterize
+end
+
+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/doc/code/classes/WikisController.html b/doc/code/classes/WikisController.html new file mode 100644 index 00000000..3247d4f0 --- /dev/null +++ b/doc/code/classes/WikisController.html @@ -0,0 +1,397 @@ + + + + + WikisController + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + +
Methods
+
+ +
C
+
+ +
+ +
D
+
+ +
+ +
E
+
+
    + + +
  • + edit +
  • + +
+
+ +
H
+
+ +
+ +
P
+
+ +
+ +
S
+
+
    + + +
  • + show +
  • + +
+
+ +
+ + + + + + + + + + + + + + + + + + + + +
Instance Public methods
+ +
+
+ + create() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/wikis_controller.rb, line 36
+def create
+  @wiki = @project.wikis.new(params[:wiki])
+  @wiki.user = current_user
+
+  respond_to do |format|
+    if @wiki.save
+      format.html { redirect_to [@project, @wiki], notice: 'Wiki was successfully updated.' }
+    else
+      format.html { render action: "edit" }
+    end
+  end
+end
+
+
+ +
+ +
+
+ + destroy() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/wikis_controller.rb, line 53
+def destroy
+  @wikis = @project.wikis.where(slug: params[:id]).delete_all
+
+  respond_to do |format|
+    format.html { redirect_to project_wiki_path(@project, :index), notice: "Page was successfully deleted" }
+  end
+end
+
+
+ +
+ +
+
+ + edit() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/wikis_controller.rb, line 31
+def edit
+  @wiki = @project.wikis.where(slug: params[:id]).order("created_at").last
+  @wiki = Wiki.regenerate_from @wiki
+end
+
+
+ +
+ +
+
+ + history() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/wikis_controller.rb, line 49
+def history
+  @wikis = @project.wikis.where(slug: params[:id]).order("created_at")
+end
+
+
+ +
+ +
+
+ + pages() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/wikis_controller.rb, line 6
+def pages
+  @wikis = @project.wikis.group(:slug).order("created_at")
+end
+
+
+ +
+ +
+
+ + show() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/wikis_controller.rb, line 10
+def show
+  if params[:old_page_id]
+    @wiki = @project.wikis.find(params[:old_page_id])
+  else
+    @wiki = @project.wikis.where(slug: params[:id]).order("created_at").last
+  end
+
+  @note = @project.notes.new(noteable: @wiki)
+
+  if @wiki
+    render 'show'
+  else
+    if can?(current_user, :write_wiki, @project)
+      @wiki = @project.wikis.new(slug: params[:id])
+      render 'edit'
+    else
+      render 'empty'
+    end
+  end
+end
+
+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/doc/code/created.rid b/doc/code/created.rid new file mode 100644 index 00000000..3177c0b3 --- /dev/null +++ b/doc/code/created.rid @@ -0,0 +1,155 @@ +Sun, 30 Dec 2012 14:41:56 +0200 +app/models/namespace.rb Sun, 30 Dec 2012 12:06:28 +0200 +app/models/ability.rb Sun, 23 Dec 2012 14:02:47 +0200 +app/models/commit.rb Sun, 23 Dec 2012 14:02:47 +0200 +app/models/gitlab_ci_service.rb Sun, 23 Dec 2012 14:02:47 +0200 +app/models/system_hook.rb Sun, 23 Dec 2012 12:16:43 +0200 +app/models/key.rb Thu, 27 Dec 2012 12:10:59 +0200 +app/models/note.rb Sun, 23 Dec 2012 14:02:47 +0200 +app/models/project.rb Fri, 28 Dec 2012 09:30:09 +0200 +app/models/tree.rb Sun, 23 Dec 2012 12:16:43 +0200 +app/models/milestone.rb Thu, 27 Dec 2012 11:32:29 +0200 +app/models/web_hook.rb Sun, 23 Dec 2012 12:16:43 +0200 +app/models/protected_branch.rb Sun, 23 Dec 2012 12:16:43 +0200 +app/models/project_hook.rb Sun, 23 Dec 2012 12:16:43 +0200 +app/models/event.rb Sun, 23 Dec 2012 14:02:47 +0200 +app/models/service_hook.rb Sun, 23 Dec 2012 12:16:43 +0200 +app/models/service.rb Sun, 23 Dec 2012 12:16:43 +0200 +app/models/snippet.rb Sun, 23 Dec 2012 14:02:47 +0200 +app/models/merge_request.rb Sun, 23 Dec 2012 14:02:47 +0200 +app/models/user.rb Sun, 30 Dec 2012 13:40:45 +0200 +app/models/group.rb Sun, 30 Dec 2012 14:25:46 +0200 +app/models/wiki.rb Sun, 23 Dec 2012 12:16:43 +0200 +app/models/users_project.rb Sun, 30 Dec 2012 14:27:12 +0200 +app/models/issue.rb Sun, 23 Dec 2012 12:16:43 +0200 +app/observers/system_hook_observer.rb Mon, 30 Jul 2012 09:40:22 +0300 +app/observers/note_observer.rb Sun, 23 Dec 2012 14:02:47 +0200 +app/observers/users_project_observer.rb Mon, 29 Oct 2012 21:33:47 +0200 +app/observers/project_observer.rb Sun, 23 Dec 2012 14:02:47 +0200 +app/observers/user_observer.rb Sun, 30 Dec 2012 12:06:28 +0200 +app/observers/merge_request_observer.rb Mon, 29 Oct 2012 21:33:47 +0200 +app/observers/activity_observer.rb Sun, 23 Dec 2012 14:02:47 +0200 +app/observers/key_observer.rb Mon, 29 Oct 2012 21:33:47 +0200 +app/observers/issue_observer.rb Sun, 23 Dec 2012 14:02:47 +0200 +app/controllers/labels_controller.rb Mon, 29 Oct 2012 21:33:47 +0200 +app/controllers/projects_controller.rb Sun, 30 Dec 2012 13:33:32 +0200 +app/controllers/application_controller.rb Sun, 23 Dec 2012 14:02:47 +0200 +app/controllers/keys_controller.rb Mon, 29 Oct 2012 21:33:47 +0200 +app/controllers/repositories_controller.rb Sun, 23 Dec 2012 12:16:43 +0200 +app/controllers/services_controller.rb Sun, 23 Dec 2012 12:16:43 +0200 +app/controllers/hooks_controller.rb Mon, 29 Oct 2012 21:33:47 +0200 +app/controllers/compare_controller.rb Mon, 29 Oct 2012 21:33:47 +0200 +app/controllers/merge_requests_controller.rb Sun, 23 Dec 2012 14:02:47 +0200 +app/controllers/snippets_controller.rb Sun, 23 Dec 2012 14:02:47 +0200 +app/controllers/help_controller.rb Wed, 29 Feb 2012 23:28:38 +0200 +app/controllers/omniauth_callbacks_controller.rb Sun, 23 Dec 2012 14:02:47 +0200 +app/controllers/errors_controller.rb Mon, 29 Oct 2012 21:33:47 +0200 +app/controllers/blob_controller.rb Sun, 23 Dec 2012 12:16:43 +0200 +app/controllers/wikis_controller.rb Mon, 29 Oct 2012 21:33:47 +0200 +app/controllers/refs_controller.rb Sun, 23 Dec 2012 12:16:43 +0200 +app/controllers/notes_controller.rb Mon, 29 Oct 2012 21:33:47 +0200 +app/controllers/milestones_controller.rb Sun, 23 Dec 2012 14:02:47 +0200 +app/controllers/search_controller.rb Sun, 23 Dec 2012 12:16:43 +0200 +app/controllers/admin_controller.rb Mon, 29 Oct 2012 21:33:47 +0200 +app/controllers/team_members_controller.rb Sun, 23 Dec 2012 14:02:47 +0200 +app/controllers/profiles_controller.rb Sun, 23 Dec 2012 14:02:47 +0200 +app/controllers/dashboard_controller.rb Sun, 23 Dec 2012 14:02:47 +0200 +app/controllers/admin/projects_controller.rb Sun, 30 Dec 2012 14:08:40 +0200 +app/controllers/admin/hooks_controller.rb Mon, 29 Oct 2012 21:33:47 +0200 +app/controllers/admin/resque_controller.rb Mon, 29 Oct 2012 21:33:47 +0200 +app/controllers/admin/logs_controller.rb Mon, 29 Oct 2012 21:33:47 +0200 +app/controllers/admin/team_members_controller.rb Mon, 29 Oct 2012 21:33:47 +0200 +app/controllers/admin/dashboard_controller.rb Sun, 23 Dec 2012 12:16:43 +0200 +app/controllers/admin/users_controller.rb Sun, 30 Dec 2012 13:42:44 +0200 +app/controllers/admin/groups_controller.rb Sun, 30 Dec 2012 14:11:24 +0200 +app/controllers/commits_controller.rb Mon, 29 Oct 2012 21:33:47 +0200 +app/controllers/tree_controller.rb Sun, 23 Dec 2012 12:16:43 +0200 +app/controllers/deploy_keys_controller.rb Mon, 29 Oct 2012 21:33:47 +0200 +app/controllers/blame_controller.rb Mon, 29 Oct 2012 21:33:47 +0200 +app/controllers/protected_branches_controller.rb Mon, 29 Oct 2012 21:33:47 +0200 +app/controllers/commit_controller.rb Sun, 23 Dec 2012 14:02:47 +0200 +app/controllers/groups_controller.rb Sun, 30 Dec 2012 12:42:35 +0200 +app/controllers/project_resource_controller.rb Sun, 23 Dec 2012 14:02:47 +0200 +app/controllers/issues_controller.rb Sun, 23 Dec 2012 14:02:47 +0200 +app/mailers/notify.rb Sun, 30 Dec 2012 12:06:28 +0200 +app/uploaders/attachment_uploader.rb Mon, 29 Oct 2012 21:33:47 +0200 +app/helpers/snippets_helper.rb Fri, 02 Dec 2011 02:40:22 +0200 +app/helpers/events_helper.rb Sun, 23 Dec 2012 12:16:43 +0200 +app/helpers/merge_requests_helper.rb Sun, 23 Dec 2012 14:02:47 +0200 +app/helpers/tree_helper.rb Sun, 23 Dec 2012 12:16:43 +0200 +app/helpers/namespaces_helper.rb Sun, 23 Dec 2012 14:02:47 +0200 +app/helpers/projects_helper.rb Sun, 23 Dec 2012 14:02:47 +0200 +app/helpers/tags_helper.rb Fri, 02 Dec 2011 02:40:22 +0200 +app/helpers/gitlab_markdown_helper.rb Mon, 29 Oct 2012 21:33:47 +0200 +app/helpers/dashboard_helper.rb Sun, 23 Dec 2012 14:02:47 +0200 +app/helpers/commits_helper.rb Thu, 27 Dec 2012 11:32:29 +0200 +app/helpers/application_helper.rb Sun, 30 Dec 2012 13:49:26 +0200 +app/helpers/issues_helper.rb Sun, 23 Dec 2012 14:02:47 +0200 +app/helpers/tab_helper.rb Sun, 23 Dec 2012 14:02:47 +0200 +app/helpers/profile_helper.rb Mon, 29 Oct 2012 21:33:47 +0200 +app/helpers/notes_helper.rb Mon, 29 Oct 2012 21:33:47 +0200 +app/contexts/project_update_context.rb Sun, 23 Dec 2012 14:02:47 +0200 +app/contexts/test_hook_context.rb Mon, 29 Oct 2012 21:33:47 +0200 +app/contexts/merge_requests_load_context.rb Sun, 23 Dec 2012 12:16:43 +0200 +app/contexts/notes/create_context.rb Mon, 29 Oct 2012 21:33:47 +0200 +app/contexts/notes/load_context.rb Sun, 23 Dec 2012 14:02:47 +0200 +app/contexts/issues_bulk_update_context.rb Mon, 29 Oct 2012 21:33:47 +0200 +app/contexts/issues_list_context.rb Mon, 29 Oct 2012 21:33:47 +0200 +app/contexts/base_context.rb Mon, 29 Oct 2012 21:33:47 +0200 +app/contexts/search_context.rb Sun, 23 Dec 2012 12:16:43 +0200 +app/contexts/commit_load_context.rb Sun, 23 Dec 2012 12:16:43 +0200 +app/roles/note_event.rb Sun, 23 Dec 2012 14:02:47 +0200 +app/roles/push_observer.rb Sun, 23 Dec 2012 14:02:47 +0200 +app/roles/account.rb Sun, 23 Dec 2012 14:02:47 +0200 +app/roles/votes.rb Mon, 29 Oct 2012 21:33:47 +0200 +app/roles/repository.rb Sun, 30 Dec 2012 12:24:50 +0200 +app/roles/git_host.rb Mon, 29 Oct 2012 21:33:47 +0200 +app/roles/team.rb Sun, 30 Dec 2012 14:26:37 +0200 +app/roles/namespaced_project.rb Wed, 26 Dec 2012 10:56:36 +0200 +app/roles/authority.rb Mon, 29 Oct 2012 21:33:47 +0200 +app/roles/push_event.rb Mon, 29 Oct 2012 21:33:47 +0200 +app/roles/static_model.rb Mon, 29 Oct 2012 21:44:39 +0200 +app/roles/issue_commonality.rb Sun, 23 Dec 2012 12:16:43 +0200 +app/decorators/commit_decorator.rb Sun, 23 Dec 2012 14:02:47 +0200 +app/decorators/application_decorator.rb Mon, 29 Oct 2012 21:33:47 +0200 +app/decorators/tree_decorator.rb Sun, 23 Dec 2012 12:16:43 +0200 +app/decorators/event_decorator.rb Mon, 29 Oct 2012 21:33:47 +0200 +app/decorators/user_decorator.rb Sun, 23 Dec 2012 12:16:43 +0200 +app/assets/fonts/OFL.txt Thu, 27 Dec 2012 11:32:29 +0200 +app/workers/post_receive.rb Sun, 23 Dec 2012 14:02:47 +0200 +app/workers/system_hook_worker.rb Mon, 30 Jul 2012 09:40:23 +0300 +lib/extracts_path.rb Thu, 27 Dec 2012 11:32:29 +0200 +lib/file_size_validator.rb Mon, 29 Oct 2012 21:33:47 +0200 +lib/redcarpet/render/gitlab_html.rb Sun, 23 Dec 2012 14:02:47 +0200 +lib/gitlab/auth.rb Sun, 23 Dec 2012 14:02:47 +0200 +lib/gitlab/regex.rb Fri, 28 Dec 2012 09:30:09 +0200 +lib/gitlab/git_logger.rb Mon, 29 Oct 2012 21:33:47 +0200 +lib/gitlab/satellite/merge_action.rb Sun, 23 Dec 2012 12:16:43 +0200 +lib/gitlab/satellite/satellite.rb Sun, 23 Dec 2012 14:02:47 +0200 +lib/gitlab/satellite/edit_file_action.rb Sun, 23 Dec 2012 12:16:43 +0200 +lib/gitlab/satellite/action.rb Sun, 23 Dec 2012 12:16:43 +0200 +lib/gitlab/backend/grack_auth.rb Sun, 30 Dec 2012 12:06:28 +0200 +lib/gitlab/backend/gitolite_config.rb Sun, 23 Dec 2012 14:02:47 +0200 +lib/gitlab/backend/gitolite.rb Sun, 23 Dec 2012 14:02:47 +0200 +lib/gitlab/logger.rb Sun, 23 Dec 2012 14:02:47 +0200 +lib/gitlab/markdown.rb Sun, 23 Dec 2012 14:02:47 +0200 +lib/gitlab/app_logger.rb Mon, 29 Oct 2012 21:33:47 +0200 +lib/gitlab/seeder.rb Sun, 23 Dec 2012 12:16:43 +0200 +lib/gitlab/git_stats.rb Sun, 23 Dec 2012 12:16:43 +0200 +lib/gitlab/project_mover.rb Sun, 23 Dec 2012 14:02:47 +0200 +lib/gitlab/graph/commit.rb Sun, 23 Dec 2012 14:02:47 +0200 +lib/gitlab/graph/json_builder.rb Thu, 27 Dec 2012 11:32:29 +0200 +lib/gitlab/theme.rb Sun, 23 Dec 2012 12:16:43 +0200 +lib/gitlab/inline_diff.rb Mon, 29 Oct 2012 21:33:47 +0200 +lib/hooks/post-receive Sun, 23 Dec 2012 14:02:47 +0200 +lib/api/projects.rb Sun, 23 Dec 2012 14:02:47 +0200 +lib/api/merge_requests.rb Sun, 23 Dec 2012 14:02:47 +0200 +lib/api/users.rb Sun, 23 Dec 2012 14:02:47 +0200 +lib/api/session.rb Mon, 29 Oct 2012 21:33:47 +0200 +lib/api/notes.rb Sun, 23 Dec 2012 14:02:47 +0200 +lib/api/helpers.rb Sun, 23 Dec 2012 14:02:47 +0200 +lib/api/entities.rb Sun, 23 Dec 2012 14:02:47 +0200 +lib/api/milestones.rb Sun, 23 Dec 2012 14:02:47 +0200 +lib/api/issues.rb Sun, 23 Dec 2012 14:02:47 +0200 +lib/event_filter.rb Sun, 23 Dec 2012 12:16:43 +0200 +lib/api.rb Sun, 23 Dec 2012 14:02:47 +0200 diff --git a/doc/code/css/github.css b/doc/code/css/github.css new file mode 100644 index 00000000..bd778a76 --- /dev/null +++ b/doc/code/css/github.css @@ -0,0 +1,129 @@ +/* + +github.com style (c) Vasily Polovnyov + +*/ + +pre code { + display: block; padding: 0.5em; + color: #000; + background: #f8f8ff +} + +pre .comment, +pre .template_comment, +pre .diff .header, +pre .javadoc { + color: #998; + font-style: italic +} + +pre .keyword, +pre .css .rule .keyword, +pre .winutils, +pre .javascript .title, +pre .lisp .title, +pre .subst { + color: #000; + font-weight: bold +} + +pre .number, +pre .hexcolor { + color: #40a070 +} + +pre .string, +pre .tag .value, +pre .phpdoc, +pre .tex .formula { + color: #d14 +} + +pre .title, +pre .id { + color: #900; + font-weight: bold +} + +pre .javascript .title, +pre .lisp .title, +pre .subst { + font-weight: normal +} + +pre .class .title, +pre .haskell .label, +pre .tex .command { + color: #458; + font-weight: bold +} + +pre .tag, +pre .tag .title, +pre .rules .property, +pre .django .tag .keyword { + color: #000080; + font-weight: normal +} + +pre .attribute, +pre .variable, +pre .instancevar, +pre .lisp .body { + color: #008080 +} + +pre .regexp { + color: #009926 +} + +pre .class { + color: #458; + font-weight: bold +} + +pre .symbol, +pre .ruby .symbol .string, +pre .ruby .symbol .keyword, +pre .ruby .symbol .keymethods, +pre .lisp .keyword, +pre .tex .special, +pre .input_number { + color: #990073 +} + +pre .builtin, +pre .built_in, +pre .lisp .title { + color: #0086b3 +} + +pre .preprocessor, +pre .pi, +pre .doctype, +pre .shebang, +pre .cdata { + color: #999; + font-weight: bold +} + +pre .deletion { + background: #fdd +} + +pre .addition { + background: #dfd +} + +pre .diff .change { + background: #0086b3 +} + +pre .chunk { + color: #aaa +} + +pre .tex .formula { + opacity: 0.5; +} diff --git a/doc/code/css/main.css b/doc/code/css/main.css new file mode 100755 index 00000000..7d5a913a --- /dev/null +++ b/doc/code/css/main.css @@ -0,0 +1,333 @@ +body { + font-family: "Helvetica Neue", Arial, sans-serif; + background: #FFF; + color: #000; + margin: 0px; + font-size: 0.82em; + line-height: 1.25em; +} + +a { + color: #00F; + text-decoration: none; +} + +a:hover { + color: #333; + background: #FE8; +} + +p { + margin-bottom: 1em; +} + +h1 { + font-size: 2.1em; + font-weight: normal; + line-height: 1.2em; + margin: 1.4em 0 0.7em 0; +} + +h2 { + font-size: 1.6em; + margin: 1.8em 0 0.8em 0; + font-weight: normal; + line-height: 1.2em; +} + +h3 { + font-size: 1.4em; + color:#555; + margin: 1.4em 0 0.7em 0; + font-weight: normal; +} + +h4 { + margin: 1.4em 0 0.5em 0; + font-size: 1em; +} + +table +{ + margin-bottom: 1em; +} + +td, th +{ + padding: 0 0.7em 0.3em 0; +} + +th +{ + font-weight: bold; +} + +.clear +{ + clear: both; + width: 0; height: 0; +} + +dt +{ + margin-bottom: 0.3em; + font-weight: bold; +} + +dd +{ + margin-left: 2em; + margin-bottom: 1em; +} + +dd p +{ + margin-top: 0.6em; +} + +li +{ + margin: 0 0 0.5em 2em; +} + +ul li +{ + list-style: disc; +} + +ol li +{ + list-style: decimal; +} + +.banner +{ + background: #EDF3FE; + border-bottom: 1px solid #ccc; + padding: 1em 2em 0.5em 2em; +} +.banner h1 +{ + font-size: 1.2em; + margin: 0; +} + +.banner h1 .type +{ + font-size: 0.833em; + display:block; +} + +.banner h1 .type, +.banner h1 .parent +{ + color: #666; +} + +.banner ul +{ + margin-top: 0.3em; + margin-bottom: 0; + font-size: 0.85em; +} + +.banner li +{ + list-style: none; + margin-left: 0; + margin-bottom: 0; +} + +pre +{ + margin-bottom: 1em; +} + +.methods dt +{ + width: 1em; + font-size: 1.5em; + color:#AAA; + position: absolute; + font-weight: normal; + margin: 0; +} + +.methods dd +{ + margin-left: 2.5em; + min-height: 1.8em; + -height: 1.8em; + padding-bottom: 0.8em; +} + + +.methods ul li +{ + margin-right: 0.7em; + margin-left: 0; + list-style: none; + display: inline; +} + +#content { + margin: 2em; + margin-left: 3.5em; + margin-right: 3.5em; +} + + +.sectiontitle { + margin-top: 2em; + margin-bottom: 1.3em; + margin-left: -1.2em; + font-size: 1.2em; + padding: 0 0 0.25em 0; + font-weight: bold; + border-bottom: 1px solid #000; +} + +.contenttitle { + margin-top: 4em; + margin-bottom: 1.3em; + margin-left: -0.9em; + font-size: 1.6em; + padding: 0 0 0.25em 0; + font-weight: bold; +} + +.attr-rw { + padding-right: 1em; + text-align: center; + color: #055; +} + +.attr-name { + font-weight: bold; + padding-right: 1em; +} + +.attr-desc { +} + +tt { + font-size: 1.15em; +} + +.attr-value { + font-family: monospace; + padding-left: 1em; + font-size: 1.15em; +} + +.dyn-source { + display: none; + background: #fffde8; + color: #000; + border: #ffe0bb dotted 1px; + margin: 0.5em 2em 0.5em 0; + padding: 0.5em; +} + +.dyn-source .cmt { + color: #00F; + font-style: italic; +} + +.dyn-source .kw { + color: #070; + font-weight: bold; +} + +.description pre { + padding: 0.5em; + border: #ffe0bb dotted 1px; + background: #fffde8; +} + +.method { + margin-bottom: 2em; +} +.method .description, +.method .sourcecode +{ + margin-left: 1.2em; +} +.method h4 +{ + border-bottom: 1px dotted #999; + padding: 0 0 0.2em 0; + margin-bottom: 0.8em; + font-size: 1.1em; + color:#333; +} +.method .method-title { + border-bottom: 1px dotted #666; + padding: 0 0 0.15em 0; + margin: 0 0 0.5em 0; + font-size: 1.2em; + line-height: 1.25em; + position: relative; +} + +.method .method-title a.permalink { + position: absolute; + font-size: 0.75em; + right: 0; +} + +.method .sourcecode p.source-link { + text-indent: 0em; + margin-top: 0.5em; +} + +.method .aka { + margin-top: 0.3em; + margin-left: 1em; + font-style: italic; + text-indent: 2em; +} + +.method .source-link +{ + font-size: 0.85em; +} + +.ruby-constant { + color: teal; +} +.ruby-keyword { + color: #000; + font-weight: bold +} +.ruby-title { + color: #900; + font-weight: bold; +} +.ruby-ivar { + color: teal; +} +.ruby-operator { + color: #000; + font-weight: bold +} +.ruby-identifier { + color: #000; +} +.ruby-string, +.ruby-node { + color: #D14; +} +.ruby-comment { + color: #998; + font-style: italic; +} +.ruby-regexp { + color: #009926; +} +.ruby-value { + color: #990073; +} +.ruby-number { + color: #40A070; +} diff --git a/doc/code/css/panel.css b/doc/code/css/panel.css new file mode 100755 index 00000000..9bd8027b --- /dev/null +++ b/doc/code/css/panel.css @@ -0,0 +1,384 @@ +/* Panel (begin) */ + .panel + { + position: absolute; + width: 100%; + height: 100%; + top: 0; + left: 0; + background: #FFF; + z-index: 2; + font-family: "Helvetica Neue", "Arial", sans-serif; + //zoom: 1; + } + + .panel_tree .results, + .panel_results .tree + { + display: none; + } + + /* Header with search box (begin) */ + .panel .header + { + width: 100%; + height: 29px; + border-bottom: 1px solid #666; + position: relative; + left: 0; top: 0; + background: #e8e8e8; + } + + .panel .header div + { + margin: 0 7px; + } + .panel .header table + { + height: 29px; + width: 100%; + } + + .panel .header table td + { + vertical-align: middle; + text-align: middle; + } + + .panel .header label + { + position: absolute; + font-size: 12px; + line-height: 29px; + margin-left: 3px; + color: #999; + cursor: text; + } + + .panel .header table input + { + width: 100%; + box-sizing: border-box; + -moz-box-sizing: border-box; + -webkit-box-sizing: border-box; + display: inline-block; + -webkit-appearance: searchfield; + height: 22px; + //height: auto; + } + + /* Header with search box (end) */ + + + /* Results (begin) */ + .panel .result + { + position: absolute; + top: 30px; + bottom: 0; + left: 0; + width: 100%; + //height: expression((this.parentNode.offsetHeight - 31)); + overflow-y: scroll; + overflow-x: hidden; + -overflow-y: hidden; + background: #EDF3FE url(../i/results_bg.png); + z-index: 2; + //zoom:1; + } + + .panel .result ul + { + font-size: 0.8em; + width: 100%; + background: #EDF3FE url(../i/results_bg.png); + //zoom:1; + } + + .panel .result ul li + { + height: 46px; + -height: 50px; + //display: inline; + //width: 100%; + //zoom: 1; + overflow: hidden; + padding: 4px 10px 0 10px; + cursor: pointer; + } + + .panel .result ul li h1 + { + font-size: 13px; + font-weight: normal; + color: #333; + margin-bottom: 2px; + white-space: nowrap; + } + + .panel .result ul li p + { + font-size: 11px; + color: #333; + margin-bottom: 2px; + white-space: nowrap; + } + + .panel .result ul li h1 i, + .panel .result ul li p.snippet + { + color: #999; + } + + .panel .result ul li b + { + color: #000; + } + + .panel .result ul li.current + { + background: #3875D7; + } + + .panel .result ul li.current h1, + .panel .result ul li.current p + { + color: #DDD; + } + + .panel .result ul li.current h1 i, + .panel .result ul li.current p.snippet + { + color: #AAA; + } + + .panel .result ul li.current b + { + color: #FFF; + } + + + .panel .result ul li:hover, + .panel .result ul li.selected + { + background: #d0d0d0; + } + + .panel .result ul li.current:hover + { + background: #2965C0; + } + + .panel .result ul li .badge + { + margin-right: 0.4em; + margin-left: -0.2em; + padding: 0 0.2em; + color: #000; + border-radius: 3px; + } + + .panel .result ul li .badge_1 + { + background: #ACDBF4; + } + + .panel .result ul li.current .badge_1 + { + background: #97BFD7; + } + + .panel .result ul li .badge_2 + { + background: #ACF3C3; + } + + .panel .result ul li.current .badge_2 + { + background: #98D7AC; + } + + .panel .result ul li .badge_3 + { + background: #E0F3AC; + } + + .panel .result ul li.current .badge_3 + { + background: #C4D798; + } + + .panel .result ul li .badge_4 + { + background: #D7CA98; + } + + .panel .result ul li.current .badge_4 + { + background: #A6B0AC; + } + + .panel .result ul li .badge_5 + { + background: #F3C8AC; + } + + .panel .result ul li.current .badge_5 + { + background: #D7B198; + } + + .panel .result ul li .badge_6 + { + background: #F3ACC3; + } + + .panel .result ul li.current .badge_6 + { + background: #D798AB; + } + + /* Results (end) */ + + /* Tree (begin) */ /**/ + .panel .tree + { + position: absolute; + top: 30px; + bottom: 0; + left: 0; + width: 100%; + //zoom: 1; + //height: expression((this.parentNode.offsetHeight - 31)); + overflow-y: scroll; + overflow-x: hidden; + -overflow-y: hidden; + background: #EDF3FE url(../i/tree_bg.png); + z-index: 30; + } + + .panel .tree ul + { + background: #EDF3FE url(../i/tree_bg.png); + } + + .panel .tree li + { + cursor: pointer; + overflow: hidden; + //height: 23px; + //display: inline; + //zoom: 1; + //width: 100%; + } + + + .panel .tree li .content + { + padding-left: 18px; + padding-top: 5px; + height: 18px; + overflow: hidden; + position: relative; + } + + .panel .tree li .icon + { + width: 10px; + height: 9px; + background: url(../i/arrows.png); + background-position: 0 -9px; + position: absolute; + left: 1px; + top: 8px; + cursor: default; + } + + .panel .tree li.closed .icon + { + background-position: 0 0; + } + + .panel .tree ul li h1 + { + font-size: 13px; + font-weight: normal; + color: #000; + margin-bottom: 2px; + white-space: nowrap; + } + + .panel .tree ul li p + { + font-size: 11px; + color: #666; + margin-bottom: 2px; + white-space: nowrap; + } + + .panel .tree ul li h1 i + { + color: #999; + font-style: normal; + } + + .panel .tree ul li.empty + { + cursor: text; + } + + .panel .tree ul li.empty h1, + .panel .tree ul li.empty p + { + color: #666; + font-style: italic; + } + + .panel .tree ul li.current + { + background: #3875D7; + } + + .panel .tree ul li.current .icon + { + background-position: -10px -9px; + } + + .panel .tree ul li.current.closed .icon + { + background-position: -10px 0; + } + + .panel .tree ul li.current h1 + { + color: #FFF; + } + + .panel .tree ul li.current p + { + color: #CCC; + } + + .panel .tree ul li.current.empty h1, + .panel .tree ul li.current.empty p + { + color: #999; + } + + .panel .tree ul li:hover + { + background: #d0d0d0; + } + + .panel .tree ul li.current:hover + { + background: #2965C0; + } + + .panel .tree .stopper + { + display: none; + } + /* Tree (end) */ /**/ + +/* Panel (end) */ \ No newline at end of file diff --git a/doc/code/css/reset.css b/doc/code/css/reset.css new file mode 100755 index 00000000..da4a2394 --- /dev/null +++ b/doc/code/css/reset.css @@ -0,0 +1,48 @@ +/* http://meyerweb.com/eric/tools/css/reset/ */ +/* v1.0 | 20080212 */ + +html, body, div, span, applet, object, iframe, +h1, h2, h3, h4, h5, h6, p, blockquote, pre, +a, abbr, acronym, address, big, cite, code, +del, dfn, em, font, img, ins, kbd, q, s, samp, +small, strike, strong, sub, sup, tt, var, +b, u, i, center, +dl, dt, dd, ol, ul, li, +fieldset, form, label, legend, +table, caption, tbody, tfoot, thead, tr, th, td { + margin: 0; + padding: 0; + border: 0; + outline: 0; + font-size: 100%; + vertical-align: baseline; + background: transparent; +} +body { + line-height: 1; +} +ol, ul { + list-style: none; +} +blockquote, q { + quotes: none; +} +blockquote:before, blockquote:after, +q:before, q:after { + content: ''; + content: none; +} + +/* remember to highlight inserts somehow! */ +ins { + text-decoration: none; +} +del { + text-decoration: line-through; +} + +/* tables still need 'cellspacing="0"' in the markup */ +table { + border-collapse: collapse; + border-spacing: 0; +} \ No newline at end of file diff --git a/doc/code/favicon.ico b/doc/code/favicon.ico new file mode 100644 index 00000000..e0e80cf8 Binary files /dev/null and b/doc/code/favicon.ico differ diff --git a/doc/code/files/app/assets/fonts/OFL_txt.html b/doc/code/files/app/assets/fonts/OFL_txt.html new file mode 100644 index 00000000..f873d9b2 --- /dev/null +++ b/doc/code/files/app/assets/fonts/OFL_txt.html @@ -0,0 +1,158 @@ + + + + + OFL.txt + + + + + + + + + + + + + + +
+
+ +
+ +

Copyright © 2010, Jan Gerner (post@yanone.de) This Font Software is +licensed under the SIL Open Font License, Version 1.1. This license is +copied below, and is also available with a FAQ at: scripts.sil.org/OFL

+
+ +

SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007

+
+ +

PREAMBLE The goals of the Open Font License (OFL) are to stimulate worldwide development of +collaborative font projects, to support the font creation efforts of +academic and linguistic communities, and to provide a free and open +framework in which fonts may be shared and improved in partnership with +others.

+ +

The OFL allows the licensed fonts to be used, +studied, modified and redistributed freely as long as they are not sold by +themselves. The fonts, including any derivative works, can be bundled, +embedded, redistributed and/or sold with any software provided that any +reserved names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply to any +document created using the fonts or their derivatives.

+ +

DEFINITIONS “Font Software” refers to the set of files released by the +Copyright Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation.

+ +

“Reserved Font Name” refers to any names specified as such after the +copyright statement(s).

+ +

“Original Version” refers to the collection of Font Software components as +distributed by the Copyright Holder(s).

+ +

“Modified Version” refers to any derivative made by adding to, deleting, or +substituting – in part or in whole – any of the components of the Original +Version, by changing formats or by porting the Font Software to a new +environment.

+ +

“Author” refers to any designer, engineer, programmer, technical writer or +other person who contributed to the Font Software.

+ +

PERMISSION & CONDITIONS Permission is hereby granted, free of charge, +to any person obtaining a copy of the Font Software, to use, study, copy, +merge, embed, modify, redistribute, and sell modified and unmodified copies +of the Font Software, subject to the following conditions:

+ +

1) Neither the Font Software nor any of its individual components, in +Original or Modified Versions, may be sold by itself.

+ +

2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be included +either as stand-alone text files, human-readable headers or in the +appropriate machine-readable metadata fields within text or binary files as +long as those fields can be easily viewed by the user.

+ +

3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users.

+ +

4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any Modified +Version, except to acknowledge the contribution(s) of the Copyright +Holder(s) and the Author(s) or with their explicit written permission.

+ +

5) The Font Software, modified or unmodified, in part or in whole, must be +distributed entirely under this license, and must not be distributed under +any other license. The requirement for fonts to remain under this license +does not apply to any document created using the Font Software.

+ +

TERMINATION This license becomes null and void if any of the above +conditions are not met.

+ +

DISCLAIMER THE FONT SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY +KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF +COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS +IN THE FONT SOFTWARE.

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/app/contexts/base_context_rb.html b/doc/code/files/app/contexts/base_context_rb.html new file mode 100644 index 00000000..21416430 --- /dev/null +++ b/doc/code/files/app/contexts/base_context_rb.html @@ -0,0 +1,79 @@ + + + + + base_context.rb + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/app/contexts/commit_load_context_rb.html b/doc/code/files/app/contexts/commit_load_context_rb.html new file mode 100644 index 00000000..c21f5e1b --- /dev/null +++ b/doc/code/files/app/contexts/commit_load_context_rb.html @@ -0,0 +1,79 @@ + + + + + commit_load_context.rb + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/app/contexts/issues_bulk_update_context_rb.html b/doc/code/files/app/contexts/issues_bulk_update_context_rb.html new file mode 100644 index 00000000..18b89d58 --- /dev/null +++ b/doc/code/files/app/contexts/issues_bulk_update_context_rb.html @@ -0,0 +1,79 @@ + + + + + issues_bulk_update_context.rb + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/app/contexts/issues_list_context_rb.html b/doc/code/files/app/contexts/issues_list_context_rb.html new file mode 100644 index 00000000..6d83a6b4 --- /dev/null +++ b/doc/code/files/app/contexts/issues_list_context_rb.html @@ -0,0 +1,79 @@ + + + + + issues_list_context.rb + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/app/contexts/merge_requests_load_context_rb.html b/doc/code/files/app/contexts/merge_requests_load_context_rb.html new file mode 100644 index 00000000..5f9c5462 --- /dev/null +++ b/doc/code/files/app/contexts/merge_requests_load_context_rb.html @@ -0,0 +1,86 @@ + + + + + merge_requests_load_context.rb + + + + + + + + + + + + + + +
+
+ +
+ +

Build collection of Merge Requests based on filtering passed via params for +@project

+ +
+ + + + + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/app/contexts/notes/create_context_rb.html b/doc/code/files/app/contexts/notes/create_context_rb.html new file mode 100644 index 00000000..7cf9a67c --- /dev/null +++ b/doc/code/files/app/contexts/notes/create_context_rb.html @@ -0,0 +1,84 @@ + + + + + create_context.rb + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/app/contexts/notes/load_context_rb.html b/doc/code/files/app/contexts/notes/load_context_rb.html new file mode 100644 index 00000000..84c7f143 --- /dev/null +++ b/doc/code/files/app/contexts/notes/load_context_rb.html @@ -0,0 +1,84 @@ + + + + + load_context.rb + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/app/contexts/project_update_context_rb.html b/doc/code/files/app/contexts/project_update_context_rb.html new file mode 100644 index 00000000..2712b358 --- /dev/null +++ b/doc/code/files/app/contexts/project_update_context_rb.html @@ -0,0 +1,79 @@ + + + + + project_update_context.rb + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/app/contexts/search_context_rb.html b/doc/code/files/app/contexts/search_context_rb.html new file mode 100644 index 00000000..85d7cc30 --- /dev/null +++ b/doc/code/files/app/contexts/search_context_rb.html @@ -0,0 +1,79 @@ + + + + + search_context.rb + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/app/contexts/test_hook_context_rb.html b/doc/code/files/app/contexts/test_hook_context_rb.html new file mode 100644 index 00000000..ebb88998 --- /dev/null +++ b/doc/code/files/app/contexts/test_hook_context_rb.html @@ -0,0 +1,79 @@ + + + + + test_hook_context.rb + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/app/controllers/admin/dashboard_controller_rb.html b/doc/code/files/app/controllers/admin/dashboard_controller_rb.html new file mode 100644 index 00000000..1fd4edd0 --- /dev/null +++ b/doc/code/files/app/controllers/admin/dashboard_controller_rb.html @@ -0,0 +1,79 @@ + + + + + dashboard_controller.rb + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/app/controllers/admin/groups_controller_rb.html b/doc/code/files/app/controllers/admin/groups_controller_rb.html new file mode 100644 index 00000000..8fe6fc90 --- /dev/null +++ b/doc/code/files/app/controllers/admin/groups_controller_rb.html @@ -0,0 +1,79 @@ + + + + + groups_controller.rb + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/app/controllers/admin/hooks_controller_rb.html b/doc/code/files/app/controllers/admin/hooks_controller_rb.html new file mode 100644 index 00000000..221091a2 --- /dev/null +++ b/doc/code/files/app/controllers/admin/hooks_controller_rb.html @@ -0,0 +1,79 @@ + + + + + hooks_controller.rb + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/app/controllers/admin/logs_controller_rb.html b/doc/code/files/app/controllers/admin/logs_controller_rb.html new file mode 100644 index 00000000..27957990 --- /dev/null +++ b/doc/code/files/app/controllers/admin/logs_controller_rb.html @@ -0,0 +1,79 @@ + + + + + logs_controller.rb + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/app/controllers/admin/projects_controller_rb.html b/doc/code/files/app/controllers/admin/projects_controller_rb.html new file mode 100644 index 00000000..2d611510 --- /dev/null +++ b/doc/code/files/app/controllers/admin/projects_controller_rb.html @@ -0,0 +1,79 @@ + + + + + projects_controller.rb + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/app/controllers/admin/resque_controller_rb.html b/doc/code/files/app/controllers/admin/resque_controller_rb.html new file mode 100644 index 00000000..742a9c7d --- /dev/null +++ b/doc/code/files/app/controllers/admin/resque_controller_rb.html @@ -0,0 +1,79 @@ + + + + + resque_controller.rb + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/app/controllers/admin/team_members_controller_rb.html b/doc/code/files/app/controllers/admin/team_members_controller_rb.html new file mode 100644 index 00000000..b821baff --- /dev/null +++ b/doc/code/files/app/controllers/admin/team_members_controller_rb.html @@ -0,0 +1,79 @@ + + + + + team_members_controller.rb + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/app/controllers/admin/users_controller_rb.html b/doc/code/files/app/controllers/admin/users_controller_rb.html new file mode 100644 index 00000000..c8188f7e --- /dev/null +++ b/doc/code/files/app/controllers/admin/users_controller_rb.html @@ -0,0 +1,79 @@ + + + + + users_controller.rb + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/app/controllers/admin_controller_rb.html b/doc/code/files/app/controllers/admin_controller_rb.html new file mode 100644 index 00000000..78375592 --- /dev/null +++ b/doc/code/files/app/controllers/admin_controller_rb.html @@ -0,0 +1,88 @@ + + + + + admin_controller.rb + + + + + + + + + + + + + + +
+
+ +
+ +

Provides a base class for Admin +controllers to subclass

+ +

Automatically sets the layout and ensures an administrator is logged in

+ +
+ + + + + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/app/controllers/application_controller_rb.html b/doc/code/files/app/controllers/application_controller_rb.html new file mode 100644 index 00000000..f13dba25 --- /dev/null +++ b/doc/code/files/app/controllers/application_controller_rb.html @@ -0,0 +1,79 @@ + + + + + application_controller.rb + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/app/controllers/blame_controller_rb.html b/doc/code/files/app/controllers/blame_controller_rb.html new file mode 100644 index 00000000..f0c34244 --- /dev/null +++ b/doc/code/files/app/controllers/blame_controller_rb.html @@ -0,0 +1,85 @@ + + + + + blame_controller.rb + + + + + + + + + + + + + + +
+
+ +
+ +

Controller for viewing a file’s blame

+ +
+ + + + + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/app/controllers/blob_controller_rb.html b/doc/code/files/app/controllers/blob_controller_rb.html new file mode 100644 index 00000000..a5bdfad1 --- /dev/null +++ b/doc/code/files/app/controllers/blob_controller_rb.html @@ -0,0 +1,85 @@ + + + + + blob_controller.rb + + + + + + + + + + + + + + +
+
+ +
+ +

Controller for viewing a file’s blame

+ +
+ + + + + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/app/controllers/commit_controller_rb.html b/doc/code/files/app/controllers/commit_controller_rb.html new file mode 100644 index 00000000..a7189c86 --- /dev/null +++ b/doc/code/files/app/controllers/commit_controller_rb.html @@ -0,0 +1,89 @@ + + + + + commit_controller.rb + + + + + + + + + + + + + + +
+
+ +
+ +

Controller for a specific Commit

+ +

Not to be confused with CommitsController, +plural.

+ +
+ + + + + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/app/controllers/commits_controller_rb.html b/doc/code/files/app/controllers/commits_controller_rb.html new file mode 100644 index 00000000..989e4cd8 --- /dev/null +++ b/doc/code/files/app/controllers/commits_controller_rb.html @@ -0,0 +1,87 @@ + + + + + commits_controller.rb + + + + + + + + + + + + + + +
+
+ + + + + +
Required Files
+
    + +
  • base64
  • + +
+ + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/app/controllers/compare_controller_rb.html b/doc/code/files/app/controllers/compare_controller_rb.html new file mode 100644 index 00000000..479fa869 --- /dev/null +++ b/doc/code/files/app/controllers/compare_controller_rb.html @@ -0,0 +1,79 @@ + + + + + compare_controller.rb + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/app/controllers/dashboard_controller_rb.html b/doc/code/files/app/controllers/dashboard_controller_rb.html new file mode 100644 index 00000000..ac7012f4 --- /dev/null +++ b/doc/code/files/app/controllers/dashboard_controller_rb.html @@ -0,0 +1,79 @@ + + + + + dashboard_controller.rb + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/app/controllers/deploy_keys_controller_rb.html b/doc/code/files/app/controllers/deploy_keys_controller_rb.html new file mode 100644 index 00000000..c0c598a2 --- /dev/null +++ b/doc/code/files/app/controllers/deploy_keys_controller_rb.html @@ -0,0 +1,79 @@ + + + + + deploy_keys_controller.rb + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/app/controllers/errors_controller_rb.html b/doc/code/files/app/controllers/errors_controller_rb.html new file mode 100644 index 00000000..bd2da28b --- /dev/null +++ b/doc/code/files/app/controllers/errors_controller_rb.html @@ -0,0 +1,79 @@ + + + + + errors_controller.rb + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/app/controllers/groups_controller_rb.html b/doc/code/files/app/controllers/groups_controller_rb.html new file mode 100644 index 00000000..905f17b3 --- /dev/null +++ b/doc/code/files/app/controllers/groups_controller_rb.html @@ -0,0 +1,79 @@ + + + + + groups_controller.rb + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/app/controllers/help_controller_rb.html b/doc/code/files/app/controllers/help_controller_rb.html new file mode 100644 index 00000000..0c41c81e --- /dev/null +++ b/doc/code/files/app/controllers/help_controller_rb.html @@ -0,0 +1,79 @@ + + + + + help_controller.rb + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/app/controllers/hooks_controller_rb.html b/doc/code/files/app/controllers/hooks_controller_rb.html new file mode 100644 index 00000000..8182569b --- /dev/null +++ b/doc/code/files/app/controllers/hooks_controller_rb.html @@ -0,0 +1,79 @@ + + + + + hooks_controller.rb + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/app/controllers/issues_controller_rb.html b/doc/code/files/app/controllers/issues_controller_rb.html new file mode 100644 index 00000000..1c198695 --- /dev/null +++ b/doc/code/files/app/controllers/issues_controller_rb.html @@ -0,0 +1,79 @@ + + + + + issues_controller.rb + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/app/controllers/keys_controller_rb.html b/doc/code/files/app/controllers/keys_controller_rb.html new file mode 100644 index 00000000..d88ed459 --- /dev/null +++ b/doc/code/files/app/controllers/keys_controller_rb.html @@ -0,0 +1,79 @@ + + + + + keys_controller.rb + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/app/controllers/labels_controller_rb.html b/doc/code/files/app/controllers/labels_controller_rb.html new file mode 100644 index 00000000..6b22a056 --- /dev/null +++ b/doc/code/files/app/controllers/labels_controller_rb.html @@ -0,0 +1,79 @@ + + + + + labels_controller.rb + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/app/controllers/merge_requests_controller_rb.html b/doc/code/files/app/controllers/merge_requests_controller_rb.html new file mode 100644 index 00000000..5dd462cc --- /dev/null +++ b/doc/code/files/app/controllers/merge_requests_controller_rb.html @@ -0,0 +1,79 @@ + + + + + merge_requests_controller.rb + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/app/controllers/milestones_controller_rb.html b/doc/code/files/app/controllers/milestones_controller_rb.html new file mode 100644 index 00000000..70eb9de7 --- /dev/null +++ b/doc/code/files/app/controllers/milestones_controller_rb.html @@ -0,0 +1,79 @@ + + + + + milestones_controller.rb + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/app/controllers/notes_controller_rb.html b/doc/code/files/app/controllers/notes_controller_rb.html new file mode 100644 index 00000000..67e846be --- /dev/null +++ b/doc/code/files/app/controllers/notes_controller_rb.html @@ -0,0 +1,79 @@ + + + + + notes_controller.rb + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/app/controllers/omniauth_callbacks_controller_rb.html b/doc/code/files/app/controllers/omniauth_callbacks_controller_rb.html new file mode 100644 index 00000000..1b5e8fa0 --- /dev/null +++ b/doc/code/files/app/controllers/omniauth_callbacks_controller_rb.html @@ -0,0 +1,79 @@ + + + + + omniauth_callbacks_controller.rb + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/app/controllers/profiles_controller_rb.html b/doc/code/files/app/controllers/profiles_controller_rb.html new file mode 100644 index 00000000..0b085838 --- /dev/null +++ b/doc/code/files/app/controllers/profiles_controller_rb.html @@ -0,0 +1,79 @@ + + + + + profiles_controller.rb + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/app/controllers/project_resource_controller_rb.html b/doc/code/files/app/controllers/project_resource_controller_rb.html new file mode 100644 index 00000000..e17be7ab --- /dev/null +++ b/doc/code/files/app/controllers/project_resource_controller_rb.html @@ -0,0 +1,79 @@ + + + + + project_resource_controller.rb + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/app/controllers/projects_controller_rb.html b/doc/code/files/app/controllers/projects_controller_rb.html new file mode 100644 index 00000000..939eb71e --- /dev/null +++ b/doc/code/files/app/controllers/projects_controller_rb.html @@ -0,0 +1,79 @@ + + + + + projects_controller.rb + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/app/controllers/protected_branches_controller_rb.html b/doc/code/files/app/controllers/protected_branches_controller_rb.html new file mode 100644 index 00000000..1fca7134 --- /dev/null +++ b/doc/code/files/app/controllers/protected_branches_controller_rb.html @@ -0,0 +1,79 @@ + + + + + protected_branches_controller.rb + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/app/controllers/refs_controller_rb.html b/doc/code/files/app/controllers/refs_controller_rb.html new file mode 100644 index 00000000..207441f1 --- /dev/null +++ b/doc/code/files/app/controllers/refs_controller_rb.html @@ -0,0 +1,79 @@ + + + + + refs_controller.rb + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/app/controllers/repositories_controller_rb.html b/doc/code/files/app/controllers/repositories_controller_rb.html new file mode 100644 index 00000000..eab4dd4d --- /dev/null +++ b/doc/code/files/app/controllers/repositories_controller_rb.html @@ -0,0 +1,79 @@ + + + + + repositories_controller.rb + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/app/controllers/search_controller_rb.html b/doc/code/files/app/controllers/search_controller_rb.html new file mode 100644 index 00000000..f47c3664 --- /dev/null +++ b/doc/code/files/app/controllers/search_controller_rb.html @@ -0,0 +1,79 @@ + + + + + search_controller.rb + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/app/controllers/services_controller_rb.html b/doc/code/files/app/controllers/services_controller_rb.html new file mode 100644 index 00000000..de836e79 --- /dev/null +++ b/doc/code/files/app/controllers/services_controller_rb.html @@ -0,0 +1,79 @@ + + + + + services_controller.rb + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/app/controllers/snippets_controller_rb.html b/doc/code/files/app/controllers/snippets_controller_rb.html new file mode 100644 index 00000000..662aef91 --- /dev/null +++ b/doc/code/files/app/controllers/snippets_controller_rb.html @@ -0,0 +1,79 @@ + + + + + snippets_controller.rb + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/app/controllers/team_members_controller_rb.html b/doc/code/files/app/controllers/team_members_controller_rb.html new file mode 100644 index 00000000..c4784ecc --- /dev/null +++ b/doc/code/files/app/controllers/team_members_controller_rb.html @@ -0,0 +1,79 @@ + + + + + team_members_controller.rb + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/app/controllers/tree_controller_rb.html b/doc/code/files/app/controllers/tree_controller_rb.html new file mode 100644 index 00000000..1a21f186 --- /dev/null +++ b/doc/code/files/app/controllers/tree_controller_rb.html @@ -0,0 +1,85 @@ + + + + + tree_controller.rb + + + + + + + + + + + + + + +
+
+ +
+ +

Controller for viewing a repository’s file structure

+ +
+ + + + + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/app/controllers/wikis_controller_rb.html b/doc/code/files/app/controllers/wikis_controller_rb.html new file mode 100644 index 00000000..bbebf05f --- /dev/null +++ b/doc/code/files/app/controllers/wikis_controller_rb.html @@ -0,0 +1,79 @@ + + + + + wikis_controller.rb + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/app/decorators/application_decorator_rb.html b/doc/code/files/app/decorators/application_decorator_rb.html new file mode 100644 index 00000000..5998d46d --- /dev/null +++ b/doc/code/files/app/decorators/application_decorator_rb.html @@ -0,0 +1,79 @@ + + + + + application_decorator.rb + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/app/decorators/commit_decorator_rb.html b/doc/code/files/app/decorators/commit_decorator_rb.html new file mode 100644 index 00000000..ef09e718 --- /dev/null +++ b/doc/code/files/app/decorators/commit_decorator_rb.html @@ -0,0 +1,79 @@ + + + + + commit_decorator.rb + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/app/decorators/event_decorator_rb.html b/doc/code/files/app/decorators/event_decorator_rb.html new file mode 100644 index 00000000..156d6008 --- /dev/null +++ b/doc/code/files/app/decorators/event_decorator_rb.html @@ -0,0 +1,79 @@ + + + + + event_decorator.rb + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/app/decorators/tree_decorator_rb.html b/doc/code/files/app/decorators/tree_decorator_rb.html new file mode 100644 index 00000000..0ca1f9ee --- /dev/null +++ b/doc/code/files/app/decorators/tree_decorator_rb.html @@ -0,0 +1,79 @@ + + + + + tree_decorator.rb + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/app/decorators/user_decorator_rb.html b/doc/code/files/app/decorators/user_decorator_rb.html new file mode 100644 index 00000000..ab659f66 --- /dev/null +++ b/doc/code/files/app/decorators/user_decorator_rb.html @@ -0,0 +1,79 @@ + + + + + user_decorator.rb + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/app/helpers/application_helper_rb.html b/doc/code/files/app/helpers/application_helper_rb.html new file mode 100644 index 00000000..72447215 --- /dev/null +++ b/doc/code/files/app/helpers/application_helper_rb.html @@ -0,0 +1,89 @@ + + + + + application_helper.rb + + + + + + + + + + + + + + +
+
+ + + + + +
Required Files
+
    + +
  • digest/md5
  • + +
  • uri
  • + +
+ + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/app/helpers/commits_helper_rb.html b/doc/code/files/app/helpers/commits_helper_rb.html new file mode 100644 index 00000000..4d78fca9 --- /dev/null +++ b/doc/code/files/app/helpers/commits_helper_rb.html @@ -0,0 +1,79 @@ + + + + + commits_helper.rb + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/app/helpers/dashboard_helper_rb.html b/doc/code/files/app/helpers/dashboard_helper_rb.html new file mode 100644 index 00000000..31389328 --- /dev/null +++ b/doc/code/files/app/helpers/dashboard_helper_rb.html @@ -0,0 +1,79 @@ + + + + + dashboard_helper.rb + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/app/helpers/events_helper_rb.html b/doc/code/files/app/helpers/events_helper_rb.html new file mode 100644 index 00000000..63903ce0 --- /dev/null +++ b/doc/code/files/app/helpers/events_helper_rb.html @@ -0,0 +1,79 @@ + + + + + events_helper.rb + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/app/helpers/gitlab_markdown_helper_rb.html b/doc/code/files/app/helpers/gitlab_markdown_helper_rb.html new file mode 100644 index 00000000..9aada0e7 --- /dev/null +++ b/doc/code/files/app/helpers/gitlab_markdown_helper_rb.html @@ -0,0 +1,79 @@ + + + + + gitlab_markdown_helper.rb + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/app/helpers/issues_helper_rb.html b/doc/code/files/app/helpers/issues_helper_rb.html new file mode 100644 index 00000000..1e107ebf --- /dev/null +++ b/doc/code/files/app/helpers/issues_helper_rb.html @@ -0,0 +1,79 @@ + + + + + issues_helper.rb + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/app/helpers/merge_requests_helper_rb.html b/doc/code/files/app/helpers/merge_requests_helper_rb.html new file mode 100644 index 00000000..556caad9 --- /dev/null +++ b/doc/code/files/app/helpers/merge_requests_helper_rb.html @@ -0,0 +1,79 @@ + + + + + merge_requests_helper.rb + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/app/helpers/namespaces_helper_rb.html b/doc/code/files/app/helpers/namespaces_helper_rb.html new file mode 100644 index 00000000..2fb5aa1d --- /dev/null +++ b/doc/code/files/app/helpers/namespaces_helper_rb.html @@ -0,0 +1,79 @@ + + + + + namespaces_helper.rb + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/app/helpers/notes_helper_rb.html b/doc/code/files/app/helpers/notes_helper_rb.html new file mode 100644 index 00000000..a21a80fe --- /dev/null +++ b/doc/code/files/app/helpers/notes_helper_rb.html @@ -0,0 +1,79 @@ + + + + + notes_helper.rb + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/app/helpers/profile_helper_rb.html b/doc/code/files/app/helpers/profile_helper_rb.html new file mode 100644 index 00000000..d87776b9 --- /dev/null +++ b/doc/code/files/app/helpers/profile_helper_rb.html @@ -0,0 +1,79 @@ + + + + + profile_helper.rb + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/app/helpers/projects_helper_rb.html b/doc/code/files/app/helpers/projects_helper_rb.html new file mode 100644 index 00000000..c388a481 --- /dev/null +++ b/doc/code/files/app/helpers/projects_helper_rb.html @@ -0,0 +1,79 @@ + + + + + projects_helper.rb + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/app/helpers/snippets_helper_rb.html b/doc/code/files/app/helpers/snippets_helper_rb.html new file mode 100644 index 00000000..697e590e --- /dev/null +++ b/doc/code/files/app/helpers/snippets_helper_rb.html @@ -0,0 +1,79 @@ + + + + + snippets_helper.rb + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/app/helpers/tab_helper_rb.html b/doc/code/files/app/helpers/tab_helper_rb.html new file mode 100644 index 00000000..5bb3d629 --- /dev/null +++ b/doc/code/files/app/helpers/tab_helper_rb.html @@ -0,0 +1,79 @@ + + + + + tab_helper.rb + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/app/helpers/tags_helper_rb.html b/doc/code/files/app/helpers/tags_helper_rb.html new file mode 100644 index 00000000..074e404c --- /dev/null +++ b/doc/code/files/app/helpers/tags_helper_rb.html @@ -0,0 +1,79 @@ + + + + + tags_helper.rb + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/app/helpers/tree_helper_rb.html b/doc/code/files/app/helpers/tree_helper_rb.html new file mode 100644 index 00000000..2d7bac33 --- /dev/null +++ b/doc/code/files/app/helpers/tree_helper_rb.html @@ -0,0 +1,79 @@ + + + + + tree_helper.rb + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/app/mailers/notify_rb.html b/doc/code/files/app/mailers/notify_rb.html new file mode 100644 index 00000000..86e17f0f --- /dev/null +++ b/doc/code/files/app/mailers/notify_rb.html @@ -0,0 +1,79 @@ + + + + + notify.rb + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/app/models/ability_rb.html b/doc/code/files/app/models/ability_rb.html new file mode 100644 index 00000000..cf22c56a --- /dev/null +++ b/doc/code/files/app/models/ability_rb.html @@ -0,0 +1,79 @@ + + + + + ability.rb + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/app/models/commit_rb.html b/doc/code/files/app/models/commit_rb.html new file mode 100644 index 00000000..f48c8a6c --- /dev/null +++ b/doc/code/files/app/models/commit_rb.html @@ -0,0 +1,79 @@ + + + + + commit.rb + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/app/models/event_rb.html b/doc/code/files/app/models/event_rb.html new file mode 100644 index 00000000..0409518c --- /dev/null +++ b/doc/code/files/app/models/event_rb.html @@ -0,0 +1,98 @@ + + + + + event.rb + + + + + + + + + + + + + + +
+
+ +
+ +

Schema Information

+ +

Table name: events

+ +
id          :integer          not null, primary key
+target_type :string(255)
+target_id   :integer
+title       :string(255)
+data        :text
+project_id  :integer
+created_at  :datetime         not null
+updated_at  :datetime         not null
+action      :integer
+author_id   :integer
+ +
+ + + + + + + + + + + + +
Namespace
+
    + +
  • + CLASS + Event +
  • + +
+ + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/app/models/gitlab_ci_service_rb.html b/doc/code/files/app/models/gitlab_ci_service_rb.html new file mode 100644 index 00000000..69849529 --- /dev/null +++ b/doc/code/files/app/models/gitlab_ci_service_rb.html @@ -0,0 +1,97 @@ + + + + + gitlab_ci_service.rb + + + + + + + + + + + + + + +
+
+ +
+ +

Schema Information

+ +

Table name: services

+ +
id          :integer          not null, primary key
+type        :string(255)
+title       :string(255)
+token       :string(255)
+project_id  :integer          not null
+created_at  :datetime         not null
+updated_at  :datetime         not null
+active      :boolean          default(FALSE), not null
+project_url :string(255)
+ +
+ + + + + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/app/models/group_rb.html b/doc/code/files/app/models/group_rb.html new file mode 100644 index 00000000..9606ee7b --- /dev/null +++ b/doc/code/files/app/models/group_rb.html @@ -0,0 +1,95 @@ + + + + + group.rb + + + + + + + + + + + + + + +
+
+ +
+ +

Schema Information

+ +

Table name: namespaces

+ +
id         :integer          not null, primary key
+name       :string(255)      not null
+path       :string(255)      not null
+owner_id   :integer          not null
+created_at :datetime         not null
+updated_at :datetime         not null
+type       :string(255)
+ +
+ + + + + + + + + + + + +
Namespace
+
    + +
  • + CLASS + Group +
  • + +
+ + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/app/models/issue_rb.html b/doc/code/files/app/models/issue_rb.html new file mode 100644 index 00000000..1cf1727c --- /dev/null +++ b/doc/code/files/app/models/issue_rb.html @@ -0,0 +1,100 @@ + + + + + issue.rb + + + + + + + + + + + + + + +
+
+ +
+ +

Schema Information

+ +

Table name: issues

+ +
id           :integer          not null, primary key
+title        :string(255)
+assignee_id  :integer
+author_id    :integer
+project_id   :integer
+created_at   :datetime         not null
+updated_at   :datetime         not null
+closed       :boolean          default(FALSE), not null
+position     :integer          default(0)
+branch_name  :string(255)
+description  :text
+milestone_id :integer
+ +
+ + + + + + + + + + + + +
Namespace
+
    + +
  • + CLASS + Issue +
  • + +
+ + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/app/models/key_rb.html b/doc/code/files/app/models/key_rb.html new file mode 100644 index 00000000..8b703afe --- /dev/null +++ b/doc/code/files/app/models/key_rb.html @@ -0,0 +1,104 @@ + + + + + key.rb + + + + + + + + + + + + + + +
+
+ +
+ +

Schema Information

+ +

Table name: keys

+ +
id         :integer          not null, primary key
+user_id    :integer
+created_at :datetime         not null
+updated_at :datetime         not null
+key        :text
+title      :string(255)
+identifier :string(255)
+project_id :integer
+ +
+ + + + + +
Required Files
+
    + +
  • digest/md5
  • + +
+ + + + + + + + + +
Namespace
+
    + +
  • + CLASS + Key +
  • + +
+ + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/app/models/merge_request_rb.html b/doc/code/files/app/models/merge_request_rb.html new file mode 100644 index 00000000..11fbed2e --- /dev/null +++ b/doc/code/files/app/models/merge_request_rb.html @@ -0,0 +1,103 @@ + + + + + merge_request.rb + + + + + + + + + + + + + + +
+
+ +
+ +

Schema Information

+ +

Table name: merge_requests

+ +
id            :integer          not null, primary key
+target_branch :string(255)      not null
+source_branch :string(255)      not null
+project_id    :integer          not null
+author_id     :integer
+assignee_id   :integer
+title         :string(255)
+closed        :boolean          default(FALSE), not null
+created_at    :datetime         not null
+updated_at    :datetime         not null
+st_commits    :text(2147483647)
+st_diffs      :text(2147483647)
+merged        :boolean          default(FALSE), not null
+state         :integer          default(1), not null
+milestone_id  :integer
+ +
+ + + + + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/app/models/milestone_rb.html b/doc/code/files/app/models/milestone_rb.html new file mode 100644 index 00000000..38ec8298 --- /dev/null +++ b/doc/code/files/app/models/milestone_rb.html @@ -0,0 +1,96 @@ + + + + + milestone.rb + + + + + + + + + + + + + + +
+
+ +
+ +

Schema Information

+ +

Table name: milestones

+ +
id          :integer          not null, primary key
+title       :string(255)      not null
+project_id  :integer          not null
+description :text
+due_date    :date
+closed      :boolean          default(FALSE), not null
+created_at  :datetime         not null
+updated_at  :datetime         not null
+ +
+ + + + + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/app/models/namespace_rb.html b/doc/code/files/app/models/namespace_rb.html new file mode 100644 index 00000000..d0e97db6 --- /dev/null +++ b/doc/code/files/app/models/namespace_rb.html @@ -0,0 +1,95 @@ + + + + + namespace.rb + + + + + + + + + + + + + + +
+
+ +
+ +

Schema Information

+ +

Table name: namespaces

+ +
id         :integer          not null, primary key
+name       :string(255)      not null
+path       :string(255)      not null
+owner_id   :integer          not null
+created_at :datetime         not null
+updated_at :datetime         not null
+type       :string(255)
+ +
+ + + + + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/app/models/note_rb.html b/doc/code/files/app/models/note_rb.html new file mode 100644 index 00000000..6c7a6e21 --- /dev/null +++ b/doc/code/files/app/models/note_rb.html @@ -0,0 +1,108 @@ + + + + + note.rb + + + + + + + + + + + + + + +
+
+ +
+ +

Schema Information

+ +

Table name: notes

+ +
id            :integer          not null, primary key
+note          :text
+noteable_id   :string(255)
+noteable_type :string(255)
+author_id     :integer
+created_at    :datetime         not null
+updated_at    :datetime         not null
+project_id    :integer
+attachment    :string(255)
+line_code     :string(255)
+ +
+ + + + + +
Required Files
+
    + +
  • carrierwave/orm/activerecord
  • + +
  • file_size_validator
  • + +
+ + + + + + + + + +
Namespace
+
    + +
  • + CLASS + Note +
  • + +
+ + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/app/models/project_hook_rb.html b/doc/code/files/app/models/project_hook_rb.html new file mode 100644 index 00000000..8756e2a3 --- /dev/null +++ b/doc/code/files/app/models/project_hook_rb.html @@ -0,0 +1,95 @@ + + + + + project_hook.rb + + + + + + + + + + + + + + +
+
+ +
+ +

Schema Information

+ +

Table name: web_hooks

+ +
id         :integer          not null, primary key
+url        :string(255)
+project_id :integer
+created_at :datetime         not null
+updated_at :datetime         not null
+type       :string(255)      default("ProjectHook")
+service_id :integer
+ +
+ + + + + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/app/models/project_rb.html b/doc/code/files/app/models/project_rb.html new file mode 100644 index 00000000..739bb5c7 --- /dev/null +++ b/doc/code/files/app/models/project_rb.html @@ -0,0 +1,115 @@ + + + + + project.rb + + + + + + + + + + + + + + +
+
+ +
+ +

Schema Information

+ +

Table name: projects

+ +
id                     :integer          not null, primary key
+name                   :string(255)
+path                   :string(255)
+description            :text
+created_at             :datetime         not null
+updated_at             :datetime         not null
+private_flag           :boolean          default(TRUE), not null
+owner_id               :integer
+default_branch         :string(255)
+issues_enabled         :boolean          default(TRUE), not null
+wall_enabled           :boolean          default(TRUE), not null
+merge_requests_enabled :boolean          default(TRUE), not null
+wiki_enabled           :boolean          default(TRUE), not null
+namespace_id           :integer
+ +
+ + + + + +
Required Files
+
    + +
  • grit
  • + +
+ + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/app/models/protected_branch_rb.html b/doc/code/files/app/models/protected_branch_rb.html new file mode 100644 index 00000000..496b4d21 --- /dev/null +++ b/doc/code/files/app/models/protected_branch_rb.html @@ -0,0 +1,93 @@ + + + + + protected_branch.rb + + + + + + + + + + + + + + +
+
+ +
+ +

Schema Information

+ +

Table name: protected_branches

+ +
id         :integer          not null, primary key
+project_id :integer          not null
+name       :string(255)      not null
+created_at :datetime         not null
+updated_at :datetime         not null
+ +
+ + + + + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/app/models/service_hook_rb.html b/doc/code/files/app/models/service_hook_rb.html new file mode 100644 index 00000000..7fa375a2 --- /dev/null +++ b/doc/code/files/app/models/service_hook_rb.html @@ -0,0 +1,95 @@ + + + + + service_hook.rb + + + + + + + + + + + + + + +
+
+ +
+ +

Schema Information

+ +

Table name: web_hooks

+ +
id         :integer          not null, primary key
+url        :string(255)
+project_id :integer
+created_at :datetime         not null
+updated_at :datetime         not null
+type       :string(255)      default("ProjectHook")
+service_id :integer
+ +
+ + + + + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/app/models/service_rb.html b/doc/code/files/app/models/service_rb.html new file mode 100644 index 00000000..47b0f7fc --- /dev/null +++ b/doc/code/files/app/models/service_rb.html @@ -0,0 +1,97 @@ + + + + + service.rb + + + + + + + + + + + + + + +
+
+ +
+ +

Schema Information

+ +

Table name: services

+ +
id          :integer          not null, primary key
+type        :string(255)
+title       :string(255)
+token       :string(255)
+project_id  :integer          not null
+created_at  :datetime         not null
+updated_at  :datetime         not null
+active      :boolean          default(FALSE), not null
+project_url :string(255)
+ +
+ + + + + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/app/models/snippet_rb.html b/doc/code/files/app/models/snippet_rb.html new file mode 100644 index 00000000..96016354 --- /dev/null +++ b/doc/code/files/app/models/snippet_rb.html @@ -0,0 +1,97 @@ + + + + + snippet.rb + + + + + + + + + + + + + + +
+
+ +
+ +

Schema Information

+ +

Table name: snippets

+ +
id         :integer          not null, primary key
+title      :string(255)
+content    :text
+author_id  :integer          not null
+project_id :integer          not null
+created_at :datetime         not null
+updated_at :datetime         not null
+file_name  :string(255)
+expires_at :datetime
+ +
+ + + + + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/app/models/system_hook_rb.html b/doc/code/files/app/models/system_hook_rb.html new file mode 100644 index 00000000..edccffd9 --- /dev/null +++ b/doc/code/files/app/models/system_hook_rb.html @@ -0,0 +1,95 @@ + + + + + system_hook.rb + + + + + + + + + + + + + + +
+
+ +
+ +

Schema Information

+ +

Table name: web_hooks

+ +
id         :integer          not null, primary key
+url        :string(255)
+project_id :integer
+created_at :datetime         not null
+updated_at :datetime         not null
+type       :string(255)      default("ProjectHook")
+service_id :integer
+ +
+ + + + + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/app/models/tree_rb.html b/doc/code/files/app/models/tree_rb.html new file mode 100644 index 00000000..89ca7611 --- /dev/null +++ b/doc/code/files/app/models/tree_rb.html @@ -0,0 +1,79 @@ + + + + + tree.rb + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + +
Namespace
+
    + +
  • + CLASS + Tree +
  • + +
+ + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/app/models/user_rb.html b/doc/code/files/app/models/user_rb.html new file mode 100644 index 00000000..18a35e06 --- /dev/null +++ b/doc/code/files/app/models/user_rb.html @@ -0,0 +1,117 @@ + + + + + user.rb + + + + + + + + + + + + + + +
+
+ +
+ +

Schema Information

+ +

Table name: users

+ +
id                     :integer          not null, primary key
+email                  :string(255)      default(""), not null
+encrypted_password     :string(255)      default(""), not null
+reset_password_token   :string(255)
+reset_password_sent_at :datetime
+remember_created_at    :datetime
+sign_in_count          :integer          default(0)
+current_sign_in_at     :datetime
+last_sign_in_at        :datetime
+current_sign_in_ip     :string(255)
+last_sign_in_ip        :string(255)
+created_at             :datetime         not null
+updated_at             :datetime         not null
+name                   :string(255)
+admin                  :boolean          default(FALSE), not null
+projects_limit         :integer          default(10)
+skype                  :string(255)      default(""), not null
+linkedin               :string(255)      default(""), not null
+twitter                :string(255)      default(""), not null
+authentication_token   :string(255)
+dark_scheme            :boolean          default(FALSE), not null
+theme_id               :integer          default(1), not null
+bio                    :string(255)
+blocked                :boolean          default(FALSE), not null
+failed_attempts        :integer          default(0)
+locked_at              :datetime
+extern_uid             :string(255)
+provider               :string(255)
+username               :string(255)
+ +
+ + + + + + + + + + + + +
Namespace
+
    + +
  • + CLASS + User +
  • + +
+ + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/app/models/users_project_rb.html b/doc/code/files/app/models/users_project_rb.html new file mode 100644 index 00000000..072ae905 --- /dev/null +++ b/doc/code/files/app/models/users_project_rb.html @@ -0,0 +1,94 @@ + + + + + users_project.rb + + + + + + + + + + + + + + +
+
+ +
+ +

Schema Information

+ +

Table name: users_projects

+ +
id             :integer          not null, primary key
+user_id        :integer          not null
+project_id     :integer          not null
+created_at     :datetime         not null
+updated_at     :datetime         not null
+project_access :integer          default(0), not null
+ +
+ + + + + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/app/models/web_hook_rb.html b/doc/code/files/app/models/web_hook_rb.html new file mode 100644 index 00000000..0fc97423 --- /dev/null +++ b/doc/code/files/app/models/web_hook_rb.html @@ -0,0 +1,95 @@ + + + + + web_hook.rb + + + + + + + + + + + + + + +
+
+ +
+ +

Schema Information

+ +

Table name: web_hooks

+ +
id         :integer          not null, primary key
+url        :string(255)
+project_id :integer
+created_at :datetime         not null
+updated_at :datetime         not null
+type       :string(255)      default("ProjectHook")
+service_id :integer
+ +
+ + + + + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/app/models/wiki_rb.html b/doc/code/files/app/models/wiki_rb.html new file mode 100644 index 00000000..57d5a2a2 --- /dev/null +++ b/doc/code/files/app/models/wiki_rb.html @@ -0,0 +1,96 @@ + + + + + wiki.rb + + + + + + + + + + + + + + +
+
+ +
+ +

Schema Information

+ +

Table name: wikis

+ +
id         :integer          not null, primary key
+title      :string(255)
+content    :text
+project_id :integer
+created_at :datetime         not null
+updated_at :datetime         not null
+slug       :string(255)
+user_id    :integer
+ +
+ + + + + + + + + + + + +
Namespace
+
    + +
  • + CLASS + Wiki +
  • + +
+ + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/app/observers/activity_observer_rb.html b/doc/code/files/app/observers/activity_observer_rb.html new file mode 100644 index 00000000..2a78e1ab --- /dev/null +++ b/doc/code/files/app/observers/activity_observer_rb.html @@ -0,0 +1,79 @@ + + + + + activity_observer.rb + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/app/observers/issue_observer_rb.html b/doc/code/files/app/observers/issue_observer_rb.html new file mode 100644 index 00000000..7f373bac --- /dev/null +++ b/doc/code/files/app/observers/issue_observer_rb.html @@ -0,0 +1,79 @@ + + + + + issue_observer.rb + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/app/observers/key_observer_rb.html b/doc/code/files/app/observers/key_observer_rb.html new file mode 100644 index 00000000..9834dfc4 --- /dev/null +++ b/doc/code/files/app/observers/key_observer_rb.html @@ -0,0 +1,79 @@ + + + + + key_observer.rb + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/app/observers/merge_request_observer_rb.html b/doc/code/files/app/observers/merge_request_observer_rb.html new file mode 100644 index 00000000..5b779474 --- /dev/null +++ b/doc/code/files/app/observers/merge_request_observer_rb.html @@ -0,0 +1,79 @@ + + + + + merge_request_observer.rb + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/app/observers/note_observer_rb.html b/doc/code/files/app/observers/note_observer_rb.html new file mode 100644 index 00000000..e5a0e03c --- /dev/null +++ b/doc/code/files/app/observers/note_observer_rb.html @@ -0,0 +1,79 @@ + + + + + note_observer.rb + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/app/observers/project_observer_rb.html b/doc/code/files/app/observers/project_observer_rb.html new file mode 100644 index 00000000..0a4b2b51 --- /dev/null +++ b/doc/code/files/app/observers/project_observer_rb.html @@ -0,0 +1,79 @@ + + + + + project_observer.rb + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/app/observers/system_hook_observer_rb.html b/doc/code/files/app/observers/system_hook_observer_rb.html new file mode 100644 index 00000000..53e351ef --- /dev/null +++ b/doc/code/files/app/observers/system_hook_observer_rb.html @@ -0,0 +1,79 @@ + + + + + system_hook_observer.rb + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/app/observers/user_observer_rb.html b/doc/code/files/app/observers/user_observer_rb.html new file mode 100644 index 00000000..d17f2409 --- /dev/null +++ b/doc/code/files/app/observers/user_observer_rb.html @@ -0,0 +1,79 @@ + + + + + user_observer.rb + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/app/observers/users_project_observer_rb.html b/doc/code/files/app/observers/users_project_observer_rb.html new file mode 100644 index 00000000..e427fc5b --- /dev/null +++ b/doc/code/files/app/observers/users_project_observer_rb.html @@ -0,0 +1,79 @@ + + + + + users_project_observer.rb + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/app/roles/account_rb.html b/doc/code/files/app/roles/account_rb.html new file mode 100644 index 00000000..9d8821be --- /dev/null +++ b/doc/code/files/app/roles/account_rb.html @@ -0,0 +1,79 @@ + + + + + account.rb + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/app/roles/authority_rb.html b/doc/code/files/app/roles/authority_rb.html new file mode 100644 index 00000000..d6d0437d --- /dev/null +++ b/doc/code/files/app/roles/authority_rb.html @@ -0,0 +1,79 @@ + + + + + authority.rb + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/app/roles/git_host_rb.html b/doc/code/files/app/roles/git_host_rb.html new file mode 100644 index 00000000..5a878fc0 --- /dev/null +++ b/doc/code/files/app/roles/git_host_rb.html @@ -0,0 +1,79 @@ + + + + + git_host.rb + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/app/roles/issue_commonality_rb.html b/doc/code/files/app/roles/issue_commonality_rb.html new file mode 100644 index 00000000..bb787914 --- /dev/null +++ b/doc/code/files/app/roles/issue_commonality_rb.html @@ -0,0 +1,90 @@ + + + + + issue_commonality.rb + + + + + + + + + + + + + + +
+
+ +
+ +

Contains common functionality shared between Issues and MergeRequests

+ +
+ + + + + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/app/roles/namespaced_project_rb.html b/doc/code/files/app/roles/namespaced_project_rb.html new file mode 100644 index 00000000..d15014b9 --- /dev/null +++ b/doc/code/files/app/roles/namespaced_project_rb.html @@ -0,0 +1,79 @@ + + + + + namespaced_project.rb + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/app/roles/note_event_rb.html b/doc/code/files/app/roles/note_event_rb.html new file mode 100644 index 00000000..a32a7c94 --- /dev/null +++ b/doc/code/files/app/roles/note_event_rb.html @@ -0,0 +1,79 @@ + + + + + note_event.rb + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/app/roles/push_event_rb.html b/doc/code/files/app/roles/push_event_rb.html new file mode 100644 index 00000000..6b0d320d --- /dev/null +++ b/doc/code/files/app/roles/push_event_rb.html @@ -0,0 +1,79 @@ + + + + + push_event.rb + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/app/roles/push_observer_rb.html b/doc/code/files/app/roles/push_observer_rb.html new file mode 100644 index 00000000..62203df1 --- /dev/null +++ b/doc/code/files/app/roles/push_observer_rb.html @@ -0,0 +1,88 @@ + + + + + push_observer.rb + + + + + + + + + + + + + + +
+
+ +
+ +

Includes methods for handling Git Push events

+ +

Triggered by PostReceive +job

+ +
+ + + + + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/app/roles/repository_rb.html b/doc/code/files/app/roles/repository_rb.html new file mode 100644 index 00000000..f9a847d6 --- /dev/null +++ b/doc/code/files/app/roles/repository_rb.html @@ -0,0 +1,79 @@ + + + + + repository.rb + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/app/roles/static_model_rb.html b/doc/code/files/app/roles/static_model_rb.html new file mode 100644 index 00000000..c2355819 --- /dev/null +++ b/doc/code/files/app/roles/static_model_rb.html @@ -0,0 +1,91 @@ + + + + + static_model.rb + + + + + + + + + + + + + + +
+
+ +
+ +

Provides an ActiveRecord-like interface to a model whose data is not +persisted to a database.

+ +
+ + + + + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/app/roles/team_rb.html b/doc/code/files/app/roles/team_rb.html new file mode 100644 index 00000000..5517f98d --- /dev/null +++ b/doc/code/files/app/roles/team_rb.html @@ -0,0 +1,79 @@ + + + + + team.rb + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + +
Namespace
+
    + +
  • + MODULE + Team +
  • + +
+ + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/app/roles/votes_rb.html b/doc/code/files/app/roles/votes_rb.html new file mode 100644 index 00000000..a11bf506 --- /dev/null +++ b/doc/code/files/app/roles/votes_rb.html @@ -0,0 +1,79 @@ + + + + + votes.rb + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + +
Namespace
+
    + +
  • + MODULE + Votes +
  • + +
+ + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/app/uploaders/attachment_uploader_rb.html b/doc/code/files/app/uploaders/attachment_uploader_rb.html new file mode 100644 index 00000000..27680fa1 --- /dev/null +++ b/doc/code/files/app/uploaders/attachment_uploader_rb.html @@ -0,0 +1,79 @@ + + + + + attachment_uploader.rb + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/app/workers/post_receive_rb.html b/doc/code/files/app/workers/post_receive_rb.html new file mode 100644 index 00000000..fd4e73bf --- /dev/null +++ b/doc/code/files/app/workers/post_receive_rb.html @@ -0,0 +1,79 @@ + + + + + post_receive.rb + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/app/workers/system_hook_worker_rb.html b/doc/code/files/app/workers/system_hook_worker_rb.html new file mode 100644 index 00000000..e62abde0 --- /dev/null +++ b/doc/code/files/app/workers/system_hook_worker_rb.html @@ -0,0 +1,79 @@ + + + + + system_hook_worker.rb + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/config/application_rb.html b/doc/code/files/config/application_rb.html new file mode 100644 index 00000000..385b7b2f --- /dev/null +++ b/doc/code/files/config/application_rb.html @@ -0,0 +1,92 @@ + + + + + application.rb + + + + + + + + + + + + + + +
+
+ + + + + +
Required Files
+
    + +
  • rails/all
  • + +
+ + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/config/boot_rb.html b/doc/code/files/config/boot_rb.html new file mode 100644 index 00000000..94a4a723 --- /dev/null +++ b/doc/code/files/config/boot_rb.html @@ -0,0 +1,78 @@ + + + + + boot.rb + + + + + + + + + + + + + + +
+
+ + + + + +
Required Files
+
    + +
  • rubygems
  • + +
  • bundler/setup
  • + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/config/environment_rb.html b/doc/code/files/config/environment_rb.html new file mode 100644 index 00000000..2085b87a --- /dev/null +++ b/doc/code/files/config/environment_rb.html @@ -0,0 +1,74 @@ + + + + + environment.rb + + + + + + + + + + + + + + +
+
+ +
+ +

Load the rails application

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/config/environments/development_rb.html b/doc/code/files/config/environments/development_rb.html new file mode 100644 index 00000000..392c8250 --- /dev/null +++ b/doc/code/files/config/environments/development_rb.html @@ -0,0 +1,68 @@ + + + + + development.rb + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/config/environments/production_rb.html b/doc/code/files/config/environments/production_rb.html new file mode 100644 index 00000000..6911c723 --- /dev/null +++ b/doc/code/files/config/environments/production_rb.html @@ -0,0 +1,68 @@ + + + + + production.rb + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/config/environments/test_rb.html b/doc/code/files/config/environments/test_rb.html new file mode 100644 index 00000000..cfd57933 --- /dev/null +++ b/doc/code/files/config/environments/test_rb.html @@ -0,0 +1,68 @@ + + + + + test.rb + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/config/initializers/1_settings_rb.html b/doc/code/files/config/initializers/1_settings_rb.html new file mode 100644 index 00000000..3e007ff6 --- /dev/null +++ b/doc/code/files/config/initializers/1_settings_rb.html @@ -0,0 +1,79 @@ + + + + + 1_settings.rb + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/config/initializers/2_app_rb.html b/doc/code/files/config/initializers/2_app_rb.html new file mode 100644 index 00000000..de791415 --- /dev/null +++ b/doc/code/files/config/initializers/2_app_rb.html @@ -0,0 +1,79 @@ + + + + + 2_app.rb + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/config/initializers/3_grit_ext_rb.html b/doc/code/files/config/initializers/3_grit_ext_rb.html new file mode 100644 index 00000000..6b42df4c --- /dev/null +++ b/doc/code/files/config/initializers/3_grit_ext_rb.html @@ -0,0 +1,78 @@ + + + + + 3_grit_ext.rb + + + + + + + + + + + + + + +
+
+ + + + + +
Required Files
+
    + +
  • grit
  • + +
  • pygments
  • + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/config/initializers/4_resque_rb.html b/doc/code/files/config/initializers/4_resque_rb.html new file mode 100644 index 00000000..a96dd91f --- /dev/null +++ b/doc/code/files/config/initializers/4_resque_rb.html @@ -0,0 +1,93 @@ + + + + + 4_resque.rb + + + + + + + + + + + + + + +
+
+ +
+ +

Custom Redis configuration

+ +
+ + + + + +
Required Files
+
    + +
  • resque/server
  • + +
+ + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/config/initializers/5_backend_rb.html b/doc/code/files/config/initializers/5_backend_rb.html new file mode 100644 index 00000000..caaaf0db --- /dev/null +++ b/doc/code/files/config/initializers/5_backend_rb.html @@ -0,0 +1,74 @@ + + + + + 5_backend.rb + + + + + + + + + + + + + + +
+
+ +
+ +

GIT over HTTP

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/config/initializers/backtrace_silencers_rb.html b/doc/code/files/config/initializers/backtrace_silencers_rb.html new file mode 100644 index 00000000..65215d38 --- /dev/null +++ b/doc/code/files/config/initializers/backtrace_silencers_rb.html @@ -0,0 +1,74 @@ + + + + + backtrace_silencers.rb + + + + + + + + + + + + + + +
+
+ +
+ +

Be sure to restart your server when you modify this file.

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/config/initializers/carrierwave_rb.html b/doc/code/files/config/initializers/carrierwave_rb.html new file mode 100644 index 00000000..88aa2eec --- /dev/null +++ b/doc/code/files/config/initializers/carrierwave_rb.html @@ -0,0 +1,68 @@ + + + + + carrierwave.rb + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/config/initializers/connection_fix_rb.html b/doc/code/files/config/initializers/connection_fix_rb.html new file mode 100644 index 00000000..936db6d6 --- /dev/null +++ b/doc/code/files/config/initializers/connection_fix_rb.html @@ -0,0 +1,103 @@ + + + + + connection_fix.rb + + + + + + + + + + + + + + +
+
+ +
+ +

from gist.github.com/238999

+ +

If your workers are inactive for a long period of time, they’ll lose their +MySQL connection.

+ +

This hack ensures we re-connect whenever a connection is lost. Because, +really. why not?

+ +

Stick this in RAILS_ROOT/config/initializers/connection_fix.rb (or +somewhere similar)

+ +

From:

+ +
http://coderrr.wordpress.com/2009/01/08/activerecord-threading-issues-and-resolutions/
+ +
+ + + + + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/config/initializers/devise_rb.html b/doc/code/files/config/initializers/devise_rb.html new file mode 100644 index 00000000..596c954e --- /dev/null +++ b/doc/code/files/config/initializers/devise_rb.html @@ -0,0 +1,83 @@ + + + + + devise.rb + + + + + + + + + + + + + + +
+
+ +
+ +

Use this hook to configure devise mailer, warden hooks and so forth. The +first four configuration values can also be set straight in your models.

+ +
+ + + + + +
Required Files
+
    + +
  • devise/orm/active_record
  • + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/config/initializers/gemoji_rb.html b/doc/code/files/config/initializers/gemoji_rb.html new file mode 100644 index 00000000..0a015fb7 --- /dev/null +++ b/doc/code/files/config/initializers/gemoji_rb.html @@ -0,0 +1,75 @@ + + + + + gemoji.rb + + + + + + + + + + + + + + +
+
+ +
+ +

Workaround for github.com/github/gemoji/pull/18

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/config/initializers/inflections_rb.html b/doc/code/files/config/initializers/inflections_rb.html new file mode 100644 index 00000000..7e3e29a5 --- /dev/null +++ b/doc/code/files/config/initializers/inflections_rb.html @@ -0,0 +1,74 @@ + + + + + inflections.rb + + + + + + + + + + + + + + +
+
+ +
+ +

Be sure to restart your server when you modify this file.

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/config/initializers/kaminari_config_rb.html b/doc/code/files/config/initializers/kaminari_config_rb.html new file mode 100644 index 00000000..6160d25e --- /dev/null +++ b/doc/code/files/config/initializers/kaminari_config_rb.html @@ -0,0 +1,68 @@ + + + + + kaminari_config.rb + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/config/initializers/mime_types_rb.html b/doc/code/files/config/initializers/mime_types_rb.html new file mode 100644 index 00000000..5853380f --- /dev/null +++ b/doc/code/files/config/initializers/mime_types_rb.html @@ -0,0 +1,74 @@ + + + + + mime_types.rb + + + + + + + + + + + + + + +
+
+ +
+ +

Be sure to restart your server when you modify this file.

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/config/initializers/passenger_fix_rb.html b/doc/code/files/config/initializers/passenger_fix_rb.html new file mode 100644 index 00000000..de812d93 --- /dev/null +++ b/doc/code/files/config/initializers/passenger_fix_rb.html @@ -0,0 +1,68 @@ + + + + + passenger_fix.rb + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/config/initializers/postgresql_limit_fix_rb.html b/doc/code/files/config/initializers/postgresql_limit_fix_rb.html new file mode 100644 index 00000000..e205ecf0 --- /dev/null +++ b/doc/code/files/config/initializers/postgresql_limit_fix_rb.html @@ -0,0 +1,84 @@ + + + + + postgresql_limit_fix.rb + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/config/initializers/secret_token_rb.html b/doc/code/files/config/initializers/secret_token_rb.html new file mode 100644 index 00000000..8e4ed070 --- /dev/null +++ b/doc/code/files/config/initializers/secret_token_rb.html @@ -0,0 +1,74 @@ + + + + + secret_token.rb + + + + + + + + + + + + + + +
+
+ +
+ +

Be sure to restart your server when you modify this file.

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/config/initializers/session_store_rb.html b/doc/code/files/config/initializers/session_store_rb.html new file mode 100644 index 00000000..7105222d --- /dev/null +++ b/doc/code/files/config/initializers/session_store_rb.html @@ -0,0 +1,74 @@ + + + + + session_store.rb + + + + + + + + + + + + + + +
+
+ +
+ +

Be sure to restart your server when you modify this file.

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/config/initializers/wrap_parameters_rb.html b/doc/code/files/config/initializers/wrap_parameters_rb.html new file mode 100644 index 00000000..704f6f02 --- /dev/null +++ b/doc/code/files/config/initializers/wrap_parameters_rb.html @@ -0,0 +1,77 @@ + + + + + wrap_parameters.rb + + + + + + + + + + + + + + +
+
+ +
+ +

Be sure to restart your server when you modify this file.

+ +

This file contains settings for ActionController::ParamsWrapper which is +enabled by default.

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/config/routes_rb.html b/doc/code/files/config/routes_rb.html new file mode 100644 index 00000000..df59e4d7 --- /dev/null +++ b/doc/code/files/config/routes_rb.html @@ -0,0 +1,78 @@ + + + + + routes.rb + + + + + + + + + + + + + + +
+
+ + + + + +
Required Files
+
    + +
  • api
  • + +
  • resque/server
  • + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/config/unicorn_rb.html b/doc/code/files/config/unicorn_rb.html new file mode 100644 index 00000000..14da5f0e --- /dev/null +++ b/doc/code/files/config/unicorn_rb.html @@ -0,0 +1,68 @@ + + + + + unicorn.rb + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/lib/api/entities_rb.html b/doc/code/files/lib/api/entities_rb.html new file mode 100644 index 00000000..da20f2d3 --- /dev/null +++ b/doc/code/files/lib/api/entities_rb.html @@ -0,0 +1,159 @@ + + + + + entities.rb + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/lib/api/helpers_rb.html b/doc/code/files/lib/api/helpers_rb.html new file mode 100644 index 00000000..e8d05b92 --- /dev/null +++ b/doc/code/files/lib/api/helpers_rb.html @@ -0,0 +1,84 @@ + + + + + helpers.rb + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/lib/api/issues_rb.html b/doc/code/files/lib/api/issues_rb.html new file mode 100644 index 00000000..5aac1d3f --- /dev/null +++ b/doc/code/files/lib/api/issues_rb.html @@ -0,0 +1,84 @@ + + + + + issues.rb + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/lib/api/merge_requests_rb.html b/doc/code/files/lib/api/merge_requests_rb.html new file mode 100644 index 00000000..3fdcf008 --- /dev/null +++ b/doc/code/files/lib/api/merge_requests_rb.html @@ -0,0 +1,84 @@ + + + + + merge_requests.rb + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/lib/api/milestones_rb.html b/doc/code/files/lib/api/milestones_rb.html new file mode 100644 index 00000000..a37be49c --- /dev/null +++ b/doc/code/files/lib/api/milestones_rb.html @@ -0,0 +1,84 @@ + + + + + milestones.rb + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/lib/api/notes_rb.html b/doc/code/files/lib/api/notes_rb.html new file mode 100644 index 00000000..3c540290 --- /dev/null +++ b/doc/code/files/lib/api/notes_rb.html @@ -0,0 +1,84 @@ + + + + + notes.rb + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/lib/api/projects_rb.html b/doc/code/files/lib/api/projects_rb.html new file mode 100644 index 00000000..70af8a34 --- /dev/null +++ b/doc/code/files/lib/api/projects_rb.html @@ -0,0 +1,84 @@ + + + + + projects.rb + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/lib/api/session_rb.html b/doc/code/files/lib/api/session_rb.html new file mode 100644 index 00000000..8faa1a53 --- /dev/null +++ b/doc/code/files/lib/api/session_rb.html @@ -0,0 +1,84 @@ + + + + + session.rb + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/lib/api/users_rb.html b/doc/code/files/lib/api/users_rb.html new file mode 100644 index 00000000..7bf16c73 --- /dev/null +++ b/doc/code/files/lib/api/users_rb.html @@ -0,0 +1,84 @@ + + + + + users.rb + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/lib/api_rb.html b/doc/code/files/lib/api_rb.html new file mode 100644 index 00000000..48b1b65c --- /dev/null +++ b/doc/code/files/lib/api_rb.html @@ -0,0 +1,84 @@ + + + + + api.rb + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/lib/event_filter_rb.html b/doc/code/files/lib/event_filter_rb.html new file mode 100644 index 00000000..7f54400a --- /dev/null +++ b/doc/code/files/lib/event_filter_rb.html @@ -0,0 +1,79 @@ + + + + + event_filter.rb + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/lib/extracts_path_rb.html b/doc/code/files/lib/extracts_path_rb.html new file mode 100644 index 00000000..11a0dd2d --- /dev/null +++ b/doc/code/files/lib/extracts_path_rb.html @@ -0,0 +1,91 @@ + + + + + extracts_path.rb + + + + + + + + + + + + + + +
+
+ +
+ +

Module providing methods for dealing with separating a tree-ish string and +a file path string when combined in a request parameter

+ +
+ + + + + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/lib/file_size_validator_rb.html b/doc/code/files/lib/file_size_validator_rb.html new file mode 100644 index 00000000..985c23a5 --- /dev/null +++ b/doc/code/files/lib/file_size_validator_rb.html @@ -0,0 +1,84 @@ + + + + + file_size_validator.rb + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/lib/gitlab/app_logger_rb.html b/doc/code/files/lib/gitlab/app_logger_rb.html new file mode 100644 index 00000000..c53c4e86 --- /dev/null +++ b/doc/code/files/lib/gitlab/app_logger_rb.html @@ -0,0 +1,84 @@ + + + + + app_logger.rb + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/lib/gitlab/auth_rb.html b/doc/code/files/lib/gitlab/auth_rb.html new file mode 100644 index 00000000..651a1268 --- /dev/null +++ b/doc/code/files/lib/gitlab/auth_rb.html @@ -0,0 +1,84 @@ + + + + + auth.rb + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/lib/gitlab/backend/gitolite_config_rb.html b/doc/code/files/lib/gitlab/backend/gitolite_config_rb.html new file mode 100644 index 00000000..b66613c3 --- /dev/null +++ b/doc/code/files/lib/gitlab/backend/gitolite_config_rb.html @@ -0,0 +1,106 @@ + + + + + gitolite_config.rb + + + + + + + + + + + + + + +
+
+ + + + + +
Required Files
+
    + +
  • gitolite
  • + +
  • timeout
  • + +
  • fileutils
  • + +
+ + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/lib/gitlab/backend/gitolite_rb.html b/doc/code/files/lib/gitlab/backend/gitolite_rb.html new file mode 100644 index 00000000..d1743456 --- /dev/null +++ b/doc/code/files/lib/gitlab/backend/gitolite_rb.html @@ -0,0 +1,89 @@ + + + + + gitolite.rb + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/lib/gitlab/backend/grack_auth_rb.html b/doc/code/files/lib/gitlab/backend/grack_auth_rb.html new file mode 100644 index 00000000..db7541dd --- /dev/null +++ b/doc/code/files/lib/gitlab/backend/grack_auth_rb.html @@ -0,0 +1,84 @@ + + + + + grack_auth.rb + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/lib/gitlab/git_logger_rb.html b/doc/code/files/lib/gitlab/git_logger_rb.html new file mode 100644 index 00000000..0e8e013f --- /dev/null +++ b/doc/code/files/lib/gitlab/git_logger_rb.html @@ -0,0 +1,84 @@ + + + + + git_logger.rb + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/lib/gitlab/git_stats_rb.html b/doc/code/files/lib/gitlab/git_stats_rb.html new file mode 100644 index 00000000..405a2c75 --- /dev/null +++ b/doc/code/files/lib/gitlab/git_stats_rb.html @@ -0,0 +1,84 @@ + + + + + git_stats.rb + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/lib/gitlab/graph/commit_rb.html b/doc/code/files/lib/gitlab/graph/commit_rb.html new file mode 100644 index 00000000..1df6b794 --- /dev/null +++ b/doc/code/files/lib/gitlab/graph/commit_rb.html @@ -0,0 +1,97 @@ + + + + + commit.rb + + + + + + + + + + + + + + +
+
+ + + + + +
Required Files
+
    + +
  • grit
  • + +
+ + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/lib/gitlab/graph/json_builder_rb.html b/doc/code/files/lib/gitlab/graph/json_builder_rb.html new file mode 100644 index 00000000..848bb0a1 --- /dev/null +++ b/doc/code/files/lib/gitlab/graph/json_builder_rb.html @@ -0,0 +1,97 @@ + + + + + json_builder.rb + + + + + + + + + + + + + + +
+
+ + + + + +
Required Files
+
    + +
  • grit
  • + +
+ + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/lib/gitlab/inline_diff_rb.html b/doc/code/files/lib/gitlab/inline_diff_rb.html new file mode 100644 index 00000000..708dcefc --- /dev/null +++ b/doc/code/files/lib/gitlab/inline_diff_rb.html @@ -0,0 +1,84 @@ + + + + + inline_diff.rb + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/lib/gitlab/logger_rb.html b/doc/code/files/lib/gitlab/logger_rb.html new file mode 100644 index 00000000..8924ca8a --- /dev/null +++ b/doc/code/files/lib/gitlab/logger_rb.html @@ -0,0 +1,84 @@ + + + + + logger.rb + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/lib/gitlab/markdown_rb.html b/doc/code/files/lib/gitlab/markdown_rb.html new file mode 100644 index 00000000..bd5f5e2e --- /dev/null +++ b/doc/code/files/lib/gitlab/markdown_rb.html @@ -0,0 +1,84 @@ + + + + + markdown.rb + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/lib/gitlab/project_mover_rb.html b/doc/code/files/lib/gitlab/project_mover_rb.html new file mode 100644 index 00000000..6acee13f --- /dev/null +++ b/doc/code/files/lib/gitlab/project_mover_rb.html @@ -0,0 +1,97 @@ + + + + + project_mover.rb + + + + + + + + + + + + + + +
+
+ +
+ +

ProjectMover class

+ +

Used for moving project repositories from one subdir to another

+ +
+ + + + + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/lib/gitlab/regex_rb.html b/doc/code/files/lib/gitlab/regex_rb.html new file mode 100644 index 00000000..dfdab455 --- /dev/null +++ b/doc/code/files/lib/gitlab/regex_rb.html @@ -0,0 +1,84 @@ + + + + + regex.rb + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/lib/gitlab/satellite/action_rb.html b/doc/code/files/lib/gitlab/satellite/action_rb.html new file mode 100644 index 00000000..3c1e8448 --- /dev/null +++ b/doc/code/files/lib/gitlab/satellite/action_rb.html @@ -0,0 +1,89 @@ + + + + + action.rb + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/lib/gitlab/satellite/edit_file_action_rb.html b/doc/code/files/lib/gitlab/satellite/edit_file_action_rb.html new file mode 100644 index 00000000..e4a473ec --- /dev/null +++ b/doc/code/files/lib/gitlab/satellite/edit_file_action_rb.html @@ -0,0 +1,89 @@ + + + + + edit_file_action.rb + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/lib/gitlab/satellite/merge_action_rb.html b/doc/code/files/lib/gitlab/satellite/merge_action_rb.html new file mode 100644 index 00000000..6bbc8483 --- /dev/null +++ b/doc/code/files/lib/gitlab/satellite/merge_action_rb.html @@ -0,0 +1,89 @@ + + + + + merge_action.rb + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/lib/gitlab/satellite/satellite_rb.html b/doc/code/files/lib/gitlab/satellite/satellite_rb.html new file mode 100644 index 00000000..54c513f7 --- /dev/null +++ b/doc/code/files/lib/gitlab/satellite/satellite_rb.html @@ -0,0 +1,89 @@ + + + + + satellite.rb + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/lib/gitlab/seeder_rb.html b/doc/code/files/lib/gitlab/seeder_rb.html new file mode 100644 index 00000000..f02fde65 --- /dev/null +++ b/doc/code/files/lib/gitlab/seeder_rb.html @@ -0,0 +1,84 @@ + + + + + seeder.rb + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/lib/gitlab/theme_rb.html b/doc/code/files/lib/gitlab/theme_rb.html new file mode 100644 index 00000000..97dccfd7 --- /dev/null +++ b/doc/code/files/lib/gitlab/theme_rb.html @@ -0,0 +1,84 @@ + + + + + theme.rb + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/lib/hooks/post-receive.html b/doc/code/files/lib/hooks/post-receive.html new file mode 100644 index 00000000..a99c19fa --- /dev/null +++ b/doc/code/files/lib/hooks/post-receive.html @@ -0,0 +1,86 @@ + + + + + post-receive + + + + + + + + + + + + + + +
+
+ +
+ +

#!/usr/bin/env bash

+ +

# This file was placed here by GitLab. It makes sure that your pushed +commits # will be processed properly.

+ +

while read oldrev newrev ref do

+ +
# For every branch or tag that was pushed, create a Resque job in redis.
+repo_path=%xpwd`
+env -i redis-cli rpush "resque:gitlab:queue:post_receive" "{\"class\":\"PostReceive\",\"args\":[\"$repo_path\",\"$oldrev\",\"$newrev\",\"$ref\",\"$GL_USER\"]}" > %rdev/ull 2>&1
+
+ +

done

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/files/lib/redcarpet/render/gitlab_html_rb.html b/doc/code/files/lib/redcarpet/render/gitlab_html_rb.html new file mode 100644 index 00000000..33bb541b --- /dev/null +++ b/doc/code/files/lib/redcarpet/render/gitlab_html_rb.html @@ -0,0 +1,79 @@ + + + + + gitlab_html.rb + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + +
Namespace
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/doc/code/i/arrows.png b/doc/code/i/arrows.png new file mode 100755 index 00000000..e54060f4 Binary files /dev/null and b/doc/code/i/arrows.png differ diff --git a/doc/code/i/results_bg.png b/doc/code/i/results_bg.png new file mode 100755 index 00000000..199ba692 Binary files /dev/null and b/doc/code/i/results_bg.png differ diff --git a/doc/code/i/tree_bg.png b/doc/code/i/tree_bg.png new file mode 100755 index 00000000..7d236633 Binary files /dev/null and b/doc/code/i/tree_bg.png differ diff --git a/doc/code/index.html b/doc/code/index.html new file mode 100644 index 00000000..c7011386 --- /dev/null +++ b/doc/code/index.html @@ -0,0 +1,13 @@ + + + + + RDoc Documentation + + + + + + diff --git a/doc/code/js/highlight.pack.js b/doc/code/js/highlight.pack.js new file mode 100755 index 00000000..01b59273 --- /dev/null +++ b/doc/code/js/highlight.pack.js @@ -0,0 +1 @@ +var hljs=new function(){function l(o){return o.replace(/&/gm,"&").replace(/"}while(x.length||y.length){var u=t().splice(0,1)[0];v+=l(w.substr(q,u.offset-q));q=u.offset;if(u.event=="start"){v+=r(u.node);s.push(u.node)}else{if(u.event=="stop"){var p=s.length;do{p--;var o=s[p];v+=("")}while(o!=u.node);s.splice(p,1);while(p'+l(K[0])+""}else{M+=l(K[0])}O=N.lR.lastIndex;K=N.lR.exec(L)}M+=l(L.substr(O,L.length-O));return M}function J(r,L){if(L.sL&&d[L.sL]){var K=f(L.sL,r);s+=K.keyword_count;return K.value}else{return E(r,L)}}function H(L,r){var K=L.cN?'':"";if(L.rB){p+=K;L.buffer=""}else{if(L.eB){p+=l(r)+K;L.buffer=""}else{p+=K;L.buffer=r}}B.push(L);A+=L.r}function D(N,K,P){var Q=B[B.length-1];if(P){p+=J(Q.buffer+N,Q);return false}var L=y(K,Q);if(L){p+=J(Q.buffer+N,Q);H(L,K);return L.rB}var r=v(B.length-1,K);if(r){var M=Q.cN?"":"";if(Q.rE){p+=J(Q.buffer+N,Q)+M}else{if(Q.eE){p+=J(Q.buffer+N,Q)+M+l(K)}else{p+=J(Q.buffer+N+K,Q)+M}}while(r>1){M=B[B.length-2].cN?"":"";p+=M;r--;B.length--}var O=B[B.length-1];B.length--;B[B.length-1].buffer="";if(O.starts){H(O.starts,"")}return Q.rE}if(w(K,Q)){throw"Illegal"}}var G=d[I];var B=[G.dM];var A=0;var s=0;var p="";try{var u=0;G.dM.buffer="";do{var x=q(C,u);var t=D(x[0],x[1],x[2]);u+=x[0].length;if(!t){u+=x[1].length}}while(!x[2]);if(B.length>1){throw"Illegal"}return{language:I,r:A,keyword_count:s,value:p}}catch(F){if(F=="Illegal"){return{language:null,r:0,keyword_count:0,value:l(C)}}else{throw F}}}function h(){function o(t,s,u){if(t.compiled){return}if(!u){t.bR=c(s,t.b?t.b:"\\B|\\b");if(!t.e&&!t.eW){t.e="\\B|\\b"}if(t.e){t.eR=c(s,t.e)}}if(t.i){t.iR=c(s,t.i)}if(t.r==undefined){t.r=1}if(t.k){t.lR=c(s,t.l||hljs.IR,true)}for(var r in t.k){if(!t.k.hasOwnProperty(r)){continue}if(t.k[r] instanceof Object){t.kG=t.k}else{t.kG={keyword:t.k}}break}if(!t.c){t.c=[]}t.compiled=true;for(var q=0;qx.keyword_count+x.r){x=u}if(u.keyword_count+u.r>w.keyword_count+w.r){x=w;w=u}}}var s=t.className;if(!s.match(w.language)){s=s?(s+" "+w.language):w.language}var o=b(t);if(o.length){var q=document.createElement("pre");q.innerHTML=w.value;w.value=k(o,b(q),A)}if(y){w.value=w.value.replace(/^((<[^>]+>|\t)+)/gm,function(B,E,D,C){return E.replace(/\t/g,y)})}if(p){w.value=w.value.replace(/\n/g,"
")}if(/MSIE [678]/.test(navigator.userAgent)&&t.tagName=="CODE"&&t.parentNode.tagName=="PRE"){var q=t.parentNode;var v=document.createElement("div");v.innerHTML="
"+w.value+"
";t=v.firstChild.firstChild;v.firstChild.cN=q.cN;q.parentNode.replaceChild(v.firstChild,q)}else{t.innerHTML=w.value}t.className=s;t.dataset={};t.dataset.result={language:w.language,kw:w.keyword_count,re:w.r};if(x&&x.language){t.dataset.second_best={language:x.language,kw:x.keyword_count,re:x.r}}}function j(){if(j.called){return}j.called=true;e();var q=document.getElementsByTagName("pre");for(var o=0;o|>=|>>|>>=|>>>|>>>=|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~";this.BE={b:"\\\\.",r:0};this.ASM={cN:"string",b:"'",e:"'",i:"\\n",c:[this.BE],r:0};this.QSM={cN:"string",b:'"',e:'"',i:"\\n",c:[this.BE],r:0};this.CLCM={cN:"comment",b:"//",e:"$"};this.CBLCLM={cN:"comment",b:"/\\*",e:"\\*/"};this.HCM={cN:"comment",b:"#",e:"$"};this.NM={cN:"number",b:this.NR,r:0};this.CNM={cN:"number",b:this.CNR,r:0};this.inherit=function(o,r){var q={};for(var p in o){q[p]=o[p]}if(r){for(var p in r){q[p]=r[p]}}return q}}();hljs.LANGUAGES.ruby=function(){var g="[a-zA-Z_][a-zA-Z0-9_]*(\\!|\\?)?";var a="[a-zA-Z_]\\w*[!?=]?|[-+~]\\@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?";var n={keyword:{and:1,"false":1,then:1,defined:1,module:1,"in":1,"return":1,redo:1,"if":1,BEGIN:1,retry:1,end:1,"for":1,"true":1,self:1,when:1,next:1,until:1,"do":1,begin:1,unless:1,END:1,rescue:1,nil:1,"else":1,"break":1,undef:1,not:1,"super":1,"class":1,"case":1,require:1,yield:1,alias:1,"while":1,ensure:1,elsif:1,or:1,def:1},keymethods:{__id__:1,__send__:1,abort:1,abs:1,"all?":1,allocate:1,ancestors:1,"any?":1,arity:1,assoc:1,at:1,at_exit:1,autoload:1,"autoload?":1,"between?":1,binding:1,binmode:1,"block_given?":1,call:1,callcc:1,caller:1,capitalize:1,"capitalize!":1,casecmp:1,"catch":1,ceil:1,center:1,chomp:1,"chomp!":1,chop:1,"chop!":1,chr:1,"class":1,class_eval:1,"class_variable_defined?":1,class_variables:1,clear:1,clone:1,close:1,close_read:1,close_write:1,"closed?":1,coerce:1,collect:1,"collect!":1,compact:1,"compact!":1,concat:1,"const_defined?":1,const_get:1,const_missing:1,const_set:1,constants:1,count:1,crypt:1,"default":1,default_proc:1,"delete":1,"delete!":1,delete_at:1,delete_if:1,detect:1,display:1,div:1,divmod:1,downcase:1,"downcase!":1,downto:1,dump:1,dup:1,each:1,each_byte:1,each_index:1,each_key:1,each_line:1,each_pair:1,each_value:1,each_with_index:1,"empty?":1,entries:1,eof:1,"eof?":1,"eql?":1,"equal?":1,"eval":1,exec:1,exit:1,"exit!":1,extend:1,fail:1,fcntl:1,fetch:1,fileno:1,fill:1,find:1,find_all:1,first:1,flatten:1,"flatten!":1,floor:1,flush:1,for_fd:1,foreach:1,fork:1,format:1,freeze:1,"frozen?":1,fsync:1,getc:1,gets:1,global_variables:1,grep:1,gsub:1,"gsub!":1,"has_key?":1,"has_value?":1,hash:1,hex:1,id:1,include:1,"include?":1,included_modules:1,index:1,indexes:1,indices:1,induced_from:1,inject:1,insert:1,inspect:1,instance_eval:1,instance_method:1,instance_methods:1,"instance_of?":1,"instance_variable_defined?":1,instance_variable_get:1,instance_variable_set:1,instance_variables:1,"integer?":1,intern:1,invert:1,ioctl:1,"is_a?":1,isatty:1,"iterator?":1,join:1,"key?":1,keys:1,"kind_of?":1,lambda:1,last:1,length:1,lineno:1,ljust:1,load:1,local_variables:1,loop:1,lstrip:1,"lstrip!":1,map:1,"map!":1,match:1,max:1,"member?":1,merge:1,"merge!":1,method:1,"method_defined?":1,method_missing:1,methods:1,min:1,module_eval:1,modulo:1,name:1,nesting:1,"new":1,next:1,"next!":1,"nil?":1,nitems:1,"nonzero?":1,object_id:1,oct:1,open:1,pack:1,partition:1,pid:1,pipe:1,pop:1,popen:1,pos:1,prec:1,prec_f:1,prec_i:1,print:1,printf:1,private_class_method:1,private_instance_methods:1,"private_method_defined?":1,private_methods:1,proc:1,protected_instance_methods:1,"protected_method_defined?":1,protected_methods:1,public_class_method:1,public_instance_methods:1,"public_method_defined?":1,public_methods:1,push:1,putc:1,puts:1,quo:1,raise:1,rand:1,rassoc:1,read:1,read_nonblock:1,readchar:1,readline:1,readlines:1,readpartial:1,rehash:1,reject:1,"reject!":1,remainder:1,reopen:1,replace:1,require:1,"respond_to?":1,reverse:1,"reverse!":1,reverse_each:1,rewind:1,rindex:1,rjust:1,round:1,rstrip:1,"rstrip!":1,scan:1,seek:1,select:1,send:1,set_trace_func:1,shift:1,singleton_method_added:1,singleton_methods:1,size:1,sleep:1,slice:1,"slice!":1,sort:1,"sort!":1,sort_by:1,split:1,sprintf:1,squeeze:1,"squeeze!":1,srand:1,stat:1,step:1,store:1,strip:1,"strip!":1,sub:1,"sub!":1,succ:1,"succ!":1,sum:1,superclass:1,swapcase:1,"swapcase!":1,sync:1,syscall:1,sysopen:1,sysread:1,sysseek:1,system:1,syswrite:1,taint:1,"tainted?":1,tell:1,test:1,"throw":1,times:1,to_a:1,to_ary:1,to_f:1,to_hash:1,to_i:1,to_int:1,to_io:1,to_proc:1,to_s:1,to_str:1,to_sym:1,tr:1,"tr!":1,tr_s:1,"tr_s!":1,trace_var:1,transpose:1,trap:1,truncate:1,"tty?":1,type:1,ungetc:1,uniq:1,"uniq!":1,unpack:1,unshift:1,untaint:1,untrace_var:1,upcase:1,"upcase!":1,update:1,upto:1,"value?":1,values:1,values_at:1,warn:1,write:1,write_nonblock:1,"zero?":1,zip:1}};var h={cN:"yardoctag",b:"@[A-Za-z]+"};var d={cN:"comment",b:"#",e:"$",c:[h]};var c={cN:"comment",b:"^\\=begin",e:"^\\=end",c:[h],r:10};var b={cN:"comment",b:"^__END__",e:"\\n$"};var u={cN:"subst",b:"#\\{",e:"}",l:g,k:n};var p=[hljs.BE,u];var s={cN:"string",b:"'",e:"'",c:p,r:0};var r={cN:"string",b:'"',e:'"',c:p,r:0};var q={cN:"string",b:"%[qw]?\\(",e:"\\)",c:p,r:10};var o={cN:"string",b:"%[qw]?\\[",e:"\\]",c:p,r:10};var m={cN:"string",b:"%[qw]?{",e:"}",c:p,r:10};var l={cN:"string",b:"%[qw]?<",e:">",c:p,r:10};var k={cN:"string",b:"%[qw]?/",e:"/",c:p,r:10};var j={cN:"string",b:"%[qw]?%",e:"%",c:p,r:10};var i={cN:"string",b:"%[qw]?-",e:"-",c:p,r:10};var t={cN:"string",b:"%[qw]?\\|",e:"\\|",c:p,r:10};var e={cN:"function",b:"\\bdef\\s+",e:" |$|;",l:g,k:n,c:[{cN:"title",b:a,l:g,k:n},{cN:"params",b:"\\(",e:"\\)",l:g,k:n},d,c,b]};var f={cN:"identifier",b:g,l:g,k:n,r:0};var v=[d,c,b,s,r,q,o,m,l,k,j,i,t,{cN:"class",b:"\\b(class|module)\\b",e:"$|;",k:{"class":1,module:1},c:[{cN:"title",b:"[A-Za-z_]\\w*(::\\w+)*(\\?|\\!)?",r:0},{cN:"inheritance",b:"<\\s*",c:[{cN:"parent",b:"("+hljs.IR+"::)?"+hljs.IR}]},d,c,b]},e,{cN:"constant",b:"(::)?([A-Z]\\w*(::)?)+",r:0},{cN:"symbol",b:":",c:[s,r,q,o,m,l,k,j,i,t,f],r:0},{cN:"number",b:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",r:0},{cN:"number",b:"\\?\\w"},{cN:"variable",b:"(\\$\\W)|((\\$|\\@\\@?)(\\w+))"},f,{b:"("+hljs.RSR+")\\s*",c:[d,c,b,{cN:"regexp",b:"/",e:"/[a-z]*",i:"\\n",c:[hljs.BE]}],r:0}];u.c=v;e.c[1].c=v;return{dM:{l:g,k:n,c:v}}}();hljs.LANGUAGES.javascript={dM:{k:{keyword:{"in":1,"if":1,"for":1,"while":1,"finally":1,"var":1,"new":1,"function":1,"do":1,"return":1,"void":1,"else":1,"break":1,"catch":1,"instanceof":1,"with":1,"throw":1,"case":1,"default":1,"try":1,"this":1,"switch":1,"continue":1,"typeof":1,"delete":1},literal:{"true":1,"false":1,"null":1}},c:[hljs.ASM,hljs.QSM,hljs.CLCM,hljs.CBLCLM,hljs.CNM,{b:"("+hljs.RSR+"|case|return|throw)\\s*",k:{"return":1,"throw":1,"case":1},c:[hljs.CLCM,hljs.CBLCLM,{cN:"regexp",b:"/.*?[^\\\\/]/[gim]*"}],r:0},{cN:"function",b:"\\bfunction\\b",e:"{",k:{"function":1},c:[{cN:"title",b:"[A-Za-z$_][0-9A-Za-z$_]*"},{cN:"params",b:"\\(",e:"\\)",c:[hljs.ASM,hljs.QSM,hljs.CLCM,hljs.CBLCLM]}]}]}};hljs.LANGUAGES.css=function(){var a={cN:"function",b:hljs.IR+"\\(",e:"\\)",c:[{eW:true,eE:true,c:[hljs.NM,hljs.ASM,hljs.QSM]}]};return{cI:true,dM:{i:"[=/|']",c:[hljs.CBLCLM,{cN:"id",b:"\\#[A-Za-z0-9_-]+"},{cN:"class",b:"\\.[A-Za-z0-9_-]+",r:0},{cN:"attr_selector",b:"\\[",e:"\\]",i:"$"},{cN:"pseudo",b:":(:)?[a-zA-Z0-9\\_\\-\\+\\(\\)\\\"\\']+"},{cN:"at_rule",b:"@font-face",l:"[a-z-]+",k:{"font-face":1}},{cN:"at_rule",b:"@",e:"[{;]",eE:true,k:{"import":1,page:1,media:1,charset:1},c:[a,hljs.ASM,hljs.QSM,hljs.NM]},{cN:"tag",b:hljs.IR,r:0},{cN:"rules",b:"{",e:"}",i:"[^\\s]",r:0,c:[hljs.CBLCLM,{cN:"rule",b:"[^\\s]",rB:true,e:";",eW:true,c:[{cN:"attribute",b:"[A-Z\\_\\.\\-]+",e:":",eE:true,i:"[^\\s]",starts:{cN:"value",eW:true,eE:true,c:[a,hljs.NM,hljs.QSM,hljs.ASM,hljs.CBLCLM,{cN:"hexcolor",b:"\\#[0-9A-F]+"},{cN:"important",b:"!important"}]}}]}]}]}}}();hljs.LANGUAGES.xml=function(){var b="[A-Za-z0-9\\._:-]+";var a={eW:true,c:[{cN:"attribute",b:b,r:0},{b:'="',rB:true,e:'"',c:[{cN:"value",b:'"',eW:true}]},{b:"='",rB:true,e:"'",c:[{cN:"value",b:"'",eW:true}]},{b:"=",c:[{cN:"value",b:"[^\\s/>]+"}]}]};return{cI:true,dM:{c:[{cN:"pi",b:"<\\?",e:"\\?>",r:10},{cN:"doctype",b:"",r:10},{cN:"comment",b:"",r:10},{cN:"cdata",b:"<\\!\\[CDATA\\[",e:"\\]\\]>",r:10},{cN:"tag",b:"",k:{title:{style:1}},c:[a],starts:{cN:"css",e:"",rE:true,sL:"css"}},{cN:"tag",b:"",k:{title:{script:1}},c:[a],starts:{cN:"javascript",e:"<\/script>",rE:true,sL:"javascript"}},{cN:"vbscript",b:"<%",e:"%>",sL:"vbscript"},{cN:"tag",b:"",c:[{cN:"title",b:"[^ />]+"},a]}]}}}();hljs.LANGUAGES.cpp=function(){var b={keyword:{"false":1,"int":1,"float":1,"while":1,"private":1,"char":1,"catch":1,"export":1,virtual:1,operator:2,sizeof:2,dynamic_cast:2,typedef:2,const_cast:2,"const":1,struct:1,"for":1,static_cast:2,union:1,namespace:1,unsigned:1,"long":1,"throw":1,"volatile":2,"static":1,"protected":1,bool:1,template:1,mutable:1,"if":1,"public":1,friend:2,"do":1,"return":1,"goto":1,auto:1,"void":2,"enum":1,"else":1,"break":1,"new":1,extern:1,using:1,"true":1,"class":1,asm:1,"case":1,typeid:1,"short":1,reinterpret_cast:2,"default":1,"double":1,register:1,explicit:1,signed:1,typename:1,"try":1,"this":1,"switch":1,"continue":1,wchar_t:1,inline:1,"delete":1,alignof:1,char16_t:1,char32_t:1,constexpr:1,decltype:1,noexcept:1,nullptr:1,static_assert:1,thread_local:1},built_in:{std:1,string:1,cin:1,cout:1,cerr:1,clog:1,stringstream:1,istringstream:1,ostringstream:1,auto_ptr:1,deque:1,list:1,queue:1,stack:1,vector:1,map:1,set:1,bitset:1,multiset:1,multimap:1,unordered_set:1,unordered_map:1,unordered_multiset:1,unordered_multimap:1,array:1,shared_ptr:1}};var a={cN:"stl_container",b:"\\b(deque|list|queue|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array)\\s*<",e:">",k:b.built_in,r:10};a.c=[a];return{dM:{k:b,i:")[^>]*$|^#([\w-]+)$/,f=/^.[^:#\[\.,]*$/;o.fn=o.prototype={init:function(E,H){E=E||document;if(E.nodeType){this[0]=E;this.length=1;this.context=E;return this}if(typeof E==="string"){var G=D.exec(E);if(G&&(G[1]||!H)){if(G[1]){E=o.clean([G[1]],H)}else{var I=document.getElementById(G[3]);if(I&&I.id!=G[3]){return o().find(E)}var F=o(I||[]);F.context=document;F.selector=E;return F}}else{return o(H).find(E)}}else{if(o.isFunction(E)){return o(document).ready(E)}}if(E.selector&&E.context){this.selector=E.selector;this.context=E.context}return this.setArray(o.isArray(E)?E:o.makeArray(E))},selector:"",jquery:"1.3.2",size:function(){return this.length},get:function(E){return E===g?Array.prototype.slice.call(this):this[E]},pushStack:function(F,H,E){var G=o(F);G.prevObject=this;G.context=this.context;if(H==="find"){G.selector=this.selector+(this.selector?" ":"")+E}else{if(H){G.selector=this.selector+"."+H+"("+E+")"}}return G},setArray:function(E){this.length=0;Array.prototype.push.apply(this,E);return this},each:function(F,E){return o.each(this,F,E)},index:function(E){return o.inArray(E&&E.jquery?E[0]:E,this)},attr:function(F,H,G){var E=F;if(typeof F==="string"){if(H===g){return this[0]&&o[G||"attr"](this[0],F)}else{E={};E[F]=H}}return this.each(function(I){for(F in E){o.attr(G?this.style:this,F,o.prop(this,E[F],G,I,F))}})},css:function(E,F){if((E=="width"||E=="height")&&parseFloat(F)<0){F=g}return this.attr(E,F,"curCSS")},text:function(F){if(typeof F!=="object"&&F!=null){return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(F))}var E="";o.each(F||this,function(){o.each(this.childNodes,function(){if(this.nodeType!=8){E+=this.nodeType!=1?this.nodeValue:o.fn.text([this])}})});return E},wrapAll:function(E){if(this[0]){var F=o(E,this[0].ownerDocument).clone();if(this[0].parentNode){F.insertBefore(this[0])}F.map(function(){var G=this;while(G.firstChild){G=G.firstChild}return G}).append(this)}return this},wrapInner:function(E){return this.each(function(){o(this).contents().wrapAll(E)})},wrap:function(E){return this.each(function(){o(this).wrapAll(E)})},append:function(){return this.domManip(arguments,true,function(E){if(this.nodeType==1){this.appendChild(E)}})},prepend:function(){return this.domManip(arguments,true,function(E){if(this.nodeType==1){this.insertBefore(E,this.firstChild)}})},before:function(){return this.domManip(arguments,false,function(E){this.parentNode.insertBefore(E,this)})},after:function(){return this.domManip(arguments,false,function(E){this.parentNode.insertBefore(E,this.nextSibling)})},end:function(){return this.prevObject||o([])},push:[].push,sort:[].sort,splice:[].splice,find:function(E){if(this.length===1){var F=this.pushStack([],"find",E);F.length=0;o.find(E,this[0],F);return F}else{return this.pushStack(o.unique(o.map(this,function(G){return o.find(E,G)})),"find",E)}},clone:function(G){var E=this.map(function(){if(!o.support.noCloneEvent&&!o.isXMLDoc(this)){var I=this.outerHTML;if(!I){var J=this.ownerDocument.createElement("div");J.appendChild(this.cloneNode(true));I=J.innerHTML}return o.clean([I.replace(/ jQuery\d+="(?:\d+|null)"/g,"").replace(/^\s*/,"")])[0]}else{return this.cloneNode(true)}});if(G===true){var H=this.find("*").andSelf(),F=0;E.find("*").andSelf().each(function(){if(this.nodeName!==H[F].nodeName){return}var I=o.data(H[F],"events");for(var K in I){for(var J in I[K]){o.event.add(this,K,I[K][J],I[K][J].data)}}F++})}return E},filter:function(E){return this.pushStack(o.isFunction(E)&&o.grep(this,function(G,F){return E.call(G,F)})||o.multiFilter(E,o.grep(this,function(F){return F.nodeType===1})),"filter",E)},closest:function(E){var G=o.expr.match.POS.test(E)?o(E):null,F=0;return this.map(function(){var H=this;while(H&&H.ownerDocument){if(G?G.index(H)>-1:o(H).is(E)){o.data(H,"closest",F);return H}H=H.parentNode;F++}})},not:function(E){if(typeof E==="string"){if(f.test(E)){return this.pushStack(o.multiFilter(E,this,true),"not",E)}else{E=o.multiFilter(E,this)}}var F=E.length&&E[E.length-1]!==g&&!E.nodeType;return this.filter(function(){return F?o.inArray(this,E)<0:this!=E})},add:function(E){return this.pushStack(o.unique(o.merge(this.get(),typeof E==="string"?o(E):o.makeArray(E))))},is:function(E){return !!E&&o.multiFilter(E,this).length>0},hasClass:function(E){return !!E&&this.is("."+E)},val:function(K){if(K===g){var E=this[0];if(E){if(o.nodeName(E,"option")){return(E.attributes.value||{}).specified?E.value:E.text}if(o.nodeName(E,"select")){var I=E.selectedIndex,L=[],M=E.options,H=E.type=="select-one";if(I<0){return null}for(var F=H?I:0,J=H?I+1:M.length;F=0||o.inArray(this.name,K)>=0)}else{if(o.nodeName(this,"select")){var N=o.makeArray(K);o("option",this).each(function(){this.selected=(o.inArray(this.value,N)>=0||o.inArray(this.text,N)>=0)});if(!N.length){this.selectedIndex=-1}}else{this.value=K}}})},html:function(E){return E===g?(this[0]?this[0].innerHTML.replace(/ jQuery\d+="(?:\d+|null)"/g,""):null):this.empty().append(E)},replaceWith:function(E){return this.after(E).remove()},eq:function(E){return this.slice(E,+E+1)},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments),"slice",Array.prototype.slice.call(arguments).join(","))},map:function(E){return this.pushStack(o.map(this,function(G,F){return E.call(G,F,G)}))},andSelf:function(){return this.add(this.prevObject)},domManip:function(J,M,L){if(this[0]){var I=(this[0].ownerDocument||this[0]).createDocumentFragment(),F=o.clean(J,(this[0].ownerDocument||this[0]),I),H=I.firstChild;if(H){for(var G=0,E=this.length;G1||G>0?I.cloneNode(true):I)}}if(F){o.each(F,z)}}return this;function K(N,O){return M&&o.nodeName(N,"table")&&o.nodeName(O,"tr")?(N.getElementsByTagName("tbody")[0]||N.appendChild(N.ownerDocument.createElement("tbody"))):N}}};o.fn.init.prototype=o.fn;function z(E,F){if(F.src){o.ajax({url:F.src,async:false,dataType:"script"})}else{o.globalEval(F.text||F.textContent||F.innerHTML||"")}if(F.parentNode){F.parentNode.removeChild(F)}}function e(){return +new Date}o.extend=o.fn.extend=function(){var J=arguments[0]||{},H=1,I=arguments.length,E=false,G;if(typeof J==="boolean"){E=J;J=arguments[1]||{};H=2}if(typeof J!=="object"&&!o.isFunction(J)){J={}}if(I==H){J=this;--H}for(;H-1}},swap:function(H,G,I){var E={};for(var F in G){E[F]=H.style[F];H.style[F]=G[F]}I.call(H);for(var F in G){H.style[F]=E[F]}},css:function(H,F,J,E){if(F=="width"||F=="height"){var L,G={position:"absolute",visibility:"hidden",display:"block"},K=F=="width"?["Left","Right"]:["Top","Bottom"];function I(){L=F=="width"?H.offsetWidth:H.offsetHeight;if(E==="border"){return}o.each(K,function(){if(!E){L-=parseFloat(o.curCSS(H,"padding"+this,true))||0}if(E==="margin"){L+=parseFloat(o.curCSS(H,"margin"+this,true))||0}else{L-=parseFloat(o.curCSS(H,"border"+this+"Width",true))||0}})}if(H.offsetWidth!==0){I()}else{o.swap(H,G,I)}return Math.max(0,Math.round(L))}return o.curCSS(H,F,J)},curCSS:function(I,F,G){var L,E=I.style;if(F=="opacity"&&!o.support.opacity){L=o.attr(E,"opacity");return L==""?"1":L}if(F.match(/float/i)){F=w}if(!G&&E&&E[F]){L=E[F]}else{if(q.getComputedStyle){if(F.match(/float/i)){F="float"}F=F.replace(/([A-Z])/g,"-$1").toLowerCase();var M=q.getComputedStyle(I,null);if(M){L=M.getPropertyValue(F)}if(F=="opacity"&&L==""){L="1"}}else{if(I.currentStyle){var J=F.replace(/\-(\w)/g,function(N,O){return O.toUpperCase()});L=I.currentStyle[F]||I.currentStyle[J];if(!/^\d+(px)?$/i.test(L)&&/^\d/.test(L)){var H=E.left,K=I.runtimeStyle.left;I.runtimeStyle.left=I.currentStyle.left;E.left=L||0;L=E.pixelLeft+"px";E.left=H;I.runtimeStyle.left=K}}}}return L},clean:function(F,K,I){K=K||document;if(typeof K.createElement==="undefined"){K=K.ownerDocument||K[0]&&K[0].ownerDocument||document}if(!I&&F.length===1&&typeof F[0]==="string"){var H=/^<(\w+)\s*\/?>$/.exec(F[0]);if(H){return[K.createElement(H[1])]}}var G=[],E=[],L=K.createElement("div");o.each(F,function(P,S){if(typeof S==="number"){S+=""}if(!S){return}if(typeof S==="string"){S=S.replace(/(<(\w+)[^>]*?)\/>/g,function(U,V,T){return T.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?U:V+">"});var O=S.replace(/^\s+/,"").substring(0,10).toLowerCase();var Q=!O.indexOf("",""]||!O.indexOf("",""]||O.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"","
"]||!O.indexOf("",""]||(!O.indexOf("",""]||!O.indexOf("",""]||!o.support.htmlSerialize&&[1,"div
","
"]||[0,"",""];L.innerHTML=Q[1]+S+Q[2];while(Q[0]--){L=L.lastChild}if(!o.support.tbody){var R=/"&&!R?L.childNodes:[];for(var M=N.length-1;M>=0;--M){if(o.nodeName(N[M],"tbody")&&!N[M].childNodes.length){N[M].parentNode.removeChild(N[M])}}}if(!o.support.leadingWhitespace&&/^\s/.test(S)){L.insertBefore(K.createTextNode(S.match(/^\s*/)[0]),L.firstChild)}S=o.makeArray(L.childNodes)}if(S.nodeType){G.push(S)}else{G=o.merge(G,S)}});if(I){for(var J=0;G[J];J++){if(o.nodeName(G[J],"script")&&(!G[J].type||G[J].type.toLowerCase()==="text/javascript")){E.push(G[J].parentNode?G[J].parentNode.removeChild(G[J]):G[J])}else{if(G[J].nodeType===1){G.splice.apply(G,[J+1,0].concat(o.makeArray(G[J].getElementsByTagName("script"))))}I.appendChild(G[J])}}return E}return G},attr:function(J,G,K){if(!J||J.nodeType==3||J.nodeType==8){return g}var H=!o.isXMLDoc(J),L=K!==g;G=H&&o.props[G]||G;if(J.tagName){var F=/href|src|style/.test(G);if(G=="selected"&&J.parentNode){J.parentNode.selectedIndex}if(G in J&&H&&!F){if(L){if(G=="type"&&o.nodeName(J,"input")&&J.parentNode){throw"type property can't be changed"}J[G]=K}if(o.nodeName(J,"form")&&J.getAttributeNode(G)){return J.getAttributeNode(G).nodeValue}if(G=="tabIndex"){var I=J.getAttributeNode("tabIndex");return I&&I.specified?I.value:J.nodeName.match(/(button|input|object|select|textarea)/i)?0:J.nodeName.match(/^(a|area)$/i)&&J.href?0:g}return J[G]}if(!o.support.style&&H&&G=="style"){return o.attr(J.style,"cssText",K)}if(L){J.setAttribute(G,""+K)}var E=!o.support.hrefNormalized&&H&&F?J.getAttribute(G,2):J.getAttribute(G);return E===null?g:E}if(!o.support.opacity&&G=="opacity"){if(L){J.zoom=1;J.filter=(J.filter||"").replace(/alpha\([^)]*\)/,"")+(parseInt(K)+""=="NaN"?"":"alpha(opacity="+K*100+")")}return J.filter&&J.filter.indexOf("opacity=")>=0?(parseFloat(J.filter.match(/opacity=([^)]*)/)[1])/100)+"":""}G=G.replace(/-([a-z])/ig,function(M,N){return N.toUpperCase()});if(L){J[G]=K}return J[G]},trim:function(E){return(E||"").replace(/^\s+|\s+$/g,"")},makeArray:function(G){var E=[];if(G!=null){var F=G.length;if(F==null||typeof G==="string"||o.isFunction(G)||G.setInterval){E[0]=G}else{while(F){E[--F]=G[F]}}}return E},inArray:function(G,H){for(var E=0,F=H.length;E0?this.clone(true):this).get();o.fn[F].apply(o(L[K]),I);J=J.concat(I)}return this.pushStack(J,E,G)}});o.each({removeAttr:function(E){o.attr(this,E,"");if(this.nodeType==1){this.removeAttribute(E)}},addClass:function(E){o.className.add(this,E)},removeClass:function(E){o.className.remove(this,E)},toggleClass:function(F,E){if(typeof E!=="boolean"){E=!o.className.has(this,F)}o.className[E?"add":"remove"](this,F)},remove:function(E){if(!E||o.filter(E,[this]).length){o("*",this).add([this]).each(function(){o.event.remove(this);o.removeData(this)});if(this.parentNode){this.parentNode.removeChild(this)}}},empty:function(){o(this).children().remove();while(this.firstChild){this.removeChild(this.firstChild)}}},function(E,F){o.fn[E]=function(){return this.each(F,arguments)}});function j(E,F){return E[0]&&parseInt(o.curCSS(E[0],F,true),10)||0}var h="jQuery"+e(),v=0,A={};o.extend({cache:{},data:function(F,E,G){F=F==l?A:F;var H=F[h];if(!H){H=F[h]=++v}if(E&&!o.cache[H]){o.cache[H]={}}if(G!==g){o.cache[H][E]=G}return E?o.cache[H][E]:H},removeData:function(F,E){F=F==l?A:F;var H=F[h];if(E){if(o.cache[H]){delete o.cache[H][E];E="";for(E in o.cache[H]){break}if(!E){o.removeData(F)}}}else{try{delete F[h]}catch(G){if(F.removeAttribute){F.removeAttribute(h)}}delete o.cache[H]}},queue:function(F,E,H){if(F){E=(E||"fx")+"queue";var G=o.data(F,E);if(!G||o.isArray(H)){G=o.data(F,E,o.makeArray(H))}else{if(H){G.push(H)}}}return G},dequeue:function(H,G){var E=o.queue(H,G),F=E.shift();if(!G||G==="fx"){F=E[0]}if(F!==g){F.call(H)}}});o.fn.extend({data:function(E,G){var H=E.split(".");H[1]=H[1]?"."+H[1]:"";if(G===g){var F=this.triggerHandler("getData"+H[1]+"!",[H[0]]);if(F===g&&this.length){F=o.data(this[0],E)}return F===g&&H[1]?this.data(H[0]):F}else{return this.trigger("setData"+H[1]+"!",[H[0],G]).each(function(){o.data(this,E,G)})}},removeData:function(E){return this.each(function(){o.removeData(this,E)})},queue:function(E,F){if(typeof E!=="string"){F=E;E="fx"}if(F===g){return o.queue(this[0],E)}return this.each(function(){var G=o.queue(this,E,F);if(E=="fx"&&G.length==1){G[0].call(this)}})},dequeue:function(E){return this.each(function(){o.dequeue(this,E)})}}); +/* + * Sizzle CSS Selector Engine - v0.9.3 + * Copyright 2009, The Dojo Foundation + * Released under the MIT, BSD, and GPL Licenses. + * More information: http://sizzlejs.com/ + */ +(function(){var R=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?/g,L=0,H=Object.prototype.toString;var F=function(Y,U,ab,ac){ab=ab||[];U=U||document;if(U.nodeType!==1&&U.nodeType!==9){return[]}if(!Y||typeof Y!=="string"){return ab}var Z=[],W,af,ai,T,ad,V,X=true;R.lastIndex=0;while((W=R.exec(Y))!==null){Z.push(W[1]);if(W[2]){V=RegExp.rightContext;break}}if(Z.length>1&&M.exec(Y)){if(Z.length===2&&I.relative[Z[0]]){af=J(Z[0]+Z[1],U)}else{af=I.relative[Z[0]]?[U]:F(Z.shift(),U);while(Z.length){Y=Z.shift();if(I.relative[Y]){Y+=Z.shift()}af=J(Y,af)}}}else{var ae=ac?{expr:Z.pop(),set:E(ac)}:F.find(Z.pop(),Z.length===1&&U.parentNode?U.parentNode:U,Q(U));af=F.filter(ae.expr,ae.set);if(Z.length>0){ai=E(af)}else{X=false}while(Z.length){var ah=Z.pop(),ag=ah;if(!I.relative[ah]){ah=""}else{ag=Z.pop()}if(ag==null){ag=U}I.relative[ah](ai,ag,Q(U))}}if(!ai){ai=af}if(!ai){throw"Syntax error, unrecognized expression: "+(ah||Y)}if(H.call(ai)==="[object Array]"){if(!X){ab.push.apply(ab,ai)}else{if(U.nodeType===1){for(var aa=0;ai[aa]!=null;aa++){if(ai[aa]&&(ai[aa]===true||ai[aa].nodeType===1&&K(U,ai[aa]))){ab.push(af[aa])}}}else{for(var aa=0;ai[aa]!=null;aa++){if(ai[aa]&&ai[aa].nodeType===1){ab.push(af[aa])}}}}}else{E(ai,ab)}if(V){F(V,U,ab,ac);if(G){hasDuplicate=false;ab.sort(G);if(hasDuplicate){for(var aa=1;aa":function(Z,U,aa){var X=typeof U==="string";if(X&&!/\W/.test(U)){U=aa?U:U.toUpperCase();for(var V=0,T=Z.length;V=0)){if(!V){T.push(Y)}}else{if(V){U[X]=false}}}}return false},ID:function(T){return T[1].replace(/\\/g,"")},TAG:function(U,T){for(var V=0;T[V]===false;V++){}return T[V]&&Q(T[V])?U[1]:U[1].toUpperCase()},CHILD:function(T){if(T[1]=="nth"){var U=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(T[2]=="even"&&"2n"||T[2]=="odd"&&"2n+1"||!/\D/.test(T[2])&&"0n+"+T[2]||T[2]);T[2]=(U[1]+(U[2]||1))-0;T[3]=U[3]-0}T[0]=L++;return T},ATTR:function(X,U,V,T,Y,Z){var W=X[1].replace(/\\/g,"");if(!Z&&I.attrMap[W]){X[1]=I.attrMap[W]}if(X[2]==="~="){X[4]=" "+X[4]+" "}return X},PSEUDO:function(X,U,V,T,Y){if(X[1]==="not"){if(X[3].match(R).length>1||/^\w/.test(X[3])){X[3]=F(X[3],null,null,U)}else{var W=F.filter(X[3],U,V,true^Y);if(!V){T.push.apply(T,W)}return false}}else{if(I.match.POS.test(X[0])||I.match.CHILD.test(X[0])){return true}}return X},POS:function(T){T.unshift(true);return T}},filters:{enabled:function(T){return T.disabled===false&&T.type!=="hidden"},disabled:function(T){return T.disabled===true},checked:function(T){return T.checked===true},selected:function(T){T.parentNode.selectedIndex;return T.selected===true},parent:function(T){return !!T.firstChild},empty:function(T){return !T.firstChild},has:function(V,U,T){return !!F(T[3],V).length},header:function(T){return/h\d/i.test(T.nodeName)},text:function(T){return"text"===T.type},radio:function(T){return"radio"===T.type},checkbox:function(T){return"checkbox"===T.type},file:function(T){return"file"===T.type},password:function(T){return"password"===T.type},submit:function(T){return"submit"===T.type},image:function(T){return"image"===T.type},reset:function(T){return"reset"===T.type},button:function(T){return"button"===T.type||T.nodeName.toUpperCase()==="BUTTON"},input:function(T){return/input|select|textarea|button/i.test(T.nodeName)}},setFilters:{first:function(U,T){return T===0},last:function(V,U,T,W){return U===W.length-1},even:function(U,T){return T%2===0},odd:function(U,T){return T%2===1},lt:function(V,U,T){return UT[3]-0},nth:function(V,U,T){return T[3]-0==U},eq:function(V,U,T){return T[3]-0==U}},filter:{PSEUDO:function(Z,V,W,aa){var U=V[1],X=I.filters[U];if(X){return X(Z,W,V,aa)}else{if(U==="contains"){return(Z.textContent||Z.innerText||"").indexOf(V[3])>=0}else{if(U==="not"){var Y=V[3];for(var W=0,T=Y.length;W=0)}}},ID:function(U,T){return U.nodeType===1&&U.getAttribute("id")===T},TAG:function(U,T){return(T==="*"&&U.nodeType===1)||U.nodeName===T},CLASS:function(U,T){return(" "+(U.className||U.getAttribute("class"))+" ").indexOf(T)>-1},ATTR:function(Y,W){var V=W[1],T=I.attrHandle[V]?I.attrHandle[V](Y):Y[V]!=null?Y[V]:Y.getAttribute(V),Z=T+"",X=W[2],U=W[4];return T==null?X==="!=":X==="="?Z===U:X==="*="?Z.indexOf(U)>=0:X==="~="?(" "+Z+" ").indexOf(U)>=0:!U?Z&&T!==false:X==="!="?Z!=U:X==="^="?Z.indexOf(U)===0:X==="$="?Z.substr(Z.length-U.length)===U:X==="|="?Z===U||Z.substr(0,U.length+1)===U+"-":false},POS:function(X,U,V,Y){var T=U[2],W=I.setFilters[T];if(W){return W(X,V,U,Y)}}}};var M=I.match.POS;for(var O in I.match){I.match[O]=RegExp(I.match[O].source+/(?![^\[]*\])(?![^\(]*\))/.source)}var E=function(U,T){U=Array.prototype.slice.call(U);if(T){T.push.apply(T,U);return T}return U};try{Array.prototype.slice.call(document.documentElement.childNodes)}catch(N){E=function(X,W){var U=W||[];if(H.call(X)==="[object Array]"){Array.prototype.push.apply(U,X)}else{if(typeof X.length==="number"){for(var V=0,T=X.length;V";var T=document.documentElement;T.insertBefore(U,T.firstChild);if(!!document.getElementById(V)){I.find.ID=function(X,Y,Z){if(typeof Y.getElementById!=="undefined"&&!Z){var W=Y.getElementById(X[1]);return W?W.id===X[1]||typeof W.getAttributeNode!=="undefined"&&W.getAttributeNode("id").nodeValue===X[1]?[W]:g:[]}};I.filter.ID=function(Y,W){var X=typeof Y.getAttributeNode!=="undefined"&&Y.getAttributeNode("id");return Y.nodeType===1&&X&&X.nodeValue===W}}T.removeChild(U)})();(function(){var T=document.createElement("div");T.appendChild(document.createComment(""));if(T.getElementsByTagName("*").length>0){I.find.TAG=function(U,Y){var X=Y.getElementsByTagName(U[1]);if(U[1]==="*"){var W=[];for(var V=0;X[V];V++){if(X[V].nodeType===1){W.push(X[V])}}X=W}return X}}T.innerHTML="";if(T.firstChild&&typeof T.firstChild.getAttribute!=="undefined"&&T.firstChild.getAttribute("href")!=="#"){I.attrHandle.href=function(U){return U.getAttribute("href",2)}}})();if(document.querySelectorAll){(function(){var T=F,U=document.createElement("div");U.innerHTML="

";if(U.querySelectorAll&&U.querySelectorAll(".TEST").length===0){return}F=function(Y,X,V,W){X=X||document;if(!W&&X.nodeType===9&&!Q(X)){try{return E(X.querySelectorAll(Y),V)}catch(Z){}}return T(Y,X,V,W)};F.find=T.find;F.filter=T.filter;F.selectors=T.selectors;F.matches=T.matches})()}if(document.getElementsByClassName&&document.documentElement.getElementsByClassName){(function(){var T=document.createElement("div");T.innerHTML="
";if(T.getElementsByClassName("e").length===0){return}T.lastChild.className="e";if(T.getElementsByClassName("e").length===1){return}I.order.splice(1,0,"CLASS");I.find.CLASS=function(U,V,W){if(typeof V.getElementsByClassName!=="undefined"&&!W){return V.getElementsByClassName(U[1])}}})()}function P(U,Z,Y,ad,aa,ac){var ab=U=="previousSibling"&&!ac;for(var W=0,V=ad.length;W0){X=T;break}}}T=T[U]}ad[W]=X}}}var K=document.compareDocumentPosition?function(U,T){return U.compareDocumentPosition(T)&16}:function(U,T){return U!==T&&(U.contains?U.contains(T):true)};var Q=function(T){return T.nodeType===9&&T.documentElement.nodeName!=="HTML"||!!T.ownerDocument&&Q(T.ownerDocument)};var J=function(T,aa){var W=[],X="",Y,V=aa.nodeType?[aa]:aa;while((Y=I.match.PSEUDO.exec(T))){X+=Y[0];T=T.replace(I.match.PSEUDO,"")}T=I.relative[T]?T+"*":T;for(var Z=0,U=V.length;Z0||T.offsetHeight>0};F.selectors.filters.animated=function(T){return o.grep(o.timers,function(U){return T===U.elem}).length};o.multiFilter=function(V,T,U){if(U){V=":not("+V+")"}return F.matches(V,T)};o.dir=function(V,U){var T=[],W=V[U];while(W&&W!=document){if(W.nodeType==1){T.push(W)}W=W[U]}return T};o.nth=function(X,T,V,W){T=T||1;var U=0;for(;X;X=X[V]){if(X.nodeType==1&&++U==T){break}}return X};o.sibling=function(V,U){var T=[];for(;V;V=V.nextSibling){if(V.nodeType==1&&V!=U){T.push(V)}}return T};return;l.Sizzle=F})();o.event={add:function(I,F,H,K){if(I.nodeType==3||I.nodeType==8){return}if(I.setInterval&&I!=l){I=l}if(!H.guid){H.guid=this.guid++}if(K!==g){var G=H;H=this.proxy(G);H.data=K}var E=o.data(I,"events")||o.data(I,"events",{}),J=o.data(I,"handle")||o.data(I,"handle",function(){return typeof o!=="undefined"&&!o.event.triggered?o.event.handle.apply(arguments.callee.elem,arguments):g});J.elem=I;o.each(F.split(/\s+/),function(M,N){var O=N.split(".");N=O.shift();H.type=O.slice().sort().join(".");var L=E[N];if(o.event.specialAll[N]){o.event.specialAll[N].setup.call(I,K,O)}if(!L){L=E[N]={};if(!o.event.special[N]||o.event.special[N].setup.call(I,K,O)===false){if(I.addEventListener){I.addEventListener(N,J,false)}else{if(I.attachEvent){I.attachEvent("on"+N,J)}}}}L[H.guid]=H;o.event.global[N]=true});I=null},guid:1,global:{},remove:function(K,H,J){if(K.nodeType==3||K.nodeType==8){return}var G=o.data(K,"events"),F,E;if(G){if(H===g||(typeof H==="string"&&H.charAt(0)==".")){for(var I in G){this.remove(K,I+(H||""))}}else{if(H.type){J=H.handler;H=H.type}o.each(H.split(/\s+/),function(M,O){var Q=O.split(".");O=Q.shift();var N=RegExp("(^|\\.)"+Q.slice().sort().join(".*\\.")+"(\\.|$)");if(G[O]){if(J){delete G[O][J.guid]}else{for(var P in G[O]){if(N.test(G[O][P].type)){delete G[O][P]}}}if(o.event.specialAll[O]){o.event.specialAll[O].teardown.call(K,Q)}for(F in G[O]){break}if(!F){if(!o.event.special[O]||o.event.special[O].teardown.call(K,Q)===false){if(K.removeEventListener){K.removeEventListener(O,o.data(K,"handle"),false)}else{if(K.detachEvent){K.detachEvent("on"+O,o.data(K,"handle"))}}}F=null;delete G[O]}}})}for(F in G){break}if(!F){var L=o.data(K,"handle");if(L){L.elem=null}o.removeData(K,"events");o.removeData(K,"handle")}}},trigger:function(I,K,H,E){var G=I.type||I;if(!E){I=typeof I==="object"?I[h]?I:o.extend(o.Event(G),I):o.Event(G);if(G.indexOf("!")>=0){I.type=G=G.slice(0,-1);I.exclusive=true}if(!H){I.stopPropagation();if(this.global[G]){o.each(o.cache,function(){if(this.events&&this.events[G]){o.event.trigger(I,K,this.handle.elem)}})}}if(!H||H.nodeType==3||H.nodeType==8){return g}I.result=g;I.target=H;K=o.makeArray(K);K.unshift(I)}I.currentTarget=H;var J=o.data(H,"handle");if(J){J.apply(H,K)}if((!H[G]||(o.nodeName(H,"a")&&G=="click"))&&H["on"+G]&&H["on"+G].apply(H,K)===false){I.result=false}if(!E&&H[G]&&!I.isDefaultPrevented()&&!(o.nodeName(H,"a")&&G=="click")){this.triggered=true;try{H[G]()}catch(L){}}this.triggered=false;if(!I.isPropagationStopped()){var F=H.parentNode||H.ownerDocument;if(F){o.event.trigger(I,K,F,true)}}},handle:function(K){var J,E;K=arguments[0]=o.event.fix(K||l.event);K.currentTarget=this;var L=K.type.split(".");K.type=L.shift();J=!L.length&&!K.exclusive;var I=RegExp("(^|\\.)"+L.slice().sort().join(".*\\.")+"(\\.|$)");E=(o.data(this,"events")||{})[K.type];for(var G in E){var H=E[G];if(J||I.test(H.type)){K.handler=H;K.data=H.data;var F=H.apply(this,arguments);if(F!==g){K.result=F;if(F===false){K.preventDefault();K.stopPropagation()}}if(K.isImmediatePropagationStopped()){break}}}},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode metaKey newValue originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(H){if(H[h]){return H}var F=H;H=o.Event(F);for(var G=this.props.length,J;G;){J=this.props[--G];H[J]=F[J]}if(!H.target){H.target=H.srcElement||document}if(H.target.nodeType==3){H.target=H.target.parentNode}if(!H.relatedTarget&&H.fromElement){H.relatedTarget=H.fromElement==H.target?H.toElement:H.fromElement}if(H.pageX==null&&H.clientX!=null){var I=document.documentElement,E=document.body;H.pageX=H.clientX+(I&&I.scrollLeft||E&&E.scrollLeft||0)-(I.clientLeft||0);H.pageY=H.clientY+(I&&I.scrollTop||E&&E.scrollTop||0)-(I.clientTop||0)}if(!H.which&&((H.charCode||H.charCode===0)?H.charCode:H.keyCode)){H.which=H.charCode||H.keyCode}if(!H.metaKey&&H.ctrlKey){H.metaKey=H.ctrlKey}if(!H.which&&H.button){H.which=(H.button&1?1:(H.button&2?3:(H.button&4?2:0)))}return H},proxy:function(F,E){E=E||function(){return F.apply(this,arguments)};E.guid=F.guid=F.guid||E.guid||this.guid++;return E},special:{ready:{setup:B,teardown:function(){}}},specialAll:{live:{setup:function(E,F){o.event.add(this,F[0],c)},teardown:function(G){if(G.length){var E=0,F=RegExp("(^|\\.)"+G[0]+"(\\.|$)");o.each((o.data(this,"events").live||{}),function(){if(F.test(this.type)){E++}});if(E<1){o.event.remove(this,G[0],c)}}}}}};o.Event=function(E){if(!this.preventDefault){return new o.Event(E)}if(E&&E.type){this.originalEvent=E;this.type=E.type}else{this.type=E}this.timeStamp=e();this[h]=true};function k(){return false}function u(){return true}o.Event.prototype={preventDefault:function(){this.isDefaultPrevented=u;var E=this.originalEvent;if(!E){return}if(E.preventDefault){E.preventDefault()}E.returnValue=false},stopPropagation:function(){this.isPropagationStopped=u;var E=this.originalEvent;if(!E){return}if(E.stopPropagation){E.stopPropagation()}E.cancelBubble=true},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=u;this.stopPropagation()},isDefaultPrevented:k,isPropagationStopped:k,isImmediatePropagationStopped:k};var a=function(F){var E=F.relatedTarget;while(E&&E!=this){try{E=E.parentNode}catch(G){E=this}}if(E!=this){F.type=F.data;o.event.handle.apply(this,arguments)}};o.each({mouseover:"mouseenter",mouseout:"mouseleave"},function(F,E){o.event.special[E]={setup:function(){o.event.add(this,F,a,E)},teardown:function(){o.event.remove(this,F,a)}}});o.fn.extend({bind:function(F,G,E){return F=="unload"?this.one(F,G,E):this.each(function(){o.event.add(this,F,E||G,E&&G)})},one:function(G,H,F){var E=o.event.proxy(F||H,function(I){o(this).unbind(I,E);return(F||H).apply(this,arguments)});return this.each(function(){o.event.add(this,G,E,F&&H)})},unbind:function(F,E){return this.each(function(){o.event.remove(this,F,E)})},trigger:function(E,F){return this.each(function(){o.event.trigger(E,F,this)})},triggerHandler:function(E,G){if(this[0]){var F=o.Event(E);F.preventDefault();F.stopPropagation();o.event.trigger(F,G,this[0]);return F.result}},toggle:function(G){var E=arguments,F=1;while(F=0){var E=G.slice(I,G.length);G=G.slice(0,I)}var H="GET";if(J){if(o.isFunction(J)){K=J;J=null}else{if(typeof J==="object"){J=o.param(J);H="POST"}}}var F=this;o.ajax({url:G,type:H,dataType:"html",data:J,complete:function(M,L){if(L=="success"||L=="notmodified"){F.html(E?o("
").append(M.responseText.replace(//g,"")).find(E):M.responseText)}if(K){F.each(K,[M.responseText,L,M])}}});return this},serialize:function(){return o.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?o.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||/select|textarea/i.test(this.nodeName)||/text|hidden|password|search/i.test(this.type))}).map(function(E,F){var G=o(this).val();return G==null?null:o.isArray(G)?o.map(G,function(I,H){return{name:F.name,value:I}}):{name:F.name,value:G}}).get()}});o.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(E,F){o.fn[F]=function(G){return this.bind(F,G)}});var r=e();o.extend({get:function(E,G,H,F){if(o.isFunction(G)){H=G;G=null}return o.ajax({type:"GET",url:E,data:G,success:H,dataType:F})},getScript:function(E,F){return o.get(E,null,F,"script")},getJSON:function(E,F,G){return o.get(E,F,G,"json")},post:function(E,G,H,F){if(o.isFunction(G)){H=G;G={}}return o.ajax({type:"POST",url:E,data:G,success:H,dataType:F})},ajaxSetup:function(E){o.extend(o.ajaxSettings,E)},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:function(){return l.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest()},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},ajax:function(M){M=o.extend(true,M,o.extend(true,{},o.ajaxSettings,M));var W,F=/=\?(&|$)/g,R,V,G=M.type.toUpperCase();if(M.data&&M.processData&&typeof M.data!=="string"){M.data=o.param(M.data)}if(M.dataType=="jsonp"){if(G=="GET"){if(!M.url.match(F)){M.url+=(M.url.match(/\?/)?"&":"?")+(M.jsonp||"callback")+"=?"}}else{if(!M.data||!M.data.match(F)){M.data=(M.data?M.data+"&":"")+(M.jsonp||"callback")+"=?"}}M.dataType="json"}if(M.dataType=="json"&&(M.data&&M.data.match(F)||M.url.match(F))){W="jsonp"+r++;if(M.data){M.data=(M.data+"").replace(F,"="+W+"$1")}M.url=M.url.replace(F,"="+W+"$1");M.dataType="script";l[W]=function(X){V=X;I();L();l[W]=g;try{delete l[W]}catch(Y){}if(H){H.removeChild(T)}}}if(M.dataType=="script"&&M.cache==null){M.cache=false}if(M.cache===false&&G=="GET"){var E=e();var U=M.url.replace(/(\?|&)_=.*?(&|$)/,"$1_="+E+"$2");M.url=U+((U==M.url)?(M.url.match(/\?/)?"&":"?")+"_="+E:"")}if(M.data&&G=="GET"){M.url+=(M.url.match(/\?/)?"&":"?")+M.data;M.data=null}if(M.global&&!o.active++){o.event.trigger("ajaxStart")}var Q=/^(\w+:)?\/\/([^\/?#]+)/.exec(M.url);if(M.dataType=="script"&&G=="GET"&&Q&&(Q[1]&&Q[1]!=location.protocol||Q[2]!=location.host)){var H=document.getElementsByTagName("head")[0];var T=document.createElement("script");T.src=M.url;if(M.scriptCharset){T.charset=M.scriptCharset}if(!W){var O=false;T.onload=T.onreadystatechange=function(){if(!O&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){O=true;I();L();T.onload=T.onreadystatechange=null;H.removeChild(T)}}}H.appendChild(T);return g}var K=false;var J=M.xhr();if(M.username){J.open(G,M.url,M.async,M.username,M.password)}else{J.open(G,M.url,M.async)}try{if(M.data){J.setRequestHeader("Content-Type",M.contentType)}if(M.ifModified){J.setRequestHeader("If-Modified-Since",o.lastModified[M.url]||"Thu, 01 Jan 1970 00:00:00 GMT")}J.setRequestHeader("X-Requested-With","XMLHttpRequest");J.setRequestHeader("Accept",M.dataType&&M.accepts[M.dataType]?M.accepts[M.dataType]+", */*":M.accepts._default)}catch(S){}if(M.beforeSend&&M.beforeSend(J,M)===false){if(M.global&&!--o.active){o.event.trigger("ajaxStop")}J.abort();return false}if(M.global){o.event.trigger("ajaxSend",[J,M])}var N=function(X){if(J.readyState==0){if(P){clearInterval(P);P=null;if(M.global&&!--o.active){o.event.trigger("ajaxStop")}}}else{if(!K&&J&&(J.readyState==4||X=="timeout")){K=true;if(P){clearInterval(P);P=null}R=X=="timeout"?"timeout":!o.httpSuccess(J)?"error":M.ifModified&&o.httpNotModified(J,M.url)?"notmodified":"success";if(R=="success"){try{V=o.httpData(J,M.dataType,M)}catch(Z){R="parsererror"}}if(R=="success"){var Y;try{Y=J.getResponseHeader("Last-Modified")}catch(Z){}if(M.ifModified&&Y){o.lastModified[M.url]=Y}if(!W){I()}}else{o.handleError(M,J,R)}L();if(X){J.abort()}if(M.async){J=null}}}};if(M.async){var P=setInterval(N,13);if(M.timeout>0){setTimeout(function(){if(J&&!K){N("timeout")}},M.timeout)}}try{J.send(M.data)}catch(S){o.handleError(M,J,null,S)}if(!M.async){N()}function I(){if(M.success){M.success(V,R)}if(M.global){o.event.trigger("ajaxSuccess",[J,M])}}function L(){if(M.complete){M.complete(J,R)}if(M.global){o.event.trigger("ajaxComplete",[J,M])}if(M.global&&!--o.active){o.event.trigger("ajaxStop")}}return J},handleError:function(F,H,E,G){if(F.error){F.error(H,E,G)}if(F.global){o.event.trigger("ajaxError",[H,F,G])}},active:0,httpSuccess:function(F){try{return !F.status&&location.protocol=="file:"||(F.status>=200&&F.status<300)||F.status==304||F.status==1223}catch(E){}return false},httpNotModified:function(G,E){try{var H=G.getResponseHeader("Last-Modified");return G.status==304||H==o.lastModified[E]}catch(F){}return false},httpData:function(J,H,G){var F=J.getResponseHeader("content-type"),E=H=="xml"||!H&&F&&F.indexOf("xml")>=0,I=E?J.responseXML:J.responseText;if(E&&I.documentElement.tagName=="parsererror"){throw"parsererror"}if(G&&G.dataFilter){I=G.dataFilter(I,H)}if(typeof I==="string"){if(H=="script"){o.globalEval(I)}if(H=="json"){I=l["eval"]("("+I+")")}}return I},param:function(E){var G=[];function H(I,J){G[G.length]=encodeURIComponent(I)+"="+encodeURIComponent(J)}if(o.isArray(E)||E.jquery){o.each(E,function(){H(this.name,this.value)})}else{for(var F in E){if(o.isArray(E[F])){o.each(E[F],function(){H(F,this)})}else{H(F,o.isFunction(E[F])?E[F]():E[F])}}}return G.join("&").replace(/%20/g,"+")}});var m={},n,d=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];function t(F,E){var G={};o.each(d.concat.apply([],d.slice(0,E)),function(){G[this]=F});return G}o.fn.extend({show:function(J,L){if(J){return this.animate(t("show",3),J,L)}else{for(var H=0,F=this.length;H").appendTo("body");K=I.css("display");if(K==="none"){K="block"}I.remove();m[G]=K}o.data(this[H],"olddisplay",K)}}for(var H=0,F=this.length;H=0;H--){if(G[H].elem==this){if(E){G[H](true)}G.splice(H,1)}}});if(!E){this.dequeue()}return this}});o.each({slideDown:t("show",1),slideUp:t("hide",1),slideToggle:t("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(E,F){o.fn[E]=function(G,H){return this.animate(F,G,H)}});o.extend({speed:function(G,H,F){var E=typeof G==="object"?G:{complete:F||!F&&H||o.isFunction(G)&&G,duration:G,easing:F&&H||H&&!o.isFunction(H)&&H};E.duration=o.fx.off?0:typeof E.duration==="number"?E.duration:o.fx.speeds[E.duration]||o.fx.speeds._default;E.old=E.complete;E.complete=function(){if(E.queue!==false){o(this).dequeue()}if(o.isFunction(E.old)){E.old.call(this)}};return E},easing:{linear:function(G,H,E,F){return E+F*G},swing:function(G,H,E,F){return((-Math.cos(G*Math.PI)/2)+0.5)*F+E}},timers:[],fx:function(F,E,G){this.options=E;this.elem=F;this.prop=G;if(!E.orig){E.orig={}}}});o.fx.prototype={update:function(){if(this.options.step){this.options.step.call(this.elem,this.now,this)}(o.fx.step[this.prop]||o.fx.step._default)(this);if((this.prop=="height"||this.prop=="width")&&this.elem.style){this.elem.style.display="block"}},cur:function(F){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null)){return this.elem[this.prop]}var E=parseFloat(o.css(this.elem,this.prop,F));return E&&E>-10000?E:parseFloat(o.curCSS(this.elem,this.prop))||0},custom:function(I,H,G){this.startTime=e();this.start=I;this.end=H;this.unit=G||this.unit||"px";this.now=this.start;this.pos=this.state=0;var E=this;function F(J){return E.step(J)}F.elem=this.elem;if(F()&&o.timers.push(F)&&!n){n=setInterval(function(){var K=o.timers;for(var J=0;J=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var E=true;for(var F in this.options.curAnim){if(this.options.curAnim[F]!==true){E=false}}if(E){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;this.elem.style.display=this.options.display;if(o.css(this.elem,"display")=="none"){this.elem.style.display="block"}}if(this.options.hide){o(this.elem).hide()}if(this.options.hide||this.options.show){for(var I in this.options.curAnim){o.attr(this.elem.style,I,this.options.orig[I])}}this.options.complete.call(this.elem)}return false}else{var J=G-this.startTime;this.state=J/this.options.duration;this.pos=o.easing[this.options.easing||(o.easing.swing?"swing":"linear")](this.state,J,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update()}return true}};o.extend(o.fx,{speeds:{slow:600,fast:200,_default:400},step:{opacity:function(E){o.attr(E.elem.style,"opacity",E.now)},_default:function(E){if(E.elem.style&&E.elem.style[E.prop]!=null){E.elem.style[E.prop]=E.now+E.unit}else{E.elem[E.prop]=E.now}}}});if(document.documentElement.getBoundingClientRect){o.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return o.offset.bodyOffset(this[0])}var G=this[0].getBoundingClientRect(),J=this[0].ownerDocument,F=J.body,E=J.documentElement,L=E.clientTop||F.clientTop||0,K=E.clientLeft||F.clientLeft||0,I=G.top+(self.pageYOffset||o.boxModel&&E.scrollTop||F.scrollTop)-L,H=G.left+(self.pageXOffset||o.boxModel&&E.scrollLeft||F.scrollLeft)-K;return{top:I,left:H}}}else{o.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return o.offset.bodyOffset(this[0])}o.offset.initialized||o.offset.initialize();var J=this[0],G=J.offsetParent,F=J,O=J.ownerDocument,M,H=O.documentElement,K=O.body,L=O.defaultView,E=L.getComputedStyle(J,null),N=J.offsetTop,I=J.offsetLeft;while((J=J.parentNode)&&J!==K&&J!==H){M=L.getComputedStyle(J,null);N-=J.scrollTop,I-=J.scrollLeft;if(J===G){N+=J.offsetTop,I+=J.offsetLeft;if(o.offset.doesNotAddBorder&&!(o.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(J.tagName))){N+=parseInt(M.borderTopWidth,10)||0,I+=parseInt(M.borderLeftWidth,10)||0}F=G,G=J.offsetParent}if(o.offset.subtractsBorderForOverflowNotVisible&&M.overflow!=="visible"){N+=parseInt(M.borderTopWidth,10)||0,I+=parseInt(M.borderLeftWidth,10)||0}E=M}if(E.position==="relative"||E.position==="static"){N+=K.offsetTop,I+=K.offsetLeft}if(E.position==="fixed"){N+=Math.max(H.scrollTop,K.scrollTop),I+=Math.max(H.scrollLeft,K.scrollLeft)}return{top:N,left:I}}}o.offset={initialize:function(){if(this.initialized){return}var L=document.body,F=document.createElement("div"),H,G,N,I,M,E,J=L.style.marginTop,K='
';M={position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"};for(E in M){F.style[E]=M[E]}F.innerHTML=K;L.insertBefore(F,L.firstChild);H=F.firstChild,G=H.firstChild,I=H.nextSibling.firstChild.firstChild;this.doesNotAddBorder=(G.offsetTop!==5);this.doesAddBorderForTableAndCells=(I.offsetTop===5);H.style.overflow="hidden",H.style.position="relative";this.subtractsBorderForOverflowNotVisible=(G.offsetTop===-5);L.style.marginTop="1px";this.doesNotIncludeMarginInBodyOffset=(L.offsetTop===0);L.style.marginTop=J;L.removeChild(F);this.initialized=true},bodyOffset:function(E){o.offset.initialized||o.offset.initialize();var G=E.offsetTop,F=E.offsetLeft;if(o.offset.doesNotIncludeMarginInBodyOffset){G+=parseInt(o.curCSS(E,"marginTop",true),10)||0,F+=parseInt(o.curCSS(E,"marginLeft",true),10)||0}return{top:G,left:F}}};o.fn.extend({position:function(){var I=0,H=0,F;if(this[0]){var G=this.offsetParent(),J=this.offset(),E=/^body|html$/i.test(G[0].tagName)?{top:0,left:0}:G.offset();J.top-=j(this,"marginTop");J.left-=j(this,"marginLeft");E.top+=j(G,"borderTopWidth");E.left+=j(G,"borderLeftWidth");F={top:J.top-E.top,left:J.left-E.left}}return F},offsetParent:function(){var E=this[0].offsetParent||document.body;while(E&&(!/^body|html$/i.test(E.tagName)&&o.css(E,"position")=="static")){E=E.offsetParent}return o(E)}});o.each(["Left","Top"],function(F,E){var G="scroll"+E;o.fn[G]=function(H){if(!this[0]){return null}return H!==g?this.each(function(){this==l||this==document?l.scrollTo(!F?H:o(l).scrollLeft(),F?H:o(l).scrollTop()):this[G]=H}):this[0]==l||this[0]==document?self[F?"pageYOffset":"pageXOffset"]||o.boxModel&&document.documentElement[G]||document.body[G]:this[0][G]}});o.each(["Height","Width"],function(I,G){var E=I?"Left":"Top",H=I?"Right":"Bottom",F=G.toLowerCase();o.fn["inner"+G]=function(){return this[0]?o.css(this[0],F,false,"padding"):null};o.fn["outer"+G]=function(K){return this[0]?o.css(this[0],F,false,K?"margin":"border"):null};var J=G.toLowerCase();o.fn[J]=function(K){return this[0]==l?document.compatMode=="CSS1Compat"&&document.documentElement["client"+G]||document.body["client"+G]:this[0]==document?Math.max(document.documentElement["client"+G],document.body["scroll"+G],document.documentElement["scroll"+G],document.body["offset"+G],document.documentElement["offset"+G]):K===g?(this.length?o.css(this[0],J):null):this.css(J,typeof K==="string"?K:K+"px")}})})(); \ No newline at end of file diff --git a/doc/code/js/jquery-effect.js b/doc/code/js/jquery-effect.js new file mode 100755 index 00000000..5b25307c --- /dev/null +++ b/doc/code/js/jquery-effect.js @@ -0,0 +1,593 @@ +/* + * jQuery UI Effects 1.6rc6 + * + * Copyright (c) 2009 AUTHORS.txt (http://ui.jquery.com/about) + * Dual licensed under the MIT (MIT-LICENSE.txt) + * and GPL (GPL-LICENSE.txt) licenses. + * + * http://docs.jquery.com/UI/Effects/ + */ +;(function($) { + +$.effects = $.effects || {}; //Add the 'effects' scope + +$.extend($.effects, { + version: "1.6rc6", + + // Saves a set of properties in a data storage + save: function(element, set) { + for(var i=0; i < set.length; i++) { + if(set[i] !== null) element.data("ec.storage."+set[i], element[0].style[set[i]]); + } + }, + + // Restores a set of previously saved properties from a data storage + restore: function(element, set) { + for(var i=0; i < set.length; i++) { + if(set[i] !== null) element.css(set[i], element.data("ec.storage."+set[i])); + } + }, + + setMode: function(el, mode) { + if (mode == 'toggle') mode = el.is(':hidden') ? 'show' : 'hide'; // Set for toggle + return mode; + }, + + getBaseline: function(origin, original) { // Translates a [top,left] array into a baseline value + // this should be a little more flexible in the future to handle a string & hash + var y, x; + switch (origin[0]) { + case 'top': y = 0; break; + case 'middle': y = 0.5; break; + case 'bottom': y = 1; break; + default: y = origin[0] / original.height; + }; + switch (origin[1]) { + case 'left': x = 0; break; + case 'center': x = 0.5; break; + case 'right': x = 1; break; + default: x = origin[1] / original.width; + }; + return {x: x, y: y}; + }, + + // Wraps the element around a wrapper that copies position properties + createWrapper: function(element) { + + //if the element is already wrapped, return it + if (element.parent().is('.ui-effects-wrapper')) + return element.parent(); + + //Cache width,height and float properties of the element, and create a wrapper around it + var props = { width: element.outerWidth(true), height: element.outerHeight(true), 'float': element.css('float') }; + element.wrap('
'); + var wrapper = element.parent(); + + //Transfer the positioning of the element to the wrapper + if (element.css('position') == 'static') { + wrapper.css({ position: 'relative' }); + element.css({ position: 'relative'} ); + } else { + var top = element.css('top'); if(isNaN(parseInt(top,10))) top = 'auto'; + var left = element.css('left'); if(isNaN(parseInt(left,10))) left = 'auto'; + wrapper.css({ position: element.css('position'), top: top, left: left, zIndex: element.css('z-index') }).show(); + element.css({position: 'relative', top: 0, left: 0 }); + } + + wrapper.css(props); + return wrapper; + }, + + removeWrapper: function(element) { + if (element.parent().is('.ui-effects-wrapper')) + return element.parent().replaceWith(element); + return element; + }, + + setTransition: function(element, list, factor, value) { + value = value || {}; + $.each(list, function(i, x){ + unit = element.cssUnit(x); + if (unit[0] > 0) value[x] = unit[0] * factor + unit[1]; + }); + return value; + }, + + //Base function to animate from one class to another in a seamless transition + animateClass: function(value, duration, easing, callback) { + + var cb = (typeof easing == "function" ? easing : (callback ? callback : null)); + var ea = (typeof easing == "string" ? easing : null); + + return this.each(function() { + + var offset = {}; var that = $(this); var oldStyleAttr = that.attr("style") || ''; + if(typeof oldStyleAttr == 'object') oldStyleAttr = oldStyleAttr["cssText"]; /* Stupidly in IE, style is a object.. */ + if(value.toggle) { that.hasClass(value.toggle) ? value.remove = value.toggle : value.add = value.toggle; } + + //Let's get a style offset + var oldStyle = $.extend({}, (document.defaultView ? document.defaultView.getComputedStyle(this,null) : this.currentStyle)); + if(value.add) that.addClass(value.add); if(value.remove) that.removeClass(value.remove); + var newStyle = $.extend({}, (document.defaultView ? document.defaultView.getComputedStyle(this,null) : this.currentStyle)); + if(value.add) that.removeClass(value.add); if(value.remove) that.addClass(value.remove); + + // The main function to form the object for animation + for(var n in newStyle) { + if( typeof newStyle[n] != "function" && newStyle[n] /* No functions and null properties */ + && n.indexOf("Moz") == -1 && n.indexOf("length") == -1 /* No mozilla spezific render properties. */ + && newStyle[n] != oldStyle[n] /* Only values that have changed are used for the animation */ + && (n.match(/color/i) || (!n.match(/color/i) && !isNaN(parseInt(newStyle[n],10)))) /* Only things that can be parsed to integers or colors */ + && (oldStyle.position != "static" || (oldStyle.position == "static" && !n.match(/left|top|bottom|right/))) /* No need for positions when dealing with static positions */ + ) offset[n] = newStyle[n]; + } + + that.animate(offset, duration, ea, function() { // Animate the newly constructed offset object + // Change style attribute back to original. For stupid IE, we need to clear the damn object. + if(typeof $(this).attr("style") == 'object') { $(this).attr("style")["cssText"] = ""; $(this).attr("style")["cssText"] = oldStyleAttr; } else $(this).attr("style", oldStyleAttr); + if(value.add) $(this).addClass(value.add); if(value.remove) $(this).removeClass(value.remove); + if(cb) cb.apply(this, arguments); + }); + + }); + } +}); + + +function _normalizeArguments(a, m) { + + var o = a[1] && a[1].constructor == Object ? a[1] : {}; if(m) o.mode = m; + var speed = a[1] && a[1].constructor != Object ? a[1] : o.duration; //either comes from options.duration or the second argument + speed = $.fx.off ? 0 : typeof speed === "number" ? speed : $.fx.speeds[speed] || $.fx.speeds._default; + var callback = o.callback || ( $.isFunction(a[2]) && a[2] ) || ( $.isFunction(a[3]) && a[3] ); + + return [a[0], o, speed, callback]; + +} + +//Extend the methods of jQuery +$.fn.extend({ + + //Save old methods + _show: $.fn.show, + _hide: $.fn.hide, + __toggle: $.fn.toggle, + _addClass: $.fn.addClass, + _removeClass: $.fn.removeClass, + _toggleClass: $.fn.toggleClass, + + // New effect methods + effect: function(fx, options, speed, callback) { + return $.effects[fx] ? $.effects[fx].call(this, {method: fx, options: options || {}, duration: speed, callback: callback }) : null; + }, + + show: function() { + if(!arguments[0] || (arguments[0].constructor == Number || (/(slow|normal|fast)/).test(arguments[0]))) + return this._show.apply(this, arguments); + else { + return this.effect.apply(this, _normalizeArguments(arguments, 'show')); + } + }, + + hide: function() { + if(!arguments[0] || (arguments[0].constructor == Number || (/(slow|normal|fast)/).test(arguments[0]))) + return this._hide.apply(this, arguments); + else { + return this.effect.apply(this, _normalizeArguments(arguments, 'hide')); + } + }, + + toggle: function(){ + if(!arguments[0] || (arguments[0].constructor == Number || (/(slow|normal|fast)/).test(arguments[0])) || (arguments[0].constructor == Function)) + return this.__toggle.apply(this, arguments); + else { + return this.effect.apply(this, _normalizeArguments(arguments, 'toggle')); + } + }, + + addClass: function(classNames, speed, easing, callback) { + return speed ? $.effects.animateClass.apply(this, [{ add: classNames },speed,easing,callback]) : this._addClass(classNames); + }, + removeClass: function(classNames,speed,easing,callback) { + return speed ? $.effects.animateClass.apply(this, [{ remove: classNames },speed,easing,callback]) : this._removeClass(classNames); + }, + toggleClass: function(classNames,speed,easing,callback) { + return ( (typeof speed !== "boolean") && speed ) ? $.effects.animateClass.apply(this, [{ toggle: classNames },speed,easing,callback]) : this._toggleClass(classNames, speed); + }, + morph: function(remove,add,speed,easing,callback) { + return $.effects.animateClass.apply(this, [{ add: add, remove: remove },speed,easing,callback]); + }, + switchClass: function() { + return this.morph.apply(this, arguments); + }, + + // helper functions + cssUnit: function(key) { + var style = this.css(key), val = []; + $.each( ['em','px','%','pt'], function(i, unit){ + if(style.indexOf(unit) > 0) + val = [parseFloat(style), unit]; + }); + return val; + } +}); + +/* + * jQuery Color Animations + * Copyright 2007 John Resig + * Released under the MIT and GPL licenses. + */ + +// We override the animation for all of these color styles +$.each(['backgroundColor', 'borderBottomColor', 'borderLeftColor', 'borderRightColor', 'borderTopColor', 'color', 'outlineColor'], function(i,attr){ + $.fx.step[attr] = function(fx) { + if ( fx.state == 0 ) { + fx.start = getColor( fx.elem, attr ); + fx.end = getRGB( fx.end ); + } + + fx.elem.style[attr] = "rgb(" + [ + Math.max(Math.min( parseInt((fx.pos * (fx.end[0] - fx.start[0])) + fx.start[0],10), 255), 0), + Math.max(Math.min( parseInt((fx.pos * (fx.end[1] - fx.start[1])) + fx.start[1],10), 255), 0), + Math.max(Math.min( parseInt((fx.pos * (fx.end[2] - fx.start[2])) + fx.start[2],10), 255), 0) + ].join(",") + ")"; + }; +}); + +// Color Conversion functions from highlightFade +// By Blair Mitchelmore +// http://jquery.offput.ca/highlightFade/ + +// Parse strings looking for color tuples [255,255,255] +function getRGB(color) { + var result; + + // Check if we're already dealing with an array of colors + if ( color && color.constructor == Array && color.length == 3 ) + return color; + + // Look for rgb(num,num,num) + if (result = /rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(color)) + return [parseInt(result[1],10), parseInt(result[2],10), parseInt(result[3],10)]; + + // Look for rgb(num%,num%,num%) + if (result = /rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(color)) + return [parseFloat(result[1])*2.55, parseFloat(result[2])*2.55, parseFloat(result[3])*2.55]; + + // Look for #a0b1c2 + if (result = /#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(color)) + return [parseInt(result[1],16), parseInt(result[2],16), parseInt(result[3],16)]; + + // Look for #fff + if (result = /#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(color)) + return [parseInt(result[1]+result[1],16), parseInt(result[2]+result[2],16), parseInt(result[3]+result[3],16)]; + + // Look for rgba(0, 0, 0, 0) == transparent in Safari 3 + if (result = /rgba\(0, 0, 0, 0\)/.exec(color)) + return colors['transparent']; + + // Otherwise, we're most likely dealing with a named color + return colors[$.trim(color).toLowerCase()]; +} + +function getColor(elem, attr) { + var color; + + do { + color = $.curCSS(elem, attr); + + // Keep going until we find an element that has color, or we hit the body + if ( color != '' && color != 'transparent' || $.nodeName(elem, "body") ) + break; + + attr = "backgroundColor"; + } while ( elem = elem.parentNode ); + + return getRGB(color); +}; + +// Some named colors to work with +// From Interface by Stefan Petre +// http://interface.eyecon.ro/ + +var colors = { + aqua:[0,255,255], + azure:[240,255,255], + beige:[245,245,220], + black:[0,0,0], + blue:[0,0,255], + brown:[165,42,42], + cyan:[0,255,255], + darkblue:[0,0,139], + darkcyan:[0,139,139], + darkgrey:[169,169,169], + darkgreen:[0,100,0], + darkkhaki:[189,183,107], + darkmagenta:[139,0,139], + darkolivegreen:[85,107,47], + darkorange:[255,140,0], + darkorchid:[153,50,204], + darkred:[139,0,0], + darksalmon:[233,150,122], + darkviolet:[148,0,211], + fuchsia:[255,0,255], + gold:[255,215,0], + green:[0,128,0], + indigo:[75,0,130], + khaki:[240,230,140], + lightblue:[173,216,230], + lightcyan:[224,255,255], + lightgreen:[144,238,144], + lightgrey:[211,211,211], + lightpink:[255,182,193], + lightyellow:[255,255,224], + lime:[0,255,0], + magenta:[255,0,255], + maroon:[128,0,0], + navy:[0,0,128], + olive:[128,128,0], + orange:[255,165,0], + pink:[255,192,203], + purple:[128,0,128], + violet:[128,0,128], + red:[255,0,0], + silver:[192,192,192], + white:[255,255,255], + yellow:[255,255,0], + transparent: [255,255,255] +}; + +/* + * jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/ + * + * Uses the built in easing capabilities added In jQuery 1.1 + * to offer multiple easing options + * + * TERMS OF USE - jQuery Easing + * + * Open source under the BSD License. + * + * Copyright 2008 George McGinley Smith + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * Neither the name of the author nor the names of contributors may be used to endorse + * or promote products derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE + * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + * OF THE POSSIBILITY OF SUCH DAMAGE. + * +*/ + +// t: current time, b: begInnIng value, c: change In value, d: duration +$.easing.jswing = $.easing.swing; + +$.extend($.easing, +{ + def: 'easeOutQuad', + swing: function (x, t, b, c, d) { + //alert($.easing.default); + return $.easing[$.easing.def](x, t, b, c, d); + }, + easeInQuad: function (x, t, b, c, d) { + return c*(t/=d)*t + b; + }, + easeOutQuad: function (x, t, b, c, d) { + return -c *(t/=d)*(t-2) + b; + }, + easeInOutQuad: function (x, t, b, c, d) { + if ((t/=d/2) < 1) return c/2*t*t + b; + return -c/2 * ((--t)*(t-2) - 1) + b; + }, + easeInCubic: function (x, t, b, c, d) { + return c*(t/=d)*t*t + b; + }, + easeOutCubic: function (x, t, b, c, d) { + return c*((t=t/d-1)*t*t + 1) + b; + }, + easeInOutCubic: function (x, t, b, c, d) { + if ((t/=d/2) < 1) return c/2*t*t*t + b; + return c/2*((t-=2)*t*t + 2) + b; + }, + easeInQuart: function (x, t, b, c, d) { + return c*(t/=d)*t*t*t + b; + }, + easeOutQuart: function (x, t, b, c, d) { + return -c * ((t=t/d-1)*t*t*t - 1) + b; + }, + easeInOutQuart: function (x, t, b, c, d) { + if ((t/=d/2) < 1) return c/2*t*t*t*t + b; + return -c/2 * ((t-=2)*t*t*t - 2) + b; + }, + easeInQuint: function (x, t, b, c, d) { + return c*(t/=d)*t*t*t*t + b; + }, + easeOutQuint: function (x, t, b, c, d) { + return c*((t=t/d-1)*t*t*t*t + 1) + b; + }, + easeInOutQuint: function (x, t, b, c, d) { + if ((t/=d/2) < 1) return c/2*t*t*t*t*t + b; + return c/2*((t-=2)*t*t*t*t + 2) + b; + }, + easeInSine: function (x, t, b, c, d) { + return -c * Math.cos(t/d * (Math.PI/2)) + c + b; + }, + easeOutSine: function (x, t, b, c, d) { + return c * Math.sin(t/d * (Math.PI/2)) + b; + }, + easeInOutSine: function (x, t, b, c, d) { + return -c/2 * (Math.cos(Math.PI*t/d) - 1) + b; + }, + easeInExpo: function (x, t, b, c, d) { + return (t==0) ? b : c * Math.pow(2, 10 * (t/d - 1)) + b; + }, + easeOutExpo: function (x, t, b, c, d) { + return (t==d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b; + }, + easeInOutExpo: function (x, t, b, c, d) { + if (t==0) return b; + if (t==d) return b+c; + if ((t/=d/2) < 1) return c/2 * Math.pow(2, 10 * (t - 1)) + b; + return c/2 * (-Math.pow(2, -10 * --t) + 2) + b; + }, + easeInCirc: function (x, t, b, c, d) { + return -c * (Math.sqrt(1 - (t/=d)*t) - 1) + b; + }, + easeOutCirc: function (x, t, b, c, d) { + return c * Math.sqrt(1 - (t=t/d-1)*t) + b; + }, + easeInOutCirc: function (x, t, b, c, d) { + if ((t/=d/2) < 1) return -c/2 * (Math.sqrt(1 - t*t) - 1) + b; + return c/2 * (Math.sqrt(1 - (t-=2)*t) + 1) + b; + }, + easeInElastic: function (x, t, b, c, d) { + var s=1.70158;var p=0;var a=c; + if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3; + if (a < Math.abs(c)) { a=c; var s=p/4; } + else var s = p/(2*Math.PI) * Math.asin (c/a); + return -(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b; + }, + easeOutElastic: function (x, t, b, c, d) { + var s=1.70158;var p=0;var a=c; + if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3; + if (a < Math.abs(c)) { a=c; var s=p/4; } + else var s = p/(2*Math.PI) * Math.asin (c/a); + return a*Math.pow(2,-10*t) * Math.sin( (t*d-s)*(2*Math.PI)/p ) + c + b; + }, + easeInOutElastic: function (x, t, b, c, d) { + var s=1.70158;var p=0;var a=c; + if (t==0) return b; if ((t/=d/2)==2) return b+c; if (!p) p=d*(.3*1.5); + if (a < Math.abs(c)) { a=c; var s=p/4; } + else var s = p/(2*Math.PI) * Math.asin (c/a); + if (t < 1) return -.5*(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b; + return a*Math.pow(2,-10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )*.5 + c + b; + }, + easeInBack: function (x, t, b, c, d, s) { + if (s == undefined) s = 1.70158; + return c*(t/=d)*t*((s+1)*t - s) + b; + }, + easeOutBack: function (x, t, b, c, d, s) { + if (s == undefined) s = 1.70158; + return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b; + }, + easeInOutBack: function (x, t, b, c, d, s) { + if (s == undefined) s = 1.70158; + if ((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b; + return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b; + }, + easeInBounce: function (x, t, b, c, d) { + return c - $.easing.easeOutBounce (x, d-t, 0, c, d) + b; + }, + easeOutBounce: function (x, t, b, c, d) { + if ((t/=d) < (1/2.75)) { + return c*(7.5625*t*t) + b; + } else if (t < (2/2.75)) { + return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b; + } else if (t < (2.5/2.75)) { + return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b; + } else { + return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b; + } + }, + easeInOutBounce: function (x, t, b, c, d) { + if (t < d/2) return $.easing.easeInBounce (x, t*2, 0, c, d) * .5 + b; + return $.easing.easeOutBounce (x, t*2-d, 0, c, d) * .5 + c*.5 + b; + } +}); +/* + * + * TERMS OF USE - EASING EQUATIONS + * + * Open source under the BSD License. + * + * Copyright 2001 Robert Penner + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * Neither the name of the author nor the names of contributors may be used to endorse + * or promote products derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE + * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + * OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +})(jQuery); + +/* + * jQuery UI Effects Highlight 1.6rc6 + * + * Copyright (c) 2009 AUTHORS.txt (http://ui.jquery.com/about) + * Dual licensed under the MIT (MIT-LICENSE.txt) + * and GPL (GPL-LICENSE.txt) licenses. + * + * http://docs.jquery.com/UI/Effects/Highlight + * + * Depends: + * effects.core.js + */ +(function($) { + +$.effects.highlight = function(o) { + + return this.queue(function() { + + // Create element + var el = $(this), props = ['backgroundImage','backgroundColor','opacity']; + + // Set options + var mode = $.effects.setMode(el, o.options.mode || 'show'); // Set Mode + var color = o.options.color || "#ffff99"; // Default highlight color + var oldColor = el.css("backgroundColor"); + + // Adjust + $.effects.save(el, props); el.show(); // Save & Show + el.css({backgroundImage: 'none', backgroundColor: color}); // Shift + + // Animation + var animation = {backgroundColor: oldColor }; + if (mode == "hide") animation['opacity'] = 0; + + // Animate + el.animate(animation, { queue: false, duration: o.duration, easing: o.options.easing, complete: function() { + if(mode == "hide") el.hide(); + $.effects.restore(el, props); + if (mode == "show" && $.browser.msie) this.style.removeAttribute('filter'); + if(o.callback) o.callback.apply(this, arguments); + el.dequeue(); + }}); + + }); + +}; + +})(jQuery); \ No newline at end of file diff --git a/doc/code/js/main.js b/doc/code/js/main.js new file mode 100755 index 00000000..859772b9 --- /dev/null +++ b/doc/code/js/main.js @@ -0,0 +1,24 @@ +function toggleSource(id) +{ + var src = $('#' + id).toggle(); + var isVisible = src.is(':visible'); + $('#l_' + id).html(isVisible ? 'hide' : 'show'); + if (!src.data('syntax-higlighted')) { + src.data('syntax-higlighted', 1); + hljs.highlightBlock(src[0]); + } +} + +window.highlight = function(url) { + var hash = url.match(/#([^#]+)$/) + if(hash) { + $('a[name=' + hash[1] + ']').parent().effect('highlight', {}, 'slow') + } +} + +$(function() { + highlight('#' + location.hash); + $('.description pre').each(function() { + hljs.highlightBlock(this); + }); +}); diff --git a/doc/app/js/navigation.js b/doc/code/js/navigation.js similarity index 100% rename from doc/app/js/navigation.js rename to doc/code/js/navigation.js diff --git a/doc/code/js/search_index.js b/doc/code/js/search_index.js new file mode 100644 index 00000000..7fda2f97 --- /dev/null +++ b/doc/code/js/search_index.js @@ -0,0 +1 @@ +var search_data = {"index":{"searchIndex":["ability","account","activityobserver","admin","dashboardcontroller","groupscontroller","hookscontroller","logscontroller","projectscontroller","resquecontroller","teammemberscontroller","userscontroller","admincontroller","applicationcontroller","applicationdecorator","applicationhelper","attachmentuploader","authority","basecontext","blamecontroller","blobcontroller","commit","commitcontroller","commitdecorator","commitloadcontext","commitscontroller","commitshelper","comparecontroller","dashboardcontroller","dashboardhelper","deploykeyscontroller","errorscontroller","event","eventdecorator","eventfilter","eventshelper","extractspath","invalidpatherror","filesizevalidator","helper","githost","gitlab","api","apihelpers","applogger","auth","entities","hook","issue","mrnote","mergerequest","milestone","note","project","projectmember","projectsnippet","repocommit","repoobject","sshkey","user","userbasic","userlogin","gitlogger","gitstats","gitolite","accessdenied","gitoliteconfig","pullerror","pusherror","graph","commit","jsonbuilder","inlinediff","issues","logger","markdown","mergerequests","milestones","notes","projectmover","projectmoveerror","projects","regex","satellite","action","editfileaction","mergeaction","satellite","seeder","session","theme","users","gitlabciservice","gitlabmarkdownhelper","grack","auth","group","groupscontroller","helpcontroller","hookscontroller","issue","issuecommonality","classmethods","issueobserver","issuesbulkupdatecontext","issuescontroller","issueshelper","issueslistcontext","key","keyobserver","keyscontroller","labelscontroller","mergerequest","mergerequestobserver","mergerequestscontroller","mergerequestshelper","mergerequestsloadcontext","milestone","milestonescontroller","namespace","namespacedproject","namespaceshelper","note","noteevent","noteobserver","notes","createcontext","loadcontext","notescontroller","noteshelper","notify","omniauthcallbackscontroller","postreceive","profilehelper","profilescontroller","project","transfererror","projecthook","projectobserver","projectresourcecontroller","projectupdatecontext","projectscontroller","projectshelper","protectedbranch","protectedbranchescontroller","pushevent","pushobserver","redcarpet","render","gitlabhtml","refscontroller","repositoriescontroller","repository","searchcontext","searchcontroller","service","servicehook","servicescontroller","snippet","snippetscontroller","snippetshelper","staticmodel","classmethods","systemhook","systemhookobserver","systemhookworker","tabhelper","tagshelper","team","teammemberscontroller","testhookcontext","tree","treecontroller","treedecorator","treehelper","user","userdecorator","userobserver","usersproject","usersprojectobserver","votes","webhook","wiki","wikiscontroller","==()","[]()","_indexes_of_changed_lines()","abilities()","abilities()","abilities()","abilities()","access_denied!()","access_options()","access_roles()","account()","action_name()","activated?()","active()","active?()","add_abilities()","add_access()","add_refs()","add_user_id_to_team()","add_user_to_team()","add_users_ids_to_team()","add_users_into_projects()","add_users_to_project_teams()","add_users_to_team()","admin_all_repo()","admin_all_repo!()","after_commit()","after_create()","after_create()","after_create()","after_create()","after_create()","after_create()","after_create()","after_create()","after_destroy()","after_destroy()","after_destroy()","after_destroy()","after_destroy()","after_save()","after_save()","after_save()","after_sign_in_path_for()","after_update()","after_update()","after_update()","all_hooks_fire()","allow_read_for?()","allowed()","allowed_tree_edit?()","app_theme()","apply()","apply_filter()","apply_import()","archive()","archive_repo()","assign_ref_vars()","async_execute()","attributes_for_keys()","authbutton()","authenticate!()","authenticate_admin!()","authenticated_as_admin!()","author()","author_email()","author_id()","author_link()","author_name()","authorize!()","authorize_admin_issue!()","authorize_admin_merge_request!()","authorize_admin_milestone!()","authorize_admin_snippet!()","authorize_code_access!()","authorize_modify_issue!()","authorize_modify_merge_request!()","authorize_modify_snippet!()","authorize_project!()","authorize_read_group!()","authorized_for()","authorized_groups()","authorized_projects()","authors()","authors_count()","automerge()","automerge!()","automerge_check()","avatar_image()","base_class()","base_space()","block()","block()","block_code()","branch?()","branch_from()","branch_name()","branch_names()","branch_to()","branches()","branches()","branches_tab_class()","breadcrumbs()","breadcrumbs()","broken_diffs?()","build()","build_commit_note()","build_graph()","build_line_anchor()","build_page()","bulk_delete()","bulk_import()","bulk_update()","bulk_update()","can?()","can?()","can?()","can?()","can?()","can_be_closed?()","can_be_merged?()","can_be_merged?()","can_create_group?()","can_create_project?()","can_edit?()","cared_merge_requests()","changed_issue?()","changed_merge_request?()","check_if_can_be_merged()","check_limit()","check_validity!()","chief()","ci_build_details_path()","ci_status()","clean_repo()","clear_and_update!()","closed?()","closed_event()","closed_items_count()","code()","collect_authors()","collect_commits()","comments()","commit()","commit()","commit!()","commit_author()","commit_badge_path()","commit_from()","commit_line_notes()","commit_notes()","commit_status()","commit_status_path()","commit_to()","commit_to_html()","commits()","commits()","commits()","commits()","commits_between()","commits_between()","commits_count()","commits_count()","commits_since()","commits_since()","commits_with_refs()","commits_with_refs()","committer_email()","committer_link()","committer_name()","common_notes()","compare()","compose_service_hook()","config()","content_types()","create()","create()","create()","create()","create()","create()","create()","create()","create()","create()","create()","create()","create()","create()","create()","create()","create()","create_by_user()","create_from_omniauth()","create_from_omniauth()","create_repository()","create_status_change_note()","created_at()","css_class_by_id()","current_action?()","current_controller?()","current_ref()","current_user()","dashboard_filter()","dashboard_filter_path()","data()","default_filter()","default_regex()","define_show_vars()","define_tree_vars()","delete_users_ids_from_team()","description()","design()","destroy()","destroy()","destroy()","destroy()","destroy()","destroy()","destroy()","destroy()","destroy()","destroy()","destroy()","destroy()","destroy()","destroy()","destroy()","destroy_project()","destroy_project!()","destroy_repository()","destroyed?()","determine_action()","dev_access_for?()","dev_tools()","diff_line_content()","different_committer?()","diffs()","diffs()","dir_exists?()","discover_default_branch()","downvote?()","downvotes()","downvotes_in_percent()","each_diff_line()","edit()","edit()","edit()","edit()","edit()","edit()","edit()","edit()","edit()","edit()","edit()","edit()","emoji_autocomplete_source()","empty?()","empty_repo?()","enable_automerge()","ensure_dir_exist()","entities_per_project()","error()","event_action_name()","event_filter()","event_filter_link()","event_image()","execute()","execute()","execute()","execute()","execute()","execute()","execute()","execute()","execute()","execute()","execute()","execute_hooks()","execute_services()","exists?()","expired?()","expired?()","expires_at()","extract_ref()","failure_message()","feed_summary()","feed_title()","feed_url()","file_name()","file_name()","files()","files_count()","filter()","find_all_by_branch()","find_all_by_milestone()","find_for_ldap_auth()","find_for_ldap_auth()","find_free_space()","find_or_first()","find_or_new_for_omniauth()","find_or_new_for_omniauth()","find_project()","find_with_namespace()","fingerprintable_key()","first_name()","for_commit?()","for_diff_line?()","forbidden!()","format_message()","format_message()","fresh_commits()","fresh_commits()","generate_password()","gfm()","git_error?()","git_host()","git_not_found!()","githost()","gitlab_auth()","gitlab_ci?()","gitlab_markdown?()","global_id()","graph()","graph()","gravatar_icon()","group()","group_abilities()","grouped_options_refs()","grouper_project_members()","guest_access_for?()","has_commits?()","has_post_receive_file?()","heads()","help()","hexdigest()","history()","history()","hook_file()","http_url_to_repo()","human_name()","human_name()","human_state()","identification_type()","identifier()","image_diff_class()","import_team()","in_locked_and_timed_satellite()","index()","index()","index()","index()","index()","index()","index()","index()","index()","index()","index()","index()","index()","index()","index()","index()","index()","index()","index()","index()","index_commits()","info()","invalid?()","is_admin?()","is_assigned?()","is_being_closed?()","is_being_reassigned?()","is_being_reopened?()","is_blob?()","is_deploy_key()","is_empty?()","issue()","issue()","issue?()","issue_css_classes()","issue_status_changed_email()","issue_tags()","issues()","issues()","issues_active_milestones()","issues_filter()","issues_filtered()","issues_labels()","items_for()","joined?()","labels_autocomplete_source()","last_activity()","last_activity_date()","last_activity_project()","last_commit()","last_commit()","last_commit()","last_commit_for()","last_commit_short_sha()","last_deploy?()","last_push_to_non_root?()","ldap()","ldap_enable?()","left?()","lifetime_select_options()","link_title()","link_to_author()","link_to_commit_diff_line_note()","link_to_gfm()","link_to_member()","link_to_project()","loading_more_notes?()","loading_new_notes?()","lock()","lock_file()","log()","log()","log_exception()","log_info()","log_info()","log_info()","logs_tree()","mark_as_merged!()","mark_as_unchecked()","mark_as_unmergable()","mark_reserved()","markdown()","markup?()","master_access_for?()","max_count()","md_ref?()","membership_changed?()","merge!()","merge!()","merge_event()","merge_request()","merge_request()","merge_request?()","merge_requests()","merge_requests()","merged()","merged?()","merged?()","method_missing()","method_missing()","milestone()","milestone?()","mode()","module_enabled()","module_enabled()","module_enabled()","module_enabled()","move_dir()","move_repository()","mr_and_commit_notes()","mr_css_classes()","my_own_projects()","name()","name_with_namespace()","namespace_dir()","namespace_full_path()","namespace_id()","namespace_owner()","namespaces()","namespaces_options()","nav_link()","nav_tab()","new()","new()","new()","new()","new()","new()","new()","new()","new()","new()","new()","new()","new()","new()","new()","new()","new()","new()","new()","new()","new()","new()","new()","new()","new()","new?()","new_branch?()","new_issue?()","new_issue_email()","new_merge_request?()","new_merge_request_email()","new_mr_path_from_push_event()","new_record?()","new_ref?()","new_user_email()","no_cache_headers()","no_commit_message()","not_allowed!()","not_found!()","not_found!()","not_in_project()","note?()","note_commit?()","note_commit_email()","note_commit_id()","note_for_main_target?()","note_issue_email()","note_merge_request_email()","note_short_commit_id()","note_target()","note_target_id()","note_target_type()","note_wall_email()","noteable()","noteable_type_name()","notes()","notify_only_author?()","notify_team()","oauth_active_class()","observe_push()","open?()","open?()","open_branches()","open_for()","open_items_count()","options()","pages()","paginate()","parent_commit()","parents_count()","participants()","path()","path_regex()","path_to_repo()","path_with_namespace()","people()","percent_complete()","perform()","perform()","persisted?()","person_link()","place_chain()","plain_text_readme?()","post_receive_data()","postprocess()","prepare_satellite!()","prev_commit()","prev_commit_id()","preview()","primary_key()","private?()","probably_merged?()","processing()","project()","project()","project_abilities()","project_access_granted_email()","project_access_human()","project_admin_rules()","project_dev_rules()","project_guest_rules()","project_id()","project_ids()","project_ids()","project_issues_filter_path()","project_last_activity()","project_master_rules()","project_name()","project_name_regex()","project_report_rules()","project_tab_class()","project_teams_update()","project_title()","project_update()","project_was_moved_email()","projects()","projects()","projects()","projects_limit_percent()","projects_sorted_by_activity()","proper?()","protected_branch?()","public?()","push()","push?()","push_action_name()","push_to_branch?()","push_with_commits?()","quiet()","raw()","read_latest()","read_latest_for()","readme()","reassigned_issue_email()","reassigned_merge_request_email()","recent_push()","ref()","ref_name()","ref_names()","ref_type()","regenerate_from()","reject_blocked!()","reload_code()","reloaded_commits()","reloaded_diffs()","remove_from_team_message()","remove_key()","remove_project()","remove_repository()","render_403()","render_404()","render_api_error!()","render_tree()","reopened?()","replace_markers()","repo()","repo()","repo_access_human()","repo_exists?()","repo_name()","report_access_for?()","repository_masters()","repository_readers()","repository_writers()","request_protocol()","require_non_empty_project()","require_ssh_key?()","reset_access()","reset_private_token()","result()","rm_dir()","rm_key()","rm_ref?()","role_access()","root_ref()","root_ref?()","safe_message()","satellite()","saved?()","search()","search()","search()","search()","search()","search()","search()","search_autocomplete_source()","send_move_instructions()","send_notify_mails()","send_reassigned_email()","send_reassigned_email()","send_update_instructions()","services()","set_current_user_for_observers()","set_identifier()","set_key()","set_slug()","several_namespaces?()","short_id()","show()","show()","show()","show()","show()","show()","show()","show()","show()","show()","show()","show()","show()","show()","show()","show()","show()","show()","show()","show()","show()","show()","show()","show_last_push_widget?()","size()","skip_git?()","snippet()","sort()","ssh_url_to_repo()","stats()","store_dir()","strip_white_space()","switch()","tag?()","tag_list()","tag_name()","tag_names()","tag_path()","tags()","tags()","take_left_leaves()","target_title()","team()","team_member_by_id()","team_member_by_name_or_email()","team_members()","team_update()","team_update()","team_without_note_author()","test()","test()","test()","title()","tm_of()","tm_path()","to_diff()","to_diff()","to_graph_hash()","to_json()","to_param()","to_param()","to_param()","to_param()","to_patch()","today?()","token()","total_items_count()","transfer()","tree()","tree_hex_class()","tree_icon()","tree_join()","trigger_post_receive()","truncate_team()","truncate_team()","truncate_teams()","truncate_teams()","unassigned_filter()","unauthorized!()","unblock()","unchecked?()","unique_key()","unmerged_commits()","unmerged_diffs()","up_dir?()","up_dir_path()","update()","update()","update()","update()","update()","update()","update()","update()","update()","update()","update()","update()","update()","update_gitolite()","update_merge_requests()","update_password()","update_project()","update_project!()","update_project_config()","update_projects()","update_repositories()","update_repository()","update_repository()","update_repository()","update_repository()","update_username()","update_users_ids_to_role()","upvote?()","upvotes()","upvotes_in_percent()","url_to_repo()","url_to_repo()","user_bulk_import()","user_color_scheme_class()","user_project()","username_regex()","users()","valid?()","valid_diffs?()","valid_hook_file()","valid_post_receive_file?()","valid_push?()","valid_repo?()","validate_branches()","validate_each()","validate_get_request()","validate_post_request()","validates_merge_request()","votes_count()","wall()","wall_note?()","web_app_url()","web_url()","without_projects()","write_key()","ofl","post-receive"],"longSearchIndex":["ability","account","activityobserver","admin","admin::dashboardcontroller","admin::groupscontroller","admin::hookscontroller","admin::logscontroller","admin::projectscontroller","admin::resquecontroller","admin::teammemberscontroller","admin::userscontroller","admincontroller","applicationcontroller","applicationdecorator","applicationhelper","attachmentuploader","authority","basecontext","blamecontroller","blobcontroller","commit","commitcontroller","commitdecorator","commitloadcontext","commitscontroller","commitshelper","comparecontroller","dashboardcontroller","dashboardhelper","deploykeyscontroller","errorscontroller","event","eventdecorator","eventfilter","eventshelper","extractspath","extractspath::invalidpatherror","filesizevalidator","filesizevalidator::helper","githost","gitlab","gitlab::api","gitlab::apihelpers","gitlab::applogger","gitlab::auth","gitlab::entities","gitlab::entities::hook","gitlab::entities::issue","gitlab::entities::mrnote","gitlab::entities::mergerequest","gitlab::entities::milestone","gitlab::entities::note","gitlab::entities::project","gitlab::entities::projectmember","gitlab::entities::projectsnippet","gitlab::entities::repocommit","gitlab::entities::repoobject","gitlab::entities::sshkey","gitlab::entities::user","gitlab::entities::userbasic","gitlab::entities::userlogin","gitlab::gitlogger","gitlab::gitstats","gitlab::gitolite","gitlab::gitolite::accessdenied","gitlab::gitoliteconfig","gitlab::gitoliteconfig::pullerror","gitlab::gitoliteconfig::pusherror","gitlab::graph","gitlab::graph::commit","gitlab::graph::jsonbuilder","gitlab::inlinediff","gitlab::issues","gitlab::logger","gitlab::markdown","gitlab::mergerequests","gitlab::milestones","gitlab::notes","gitlab::projectmover","gitlab::projectmover::projectmoveerror","gitlab::projects","gitlab::regex","gitlab::satellite","gitlab::satellite::action","gitlab::satellite::editfileaction","gitlab::satellite::mergeaction","gitlab::satellite::satellite","gitlab::seeder","gitlab::session","gitlab::theme","gitlab::users","gitlabciservice","gitlabmarkdownhelper","grack","grack::auth","group","groupscontroller","helpcontroller","hookscontroller","issue","issuecommonality","issuecommonality::classmethods","issueobserver","issuesbulkupdatecontext","issuescontroller","issueshelper","issueslistcontext","key","keyobserver","keyscontroller","labelscontroller","mergerequest","mergerequestobserver","mergerequestscontroller","mergerequestshelper","mergerequestsloadcontext","milestone","milestonescontroller","namespace","namespacedproject","namespaceshelper","note","noteevent","noteobserver","notes","notes::createcontext","notes::loadcontext","notescontroller","noteshelper","notify","omniauthcallbackscontroller","postreceive","profilehelper","profilescontroller","project","project::transfererror","projecthook","projectobserver","projectresourcecontroller","projectupdatecontext","projectscontroller","projectshelper","protectedbranch","protectedbranchescontroller","pushevent","pushobserver","redcarpet","redcarpet::render","redcarpet::render::gitlabhtml","refscontroller","repositoriescontroller","repository","searchcontext","searchcontroller","service","servicehook","servicescontroller","snippet","snippetscontroller","snippetshelper","staticmodel","staticmodel::classmethods","systemhook","systemhookobserver","systemhookworker","tabhelper","tagshelper","team","teammemberscontroller","testhookcontext","tree","treecontroller","treedecorator","treehelper","user","userdecorator","userobserver","usersproject","usersprojectobserver","votes","webhook","wiki","wikiscontroller","staticmodel#==()","staticmodel#[]()","gitlab::inlinediff::_indexes_of_changed_lines()","account#abilities()","applicationcontroller#abilities()","basecontext#abilities()","grack::auth#abilities()","applicationcontroller#access_denied!()","project::access_options()","usersproject::access_roles()","profilescontroller#account()","event#action_name()","gitlabciservice#activated?()","project::active()","eventfilter#active?()","applicationcontroller#add_abilities()","authority#add_access()","gitlab::graph::commit#add_refs()","team#add_user_id_to_team()","team#add_user_to_team()","team#add_users_ids_to_team()","usersproject::add_users_into_projects()","group#add_users_to_project_teams()","team#add_users_to_team()","gitlab::gitoliteconfig#admin_all_repo()","gitlab::gitoliteconfig#admin_all_repo!()","usersprojectobserver#after_commit()","activityobserver#after_create()","issueobserver#after_create()","mergerequestobserver#after_create()","noteobserver#after_create()","projectobserver#after_create()","systemhookobserver#after_create()","userobserver#after_create()","usersprojectobserver#after_create()","keyobserver#after_destroy()","projectobserver#after_destroy()","systemhookobserver#after_destroy()","userobserver#after_destroy()","usersprojectobserver#after_destroy()","activityobserver#after_save()","keyobserver#after_save()","userobserver#after_save()","applicationcontroller#after_sign_in_path_for()","issueobserver#after_update()","mergerequestobserver#after_update()","projectobserver#after_update()","systemhook::all_hooks_fire()","authority#allow_read_for?()","ability::allowed()","treehelper#allowed_tree_edit?()","applicationhelper#app_theme()","gitlab::gitoliteconfig#apply()","eventfilter#apply_filter()","teammemberscontroller#apply_import()","repositoriescontroller#archive()","repository#archive_repo()","extractspath#assign_ref_vars()","systemhook#async_execute()","gitlab::apihelpers#attributes_for_keys()","applicationhelper#authbutton()","gitlab::apihelpers#authenticate!()","admincontroller#authenticate_admin!()","gitlab::apihelpers#authenticated_as_admin!()","event#author()","commit#author_email()","milestone#author_id()","commitdecorator#author_link()","commit#author_name()","gitlab::apihelpers#authorize!()","issuescontroller#authorize_admin_issue!()","mergerequestscontroller#authorize_admin_merge_request!()","milestonescontroller#authorize_admin_milestone!()","snippetscontroller#authorize_admin_snippet!()","applicationcontroller#authorize_code_access!()","issuescontroller#authorize_modify_issue!()","mergerequestscontroller#authorize_modify_merge_request!()","snippetscontroller#authorize_modify_snippet!()","applicationcontroller#authorize_project!()","groupscontroller#authorize_read_group!()","project::authorized_for()","account#authorized_groups()","account#authorized_projects()","gitlab::gitstats#authors()","gitlab::gitstats#authors_count()","mergerequestscontroller#automerge()","mergerequest#automerge!()","mergerequestscontroller#automerge_check()","userdecorator#avatar_image()","staticmodel::classmethods#base_class()","gitlab::graph::jsonbuilder#base_space()","account#block()","admin::userscontroller#block()","redcarpet::render::gitlabhtml#block_code()","pushevent#branch?()","mergerequestscontroller#branch_from()","pushevent#branch_name()","repository#branch_names()","mergerequestscontroller#branch_to()","repositoriescontroller#branches()","repository#branches()","tabhelper#branches_tab_class()","treedecorator#breadcrumbs()","treehelper#breadcrumbs()","mergerequest#broken_diffs?()","gitlab::logger::build()","project#build_commit_note()","gitlab::gitstats#build_graph()","commitshelper#build_line_anchor()","gitlabciservice#build_page()","usersproject::bulk_delete()","usersproject::bulk_import()","issuescontroller#bulk_update()","usersproject::bulk_update()","account#can?()","applicationcontroller#can?()","basecontext#can?()","gitlab::apihelpers#can?()","grack::auth#can?()","milestone#can_be_closed?()","gitlab::satellite::mergeaction#can_be_merged?()","mergerequest#can_be_merged?()","account#can_create_group?()","account#can_create_project?()","gitlab::satellite::editfileaction#can_edit?()","account#cared_merge_requests()","event#changed_issue?()","event#changed_merge_request?()","mergerequest#check_if_can_be_merged()","project#check_limit()","filesizevalidator#check_validity!()","namespacedproject#chief()","mergerequestshelper#ci_build_details_path()","mergerequestscontroller#ci_status()","gitlab::gitoliteconfig#clean_repo()","gitlab::satellite::satellite#clear_and_update!()","event#closed?()","mergerequest#closed_event()","milestone#closed_items_count()","project#code()","gitlab::gitstats#collect_authors()","gitlab::graph::jsonbuilder#collect_commits()","eventfilter::comments()","protectedbranch#commit()","repository#commit()","gitlab::satellite::editfileaction#commit!()","note#commit_author()","gitlabciservice#commit_badge_path()","pushevent#commit_from()","project#commit_line_notes()","project#commit_notes()","gitlabciservice#commit_status()","gitlabciservice#commit_status_path()","pushevent#commit_to()","commitshelper#commit_to_html()","commit::commits()","mergerequest#commits()","pushevent#commits()","repository#commits()","commit::commits_between()","repository#commits_between()","gitlab::gitstats#commits_count()","pushevent#commits_count()","commit::commits_since()","repository#commits_since()","commit::commits_with_refs()","repository#commits_with_refs()","commit#committer_email()","commitdecorator#committer_link()","commit#committer_name()","project#common_notes()","commit::compare()","gitlabciservice#compose_service_hook()","gitlab::gitolite#config()","snippet::content_types()","admin::groupscontroller#create()","admin::hookscontroller#create()","admin::userscontroller#create()","comparecontroller#create()","deploykeyscontroller#create()","gitlab::satellite::satellite#create()","hookscontroller#create()","issuescontroller#create()","keyscontroller#create()","mergerequestscontroller#create()","milestonescontroller#create()","notescontroller#create()","projectscontroller#create()","protectedbranchescontroller#create()","snippetscontroller#create()","teammemberscontroller#create()","wikiscontroller#create()","project::create_by_user()","gitlab::auth#create_from_omniauth()","user::create_from_omniauth()","gitlab::gitolite#create_repository()","note::create_status_change_note()","commit#created_at()","gitlab::theme::css_class_by_id()","applicationhelper#current_action?()","applicationhelper#current_controller?()","grack::auth#current_ref()","gitlab::apihelpers#current_user()","dashboardcontroller#dashboard_filter()","dashboardhelper#dashboard_filter_path()","snippet#data()","eventfilter::default_filter()","gitlab::regex#default_regex()","mergerequestscontroller#define_show_vars()","refscontroller#define_tree_vars()","team#delete_users_ids_from_team()","commitdecorator#description()","profilescontroller#design()","admin::groupscontroller#destroy()","admin::hookscontroller#destroy()","admin::projectscontroller#destroy()","admin::teammemberscontroller#destroy()","admin::userscontroller#destroy()","deploykeyscontroller#destroy()","hookscontroller#destroy()","keyscontroller#destroy()","milestonescontroller#destroy()","notescontroller#destroy()","projectscontroller#destroy()","protectedbranchescontroller#destroy()","snippetscontroller#destroy()","teammemberscontroller#destroy()","wikiscontroller#destroy()","gitlab::gitoliteconfig#destroy_project()","gitlab::gitoliteconfig#destroy_project!()","repository#destroy_repository()","staticmodel#destroyed?()","event::determine_action()","authority#dev_access_for?()","applicationcontroller#dev_tools()","commitshelper#diff_line_content()","commit#different_committer?()","mergerequest#diffs()","mergerequestscontroller#diffs()","namespace#dir_exists?()","repository#discover_default_branch()","note#downvote?()","votes#downvotes()","votes#downvotes_in_percent()","commitshelper#each_diff_line()","admin::groupscontroller#edit()","admin::projectscontroller#edit()","admin::teammemberscontroller#edit()","admin::userscontroller#edit()","issuescontroller#edit()","mergerequestscontroller#edit()","milestonescontroller#edit()","projectscontroller#edit()","servicescontroller#edit()","snippetscontroller#edit()","treecontroller#edit()","wikiscontroller#edit()","applicationhelper#emoji_autocomplete_source()","tree#empty?()","repository#empty_repo?()","gitlab::gitolite#enable_automerge()","namespace#ensure_dir_exist()","dashboardhelper#entities_per_project()","gitlab::logger::error()","eventshelper#event_action_name()","dashboardcontroller#event_filter()","eventshelper#event_filter_link()","eventshelper#event_image()","commitloadcontext#execute()","gitlab::projectmover#execute()","issuesbulkupdatecontext#execute()","issueslistcontext#execute()","mergerequestsloadcontext#execute()","notes::createcontext#execute()","notes::loadcontext#execute()","projectupdatecontext#execute()","searchcontext#execute()","testhookcontext#execute()","webhook#execute()","pushobserver#execute_hooks()","pushobserver#execute_services()","gitlab::satellite::satellite#exists?()","milestone#expired?()","snippet#expired?()","milestone#expires_at()","extractspath#extract_ref()","omniauthcallbackscontroller#failure_message()","eventdecorator#feed_summary()","eventdecorator#feed_title()","eventdecorator#feed_url()","gitlab::applogger::file_name()","gitlab::gitlogger::file_name()","projectscontroller#files()","gitlab::gitstats#files_count()","user::filter()","mergerequest::find_all_by_branch()","mergerequest::find_all_by_milestone()","gitlab::auth#find_for_ldap_auth()","user::find_for_ldap_auth()","gitlab::graph::jsonbuilder#find_free_space()","commit::find_or_first()","gitlab::auth#find_or_new_for_omniauth()","user::find_or_new_for_omniauth()","gitlab::apihelpers#find_project()","project::find_with_namespace()","key#fingerprintable_key()","account#first_name()","note#for_commit?()","note#for_diff_line?()","gitlab::apihelpers#forbidden!()","gitlab::applogger#format_message()","gitlab::gitlogger#format_message()","commit::fresh_commits()","repository#fresh_commits()","user#generate_password()","gitlab::markdown#gfm()","project#git_error?()","githost#git_host()","applicationcontroller#git_not_found!()","errorscontroller#githost()","user::gitlab_auth()","project#gitlab_ci?()","treehelper#gitlab_markdown?()","namespace::global_id()","gitlab::gitstats#graph()","projectscontroller#graph()","applicationhelper#gravatar_icon()","groupscontroller#group()","ability::group_abilities()","applicationhelper#grouped_options_refs()","projectshelper#grouper_project_members()","authority#guest_access_for?()","repository#has_commits?()","repository#has_post_receive_file?()","repository#heads()","filesizevalidator#help()","applicationhelper#hexdigest()","profilescontroller#history()","wikiscontroller#history()","repository#hook_file()","repository#http_url_to_repo()","group#human_name()","namespace#human_name()","mergerequest#human_state()","commitshelper#identification_type()","account#identifier()","commitshelper#image_diff_class()","usersproject::import_team()","gitlab::satellite::action#in_locked_and_timed_satellite()","admin::dashboardcontroller#index()","admin::groupscontroller#index()","admin::hookscontroller#index()","admin::projectscontroller#index()","admin::userscontroller#index()","comparecontroller#index()","dashboardcontroller#index()","deploykeyscontroller#index()","helpcontroller#index()","hookscontroller#index()","issuescontroller#index()","keyscontroller#index()","labelscontroller#index()","mergerequestscontroller#index()","milestonescontroller#index()","notescontroller#index()","protectedbranchescontroller#index()","servicescontroller#index()","snippetscontroller#index()","teammemberscontroller#index()","gitlab::graph::jsonbuilder#index_commits()","gitlab::logger::info()","tree#invalid?()","account#is_admin?()","issuecommonality#is_assigned?()","issuecommonality#is_being_closed?()","issuecommonality#is_being_reassigned?()","issuecommonality#is_being_reopened?()","tree#is_blob?()","key#is_deploy_key()","milestone#is_empty?()","event#issue()","issuescontroller#issue()","event#issue?()","issueshelper#issue_css_classes()","notify#issue_status_changed_email()","issueshelper#issue_tags()","dashboardcontroller#issues()","groupscontroller#issues()","issueshelper#issues_active_milestones()","issueshelper#issues_filter()","issuescontroller#issues_filtered()","project#issues_labels()","project#items_for()","event#joined?()","issueshelper#labels_autocomplete_source()","project#last_activity()","project#last_activity_date()","account#last_activity_project()","applicationhelper#last_commit()","mergerequest#last_commit()","pushevent#last_commit()","repository#last_commit_for()","mergerequest#last_commit_short_sha()","key#last_deploy?()","pushevent#last_push_to_non_root?()","omniauthcallbackscontroller#ldap()","applicationhelper#ldap_enable?()","event#left?()","snippetshelper#lifetime_select_options()","commitdecorator#link_title()","eventshelper#link_to_author()","noteshelper#link_to_commit_diff_line_note()","gitlabmarkdownhelper#link_to_gfm()","projectshelper#link_to_member()","projectshelper#link_to_project()","noteshelper#loading_more_notes?()","noteshelper#loading_new_notes?()","gitlab::satellite::satellite#lock()","gitlab::satellite::satellite#lock_file()","gitlab::auth#log()","gitlab::gitoliteconfig#log()","applicationcontroller#log_exception()","gitlab::projectmover#log_info()","projectobserver#log_info()","userobserver#log_info()","refscontroller#logs_tree()","mergerequest#mark_as_merged!()","mergerequest#mark_as_unchecked()","mergerequest#mark_as_unmergable()","gitlab::graph::jsonbuilder#mark_reserved()","gitlabmarkdownhelper#markdown()","treehelper#markup?()","authority#master_access_for?()","gitlab::graph::jsonbuilder::max_count()","pushevent#md_ref?()","event#membership_changed?()","gitlab::satellite::mergeaction#merge!()","mergerequest#merge!()","mergerequest#merge_event()","event#merge_request()","mergerequestscontroller#merge_request()","event#merge_request?()","dashboardcontroller#merge_requests()","groupscontroller#merge_requests()","eventfilter::merged()","event#merged?()","mergerequest#merged?()","applicationcontroller#method_missing()","gitlab::graph::commit#method_missing()","milestonescontroller#milestone()","event#milestone?()","snippet#mode()","issuescontroller#module_enabled()","labelscontroller#module_enabled()","mergerequestscontroller#module_enabled()","milestonescontroller#module_enabled()","namespace#move_dir()","gitlab::gitolite#move_repository()","mergerequest#mr_and_commit_notes()","mergerequestshelper#mr_css_classes()","account#my_own_projects()","snippet#name()","namespacedproject#name_with_namespace()","repository#namespace_dir()","namespace#namespace_full_path()","account#namespace_id()","namespacedproject#namespace_owner()","account#namespaces()","namespaceshelper#namespaces_options()","tabhelper#nav_link()","tabhelper#nav_tab()","admin::groupscontroller#new()","admin::userscontroller#new()","basecontext::new()","commit::new()","deploykeyscontroller#new()","eventfilter::new()","filesizevalidator::new()","gitlab::gitstats::new()","gitlab::graph::commit::new()","gitlab::graph::jsonbuilder::new()","gitlab::projectmover::new()","gitlab::satellite::action::new()","gitlab::satellite::editfileaction::new()","gitlab::satellite::mergeaction::new()","gitlab::satellite::satellite::new()","issuescontroller#new()","keyscontroller#new()","mergerequestscontroller#new()","milestonescontroller#new()","projectscontroller#new()","redcarpet::render::gitlabhtml::new()","searchcontext::new()","snippetscontroller#new()","teammemberscontroller#new()","tree::new()","issuecommonality#new?()","pushevent#new_branch?()","event#new_issue?()","notify#new_issue_email()","event#new_merge_request?()","notify#new_merge_request_email()","mergerequestshelper#new_mr_path_from_push_event()","staticmodel#new_record?()","pushevent#new_ref?()","notify#new_user_email()","applicationcontroller#no_cache_headers()","commitdecorator#no_commit_message()","gitlab::apihelpers#not_allowed!()","applicationcontroller#not_found!()","gitlab::apihelpers#not_found!()","user::not_in_project()","event#note?()","noteevent#note_commit?()","notify#note_commit_email()","noteevent#note_commit_id()","noteshelper#note_for_main_target?()","notify#note_issue_email()","notify#note_merge_request_email()","noteevent#note_short_commit_id()","noteevent#note_target()","noteevent#note_target_id()","noteevent#note_target_type()","notify#note_wall_email()","note#noteable()","note#noteable_type_name()","notescontroller#notes()","note#notify_only_author?()","noteobserver#notify_team()","profilehelper#oauth_active_class()","pushobserver#observe_push()","mergerequest#open?()","milestone#open?()","repository#open_branches()","issue::open_for()","milestone#open_items_count()","eventfilter#options()","wikiscontroller#pages()","gitlab::apihelpers#paginate()","pushevent#parent_commit()","commit#parents_count()","milestone#participants()","gitlab::satellite::satellite#path()","gitlab::regex#path_regex()","repository#path_to_repo()","namespacedproject#path_with_namespace()","groupscontroller#people()","milestone#percent_complete()","postreceive::perform()","systemhookworker::perform()","staticmodel#persisted?()","commitdecorator#person_link()","gitlab::graph::jsonbuilder#place_chain()","treehelper#plain_text_readme?()","pushobserver#post_receive_data()","redcarpet::render::gitlabhtml#postprocess()","gitlab::satellite::action#prepare_satellite!()","commit#prev_commit()","commit#prev_commit_id()","notescontroller#preview()","staticmodel::classmethods#primary_key()","project#private?()","mergerequest#probably_merged?()","gitlab::inlinediff::processing()","admin::projectscontroller#project()","applicationcontroller#project()","ability::project_abilities()","notify#project_access_granted_email()","usersproject#project_access_human()","ability::project_admin_rules()","ability::project_dev_rules()","ability::project_guest_rules()","project#project_id()","account#project_ids()","groupscontroller#project_ids()","issueshelper#project_issues_filter_path()","applicationhelper#project_last_activity()","ability::project_master_rules()","event#project_name()","gitlab::regex#project_name_regex()","ability::project_report_rules()","tabhelper#project_tab_class()","admin::groupscontroller#project_teams_update()","projectshelper#project_title()","admin::groupscontroller#project_update()","notify#project_was_moved_email()","dashboardcontroller#projects()","groupscontroller#projects()","key#projects()","account#projects_limit_percent()","account#projects_sorted_by_activity()","event#proper?()","repository#protected_branch?()","project#public?()","eventfilter::push()","event#push?()","pushevent#push_action_name()","pushobserver#push_to_branch?()","pushevent#push_with_commits?()","gitlab::seeder::quiet()","snippetscontroller#raw()","gitlab::logger::read_latest()","gitlab::logger::read_latest_for()","treedecorator#readme()","notify#reassigned_issue_email()","notify#reassigned_merge_request_email()","account#recent_push()","refscontroller#ref()","pushevent#ref_name()","repository#ref_names()","pushevent#ref_type()","wiki::regenerate_from()","applicationcontroller#reject_blocked!()","mergerequest#reload_code()","mergerequest#reloaded_commits()","mergerequest#reloaded_diffs()","projectshelper#remove_from_team_message()","gitlab::gitolite#remove_key()","admin::groupscontroller#remove_project()","gitlab::gitolite#remove_repository()","applicationcontroller#render_403()","applicationcontroller#render_404()","gitlab::apihelpers#render_api_error!()","treehelper#render_tree()","event#reopened?()","gitlab::inlinediff::replace_markers()","gitlab::satellite::satellite#repo()","repository#repo()","usersproject#repo_access_human()","repository#repo_exists?()","project#repo_name()","authority#report_access_for?()","authority#repository_masters()","authority#repository_readers()","authority#repository_writers()","applicationhelper#request_protocol()","applicationcontroller#require_non_empty_project()","account#require_ssh_key?()","authority#reset_access()","profilescontroller#reset_private_token()","searchcontext#result()","namespace#rm_dir()","gitlab::gitoliteconfig#rm_key()","pushevent#rm_ref?()","usersproject#role_access()","repository#root_ref()","repository#root_ref?()","commit#safe_message()","repository#satellite()","project#saved?()","groupscontroller#search()","issuecommonality::classmethods#search()","issuescontroller#search()","namespace::search()","project::search()","user::search()","wiki::search()","applicationhelper#search_autocomplete_source()","project#send_move_instructions()","noteobserver#send_notify_mails()","issueobserver#send_reassigned_email()","mergerequestobserver#send_reassigned_email()","namespace#send_update_instructions()","project#services()","applicationcontroller#set_current_user_for_observers()","key#set_identifier()","gitlab::gitolite#set_key()","wiki#set_slug()","account#several_namespaces?()","commit#short_id()","admin::groupscontroller#show()","admin::projectscontroller#show()","admin::resquecontroller#show()","admin::userscontroller#show()","blamecontroller#show()","blobcontroller#show()","commitcontroller#show()","commitscontroller#show()","comparecontroller#show()","deploykeyscontroller#show()","groupscontroller#show()","issuescontroller#show()","keyscontroller#show()","mergerequestscontroller#show()","milestonescontroller#show()","profilescontroller#show()","projectscontroller#show()","repositoriescontroller#show()","searchcontroller#show()","snippetscontroller#show()","teammemberscontroller#show()","treecontroller#show()","wikiscontroller#show()","applicationhelper#show_last_push_widget?()","snippet#size()","usersproject#skip_git?()","snippetscontroller#snippet()","issuescontroller#sort()","repository#ssh_url_to_repo()","repositoriescontroller#stats()","attachmentuploader#store_dir()","key#strip_white_space()","refscontroller#switch()","pushevent#tag?()","tagshelper#tag_list()","pushevent#tag_name()","repository#tag_names()","tagshelper#tag_path()","repositoriescontroller#tags()","repository#tags()","gitlab::graph::jsonbuilder#take_left_leaves()","event#target_title()","eventfilter::team()","team#team_member_by_id()","team#team_member_by_name_or_email()","groupscontroller#team_members()","admin::projectscontroller#team_update()","admin::userscontroller#team_update()","noteobserver#team_without_note_author()","admin::hookscontroller#test()","hookscontroller#test()","servicescontroller#test()","commitdecorator#title()","userdecorator#tm_of()","projectshelper#tm_path()","commit#to_diff()","mergerequest#to_diff()","gitlab::graph::commit#to_graph_hash()","gitlab::graph::jsonbuilder#to_json()","namespace#to_param()","project#to_param()","staticmodel#to_param()","wiki#to_param()","mergerequest#to_patch()","issuecommonality#today?()","profilescontroller#token()","milestone#total_items_count()","namespacedproject#transfer()","repository#tree()","treehelper#tree_hex_class()","treehelper#tree_icon()","treehelper#tree_join()","pushobserver#trigger_post_receive()","team#truncate_team()","usersproject::truncate_team()","group#truncate_teams()","usersproject::truncate_teams()","issueshelper#unassigned_filter()","gitlab::apihelpers#unauthorized!()","admin::userscontroller#unblock()","mergerequest#unchecked?()","key#unique_key()","mergerequest#unmerged_commits()","mergerequest#unmerged_diffs()","treedecorator#up_dir?()","treedecorator#up_dir_path()","admin::groupscontroller#update()","admin::projectscontroller#update()","admin::teammemberscontroller#update()","admin::userscontroller#update()","issuescontroller#update()","mergerequestscontroller#update()","milestonescontroller#update()","profilescontroller#update()","projectscontroller#update()","servicescontroller#update()","snippetscontroller#update()","teammemberscontroller#update()","treecontroller#update()","namespace#update_gitolite()","pushobserver#update_merge_requests()","profilescontroller#update_password()","gitlab::gitoliteconfig#update_project()","gitlab::gitoliteconfig#update_project!()","gitlab::gitoliteconfig#update_project_config()","gitlab::gitoliteconfig#update_projects()","gitlab::gitolite#update_repositories()","gitlab::gitolite#update_repository()","protectedbranch#update_repository()","repository#update_repository()","usersproject#update_repository()","profilescontroller#update_username()","team#update_users_ids_to_role()","note#upvote?()","votes#upvotes()","votes#upvotes_in_percent()","gitlab::gitolite#url_to_repo()","repository#url_to_repo()","usersproject::user_bulk_import()","applicationhelper#user_color_scheme_class()","gitlab::apihelpers#user_project()","gitlab::regex#username_regex()","group#users()","grack::auth#valid?()","mergerequest#valid_diffs?()","repository#valid_hook_file()","repository#valid_post_receive_file?()","pushevent#valid_push?()","repository#valid_repo?()","mergerequest#validate_branches()","filesizevalidator#validate_each()","grack::auth#validate_get_request()","grack::auth#validate_post_request()","mergerequestscontroller#validates_merge_request()","votes#votes_count()","projectscontroller#wall()","noteevent#wall_note?()","applicationhelper#web_app_url()","project#web_url()","user::without_projects()","gitlab::gitoliteconfig#write_key()","",""],"info":[["Ability","","classes/Ability.html","",""],["Account","","classes/Account.html","",""],["ActivityObserver","","classes/ActivityObserver.html","",""],["Admin","","classes/Admin.html","",""],["Admin::DashboardController","","classes/Admin/DashboardController.html","",""],["Admin::GroupsController","","classes/Admin/GroupsController.html","",""],["Admin::HooksController","","classes/Admin/HooksController.html","",""],["Admin::LogsController","","classes/Admin/LogsController.html","",""],["Admin::ProjectsController","","classes/Admin/ProjectsController.html","",""],["Admin::ResqueController","","classes/Admin/ResqueController.html","",""],["Admin::TeamMembersController","","classes/Admin/TeamMembersController.html","",""],["Admin::UsersController","","classes/Admin/UsersController.html","",""],["AdminController","","classes/AdminController.html","","

Provides a base class for Admin controllers to subclass\n

Automatically sets the layout and ensures an administrator …\n"],["ApplicationController","","classes/ApplicationController.html","",""],["ApplicationDecorator","","classes/ApplicationDecorator.html","",""],["ApplicationHelper","","classes/ApplicationHelper.html","",""],["AttachmentUploader","","classes/AttachmentUploader.html","",""],["Authority","","classes/Authority.html","",""],["BaseContext","","classes/BaseContext.html","",""],["BlameController","","classes/BlameController.html","","

Controller for viewing a file’s blame\n"],["BlobController","","classes/BlobController.html","","

Controller for viewing a file’s blame\n"],["Commit","","classes/Commit.html","",""],["CommitController","","classes/CommitController.html","","

Controller for a specific Commit\n

Not to be confused with CommitsController, plural.\n"],["CommitDecorator","","classes/CommitDecorator.html","",""],["CommitLoadContext","","classes/CommitLoadContext.html","",""],["CommitsController","","classes/CommitsController.html","",""],["CommitsHelper","","classes/CommitsHelper.html","",""],["CompareController","","classes/CompareController.html","",""],["DashboardController","","classes/DashboardController.html","",""],["DashboardHelper","","classes/DashboardHelper.html","",""],["DeployKeysController","","classes/DeployKeysController.html","",""],["ErrorsController","","classes/ErrorsController.html","",""],["Event","","classes/Event.html","","

Schema Information\n

Table name: events\n\n

id          :integer          not null, primary key\ntarget_type :string(255) ...
\n"],["EventDecorator","","classes/EventDecorator.html","",""],["EventFilter","","classes/EventFilter.html","",""],["EventsHelper","","classes/EventsHelper.html","",""],["ExtractsPath","","classes/ExtractsPath.html","","

Module providing methods for dealing with separating a tree-ish string and\na file path string when combined …\n"],["ExtractsPath::InvalidPathError","","classes/ExtractsPath/InvalidPathError.html","","

Raised when given an invalid file path\n"],["FileSizeValidator","","classes/FileSizeValidator.html","",""],["FileSizeValidator::Helper","","classes/FileSizeValidator/Helper.html","",""],["GitHost","","classes/GitHost.html","",""],["Gitlab","","classes/Gitlab.html","","

ProjectMover class\n

Used for moving project repositories from one subdir to another\n"],["Gitlab::API","","classes/Gitlab/API.html","",""],["Gitlab::APIHelpers","","classes/Gitlab/APIHelpers.html","",""],["Gitlab::AppLogger","","classes/Gitlab/AppLogger.html","",""],["Gitlab::Auth","","classes/Gitlab/Auth.html","",""],["Gitlab::Entities","","classes/Gitlab/Entities.html","",""],["Gitlab::Entities::Hook","","classes/Gitlab/Entities/Hook.html","",""],["Gitlab::Entities::Issue","","classes/Gitlab/Entities/Issue.html","",""],["Gitlab::Entities::MRNote","","classes/Gitlab/Entities/MRNote.html","",""],["Gitlab::Entities::MergeRequest","","classes/Gitlab/Entities/MergeRequest.html","",""],["Gitlab::Entities::Milestone","","classes/Gitlab/Entities/Milestone.html","",""],["Gitlab::Entities::Note","","classes/Gitlab/Entities/Note.html","",""],["Gitlab::Entities::Project","","classes/Gitlab/Entities/Project.html","",""],["Gitlab::Entities::ProjectMember","","classes/Gitlab/Entities/ProjectMember.html","",""],["Gitlab::Entities::ProjectSnippet","","classes/Gitlab/Entities/ProjectSnippet.html","",""],["Gitlab::Entities::RepoCommit","","classes/Gitlab/Entities/RepoCommit.html","",""],["Gitlab::Entities::RepoObject","","classes/Gitlab/Entities/RepoObject.html","",""],["Gitlab::Entities::SSHKey","","classes/Gitlab/Entities/SSHKey.html","",""],["Gitlab::Entities::User","","classes/Gitlab/Entities/User.html","",""],["Gitlab::Entities::UserBasic","","classes/Gitlab/Entities/UserBasic.html","",""],["Gitlab::Entities::UserLogin","","classes/Gitlab/Entities/UserLogin.html","",""],["Gitlab::GitLogger","","classes/Gitlab/GitLogger.html","",""],["Gitlab::GitStats","","classes/Gitlab/GitStats.html","",""],["Gitlab::Gitolite","","classes/Gitlab/Gitolite.html","",""],["Gitlab::Gitolite::AccessDenied","","classes/Gitlab/Gitolite/AccessDenied.html","",""],["Gitlab::GitoliteConfig","","classes/Gitlab/GitoliteConfig.html","",""],["Gitlab::GitoliteConfig::PullError","","classes/Gitlab/GitoliteConfig/PullError.html","",""],["Gitlab::GitoliteConfig::PushError","","classes/Gitlab/GitoliteConfig/PushError.html","",""],["Gitlab::Graph","","classes/Gitlab/Graph.html","",""],["Gitlab::Graph::Commit","","classes/Gitlab/Graph/Commit.html","",""],["Gitlab::Graph::JsonBuilder","","classes/Gitlab/Graph/JsonBuilder.html","",""],["Gitlab::InlineDiff","","classes/Gitlab/InlineDiff.html","",""],["Gitlab::Issues","","classes/Gitlab/Issues.html","","

Issues API\n"],["Gitlab::Logger","","classes/Gitlab/Logger.html","",""],["Gitlab::Markdown","","classes/Gitlab/Markdown.html","","

Custom parser for GitLab-flavored Markdown\n

It replaces references in the text with links to the appropriate …\n"],["Gitlab::MergeRequests","","classes/Gitlab/MergeRequests.html","","

MergeRequest API\n"],["Gitlab::Milestones","","classes/Gitlab/Milestones.html","","

Milestones API\n"],["Gitlab::Notes","","classes/Gitlab/Notes.html","","

Notes API\n"],["Gitlab::ProjectMover","","classes/Gitlab/ProjectMover.html","",""],["Gitlab::ProjectMover::ProjectMoveError","","classes/Gitlab/ProjectMover/ProjectMoveError.html","",""],["Gitlab::Projects","","classes/Gitlab/Projects.html","","

Projects API\n"],["Gitlab::Regex","","classes/Gitlab/Regex.html","",""],["Gitlab::Satellite","","classes/Gitlab/Satellite.html","",""],["Gitlab::Satellite::Action","","classes/Gitlab/Satellite/Action.html","",""],["Gitlab::Satellite::EditFileAction","","classes/Gitlab/Satellite/EditFileAction.html","","

GitLab server-side file update and commit\n"],["Gitlab::Satellite::MergeAction","","classes/Gitlab/Satellite/MergeAction.html","","

GitLab server-side merge\n"],["Gitlab::Satellite::Satellite","","classes/Gitlab/Satellite/Satellite.html","",""],["Gitlab::Seeder","","classes/Gitlab/Seeder.html","",""],["Gitlab::Session","","classes/Gitlab/Session.html","","

Users API\n"],["Gitlab::Theme","","classes/Gitlab/Theme.html","",""],["Gitlab::Users","","classes/Gitlab/Users.html","","

Users API\n"],["GitlabCiService","","classes/GitlabCiService.html","","

Schema Information\n

Table name: services\n\n

id          :integer          not null, primary key\ntype       ...
\n"],["GitlabMarkdownHelper","","classes/GitlabMarkdownHelper.html","",""],["Grack","","classes/Grack.html","",""],["Grack::Auth","","classes/Grack/Auth.html","",""],["Group","","classes/Group.html","","

Schema Information\n

Table name: namespaces\n\n

id         :integer          not null, primary key\nname      ...
\n"],["GroupsController","","classes/GroupsController.html","",""],["HelpController","","classes/HelpController.html","",""],["HooksController","","classes/HooksController.html","",""],["Issue","","classes/Issue.html","","

Schema Information\n

Table name: issues\n\n

id           :integer          not null, primary key\ntitle       ...
\n"],["IssueCommonality","","classes/IssueCommonality.html","","

Contains common functionality shared between Issues and MergeRequests\n"],["IssueCommonality::ClassMethods","","classes/IssueCommonality/ClassMethods.html","",""],["IssueObserver","","classes/IssueObserver.html","",""],["IssuesBulkUpdateContext","","classes/IssuesBulkUpdateContext.html","",""],["IssuesController","","classes/IssuesController.html","",""],["IssuesHelper","","classes/IssuesHelper.html","",""],["IssuesListContext","","classes/IssuesListContext.html","",""],["Key","","classes/Key.html","",""],["KeyObserver","","classes/KeyObserver.html","",""],["KeysController","","classes/KeysController.html","",""],["LabelsController","","classes/LabelsController.html","",""],["MergeRequest","","classes/MergeRequest.html","",""],["MergeRequestObserver","","classes/MergeRequestObserver.html","",""],["MergeRequestsController","","classes/MergeRequestsController.html","",""],["MergeRequestsHelper","","classes/MergeRequestsHelper.html","",""],["MergeRequestsLoadContext","","classes/MergeRequestsLoadContext.html","","

Build collection of Merge Requests based on filtering passed via params for\n@project\n"],["Milestone","","classes/Milestone.html","","

Schema Information\n

Table name: milestones\n\n

id          :integer          not null, primary key\ntitle    ...
\n"],["MilestonesController","","classes/MilestonesController.html","",""],["Namespace","","classes/Namespace.html","","

Schema Information\n

Table name: namespaces\n\n

id         :integer          not null, primary key\nname      ...
\n"],["NamespacedProject","","classes/NamespacedProject.html","",""],["NamespacesHelper","","classes/NamespacesHelper.html","",""],["Note","","classes/Note.html","",""],["NoteEvent","","classes/NoteEvent.html","",""],["NoteObserver","","classes/NoteObserver.html","",""],["Notes","","classes/Notes.html","",""],["Notes::CreateContext","","classes/Notes/CreateContext.html","",""],["Notes::LoadContext","","classes/Notes/LoadContext.html","",""],["NotesController","","classes/NotesController.html","",""],["NotesHelper","","classes/NotesHelper.html","",""],["Notify","","classes/Notify.html","",""],["OmniauthCallbacksController","","classes/OmniauthCallbacksController.html","",""],["PostReceive","","classes/PostReceive.html","",""],["ProfileHelper","","classes/ProfileHelper.html","",""],["ProfilesController","","classes/ProfilesController.html","",""],["Project","","classes/Project.html","",""],["Project::TransferError","","classes/Project/TransferError.html","",""],["ProjectHook","","classes/ProjectHook.html","","

Schema Information\n

Table name: web_hooks\n\n

id         :integer          not null, primary key\nurl        ...
\n"],["ProjectObserver","","classes/ProjectObserver.html","",""],["ProjectResourceController","","classes/ProjectResourceController.html","",""],["ProjectUpdateContext","","classes/ProjectUpdateContext.html","",""],["ProjectsController","","classes/ProjectsController.html","",""],["ProjectsHelper","","classes/ProjectsHelper.html","",""],["ProtectedBranch","","classes/ProtectedBranch.html","","

Schema Information\n

Table name: protected_branches\n\n

id         :integer          not null, primary key\nproject_id ...
\n"],["ProtectedBranchesController","","classes/ProtectedBranchesController.html","",""],["PushEvent","","classes/PushEvent.html","",""],["PushObserver","","classes/PushObserver.html","","

Includes methods for handling Git Push events\n

Triggered by PostReceive job\n"],["Redcarpet","","classes/Redcarpet.html","",""],["Redcarpet::Render","","classes/Redcarpet/Render.html","",""],["Redcarpet::Render::GitlabHTML","","classes/Redcarpet/Render/GitlabHTML.html","",""],["RefsController","","classes/RefsController.html","",""],["RepositoriesController","","classes/RepositoriesController.html","",""],["Repository","","classes/Repository.html","",""],["SearchContext","","classes/SearchContext.html","",""],["SearchController","","classes/SearchController.html","",""],["Service","","classes/Service.html","","

Schema Information\n

Table name: services\n\n

id          :integer          not null, primary key\ntype       ...
\n"],["ServiceHook","","classes/ServiceHook.html","","

Schema Information\n

Table name: web_hooks\n\n

id         :integer          not null, primary key\nurl        ...
\n"],["ServicesController","","classes/ServicesController.html","",""],["Snippet","","classes/Snippet.html","","

Schema Information\n

Table name: snippets\n\n

id         :integer          not null, primary key\ntitle      :string(255) ...
\n"],["SnippetsController","","classes/SnippetsController.html","",""],["SnippetsHelper","","classes/SnippetsHelper.html","",""],["StaticModel","","classes/StaticModel.html","","

Provides an ActiveRecord-like interface to a model whose data is not\npersisted to a database.\n"],["StaticModel::ClassMethods","","classes/StaticModel/ClassMethods.html","",""],["SystemHook","","classes/SystemHook.html","","

Schema Information\n

Table name: web_hooks\n\n

id         :integer          not null, primary key\nurl        ...
\n"],["SystemHookObserver","","classes/SystemHookObserver.html","",""],["SystemHookWorker","","classes/SystemHookWorker.html","",""],["TabHelper","","classes/TabHelper.html","",""],["TagsHelper","","classes/TagsHelper.html","",""],["Team","","classes/Team.html","",""],["TeamMembersController","","classes/TeamMembersController.html","",""],["TestHookContext","","classes/TestHookContext.html","",""],["Tree","","classes/Tree.html","",""],["TreeController","","classes/TreeController.html","","

Controller for viewing a repository’s file structure\n"],["TreeDecorator","","classes/TreeDecorator.html","",""],["TreeHelper","","classes/TreeHelper.html","",""],["User","","classes/User.html","","

Schema Information\n

Table name: users\n\n

id                     :integer          not null, primary key\nemail ...
\n"],["UserDecorator","","classes/UserDecorator.html","",""],["UserObserver","","classes/UserObserver.html","",""],["UsersProject","","classes/UsersProject.html","","

Schema Information\n

Table name: users_projects\n\n

id             :integer          not null, primary key\nuser_id ...
\n"],["UsersProjectObserver","","classes/UsersProjectObserver.html","",""],["Votes","","classes/Votes.html","",""],["WebHook","","classes/WebHook.html","","

Schema Information\n

Table name: web_hooks\n\n

id         :integer          not null, primary key\nurl        ...
\n"],["Wiki","","classes/Wiki.html","","

Schema Information\n

Table name: wikis\n\n

id         :integer          not null, primary key\ntitle      :string(255) ...
\n"],["WikisController","","classes/WikisController.html","",""],["==","StaticModel","classes/StaticModel.html#method-i-3D-3D","(other)",""],["[]","StaticModel","classes/StaticModel.html#method-i-5B-5D","(key)","

Used by AR for fetching attributes\n

Pass it along if we respond to it.\n"],["_indexes_of_changed_lines","Gitlab::InlineDiff","classes/Gitlab/InlineDiff.html#method-c-_indexes_of_changed_lines","(diff_arr)",""],["abilities","Account","classes/Account.html#method-i-abilities","()",""],["abilities","ApplicationController","classes/ApplicationController.html#method-i-abilities","()",""],["abilities","BaseContext","classes/BaseContext.html#method-i-abilities","()",""],["abilities","Grack::Auth","classes/Grack/Auth.html#method-i-abilities","()",""],["access_denied!","ApplicationController","classes/ApplicationController.html#method-i-access_denied-21","()",""],["access_options","Project","classes/Project.html#method-c-access_options","()",""],["access_roles","UsersProject","classes/UsersProject.html#method-c-access_roles","()",""],["account","ProfilesController","classes/ProfilesController.html#method-i-account","()",""],["action_name","Event","classes/Event.html#method-i-action_name","()",""],["activated?","GitlabCiService","classes/GitlabCiService.html#method-i-activated-3F","()",""],["active","Project","classes/Project.html#method-c-active","()",""],["active?","EventFilter","classes/EventFilter.html#method-i-active-3F","(key)",""],["add_abilities","ApplicationController","classes/ApplicationController.html#method-i-add_abilities","()",""],["add_access","Authority","classes/Authority.html#method-i-add_access","(user, *access)","

Compatible with all access rights Should be rewrited for new access rights\n"],["add_refs","Gitlab::Graph::Commit","classes/Gitlab/Graph/Commit.html#method-i-add_refs","(ref_cache, repo)",""],["add_user_id_to_team","Team","classes/Team.html#method-i-add_user_id_to_team","(user_id, access_role)","

Add user to project with passed access role by user id\n"],["add_user_to_team","Team","classes/Team.html#method-i-add_user_to_team","(user, access_role)","

Add user to project with passed access role\n"],["add_users_ids_to_team","Team","classes/Team.html#method-i-add_users_ids_to_team","(users_ids, access_role)","

Add multiple users to project with same access role by user ids\n"],["add_users_into_projects","UsersProject","classes/UsersProject.html#method-c-add_users_into_projects","(project_ids, user_ids, project_access)",""],["add_users_to_project_teams","Group","classes/Group.html#method-i-add_users_to_project_teams","(user_ids, project_access)",""],["add_users_to_team","Team","classes/Team.html#method-i-add_users_to_team","(users, access_role)","

Add multiple users to project with same access role\n"],["admin_all_repo","Gitlab::GitoliteConfig","classes/Gitlab/GitoliteConfig.html#method-i-admin_all_repo","()","

Enable access to all repos for gitolite admin. We use it for accept merge\nrequest feature\n"],["admin_all_repo!","Gitlab::GitoliteConfig","classes/Gitlab/GitoliteConfig.html#method-i-admin_all_repo-21","()",""],["after_commit","UsersProjectObserver","classes/UsersProjectObserver.html#method-i-after_commit","(users_project)",""],["after_create","ActivityObserver","classes/ActivityObserver.html#method-i-after_create","(record)",""],["after_create","IssueObserver","classes/IssueObserver.html#method-i-after_create","(issue)",""],["after_create","MergeRequestObserver","classes/MergeRequestObserver.html#method-i-after_create","(merge_request)",""],["after_create","NoteObserver","classes/NoteObserver.html#method-i-after_create","(note)",""],["after_create","ProjectObserver","classes/ProjectObserver.html#method-i-after_create","(project)",""],["after_create","SystemHookObserver","classes/SystemHookObserver.html#method-i-after_create","(model)",""],["after_create","UserObserver","classes/UserObserver.html#method-i-after_create","(user)",""],["after_create","UsersProjectObserver","classes/UsersProjectObserver.html#method-i-after_create","(users_project)",""],["after_destroy","KeyObserver","classes/KeyObserver.html#method-i-after_destroy","(key)",""],["after_destroy","ProjectObserver","classes/ProjectObserver.html#method-i-after_destroy","(project)",""],["after_destroy","SystemHookObserver","classes/SystemHookObserver.html#method-i-after_destroy","(model)",""],["after_destroy","UserObserver","classes/UserObserver.html#method-i-after_destroy","(user)",""],["after_destroy","UsersProjectObserver","classes/UsersProjectObserver.html#method-i-after_destroy","(users_project)",""],["after_save","ActivityObserver","classes/ActivityObserver.html#method-i-after_save","(record)",""],["after_save","KeyObserver","classes/KeyObserver.html#method-i-after_save","(key)",""],["after_save","UserObserver","classes/UserObserver.html#method-i-after_save","(user)",""],["after_sign_in_path_for","ApplicationController","classes/ApplicationController.html#method-i-after_sign_in_path_for","(resource)",""],["after_update","IssueObserver","classes/IssueObserver.html#method-i-after_update","(issue)",""],["after_update","MergeRequestObserver","classes/MergeRequestObserver.html#method-i-after_update","(merge_request)",""],["after_update","ProjectObserver","classes/ProjectObserver.html#method-i-after_update","(project)",""],["all_hooks_fire","SystemHook","classes/SystemHook.html#method-c-all_hooks_fire","(data)",""],["allow_read_for?","Authority","classes/Authority.html#method-i-allow_read_for-3F","(user)",""],["allowed","Ability","classes/Ability.html#method-c-allowed","(object, subject)",""],["allowed_tree_edit?","TreeHelper","classes/TreeHelper.html#method-i-allowed_tree_edit-3F","()",""],["app_theme","ApplicationHelper","classes/ApplicationHelper.html#method-i-app_theme","()",""],["apply","Gitlab::GitoliteConfig","classes/Gitlab/GitoliteConfig.html#method-i-apply","()",""],["apply_filter","EventFilter","classes/EventFilter.html#method-i-apply_filter","(events)",""],["apply_import","TeamMembersController","classes/TeamMembersController.html#method-i-apply_import","()",""],["archive","RepositoriesController","classes/RepositoriesController.html#method-i-archive","()",""],["archive_repo","Repository","classes/Repository.html#method-i-archive_repo","(ref)","

Archive Project to .tar.gz\n

Already packed repo archives stored at\napp_root/tmp/repositories/project_name/project_name-commit-id.tag.gz …\n"],["assign_ref_vars","ExtractsPath","classes/ExtractsPath.html#method-i-assign_ref_vars","()","

Assigns common instance variables for views working with Git tree-ish\nobjects\n

Assignments are:\n

@id …\n"],["async_execute","SystemHook","classes/SystemHook.html#method-i-async_execute","(data)",""],["attributes_for_keys","Gitlab::APIHelpers","classes/Gitlab/APIHelpers.html#method-i-attributes_for_keys","(keys)",""],["authbutton","ApplicationHelper","classes/ApplicationHelper.html#method-i-authbutton","(provider, size = 64)",""],["authenticate!","Gitlab::APIHelpers","classes/Gitlab/APIHelpers.html#method-i-authenticate-21","()",""],["authenticate_admin!","AdminController","classes/AdminController.html#method-i-authenticate_admin-21","()",""],["authenticated_as_admin!","Gitlab::APIHelpers","classes/Gitlab/APIHelpers.html#method-i-authenticated_as_admin-21","()",""],["author","Event","classes/Event.html#method-i-author","()",""],["author_email","Commit","classes/Commit.html#method-i-author_email","()",""],["author_id","Milestone","classes/Milestone.html#method-i-author_id","()",""],["author_link","CommitDecorator","classes/CommitDecorator.html#method-i-author_link","(options = {})","

Returns a link to the commit author. If the author has a matching user and\nis a member of the current …\n"],["author_name","Commit","classes/Commit.html#method-i-author_name","()",""],["authorize!","Gitlab::APIHelpers","classes/Gitlab/APIHelpers.html#method-i-authorize-21","(action, subject)",""],["authorize_admin_issue!","IssuesController","classes/IssuesController.html#method-i-authorize_admin_issue-21","()",""],["authorize_admin_merge_request!","MergeRequestsController","classes/MergeRequestsController.html#method-i-authorize_admin_merge_request-21","()",""],["authorize_admin_milestone!","MilestonesController","classes/MilestonesController.html#method-i-authorize_admin_milestone-21","()",""],["authorize_admin_snippet!","SnippetsController","classes/SnippetsController.html#method-i-authorize_admin_snippet-21","()",""],["authorize_code_access!","ApplicationController","classes/ApplicationController.html#method-i-authorize_code_access-21","()",""],["authorize_modify_issue!","IssuesController","classes/IssuesController.html#method-i-authorize_modify_issue-21","()",""],["authorize_modify_merge_request!","MergeRequestsController","classes/MergeRequestsController.html#method-i-authorize_modify_merge_request-21","()",""],["authorize_modify_snippet!","SnippetsController","classes/SnippetsController.html#method-i-authorize_modify_snippet-21","()",""],["authorize_project!","ApplicationController","classes/ApplicationController.html#method-i-authorize_project-21","(action)",""],["authorize_read_group!","GroupsController","classes/GroupsController.html#method-i-authorize_read_group-21","()","

Dont allow unauthorized access to group\n"],["authorized_for","Project","classes/Project.html#method-c-authorized_for","(user)",""],["authorized_groups","Account","classes/Account.html#method-i-authorized_groups","()",""],["authorized_projects","Account","classes/Account.html#method-i-authorized_projects","()",""],["authors","Gitlab::GitStats","classes/Gitlab/GitStats.html#method-i-authors","()",""],["authors_count","Gitlab::GitStats","classes/Gitlab/GitStats.html#method-i-authors_count","()",""],["automerge","MergeRequestsController","classes/MergeRequestsController.html#method-i-automerge","()",""],["automerge!","MergeRequest","classes/MergeRequest.html#method-i-automerge-21","(current_user)",""],["automerge_check","MergeRequestsController","classes/MergeRequestsController.html#method-i-automerge_check","()",""],["avatar_image","UserDecorator","classes/UserDecorator.html#method-i-avatar_image","(size = 16)",""],["base_class","StaticModel::ClassMethods","classes/StaticModel/ClassMethods.html#method-i-base_class","()","

Used by ActiveRecord’s polymorphic association to set object_type\n"],["base_space","Gitlab::Graph::JsonBuilder","classes/Gitlab/Graph/JsonBuilder.html#method-i-base_space","(leaves, map)",""],["block","Account","classes/Account.html#method-i-block","()","

Remove user from all projects and set blocked attribute to true\n"],["block","Admin::UsersController","classes/Admin/UsersController.html#method-i-block","()",""],["block_code","Redcarpet::Render::GitlabHTML","classes/Redcarpet/Render/GitlabHTML.html#method-i-block_code","(code, language)",""],["branch?","PushEvent","classes/PushEvent.html#method-i-branch-3F","()",""],["branch_from","MergeRequestsController","classes/MergeRequestsController.html#method-i-branch_from","()",""],["branch_name","PushEvent","classes/PushEvent.html#method-i-branch_name","()",""],["branch_names","Repository","classes/Repository.html#method-i-branch_names","()","

Returns an Array of branch names\n"],["branch_to","MergeRequestsController","classes/MergeRequestsController.html#method-i-branch_to","()",""],["branches","RepositoriesController","classes/RepositoriesController.html#method-i-branches","()",""],["branches","Repository","classes/Repository.html#method-i-branches","()","

Returns an Array of Branches\n"],["branches_tab_class","TabHelper","classes/TabHelper.html#method-i-branches_tab_class","()",""],["breadcrumbs","TreeDecorator","classes/TreeDecorator.html#method-i-breadcrumbs","(max_links = 2)",""],["breadcrumbs","TreeHelper","classes/TreeHelper.html#method-i-breadcrumbs","()","

Breadcrumb links for a Project and, if applicable, a tree path\n"],["broken_diffs?","MergeRequest","classes/MergeRequest.html#method-i-broken_diffs-3F","()",""],["build","Gitlab::Logger","classes/Gitlab/Logger.html#method-c-build","()",""],["build_commit_note","Project","classes/Project.html#method-i-build_commit_note","(commit)",""],["build_graph","Gitlab::GitStats","classes/Gitlab/GitStats.html#method-i-build_graph","(n = 4)",""],["build_line_anchor","CommitsHelper","classes/CommitsHelper.html#method-i-build_line_anchor","(index, line_new, line_old)",""],["build_page","GitlabCiService","classes/GitlabCiService.html#method-i-build_page","(sha)",""],["bulk_delete","UsersProject","classes/UsersProject.html#method-c-bulk_delete","(project, user_ids)",""],["bulk_import","UsersProject","classes/UsersProject.html#method-c-bulk_import","(project, user_ids, project_access)","

TODO: depreceate in future in favor of add_users_into_projects\n"],["bulk_update","IssuesController","classes/IssuesController.html#method-i-bulk_update","()",""],["bulk_update","UsersProject","classes/UsersProject.html#method-c-bulk_update","(project, user_ids, project_access)",""],["can?","Account","classes/Account.html#method-i-can-3F","(action, subject)",""],["can?","ApplicationController","classes/ApplicationController.html#method-i-can-3F","(object, action, subject)",""],["can?","BaseContext","classes/BaseContext.html#method-i-can-3F","(object, action, subject)",""],["can?","Gitlab::APIHelpers","classes/Gitlab/APIHelpers.html#method-i-can-3F","(object, action, subject)",""],["can?","Grack::Auth","classes/Grack/Auth.html#method-i-can-3F","(object, action, subject)",""],["can_be_closed?","Milestone","classes/Milestone.html#method-i-can_be_closed-3F","()",""],["can_be_merged?","Gitlab::Satellite::MergeAction","classes/Gitlab/Satellite/MergeAction.html#method-i-can_be_merged-3F","()","

Checks if a merge request can be executed without user interaction\n"],["can_be_merged?","MergeRequest","classes/MergeRequest.html#method-i-can_be_merged-3F","()",""],["can_create_group?","Account","classes/Account.html#method-i-can_create_group-3F","()",""],["can_create_project?","Account","classes/Account.html#method-i-can_create_project-3F","()",""],["can_edit?","Gitlab::Satellite::EditFileAction","classes/Gitlab/Satellite/EditFileAction.html#method-i-can_edit-3F","(last_commit)",""],["cared_merge_requests","Account","classes/Account.html#method-i-cared_merge_requests","()",""],["changed_issue?","Event","classes/Event.html#method-i-changed_issue-3F","()",""],["changed_merge_request?","Event","classes/Event.html#method-i-changed_merge_request-3F","()",""],["check_if_can_be_merged","MergeRequest","classes/MergeRequest.html#method-i-check_if_can_be_merged","()",""],["check_limit","Project","classes/Project.html#method-i-check_limit","()",""],["check_validity!","FileSizeValidator","classes/FileSizeValidator.html#method-i-check_validity-21","()",""],["chief","NamespacedProject","classes/NamespacedProject.html#method-i-chief","()",""],["ci_build_details_path","MergeRequestsHelper","classes/MergeRequestsHelper.html#method-i-ci_build_details_path","(merge_request)",""],["ci_status","MergeRequestsController","classes/MergeRequestsController.html#method-i-ci_status","()",""],["clean_repo","Gitlab::GitoliteConfig","classes/Gitlab/GitoliteConfig.html#method-i-clean_repo","(repo_name)",""],["clear_and_update!","Gitlab::Satellite::Satellite","classes/Gitlab/Satellite/Satellite.html#method-i-clear_and_update-21","()",""],["closed?","Event","classes/Event.html#method-i-closed-3F","()",""],["closed_event","MergeRequest","classes/MergeRequest.html#method-i-closed_event","()",""],["closed_items_count","Milestone","classes/Milestone.html#method-i-closed_items_count","()",""],["code","Project","classes/Project.html#method-i-code","()","

For compatibility with old code\n"],["collect_authors","Gitlab::GitStats","classes/Gitlab/GitStats.html#method-i-collect_authors","()",""],["collect_commits","Gitlab::Graph::JsonBuilder","classes/Gitlab/Graph/JsonBuilder.html#method-i-collect_commits","()","

Get commits from repository\n"],["comments","EventFilter","classes/EventFilter.html#method-c-comments","()",""],["commit","ProtectedBranch","classes/ProtectedBranch.html#method-i-commit","()",""],["commit","Repository","classes/Repository.html#method-i-commit","(commit_id = nil)",""],["commit!","Gitlab::Satellite::EditFileAction","classes/Gitlab/Satellite/EditFileAction.html#method-i-commit-21","(content, commit_message, last_commit)","

Updates the files content and creates a new commit for it\n

Returns false if the ref has been updated while …\n"],["commit_author","Note","classes/Note.html#method-i-commit_author","()",""],["commit_badge_path","GitlabCiService","classes/GitlabCiService.html#method-i-commit_badge_path","(sha)",""],["commit_from","PushEvent","classes/PushEvent.html#method-i-commit_from","()",""],["commit_line_notes","Project","classes/Project.html#method-i-commit_line_notes","(commit)",""],["commit_notes","Project","classes/Project.html#method-i-commit_notes","(commit)",""],["commit_status","GitlabCiService","classes/GitlabCiService.html#method-i-commit_status","(sha)",""],["commit_status_path","GitlabCiService","classes/GitlabCiService.html#method-i-commit_status_path","(sha)",""],["commit_to","PushEvent","classes/PushEvent.html#method-i-commit_to","()",""],["commit_to_html","CommitsHelper","classes/CommitsHelper.html#method-i-commit_to_html","(commit)",""],["commits","Commit","classes/Commit.html#method-c-commits","(repo, ref, path = nil, limit = nil, offset = nil)",""],["commits","MergeRequest","classes/MergeRequest.html#method-i-commits","()",""],["commits","PushEvent","classes/PushEvent.html#method-i-commits","()","

Max 20 commits from push DESC\n"],["commits","Repository","classes/Repository.html#method-i-commits","(ref, path = nil, limit = nil, offset = nil)",""],["commits_between","Commit","classes/Commit.html#method-c-commits_between","(repo, from, to)",""],["commits_between","Repository","classes/Repository.html#method-i-commits_between","(from, to)",""],["commits_count","Gitlab::GitStats","classes/Gitlab/GitStats.html#method-i-commits_count","()",""],["commits_count","PushEvent","classes/PushEvent.html#method-i-commits_count","()",""],["commits_since","Commit","classes/Commit.html#method-c-commits_since","(repo, date)",""],["commits_since","Repository","classes/Repository.html#method-i-commits_since","(date)",""],["commits_with_refs","Commit","classes/Commit.html#method-c-commits_with_refs","(repo, n = 20)",""],["commits_with_refs","Repository","classes/Repository.html#method-i-commits_with_refs","(n = 20)",""],["committer_email","Commit","classes/Commit.html#method-i-committer_email","()",""],["committer_link","CommitDecorator","classes/CommitDecorator.html#method-i-committer_link","(options = {})","

Just like #author_link but for the committer.\n"],["committer_name","Commit","classes/Commit.html#method-i-committer_name","()",""],["common_notes","Project","classes/Project.html#method-i-common_notes","()",""],["compare","Commit","classes/Commit.html#method-c-compare","(project, from, to)",""],["compose_service_hook","GitlabCiService","classes/GitlabCiService.html#method-i-compose_service_hook","()",""],["config","Gitlab::Gitolite","classes/Gitlab/Gitolite.html#method-i-config","()",""],["content_types","Snippet","classes/Snippet.html#method-c-content_types","()",""],["create","Admin::GroupsController","classes/Admin/GroupsController.html#method-i-create","()",""],["create","Admin::HooksController","classes/Admin/HooksController.html#method-i-create","()",""],["create","Admin::UsersController","classes/Admin/UsersController.html#method-i-create","()",""],["create","CompareController","classes/CompareController.html#method-i-create","()",""],["create","DeployKeysController","classes/DeployKeysController.html#method-i-create","()",""],["create","Gitlab::Satellite::Satellite","classes/Gitlab/Satellite/Satellite.html#method-i-create","()",""],["create","HooksController","classes/HooksController.html#method-i-create","()",""],["create","IssuesController","classes/IssuesController.html#method-i-create","()",""],["create","KeysController","classes/KeysController.html#method-i-create","()",""],["create","MergeRequestsController","classes/MergeRequestsController.html#method-i-create","()",""],["create","MilestonesController","classes/MilestonesController.html#method-i-create","()",""],["create","NotesController","classes/NotesController.html#method-i-create","()",""],["create","ProjectsController","classes/ProjectsController.html#method-i-create","()",""],["create","ProtectedBranchesController","classes/ProtectedBranchesController.html#method-i-create","()",""],["create","SnippetsController","classes/SnippetsController.html#method-i-create","()",""],["create","TeamMembersController","classes/TeamMembersController.html#method-i-create","()",""],["create","WikisController","classes/WikisController.html#method-i-create","()",""],["create_by_user","Project","classes/Project.html#method-c-create_by_user","(params, user)",""],["create_from_omniauth","Gitlab::Auth","classes/Gitlab/Auth.html#method-i-create_from_omniauth","(auth, ldap = false)",""],["create_from_omniauth","User","classes/User.html#method-c-create_from_omniauth","(auth, ldap = false)",""],["create_repository","Gitlab::Gitolite","classes/Gitlab/Gitolite.html#method-i-create_repository","(project)",""],["create_status_change_note","Note","classes/Note.html#method-c-create_status_change_note","(noteable, author, status)",""],["created_at","Commit","classes/Commit.html#method-i-created_at","()",""],["css_class_by_id","Gitlab::Theme","classes/Gitlab/Theme.html#method-c-css_class_by_id","(id)",""],["current_action?","ApplicationHelper","classes/ApplicationHelper.html#method-i-current_action-3F","(*args)","

Check if a partcular action is the current one\n

args - One or more action names to check\n

Examples\n"],["current_controller?","ApplicationHelper","classes/ApplicationHelper.html#method-i-current_controller-3F","(*args)","

Check if a particular controller is the current one\n

args - One or more controller names to check\n

Examples …\n"],["current_ref","Grack::Auth","classes/Grack/Auth.html#method-i-current_ref","()",""],["current_user","Gitlab::APIHelpers","classes/Gitlab/APIHelpers.html#method-i-current_user","()",""],["dashboard_filter","DashboardController","classes/DashboardController.html#method-i-dashboard_filter","(items)",""],["dashboard_filter_path","DashboardHelper","classes/DashboardHelper.html#method-i-dashboard_filter_path","(entity, options={})",""],["data","Snippet","classes/Snippet.html#method-i-data","()",""],["default_filter","EventFilter","classes/EventFilter.html#method-c-default_filter","()",""],["default_regex","Gitlab::Regex","classes/Gitlab/Regex.html#method-i-default_regex","()",""],["define_show_vars","MergeRequestsController","classes/MergeRequestsController.html#method-i-define_show_vars","()",""],["define_tree_vars","RefsController","classes/RefsController.html#method-i-define_tree_vars","()",""],["delete_users_ids_from_team","Team","classes/Team.html#method-i-delete_users_ids_from_team","(users_ids)","

Delete multiple users from project by user ids\n"],["description","CommitDecorator","classes/CommitDecorator.html#method-i-description","()","

Returns the commits description\n

cut off, ellipses (`&hellp;`) are prepended to the commit message. …\n"],["design","ProfilesController","classes/ProfilesController.html#method-i-design","()",""],["destroy","Admin::GroupsController","classes/Admin/GroupsController.html#method-i-destroy","()",""],["destroy","Admin::HooksController","classes/Admin/HooksController.html#method-i-destroy","()",""],["destroy","Admin::ProjectsController","classes/Admin/ProjectsController.html#method-i-destroy","()",""],["destroy","Admin::TeamMembersController","classes/Admin/TeamMembersController.html#method-i-destroy","()",""],["destroy","Admin::UsersController","classes/Admin/UsersController.html#method-i-destroy","()",""],["destroy","DeployKeysController","classes/DeployKeysController.html#method-i-destroy","()",""],["destroy","HooksController","classes/HooksController.html#method-i-destroy","()",""],["destroy","KeysController","classes/KeysController.html#method-i-destroy","()",""],["destroy","MilestonesController","classes/MilestonesController.html#method-i-destroy","()",""],["destroy","NotesController","classes/NotesController.html#method-i-destroy","()",""],["destroy","ProjectsController","classes/ProjectsController.html#method-i-destroy","()",""],["destroy","ProtectedBranchesController","classes/ProtectedBranchesController.html#method-i-destroy","()",""],["destroy","SnippetsController","classes/SnippetsController.html#method-i-destroy","()",""],["destroy","TeamMembersController","classes/TeamMembersController.html#method-i-destroy","()",""],["destroy","WikisController","classes/WikisController.html#method-i-destroy","()",""],["destroy_project","Gitlab::GitoliteConfig","classes/Gitlab/GitoliteConfig.html#method-i-destroy_project","(project)",""],["destroy_project!","Gitlab::GitoliteConfig","classes/Gitlab/GitoliteConfig.html#method-i-destroy_project-21","(project)",""],["destroy_repository","Repository","classes/Repository.html#method-i-destroy_repository","()",""],["destroyed?","StaticModel","classes/StaticModel.html#method-i-destroyed-3F","()",""],["determine_action","Event","classes/Event.html#method-c-determine_action","(record)",""],["dev_access_for?","Authority","classes/Authority.html#method-i-dev_access_for-3F","(user)",""],["dev_tools","ApplicationController","classes/ApplicationController.html#method-i-dev_tools","()",""],["diff_line_content","CommitsHelper","classes/CommitsHelper.html#method-i-diff_line_content","(line)",""],["different_committer?","Commit","classes/Commit.html#method-i-different_committer-3F","()","

Was this commit committed by a different person than the original author?\n"],["diffs","MergeRequest","classes/MergeRequest.html#method-i-diffs","()",""],["diffs","MergeRequestsController","classes/MergeRequestsController.html#method-i-diffs","()",""],["dir_exists?","Namespace","classes/Namespace.html#method-i-dir_exists-3F","()",""],["discover_default_branch","Repository","classes/Repository.html#method-i-discover_default_branch","()","

Discovers the default branch based on the repository’s available branches\n

If no branches are present, …\n"],["downvote?","Note","classes/Note.html#method-i-downvote-3F","()","

Returns true if this is a downvote note, otherwise false is returned\n"],["downvotes","Votes","classes/Votes.html#method-i-downvotes","()","

Return the number of -1 comments (downvotes)\n"],["downvotes_in_percent","Votes","classes/Votes.html#method-i-downvotes_in_percent","()",""],["each_diff_line","CommitsHelper","classes/CommitsHelper.html#method-i-each_diff_line","(diff_arr, index)",""],["edit","Admin::GroupsController","classes/Admin/GroupsController.html#method-i-edit","()",""],["edit","Admin::ProjectsController","classes/Admin/ProjectsController.html#method-i-edit","()",""],["edit","Admin::TeamMembersController","classes/Admin/TeamMembersController.html#method-i-edit","()",""],["edit","Admin::UsersController","classes/Admin/UsersController.html#method-i-edit","()",""],["edit","IssuesController","classes/IssuesController.html#method-i-edit","()",""],["edit","MergeRequestsController","classes/MergeRequestsController.html#method-i-edit","()",""],["edit","MilestonesController","classes/MilestonesController.html#method-i-edit","()",""],["edit","ProjectsController","classes/ProjectsController.html#method-i-edit","()",""],["edit","ServicesController","classes/ServicesController.html#method-i-edit","()",""],["edit","SnippetsController","classes/SnippetsController.html#method-i-edit","()",""],["edit","TreeController","classes/TreeController.html#method-i-edit","()",""],["edit","WikisController","classes/WikisController.html#method-i-edit","()",""],["emoji_autocomplete_source","ApplicationHelper","classes/ApplicationHelper.html#method-i-emoji_autocomplete_source","()",""],["empty?","Tree","classes/Tree.html#method-i-empty-3F","()",""],["empty_repo?","Repository","classes/Repository.html#method-i-empty_repo-3F","()",""],["enable_automerge","Gitlab::Gitolite","classes/Gitlab/Gitolite.html#method-i-enable_automerge","()",""],["ensure_dir_exist","Namespace","classes/Namespace.html#method-i-ensure_dir_exist","()",""],["entities_per_project","DashboardHelper","classes/DashboardHelper.html#method-i-entities_per_project","(project, entity)",""],["error","Gitlab::Logger","classes/Gitlab/Logger.html#method-c-error","(message)",""],["event_action_name","EventsHelper","classes/EventsHelper.html#method-i-event_action_name","(event)",""],["event_filter","DashboardController","classes/DashboardController.html#method-i-event_filter","()",""],["event_filter_link","EventsHelper","classes/EventsHelper.html#method-i-event_filter_link","(key, tooltip)",""],["event_image","EventsHelper","classes/EventsHelper.html#method-i-event_image","(event)",""],["execute","CommitLoadContext","classes/CommitLoadContext.html#method-i-execute","()",""],["execute","Gitlab::ProjectMover","classes/Gitlab/ProjectMover.html#method-i-execute","()",""],["execute","IssuesBulkUpdateContext","classes/IssuesBulkUpdateContext.html#method-i-execute","()",""],["execute","IssuesListContext","classes/IssuesListContext.html#method-i-execute","()",""],["execute","MergeRequestsLoadContext","classes/MergeRequestsLoadContext.html#method-i-execute","()",""],["execute","Notes::CreateContext","classes/Notes/CreateContext.html#method-i-execute","()",""],["execute","Notes::LoadContext","classes/Notes/LoadContext.html#method-i-execute","()",""],["execute","ProjectUpdateContext","classes/ProjectUpdateContext.html#method-i-execute","(role = :default)",""],["execute","SearchContext","classes/SearchContext.html#method-i-execute","()",""],["execute","TestHookContext","classes/TestHookContext.html#method-i-execute","()",""],["execute","WebHook","classes/WebHook.html#method-i-execute","(data)",""],["execute_hooks","PushObserver","classes/PushObserver.html#method-i-execute_hooks","(data)",""],["execute_services","PushObserver","classes/PushObserver.html#method-i-execute_services","(data)",""],["exists?","Gitlab::Satellite::Satellite","classes/Gitlab/Satellite/Satellite.html#method-i-exists-3F","()",""],["expired?","Milestone","classes/Milestone.html#method-i-expired-3F","()",""],["expired?","Snippet","classes/Snippet.html#method-i-expired-3F","()",""],["expires_at","Milestone","classes/Milestone.html#method-i-expires_at","()",""],["extract_ref","ExtractsPath","classes/ExtractsPath.html#method-i-extract_ref","(input)","

Given a string containing both a Git tree-ish, such as a branch or tag, and\na filesystem path joined …\n"],["failure_message","OmniauthCallbacksController","classes/OmniauthCallbacksController.html#method-i-failure_message","()","

Extend the standard message generation to accept our custom exception\n"],["feed_summary","EventDecorator","classes/EventDecorator.html#method-i-feed_summary","()",""],["feed_title","EventDecorator","classes/EventDecorator.html#method-i-feed_title","()",""],["feed_url","EventDecorator","classes/EventDecorator.html#method-i-feed_url","()",""],["file_name","Gitlab::AppLogger","classes/Gitlab/AppLogger.html#method-c-file_name","()",""],["file_name","Gitlab::GitLogger","classes/Gitlab/GitLogger.html#method-c-file_name","()",""],["files","ProjectsController","classes/ProjectsController.html#method-i-files","()",""],["files_count","Gitlab::GitStats","classes/Gitlab/GitStats.html#method-i-files_count","()",""],["filter","User","classes/User.html#method-c-filter","(filter_name)",""],["find_all_by_branch","MergeRequest","classes/MergeRequest.html#method-c-find_all_by_branch","(branch_name)",""],["find_all_by_milestone","MergeRequest","classes/MergeRequest.html#method-c-find_all_by_milestone","(milestone)",""],["find_for_ldap_auth","Gitlab::Auth","classes/Gitlab/Auth.html#method-i-find_for_ldap_auth","(auth, signed_in_resource = nil)",""],["find_for_ldap_auth","User","classes/User.html#method-c-find_for_ldap_auth","(auth, signed_in_resource = nil)",""],["find_free_space","Gitlab::Graph::JsonBuilder","classes/Gitlab/Graph/JsonBuilder.html#method-i-find_free_space","(leaves, map)",""],["find_or_first","Commit","classes/Commit.html#method-c-find_or_first","(repo, commit_id = nil, root_ref)",""],["find_or_new_for_omniauth","Gitlab::Auth","classes/Gitlab/Auth.html#method-i-find_or_new_for_omniauth","(auth)",""],["find_or_new_for_omniauth","User","classes/User.html#method-c-find_or_new_for_omniauth","(auth)",""],["find_project","Gitlab::APIHelpers","classes/Gitlab/APIHelpers.html#method-i-find_project","()",""],["find_with_namespace","Project","classes/Project.html#method-c-find_with_namespace","(id)",""],["fingerprintable_key","Key","classes/Key.html#method-i-fingerprintable_key","()",""],["first_name","Account","classes/Account.html#method-i-first_name","()",""],["for_commit?","Note","classes/Note.html#method-i-for_commit-3F","()",""],["for_diff_line?","Note","classes/Note.html#method-i-for_diff_line-3F","()",""],["forbidden!","Gitlab::APIHelpers","classes/Gitlab/APIHelpers.html#method-i-forbidden-21","()","

error helpers\n"],["format_message","Gitlab::AppLogger","classes/Gitlab/AppLogger.html#method-i-format_message","(severity, timestamp, progname, msg)",""],["format_message","Gitlab::GitLogger","classes/Gitlab/GitLogger.html#method-i-format_message","(severity, timestamp, progname, msg)",""],["fresh_commits","Commit","classes/Commit.html#method-c-fresh_commits","(repo, n = 10)",""],["fresh_commits","Repository","classes/Repository.html#method-i-fresh_commits","(n = 10)",""],["generate_password","User","classes/User.html#method-i-generate_password","()",""],["gfm","Gitlab::Markdown","classes/Gitlab/Markdown.html#method-i-gfm","(text, html_options = {})","

Public: Parse the provided text with GitLab-Flavored Markdown\n

text - the source text html_options …\n"],["git_error?","Project","classes/Project.html#method-i-git_error-3F","()",""],["git_host","GitHost","classes/GitHost.html#method-i-git_host","()",""],["git_not_found!","ApplicationController","classes/ApplicationController.html#method-i-git_not_found-21","()",""],["githost","ErrorsController","classes/ErrorsController.html#method-i-githost","()",""],["gitlab_auth","User","classes/User.html#method-c-gitlab_auth","()",""],["gitlab_ci?","Project","classes/Project.html#method-i-gitlab_ci-3F","()",""],["gitlab_markdown?","TreeHelper","classes/TreeHelper.html#method-i-gitlab_markdown-3F","(filename)",""],["global_id","Namespace","classes/Namespace.html#method-c-global_id","()",""],["graph","Gitlab::GitStats","classes/Gitlab/GitStats.html#method-i-graph","()",""],["graph","ProjectsController","classes/ProjectsController.html#method-i-graph","()",""],["gravatar_icon","ApplicationHelper","classes/ApplicationHelper.html#method-i-gravatar_icon","(user_email = '', size = nil)",""],["group","GroupsController","classes/GroupsController.html#method-i-group","()",""],["group_abilities","Ability","classes/Ability.html#method-c-group_abilities","(user, group)",""],["grouped_options_refs","ApplicationHelper","classes/ApplicationHelper.html#method-i-grouped_options_refs","(destination = :tree)",""],["grouper_project_members","ProjectsHelper","classes/ProjectsHelper.html#method-i-grouper_project_members","(project)",""],["guest_access_for?","Authority","classes/Authority.html#method-i-guest_access_for-3F","(user)",""],["has_commits?","Repository","classes/Repository.html#method-i-has_commits-3F","()",""],["has_post_receive_file?","Repository","classes/Repository.html#method-i-has_post_receive_file-3F","()",""],["heads","Repository","classes/Repository.html#method-i-heads","()",""],["help","FileSizeValidator","classes/FileSizeValidator.html#method-i-help","()",""],["hexdigest","ApplicationHelper","classes/ApplicationHelper.html#method-i-hexdigest","(string)",""],["history","ProfilesController","classes/ProfilesController.html#method-i-history","()",""],["history","WikisController","classes/WikisController.html#method-i-history","()",""],["hook_file","Repository","classes/Repository.html#method-i-hook_file","()",""],["http_url_to_repo","Repository","classes/Repository.html#method-i-http_url_to_repo","()",""],["human_name","Group","classes/Group.html#method-i-human_name","()",""],["human_name","Namespace","classes/Namespace.html#method-i-human_name","()",""],["human_state","MergeRequest","classes/MergeRequest.html#method-i-human_state","()",""],["identification_type","CommitsHelper","classes/CommitsHelper.html#method-i-identification_type","(line)",""],["identifier","Account","classes/Account.html#method-i-identifier","()","

Returns a string for use as a Gitolite user identifier\n

Note that Gitolite 2.x requires the following pattern …\n"],["image_diff_class","CommitsHelper","classes/CommitsHelper.html#method-i-image_diff_class","(diff)",""],["import_team","UsersProject","classes/UsersProject.html#method-c-import_team","(source_project, target_project)",""],["in_locked_and_timed_satellite","Gitlab::Satellite::Action","classes/Gitlab/Satellite/Action.html#method-i-in_locked_and_timed_satellite","()","

Sets a 30s timeout for Git\n

Locks the satellite repo\n

Yields the prepared satellite repo\n"],["index","Admin::DashboardController","classes/Admin/DashboardController.html#method-i-index","()",""],["index","Admin::GroupsController","classes/Admin/GroupsController.html#method-i-index","()",""],["index","Admin::HooksController","classes/Admin/HooksController.html#method-i-index","()",""],["index","Admin::ProjectsController","classes/Admin/ProjectsController.html#method-i-index","()",""],["index","Admin::UsersController","classes/Admin/UsersController.html#method-i-index","()",""],["index","CompareController","classes/CompareController.html#method-i-index","()",""],["index","DashboardController","classes/DashboardController.html#method-i-index","()",""],["index","DeployKeysController","classes/DeployKeysController.html#method-i-index","()",""],["index","HelpController","classes/HelpController.html#method-i-index","()",""],["index","HooksController","classes/HooksController.html#method-i-index","()",""],["index","IssuesController","classes/IssuesController.html#method-i-index","()",""],["index","KeysController","classes/KeysController.html#method-i-index","()",""],["index","LabelsController","classes/LabelsController.html#method-i-index","()",""],["index","MergeRequestsController","classes/MergeRequestsController.html#method-i-index","()",""],["index","MilestonesController","classes/MilestonesController.html#method-i-index","()",""],["index","NotesController","classes/NotesController.html#method-i-index","()",""],["index","ProtectedBranchesController","classes/ProtectedBranchesController.html#method-i-index","()",""],["index","ServicesController","classes/ServicesController.html#method-i-index","()",""],["index","SnippetsController","classes/SnippetsController.html#method-i-index","()",""],["index","TeamMembersController","classes/TeamMembersController.html#method-i-index","()",""],["index_commits","Gitlab::Graph::JsonBuilder","classes/Gitlab/Graph/JsonBuilder.html#method-i-index_commits","()","

Method is adding time and space on the list of commits. As well as returns\ndate list corelated with time …\n"],["info","Gitlab::Logger","classes/Gitlab/Logger.html#method-c-info","(message)",""],["invalid?","Tree","classes/Tree.html#method-i-invalid-3F","()",""],["is_admin?","Account","classes/Account.html#method-i-is_admin-3F","()",""],["is_assigned?","IssueCommonality","classes/IssueCommonality.html#method-i-is_assigned-3F","()",""],["is_being_closed?","IssueCommonality","classes/IssueCommonality.html#method-i-is_being_closed-3F","()",""],["is_being_reassigned?","IssueCommonality","classes/IssueCommonality.html#method-i-is_being_reassigned-3F","()",""],["is_being_reopened?","IssueCommonality","classes/IssueCommonality.html#method-i-is_being_reopened-3F","()",""],["is_blob?","Tree","classes/Tree.html#method-i-is_blob-3F","()",""],["is_deploy_key","Key","classes/Key.html#method-i-is_deploy_key","()",""],["is_empty?","Milestone","classes/Milestone.html#method-i-is_empty-3F","()",""],["issue","Event","classes/Event.html#method-i-issue","()",""],["issue","IssuesController","classes/IssuesController.html#method-i-issue","()",""],["issue?","Event","classes/Event.html#method-i-issue-3F","()",""],["issue_css_classes","IssuesHelper","classes/IssuesHelper.html#method-i-issue_css_classes","(issue)",""],["issue_status_changed_email","Notify","classes/Notify.html#method-i-issue_status_changed_email","(recipient_id, issue_id, status, updated_by_user_id)",""],["issue_tags","IssuesHelper","classes/IssuesHelper.html#method-i-issue_tags","()",""],["issues","DashboardController","classes/DashboardController.html#method-i-issues","()","

Get only assigned issues\n"],["issues","GroupsController","classes/GroupsController.html#method-i-issues","()","

Get only assigned issues\n"],["issues_active_milestones","IssuesHelper","classes/IssuesHelper.html#method-i-issues_active_milestones","()",""],["issues_filter","IssuesHelper","classes/IssuesHelper.html#method-i-issues_filter","()",""],["issues_filtered","IssuesController","classes/IssuesController.html#method-i-issues_filtered","()",""],["issues_labels","Project","classes/Project.html#method-i-issues_labels","()",""],["items_for","Project","classes/Project.html#method-i-items_for","(entity)",""],["joined?","Event","classes/Event.html#method-i-joined-3F","()",""],["labels_autocomplete_source","IssuesHelper","classes/IssuesHelper.html#method-i-labels_autocomplete_source","()",""],["last_activity","Project","classes/Project.html#method-i-last_activity","()",""],["last_activity_date","Project","classes/Project.html#method-i-last_activity_date","()",""],["last_activity_project","Account","classes/Account.html#method-i-last_activity_project","()",""],["last_commit","ApplicationHelper","classes/ApplicationHelper.html#method-i-last_commit","(project)",""],["last_commit","MergeRequest","classes/MergeRequest.html#method-i-last_commit","()",""],["last_commit","PushEvent","classes/PushEvent.html#method-i-last_commit","()",""],["last_commit_for","Repository","classes/Repository.html#method-i-last_commit_for","(ref, path = nil)",""],["last_commit_short_sha","MergeRequest","classes/MergeRequest.html#method-i-last_commit_short_sha","()",""],["last_deploy?","Key","classes/Key.html#method-i-last_deploy-3F","()",""],["last_push_to_non_root?","PushEvent","classes/PushEvent.html#method-i-last_push_to_non_root-3F","()",""],["ldap","OmniauthCallbacksController","classes/OmniauthCallbacksController.html#method-i-ldap","()",""],["ldap_enable?","ApplicationHelper","classes/ApplicationHelper.html#method-i-ldap_enable-3F","()",""],["left?","Event","classes/Event.html#method-i-left-3F","()",""],["lifetime_select_options","SnippetsHelper","classes/SnippetsHelper.html#method-i-lifetime_select_options","()",""],["link_title","CommitDecorator","classes/CommitDecorator.html#method-i-link_title","()","

Returns a string describing the commit for use in a link title\n

Example\n\n

"Commit: Alex Denisov - Project ...
\n"],["link_to_author","EventsHelper","classes/EventsHelper.html#method-i-link_to_author","(event)",""],["link_to_commit_diff_line_note","NotesHelper","classes/NotesHelper.html#method-i-link_to_commit_diff_line_note","(note)",""],["link_to_gfm","GitlabMarkdownHelper","classes/GitlabMarkdownHelper.html#method-i-link_to_gfm","(body, url, html_options = {})","

Use this in places where you would normally use link_to(gfm(…), …).\n

It solves a problem occurring …\n"],["link_to_member","ProjectsHelper","classes/ProjectsHelper.html#method-i-link_to_member","(project, author)",""],["link_to_project","ProjectsHelper","classes/ProjectsHelper.html#method-i-link_to_project","(project)",""],["loading_more_notes?","NotesHelper","classes/NotesHelper.html#method-i-loading_more_notes-3F","()",""],["loading_new_notes?","NotesHelper","classes/NotesHelper.html#method-i-loading_new_notes-3F","()",""],["lock","Gitlab::Satellite::Satellite","classes/Gitlab/Satellite/Satellite.html#method-i-lock","()","

Locks the satellite\n

Changes the current directory to the satellite’s working dir\n

Yields\n"],["lock_file","Gitlab::Satellite::Satellite","classes/Gitlab/Satellite/Satellite.html#method-i-lock_file","()",""],["log","Gitlab::Auth","classes/Gitlab/Auth.html#method-i-log","()",""],["log","Gitlab::GitoliteConfig","classes/Gitlab/GitoliteConfig.html#method-i-log","(message)",""],["log_exception","ApplicationController","classes/ApplicationController.html#method-i-log_exception","(exception)",""],["log_info","Gitlab::ProjectMover","classes/Gitlab/ProjectMover.html#method-i-log_info","(message)",""],["log_info","ProjectObserver","classes/ProjectObserver.html#method-i-log_info","(message)",""],["log_info","UserObserver","classes/UserObserver.html#method-i-log_info","(message)",""],["logs_tree","RefsController","classes/RefsController.html#method-i-logs_tree","()",""],["mark_as_merged!","MergeRequest","classes/MergeRequest.html#method-i-mark_as_merged-21","()",""],["mark_as_unchecked","MergeRequest","classes/MergeRequest.html#method-i-mark_as_unchecked","()",""],["mark_as_unmergable","MergeRequest","classes/MergeRequest.html#method-i-mark_as_unmergable","()",""],["mark_reserved","Gitlab::Graph::JsonBuilder","classes/Gitlab/Graph/JsonBuilder.html#method-i-mark_reserved","(time_range, space)",""],["markdown","GitlabMarkdownHelper","classes/GitlabMarkdownHelper.html#method-i-markdown","(text)",""],["markup?","TreeHelper","classes/TreeHelper.html#method-i-markup-3F","(filename)","

Public: Determines if a given filename is compatible with GitHub::Markup.\n

filename - Filename string to …\n"],["master_access_for?","Authority","classes/Authority.html#method-i-master_access_for-3F","(user)",""],["max_count","Gitlab::Graph::JsonBuilder","classes/Gitlab/Graph/JsonBuilder.html#method-c-max_count","()",""],["md_ref?","PushEvent","classes/PushEvent.html#method-i-md_ref-3F","()",""],["membership_changed?","Event","classes/Event.html#method-i-membership_changed-3F","()",""],["merge!","Gitlab::Satellite::MergeAction","classes/Gitlab/Satellite/MergeAction.html#method-i-merge-21","()","

Merges the source branch into the target branch in the satellite and pushes\nit back to Gitolite. It also …\n"],["merge!","MergeRequest","classes/MergeRequest.html#method-i-merge-21","(user_id)",""],["merge_event","MergeRequest","classes/MergeRequest.html#method-i-merge_event","()",""],["merge_request","Event","classes/Event.html#method-i-merge_request","()",""],["merge_request","MergeRequestsController","classes/MergeRequestsController.html#method-i-merge_request","()",""],["merge_request?","Event","classes/Event.html#method-i-merge_request-3F","()",""],["merge_requests","DashboardController","classes/DashboardController.html#method-i-merge_requests","()","

Get authored or assigned open merge requests\n"],["merge_requests","GroupsController","classes/GroupsController.html#method-i-merge_requests","()","

Get authored or assigned open merge requests\n"],["merged","EventFilter","classes/EventFilter.html#method-c-merged","()",""],["merged?","Event","classes/Event.html#method-i-merged-3F","()",""],["merged?","MergeRequest","classes/MergeRequest.html#method-i-merged-3F","()",""],["method_missing","ApplicationController","classes/ApplicationController.html#method-i-method_missing","(method_sym, *arguments, &block)",""],["method_missing","Gitlab::Graph::Commit","classes/Gitlab/Graph/Commit.html#method-i-method_missing","(m, *args, &block)",""],["milestone","MilestonesController","classes/MilestonesController.html#method-i-milestone","()",""],["milestone?","Event","classes/Event.html#method-i-milestone-3F","()",""],["mode","Snippet","classes/Snippet.html#method-i-mode","()",""],["module_enabled","IssuesController","classes/IssuesController.html#method-i-module_enabled","()",""],["module_enabled","LabelsController","classes/LabelsController.html#method-i-module_enabled","()",""],["module_enabled","MergeRequestsController","classes/MergeRequestsController.html#method-i-module_enabled","()",""],["module_enabled","MilestonesController","classes/MilestonesController.html#method-i-module_enabled","()",""],["move_dir","Namespace","classes/Namespace.html#method-i-move_dir","()",""],["move_repository","Gitlab::Gitolite","classes/Gitlab/Gitolite.html#method-i-move_repository","(old_repo, project)",""],["mr_and_commit_notes","MergeRequest","classes/MergeRequest.html#method-i-mr_and_commit_notes","()",""],["mr_css_classes","MergeRequestsHelper","classes/MergeRequestsHelper.html#method-i-mr_css_classes","(mr)",""],["my_own_projects","Account","classes/Account.html#method-i-my_own_projects","()",""],["name","Snippet","classes/Snippet.html#method-i-name","()",""],["name_with_namespace","NamespacedProject","classes/NamespacedProject.html#method-i-name_with_namespace","()",""],["namespace_dir","Repository","classes/Repository.html#method-i-namespace_dir","()",""],["namespace_full_path","Namespace","classes/Namespace.html#method-i-namespace_full_path","()",""],["namespace_id","Account","classes/Account.html#method-i-namespace_id","()",""],["namespace_owner","NamespacedProject","classes/NamespacedProject.html#method-i-namespace_owner","()",""],["namespaces","Account","classes/Account.html#method-i-namespaces","()",""],["namespaces_options","NamespacesHelper","classes/NamespacesHelper.html#method-i-namespaces_options","(selected = :current_user, scope = :default)",""],["nav_link","TabHelper","classes/TabHelper.html#method-i-nav_link","(options = {}, &block)","

Navigation link helper\n

Returns an `li` element with an ‘active’ class if the supplied\ncontroller(s) and/or …\n"],["nav_tab","TabHelper","classes/TabHelper.html#method-i-nav_tab","(key, value, &block)","

Use nav_tab for save controller/action but different params\n"],["new","Admin::GroupsController","classes/Admin/GroupsController.html#method-i-new","()",""],["new","Admin::UsersController","classes/Admin/UsersController.html#method-i-new","()",""],["new","BaseContext","classes/BaseContext.html#method-c-new","(project, user, params)",""],["new","Commit","classes/Commit.html#method-c-new","(raw_commit, head = nil)",""],["new","DeployKeysController","classes/DeployKeysController.html#method-i-new","()",""],["new","EventFilter","classes/EventFilter.html#method-c-new","(params)",""],["new","FileSizeValidator","classes/FileSizeValidator.html#method-c-new","(options)",""],["new","Gitlab::GitStats","classes/Gitlab/GitStats.html#method-c-new","(repo, ref)",""],["new","Gitlab::Graph::Commit","classes/Gitlab/Graph/Commit.html#method-c-new","(commit)",""],["new","Gitlab::Graph::JsonBuilder","classes/Gitlab/Graph/JsonBuilder.html#method-c-new","(project)",""],["new","Gitlab::ProjectMover","classes/Gitlab/ProjectMover.html#method-c-new","(project, old_dir, new_dir)",""],["new","Gitlab::Satellite::Action","classes/Gitlab/Satellite/Action.html#method-c-new","(user, project, options = {})",""],["new","Gitlab::Satellite::EditFileAction","classes/Gitlab/Satellite/EditFileAction.html#method-c-new","(user, project, ref, file_path)",""],["new","Gitlab::Satellite::MergeAction","classes/Gitlab/Satellite/MergeAction.html#method-c-new","(user, merge_request)",""],["new","Gitlab::Satellite::Satellite","classes/Gitlab/Satellite/Satellite.html#method-c-new","(project)",""],["new","IssuesController","classes/IssuesController.html#method-i-new","()",""],["new","KeysController","classes/KeysController.html#method-i-new","()",""],["new","MergeRequestsController","classes/MergeRequestsController.html#method-i-new","()",""],["new","MilestonesController","classes/MilestonesController.html#method-i-new","()",""],["new","ProjectsController","classes/ProjectsController.html#method-i-new","()",""],["new","Redcarpet::Render::GitlabHTML","classes/Redcarpet/Render/GitlabHTML.html#method-c-new","(template, options = {})",""],["new","SearchContext","classes/SearchContext.html#method-c-new","(project_ids, params)",""],["new","SnippetsController","classes/SnippetsController.html#method-i-new","()",""],["new","TeamMembersController","classes/TeamMembersController.html#method-i-new","()",""],["new","Tree","classes/Tree.html#method-c-new","(raw_tree, project, ref = nil, path = nil)",""],["new?","IssueCommonality","classes/IssueCommonality.html#method-i-new-3F","()",""],["new_branch?","PushEvent","classes/PushEvent.html#method-i-new_branch-3F","()",""],["new_issue?","Event","classes/Event.html#method-i-new_issue-3F","()",""],["new_issue_email","Notify","classes/Notify.html#method-i-new_issue_email","(issue_id)","

Issue\n"],["new_merge_request?","Event","classes/Event.html#method-i-new_merge_request-3F","()",""],["new_merge_request_email","Notify","classes/Notify.html#method-i-new_merge_request_email","(merge_request_id)","

Merge Request\n"],["new_mr_path_from_push_event","MergeRequestsHelper","classes/MergeRequestsHelper.html#method-i-new_mr_path_from_push_event","(event)",""],["new_record?","StaticModel","classes/StaticModel.html#method-i-new_record-3F","()",""],["new_ref?","PushEvent","classes/PushEvent.html#method-i-new_ref-3F","()",""],["new_user_email","Notify","classes/Notify.html#method-i-new_user_email","(user_id, password)","

User\n"],["no_cache_headers","ApplicationController","classes/ApplicationController.html#method-i-no_cache_headers","()",""],["no_commit_message","CommitDecorator","classes/CommitDecorator.html#method-i-no_commit_message","()",""],["not_allowed!","Gitlab::APIHelpers","classes/Gitlab/APIHelpers.html#method-i-not_allowed-21","()",""],["not_found!","ApplicationController","classes/ApplicationController.html#method-i-not_found-21","()",""],["not_found!","Gitlab::APIHelpers","classes/Gitlab/APIHelpers.html#method-i-not_found-21","(resource = nil)",""],["not_in_project","User","classes/User.html#method-c-not_in_project","(project)",""],["note?","Event","classes/Event.html#method-i-note-3F","()",""],["note_commit?","NoteEvent","classes/NoteEvent.html#method-i-note_commit-3F","()",""],["note_commit_email","Notify","classes/Notify.html#method-i-note_commit_email","(recipient_id, note_id)","

Note\n"],["note_commit_id","NoteEvent","classes/NoteEvent.html#method-i-note_commit_id","()",""],["note_for_main_target?","NotesHelper","classes/NotesHelper.html#method-i-note_for_main_target-3F","(note)","

Helps to distinguish e.g. commit notes in mr notes list\n"],["note_issue_email","Notify","classes/Notify.html#method-i-note_issue_email","(recipient_id, note_id)",""],["note_merge_request_email","Notify","classes/Notify.html#method-i-note_merge_request_email","(recipient_id, note_id)",""],["note_short_commit_id","NoteEvent","classes/NoteEvent.html#method-i-note_short_commit_id","()",""],["note_target","NoteEvent","classes/NoteEvent.html#method-i-note_target","()",""],["note_target_id","NoteEvent","classes/NoteEvent.html#method-i-note_target_id","()",""],["note_target_type","NoteEvent","classes/NoteEvent.html#method-i-note_target_type","()",""],["note_wall_email","Notify","classes/Notify.html#method-i-note_wall_email","(recipient_id, note_id)",""],["noteable","Note","classes/Note.html#method-i-noteable","()","

override to return commits, which are not active record\n"],["noteable_type_name","Note","classes/Note.html#method-i-noteable_type_name","()",""],["notes","NotesController","classes/NotesController.html#method-i-notes","()",""],["notify_only_author?","Note","classes/Note.html#method-i-notify_only_author-3F","(user)","

Check if we can notify commit author with email about our comment\n

If commit author email exist in project …\n"],["notify_team","NoteObserver","classes/NoteObserver.html#method-i-notify_team","(note)","

Notifies the whole team except the author of note\n"],["oauth_active_class","ProfileHelper","classes/ProfileHelper.html#method-i-oauth_active_class","(provider)",""],["observe_push","PushObserver","classes/PushObserver.html#method-i-observe_push","(data)",""],["open?","MergeRequest","classes/MergeRequest.html#method-i-open-3F","()",""],["open?","Milestone","classes/Milestone.html#method-i-open-3F","()",""],["open_branches","Repository","classes/Repository.html#method-i-open_branches","()",""],["open_for","Issue","classes/Issue.html#method-c-open_for","(user)",""],["open_items_count","Milestone","classes/Milestone.html#method-i-open_items_count","()",""],["options","EventFilter","classes/EventFilter.html#method-i-options","(key)",""],["pages","WikisController","classes/WikisController.html#method-i-pages","()",""],["paginate","Gitlab::APIHelpers","classes/Gitlab/APIHelpers.html#method-i-paginate","(object)",""],["parent_commit","PushEvent","classes/PushEvent.html#method-i-parent_commit","()",""],["parents_count","Commit","classes/Commit.html#method-i-parents_count","()",""],["participants","Milestone","classes/Milestone.html#method-i-participants","()",""],["path","Gitlab::Satellite::Satellite","classes/Gitlab/Satellite/Satellite.html#method-i-path","()",""],["path_regex","Gitlab::Regex","classes/Gitlab/Regex.html#method-i-path_regex","()",""],["path_to_repo","Repository","classes/Repository.html#method-i-path_to_repo","()",""],["path_with_namespace","NamespacedProject","classes/NamespacedProject.html#method-i-path_with_namespace","()",""],["people","GroupsController","classes/GroupsController.html#method-i-people","()",""],["percent_complete","Milestone","classes/Milestone.html#method-i-percent_complete","()",""],["perform","PostReceive","classes/PostReceive.html#method-c-perform","(repo_path, oldrev, newrev, ref, identifier)",""],["perform","SystemHookWorker","classes/SystemHookWorker.html#method-c-perform","(hook_id, data)",""],["persisted?","StaticModel","classes/StaticModel.html#method-i-persisted-3F","()",""],["person_link","CommitDecorator","classes/CommitDecorator.html#method-i-person_link","(options = {})","

Private: Returns a link to a person. If the person has a matching user and\nis a member of the current …\n"],["place_chain","Gitlab::Graph::JsonBuilder","classes/Gitlab/Graph/JsonBuilder.html#method-i-place_chain","(commit, map, parent_time = nil)","

Add space mark on commit and its parents\n

@param [Graph::Commit] the commit object. @param [Hash<String …\n"],["plain_text_readme?","TreeHelper","classes/TreeHelper.html#method-i-plain_text_readme-3F","(filename)",""],["post_receive_data","PushObserver","classes/PushObserver.html#method-i-post_receive_data","(oldrev, newrev, ref, user)","

Produce a hash of post-receive data\n

data = {\n\n

before: String,\nafter: String,\nref: String,\nuser_id: String, ...
\n"],["postprocess","Redcarpet::Render::GitlabHTML","classes/Redcarpet/Render/GitlabHTML.html#method-i-postprocess","(full_document)",""],["prepare_satellite!","Gitlab::Satellite::Action","classes/Gitlab/Satellite/Action.html#method-i-prepare_satellite-21","(repo)","

Clears the satellite\n

Updates the satellite from Gitolite\n

Sets up Git variables for the user\n"],["prev_commit","Commit","classes/Commit.html#method-i-prev_commit","()",""],["prev_commit_id","Commit","classes/Commit.html#method-i-prev_commit_id","()",""],["preview","NotesController","classes/NotesController.html#method-i-preview","()",""],["primary_key","StaticModel::ClassMethods","classes/StaticModel/ClassMethods.html#method-i-primary_key","()","

Used by ActiveRecord’s polymorphic association to set object_id\n"],["private?","Project","classes/Project.html#method-i-private-3F","()",""],["probably_merged?","MergeRequest","classes/MergeRequest.html#method-i-probably_merged-3F","()",""],["processing","Gitlab::InlineDiff","classes/Gitlab/InlineDiff.html#method-c-processing","(diff_arr)",""],["project","Admin::ProjectsController","classes/Admin/ProjectsController.html#method-i-project","()",""],["project","ApplicationController","classes/ApplicationController.html#method-i-project","()",""],["project_abilities","Ability","classes/Ability.html#method-c-project_abilities","(user, project)",""],["project_access_granted_email","Notify","classes/Notify.html#method-i-project_access_granted_email","(user_project_id)","

Project\n"],["project_access_human","UsersProject","classes/UsersProject.html#method-i-project_access_human","()",""],["project_admin_rules","Ability","classes/Ability.html#method-c-project_admin_rules","()",""],["project_dev_rules","Ability","classes/Ability.html#method-c-project_dev_rules","()",""],["project_guest_rules","Ability","classes/Ability.html#method-c-project_guest_rules","()",""],["project_id","Project","classes/Project.html#method-i-project_id","()",""],["project_ids","Account","classes/Account.html#method-i-project_ids","()",""],["project_ids","GroupsController","classes/GroupsController.html#method-i-project_ids","()",""],["project_issues_filter_path","IssuesHelper","classes/IssuesHelper.html#method-i-project_issues_filter_path","(project, params = {})",""],["project_last_activity","ApplicationHelper","classes/ApplicationHelper.html#method-i-project_last_activity","(project)",""],["project_master_rules","Ability","classes/Ability.html#method-c-project_master_rules","()",""],["project_name","Event","classes/Event.html#method-i-project_name","()",""],["project_name_regex","Gitlab::Regex","classes/Gitlab/Regex.html#method-i-project_name_regex","()",""],["project_report_rules","Ability","classes/Ability.html#method-c-project_report_rules","()",""],["project_tab_class","TabHelper","classes/TabHelper.html#method-i-project_tab_class","()",""],["project_teams_update","Admin::GroupsController","classes/Admin/GroupsController.html#method-i-project_teams_update","()",""],["project_title","ProjectsHelper","classes/ProjectsHelper.html#method-i-project_title","(project)",""],["project_update","Admin::GroupsController","classes/Admin/GroupsController.html#method-i-project_update","()",""],["project_was_moved_email","Notify","classes/Notify.html#method-i-project_was_moved_email","(user_project_id)",""],["projects","DashboardController","classes/DashboardController.html#method-i-projects","()",""],["projects","GroupsController","classes/GroupsController.html#method-i-projects","()",""],["projects","Key","classes/Key.html#method-i-projects","()","

projects that has this key\n"],["projects_limit_percent","Account","classes/Account.html#method-i-projects_limit_percent","()",""],["projects_sorted_by_activity","Account","classes/Account.html#method-i-projects_sorted_by_activity","()",""],["proper?","Event","classes/Event.html#method-i-proper-3F","()",""],["protected_branch?","Repository","classes/Repository.html#method-i-protected_branch-3F","(branch_name)","

Check if current branch name is marked as protected in the system\n"],["public?","Project","classes/Project.html#method-i-public-3F","()",""],["push","EventFilter","classes/EventFilter.html#method-c-push","()",""],["push?","Event","classes/Event.html#method-i-push-3F","()",""],["push_action_name","PushEvent","classes/PushEvent.html#method-i-push_action_name","()",""],["push_to_branch?","PushObserver","classes/PushObserver.html#method-i-push_to_branch-3F","(ref, oldrev)",""],["push_with_commits?","PushEvent","classes/PushEvent.html#method-i-push_with_commits-3F","()",""],["quiet","Gitlab::Seeder","classes/Gitlab/Seeder.html#method-c-quiet","()",""],["raw","SnippetsController","classes/SnippetsController.html#method-i-raw","()",""],["read_latest","Gitlab::Logger","classes/Gitlab/Logger.html#method-c-read_latest","()",""],["read_latest_for","Gitlab::Logger","classes/Gitlab/Logger.html#method-c-read_latest_for","(filename)",""],["readme","TreeDecorator","classes/TreeDecorator.html#method-i-readme","()",""],["reassigned_issue_email","Notify","classes/Notify.html#method-i-reassigned_issue_email","(recipient_id, issue_id, previous_assignee_id)",""],["reassigned_merge_request_email","Notify","classes/Notify.html#method-i-reassigned_merge_request_email","(recipient_id, merge_request_id, previous_assignee_id)",""],["recent_push","Account","classes/Account.html#method-i-recent_push","(project_id = nil)",""],["ref","RefsController","classes/RefsController.html#method-i-ref","()",""],["ref_name","PushEvent","classes/PushEvent.html#method-i-ref_name","()",""],["ref_names","Repository","classes/Repository.html#method-i-ref_names","()","

Returns an Array of branch and tag names\n"],["ref_type","PushEvent","classes/PushEvent.html#method-i-ref_type","()",""],["regenerate_from","Wiki","classes/Wiki.html#method-c-regenerate_from","(wiki)",""],["reject_blocked!","ApplicationController","classes/ApplicationController.html#method-i-reject_blocked-21","()",""],["reload_code","MergeRequest","classes/MergeRequest.html#method-i-reload_code","()",""],["reloaded_commits","MergeRequest","classes/MergeRequest.html#method-i-reloaded_commits","()",""],["reloaded_diffs","MergeRequest","classes/MergeRequest.html#method-i-reloaded_diffs","()",""],["remove_from_team_message","ProjectsHelper","classes/ProjectsHelper.html#method-i-remove_from_team_message","(project, member)",""],["remove_key","Gitlab::Gitolite","classes/Gitlab/Gitolite.html#method-i-remove_key","(key_id, projects)",""],["remove_project","Admin::GroupsController","classes/Admin/GroupsController.html#method-i-remove_project","()",""],["remove_repository","Gitlab::Gitolite","classes/Gitlab/Gitolite.html#method-i-remove_repository","(project)",""],["render_403","ApplicationController","classes/ApplicationController.html#method-i-render_403","()",""],["render_404","ApplicationController","classes/ApplicationController.html#method-i-render_404","()",""],["render_api_error!","Gitlab::APIHelpers","classes/Gitlab/APIHelpers.html#method-i-render_api_error-21","(message, status)",""],["render_tree","TreeHelper","classes/TreeHelper.html#method-i-render_tree","(contents)","

Sorts a repository’s tree so that folders are before files and renders\ntheir corresponding partials\n

contents …\n"],["reopened?","Event","classes/Event.html#method-i-reopened-3F","()",""],["replace_markers","Gitlab::InlineDiff","classes/Gitlab/InlineDiff.html#method-c-replace_markers","(line)",""],["repo","Gitlab::Satellite::Satellite","classes/Gitlab/Satellite/Satellite.html#method-i-repo","()",""],["repo","Repository","classes/Repository.html#method-i-repo","()",""],["repo_access_human","UsersProject","classes/UsersProject.html#method-i-repo_access_human","()",""],["repo_exists?","Repository","classes/Repository.html#method-i-repo_exists-3F","()",""],["repo_name","Project","classes/Project.html#method-i-repo_name","()",""],["report_access_for?","Authority","classes/Authority.html#method-i-report_access_for-3F","(user)",""],["repository_masters","Authority","classes/Authority.html#method-i-repository_masters","()",""],["repository_readers","Authority","classes/Authority.html#method-i-repository_readers","()",""],["repository_writers","Authority","classes/Authority.html#method-i-repository_writers","()",""],["request_protocol","ApplicationHelper","classes/ApplicationHelper.html#method-i-request_protocol","()",""],["require_non_empty_project","ApplicationController","classes/ApplicationController.html#method-i-require_non_empty_project","()",""],["require_ssh_key?","Account","classes/Account.html#method-i-require_ssh_key-3F","()",""],["reset_access","Authority","classes/Authority.html#method-i-reset_access","(user)",""],["reset_private_token","ProfilesController","classes/ProfilesController.html#method-i-reset_private_token","()",""],["result","SearchContext","classes/SearchContext.html#method-i-result","()",""],["rm_dir","Namespace","classes/Namespace.html#method-i-rm_dir","()",""],["rm_key","Gitlab::GitoliteConfig","classes/Gitlab/GitoliteConfig.html#method-i-rm_key","(user)",""],["rm_ref?","PushEvent","classes/PushEvent.html#method-i-rm_ref-3F","()",""],["role_access","UsersProject","classes/UsersProject.html#method-i-role_access","()",""],["root_ref","Repository","classes/Repository.html#method-i-root_ref","()",""],["root_ref?","Repository","classes/Repository.html#method-i-root_ref-3F","(branch)",""],["safe_message","Commit","classes/Commit.html#method-i-safe_message","()",""],["satellite","Repository","classes/Repository.html#method-i-satellite","()",""],["saved?","Project","classes/Project.html#method-i-saved-3F","()",""],["search","GroupsController","classes/GroupsController.html#method-i-search","()",""],["search","IssueCommonality::ClassMethods","classes/IssueCommonality/ClassMethods.html#method-i-search","(query)",""],["search","IssuesController","classes/IssuesController.html#method-i-search","()",""],["search","Namespace","classes/Namespace.html#method-c-search","(query)",""],["search","Project","classes/Project.html#method-c-search","(query)",""],["search","User","classes/User.html#method-c-search","(query)",""],["search","Wiki","classes/Wiki.html#method-c-search","(query)",""],["search_autocomplete_source","ApplicationHelper","classes/ApplicationHelper.html#method-i-search_autocomplete_source","()",""],["send_move_instructions","Project","classes/Project.html#method-i-send_move_instructions","()",""],["send_notify_mails","NoteObserver","classes/NoteObserver.html#method-i-send_notify_mails","(note)",""],["send_reassigned_email","IssueObserver","classes/IssueObserver.html#method-i-send_reassigned_email","(issue)",""],["send_reassigned_email","MergeRequestObserver","classes/MergeRequestObserver.html#method-i-send_reassigned_email","(merge_request)",""],["send_update_instructions","Namespace","classes/Namespace.html#method-i-send_update_instructions","()",""],["services","Project","classes/Project.html#method-i-services","()",""],["set_current_user_for_observers","ApplicationController","classes/ApplicationController.html#method-i-set_current_user_for_observers","()",""],["set_identifier","Key","classes/Key.html#method-i-set_identifier","()",""],["set_key","Gitlab::Gitolite","classes/Gitlab/Gitolite.html#method-i-set_key","(key_id, key_content, projects)",""],["set_slug","Wiki","classes/Wiki.html#method-i-set_slug","()",""],["several_namespaces?","Account","classes/Account.html#method-i-several_namespaces-3F","()",""],["short_id","Commit","classes/Commit.html#method-i-short_id","(length = 10)",""],["show","Admin::GroupsController","classes/Admin/GroupsController.html#method-i-show","()",""],["show","Admin::ProjectsController","classes/Admin/ProjectsController.html#method-i-show","()",""],["show","Admin::ResqueController","classes/Admin/ResqueController.html#method-i-show","()",""],["show","Admin::UsersController","classes/Admin/UsersController.html#method-i-show","()",""],["show","BlameController","classes/BlameController.html#method-i-show","()",""],["show","BlobController","classes/BlobController.html#method-i-show","()",""],["show","CommitController","classes/CommitController.html#method-i-show","()",""],["show","CommitsController","classes/CommitsController.html#method-i-show","()",""],["show","CompareController","classes/CompareController.html#method-i-show","()",""],["show","DeployKeysController","classes/DeployKeysController.html#method-i-show","()",""],["show","GroupsController","classes/GroupsController.html#method-i-show","()",""],["show","IssuesController","classes/IssuesController.html#method-i-show","()",""],["show","KeysController","classes/KeysController.html#method-i-show","()",""],["show","MergeRequestsController","classes/MergeRequestsController.html#method-i-show","()",""],["show","MilestonesController","classes/MilestonesController.html#method-i-show","()",""],["show","ProfilesController","classes/ProfilesController.html#method-i-show","()",""],["show","ProjectsController","classes/ProjectsController.html#method-i-show","()",""],["show","RepositoriesController","classes/RepositoriesController.html#method-i-show","()",""],["show","SearchController","classes/SearchController.html#method-i-show","()",""],["show","SnippetsController","classes/SnippetsController.html#method-i-show","()",""],["show","TeamMembersController","classes/TeamMembersController.html#method-i-show","()",""],["show","TreeController","classes/TreeController.html#method-i-show","()",""],["show","WikisController","classes/WikisController.html#method-i-show","()",""],["show_last_push_widget?","ApplicationHelper","classes/ApplicationHelper.html#method-i-show_last_push_widget-3F","(event)",""],["size","Snippet","classes/Snippet.html#method-i-size","()",""],["skip_git?","UsersProject","classes/UsersProject.html#method-i-skip_git-3F","()",""],["snippet","SnippetsController","classes/SnippetsController.html#method-i-snippet","()",""],["sort","IssuesController","classes/IssuesController.html#method-i-sort","()",""],["ssh_url_to_repo","Repository","classes/Repository.html#method-i-ssh_url_to_repo","()",""],["stats","RepositoriesController","classes/RepositoriesController.html#method-i-stats","()",""],["store_dir","AttachmentUploader","classes/AttachmentUploader.html#method-i-store_dir","()","

Override the directory where uploaded files will be stored. This is a\nsensible default for uploaders …\n"],["strip_white_space","Key","classes/Key.html#method-i-strip_white_space","()",""],["switch","RefsController","classes/RefsController.html#method-i-switch","()",""],["tag?","PushEvent","classes/PushEvent.html#method-i-tag-3F","()",""],["tag_list","TagsHelper","classes/TagsHelper.html#method-i-tag_list","(project)",""],["tag_name","PushEvent","classes/PushEvent.html#method-i-tag_name","()",""],["tag_names","Repository","classes/Repository.html#method-i-tag_names","()","

Returns an Array of tag names\n"],["tag_path","TagsHelper","classes/TagsHelper.html#method-i-tag_path","(tag)",""],["tags","RepositoriesController","classes/RepositoriesController.html#method-i-tags","()",""],["tags","Repository","classes/Repository.html#method-i-tags","()","

Returns an Array of Tags\n"],["take_left_leaves","Gitlab::Graph::JsonBuilder","classes/Gitlab/Graph/JsonBuilder.html#method-i-take_left_leaves","(commit, map)","

Takes most left subtree branch of commits which don’t have space mark yet.\n

@param [Graph::Commit] the …\n"],["target_title","Event","classes/Event.html#method-i-target_title","()",""],["team","EventFilter","classes/EventFilter.html#method-c-team","()",""],["team_member_by_id","Team","classes/Team.html#method-i-team_member_by_id","(user_id)","

Get Team Member record by user id\n"],["team_member_by_name_or_email","Team","classes/Team.html#method-i-team_member_by_name_or_email","(name = nil, email = nil)",""],["team_members","GroupsController","classes/GroupsController.html#method-i-team_members","()",""],["team_update","Admin::ProjectsController","classes/Admin/ProjectsController.html#method-i-team_update","()",""],["team_update","Admin::UsersController","classes/Admin/UsersController.html#method-i-team_update","()",""],["team_without_note_author","NoteObserver","classes/NoteObserver.html#method-i-team_without_note_author","(note)",""],["test","Admin::HooksController","classes/Admin/HooksController.html#method-i-test","()",""],["test","HooksController","classes/HooksController.html#method-i-test","()",""],["test","ServicesController","classes/ServicesController.html#method-i-test","()",""],["title","CommitDecorator","classes/CommitDecorator.html#method-i-title","()","

Returns the commits title.\n

Usually, the commit title is the first line of the commit message. In case\n…\n"],["tm_of","UserDecorator","classes/UserDecorator.html#method-i-tm_of","(project)",""],["tm_path","ProjectsHelper","classes/ProjectsHelper.html#method-i-tm_path","(team_member)",""],["to_diff","Commit","classes/Commit.html#method-i-to_diff","()","

Shows the diff between the commit’s parent and the commit.\n

Cuts out the header and stats from #to_patch …\n"],["to_diff","MergeRequest","classes/MergeRequest.html#method-i-to_diff","()","

Returns the raw diff for this merge request\n

see “git diff”\n"],["to_graph_hash","Gitlab::Graph::Commit","classes/Gitlab/Graph/Commit.html#method-i-to_graph_hash","()",""],["to_json","Gitlab::Graph::JsonBuilder","classes/Gitlab/Graph/JsonBuilder.html#method-i-to_json","(*args)",""],["to_param","Namespace","classes/Namespace.html#method-i-to_param","()",""],["to_param","Project","classes/Project.html#method-i-to_param","()",""],["to_param","StaticModel","classes/StaticModel.html#method-i-to_param","()",""],["to_param","Wiki","classes/Wiki.html#method-i-to_param","()",""],["to_patch","MergeRequest","classes/MergeRequest.html#method-i-to_patch","()","

Returns the commit as a series of email patches.\n

see “git format-patch”\n"],["today?","IssueCommonality","classes/IssueCommonality.html#method-i-today-3F","()",""],["token","ProfilesController","classes/ProfilesController.html#method-i-token","()",""],["total_items_count","Milestone","classes/Milestone.html#method-i-total_items_count","()",""],["transfer","NamespacedProject","classes/NamespacedProject.html#method-i-transfer","(new_namespace)",""],["tree","Repository","classes/Repository.html#method-i-tree","(fcommit, path = nil)",""],["tree_hex_class","TreeHelper","classes/TreeHelper.html#method-i-tree_hex_class","(content)",""],["tree_icon","TreeHelper","classes/TreeHelper.html#method-i-tree_icon","(type)","

Return an image icon depending on the file type\n

type - String type of the tree item; either ‘folder’ or …\n"],["tree_join","TreeHelper","classes/TreeHelper.html#method-i-tree_join","(*args)","

Simple shortcut to File.join\n"],["trigger_post_receive","PushObserver","classes/PushObserver.html#method-i-trigger_post_receive","(oldrev, newrev, ref, user)","

This method will be called after each post receive and only if the provided\nuser is present in GitLab …\n"],["truncate_team","Team","classes/Team.html#method-i-truncate_team","()","

Remove all users from project team\n"],["truncate_team","UsersProject","classes/UsersProject.html#method-c-truncate_team","(project)",""],["truncate_teams","Group","classes/Group.html#method-i-truncate_teams","()",""],["truncate_teams","UsersProject","classes/UsersProject.html#method-c-truncate_teams","(project_ids)",""],["unassigned_filter","IssuesHelper","classes/IssuesHelper.html#method-i-unassigned_filter","()","

Returns an OpenStruct object suitable for use by\noptions_from_collection_for_select to allow filtering …\n"],["unauthorized!","Gitlab::APIHelpers","classes/Gitlab/APIHelpers.html#method-i-unauthorized-21","()",""],["unblock","Admin::UsersController","classes/Admin/UsersController.html#method-i-unblock","()",""],["unchecked?","MergeRequest","classes/MergeRequest.html#method-i-unchecked-3F","()",""],["unique_key","Key","classes/Key.html#method-i-unique_key","()",""],["unmerged_commits","MergeRequest","classes/MergeRequest.html#method-i-unmerged_commits","()",""],["unmerged_diffs","MergeRequest","classes/MergeRequest.html#method-i-unmerged_diffs","()",""],["up_dir?","TreeDecorator","classes/TreeDecorator.html#method-i-up_dir-3F","()",""],["up_dir_path","TreeDecorator","classes/TreeDecorator.html#method-i-up_dir_path","()",""],["update","Admin::GroupsController","classes/Admin/GroupsController.html#method-i-update","()",""],["update","Admin::ProjectsController","classes/Admin/ProjectsController.html#method-i-update","()",""],["update","Admin::TeamMembersController","classes/Admin/TeamMembersController.html#method-i-update","()",""],["update","Admin::UsersController","classes/Admin/UsersController.html#method-i-update","()",""],["update","IssuesController","classes/IssuesController.html#method-i-update","()",""],["update","MergeRequestsController","classes/MergeRequestsController.html#method-i-update","()",""],["update","MilestonesController","classes/MilestonesController.html#method-i-update","()",""],["update","ProfilesController","classes/ProfilesController.html#method-i-update","()",""],["update","ProjectsController","classes/ProjectsController.html#method-i-update","()",""],["update","ServicesController","classes/ServicesController.html#method-i-update","()",""],["update","SnippetsController","classes/SnippetsController.html#method-i-update","()",""],["update","TeamMembersController","classes/TeamMembersController.html#method-i-update","()",""],["update","TreeController","classes/TreeController.html#method-i-update","()",""],["update_gitolite","Namespace","classes/Namespace.html#method-i-update_gitolite","()",""],["update_merge_requests","PushObserver","classes/PushObserver.html#method-i-update_merge_requests","(oldrev, newrev, ref, user)",""],["update_password","ProfilesController","classes/ProfilesController.html#method-i-update_password","()",""],["update_project","Gitlab::GitoliteConfig","classes/Gitlab/GitoliteConfig.html#method-i-update_project","(project)","

update or create\n"],["update_project!","Gitlab::GitoliteConfig","classes/Gitlab/GitoliteConfig.html#method-i-update_project-21","( project)",""],["update_project_config","Gitlab::GitoliteConfig","classes/Gitlab/GitoliteConfig.html#method-i-update_project_config","(project, conf)",""],["update_projects","Gitlab::GitoliteConfig","classes/Gitlab/GitoliteConfig.html#method-i-update_projects","(projects)","

Updates many projects and uses project.path_with_namespace as the repo path\nAn order of magnitude faster …\n"],["update_repositories","Gitlab::Gitolite","classes/Gitlab/Gitolite.html#method-i-update_repositories","(projects)",""],["update_repository","Gitlab::Gitolite","classes/Gitlab/Gitolite.html#method-i-update_repository","(project)",""],["update_repository","ProtectedBranch","classes/ProtectedBranch.html#method-i-update_repository","()",""],["update_repository","Repository","classes/Repository.html#method-i-update_repository","()",""],["update_repository","UsersProject","classes/UsersProject.html#method-i-update_repository","()",""],["update_username","ProfilesController","classes/ProfilesController.html#method-i-update_username","()",""],["update_users_ids_to_role","Team","classes/Team.html#method-i-update_users_ids_to_role","(users_ids, access_role)","

Update multiple project users to same access role by user ids\n"],["upvote?","Note","classes/Note.html#method-i-upvote-3F","()","

Returns true if this is an upvote note, otherwise false is returned\n"],["upvotes","Votes","classes/Votes.html#method-i-upvotes","()","

Return the number of +1 comments (upvotes)\n"],["upvotes_in_percent","Votes","classes/Votes.html#method-i-upvotes_in_percent","()",""],["url_to_repo","Gitlab::Gitolite","classes/Gitlab/Gitolite.html#method-i-url_to_repo","(path)",""],["url_to_repo","Repository","classes/Repository.html#method-i-url_to_repo","()",""],["user_bulk_import","UsersProject","classes/UsersProject.html#method-c-user_bulk_import","(user, project_ids, project_access)","

TODO: depreceate in future in favor of add_users_into_projects\n"],["user_color_scheme_class","ApplicationHelper","classes/ApplicationHelper.html#method-i-user_color_scheme_class","()",""],["user_project","Gitlab::APIHelpers","classes/Gitlab/APIHelpers.html#method-i-user_project","()",""],["username_regex","Gitlab::Regex","classes/Gitlab/Regex.html#method-i-username_regex","()",""],["users","Group","classes/Group.html#method-i-users","()",""],["valid?","Grack::Auth","classes/Grack/Auth.html#method-i-valid-3F","()",""],["valid_diffs?","MergeRequest","classes/MergeRequest.html#method-i-valid_diffs-3F","()",""],["valid_hook_file","Repository","classes/Repository.html#method-i-valid_hook_file","()",""],["valid_post_receive_file?","Repository","classes/Repository.html#method-i-valid_post_receive_file-3F","()",""],["valid_push?","PushEvent","classes/PushEvent.html#method-i-valid_push-3F","()",""],["valid_repo?","Repository","classes/Repository.html#method-i-valid_repo-3F","()",""],["validate_branches","MergeRequest","classes/MergeRequest.html#method-i-validate_branches","()",""],["validate_each","FileSizeValidator","classes/FileSizeValidator.html#method-i-validate_each","(record, attribute, value)",""],["validate_get_request","Grack::Auth","classes/Grack/Auth.html#method-i-validate_get_request","()",""],["validate_post_request","Grack::Auth","classes/Grack/Auth.html#method-i-validate_post_request","()",""],["validates_merge_request","MergeRequestsController","classes/MergeRequestsController.html#method-i-validates_merge_request","()",""],["votes_count","Votes","classes/Votes.html#method-i-votes_count","()","

Return the total number of votes\n"],["wall","ProjectsController","classes/ProjectsController.html#method-i-wall","()","

Wall\n"],["wall_note?","NoteEvent","classes/NoteEvent.html#method-i-wall_note-3F","()",""],["web_app_url","ApplicationHelper","classes/ApplicationHelper.html#method-i-web_app_url","()",""],["web_url","Project","classes/Project.html#method-i-web_url","()",""],["without_projects","User","classes/User.html#method-c-without_projects","()",""],["write_key","Gitlab::GitoliteConfig","classes/Gitlab/GitoliteConfig.html#method-i-write_key","(id, key)",""],["OFL","","files/app/assets/fonts/OFL_txt.html","","

Copyright © 2010, Jan Gerner (post@yanone.de) This Font Software is\nlicensed under the SIL Open Font …\n"],["post-receive","","files/lib/hooks/post-receive.html","","

#!/usr/bin/env bash\n

# This file was placed here by GitLab. It makes sure that your pushed\ncommits # will …\n"]]}} \ No newline at end of file diff --git a/doc/code/js/searchdoc.js b/doc/code/js/searchdoc.js new file mode 100755 index 00000000..77910c4b --- /dev/null +++ b/doc/code/js/searchdoc.js @@ -0,0 +1,449 @@ +Searchdoc = {}; + +// navigation.js ------------------------------------------ + +Searchdoc.Navigation = new function() { + this.initNavigation = function() { + var _this = this; + + $(document).keydown(function(e) { + _this.onkeydown(e); + }).keyup(function(e) { + _this.onkeyup(e); + }); + + this.navigationActive = true; + } + + this.setNavigationActive = function(state) { + this.navigationActive = state; + this.clearMoveTimeout(); + } + + + this.onkeyup = function(e) { + if (!this.navigationActive) return; + switch(e.keyCode) { + case 37: //Event.KEY_LEFT: + case 38: //Event.KEY_UP: + case 39: //Event.KEY_RIGHT: + case 40: //Event.KEY_DOWN: + case 73: // i - qwerty + case 74: // j + case 75: // k + case 76: // l + case 67: // c - dvorak + case 72: // h + case 84: // t + case 78: // n + this.clearMoveTimeout(); + break; + } + } + + this.onkeydown = function(e) { + if (!this.navigationActive) return; + switch(e.keyCode) { + case 37: //Event.KEY_LEFT: + case 74: // j (qwerty) + case 72: // h (dvorak) + if (this.moveLeft()) e.preventDefault(); + break; + case 38: //Event.KEY_UP: + case 73: // i (qwerty) + case 67: // c (dvorak) + if (e.keyCode == 38 || e.ctrlKey) { + if (this.moveUp()) e.preventDefault(); + this.startMoveTimeout(false); + } + break; + case 39: //Event.KEY_RIGHT: + case 76: // l (qwerty) + case 78: // n (dvorak) + if (this.moveRight()) e.preventDefault(); + break; + case 40: //Event.KEY_DOWN: + case 75: // k (qwerty) + case 84: // t (dvorak) + if (e.keyCode == 40 || e.ctrlKey) { + if (this.moveDown()) e.preventDefault(); + this.startMoveTimeout(true); + } + break; + case 9: //Event.KEY_TAB: + case 13: //Event.KEY_RETURN: + if (this.$current) this.select(this.$current); + break; + case 83: // s (qwerty) + case 79: // o (dvorak) + if (e.ctrlKey) { + $('#search').focus(); + e.preventDefault(); + } + break; + } + if (e.ctrlKey && e.shiftKey) this.select(this.$current); + } + + this.clearMoveTimeout = function() { + clearTimeout(this.moveTimeout); + this.moveTimeout = null; + } + + this.startMoveTimeout = function(isDown) { + if (!$.browser.mozilla && !$.browser.opera) return; + if (this.moveTimeout) this.clearMoveTimeout(); + var _this = this; + + var go = function() { + if (!_this.moveTimeout) return; + _this[isDown ? 'moveDown' : 'moveUp'](); + _this.moveTimout = setTimeout(go, 100); + } + this.moveTimeout = setTimeout(go, 200); + } + + this.moveRight = function() { + } + + this.moveLeft = function() { + } + + this.move = function(isDown) { + } + + this.moveUp = function() { + return this.move(false); + } + + this.moveDown = function() { + return this.move(true); + } +} + + +// scrollIntoView.js -------------------------------------- + +function scrollIntoView(element, view) { + var offset, viewHeight, viewScroll, height; + offset = element.offsetTop; + height = element.offsetHeight; + viewHeight = view.offsetHeight; + viewScroll = view.scrollTop; + if (offset - viewScroll + height > viewHeight) { + view.scrollTop = offset - viewHeight + height; + } + if (offset < viewScroll) { + view.scrollTop = offset; + } +} + +// panel.js ----------------------------------------------- + +Searchdoc.Panel = function(element, data, tree, frame) { + this.$element = $(element); + this.$input = $('input', element).eq(0); + this.$result = $('.result ul', element).eq(0); + this.frame = frame; + this.$current = null; + this.$view = this.$result.parent(); + this.data = data; + this.searcher = new Searcher(data.index); + + this.tree = new Searchdoc.Tree($('.tree', element), tree, this); + this.init(); +} + +Searchdoc.Panel.prototype = $.extend({}, Searchdoc.Navigation, new function() { + var suid = 1; + + this.init = function() { + var _this = this; + var observer = function() { + _this.search(_this.$input[0].value); + }; + this.$input.keyup(observer); + this.$input.click(observer); // mac's clear field + + this.searcher.ready(function(results, isLast) { + _this.addResults(results, isLast); + }) + + this.$result.click(function(e) { + _this.$current.removeClass('current'); + _this.$current = $(e.target).closest('li').addClass('current'); + _this.select(); + _this.$input.focus(); + }); + + this.initNavigation(); + this.setNavigationActive(false); + } + + this.search = function(value, selectFirstMatch) { + value = jQuery.trim(value).toLowerCase(); + this.selectFirstMatch = selectFirstMatch; + if (value) { + this.$element.removeClass('panel_tree').addClass('panel_results'); + this.tree.setNavigationActive(false); + this.setNavigationActive(true); + } else { + this.$element.addClass('panel_tree').removeClass('panel_results'); + this.tree.setNavigationActive(true); + this.setNavigationActive(false); + } + if (value != this.lastQuery) { + this.lastQuery = value; + this.firstRun = true; + this.searcher.find(value); + } + } + + this.addResults = function(results, isLast) { + var target = this.$result.get(0); + if (this.firstRun && (results.length > 0 || isLast)) { + this.$current = null; + this.$result.empty(); + } + for (var i=0, l = results.length; i < l; i++) { + target.appendChild(renderItem.call(this, results[i])); + }; + if (this.firstRun && results.length > 0) { + this.firstRun = false; + this.$current = $(target.firstChild); + this.$current.addClass('current'); + if (this.selectFirstMatch) this.select(); + scrollIntoView(this.$current[0], this.$view[0]) + } + if (jQuery.browser.msie) this.$element[0].className += ''; + } + + this.open = function(src) { + this.frame.location.href = '../' + src; + if (this.frame.highlight) this.frame.highlight(src); + } + + this.select = function() { + this.open(this.$current.data('path')); + } + + this.move = function(isDown) { + if (!this.$current) return; + var $next = this.$current[isDown ? 'next' : 'prev'](); + if ($next.length) { + this.$current.removeClass('current'); + $next.addClass('current'); + scrollIntoView($next[0], this.$view[0]); + this.$current = $next; + } + return true; + } + + function renderItem(result) { + var li = document.createElement('li'), + html = '', badge = result.badge; + html += '

' + hlt(result.title); + if (result.params) html += '' + result.params + ''; + html += '

'; + html += '

'; + if (typeof badge != 'undefined') { + html += '' + escapeHTML(this.data.badges[badge] || 'unknown') + ''; + } + html += hlt(result.namespace) + '

'; + if (result.snippet) html += '

' + escapeHTML(result.snippet) + '

'; + li.innerHTML = html; + jQuery.data(li, 'path', result.path); + return li; + } + + function hlt(html) { + return escapeHTML(html).replace(/\u0001/g, '').replace(/\u0002/g, '') + } + + function escapeHTML(html) { + return html.replace(/[&<>]/g, function(c) { + return '&#' + c.charCodeAt(0) + ';'; + }); + } + +}); + +// tree.js ------------------------------------------------ + +Searchdoc.Tree = function(element, tree, panel) { + this.$element = $(element); + this.$list = $('ul', element); + this.tree = tree; + this.panel = panel; + this.init(); +} + +Searchdoc.Tree.prototype = $.extend({}, Searchdoc.Navigation, new function() { + this.init = function() { + var stopper = document.createElement('li'); + stopper.className = 'stopper'; + this.$list[0].appendChild(stopper); + for (var i=0, l = this.tree.length; i < l; i++) { + buildAndAppendItem.call(this, this.tree[i], 0, stopper); + }; + var _this = this; + this.$list.click(function(e) { + var $target = $(e.target), + $li = $target.closest('li'); + if ($target.hasClass('icon')) { + _this.toggle($li); + } else { + _this.select($li); + } + }) + + this.initNavigation(); + if (jQuery.browser.msie) document.body.className += ''; + } + + this.select = function($li) { + this.highlight($li); + var path = $li[0].searchdoc_tree_data.path; + if (path) this.panel.open(path); + } + + this.highlight = function($li) { + if (this.$current) this.$current.removeClass('current'); + this.$current = $li.addClass('current'); + } + + this.toggle = function($li) { + var closed = !$li.hasClass('closed'), + children = $li[0].searchdoc_tree_data.children; + $li.toggleClass('closed'); + for (var i=0, l = children.length; i < l; i++) { + toggleVis.call(this, $(children[i].li), !closed); + }; + } + + this.moveRight = function() { + if (!this.$current) { + this.highlight(this.$list.find('li:first')); + return; + } + if (this.$current.hasClass('closed')) { + this.toggle(this.$current); + } + } + + this.moveLeft = function() { + if (!this.$current) { + this.highlight(this.$list.find('li:first')); + return; + } + if (!this.$current.hasClass('closed')) { + this.toggle(this.$current); + } else { + var level = this.$current[0].searchdoc_tree_data.level; + if (level == 0) return; + var $next = this.$current.prevAll('li.level_' + (level - 1) + ':visible:first'); + this.$current.removeClass('current'); + $next.addClass('current'); + scrollIntoView($next[0], this.$element[0]); + this.$current = $next; + } + } + + this.move = function(isDown) { + if (!this.$current) { + this.highlight(this.$list.find('li:first')); + return true; + } + var next = this.$current[0]; + if (isDown) { + do { + next = next.nextSibling; + if (next && next.style && next.style.display != 'none') break; + } while(next); + } else { + do { + next = next.previousSibling; + if (next && next.style && next.style.display != 'none') break; + } while(next); + } + if (next && next.className.indexOf('stopper') == -1) { + this.$current.removeClass('current'); + $(next).addClass('current'); + scrollIntoView(next, this.$element[0]); + this.$current = $(next); + } + return true; + } + + function toggleVis($li, show) { + var closed = $li.hasClass('closed'), + children = $li[0].searchdoc_tree_data.children; + $li.css('display', show ? '' : 'none') + if (!show && this.$current && $li[0] == this.$current[0]) { + this.$current.removeClass('current'); + this.$current = null; + } + for (var i=0, l = children.length; i < l; i++) { + toggleVis.call(this, $(children[i].li), show && !closed); + }; + } + + function buildAndAppendItem(item, level, before) { + var li = renderItem(item, level), + list = this.$list[0]; + item.li = li; + list.insertBefore(li, before); + for (var i=0, l = item[3].length; i < l; i++) { + buildAndAppendItem.call(this, item[3][i], level + 1, before); + }; + return li; + } + + function renderItem(item, level) { + var li = document.createElement('li'), + cnt = document.createElement('div'), + h1 = document.createElement('h1'), + p = document.createElement('p'), + icon, i; + + li.appendChild(cnt); + li.style.paddingLeft = getOffset(level); + cnt.className = 'content'; + if (!item[1]) li.className = 'empty '; + cnt.appendChild(h1); + // cnt.appendChild(p); + h1.appendChild(document.createTextNode(item[0])); + // p.appendChild(document.createTextNode(item[4])); + if (item[2]) { + i = document.createElement('i'); + i.appendChild(document.createTextNode(item[2])); + h1.appendChild(i); + } + if (item[3].length > 0) { + icon = document.createElement('div'); + icon.className = 'icon'; + cnt.appendChild(icon); + } + + // user direct assignement instead of $() + // it's 8x faster + // $(li).data('path', item[1]) + // .data('children', item[3]) + // .data('level', level) + // .css('display', level == 0 ? '' : 'none') + // .addClass('level_' + level) + // .addClass('closed'); + li.searchdoc_tree_data = { + path: item[1], + children: item[3], + level: level + } + li.style.display = level == 0 ? '' : 'none'; + li.className += 'level_' + level + ' closed'; + return li; + } + + function getOffset(level) { + return 5 + 18*level + 'px'; + } +}); diff --git a/doc/app/js/searcher.js b/doc/code/js/searcher.js similarity index 100% rename from doc/app/js/searcher.js rename to doc/code/js/searcher.js diff --git a/doc/code/panel/index.html b/doc/code/panel/index.html new file mode 100755 index 00000000..f815a113 --- /dev/null +++ b/doc/code/panel/index.html @@ -0,0 +1,73 @@ + + + + + + search index + + + + + + + + + + +
+
+
+ + + +
+ +
+
+
+
    +
+
+
+
    +
+
+
+ index + + diff --git a/doc/code/panel/links.html b/doc/code/panel/links.html new file mode 100644 index 00000000..5c356c74 --- /dev/null +++ b/doc/code/panel/links.html @@ -0,0 +1,314 @@ + + File index + + + app/assets/fonts/OFL.txt + + app/contexts/base_context.rb + + app/contexts/commit_load_context.rb + + app/contexts/issues_bulk_update_context.rb + + app/contexts/issues_list_context.rb + + app/contexts/merge_requests_load_context.rb + + app/contexts/notes/create_context.rb + + app/contexts/notes/load_context.rb + + app/contexts/project_update_context.rb + + app/contexts/search_context.rb + + app/contexts/test_hook_context.rb + + app/controllers/admin/dashboard_controller.rb + + app/controllers/admin/groups_controller.rb + + app/controllers/admin/hooks_controller.rb + + app/controllers/admin/logs_controller.rb + + app/controllers/admin/projects_controller.rb + + app/controllers/admin/resque_controller.rb + + app/controllers/admin/team_members_controller.rb + + app/controllers/admin/users_controller.rb + + app/controllers/admin_controller.rb + + app/controllers/application_controller.rb + + app/controllers/blame_controller.rb + + app/controllers/blob_controller.rb + + app/controllers/commit_controller.rb + + app/controllers/commits_controller.rb + + app/controllers/compare_controller.rb + + app/controllers/dashboard_controller.rb + + app/controllers/deploy_keys_controller.rb + + app/controllers/errors_controller.rb + + app/controllers/groups_controller.rb + + app/controllers/help_controller.rb + + app/controllers/hooks_controller.rb + + app/controllers/issues_controller.rb + + app/controllers/keys_controller.rb + + app/controllers/labels_controller.rb + + app/controllers/merge_requests_controller.rb + + app/controllers/milestones_controller.rb + + app/controllers/notes_controller.rb + + app/controllers/omniauth_callbacks_controller.rb + + app/controllers/profiles_controller.rb + + app/controllers/project_resource_controller.rb + + app/controllers/projects_controller.rb + + app/controllers/protected_branches_controller.rb + + app/controllers/refs_controller.rb + + app/controllers/repositories_controller.rb + + app/controllers/search_controller.rb + + app/controllers/services_controller.rb + + app/controllers/snippets_controller.rb + + app/controllers/team_members_controller.rb + + app/controllers/tree_controller.rb + + app/controllers/wikis_controller.rb + + app/decorators/application_decorator.rb + + app/decorators/commit_decorator.rb + + app/decorators/event_decorator.rb + + app/decorators/tree_decorator.rb + + app/decorators/user_decorator.rb + + app/helpers/application_helper.rb + + app/helpers/commits_helper.rb + + app/helpers/dashboard_helper.rb + + app/helpers/events_helper.rb + + app/helpers/gitlab_markdown_helper.rb + + app/helpers/issues_helper.rb + + app/helpers/merge_requests_helper.rb + + app/helpers/namespaces_helper.rb + + app/helpers/notes_helper.rb + + app/helpers/profile_helper.rb + + app/helpers/projects_helper.rb + + app/helpers/snippets_helper.rb + + app/helpers/tab_helper.rb + + app/helpers/tags_helper.rb + + app/helpers/tree_helper.rb + + app/mailers/notify.rb + + app/models/ability.rb + + app/models/commit.rb + + app/models/event.rb + + app/models/gitlab_ci_service.rb + + app/models/group.rb + + app/models/issue.rb + + app/models/key.rb + + app/models/merge_request.rb + + app/models/milestone.rb + + app/models/namespace.rb + + app/models/note.rb + + app/models/project.rb + + app/models/project_hook.rb + + app/models/protected_branch.rb + + app/models/service.rb + + app/models/service_hook.rb + + app/models/snippet.rb + + app/models/system_hook.rb + + app/models/tree.rb + + app/models/user.rb + + app/models/users_project.rb + + app/models/web_hook.rb + + app/models/wiki.rb + + app/observers/activity_observer.rb + + app/observers/issue_observer.rb + + app/observers/key_observer.rb + + app/observers/merge_request_observer.rb + + app/observers/note_observer.rb + + app/observers/project_observer.rb + + app/observers/system_hook_observer.rb + + app/observers/user_observer.rb + + app/observers/users_project_observer.rb + + app/roles/account.rb + + app/roles/authority.rb + + app/roles/git_host.rb + + app/roles/issue_commonality.rb + + app/roles/namespaced_project.rb + + app/roles/note_event.rb + + app/roles/push_event.rb + + app/roles/push_observer.rb + + app/roles/repository.rb + + app/roles/static_model.rb + + app/roles/team.rb + + app/roles/votes.rb + + app/uploaders/attachment_uploader.rb + + app/workers/post_receive.rb + + app/workers/system_hook_worker.rb + + lib/api.rb + + lib/api/entities.rb + + lib/api/helpers.rb + + lib/api/issues.rb + + lib/api/merge_requests.rb + + lib/api/milestones.rb + + lib/api/notes.rb + + lib/api/projects.rb + + lib/api/session.rb + + lib/api/users.rb + + lib/event_filter.rb + + lib/extracts_path.rb + + lib/file_size_validator.rb + + lib/gitlab/app_logger.rb + + lib/gitlab/auth.rb + + lib/gitlab/backend/gitolite.rb + + lib/gitlab/backend/gitolite_config.rb + + lib/gitlab/backend/grack_auth.rb + + lib/gitlab/git_logger.rb + + lib/gitlab/git_stats.rb + + lib/gitlab/graph/commit.rb + + lib/gitlab/graph/json_builder.rb + + lib/gitlab/inline_diff.rb + + lib/gitlab/logger.rb + + lib/gitlab/markdown.rb + + lib/gitlab/project_mover.rb + + lib/gitlab/regex.rb + + lib/gitlab/satellite/action.rb + + lib/gitlab/satellite/edit_file_action.rb + + lib/gitlab/satellite/merge_action.rb + + lib/gitlab/satellite/satellite.rb + + lib/gitlab/seeder.rb + + lib/gitlab/theme.rb + + lib/hooks/post-receive + + lib/redcarpet/render/gitlab_html.rb + + + \ No newline at end of file diff --git a/doc/code/panel/tree.js b/doc/code/panel/tree.js new file mode 100644 index 00000000..eeb04922 --- /dev/null +++ b/doc/code/panel/tree.js @@ -0,0 +1 @@ +var tree = [["","","files",[["","","app",[["","","assets",[["","","fonts",[["OFL.txt","files/app/assets/fonts/OFL_txt.html","",[]]]]]],["","","contexts",[["base_context.rb","files/app/contexts/base_context_rb.html","",[]],["commit_load_context.rb","files/app/contexts/commit_load_context_rb.html","",[]],["issues_bulk_update_context.rb","files/app/contexts/issues_bulk_update_context_rb.html","",[]],["issues_list_context.rb","files/app/contexts/issues_list_context_rb.html","",[]],["merge_requests_load_context.rb","files/app/contexts/merge_requests_load_context_rb.html","",[]],["","","notes",[["create_context.rb","files/app/contexts/notes/create_context_rb.html","",[]],["load_context.rb","files/app/contexts/notes/load_context_rb.html","",[]]]],["project_update_context.rb","files/app/contexts/project_update_context_rb.html","",[]],["search_context.rb","files/app/contexts/search_context_rb.html","",[]],["test_hook_context.rb","files/app/contexts/test_hook_context_rb.html","",[]]]],["","","controllers",[["","","admin",[["dashboard_controller.rb","files/app/controllers/admin/dashboard_controller_rb.html","",[]],["groups_controller.rb","files/app/controllers/admin/groups_controller_rb.html","",[]],["hooks_controller.rb","files/app/controllers/admin/hooks_controller_rb.html","",[]],["logs_controller.rb","files/app/controllers/admin/logs_controller_rb.html","",[]],["projects_controller.rb","files/app/controllers/admin/projects_controller_rb.html","",[]],["resque_controller.rb","files/app/controllers/admin/resque_controller_rb.html","",[]],["team_members_controller.rb","files/app/controllers/admin/team_members_controller_rb.html","",[]],["users_controller.rb","files/app/controllers/admin/users_controller_rb.html","",[]]]],["admin_controller.rb","files/app/controllers/admin_controller_rb.html","",[]],["application_controller.rb","files/app/controllers/application_controller_rb.html","",[]],["blame_controller.rb","files/app/controllers/blame_controller_rb.html","",[]],["blob_controller.rb","files/app/controllers/blob_controller_rb.html","",[]],["commit_controller.rb","files/app/controllers/commit_controller_rb.html","",[]],["commits_controller.rb","files/app/controllers/commits_controller_rb.html","",[]],["compare_controller.rb","files/app/controllers/compare_controller_rb.html","",[]],["dashboard_controller.rb","files/app/controllers/dashboard_controller_rb.html","",[]],["deploy_keys_controller.rb","files/app/controllers/deploy_keys_controller_rb.html","",[]],["errors_controller.rb","files/app/controllers/errors_controller_rb.html","",[]],["groups_controller.rb","files/app/controllers/groups_controller_rb.html","",[]],["help_controller.rb","files/app/controllers/help_controller_rb.html","",[]],["hooks_controller.rb","files/app/controllers/hooks_controller_rb.html","",[]],["issues_controller.rb","files/app/controllers/issues_controller_rb.html","",[]],["keys_controller.rb","files/app/controllers/keys_controller_rb.html","",[]],["labels_controller.rb","files/app/controllers/labels_controller_rb.html","",[]],["merge_requests_controller.rb","files/app/controllers/merge_requests_controller_rb.html","",[]],["milestones_controller.rb","files/app/controllers/milestones_controller_rb.html","",[]],["notes_controller.rb","files/app/controllers/notes_controller_rb.html","",[]],["omniauth_callbacks_controller.rb","files/app/controllers/omniauth_callbacks_controller_rb.html","",[]],["profiles_controller.rb","files/app/controllers/profiles_controller_rb.html","",[]],["project_resource_controller.rb","files/app/controllers/project_resource_controller_rb.html","",[]],["projects_controller.rb","files/app/controllers/projects_controller_rb.html","",[]],["protected_branches_controller.rb","files/app/controllers/protected_branches_controller_rb.html","",[]],["refs_controller.rb","files/app/controllers/refs_controller_rb.html","",[]],["repositories_controller.rb","files/app/controllers/repositories_controller_rb.html","",[]],["search_controller.rb","files/app/controllers/search_controller_rb.html","",[]],["services_controller.rb","files/app/controllers/services_controller_rb.html","",[]],["snippets_controller.rb","files/app/controllers/snippets_controller_rb.html","",[]],["team_members_controller.rb","files/app/controllers/team_members_controller_rb.html","",[]],["tree_controller.rb","files/app/controllers/tree_controller_rb.html","",[]],["wikis_controller.rb","files/app/controllers/wikis_controller_rb.html","",[]]]],["","","decorators",[["application_decorator.rb","files/app/decorators/application_decorator_rb.html","",[]],["commit_decorator.rb","files/app/decorators/commit_decorator_rb.html","",[]],["event_decorator.rb","files/app/decorators/event_decorator_rb.html","",[]],["tree_decorator.rb","files/app/decorators/tree_decorator_rb.html","",[]],["user_decorator.rb","files/app/decorators/user_decorator_rb.html","",[]]]],["","","helpers",[["application_helper.rb","files/app/helpers/application_helper_rb.html","",[]],["commits_helper.rb","files/app/helpers/commits_helper_rb.html","",[]],["dashboard_helper.rb","files/app/helpers/dashboard_helper_rb.html","",[]],["events_helper.rb","files/app/helpers/events_helper_rb.html","",[]],["gitlab_markdown_helper.rb","files/app/helpers/gitlab_markdown_helper_rb.html","",[]],["issues_helper.rb","files/app/helpers/issues_helper_rb.html","",[]],["merge_requests_helper.rb","files/app/helpers/merge_requests_helper_rb.html","",[]],["namespaces_helper.rb","files/app/helpers/namespaces_helper_rb.html","",[]],["notes_helper.rb","files/app/helpers/notes_helper_rb.html","",[]],["profile_helper.rb","files/app/helpers/profile_helper_rb.html","",[]],["projects_helper.rb","files/app/helpers/projects_helper_rb.html","",[]],["snippets_helper.rb","files/app/helpers/snippets_helper_rb.html","",[]],["tab_helper.rb","files/app/helpers/tab_helper_rb.html","",[]],["tags_helper.rb","files/app/helpers/tags_helper_rb.html","",[]],["tree_helper.rb","files/app/helpers/tree_helper_rb.html","",[]]]],["","","mailers",[["notify.rb","files/app/mailers/notify_rb.html","",[]]]],["","","models",[["ability.rb","files/app/models/ability_rb.html","",[]],["commit.rb","files/app/models/commit_rb.html","",[]],["event.rb","files/app/models/event_rb.html","",[]],["gitlab_ci_service.rb","files/app/models/gitlab_ci_service_rb.html","",[]],["group.rb","files/app/models/group_rb.html","",[]],["issue.rb","files/app/models/issue_rb.html","",[]],["key.rb","files/app/models/key_rb.html","",[]],["merge_request.rb","files/app/models/merge_request_rb.html","",[]],["milestone.rb","files/app/models/milestone_rb.html","",[]],["namespace.rb","files/app/models/namespace_rb.html","",[]],["note.rb","files/app/models/note_rb.html","",[]],["project.rb","files/app/models/project_rb.html","",[]],["project_hook.rb","files/app/models/project_hook_rb.html","",[]],["protected_branch.rb","files/app/models/protected_branch_rb.html","",[]],["service.rb","files/app/models/service_rb.html","",[]],["service_hook.rb","files/app/models/service_hook_rb.html","",[]],["snippet.rb","files/app/models/snippet_rb.html","",[]],["system_hook.rb","files/app/models/system_hook_rb.html","",[]],["tree.rb","files/app/models/tree_rb.html","",[]],["user.rb","files/app/models/user_rb.html","",[]],["users_project.rb","files/app/models/users_project_rb.html","",[]],["web_hook.rb","files/app/models/web_hook_rb.html","",[]],["wiki.rb","files/app/models/wiki_rb.html","",[]]]],["","","observers",[["activity_observer.rb","files/app/observers/activity_observer_rb.html","",[]],["issue_observer.rb","files/app/observers/issue_observer_rb.html","",[]],["key_observer.rb","files/app/observers/key_observer_rb.html","",[]],["merge_request_observer.rb","files/app/observers/merge_request_observer_rb.html","",[]],["note_observer.rb","files/app/observers/note_observer_rb.html","",[]],["project_observer.rb","files/app/observers/project_observer_rb.html","",[]],["system_hook_observer.rb","files/app/observers/system_hook_observer_rb.html","",[]],["user_observer.rb","files/app/observers/user_observer_rb.html","",[]],["users_project_observer.rb","files/app/observers/users_project_observer_rb.html","",[]]]],["","","roles",[["account.rb","files/app/roles/account_rb.html","",[]],["authority.rb","files/app/roles/authority_rb.html","",[]],["git_host.rb","files/app/roles/git_host_rb.html","",[]],["issue_commonality.rb","files/app/roles/issue_commonality_rb.html","",[]],["namespaced_project.rb","files/app/roles/namespaced_project_rb.html","",[]],["note_event.rb","files/app/roles/note_event_rb.html","",[]],["push_event.rb","files/app/roles/push_event_rb.html","",[]],["push_observer.rb","files/app/roles/push_observer_rb.html","",[]],["repository.rb","files/app/roles/repository_rb.html","",[]],["static_model.rb","files/app/roles/static_model_rb.html","",[]],["team.rb","files/app/roles/team_rb.html","",[]],["votes.rb","files/app/roles/votes_rb.html","",[]]]],["","","uploaders",[["attachment_uploader.rb","files/app/uploaders/attachment_uploader_rb.html","",[]]]],["","","workers",[["post_receive.rb","files/app/workers/post_receive_rb.html","",[]],["system_hook_worker.rb","files/app/workers/system_hook_worker_rb.html","",[]]]]]],["","","lib",[["","","api",[["entities.rb","files/lib/api/entities_rb.html","",[]],["helpers.rb","files/lib/api/helpers_rb.html","",[]],["issues.rb","files/lib/api/issues_rb.html","",[]],["merge_requests.rb","files/lib/api/merge_requests_rb.html","",[]],["milestones.rb","files/lib/api/milestones_rb.html","",[]],["notes.rb","files/lib/api/notes_rb.html","",[]],["projects.rb","files/lib/api/projects_rb.html","",[]],["session.rb","files/lib/api/session_rb.html","",[]],["users.rb","files/lib/api/users_rb.html","",[]]]],["api.rb","files/lib/api_rb.html","",[]],["event_filter.rb","files/lib/event_filter_rb.html","",[]],["extracts_path.rb","files/lib/extracts_path_rb.html","",[]],["file_size_validator.rb","files/lib/file_size_validator_rb.html","",[]],["","","gitlab",[["app_logger.rb","files/lib/gitlab/app_logger_rb.html","",[]],["auth.rb","files/lib/gitlab/auth_rb.html","",[]],["","","backend",[["gitolite.rb","files/lib/gitlab/backend/gitolite_rb.html","",[]],["gitolite_config.rb","files/lib/gitlab/backend/gitolite_config_rb.html","",[]],["grack_auth.rb","files/lib/gitlab/backend/grack_auth_rb.html","",[]]]],["git_logger.rb","files/lib/gitlab/git_logger_rb.html","",[]],["git_stats.rb","files/lib/gitlab/git_stats_rb.html","",[]],["","","graph",[["commit.rb","files/lib/gitlab/graph/commit_rb.html","",[]],["json_builder.rb","files/lib/gitlab/graph/json_builder_rb.html","",[]]]],["inline_diff.rb","files/lib/gitlab/inline_diff_rb.html","",[]],["logger.rb","files/lib/gitlab/logger_rb.html","",[]],["markdown.rb","files/lib/gitlab/markdown_rb.html","",[]],["project_mover.rb","files/lib/gitlab/project_mover_rb.html","",[]],["regex.rb","files/lib/gitlab/regex_rb.html","",[]],["","","satellite",[["action.rb","files/lib/gitlab/satellite/action_rb.html","",[]],["edit_file_action.rb","files/lib/gitlab/satellite/edit_file_action_rb.html","",[]],["merge_action.rb","files/lib/gitlab/satellite/merge_action_rb.html","",[]],["satellite.rb","files/lib/gitlab/satellite/satellite_rb.html","",[]]]],["seeder.rb","files/lib/gitlab/seeder_rb.html","",[]],["theme.rb","files/lib/gitlab/theme_rb.html","",[]]]],["","","hooks",[["post-receive","files/lib/hooks/post-receive.html","",[]]]],["","","redcarpet",[["","","render",[["gitlab_html.rb","files/lib/redcarpet/render/gitlab_html_rb.html","",[]]]]]]]]]],["Ability","classes/Ability.html"," < Object",[]],["Account","classes/Account.html","",[]],["ActivityObserver","classes/ActivityObserver.html"," < ActiveRecord::Observer",[]],["Admin","classes/Admin.html","",[["DashboardController","classes/Admin/DashboardController.html"," < AdminController",[]],["GroupsController","classes/Admin/GroupsController.html"," < AdminController",[]],["HooksController","classes/Admin/HooksController.html"," < AdminController",[]],["LogsController","classes/Admin/LogsController.html"," < AdminController",[]],["ProjectsController","classes/Admin/ProjectsController.html"," < AdminController",[]],["ResqueController","classes/Admin/ResqueController.html"," < AdminController",[]],["TeamMembersController","classes/Admin/TeamMembersController.html"," < AdminController",[]],["UsersController","classes/Admin/UsersController.html"," < AdminController",[]]]],["AdminController","classes/AdminController.html"," < ApplicationController",[]],["ApplicationController","classes/ApplicationController.html"," < ActionController::Base",[]],["ApplicationDecorator","classes/ApplicationDecorator.html"," < Draper::Base",[]],["ApplicationHelper","classes/ApplicationHelper.html","",[]],["AttachmentUploader","classes/AttachmentUploader.html"," < CarrierWave::Uploader::Base",[]],["Authority","classes/Authority.html","",[]],["BaseContext","classes/BaseContext.html"," < Object",[]],["BlameController","classes/BlameController.html"," < ProjectResourceController",[]],["BlobController","classes/BlobController.html"," < ProjectResourceController",[]],["Commit","classes/Commit.html"," < Object",[]],["CommitController","classes/CommitController.html"," < ProjectResourceController",[]],["CommitDecorator","classes/CommitDecorator.html"," < ApplicationDecorator",[]],["CommitLoadContext","classes/CommitLoadContext.html"," < BaseContext",[]],["CommitsController","classes/CommitsController.html"," < ProjectResourceController",[]],["CommitsHelper","classes/CommitsHelper.html","",[]],["CompareController","classes/CompareController.html"," < ProjectResourceController",[]],["DashboardController","classes/DashboardController.html"," < ApplicationController",[]],["DashboardHelper","classes/DashboardHelper.html","",[]],["DeployKeysController","classes/DeployKeysController.html"," < ProjectResourceController",[]],["ErrorsController","classes/ErrorsController.html"," < ApplicationController",[]],["Event","classes/Event.html"," < ActiveRecord::Base",[]],["EventDecorator","classes/EventDecorator.html"," < ApplicationDecorator",[]],["EventFilter","classes/EventFilter.html"," < Object",[]],["EventsHelper","classes/EventsHelper.html","",[]],["ExtractsPath","classes/ExtractsPath.html","",[["InvalidPathError","classes/ExtractsPath/InvalidPathError.html"," < StandardError",[]]]],["FileSizeValidator","classes/FileSizeValidator.html"," < ActiveModel::EachValidator",[["Helper","classes/FileSizeValidator/Helper.html"," < Object",[]]]],["GitHost","classes/GitHost.html","",[]],["Gitlab","classes/Gitlab.html","",[["API","classes/Gitlab/API.html"," < Grape::API",[]],["APIHelpers","classes/Gitlab/APIHelpers.html","",[]],["AppLogger","classes/Gitlab/AppLogger.html"," < Gitlab::Logger",[]],["Auth","classes/Gitlab/Auth.html"," < Object",[]],["Entities","classes/Gitlab/Entities.html","",[["Hook","classes/Gitlab/Entities/Hook.html"," < Grape::Entity",[]],["Issue","classes/Gitlab/Entities/Issue.html"," < Grape::Entity",[]],["MRNote","classes/Gitlab/Entities/MRNote.html"," < Grape::Entity",[]],["MergeRequest","classes/Gitlab/Entities/MergeRequest.html"," < Grape::Entity",[]],["Milestone","classes/Gitlab/Entities/Milestone.html"," < Grape::Entity",[]],["Note","classes/Gitlab/Entities/Note.html"," < Grape::Entity",[]],["Project","classes/Gitlab/Entities/Project.html"," < Grape::Entity",[]],["ProjectMember","classes/Gitlab/Entities/ProjectMember.html"," < Gitlab::Entities::UserBasic",[]],["ProjectSnippet","classes/Gitlab/Entities/ProjectSnippet.html"," < Grape::Entity",[]],["RepoCommit","classes/Gitlab/Entities/RepoCommit.html"," < Grape::Entity",[]],["RepoObject","classes/Gitlab/Entities/RepoObject.html"," < Grape::Entity",[]],["SSHKey","classes/Gitlab/Entities/SSHKey.html"," < Grape::Entity",[]],["User","classes/Gitlab/Entities/User.html"," < Grape::Entity",[]],["UserBasic","classes/Gitlab/Entities/UserBasic.html"," < Grape::Entity",[]],["UserLogin","classes/Gitlab/Entities/UserLogin.html"," < Gitlab::Entities::UserBasic",[]]]],["GitLogger","classes/Gitlab/GitLogger.html"," < Gitlab::Logger",[]],["GitStats","classes/Gitlab/GitStats.html"," < Object",[]],["Gitolite","classes/Gitlab/Gitolite.html"," < Object",[["AccessDenied","classes/Gitlab/Gitolite/AccessDenied.html"," < StandardError",[]]]],["GitoliteConfig","classes/Gitlab/GitoliteConfig.html"," < Object",[["PullError","classes/Gitlab/GitoliteConfig/PullError.html"," < StandardError",[]],["PushError","classes/Gitlab/GitoliteConfig/PushError.html"," < StandardError",[]]]],["Graph","classes/Gitlab/Graph.html","",[["Commit","classes/Gitlab/Graph/Commit.html"," < Object",[]],["JsonBuilder","classes/Gitlab/Graph/JsonBuilder.html"," < Object",[]]]],["InlineDiff","classes/Gitlab/InlineDiff.html"," < Object",[]],["Issues","classes/Gitlab/Issues.html"," < Grape::API",[]],["Logger","classes/Gitlab/Logger.html"," < Logger",[]],["Markdown","classes/Gitlab/Markdown.html","",[]],["MergeRequests","classes/Gitlab/MergeRequests.html"," < Grape::API",[]],["Milestones","classes/Gitlab/Milestones.html"," < Grape::API",[]],["Notes","classes/Gitlab/Notes.html"," < Grape::API",[]],["ProjectMover","classes/Gitlab/ProjectMover.html"," < Object",[["ProjectMoveError","classes/Gitlab/ProjectMover/ProjectMoveError.html"," < StandardError",[]]]],["Projects","classes/Gitlab/Projects.html"," < Grape::API",[]],["Regex","classes/Gitlab/Regex.html","",[]],["Satellite","classes/Gitlab/Satellite.html","",[["Action","classes/Gitlab/Satellite/Action.html"," < Object",[]],["EditFileAction","classes/Gitlab/Satellite/EditFileAction.html"," < Action",[]],["MergeAction","classes/Gitlab/Satellite/MergeAction.html"," < Action",[]],["Satellite","classes/Gitlab/Satellite/Satellite.html"," < Object",[]]]],["Seeder","classes/Gitlab/Seeder.html"," < Object",[]],["Session","classes/Gitlab/Session.html"," < Grape::API",[]],["Theme","classes/Gitlab/Theme.html"," < Object",[]],["Users","classes/Gitlab/Users.html"," < Grape::API",[]]]],["GitlabCiService","classes/GitlabCiService.html"," < Service",[]],["GitlabMarkdownHelper","classes/GitlabMarkdownHelper.html","",[]],["Grack","classes/Grack.html","",[["Auth","classes/Grack/Auth.html"," < Rack::Auth::Basic",[]]]],["Group","classes/Group.html"," < Namespace",[]],["GroupsController","classes/GroupsController.html"," < ApplicationController",[]],["HelpController","classes/HelpController.html"," < ApplicationController",[]],["HooksController","classes/HooksController.html"," < ProjectResourceController",[]],["Issue","classes/Issue.html"," < ActiveRecord::Base",[]],["IssueCommonality","classes/IssueCommonality.html","",[["ClassMethods","classes/IssueCommonality/ClassMethods.html","",[]]]],["IssueObserver","classes/IssueObserver.html"," < ActiveRecord::Observer",[]],["IssuesBulkUpdateContext","classes/IssuesBulkUpdateContext.html"," < BaseContext",[]],["IssuesController","classes/IssuesController.html"," < ProjectResourceController",[]],["IssuesHelper","classes/IssuesHelper.html","",[]],["IssuesListContext","classes/IssuesListContext.html"," < BaseContext",[]],["Key","classes/Key.html"," < ActiveRecord::Base",[]],["KeyObserver","classes/KeyObserver.html"," < ActiveRecord::Observer",[]],["KeysController","classes/KeysController.html"," < ApplicationController",[]],["LabelsController","classes/LabelsController.html"," < ProjectResourceController",[]],["MergeRequest","classes/MergeRequest.html"," < ActiveRecord::Base",[]],["MergeRequestObserver","classes/MergeRequestObserver.html"," < ActiveRecord::Observer",[]],["MergeRequestsController","classes/MergeRequestsController.html"," < ProjectResourceController",[]],["MergeRequestsHelper","classes/MergeRequestsHelper.html","",[]],["MergeRequestsLoadContext","classes/MergeRequestsLoadContext.html"," < BaseContext",[]],["Milestone","classes/Milestone.html"," < ActiveRecord::Base",[]],["MilestonesController","classes/MilestonesController.html"," < ProjectResourceController",[]],["Namespace","classes/Namespace.html"," < ActiveRecord::Base",[]],["NamespacedProject","classes/NamespacedProject.html","",[]],["NamespacesHelper","classes/NamespacesHelper.html","",[]],["Note","classes/Note.html"," < ActiveRecord::Base",[]],["NoteEvent","classes/NoteEvent.html","",[]],["NoteObserver","classes/NoteObserver.html"," < ActiveRecord::Observer",[]],["Notes","classes/Notes.html","",[["CreateContext","classes/Notes/CreateContext.html"," < BaseContext",[]],["LoadContext","classes/Notes/LoadContext.html"," < BaseContext",[]]]],["NotesController","classes/NotesController.html"," < ProjectResourceController",[]],["NotesHelper","classes/NotesHelper.html","",[]],["Notify","classes/Notify.html"," < ActionMailer::Base",[]],["OmniauthCallbacksController","classes/OmniauthCallbacksController.html"," < Devise::OmniauthCallbacksController",[]],["PostReceive","classes/PostReceive.html"," < Object",[]],["ProfileHelper","classes/ProfileHelper.html","",[]],["ProfilesController","classes/ProfilesController.html"," < ApplicationController",[]],["Project","classes/Project.html"," < ActiveRecord::Base",[["TransferError","classes/Project/TransferError.html"," < StandardError",[]]]],["ProjectHook","classes/ProjectHook.html"," < WebHook",[]],["ProjectObserver","classes/ProjectObserver.html"," < ActiveRecord::Observer",[]],["ProjectResourceController","classes/ProjectResourceController.html"," < ApplicationController",[]],["ProjectUpdateContext","classes/ProjectUpdateContext.html"," < BaseContext",[]],["ProjectsController","classes/ProjectsController.html"," < ProjectResourceController",[]],["ProjectsHelper","classes/ProjectsHelper.html","",[]],["ProtectedBranch","classes/ProtectedBranch.html"," < ActiveRecord::Base",[]],["ProtectedBranchesController","classes/ProtectedBranchesController.html"," < ProjectResourceController",[]],["PushEvent","classes/PushEvent.html","",[]],["PushObserver","classes/PushObserver.html","",[]],["Redcarpet","classes/Redcarpet.html","",[["Render","classes/Redcarpet/Render.html","",[["GitlabHTML","classes/Redcarpet/Render/GitlabHTML.html"," < Redcarpet::Render::HTML",[]]]]]],["RefsController","classes/RefsController.html"," < ProjectResourceController",[]],["RepositoriesController","classes/RepositoriesController.html"," < ProjectResourceController",[]],["Repository","classes/Repository.html","",[]],["SearchContext","classes/SearchContext.html"," < Object",[]],["SearchController","classes/SearchController.html"," < ApplicationController",[]],["Service","classes/Service.html"," < ActiveRecord::Base",[]],["ServiceHook","classes/ServiceHook.html"," < WebHook",[]],["ServicesController","classes/ServicesController.html"," < ProjectResourceController",[]],["Snippet","classes/Snippet.html"," < ActiveRecord::Base",[]],["SnippetsController","classes/SnippetsController.html"," < ProjectResourceController",[]],["SnippetsHelper","classes/SnippetsHelper.html","",[]],["StaticModel","classes/StaticModel.html","",[["ClassMethods","classes/StaticModel/ClassMethods.html","",[]]]],["SystemHook","classes/SystemHook.html"," < WebHook",[]],["SystemHookObserver","classes/SystemHookObserver.html"," < ActiveRecord::Observer",[]],["SystemHookWorker","classes/SystemHookWorker.html"," < Object",[]],["TabHelper","classes/TabHelper.html","",[]],["TagsHelper","classes/TagsHelper.html","",[]],["Team","classes/Team.html","",[]],["TeamMembersController","classes/TeamMembersController.html"," < ProjectResourceController",[]],["TestHookContext","classes/TestHookContext.html"," < BaseContext",[]],["Tree","classes/Tree.html"," < Object",[]],["TreeController","classes/TreeController.html"," < ProjectResourceController",[]],["TreeDecorator","classes/TreeDecorator.html"," < ApplicationDecorator",[]],["TreeHelper","classes/TreeHelper.html","",[]],["User","classes/User.html"," < ActiveRecord::Base",[]],["UserDecorator","classes/UserDecorator.html"," < ApplicationDecorator",[]],["UserObserver","classes/UserObserver.html"," < ActiveRecord::Observer",[]],["UsersProject","classes/UsersProject.html"," < ActiveRecord::Base",[]],["UsersProjectObserver","classes/UsersProjectObserver.html"," < ActiveRecord::Observer",[]],["Votes","classes/Votes.html","",[]],["WebHook","classes/WebHook.html"," < ActiveRecord::Base",[]],["Wiki","classes/Wiki.html"," < ActiveRecord::Base",[]],["WikisController","classes/WikisController.html"," < ProjectResourceController",[]]] \ No newline at end of file diff --git a/lib/tasks/gitlab/generate_docs.rake b/lib/tasks/gitlab/generate_docs.rake new file mode 100644 index 00000000..58795fac --- /dev/null +++ b/lib/tasks/gitlab/generate_docs.rake @@ -0,0 +1,7 @@ +namespace :gitlab do + desc "GITLAB | Generate sdocs for project" + task generate_docs: :environment do + system("bundle exec sdoc -o doc/code app lib") + end +end +