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
Tatuya Kamada
gitlab-ce
Commits
afe98ae7
Commit
afe98ae7
authored
Oct 25, 2011
by
gitlabhq
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue #149 fixed
parent
5baa5fad
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
15 additions
and
11 deletions
+15
-11
app/views/commits/_commits.html.haml
app/views/commits/_commits.html.haml
+1
-1
app/views/commits/show.html.haml
app/views/commits/show.html.haml
+2
-2
app/views/projects/_recent_commits.html.haml
app/views/projects/_recent_commits.html.haml
+1
-1
app/views/projects/_recent_messages.html.haml
app/views/projects/_recent_messages.html.haml
+1
-1
app/views/projects/_tree_item.html.haml
app/views/projects/_tree_item.html.haml
+1
-1
lib/commit_ext.rb
lib/commit_ext.rb
+6
-4
spec/requests/team_members_spec.rb
spec/requests/team_members_spec.rb
+3
-1
No files found.
app/views/commits/_commits.html.haml
View file @
afe98ae7
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
=
image_tag
"no_avatar.png"
,
:class
=>
"left"
,
:width
=>
40
,
:style
=>
"padding-right:5px;"
=
image_tag
"no_avatar.png"
,
:class
=>
"left"
,
:width
=>
40
,
:style
=>
"padding-right:5px;"
%p
%p
%strong
%strong
=
commit
.
truncated_message
=
truncate
(
commit
.
safe_message
,
:length
=>
60
)
=
link_to
"Browse Code"
,
tree_project_path
(
@project
,
:commit_id
=>
commit
.
id
),
:class
=>
"lite_button"
,
:style
=>
"float:right"
=
link_to
"Browse Code"
,
tree_project_path
(
@project
,
:commit_id
=>
commit
.
id
),
:class
=>
"lite_button"
,
:style
=>
"float:right"
=
link_to
truncate
(
commit
.
id
.
to_s
,
:length
=>
16
),
project_commit_path
(
@project
,
:id
=>
commit
.
id
),
:class
=>
"lite_button"
,
:style
=>
"width:120px;float:right"
=
link_to
truncate
(
commit
.
id
.
to_s
,
:length
=>
16
),
project_commit_path
(
@project
,
:id
=>
commit
.
id
),
:class
=>
"lite_button"
,
:style
=>
"width:120px;float:right"
%span
%span
...
...
app/views/commits/show.html.haml
View file @
afe98ae7
%h3
%h3
=
"[
#{
@commit
.
committer
}
]
#{
@commit
.
truncated_message
(
40
)
}
"
=
"[
#{
@commit
.
committer
}
]
#{
truncate
(
@commit
.
safe_message
)
}
"
-#= link_to 'Back', project_commits_path(@project), :class => "button"
-#= link_to 'Back', project_commits_path(@project), :class => "button"
%table
.round-borders
%table
.round-borders
%tr
%tr
...
@@ -16,7 +16,7 @@
...
@@ -16,7 +16,7 @@
%td
=
@commit
.
committed_date
%td
=
@commit
.
committed_date
%tr
%tr
%td
Message
%td
Message
%td
=
@commit
.
message
%td
=
@commit
.
safe_
message
%tr
%tr
%td
Tree
%td
Tree
%td
=
link_to
'Browse Code'
,
tree_project_path
(
@project
,
:commit_id
=>
@commit
.
id
)
%td
=
link_to
'Browse Code'
,
tree_project_path
(
@project
,
:commit_id
=>
@commit
.
id
)
...
...
app/views/projects/_recent_commits.html.haml
View file @
afe98ae7
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
=
image_tag
"no_avatar.png"
,
:class
=>
"left"
,
:width
=>
40
,
:style
=>
"padding-right:5px;"
=
image_tag
"no_avatar.png"
,
:class
=>
"left"
,
:width
=>
40
,
:style
=>
"padding-right:5px;"
%p
{
:style
=>
"margin-bottom: 3px;"
}
%p
{
:style
=>
"margin-bottom: 3px;"
}
%strong
%strong
=
link_to
commit
.
truncated_message
(
60
),
project_commit_path
(
@project
,
:id
=>
commit
.
id
)
=
link_to
truncate
(
commit
.
safe_message
,
:length
=>
60
),
project_commit_path
(
@project
,
:id
=>
commit
.
id
)
%span
%span
%span
.author
%span
.author
...
...
app/views/projects/_recent_messages.html.haml
View file @
afe98ae7
...
@@ -19,7 +19,7 @@
...
@@ -19,7 +19,7 @@
-
css_class
=
"dash_commit"
-
css_class
=
"dash_commit"
-
commit
=
parent
-
commit
=
parent
-
item_code
=
commit
.
author
.
email
-
item_code
=
commit
.
author
.
email
-
link_item_name
=
commit
.
truncated_message
(
50
)
-
link_item_name
=
truncate
(
commit
.
safe_message
,
:length
=>
50
)
-
link_to_item
=
project_commit_path
(
@project
,
:id
=>
commit
.
id
)
-
link_to_item
=
project_commit_path
(
@project
,
:id
=>
commit
.
id
)
-
else
-
else
-
css_class
=
"dash_wall"
-
css_class
=
"dash_wall"
...
...
app/views/projects/_tree_item.html.haml
View file @
afe98ae7
...
@@ -12,4 +12,4 @@
...
@@ -12,4 +12,4 @@
=
time_ago_in_words
(
content_commit
.
committed_date
)
=
time_ago_in_words
(
content_commit
.
committed_date
)
ago
ago
%td
%td
=
link_to
content_commit
.
truncated_message
(
40
),
project_commit_path
(
@project
,
content_commit
)
=
link_to
truncate
(
content_commit
.
safe_message
,
:length
=>
40
),
project_commit_path
(
@project
,
content_commit
)
lib/commit_ext.rb
View file @
afe98ae7
module
CommitExt
module
CommitExt
# Cause of encoding rails truncate raise error
def
safe_message
# this method is temporary decision
message
.
encode
(
"UTF-8"
,
def
truncated_message
(
size
=
80
)
:invalid
=>
:replace
,
message
.
length
>
size
?
(
message
[
0
..
(
size
-
1
)]
+
"..."
)
:
message
:undef
=>
:replace
,
:universal_newline
=>
true
,
:replace
=>
""
)
rescue
rescue
"-- invalid encoding for commit message"
"-- invalid encoding for commit message"
end
end
...
...
spec/requests/team_members_spec.rb
View file @
afe98ae7
...
@@ -10,7 +10,9 @@ describe "TeamMembers" do
...
@@ -10,7 +10,9 @@ describe "TeamMembers" do
describe
"View profile"
do
describe
"View profile"
do
it
"should be available"
do
it
"should be available"
do
visit
(
team_project_path
(
@project
))
visit
(
team_project_path
(
@project
))
find
(
:xpath
,
"//table[@id='team-table']//a[1]"
).
click
within
"#team-table"
do
click_link
(
@user
.
name
)
end
page
.
should
have_content
@user
.
skype
page
.
should
have_content
@user
.
skype
page
.
should_not
have_content
'Twitter'
page
.
should_not
have_content
'Twitter'
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