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
c3d78515
Commit
c3d78515
authored
Aug 10, 2017
by
Nick Thomas
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'ce/master' into ce-to-ee-2017-08-10
parents
b5dbe0ba
0ff2f664
Changes
41
Hide whitespace changes
Inline
Side-by-side
Showing
41 changed files
with
298 additions
and
104 deletions
+298
-104
.gitlab/merge_request_templates/Database Changes.md
.gitlab/merge_request_templates/Database Changes.md
+73
-0
Gemfile.lock
Gemfile.lock
+1
-0
app/assets/javascripts/dispatcher.js
app/assets/javascripts/dispatcher.js
+3
-0
app/assets/javascripts/fly_out_nav.js
app/assets/javascripts/fly_out_nav.js
+2
-1
app/assets/javascripts/init_changes_dropdown.js
app/assets/javascripts/init_changes_dropdown.js
+10
-0
app/assets/javascripts/jobs/components/header.vue
app/assets/javascripts/jobs/components/header.vue
+1
-1
app/assets/javascripts/merge_request_tabs.js
app/assets/javascripts/merge_request_tabs.js
+2
-11
app/assets/javascripts/sidebar_height_manager.js
app/assets/javascripts/sidebar_height_manager.js
+3
-0
app/assets/javascripts/vue_shared/components/header_ci_component.vue
...javascripts/vue_shared/components/header_ci_component.vue
+2
-2
app/assets/stylesheets/framework/highlight.scss
app/assets/stylesheets/framework/highlight.scss
+1
-1
app/assets/stylesheets/new_sidebar.scss
app/assets/stylesheets/new_sidebar.scss
+4
-0
app/assets/stylesheets/pages/diff.scss
app/assets/stylesheets/pages/diff.scss
+5
-1
app/assets/stylesheets/pages/issuable.scss
app/assets/stylesheets/pages/issuable.scss
+1
-1
app/assets/stylesheets/pages/projects.scss
app/assets/stylesheets/pages/projects.scss
+5
-5
app/controllers/projects/issues_controller.rb
app/controllers/projects/issues_controller.rb
+0
-12
app/models/redirect_route.rb
app/models/redirect_route.rb
+9
-1
app/views/projects/diffs/_diffs.html.haml
app/views/projects/diffs/_diffs.html.haml
+17
-15
app/views/projects/merge_requests/diffs/_diffs.html.haml
app/views/projects/merge_requests/diffs/_diffs.html.haml
+1
-1
app/views/shared/issuable/_sidebar.html.haml
app/views/shared/issuable/_sidebar.html.haml
+1
-1
changelogs/unreleased/29811-fix-line-number-alignment.yml
changelogs/unreleased/29811-fix-line-number-alignment.yml
+4
-0
changelogs/unreleased/36158-new-issue-button.yml
changelogs/unreleased/36158-new-issue-button.yml
+4
-0
changelogs/unreleased/36185-or-separator.yml
changelogs/unreleased/36185-or-separator.yml
+4
-0
changelogs/unreleased/mk-fix-case-insensitive-redirect-matching.yml
.../unreleased/mk-fix-case-insensitive-redirect-matching.yml
+4
-0
config/routes/repository.rb
config/routes/repository.rb
+3
-0
doc/install/installation.md
doc/install/installation.md
+3
-0
doc/update/8.17-to-9.0.md
doc/update/8.17-to-9.0.md
+10
-0
doc/update/9.0-to-9.1.md
doc/update/9.0-to-9.1.md
+10
-0
doc/update/9.1-to-9.2.md
doc/update/9.1-to-9.2.md
+10
-0
doc/update/9.2-to-9.3.md
doc/update/9.2-to-9.3.md
+10
-0
doc/update/9.3-to-9.4.md
doc/update/9.3-to-9.4.md
+10
-0
doc/update/9.4-to-9.5.md
doc/update/9.4-to-9.5.md
+4
-0
lib/gitlab/ee_compat_check.rb
lib/gitlab/ee_compat_check.rb
+3
-2
lib/gitlab/gitaly_client/repository_service.rb
lib/gitlab/gitaly_client/repository_service.rb
+1
-1
lib/support/nginx/gitlab-pages
lib/support/nginx/gitlab-pages
+4
-1
lib/support/nginx/gitlab-pages-ssl
lib/support/nginx/gitlab-pages-ssl
+4
-1
spec/javascripts/fly_out_nav_spec.js
spec/javascripts/fly_out_nav_spec.js
+1
-1
spec/lib/gitlab/gitaly_client/repository_service_spec.rb
spec/lib/gitlab/gitaly_client/repository_service_spec.rb
+0
-19
spec/lib/gitlab/ldap/config_spec.rb
spec/lib/gitlab/ldap/config_spec.rb
+4
-0
spec/models/redirect_route_spec.rb
spec/models/redirect_route_spec.rb
+10
-2
spec/models/route_spec.rb
spec/models/route_spec.rb
+50
-24
spec/serializers/pipeline_serializer_spec.rb
spec/serializers/pipeline_serializer_spec.rb
+4
-0
No files found.
.gitlab/merge_request_templates/Database Changes.md
0 → 100644
View file @
c3d78515
Remove this section and replace it with a description of your MR. Also follow the
checklist below and check off any tasks that are done. If a certain task can not
be done you should explain so in the MR body. You are free to remove any
sections that do not apply to your MR.
When gathering statistics (e.g. the output of
`EXPLAIN ANALYZE`
) you should make
sure your database has enough data. Having around 10 000 rows in the tables
being queries should provide a reasonable estimate of how a query will behave.
Also make sure that PostgreSQL uses the following settings:
*
`random_page_cost`
:
`1`
*
`work_mem`
:
`16MB`
*
`maintenance_work_mem`
: at least
`64MB`
*
`shared_buffers`
: at least
`256MB`
If you have access to GitLab.com's staging environment you should also run your
measurements there, and include the results in this MR.
## Database Checklist
When adding migrations:
-
[ ] Updated
`db/schema.rb`
-
[ ] Added a
`down`
method so the migration can be reverted
-
[ ] Added the output of the migration(s) to the MR body
-
[ ] Added the execution time of the migration(s) to the MR body
-
[ ] Added tests for the migration in
`spec/migrations`
if necessary (e.g. when
migrating data)
-
[ ] Made sure the migration won't interfere with a running GitLab cluster,
for example by disabling transactions for long running migrations
When adding or modifying queries to improve performance:
-
[ ] Included the raw SQL queries of the relevant queries
-
[ ] Included the output of
`EXPLAIN ANALYZE`
and execution timings of the
relevant queries
-
[ ] Added tests for the relevant changes
When adding indexes:
-
[ ] Described the need for these indexes in the MR body
-
[ ] Made sure existing indexes can not be reused instead
When adding foreign keys to existing tables:
-
[ ] Included a migration to remove orphaned rows in the source table
-
[ ] Removed any instances of
`dependent: ...`
that may no longer be necessary
When adding tables:
-
[ ] Ordered columns based on their type sizes in descending order
-
[ ] Added foreign keys if necessary
-
[ ] Added indexes if necessary
When removing columns, tables, indexes or other structures:
-
[ ] Removed these in a post-deployment migration
-
[ ] Made sure the application no longer uses (or ignores) these structures
## General Checklist
-
[
] [Changelog entry
](
https://docs.gitlab.com/ce/development/changelog.html
)
added, if necessary
-
[
] [Documentation created/updated
](
https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md
)
-
[ ] API support added
-
[ ] Tests added for this feature/bug
-
Review
-
[ ] Has been reviewed by UX
-
[ ] Has been reviewed by Frontend
-
[ ] Has been reviewed by Backend
-
[ ] Has been reviewed by Database
-
[
] Conform by the [merge request performance guides
](
http://docs.gitlab.com/ce/development/merge_request_performance_guidelines.html
)
-
[
] Conform by the [style guides
](
https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides
)
-
[
] [Squashed related commits together
](
https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits
)
Gemfile.lock
View file @
c3d78515
...
...
@@ -773,6 +773,7 @@ GEM
rubocop-gitlab-security (0.0.6)
rubocop (>= 0.47.1)
rubocop-rspec (1.15.1)
rubocop (>= 0.42.0)
ruby-fogbugz (0.2.1)
crack (~> 0.4)
ruby-prof (0.16.2)
...
...
app/assets/javascripts/dispatcher.js
View file @
c3d78515
...
...
@@ -82,6 +82,7 @@ import initNotes from './init_notes';
import
initLegacyFilters
from
'
./init_legacy_filters
'
;
import
initIssuableSidebar
from
'
./init_issuable_sidebar
'
;
import
UserFeatureHelper
from
'
./helpers/user_feature_helper
'
;
import
initChangesDropdown
from
'
./init_changes_dropdown
'
;
// EE-only
import
ApproversSelect
from
'
./approvers_select
'
;
...
...
@@ -255,6 +256,7 @@ import initGroupAnalytics from './init_group_analytics';
break
;
case
'
projects:compare:show
'
:
new
gl
.
Diff
();
initChangesDropdown
();
break
;
case
'
projects:branches:new
'
:
case
'
projects:branches:create
'
:
...
...
@@ -348,6 +350,7 @@ import initGroupAnalytics from './init_group_analytics';
container
:
'
.js-commit-pipeline-graph
'
,
}).
bindEvents
();
initNotes
();
initChangesDropdown
();
$
(
'
.commit-info.branches
'
).
load
(
document
.
querySelector
(
'
.js-commit-box
'
).
dataset
.
commitPath
);
break
;
case
'
projects:commit:pipelines
'
:
...
...
app/assets/javascripts/fly_out_nav.js
View file @
c3d78515
...
...
@@ -49,7 +49,8 @@ export const hideSubLevelItems = (el) => {
el
.
classList
.
remove
(
'
is-showing-fly-out
'
);
el
.
classList
.
remove
(
'
is-over
'
);
subItems
.
style
.
display
=
'
none
'
;
subItems
.
style
.
display
=
''
;
subItems
.
style
.
transform
=
''
;
subItems
.
classList
.
remove
(
'
is-above
'
);
};
...
...
app/assets/javascripts/init_changes_dropdown.js
0 → 100644
View file @
c3d78515
import
stickyMonitor
from
'
./lib/utils/sticky
'
;
export
default
()
=>
{
stickyMonitor
(
document
.
querySelector
(
'
.js-diff-files-changed
'
));
$
(
'
.js-diff-stats-dropdown
'
).
glDropdown
({
filterable
:
true
,
remoteFilter
:
false
,
});
};
app/assets/javascripts/jobs/components/header.vue
View file @
c3d78515
...
...
@@ -40,7 +40,7 @@
label
:
'
New issue
'
,
path
:
this
.
job
.
new_issue_path
,
cssClass
:
'
js-new-issue btn btn-new btn-inverted visible-md-block visible-lg-block
'
,
type
:
'
ujs-
link
'
,
type
:
'
link
'
,
});
}
...
...
app/assets/javascripts/merge_request_tabs.js
View file @
c3d78515
...
...
@@ -7,7 +7,7 @@ import Cookies from 'js-cookie';
import
'
./breakpoints
'
;
import
'
./flash
'
;
import
BlobForkSuggestion
from
'
./blob/blob_fork_suggestion
'
;
import
stickyMonitor
from
'
./lib/utils/sticky
'
;
import
initChangesDropdown
from
'
./init_changes_dropdown
'
;
/* eslint-disable max-len */
// MergeRequestTabs
...
...
@@ -267,9 +267,7 @@ import stickyMonitor from './lib/utils/sticky';
const
$container
=
$
(
'
#diffs
'
);
$container
.
html
(
data
.
html
);
this
.
initChangesDropdown
();
stickyMonitor
(
document
.
querySelector
(
'
.js-diff-files-changed
'
));
initChangesDropdown
();
if
(
typeof
gl
.
diffNotesCompileComponents
!==
'
undefined
'
)
{
gl
.
diffNotesCompileComponents
();
...
...
@@ -319,13 +317,6 @@ import stickyMonitor from './lib/utils/sticky';
});
}
initChangesDropdown
()
{
$
(
'
.js-diff-stats-dropdown
'
).
glDropdown
({
filterable
:
true
,
remoteFilter
:
false
,
});
}
// Show or hide the loading spinner
//
// status - Boolean, true to show, false to hide
...
...
app/assets/javascripts/sidebar_height_manager.js
View file @
c3d78515
import
_
from
'
underscore
'
;
import
Cookies
from
'
js-cookie
'
;
export
default
{
init
()
{
if
(
!
this
.
initialized
)
{
if
(
Cookies
.
get
(
'
new_nav
'
)
===
'
true
'
&&
$
(
'
.js-issuable-sidebar
'
).
length
)
return
;
this
.
$window
=
$
(
window
);
this
.
$rightSidebar
=
$
(
'
.js-right-sidebar
'
);
this
.
$navHeight
=
$
(
'
.navbar-gitlab
'
).
outerHeight
()
+
...
...
app/assets/javascripts/vue_shared/components/header_ci_component.vue
View file @
c3d78515
...
...
@@ -120,7 +120,7 @@ export default {
</a>
<a
v-if=
"action.type === 'ujs-link'"
v-
else-
if=
"action.type === 'ujs-link'"
:href=
"action.path"
data-method=
"post"
rel=
"nofollow"
...
...
@@ -129,7 +129,7 @@ export default {
</a>
<button
v-else=
"action.type === 'button'"
v-else
-if
=
"action.type === 'button'"
@
click=
"onClickAction(action)"
:disabled=
"action.isLoading"
:class=
"action.cssClass"
...
...
app/assets/stylesheets/framework/highlight.scss
View file @
c3d78515
...
...
@@ -47,7 +47,7 @@
font-family
:
$monospace_font
;
display
:
block
;
font-size
:
$code_font_size
!
important
;
line
-height
:
19px
;
min
-height
:
19px
;
white-space
:
nowrap
;
i
{
...
...
app/assets/stylesheets/new_sidebar.scss
View file @
c3d78515
...
...
@@ -218,6 +218,10 @@ $new-sidebar-collapsed-width: 50px;
&
:hover
{
color
:
$gl-text-color
;
svg
{
fill
:
$gl-text-color
;
}
}
}
...
...
app/assets/stylesheets/pages/diff.scss
View file @
c3d78515
...
...
@@ -574,10 +574,14 @@
@media
(
min-width
:
$screen-sm-min
)
{
position
:
-
webkit-sticky
;
position
:
sticky
;
top
:
8
4px
;
top
:
3
4px
;
background-color
:
$white-light
;
z-index
:
190
;
&
.diff-files-changed-merge-request
{
top
:
84px
;
}
+
.files
,
+
.alert
{
margin-top
:
1px
;
...
...
app/assets/stylesheets/pages/issuable.scss
View file @
c3d78515
...
...
@@ -35,7 +35,7 @@
.commit-box
,
.info-well
,
.commit-ci-menu
,
.files-changed
,
.files-changed
-inner
,
.limited-header-width
,
.limited-width-notes
{
@extend
.fixed-width-container
;
...
...
app/assets/stylesheets/pages/projects.scss
View file @
c3d78515
...
...
@@ -574,14 +574,14 @@ a.deploy-project-label {
&
:
:
before
{
content
:
"OR"
;
position
:
absolute
;
left
:
0
;
top
:
4
0%
;
left
:
-10px
;
top
:
5
0%
;
z-index
:
10
;
padding
:
8px
0
;
text-align
:
center
;
background-color
:
$white-light
;
color
:
$gl-text-color-tertiary
;
transform
:
translate
X
(
-50%
);
transform
:
translate
Y
(
-50%
);
font-size
:
12px
;
font-weight
:
bold
;
line-height
:
20px
;
...
...
@@ -589,8 +589,8 @@ a.deploy-project-label {
// Mobile
@media
(
max-width
:
$screen-xs-max
)
{
left
:
50%
;
top
:
10px
;
transform
:
translate
Y
(
-50%
);
top
:
0
;
transform
:
translate
X
(
-50%
);
padding
:
0
8px
;
}
}
...
...
app/controllers/projects/issues_controller.rb
View file @
c3d78515
...
...
@@ -260,18 +260,6 @@ class Projects::IssuesController < Projects::ApplicationController
return
render_404
unless
@project
.
feature_available?
(
:issues
,
current_user
)
end
def
redirect_to_external_issue_tracker
external
=
@project
.
external_issue_tracker
return
unless
external
if
action_name
==
'new'
redirect_to
external
.
new_issue_path
else
redirect_to
external
.
issue_tracker_path
end
end
def
issue_params
params
.
require
(
:issue
).
permit
(
*
issue_params_attributes
)
end
...
...
app/models/redirect_route.rb
View file @
c3d78515
...
...
@@ -8,5 +8,13 @@ class RedirectRoute < ActiveRecord::Base
presence:
true
,
uniqueness:
{
case_sensitive:
false
}
scope
:matching_path_and_descendants
,
->
(
path
)
{
where
(
'redirect_routes.path = ? OR redirect_routes.path LIKE ?'
,
path
,
"
#{
sanitize_sql_like
(
path
)
}
/%"
)
}
scope
:matching_path_and_descendants
,
->
(
path
)
do
wheres
=
if
Gitlab
::
Database
.
postgresql?
'LOWER(redirect_routes.path) = LOWER(?) OR LOWER(redirect_routes.path) LIKE LOWER(?)'
else
'redirect_routes.path = ? OR redirect_routes.path LIKE ?'
end
where
(
wheres
,
path
,
"
#{
sanitize_sql_like
(
path
)
}
/%"
)
end
end
app/views/projects/diffs/_diffs.html.haml
View file @
c3d78515
...
...
@@ -2,22 +2,24 @@
-
show_whitespace_toggle
=
local_assigns
.
fetch
(
:show_whitespace_toggle
,
true
)
-
can_create_note
=
!
@diff_notes_disabled
&&
can?
(
current_user
,
:create_note
,
diffs
.
project
)
-
diff_files
=
diffs
.
diff_files
-
merge_request
=
local_assigns
.
fetch
(
:merge_request
,
false
)
.content-block.oneline-block.files-changed.diff-files-changed.js-diff-files-changed
.inline-parallel-buttons
-
if
!
diffs_expanded?
&&
diff_files
.
any?
{
|
diff_file
|
diff_file
.
collapsed?
}
=
link_to
'Expand all'
,
url_for
(
params
.
merge
(
expanded:
1
,
format:
nil
)),
class:
'btn btn-default'
-
if
show_whitespace_toggle
-
if
current_controller?
(
:commit
)
=
commit_diff_whitespace_link
(
diffs
.
project
,
@commit
,
class:
'hidden-xs'
)
-
elsif
current_controller?
(
'projects/merge_requests/diffs'
)
=
diff_merge_request_whitespace_link
(
diffs
.
project
,
@merge_request
,
class:
'hidden-xs'
)
-
elsif
current_controller?
(
:compare
)
=
diff_compare_whitespace_link
(
diffs
.
project
,
params
[
:from
],
params
[
:to
],
class:
'hidden-xs'
)
.btn-group
=
inline_diff_btn
=
parallel_diff_btn
=
render
'projects/diffs/stats'
,
diff_files:
diff_files
.content-block.oneline-block.files-changed.diff-files-changed.js-diff-files-changed
{
class:
(
"diff-files-changed-merge-request"
if
merge_request
)
}
.files-changed-inner
.inline-parallel-buttons
-
if
!
diffs_expanded?
&&
diff_files
.
any?
{
|
diff_file
|
diff_file
.
collapsed?
}
=
link_to
'Expand all'
,
url_for
(
params
.
merge
(
expanded:
1
,
format:
nil
)),
class:
'btn btn-default'
-
if
show_whitespace_toggle
-
if
current_controller?
(
:commit
)
=
commit_diff_whitespace_link
(
diffs
.
project
,
@commit
,
class:
'hidden-xs'
)
-
elsif
current_controller?
(
'projects/merge_requests/diffs'
)
=
diff_merge_request_whitespace_link
(
diffs
.
project
,
@merge_request
,
class:
'hidden-xs'
)
-
elsif
current_controller?
(
:compare
)
=
diff_compare_whitespace_link
(
diffs
.
project
,
params
[
:from
],
params
[
:to
],
class:
'hidden-xs'
)
.btn-group
=
inline_diff_btn
=
parallel_diff_btn
=
render
'projects/diffs/stats'
,
diff_files:
diff_files
-
if
render_overflow_warning?
(
diff_files
)
=
render
'projects/diffs/warning'
,
diff_files:
diffs
...
...
app/views/projects/merge_requests/diffs/_diffs.html.haml
View file @
c3d78515
-
if
@merge_request_diff
.
collected?
||
@merge_request_diff
.
overflow?
=
render
'projects/merge_requests/diffs/versions'
=
render
"projects/diffs/diffs"
,
diffs:
@diffs
,
environment:
@environment
=
render
"projects/diffs/diffs"
,
diffs:
@diffs
,
environment:
@environment
,
merge_request:
true
-
elsif
@merge_request_diff
.
empty?
.nothing-here-block
Nothing to merge from
#{
@merge_request
.
source_branch
}
into
#{
@merge_request
.
target_branch
}
app/views/shared/issuable/_sidebar.html.haml
View file @
c3d78515
...
...
@@ -3,7 +3,7 @@
=
page_specific_javascript_bundle_tag
(
'common_vue'
)
=
page_specific_javascript_bundle_tag
(
'sidebar'
)
%aside
.right-sidebar.js-right-sidebar
{
data:
{
"offset-top"
=>
"50"
,
"spy"
=>
"affix"
,
signed:
{
in:
current_user
.
present?
}
},
class:
sidebar_gutter_collapsed_class
,
'aria-live'
=>
'polite'
}
%aside
.right-sidebar.js-right-sidebar
.js-issuable-sidebar
{
data:
{
"offset-top"
=>
(
"50"
unless
show_new_nav?
),
"spy"
=>
(
"affix"
unless
show_new_nav?
)
,
signed:
{
in:
current_user
.
present?
}
},
class:
sidebar_gutter_collapsed_class
,
'aria-live'
=>
'polite'
}
.issuable-sidebar
{
data:
{
endpoint:
"#{issuable_json_path(issuable)}"
}
}
-
can_edit_issuable
=
can?
(
current_user
,
:"admin_
#{
issuable
.
to_ability_name
}
"
,
@project
)
.block.issuable-sidebar-header
...
...
changelogs/unreleased/29811-fix-line-number-alignment.yml
0 → 100644
View file @
c3d78515
---
title
:
Fix the alignment of line numbers to lines of code in code viewer
merge_request
:
13403
author
:
Trevor Flynn
\ No newline at end of file
changelogs/unreleased/36158-new-issue-button.yml
0 → 100644
View file @
c3d78515
---
title
:
Fixes new issue button for failed job returning
404
merge_request
:
author
:
changelogs/unreleased/36185-or-separator.yml
0 → 100644
View file @
c3d78515
---
title
:
Align OR separator to center in new project page
merge_request
:
author
:
changelogs/unreleased/mk-fix-case-insensitive-redirect-matching.yml
0 → 100644
View file @
c3d78515
---
title
:
Fix destroy of case-insensitive conflicting redirects
merge_request
:
13357
author
:
config/routes/repository.rb
View file @
c3d78515
...
...
@@ -3,6 +3,9 @@
resource
:repository
,
only:
[
:create
]
do
member
do
get
':ref/archive'
,
constraints:
{
format:
Gitlab
::
PathRegex
.
archive_formats_regex
,
ref:
/.+/
},
action:
'archive'
,
as:
'archive'
# deprecated since GitLab 9.5
get
'archive'
,
constraints:
{
format:
Gitlab
::
PathRegex
.
archive_formats_regex
},
as:
'archive_alternative'
end
end
...
...
doc/install/installation.md
View file @
c3d78515
...
...
@@ -66,6 +66,9 @@ Install the required packages (needed to compile Ruby and native extensions to R
sudo apt-get install -y build-essential zlib1g-dev libyaml-dev libssl-dev libgdbm-dev libre2-dev libreadline-dev libncurses5-dev libffi-dev curl openssh-server checkinstall libxml2-dev libxslt-dev libcurl4-openssl-dev libicu-dev logrotate python-docutils pkg-config cmake
Ubuntu 14.04 (Trusty Tahr) doesn't have the
`libre2-dev`
package available, but
you can
[
install re2 manually
](
https://github.com/google/re2/wiki/Install
)
.
If you want to use Kerberos for user authentication, then install libkrb5-dev:
sudo apt-get install libkrb5-dev
...
...
doc/update/8.17-to-9.0.md
View file @
c3d78515
...
...
@@ -264,6 +264,16 @@ sudo systemctl daemon-reload
### 9. Install libs, migrations, etc.
GitLab 9.0.11
[
introduced
](
https://gitlab.com/gitlab-org/gitlab-ce/issues/24570
)
a dependency on on the
`re2`
regular expression library. To install this dependency:
```
bash
sudo
apt-get
install
libre2-dev
```
Ubuntu 14.04 (Trusty Tahr) doesn't have the
`libre2-dev`
package available, but
you can
[
install re2 manually
](
https://github.com/google/re2/wiki/Install
)
.
```
bash
cd
/home/git/gitlab
...
...
doc/update/9.0-to-9.1.md
View file @
c3d78515
...
...
@@ -264,6 +264,16 @@ sudo systemctl daemon-reload
### 9. Install libs, migrations, etc.
GitLab 9.1.8
[
introduced
](
https://gitlab.com/gitlab-org/gitlab-ce/issues/24570
)
a dependency on on the
`re2`
regular expression library. To install this dependency:
```
bash
sudo
apt-get
install
libre2-dev
```
Ubuntu 14.04 (Trusty Tahr) doesn't have the
`libre2-dev`
package available, but
you can
[
install re2 manually
](
https://github.com/google/re2/wiki/Install
)
.
```
bash
cd
/home/git/gitlab
...
...
doc/update/9.1-to-9.2.md
View file @
c3d78515
...
...
@@ -222,6 +222,16 @@ sudo systemctl daemon-reload
### 10. Install libs, migrations, etc.
GitLab 9.2.8
[
introduced
](
https://gitlab.com/gitlab-org/gitlab-ce/issues/24570
)
a dependency on on the
`re2`
regular expression library. To install this dependency:
```
bash
sudo
apt-get
install
libre2-dev
```
Ubuntu 14.04 (Trusty Tahr) doesn't have the
`libre2-dev`
package available, but
you can
[
install re2 manually
](
https://github.com/google/re2/wiki/Install
)
.
```
bash
cd
/home/git/gitlab
...
...
doc/update/9.2-to-9.3.md
View file @
c3d78515
...
...
@@ -258,6 +258,16 @@ sudo systemctl daemon-reload
### 12. Install libs, migrations, etc.
GitLab 9.3.8
[
introduced
](
https://gitlab.com/gitlab-org/gitlab-ce/issues/24570
)
a dependency on on the
`re2`
regular expression library. To install this dependency:
```
bash
sudo
apt-get
install
libre2-dev
```
Ubuntu 14.04 (Trusty Tahr) doesn't have the
`libre2-dev`
package available, but
you can
[
install re2 manually
](
https://github.com/google/re2/wiki/Install
)
.
```
bash
cd
/home/git/gitlab
...
...
doc/update/9.3-to-9.4.md
View file @
c3d78515
...
...
@@ -271,6 +271,16 @@ sudo systemctl daemon-reload
### 12. Install libs, migrations, etc.
GitLab 9.4
[
introduced
](
https://gitlab.com/gitlab-org/gitlab-ce/issues/24570
)
a dependency on on the
`re2`
regular expression library. To install this dependency:
```
bash
sudo
apt-get
install
libre2-dev
```
Ubuntu 14.04 (Trusty Tahr) doesn't have the
`libre2-dev`
package available, but
you can
[
install re2 manually
](
https://github.com/google/re2/wiki/Install
)
.
```
bash
cd
/home/git/gitlab
...
...
doc/update/9.4-to-9.5.md
View file @
c3d78515
...
...
@@ -295,6 +295,10 @@ sudo -u git -H bundle clean
# Run database migrations
sudo -u git -H bundle exec rake db:migrate RAILS_ENV=production
# Compile GetText PO files
sudo -u git -H bundle exec rake gettext:compile RAILS_ENV=production
# Update node dependencies and recompile assets
sudo -u git -H bundle exec rake yarn:install gitlab:assets:clean gitlab:assets:compile RAILS_ENV=production NODE_ENV=production
...
...
lib/gitlab/ee_compat_check.rb
View file @
c3d78515
...
...
@@ -98,10 +98,11 @@ module Gitlab
if
status
.
zero?
@ee_branch_found
=
ee_branch_prefix
else
_
,
status
=
step
(
"Fetching origin/
#{
ee_branch_suffix
}
"
,
%W[git fetch origin
#{
ee_branch_suffix
}
]
)
return
end
_
,
status
=
step
(
"Fetching origin/
#{
ee_branch_suffix
}
"
,
%W[git fetch origin
#{
ee_branch_suffix
}
]
)
if
status
.
zero?
@ee_branch_found
=
ee_branch_suffix
else
...
...
lib/gitlab/gitaly_client/repository_service.rb
View file @
c3d78515
...
...
@@ -10,7 +10,7 @@ module Gitlab
def
exists?
request
=
Gitaly
::
RepositoryExistsRequest
.
new
(
repository:
@gitaly_repo
)
GitalyClient
.
call
(
@storage
,
:repository_service
,
:exists
,
request
).
exists
GitalyClient
.
call
(
@storage
,
:repository_service
,
:
repository_
exists
,
request
).
exists
end
def
garbage_collect
(
create_bitmap
)
...
...
lib/support/nginx/gitlab-pages
View file @
c3d78515
...
...
@@ -18,8 +18,11 @@ server {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_cache off;
# The same address as passed to GitLab Pages: `-listen-proxy`
proxy_pass
http://localhost:8090/;
proxy_pass http://localhost:8090/;
}
# Define custom error pages
...
...
lib/support/nginx/gitlab-pages-ssl
View file @
c3d78515
...
...
@@ -67,8 +67,11 @@ server {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_cache off;
# The same address as passed to GitLab Pages: `-listen-proxy`
proxy_pass
http://localhost:8090/;
proxy_pass http://localhost:8090/;
}
# Define custom error pages
...
...
spec/javascripts/fly_out_nav_spec.js
View file @
c3d78515
...
...
@@ -59,7 +59,7 @@ describe('Fly out sidebar navigation', () => {
expect
(
el
.
querySelector
(
'
.sidebar-sub-level-items
'
).
style
.
display
,
).
toBe
(
'
none
'
);
).
toBe
(
''
);
});
it
(
'
does not hude subitems on mobile
'
,
()
=>
{
...
...
spec/lib/gitlab/gitaly_client/repository_service_spec.rb
deleted
100644 → 0
View file @
b5dbe0ba
require
'spec_helper'
describe
Gitlab
::
GitalyClient
::
RepositoryService
do
set
(
:project
)
{
create
(
:project
)
}
let
(
:storage_name
)
{
project
.
repository_storage
}
let
(
:relative_path
)
{
project
.
path_with_namespace
+
'.git'
}
let
(
:client
)
{
described_class
.
new
(
project
.
repository
)
}
describe
'#exists?'
do
it
'sends an exists message'
do
expect_any_instance_of
(
Gitaly
::
RepositoryService
::
Stub
)
.
to
receive
(
:exists
)
.
with
(
gitaly_request_with_path
(
storage_name
,
relative_path
),
kind_of
(
Hash
))
.
and_call_original
client
.
exists?
end
end
end
spec/lib/gitlab/ldap/config_spec.rb
View file @
c3d78515
...
...
@@ -15,7 +15,11 @@ describe Gitlab::LDAP::Config do
end
it
'raises an error if a unknown provider is used'
do
<<<<<<<
HEAD
expect
{
described_class
.
new
'unknown'
}.
to
raise_error
(
Gitlab
::
LDAP
::
Config
::
InvalidProvider
)
=======
expect
{
described_class
.
new
'unknown'
}.
to
raise_error
(
RuntimeError
)
>>>>>>>
ce
/
master
end
end
...
...
spec/models/redirect_route_spec.rb
View file @
c3d78515
...
...
@@ -20,8 +20,16 @@ describe RedirectRoute do
let!
(
:redirect4
)
{
group
.
redirect_routes
.
create
(
path:
'gitlabb/test/foo/bar'
)
}
let!
(
:redirect5
)
{
group
.
redirect_routes
.
create
(
path:
'gitlabb/test/baz'
)
}
it
'returns correct routes'
do
expect
(
described_class
.
matching_path_and_descendants
(
'gitlabb/test'
)).
to
match_array
([
redirect2
,
redirect3
,
redirect4
,
redirect5
])
context
'when the redirect route matches with same casing'
do
it
'returns correct routes'
do
expect
(
described_class
.
matching_path_and_descendants
(
'gitlabb/test'
)).
to
match_array
([
redirect2
,
redirect3
,
redirect4
,
redirect5
])
end
end
context
'when the redirect route matches with different casing'
do
it
'returns correct routes'
do
expect
(
described_class
.
matching_path_and_descendants
(
'GitLABB/test'
)).
to
match_array
([
redirect2
,
redirect3
,
redirect4
,
redirect5
])
end
end
end
end
spec/models/route_spec.rb
View file @
c3d78515
...
...
@@ -145,45 +145,71 @@ describe Route do
describe
'#delete_conflicting_redirects'
do
context
'when a redirect route with the same path exists'
do
let!
(
:redirect1
)
{
route
.
create_redirect
(
route
.
path
)
}
context
'when the redirect route has matching case'
do
let!
(
:redirect1
)
{
route
.
create_redirect
(
route
.
path
)
}
it
'deletes the redirect'
do
route
.
delete_conflicting_redirects
expect
(
route
.
conflicting_redirects
).
to
be_empty
it
'deletes the redirect'
do
expect
do
route
.
delete_conflicting_redirects
end
.
to
change
{
RedirectRoute
.
count
}.
by
(
-
1
)
end
context
'when redirect routes with paths descending from the route path exists'
do
let!
(
:redirect2
)
{
route
.
create_redirect
(
"
#{
route
.
path
}
/foo"
)
}
let!
(
:redirect3
)
{
route
.
create_redirect
(
"
#{
route
.
path
}
/foo/bar"
)
}
let!
(
:redirect4
)
{
route
.
create_redirect
(
"
#{
route
.
path
}
/baz/quz"
)
}
let!
(
:other_redirect
)
{
route
.
create_redirect
(
"other"
)
}
it
'deletes all redirects with paths that descend from the route path'
do
expect
do
route
.
delete_conflicting_redirects
end
.
to
change
{
RedirectRoute
.
count
}.
by
(
-
4
)
end
end
end
context
'when redirect routes with paths descending from the route path exists'
do
let!
(
:redirect2
)
{
route
.
create_redirect
(
"
#{
route
.
path
}
/foo"
)
}
let!
(
:redirect3
)
{
route
.
create_redirect
(
"
#{
route
.
path
}
/foo/bar"
)
}
let!
(
:redirect4
)
{
route
.
create_redirect
(
"
#{
route
.
path
}
/baz/quz"
)
}
let!
(
:other_redirect
)
{
route
.
create_redirect
(
"other"
)
}
context
'when the redirect route is differently cased'
do
let!
(
:redirect1
)
{
route
.
create_redirect
(
route
.
path
.
upcase
)
}
it
'deletes all redirects with paths that descend from the route path'
do
route
.
delete_conflicting_redirects
expect
(
route
.
conflicting_redirects
).
to
be_empty
it
'deletes the redirect'
do
expect
do
route
.
delete_conflicting_redirects
end
.
to
change
{
RedirectRoute
.
count
}.
by
(
-
1
)
end
end
end
end
describe
'#conflicting_redirects'
do
it
'returns an ActiveRecord::Relation'
do
expect
(
route
.
conflicting_redirects
).
to
be_an
(
ActiveRecord
::
Relation
)
end
context
'when a redirect route with the same path exists'
do
let!
(
:redirect1
)
{
route
.
create_redirect
(
route
.
path
)
}
context
'when the redirect route has matching case'
do
let!
(
:redirect1
)
{
route
.
create_redirect
(
route
.
path
)
}
it
'returns the redirect route'
do
expect
(
route
.
conflicting_redirects
).
to
be_an
(
ActiveRecord
::
Relation
)
expect
(
route
.
conflicting_redirects
).
to
match_array
([
redirect1
])
it
'returns the redirect route'
do
expect
(
route
.
conflicting_redirects
).
to
match_array
([
redirect1
])
end
context
'when redirect routes with paths descending from the route path exists'
do
let!
(
:redirect2
)
{
route
.
create_redirect
(
"
#{
route
.
path
}
/foo"
)
}
let!
(
:redirect3
)
{
route
.
create_redirect
(
"
#{
route
.
path
}
/foo/bar"
)
}
let!
(
:redirect4
)
{
route
.
create_redirect
(
"
#{
route
.
path
}
/baz/quz"
)
}
let!
(
:other_redirect
)
{
route
.
create_redirect
(
"other"
)
}
it
'returns the redirect routes'
do
expect
(
route
.
conflicting_redirects
).
to
match_array
([
redirect1
,
redirect2
,
redirect3
,
redirect4
])
end
end
end
context
'when redirect routes with paths descending from the route path exists'
do
let!
(
:redirect2
)
{
route
.
create_redirect
(
"
#{
route
.
path
}
/foo"
)
}
let!
(
:redirect3
)
{
route
.
create_redirect
(
"
#{
route
.
path
}
/foo/bar"
)
}
let!
(
:redirect4
)
{
route
.
create_redirect
(
"
#{
route
.
path
}
/baz/quz"
)
}
let!
(
:other_redirect
)
{
route
.
create_redirect
(
"other"
)
}
context
'when the redirect route is differently cased'
do
let!
(
:redirect1
)
{
route
.
create_redirect
(
route
.
path
.
upcase
)
}
it
'returns the redirect routes'
do
expect
(
route
.
conflicting_redirects
).
to
be_an
(
ActiveRecord
::
Relation
)
expect
(
route
.
conflicting_redirects
).
to
match_array
([
redirect1
,
redirect2
,
redirect3
,
redirect4
])
it
'returns the redirect route'
do
expect
(
route
.
conflicting_redirects
).
to
match_array
([
redirect1
])
end
end
end
...
...
spec/serializers/pipeline_serializer_spec.rb
View file @
c3d78515
...
...
@@ -111,7 +111,11 @@ describe PipelineSerializer do
shared_examples
'no N+1 queries'
do
it
'verifies number of queries'
,
:request_store
do
recorded
=
ActiveRecord
::
QueryRecorder
.
new
{
subject
}
<<<<<<<
HEAD
expect
(
recorded
.
count
).
to
be_within
(
1
).
of
(
61
)
=======
expect
(
recorded
.
count
).
to
be_within
(
1
).
of
(
57
)
>>>>>>>
ce
/
master
expect
(
recorded
.
cached_count
).
to
eq
(
0
)
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