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
fdc7ee17
Commit
fdc7ee17
authored
May 31, 2018
by
GitLab Bot
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'upstream/master' into ce-to-ee-2018-05-31
parents
c5f91608
a53a0487
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
30 additions
and
18 deletions
+30
-18
.gitignore
.gitignore
+1
-0
GITALY_SERVER_VERSION
GITALY_SERVER_VERSION
+1
-1
app/services/boards/issues/list_service.rb
app/services/boards/issues/list_service.rb
+3
-5
changelogs/unreleased/rails5-fix-46230.yml
changelogs/unreleased/rails5-fix-46230.yml
+5
-0
lib/gitlab/contributions_calendar.rb
lib/gitlab/contributions_calendar.rb
+1
-1
lib/gitlab/gitaly_client/commit_service.rb
lib/gitlab/gitaly_client/commit_service.rb
+1
-1
spec/lib/gitlab/git/blob_spec.rb
spec/lib/gitlab/git/blob_spec.rb
+6
-0
spec/lib/gitlab/git/commit_spec.rb
spec/lib/gitlab/git/commit_spec.rb
+2
-2
spec/lib/gitlab/git/repository_spec.rb
spec/lib/gitlab/git/repository_spec.rb
+2
-2
spec/models/project_services/kubernetes_service_spec.rb
spec/models/project_services/kubernetes_service_spec.rb
+6
-6
spec/support/gitlab-git-test.git/packed-refs
spec/support/gitlab-git-test.git/packed-refs
+1
-0
spec/support/helpers/seed_repo.rb
spec/support/helpers/seed_repo.rb
+1
-0
No files found.
.gitignore
View file @
fdc7ee17
...
...
@@ -65,6 +65,7 @@ eslint-report.html
/tags
/tmp/*
/vendor/bundle/*
/vendor/gitaly-ruby
/builds*
/shared/*
/.gitlab_workhorse_secret
...
...
GITALY_SERVER_VERSION
View file @
fdc7ee17
0.10
3
.0
0.10
4
.0
app/services/boards/issues/list_service.rb
View file @
fdc7ee17
...
...
@@ -65,7 +65,7 @@ module Boards
def
without_board_labels
(
issues
)
return
issues
unless
board_label_ids
.
any?
issues
.
where
.
not
(
issues_label_links
.
limit
(
1
).
arel
.
exists
)
issues
.
where
.
not
(
'EXISTS (?)'
,
issues_label_links
.
limit
(
1
)
)
end
def
issues_label_links
...
...
@@ -73,10 +73,8 @@ module Boards
end
def
with_list_label
(
issues
)
issues
.
where
(
LabelLink
.
where
(
"label_links.target_type = 'Issue' AND label_links.target_id = issues.id"
)
.
where
(
"label_links.label_id = ?"
,
list
.
label_id
).
limit
(
1
).
arel
.
exists
)
issues
.
where
(
'EXISTS (?)'
,
LabelLink
.
where
(
"label_links.target_type = 'Issue' AND label_links.target_id = issues.id"
)
.
where
(
"label_links.label_id = ?"
,
list
.
label_id
).
limit
(
1
))
end
end
end
...
...
changelogs/unreleased/rails5-fix-46230.yml
0 → 100644
View file @
fdc7ee17
---
title
:
Use strings as properties key in kubernetes service spec.
merge_request
:
19265
author
:
Jasper Maes
type
:
fixed
lib/gitlab/contributions_calendar.rb
View file @
fdc7ee17
...
...
@@ -85,7 +85,7 @@ module Gitlab
.
select
(
t
[
:project_id
],
t
[
:target_type
],
t
[
:action
],
"date(created_at +
#{
date_interval
}
) AS date"
,
'count(id) as total_amount'
)
.
group
(
t
[
:project_id
],
t
[
:target_type
],
t
[
:action
],
"date(created_at +
#{
date_interval
}
)"
)
.
where
(
conditions
)
.
having
(
t
[
:project_id
].
in
(
Arel
::
Nodes
::
SqlLiteral
.
new
(
authed_projects
.
to_sql
)))
.
where
(
"events.project_id in (
#{
authed_projects
.
to_sql
}
)"
)
# rubocop:disable GitlabSecurity/SqlInjection
end
end
end
lib/gitlab/gitaly_client/commit_service.rb
View file @
fdc7ee17
...
...
@@ -78,7 +78,7 @@ module Gitlab
def
tree_entry
(
ref
,
path
,
limit
=
nil
)
request
=
Gitaly
::
TreeEntryRequest
.
new
(
repository:
@gitaly_repo
,
revision:
ref
,
revision:
encode_binary
(
ref
)
,
path:
encode_binary
(
path
),
limit:
limit
.
to_i
)
...
...
spec/lib/gitlab/git/blob_spec.rb
View file @
fdc7ee17
...
...
@@ -22,6 +22,12 @@ describe Gitlab::Git::Blob, seed_helper: true do
it
{
expect
(
blob
).
to
eq
(
nil
)
}
end
context
'utf-8 branch'
do
let
(
:blob
)
{
Gitlab
::
Git
::
Blob
.
find
(
repository
,
'Ääh-test-utf-8'
,
"files/ruby/popen.rb"
)}
it
{
expect
(
blob
.
id
).
to
eq
(
SeedRepo
::
RubyBlob
::
ID
)
}
end
context
'blank path'
do
let
(
:blob
)
{
Gitlab
::
Git
::
Blob
.
find
(
repository
,
SeedRepo
::
Commit
::
ID
,
''
)
}
...
...
spec/lib/gitlab/git/commit_spec.rb
View file @
fdc7ee17
...
...
@@ -603,8 +603,8 @@ describe Gitlab::Git::Commit, seed_helper: true do
let
(
:commit
)
{
described_class
.
find
(
repository
,
'master'
)
}
subject
{
commit
.
ref_names
(
repository
)
}
it
'has
1
element'
do
expect
(
subject
.
size
).
to
eq
(
1
)
it
'has
2
element'
do
expect
(
subject
.
size
).
to
eq
(
2
)
end
it
{
is_expected
.
to
include
(
"master"
)
}
it
{
is_expected
.
not_to
include
(
"feature"
)
}
...
...
spec/lib/gitlab/git/repository_spec.rb
View file @
fdc7ee17
...
...
@@ -1374,7 +1374,7 @@ describe Gitlab::Git::Repository, seed_helper: true do
describe
'#branch_count'
do
it
'returns the number of branches'
do
expect
(
repository
.
branch_count
).
to
eq
(
1
0
)
expect
(
repository
.
branch_count
).
to
eq
(
1
1
)
end
context
'with local and remote branches'
do
...
...
@@ -2248,7 +2248,7 @@ describe Gitlab::Git::Repository, seed_helper: true do
describe
'#checksum'
do
it
'calculates the checksum for non-empty repo'
do
expect
(
repository
.
checksum
).
to
eq
'
54f21be4c32c02f6788d72207fa03ad3bce725e4
'
expect
(
repository
.
checksum
).
to
eq
'
4be7d24ce7e8d845502d599b72d567d23e6a40c0
'
end
it
'returns 0000000000000000000000000000000000000000 for an empty repo'
do
...
...
spec/models/project_services/kubernetes_service_spec.rb
View file @
fdc7ee17
...
...
@@ -65,7 +65,7 @@ describe KubernetesService, :use_clean_rails_memory_store_caching do
before
do
kubernetes_service
.
update_attribute
(
:active
,
false
)
kubernetes_service
.
properties
[
:namespace
]
=
"foo"
kubernetes_service
.
properties
[
'namespace'
]
=
"foo"
end
it
'should not update attributes'
do
...
...
@@ -82,7 +82,7 @@ describe KubernetesService, :use_clean_rails_memory_store_caching do
let
(
:kubernetes_service
)
{
create
(
:kubernetes_service
)
}
it
'should update attributes'
do
kubernetes_service
.
properties
[
:namespace
]
=
'foo'
kubernetes_service
.
properties
[
'namespace'
]
=
'foo'
expect
(
kubernetes_service
.
save
).
to
be_truthy
end
end
...
...
@@ -92,7 +92,7 @@ describe KubernetesService, :use_clean_rails_memory_store_caching do
before
do
kubernetes_service
.
active
=
false
kubernetes_service
.
properties
[
:namespace
]
=
'foo'
kubernetes_service
.
properties
[
'namespace'
]
=
'foo'
kubernetes_service
.
save
end
...
...
@@ -105,7 +105,7 @@ describe KubernetesService, :use_clean_rails_memory_store_caching do
end
it
'should update attributes'
do
expect
(
kubernetes_service
.
properties
[
:namespace
]).
to
eq
(
"foo"
)
expect
(
kubernetes_service
.
properties
[
'namespace'
]).
to
eq
(
"foo"
)
end
end
...
...
@@ -113,12 +113,12 @@ describe KubernetesService, :use_clean_rails_memory_store_caching do
let
(
:kubernetes_service
)
{
create
(
:kubernetes_service
,
template:
true
,
active:
false
)
}
before
do
kubernetes_service
.
properties
[
:namespace
]
=
'foo'
kubernetes_service
.
properties
[
'namespace'
]
=
'foo'
end
it
'should update attributes'
do
expect
(
kubernetes_service
.
save
).
to
be_truthy
expect
(
kubernetes_service
.
properties
[
:namespace
]).
to
eq
(
'foo'
)
expect
(
kubernetes_service
.
properties
[
'namespace'
]).
to
eq
(
'foo'
)
end
end
end
...
...
spec/support/gitlab-git-test.git/packed-refs
View file @
fdc7ee17
...
...
@@ -9,6 +9,7 @@
4b4918a572fa86f9771e5ba40fbd48e1eb03e2c6 refs/heads/master
5937ac0a7beb003549fc5fd26fc247adbce4a52e refs/heads/merge-test
9596bc54a6f0c0c98248fe97077eb5ccf48a98d0 refs/heads/missing-gitmodules
4b4918a572fa86f9771e5ba40fbd48e1eb03e2c6 refs/heads/Ääh-test-utf-8
f4e6814c3e4e7a0de82a9e7cd20c626cc963a2f8 refs/tags/v1.0.0
^6f6d7e7ed97bb5f0054f2b1df789b39ca89b6ff9
8a2a6eb295bb170b34c24c76c49ed0e9b2eaf34b refs/tags/v1.1.0
...
...
spec/support/helpers/seed_repo.rb
View file @
fdc7ee17
...
...
@@ -98,6 +98,7 @@ module SeedRepo
master
merge-test
missing-gitmodules
Ääh-test-utf-8
]
.
freeze
TAGS
=
%w[
v1.0.0
...
...
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