Commit 90b1019a authored by Job van der Voort's avatar Job van der Voort

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

parents 15a6211e 206455a7
Please view this file on the master branch, on stable branches it's out of date. Please view this file on the master branch, on stable branches it's out of date.
v 7.12.0 (unreleased) v 7.12.0 (unreleased)
- Allow to configure location of the `.gitlab_shell_secret` file. (Jakub Jirutka) - Allow to configure location of the `.gitlab_shell_secret` file. (Jakub Jirutka)
- Disabled expansion of top/bottom blobs for new file diffs
- Update Asciidoctor gem to version 1.5.2. (Jakub Jirutka)
- Fix resolving of relative links to repository files in AsciiDoc documents. (Jakub Jirutka)
v 7.11.0 (unreleased) v 7.11.0 (unreleased)
- Fix broken view when viewing history of a file that includes a path that used to be another file (Stan Hu) - Fix broken view when viewing history of a file that includes a path that used to be another file (Stan Hu)
...@@ -71,8 +74,6 @@ v 7.11.0 (unreleased) ...@@ -71,8 +74,6 @@ v 7.11.0 (unreleased)
- Spin spinner icon next to "Checking for CI status..." on MR page. - Spin spinner icon next to "Checking for CI status..." on MR page.
- Fix reference links in dashboard activity and ATOM feeds. - Fix reference links in dashboard activity and ATOM feeds.
- Ensure that the first added admin performs repository imports - Ensure that the first added admin performs repository imports
- Update Asciidoctor gem to version 1.5.2. (Jakub Jirutka)
- Fix resolving of relative links to repository files in AsciiDoc documents. (Jakub Jirutka)
v 7.10.2 v 7.10.2
- Fix CI links on MR page - Fix CI links on MR page
......
...@@ -44,7 +44,7 @@ gem "browser" ...@@ -44,7 +44,7 @@ gem "browser"
# Extracting information from a git repository # Extracting information from a git repository
# Provide access to Gitlab::Git library # Provide access to Gitlab::Git library
gem "gitlab_git", '~> 7.1.12' gem "gitlab_git", '~> 7.1.13'
# Ruby/Rack Git Smart-HTTP Server Handler # Ruby/Rack Git Smart-HTTP Server Handler
gem 'gitlab-grack', '~> 2.0.2', require: 'grack' gem 'gitlab-grack', '~> 2.0.2', require: 'grack'
......
...@@ -225,11 +225,11 @@ GEM ...@@ -225,11 +225,11 @@ GEM
mime-types (~> 1.19) mime-types (~> 1.19)
gitlab_emoji (0.1.0) gitlab_emoji (0.1.0)
gemojione (~> 2.0) gemojione (~> 2.0)
gitlab_git (7.1.12) gitlab_git (7.1.13)
activesupport (~> 4.0) activesupport (~> 4.0)
charlock_holmes (~> 0.6) charlock_holmes (~> 0.6)
gitlab-linguist (~> 3.0) gitlab-linguist (~> 3.0)
rugged (~> 0.21.2) rugged (~> 0.22.2)
gitlab_meta (7.0) gitlab_meta (7.0)
gitlab_omniauth-ldap (1.2.1) gitlab_omniauth-ldap (1.2.1)
net-ldap (~> 0.9) net-ldap (~> 0.9)
...@@ -530,7 +530,7 @@ GEM ...@@ -530,7 +530,7 @@ GEM
sexp_processor (~> 4.1) sexp_processor (~> 4.1)
rubyntlm (0.5.0) rubyntlm (0.5.0)
rubypants (0.2.0) rubypants (0.2.0)
rugged (0.21.4) rugged (0.22.2)
rugments (1.0.0.beta6) rugments (1.0.0.beta6)
safe_yaml (0.9.7) safe_yaml (0.9.7)
sanitize (2.1.0) sanitize (2.1.0)
...@@ -723,7 +723,7 @@ DEPENDENCIES ...@@ -723,7 +723,7 @@ DEPENDENCIES
gitlab-grack (~> 2.0.2) gitlab-grack (~> 2.0.2)
gitlab-linguist (~> 3.0.1) gitlab-linguist (~> 3.0.1)
gitlab_emoji (~> 0.1) gitlab_emoji (~> 0.1)
gitlab_git (~> 7.1.12) gitlab_git (~> 7.1.13)
gitlab_meta (= 7.0) gitlab_meta (= 7.0)
gitlab_omniauth-ldap (= 1.2.1) gitlab_omniauth-ldap (= 1.2.1)
gollum-lib (~> 4.0.2) gollum-lib (~> 4.0.2)
......
...@@ -101,6 +101,10 @@ module DiffHelper ...@@ -101,6 +101,10 @@ module DiffHelper
(bottom) ? 'js-unfold-bottom' : '' (bottom) ? 'js-unfold-bottom' : ''
end end
def unfold_class(unfold)
(unfold) ? 'unfold js-unfold' : ''
end
def diff_line_content(line) def diff_line_content(line)
if line.blank? if line.blank?
"  " "  "
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
- if @form.unfold? && @form.since != 1 && !@form.bottom? - if @form.unfold? && @form.since != 1 && !@form.bottom?
%tr.line_holder{ id: @form.since } %tr.line_holder{ id: @form.since }
= render "projects/diffs/match_line", {line: @match_line, = render "projects/diffs/match_line", {line: @match_line,
line_old: @form.since, line_new: @form.since, bottom: false} line_old: @form.since, line_new: @form.since, bottom: false, new_file: false}
- @lines.each_with_index do |line, index| - @lines.each_with_index do |line, index|
- line_new = index + @form.since - line_new = index + @form.since
...@@ -16,4 +16,4 @@ ...@@ -16,4 +16,4 @@
- if @form.unfold? && @form.bottom? && @form.to < @blob.loc - if @form.unfold? && @form.bottom? && @form.to < @blob.loc
%tr.line_holder{ id: @form.to } %tr.line_holder{ id: @form.to }
= render "projects/diffs/match_line", {line: @match_line, = render "projects/diffs/match_line", {line: @match_line,
line_old: @form.to, line_new: @form.to, bottom: true} line_old: @form.to, line_new: @form.to, bottom: true, new_file: false}
%td.old_line.diff-line-num.unfold.js-unfold{data: {linenumber: line_old}, %td.old_line.diff-line-num{data: {linenumber: line_old},
class: unfold_bottom_class(bottom)} class: [unfold_bottom_class(bottom), unfold_class(!new_file)]}
\... \...
%td.new_line.diff-line-num.unfold.js-unfold{data: {linenumber: line_new}, %td.new_line.diff-line-num{data: {linenumber: line_new},
class: unfold_bottom_class(bottom)} class: [unfold_bottom_class(bottom), unfold_class(!new_file)]}
\... \...
%td.line_content.matched= line %td.line_content.matched= line
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
%tr.line_holder{ id: line_code, class: "#{type}" } %tr.line_holder{ id: line_code, class: "#{type}" }
- if type == "match" - if type == "match"
= render "projects/diffs/match_line", {line: line.text, = render "projects/diffs/match_line", {line: line.text,
line_old: line_old, line_new: line.new_pos, bottom: false} line_old: line_old, line_new: line.new_pos, bottom: false, new_file: diff_file.new_file}
- else - else
%td.old_line %td.old_line
= link_to raw(type == "new" ? "&nbsp;" : line_old), "##{line_code}", id: line_code = link_to raw(type == "new" ? "&nbsp;" : line_old), "##{line_code}", id: line_code
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
- if last_line > 0 - if last_line > 0
= render "projects/diffs/match_line", {line: "", = render "projects/diffs/match_line", {line: "",
line_old: last_line, line_new: last_line, bottom: true} line_old: last_line, line_new: last_line, bottom: true, new_file: diff_file.new_file}
- if diff_file.diff.blank? && diff_file.mode_changed? - if diff_file.diff.blank? && diff_file.mode_changed?
.file-mode-changed .file-mode-changed
......
...@@ -106,6 +106,16 @@ describe DiffHelper do ...@@ -106,6 +106,16 @@ describe DiffHelper do
end end
end end
describe 'unfold_class' do
it 'returns empty on false' do
expect(unfold_class(false)).to eq('')
end
it 'returns a class on true' do
expect(unfold_class(true)).to eq('unfold js-unfold')
end
end
describe 'diff_line_content' do describe 'diff_line_content' do
it 'should return non breaking space when line is empty' do it 'should return non breaking space when line is empty' do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment