From 96d49bf04ce77c975fe500f4d961e4a1ffed4c26 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Sun, 30 Dec 2012 14:43:00 +0200 Subject: Use sdoc to generate application code documentation --- doc/code/classes/Namespace.html | 629 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 629 insertions(+) create mode 100644 doc/code/classes/Namespace.html (limited to 'doc/code/classes/Namespace.html') diff --git a/doc/code/classes/Namespace.html b/doc/code/classes/Namespace.html new file mode 100644 index 00000000000..02c9b7e44ed --- /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 -- cgit v1.2.1