Class: ProjectWiki

Inherits:
Wiki
  • Object
show all
Defined in:
app/models/project_wiki.rb

Constant Summary

Constants inherited from Wiki

Wiki::ALLOWED_EXTENSIONS_REGEX, Wiki::CREATED_AT_ORDER, Wiki::CouldNotCreateWikiError, Wiki::DIRECTION_ASC, Wiki::DIRECTION_DESC, Wiki::HOMEPAGE, Wiki::MARKUPS, Wiki::SIDEBAR, Wiki::TITLE_ORDER, Wiki::VALID_USER_MARKUPS

Instance Attribute Summary

Attributes inherited from Wiki

#container, #error_message, #user

Instance Method Summary collapse

Methods inherited from Wiki

#==, canonicalize_filename, #capture_git_error, #cleanup, cname, #create_page, #default_branch, #delete_page, #empty?, #exists?, find_by_id, #find_file, #find_page, #find_sidebar, for_container, #full_path, #git_garbage_collect_worker_klass, #has_home_page?, #hashed_storage?, #hook_attrs, #id, #initialize, #list_pages, #page_title_and_dir, #path, preview_slug, #repository, #repository_storage, #sidebar_entries, sluggified_full_path, sluggified_title, #update_page, #wiki_base_path

Methods included from Gitlab::Utils::Override

#extended, extensions, #included, #method_added, #override, #prepended, #queue_verification, verify!

Methods included from Gitlab::Git::WrapsGitalyErrors

#wrapped_gitaly_errors

Methods included from Repositories::CanHousekeepRepository

#git_garbage_collect_worker_klass, #increment_pushes_since_gc, #pushes_since_gc, #reset_pushes_since_gc

Methods included from HasRepository

#after_change_head_branch_does_not_exist, #after_repository_change_head, #commit, #commit_by, #commits_by, #default_branch, #default_branch_from_group_preferences, #default_branch_from_preferences, #empty_repo?, #full_path, #http_url_to_repo, #lfs_enabled?, #lfs_http_url_to_repo, #reload_default_branch, #repo_exists?, #repository, #repository_exists?, #repository_size_checker, #root_ref?, #ssh_url_to_repo, #storage, #url_to_repo, #valid_repo?, #web_url

Methods included from Gitlab::ShellAdapter

#gitlab_shell

Methods included from Referable

#referable_inspect, #reference_link_text, #to_reference, #to_reference_base

Constructor Details

This class inherits a constructor from Wiki

Instance Method Details

#after_post_receiveObject



30
31
32
33
34
35
36
37
# File 'app/models/project_wiki.rb', line 30

def after_post_receive
  # Update storage statistics
  ProjectCacheWorker.perform_async(project.id, [], [:wiki_size])

  # This call is repeated for post-receive, to make sure we're updating
  # the activity columns for Git pushes as well.
  after_wiki_activity
end

#after_wiki_activityObject



23
24
25
26
27
# File 'app/models/project_wiki.rb', line 23

def after_wiki_activity
  # Update activity columns, this is done synchronously to avoid
  # replication delays in Geo.
  project.touch(:last_activity_at, :last_repository_updated_at)
end

#create_wiki_repositoryObject



16
17
18
19
20
# File 'app/models/project_wiki.rb', line 16

def create_wiki_repository
  super

  track_wiki_repository
end

#disk_path(*args, &block) ⇒ Object



11
12
13
# File 'app/models/project_wiki.rb', line 11

def disk_path(*args, &block)
  container.disk_path + '.wiki'
end