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/CommitLoadContext.html | 159 ++++++++++++++++++++++++++++++++ 1 file changed, 159 insertions(+) create mode 100644 doc/code/classes/CommitLoadContext.html (limited to 'doc/code/classes/CommitLoadContext.html') diff --git a/doc/code/classes/CommitLoadContext.html b/doc/code/classes/CommitLoadContext.html new file mode 100644 index 00000000000..82c04febe6b --- /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 -- cgit v1.2.1