Commit 98fe8fb98da2035a354505f828e0783ebc44c9f7

Authored by Dmitriy Zaporozhets
2 parents 3a1c6ccc 6223a73f

Merge branch 'master' of github.com:gitlabhq/gitlabhq

app/views/projects/snippets/_blob.html.haml
@@ -6,9 +6,5 @@ @@ -6,9 +6,5 @@
6 .btn-group.tree-btn-group.pull-right 6 .btn-group.tree-btn-group.pull-right
7 - if can?(current_user, :admin_project_snippet, @project) || @snippet.author == current_user 7 - if can?(current_user, :admin_project_snippet, @project) || @snippet.author == current_user
8 = link_to "Edit", edit_project_snippet_path(@project, @snippet), class: "btn btn-tiny", title: 'Edit Snippet' 8 = link_to "Edit", edit_project_snippet_path(@project, @snippet), class: "btn btn-tiny", title: 'Edit Snippet'
9 - = link_to "raw", raw_project_snippet_path(@project, @snippet), class: "btn btn-tiny", target: "_blank"  
10 - .file-content.code  
11 - - unless @snippet.content.empty?  
12 - = render 'shared/file_hljs', blob: @snippet  
13 - - else  
14 - %p.nothing_here_message Empty file 9 + = link_to "Raw", raw_project_snippet_path(@project, @snippet), class: "btn btn-tiny", target: "_blank"
  10 + = render 'snippets/blob_content'
app/views/snippets/_blob.html.haml
@@ -8,17 +8,4 @@ @@ -8,17 +8,4 @@
8 = link_to "Edit", edit_snippet_path(@snippet), class: "btn btn-tiny", title: 'Edit Snippet' 8 = link_to "Edit", edit_snippet_path(@snippet), class: "btn btn-tiny", title: 'Edit Snippet'
9 = link_to "Delete", snippet_path(@snippet), method: :delete, data: { confirm: "Are you sure?" }, class: "btn btn-tiny", title: 'Delete Snippet' 9 = link_to "Delete", snippet_path(@snippet), method: :delete, data: { confirm: "Are you sure?" }, class: "btn btn-tiny", title: 'Delete Snippet'
10 = link_to "Raw", raw_snippet_path(@snippet), class: "btn btn-tiny", target: "_blank" 10 = link_to "Raw", raw_snippet_path(@snippet), class: "btn btn-tiny", target: "_blank"
11 - - unless @snippet.content.empty?  
12 - - if gitlab_markdown?(@snippet.file_name)  
13 - .file-content.wiki  
14 - = preserve do  
15 - = markdown(@snippet.data)  
16 - - elsif markup?(@snippet.file_name)  
17 - .file-content.wiki  
18 - = render_markup(@snippet.file_name, @snippet.data)  
19 - - else  
20 - .file-content.code  
21 - = render 'shared/file_hljs', blob: @snippet  
22 - - else  
23 - .file-content.code  
24 - %p.nothing_here_message Empty file 11 + = render 'snippets/blob_content'
app/views/snippets/_blob_content.html.haml 0 → 100644
@@ -0,0 +1,14 @@ @@ -0,0 +1,14 @@
  1 +- unless @snippet.content.empty?
  2 + - if gitlab_markdown?(@snippet.file_name)
  3 + .file-content.wiki
  4 + = preserve do
  5 + = markdown(@snippet.data)
  6 + - elsif markup?(@snippet.file_name)
  7 + .file-content.wiki
  8 + = render_markup(@snippet.file_name, @snippet.data)
  9 + - else
  10 + .file-content.code
  11 + = render 'shared/file_hljs', blob: @snippet
  12 +- else
  13 + .file-content.code
  14 + %p.nothing_here_message Empty file
doc/development/architecture.md
@@ -30,7 +30,7 @@ To summarize here's the [directory structure of the `git` user home directory](. @@ -30,7 +30,7 @@ To summarize here's the [directory structure of the `git` user home directory](.
30 30
31 ps aux | grep '^git' 31 ps aux | grep '^git'
32 32
33 -GitLab has several components to operate. As a system user (i.e. any user that is not the `git` user) it requires a persistent database (MySQL/PostreSQL) and redis database. It also uses Apache httpd or nginx to proxypass Unicorn. As the `git` user it starts Sidekiq and Unicorn (a simple ruby HTTP server running on port `8080` by default). Under the gitlab user there are normally 6 processes: `unicorn_rails master` (1 process), `unicorn_rails worker` (2 processes), `python pygments` (2 processes), `sidekiq` (1 process). Pygments is used by GitLab for syntax highlighting in the web interface. 33 +GitLab has several components to operate. As a system user (i.e. any user that is not the `git` user) it requires a persistent database (MySQL/PostreSQL) and redis database. It also uses Apache httpd or nginx to proxypass Unicorn. As the `git` user it starts Sidekiq and Unicorn (a simple ruby HTTP server running on port `8080` by default). Under the gitlab user there are normally 4 processes: `unicorn_rails master` (1 process), `unicorn_rails worker` (2 processes), `sidekiq` (1 process).
34 34
35 ## Repository access 35 ## Repository access
36 36
lib/tasks/gitlab/check.rake
@@ -312,52 +312,6 @@ namespace :gitlab do @@ -312,52 +312,6 @@ namespace :gitlab do
312 fix_and_rerun 312 fix_and_rerun
313 end 313 end
314 end 314 end
315 -  
316 - def check_python2_exists  
317 - print "Has python2? ... "  
318 -  
319 - # Python prints its version to STDERR  
320 - # so we can't just use run("python2 --version")  
321 - if run_and_match("which python2", /python2$/)  
322 - puts "yes".green  
323 - else  
324 - puts "no".red  
325 - try_fixing_it(  
326 - "Make sure you have Python 2.5+ installed",  
327 - "Link it to python2"  
328 - )  
329 - for_more_information(  
330 - see_installation_guide_section "Packages / Dependencies"  
331 - )  
332 - fix_and_rerun  
333 - end  
334 - end  
335 -  
336 - def check_python2_version  
337 - print "python2 is supported version? ... "  
338 -  
339 - # Python prints its version to STDERR  
340 - # so we can't just use run("python2 --version")  
341 -  
342 - unless run_and_match("which python2", /python2$/)  
343 - puts "can't check because of previous errors".magenta  
344 - return  
345 - end  
346 -  
347 - if `python2 --version 2>&1` =~ /2\.[567]\.\d/  
348 - puts "yes".green  
349 - else  
350 - puts "no".red  
351 - try_fixing_it(  
352 - "Make sure you have Python 2.5+ installed",  
353 - "Link it to python2"  
354 - )  
355 - for_more_information(  
356 - see_installation_guide_section "Packages / Dependencies"  
357 - )  
358 - fix_and_rerun  
359 - end  
360 - end  
361 end 315 end
362 316
363 317