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
0
Merge Requests
0
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
Jérome Perrin
gitlab-ce
Commits
647ff624
Commit
647ff624
authored
Feb 02, 2015
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rubocop: Style/ElseAlignment enabled
parent
7d48205c
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
31 additions
and
27 deletions
+31
-27
.rubocop.yml
.rubocop.yml
+2
-2
app/controllers/projects/refs_controller.rb
app/controllers/projects/refs_controller.rb
+4
-4
app/helpers/commits_helper.rb
app/helpers/commits_helper.rb
+7
-6
app/models/commit.rb
app/models/commit.rb
+6
-5
app/services/projects/participants_service.rb
app/services/projects/participants_service.rb
+6
-5
config/initializers/acts_as_taggable_on_patch.rb
config/initializers/acts_as_taggable_on_patch.rb
+6
-5
No files found.
.rubocop.yml
View file @
647ff624
...
@@ -145,7 +145,7 @@ Style/CommentIndentation:
...
@@ -145,7 +145,7 @@ Style/CommentIndentation:
Style/ConstantName
:
Style/ConstantName
:
Description
:
'
Constants
should
use
SCREAMING_SNAKE_CASE.'
Description
:
'
Constants
should
use
SCREAMING_SNAKE_CASE.'
StyleGuide
:
'
https://github.com/bbatsov/ruby-style-guide#screaming-snake-case'
StyleGuide
:
'
https://github.com/bbatsov/ruby-style-guide#screaming-snake-case'
Enabled
:
fals
e
Enabled
:
tru
e
Style/DefWithParentheses
:
Style/DefWithParentheses
:
Description
:
'
Use
def
with
parentheses
when
there
are
arguments.'
Description
:
'
Use
def
with
parentheses
when
there
are
arguments.'
...
@@ -177,7 +177,7 @@ Style/EachWithObject:
...
@@ -177,7 +177,7 @@ Style/EachWithObject:
Style/ElseAlignment
:
Style/ElseAlignment
:
Description
:
'
Align
elses
and
elsifs
correctly.'
Description
:
'
Align
elses
and
elsifs
correctly.'
Enabled
:
fals
e
Enabled
:
tru
e
Style/EmptyElse
:
Style/EmptyElse
:
Description
:
'
Avoid
empty
else-clauses.'
Description
:
'
Avoid
empty
else-clauses.'
...
...
app/controllers/projects/refs_controller.rb
View file @
647ff624
...
@@ -31,10 +31,10 @@ class Projects::RefsController < Projects::ApplicationController
...
@@ -31,10 +31,10 @@ class Projects::RefsController < Projects::ApplicationController
def
logs_tree
def
logs_tree
@offset
=
if
params
[
:offset
].
present?
@offset
=
if
params
[
:offset
].
present?
params
[
:offset
].
to_i
params
[
:offset
].
to_i
else
else
0
0
end
end
@limit
=
25
@limit
=
25
...
...
app/helpers/commits_helper.rb
View file @
647ff624
...
@@ -112,12 +112,13 @@ module CommitsHelper
...
@@ -112,12 +112,13 @@ module CommitsHelper
person_name
=
user
.
nil?
?
source_name
:
user
.
name
person_name
=
user
.
nil?
?
source_name
:
user
.
name
person_email
=
user
.
nil?
?
source_email
:
user
.
email
person_email
=
user
.
nil?
?
source_email
:
user
.
email
text
=
if
options
[
:avatar
]
text
=
avatar
=
image_tag
(
avatar_icon
(
person_email
,
options
[
:size
]),
class:
"avatar
#{
"s
#{
options
[
:size
]
}
"
if
options
[
:size
]
}
"
,
width:
options
[
:size
],
alt:
""
)
if
options
[
:avatar
]
%Q{
#{
avatar
}
<span class="commit-
#{
options
[
:source
]
}
-name">
#{
person_name
}
</span>}
avatar
=
image_tag
(
avatar_icon
(
person_email
,
options
[
:size
]),
class:
"avatar
#{
"s
#{
options
[
:size
]
}
"
if
options
[
:size
]
}
"
,
width:
options
[
:size
],
alt:
""
)
else
%Q{
#{
avatar
}
<span class="commit-
#{
options
[
:source
]
}
-name">
#{
person_name
}
</span>}
person_name
else
end
person_name
end
options
=
{
options
=
{
class:
"commit-
#{
options
[
:source
]
}
-link has_tooltip"
,
class:
"commit-
#{
options
[
:source
]
}
-link has_tooltip"
,
...
...
app/models/commit.rb
View file @
647ff624
...
@@ -88,11 +88,12 @@ class Commit
...
@@ -88,11 +88,12 @@ class Commit
# cut off, ellipses (`&hellp;`) are prepended to the commit message.
# cut off, ellipses (`&hellp;`) are prepended to the commit message.
def
description
def
description
title_end
=
safe_message
.
index
(
"
\n
"
)
title_end
=
safe_message
.
index
(
"
\n
"
)
@description
||=
if
(
!
title_end
&&
safe_message
.
length
>
100
)
||
(
title_end
&&
title_end
>
100
)
@description
||=
"…"
.
html_safe
<<
safe_message
[
80
..-
1
]
if
(
!
title_end
&&
safe_message
.
length
>
100
)
||
(
title_end
&&
title_end
>
100
)
else
"…"
.
html_safe
<<
safe_message
[
80
..-
1
]
safe_message
.
split
(
"
\n
"
,
2
)[
1
].
try
(
:chomp
)
else
end
safe_message
.
split
(
"
\n
"
,
2
)[
1
].
try
(
:chomp
)
end
end
end
def
description?
def
description?
...
...
app/services/projects/participants_service.rb
View file @
647ff624
...
@@ -5,11 +5,12 @@ module Projects
...
@@ -5,11 +5,12 @@ module Projects
end
end
def
execute
(
note_type
,
note_id
)
def
execute
(
note_type
,
note_id
)
participating
=
if
note_type
&&
note_id
participating
=
participants_in
(
note_type
,
note_id
)
if
note_type
&&
note_id
else
participants_in
(
note_type
,
note_id
)
[]
else
end
[]
end
team_members
=
sorted
(
@project
.
team
.
members
)
team_members
=
sorted
(
@project
.
team
.
members
)
participants
=
all_members
+
team_members
+
participating
participants
=
all_members
+
team_members
+
participating
participants
.
uniq
participants
.
uniq
...
...
config/initializers/acts_as_taggable_on_patch.rb
View file @
647ff624
...
@@ -42,11 +42,12 @@ module ActsAsTaggableOn::Taggable
...
@@ -42,11 +42,12 @@ module ActsAsTaggableOn::Taggable
elsif
options
.
delete
(
:any
)
elsif
options
.
delete
(
:any
)
# get tags, drop out if nothing returned (we need at least one)
# get tags, drop out if nothing returned (we need at least one)
tags
=
if
options
.
delete
(
:wild
)
tags
=
ActsAsTaggableOn
::
Tag
.
named_like_any
(
tag_list
)
if
options
.
delete
(
:wild
)
else
ActsAsTaggableOn
::
Tag
.
named_like_any
(
tag_list
)
ActsAsTaggableOn
::
Tag
.
named_any
(
tag_list
)
else
end
ActsAsTaggableOn
::
Tag
.
named_any
(
tag_list
)
end
return
empty_result
unless
tags
.
length
>
0
return
empty_result
unless
tags
.
length
>
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