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
7508f949
Commit
7508f949
authored
May 17, 2017
by
Rémy Coutable
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Resolve more conflicts
Signed-off-by:
Rémy Coutable
<
remy@rymai.me
>
parent
84597951
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
36 additions
and
49 deletions
+36
-49
app/helpers/submodule_helper.rb
app/helpers/submodule_helper.rb
+0
-3
app/models/group.rb
app/models/group.rb
+0
-7
spec/models/user_spec.rb
spec/models/user_spec.rb
+36
-39
No files found.
app/helpers/submodule_helper.rb
View file @
7508f949
...
@@ -7,13 +7,10 @@ module SubmoduleHelper
...
@@ -7,13 +7,10 @@ module SubmoduleHelper
def
submodule_links
(
submodule_item
,
ref
=
nil
,
repository
=
@repository
)
def
submodule_links
(
submodule_item
,
ref
=
nil
,
repository
=
@repository
)
url
=
repository
.
submodule_url_for
(
ref
,
submodule_item
.
path
)
url
=
repository
.
submodule_url_for
(
ref
,
submodule_item
.
path
)
<<<<<<<
HEAD
=======
if
url
==
'.'
||
url
==
'./'
if
url
==
'.'
||
url
==
'./'
url
=
File
.
join
(
Gitlab
.
config
.
gitlab
.
url
,
@project
.
full_path
)
url
=
File
.
join
(
Gitlab
.
config
.
gitlab
.
url
,
@project
.
full_path
)
end
end
>>>>>>>
upstream
/
master
if
url
=~
/([^\/:]+)\/([^\/]+(?:\.git)?)\Z/
if
url
=~
/([^\/:]+)\/([^\/]+(?:\.git)?)\Z/
namespace
,
project
=
$1
,
$2
namespace
,
project
=
$1
,
$2
project
.
sub!
(
/\.git\z/
,
''
)
project
.
sub!
(
/\.git\z/
,
''
)
...
...
app/models/group.rb
View file @
7508f949
...
@@ -128,17 +128,10 @@ class Group < Namespace
...
@@ -128,17 +128,10 @@ class Group < Namespace
allowed_by_projects
allowed_by_projects
end
end
<<<<<<<
HEAD
def
avatar_url
(
size
=
nil
,
scale
=
nil
)
if
self
[
:avatar
].
present?
[
gitlab_config
.
url
,
avatar
.
url
].
join
end
=======
def
avatar_url
(
**
args
)
def
avatar_url
(
**
args
)
# We use avatar_path instead of overriding avatar_url because of carrierwave.
# We use avatar_path instead of overriding avatar_url because of carrierwave.
# See https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/11001/diffs#note_28659864
# See https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/11001/diffs#note_28659864
avatar_path
(
args
)
avatar_path
(
args
)
>>>>>>>
upstream
/
master
end
end
def
lfs_enabled?
def
lfs_enabled?
...
...
spec/models/user_spec.rb
View file @
7508f949
...
@@ -993,8 +993,14 @@ describe User, models: true do
...
@@ -993,8 +993,14 @@ describe User, models: true do
let
(
:gitlab_host
)
{
"http://
#{
Gitlab
.
config
.
gitlab
.
host
}
"
}
let
(
:gitlab_host
)
{
"http://
#{
Gitlab
.
config
.
gitlab
.
host
}
"
}
let
(
:avatar_path
)
{
"/uploads/user/avatar/
#{
user
.
id
}
/dk.png"
}
let
(
:avatar_path
)
{
"/uploads/user/avatar/
#{
user
.
id
}
/dk.png"
}
<<<<<<<
HEAD
it
'shows correct avatar url'
do
it
{
should
eq
"http://
#{
Gitlab
.
config
.
gitlab
.
host
}#{
avatar_path
}
"
}
expect
(
user
.
avatar_url
).
to
eq
(
avatar_path
)
expect
(
user
.
avatar_url
(
only_path:
false
)).
to
eq
([
gitlab_host
,
avatar_path
].
join
)
allow
(
ActionController
::
Base
).
to
receive
(
:asset_host
).
and_return
(
gitlab_host
)
expect
(
user
.
avatar_url
).
to
eq
([
gitlab_host
,
avatar_path
].
join
)
end
context
'when in a geo secondary node'
do
context
'when in a geo secondary node'
do
let
(
:geo_url
)
{
'http://geo.example.com'
}
let
(
:geo_url
)
{
'http://geo.example.com'
}
...
@@ -1005,15 +1011,6 @@ describe User, models: true do
...
@@ -1005,15 +1011,6 @@ describe User, models: true do
end
end
it
{
should
eq
"
#{
geo_url
}#{
avatar_path
}
"
}
it
{
should
eq
"
#{
geo_url
}#{
avatar_path
}
"
}
=======
it
'shows correct avatar url'
do
expect
(
user
.
avatar_url
).
to
eq
(
avatar_path
)
expect
(
user
.
avatar_url
(
only_path:
false
)).
to
eq
([
gitlab_host
,
avatar_path
].
join
)
allow
(
ActionController
::
Base
).
to
receive
(
:asset_host
).
and_return
(
gitlab_host
)
expect
(
user
.
avatar_url
).
to
eq
([
gitlab_host
,
avatar_path
].
join
)
>>>>>>>
upstream
/
master
end
end
end
end
end
end
...
@@ -1978,7 +1975,34 @@ describe User, models: true do
...
@@ -1978,7 +1975,34 @@ describe User, models: true do
end
end
end
end
<<<<<<<
HEAD
context
'#invalidate_issue_cache_counts'
do
let
(
:user
)
{
build_stubbed
(
:user
)
}
it
'invalidates cache for issue counter'
do
cache_mock
=
double
expect
(
cache_mock
).
to
receive
(
:delete
).
with
([
'users'
,
user
.
id
,
'assigned_open_issues_count'
])
allow
(
Rails
).
to
receive
(
:cache
).
and_return
(
cache_mock
)
user
.
invalidate_issue_cache_counts
end
end
context
'#invalidate_merge_request_cache_counts'
do
let
(
:user
)
{
build_stubbed
(
:user
)
}
it
'invalidates cache for Merge Request counter'
do
cache_mock
=
double
expect
(
cache_mock
).
to
receive
(
:delete
).
with
([
'users'
,
user
.
id
,
'assigned_open_merge_requests_count'
])
allow
(
Rails
).
to
receive
(
:cache
).
and_return
(
cache_mock
)
user
.
invalidate_merge_request_cache_counts
end
end
describe
'#forget_me!'
do
describe
'#forget_me!'
do
subject
{
create
(
:user
,
remember_created_at:
Time
.
now
)
}
subject
{
create
(
:user
,
remember_created_at:
Time
.
now
)
}
...
@@ -2008,33 +2032,6 @@ describe User, models: true do
...
@@ -2008,33 +2032,6 @@ describe User, models: true do
allow
(
Gitlab
::
Geo
).
to
receive
(
:secondary?
)
{
true
}
allow
(
Gitlab
::
Geo
).
to
receive
(
:secondary?
)
{
true
}
expect
{
subject
.
remember_me!
}.
not_to
change
(
subject
,
:remember_created_at
)
expect
{
subject
.
remember_me!
}.
not_to
change
(
subject
,
:remember_created_at
)
=======
context
'#invalidate_issue_cache_counts'
do
let
(
:user
)
{
build_stubbed
(
:user
)
}
it
'invalidates cache for issue counter'
do
cache_mock
=
double
expect
(
cache_mock
).
to
receive
(
:delete
).
with
([
'users'
,
user
.
id
,
'assigned_open_issues_count'
])
allow
(
Rails
).
to
receive
(
:cache
).
and_return
(
cache_mock
)
user
.
invalidate_issue_cache_counts
end
end
context
'#invalidate_merge_request_cache_counts'
do
let
(
:user
)
{
build_stubbed
(
:user
)
}
it
'invalidates cache for Merge Request counter'
do
cache_mock
=
double
expect
(
cache_mock
).
to
receive
(
:delete
).
with
([
'users'
,
user
.
id
,
'assigned_open_merge_requests_count'
])
allow
(
Rails
).
to
receive
(
:cache
).
and_return
(
cache_mock
)
user
.
invalidate_merge_request_cache_counts
>>>>>>>
upstream
/
master
end
end
end
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