Class: ProjectWiki

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

Constant Summary

Constants inherited from Wiki

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

Instance Attribute Summary

Attributes inherited from Wiki

#container, #error_message, #user

Instance Method Summary collapse

Methods inherited from Wiki

#create_page, #create_wiki_repository, #default_branch, #delete_page, #empty?, #ensure_repository, #exists?, #find_file, #find_page, #find_sidebar, for_container, #full_path, #has_home_page?, #hashed_storage?, #hook_attrs, #initialize, #list_pages, #page_title_and_dir, #path, #repository, #repository_storage, #sidebar_entries, #update_page, #wiki, #wiki_base_path

Methods included from Gitlab::Utils::Override

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

Methods included from Gitlab::Utils::StrongMemoize

#clear_memoization, #strong_memoize, #strong_memoized?

Methods included from HasRepository

#commit, #commit_by, #commits_by, #default_branch, #default_branch_from_preferences, #empty_repo?, #full_path, #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


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

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


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

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

#disk_path(*args, &block) ⇒ Object


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

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