diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-04-29 12:25:46 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-04-29 12:25:46 +0300 |
commit | 332a17cf42a15fb39396ebc85bcbe997054f9a31 (patch) | |
tree | 6afa15905ff927cddc24bac71ad3359de128cd09 | |
parent | acad85459fcd9ed7136ecf7327e90bc961544fdf (diff) | |
parent | 822ba95f75858a904d20779b0d27d7f5aee2d7b7 (diff) | |
download | gitlab-ce-332a17cf42a15fb39396ebc85bcbe997054f9a31.tar.gz |
Merge branch 'master' of dev.gitlab.org:gitlab/gitlabhq
-rw-r--r-- | CHANGELOG | 2 | ||||
-rw-r--r-- | config/routes.rb | 2 | ||||
-rw-r--r-- | spec/lib/extracts_path_spec.rb | 16 |
3 files changed, 19 insertions, 1 deletions
diff --git a/CHANGELOG b/CHANGELOG index 33cf1c4378e..909f9972712 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -19,6 +19,8 @@ v 7.11.0 (unreleased) - Include commit comments in MR from a forked project. - Fix adding new group members from admin area - Add default project and snippet visibility settings to the admin web UI. + - + - Fix bug where commit data would not appear in some subdirectories (Stan Hu) - Fix bug where Slack service channel was not saved in admin template settings. (Stan Hu) - Move snippets UI to fluid layout - Improve UI for sidebar. Increase separation between navigation and content diff --git a/config/routes.rb b/config/routes.rb index e059f5830f5..4b38dede7b4 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -435,7 +435,7 @@ Gitlab::Application.routes.draw do member do # tree viewer logs get 'logs_tree', constraints: { id: Gitlab::Regex.git_reference_regex } - get 'logs_tree/:path' => 'refs#logs_tree', as: :logs_file, constraints: { + get 'logs_tree/*path' => 'refs#logs_tree', as: :logs_file, constraints: { id: Gitlab::Regex.git_reference_regex, path: /.*/ } diff --git a/spec/lib/extracts_path_spec.rb b/spec/lib/extracts_path_spec.rb index ac602eac154..05bcebaa3a2 100644 --- a/spec/lib/extracts_path_spec.rb +++ b/spec/lib/extracts_path_spec.rb @@ -2,6 +2,8 @@ require 'spec_helper' describe ExtractsPath do include ExtractsPath + include RepoHelpers + include Rails.application.routes.url_helpers let(:project) { double('project') } @@ -11,6 +13,20 @@ describe ExtractsPath do project.stub(path_with_namespace: 'gitlab/gitlab-ci') end + describe '#assign_ref' do + let(:ref) { sample_commit[:id] } + let(:params) { {path: sample_commit[:line_code_path], ref: ref} } + + before do + @project = create(:project) + end + + it "log tree path should have no escape sequences" do + assign_ref_vars + expect(@logs_path).to eq("/#{@project.path_with_namespace}/refs/#{ref}/logs_tree/files/ruby/popen.rb") + end + end + describe '#extract_ref' do it "returns an empty pair when no @project is set" do @project = nil |