Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
6a37f6f3
Commit
6a37f6f3
authored
May 22, 2018
by
GitLab Bot
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'upstream/master' into ce-to-ee-2018-05-22
# Conflicts: # config/webpack.config.js [ci skip]
parents
e012060b
67a12690
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
40 additions
and
9 deletions
+40
-9
VERSION
VERSION
+1
-1
app/views/layouts/nav/sidebar/_project.html.haml
app/views/layouts/nav/sidebar/_project.html.haml
+1
-1
changelogs/unreleased/collapsed-contextual-nav-update.yml
changelogs/unreleased/collapsed-contextual-nav-update.yml
+6
-0
changelogs/unreleased/fj-46459-fix-expose-url-when-base-url-set.yml
.../unreleased/fj-46459-fix-expose-url-when-base-url-set.yml
+5
-0
config/webpack.config.js
config/webpack.config.js
+3
-0
lib/api/helpers/related_resources_helpers.rb
lib/api/helpers/related_resources_helpers.rb
+7
-2
spec/features/projects/actve_tabs_spec.rb
spec/features/projects/actve_tabs_spec.rb
+2
-2
spec/features/projects/user_sees_sidebar_spec.rb
spec/features/projects/user_sees_sidebar_spec.rb
+1
-1
spec/lib/api/helpers/related_resources_helpers_spec.rb
spec/lib/api/helpers/related_resources_helpers_spec.rb
+14
-2
No files found.
VERSION
View file @
6a37f6f3
1
0.8
.0-pre
1
1.0
.0-pre
app/views/layouts/nav/sidebar/_project.html.haml
View file @
6a37f6f3
...
...
@@ -19,7 +19,7 @@
=
nav_link
(
path:
'projects#show'
,
html_options:
{
class:
"fly-out-top-item"
}
)
do
=
link_to
project_path
(
@project
)
do
%strong
.fly-out-top-item-name
=
_
(
'
Overview
'
)
=
_
(
'
Project
'
)
%li
.divider.fly-out-top-item
=
nav_link
(
path:
'projects#show'
)
do
=
link_to
project_path
(
@project
),
title:
_
(
'Project details'
),
class:
'shortcuts-project'
do
...
...
changelogs/unreleased/collapsed-contextual-nav-update.yml
0 → 100644
View file @
6a37f6f3
---
title
:
Renamed 'Overview' to 'Project' in collapsed contextual navigation at a project
level
merge_request
:
18996
author
:
Constance Okoghenun
type
:
fixed
changelogs/unreleased/fj-46459-fix-expose-url-when-base-url-set.yml
0 → 100644
View file @
6a37f6f3
---
title
:
Fixed bug where generated api urls didn't add the base url if set
merge_request
:
19003
author
:
type
:
fixed
config/webpack.config.js
View file @
6a37f6f3
...
...
@@ -95,12 +95,15 @@ module.exports = {
vendor
:
path
.
join
(
ROOT_PATH
,
'
vendor/assets/javascripts
'
),
vue
$
:
'
vue/dist/vue.esm.js
'
,
spec
:
path
.
join
(
ROOT_PATH
,
'
spec/javascripts
'
),
<<<<<<<
HEAD
// EE-only
ee
:
path
.
join
(
ROOT_PATH
,
'
ee/app/assets/javascripts
'
),
ee_empty_states
:
path
.
join
(
ROOT_PATH
,
'
ee/app/views/shared/empty_states
'
),
ee_icons
:
path
.
join
(
ROOT_PATH
,
'
ee/app/views/shared/icons
'
),
ee_images
:
path
.
join
(
ROOT_PATH
,
'
ee/app/assets/images
'
),
=======
>>>>>>>
upstream
/
master
},
},
...
...
lib/api/helpers/related_resources_helpers.rb
View file @
6a37f6f3
...
...
@@ -13,9 +13,14 @@ module API
def
expose_url
(
path
)
url_options
=
Gitlab
::
Application
.
routes
.
default_url_options
protocol
,
host
,
port
=
url_options
.
slice
(
:protocol
,
:host
,
:port
).
values
protocol
,
host
,
port
,
script_name
=
url_options
.
values_at
(
:protocol
,
:host
,
:port
,
:script_name
)
URI
::
Generic
.
build
(
scheme:
protocol
,
host:
host
,
port:
port
,
path:
path
).
to_s
# Using a blank component at the beginning of the join we ensure
# that the resulted path will start with '/'. If the resulted path
# does not start with '/', URI::Generic#build will fail
path_with_script_name
=
File
.
join
(
''
,
[
script_name
,
path
].
select
(
&
:present?
))
URI
::
Generic
.
build
(
scheme:
protocol
,
host:
host
,
port:
port
,
path:
path_with_script_name
).
to_s
end
private
...
...
spec/features/projects/actve_tabs_spec.rb
View file @
6a37f6f3
...
...
@@ -35,7 +35,7 @@ describe 'Project active tab' do
visit
project_path
(
project
)
end
it_behaves_like
'page has active tab'
,
'
Overview
'
it_behaves_like
'page has active tab'
,
'
Project
'
it_behaves_like
'page has active sub tab'
,
'Details'
context
'on project Home/Activity'
do
...
...
@@ -43,7 +43,7 @@ describe 'Project active tab' do
click_tab
(
'Activity'
)
end
it_behaves_like
'page has active tab'
,
'
Overview
'
it_behaves_like
'page has active tab'
,
'
Project
'
it_behaves_like
'page has active sub tab'
,
'Activity'
end
end
...
...
spec/features/projects/user_sees_sidebar_spec.rb
View file @
6a37f6f3
...
...
@@ -37,7 +37,7 @@ describe 'Projects > User sees sidebar' do
visit
project_path
(
project
)
within
(
'.nav-sidebar'
)
do
expect
(
page
).
to
have_content
'
Overview
'
expect
(
page
).
to
have_content
'
Project
'
expect
(
page
).
to
have_content
'Issues'
expect
(
page
).
to
have_content
'Wiki'
...
...
spec/lib/api/helpers/related_resources_helpers_spec.rb
View file @
6a37f6f3
...
...
@@ -9,9 +9,9 @@ describe API::Helpers::RelatedResourcesHelpers do
let
(
:path
)
{
'/api/v4/awesome_endpoint'
}
subject
(
:url
)
{
helpers
.
expose_url
(
path
)
}
def
stub_default_url_options
(
protocol:
'http'
,
host:
'example.com'
,
port:
nil
)
def
stub_default_url_options
(
protocol:
'http'
,
host:
'example.com'
,
port:
nil
,
script_name:
''
)
expect
(
Gitlab
::
Application
.
routes
).
to
receive
(
:default_url_options
)
.
and_return
(
protocol:
protocol
,
host:
host
,
port:
port
)
.
and_return
(
protocol:
protocol
,
host:
host
,
port:
port
,
script_name:
script_name
)
end
it
'respects the protocol if it is HTTP'
do
...
...
@@ -37,5 +37,17 @@ describe API::Helpers::RelatedResourcesHelpers do
is_expected
.
to
start_with
(
'http://example.com:8080/'
)
end
it
'includes the relative_url before the path if it is set'
do
stub_default_url_options
(
script_name:
'/gitlab'
)
is_expected
.
to
start_with
(
'http://example.com/gitlab/api/v4'
)
end
it
'includes the path after the host'
do
stub_default_url_options
is_expected
.
to
start_with
(
'http://example.com/api/v4'
)
end
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment