BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
e683d054
Commit
e683d054
authored
Jan 15, 2015
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of github.com:gitlabhq/gitlabhq
parents
3d3c7efa
500dab09
Hide whitespace changes
Inline
Side-by-side
Showing
23 changed files
with
49 additions
and
64 deletions
+49
-64
registrations_controller.rb
app/controllers/registrations_controller.rb
+2
-2
tree_helper.rb
app/helpers/tree_helper.rb
+1
-1
commit.rb
app/models/commit.rb
+4
-4
key.rb
app/models/key.rb
+1
-1
campfire_service.rb
app/models/project_services/campfire_service.rb
+2
-2
hipchat_service.rb
app/models/project_services/hipchat_service.rb
+2
-2
pushover_service.rb
app/models/project_services/pushover_service.rb
+2
-2
slack_message.rb
app/models/project_services/slack_message.rb
+2
-2
user.rb
app/models/user.rb
+1
-1
git_push_service.rb
app/services/git_push_service.rb
+4
-4
notification_service.rb
app/services/notification_service.rb
+1
-1
_head.html.haml
app/views/layouts/_head.html.haml
+1
-0
_blob_editor.html.haml
app/views/projects/_blob_editor.html.haml
+15
-0
show.html.haml
app/views/projects/edit_tree/show.html.haml
+1
-16
show.html.haml
app/views/projects/new_tree/show.html.haml
+1
-6
_tree.html.haml
app/views/projects/tree/_tree.html.haml
+1
-1
routes.rb
config/routes.rb
+2
-2
comments.feature
features/project/commits/comments.feature
+0
-5
diff_comments.feature
features/project/commits/diff_comments.feature
+0
-6
diff_note.rb
features/steps/shared/diff_note.rb
+2
-2
note.rb
features/steps/shared/note.rb
+1
-1
internal.rb
lib/api/internal.rb
+2
-2
import.rake
lib/tasks/gitlab/import.rake
+1
-1
No files found.
app/controllers/registrations_controller.rb
View file @
e683d054
...
...
@@ -15,11 +15,11 @@ class RegistrationsController < Devise::RegistrationsController
super
end
def
after_sign_up_path_for
(
resource
)
def
after_sign_up_path_for
(
_
resource
)
new_user_session_path
end
def
after_inactive_sign_up_path_for
(
resource
)
def
after_inactive_sign_up_path_for
(
_
resource
)
new_user_session_path
end
...
...
app/helpers/tree_helper.rb
View file @
e683d054
...
...
@@ -108,7 +108,7 @@ module TreeHelper
end
end
def
up_dir_path
(
tree
)
def
up_dir_path
file
=
File
.
join
(
@path
,
".."
)
tree_join
(
@ref
,
file
)
end
...
...
app/models/commit.rb
View file @
e683d054
...
...
@@ -75,11 +75,11 @@ class Commit
return
no_commit_message
if
title
.
blank?
title_end
=
title
.
index
(
/\n/
)
title_end
=
title
.
index
(
"
\n
"
)
if
(
!
title_end
&&
title
.
length
>
100
)
||
(
title_end
&&
title_end
>
100
)
title
[
0
..
79
]
<<
"…"
.
html_safe
else
title
.
split
(
/\n/
,
2
).
first
title
.
split
(
"
\n
"
,
2
).
first
end
end
...
...
@@ -87,11 +87,11 @@ class Commit
#
# cut off, ellipses (`&hellp;`) are prepended to the commit message.
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
)
"…"
.
html_safe
<<
safe_message
[
80
..-
1
]
else
safe_message
.
split
(
/\n/
,
2
)[
1
].
try
(
:chomp
)
safe_message
.
split
(
"
\n
"
,
2
)[
1
].
try
(
:chomp
)
end
end
...
...
app/models/key.rb
View file @
e683d054
...
...
@@ -89,7 +89,7 @@ class Key < ActiveRecord::Base
end
if
cmd_status
.
zero?
cmd_output
.
gsub
/(
[\d\h]{2}:)+[\d\h]
{2}/
do
|
match
|
cmd_output
.
gsub
/(
\h{2}:)+\h
{2}/
do
|
match
|
self
.
fingerprint
=
match
end
end
...
...
app/models/project_services/campfire_service.rb
View file @
e683d054
...
...
@@ -60,9 +60,9 @@ class CampfireService < Service
message
<<
"[
#{
project
.
name_with_namespace
}
] "
message
<<
"
#{
push
[
:user_name
]
}
"
if
before
=~
/000000/
if
before
.
include?
(
'000000'
)
message
<<
"pushed new branch
#{
ref
}
\n
"
elsif
after
=~
/000000/
elsif
after
.
include?
(
'000000'
)
message
<<
"removed branch
#{
ref
}
\n
"
else
message
<<
"pushed
#{
push
[
:total_commits_count
]
}
commits to
#{
ref
}
. "
...
...
app/models/project_services/hipchat_service.rb
View file @
e683d054
...
...
@@ -58,12 +58,12 @@ class HipchatService < Service
message
=
""
message
<<
"
#{
push
[
:user_name
]
}
"
if
before
=~
/000000/
if
before
.
include?
(
'000000'
)
message
<<
"pushed new branch <a href=
\"
"
\
"
#{
project
.
web_url
}
/commits/
#{
URI
.
escape
(
ref
)
}
\"
>
#{
ref
}
</a>"
\
" to <a href=
\"
#{
project
.
web_url
}
\"
>"
\
"
#{
project
.
name_with_namespace
.
gsub!
(
/\s/
,
""
)
}
</a>
\n
"
elsif
after
=~
/000000/
elsif
after
.
include?
(
'000000'
)
message
<<
"removed branch
#{
ref
}
from <a href=
\"
#{
project
.
web_url
}
\"
>
#{
project
.
name_with_namespace
.
gsub!
(
/\s/
,
''
)
}
</a>
\n
"
else
message
<<
"pushed to branch <a href=
\"
"
\
...
...
app/models/project_services/pushover_service.rb
View file @
e683d054
...
...
@@ -80,9 +80,9 @@ class PushoverService < Service
before
=
push_data
[
:before
]
after
=
push_data
[
:after
]
if
before
=~
/000000/
if
before
.
include?
(
'000000'
)
message
=
"
#{
push_data
[
:user_name
]
}
pushed new branch
\"
#{
ref
}
\"
."
elsif
after
=~
/000000/
elsif
after
.
include?
(
'000000'
)
message
=
"
#{
push_data
[
:user_name
]
}
deleted branch
\"
#{
ref
}
\"
."
else
message
=
"
#{
push_data
[
:user_name
]
}
push to branch
\"
#{
ref
}
\"
."
...
...
app/models/project_services/slack_message.rb
View file @
e683d054
...
...
@@ -77,11 +77,11 @@ class SlackMessage
end
def
new_branch?
before
=~
/000000/
before
.
include?
(
'000000'
)
end
def
removed_branch?
after
=~
/000000/
after
.
include?
(
'000000'
)
end
def
branch_url
...
...
app/models/user.rb
View file @
e683d054
...
...
@@ -488,7 +488,7 @@ class User < ActiveRecord::Base
end
def
temp_oauth_email?
email
=~
/\Atemp-email-for-oauth/
email
.
start_with?
(
'temp-email-for-oauth'
)
end
def
public_profile?
...
...
app/services/git_push_service.rb
View file @
e683d054
...
...
@@ -111,23 +111,23 @@ class GitPushService
ref_parts
=
ref
.
split
(
'/'
)
# Return if this is not a push to a branch (e.g. new commits)
ref_parts
[
1
]
=~
/heads/
&&
oldrev
!=
Gitlab
::
Git
::
BLANK_SHA
ref_parts
[
1
]
.
include?
(
'heads'
)
&&
oldrev
!=
Gitlab
::
Git
::
BLANK_SHA
end
def
push_to_new_branch?
(
ref
,
oldrev
)
ref_parts
=
ref
.
split
(
'/'
)
ref_parts
[
1
]
=~
/heads/
&&
oldrev
==
Gitlab
::
Git
::
BLANK_SHA
ref_parts
[
1
]
.
include?
(
'heads'
)
&&
oldrev
==
Gitlab
::
Git
::
BLANK_SHA
end
def
push_remove_branch?
(
ref
,
newrev
)
ref_parts
=
ref
.
split
(
'/'
)
ref_parts
[
1
]
=~
/heads/
&&
newrev
==
Gitlab
::
Git
::
BLANK_SHA
ref_parts
[
1
]
.
include?
(
'heads'
)
&&
newrev
==
Gitlab
::
Git
::
BLANK_SHA
end
def
push_to_branch?
(
ref
)
ref
=~
/refs\/heads/
ref
.
include?
(
'refs/heads'
)
end
def
is_default_branch?
(
ref
)
...
...
app/services/notification_service.rb
View file @
e683d054
...
...
@@ -118,7 +118,7 @@ class NotificationService
return
true
unless
note
.
noteable_type
.
present?
# ignore gitlab service messages
return
true
if
note
.
note
=~
/\A_Status changed to closed_/
return
true
if
note
.
note
.
start_with?
(
'_Status changed to closed_'
)
return
true
if
note
.
cross_reference?
&&
note
.
system
==
true
opts
=
{
noteable_type:
note
.
noteable_type
,
project_id:
note
.
project_id
}
...
...
app/views/layouts/_head.html.haml
View file @
e683d054
...
...
@@ -19,6 +19,7 @@
=
csrf_meta_tags
=
include_gon
%meta
{
name:
'viewport'
,
content:
'width=device-width, initial-scale=1.0'
}
%meta
{
name:
'theme-color'
,
content:
'#474D57'
}
=
render
'layouts/google_analytics'
if
extra_config
.
has_key?
(
'google_analytics_id'
)
=
render
'layouts/piwik'
if
extra_config
.
has_key?
(
'piwik_url'
)
&&
extra_config
.
has_key?
(
'piwik_site_id'
)
...
...
app/views/projects/_blob_editor.html.haml
0 → 100644
View file @
e683d054
.file-holder.file
.file-title
%i
.icon-file
%span
.file_name
%span
.monospace.light
#{
ref
}
-
if
local_assigns
[
:path
]
=
': '
+
local_assigns
[
:path
]
.file-content.code
%pre
.js-edit-mode-pane
#editor
=
params
[
:content
]
||
local_assigns
[
:blob_data
]
-
if
local_assigns
[
:path
]
.js-edit-mode-pane
#preview
.hide
.center
%h2
%i
.icon-spinner.icon-spin
app/views/projects/edit_tree/show.html.haml
View file @
e683d054
...
...
@@ -6,21 +6,7 @@
=
link_to
editing_preview_title
(
@blob
.
name
),
'#preview'
,
'data-preview-url'
=>
preview_project_edit_tree_path
(
@project
,
@id
)
=
form_tag
(
project_edit_tree_path
(
@project
,
@id
),
method: :put
,
class:
"form-horizontal"
)
do
.file-holder.file
.file-title
%i
.fa.fa-file
%span
.file_name
%span
.monospace.light
#{
@ref
}
:
=
@path
%span
.options
.btn-group.tree-btn-group
=
link_to
"Cancel"
,
@after_edit_path
,
class:
"btn btn-tiny btn-cancel"
,
data:
{
confirm:
leave_edit_message
}
.file-content.code
%pre
.js-edit-mode-pane
#editor
.js-edit-mode-pane
#preview
.hide
.center
%h2
%i
.fa.fa-spinner.fa-spin
=
render
'projects/blob_editor'
,
ref:
@ref
,
path:
@path
,
blob_data:
@blob
.
data
=
render
'shared/commit_message_container'
,
params:
params
,
placeholder:
"Update
#{
@blob
.
name
}
"
=
hidden_field_tag
'last_commit'
,
@last_commit
...
...
@@ -34,7 +20,6 @@
ace
.
config
.
loadModule
(
"ace/ext/searchbox"
);
var
ace_mode
=
"
#{
@blob
.
language
.
try
(
:ace_mode
)
}
"
;
var
editor
=
ace
.
edit
(
"editor"
);
editor
.
setValue
(
"
#{
escape_javascript
(
@blob
.
data
)
}
"
);
if
(
ace_mode
)
{
editor
.
getSession
().
setMode
(
'ace/mode/'
+
ace_mode
);
}
...
...
app/views/projects/new_tree/show.html.haml
View file @
e683d054
...
...
@@ -19,12 +19,7 @@
Encoding
.col-sm-10
=
select_tag
:encoding
,
options_for_select
([
"base64"
,
"text"
],
"text"
),
class:
'form-control'
.file-holder
.file-title
%i
.fa.fa-file
.file-content.code
%pre
#editor
=
params
[
:content
]
=
render
'projects/blob_editor'
,
ref:
@ref
=
render
'shared/commit_message_container'
,
params:
params
,
placeholder:
'Add new file'
=
hidden_field_tag
'content'
,
''
,
id:
'file-content'
...
...
app/views/projects/tree/_tree.html.haml
View file @
e683d054
...
...
@@ -35,7 +35,7 @@
-
if
@path
.
present?
%tr
.tree-item
%td
.tree-item-file-name
=
link_to
".."
,
project_tree_path
(
@project
,
up_dir_path
(
tree
)
),
class:
'prepend-left-10'
=
link_to
".."
,
project_tree_path
(
@project
,
up_dir_path
),
class:
'prepend-left-10'
%td
%td
.hidden-xs
...
...
config/routes.rb
View file @
e683d054
...
...
@@ -154,8 +154,8 @@ Gitlab::Application.routes.draw do
end
end
match
"/u/:username"
=>
"users#show"
,
as: :user
,
constraints:
{
username:
/(?:[^.]|\.(?!atom$))+/
,
format:
/atom/
},
via: :get
get
'/u/:username'
=>
'users#show'
,
as: :user
,
constraints:
{
username:
/(?:[^.]|\.(?!atom$))+/
,
format:
/atom/
}
#
# Dashboard Area
...
...
features/project/commits/comments.feature
View file @
e683d054
...
...
@@ -14,11 +14,6 @@ Feature: Project Commits Comments
Then
I should not see the cancel comment button
@javascript
Scenario
:
I
can't preview without text
Given
I haven't written any comment text
Then
The comment preview tab should say there is nothing to do
@javascript
Scenario
:
I
can preview with text
Given I write a comment like "
:
+1
:
Nice"
Then
The comment preview tab should be display rendered Markdown
...
...
features/project/commits/diff_comments.feature
View file @
e683d054
...
...
@@ -55,12 +55,6 @@ Feature: Project Commits Diff Comments
Then
I should see a discussion reply button
@javascript
Scenario
:
I
can't preview without text
Given
I open a diff comment form
And
I haven't written any diff comment text
Then
The diff comment preview tab should say there is nothing to do
@javascript
Scenario
:
I
can preview with text
Given
I open a diff comment form
And I write a diff comment like "
:
-1
:
I
don't like this"
...
...
features/steps/shared/diff_note.rb
View file @
e683d054
...
...
@@ -80,7 +80,7 @@ module SharedDiffNote
step
'I should not see the diff comment text field'
do
within
(
diff_file_selector
)
do
page
.
should
have_css
(
".js-note-text"
,
visible:
false
)
expect
(
find
(
'.js-note-text'
)).
not_to
be_visible
end
end
...
...
@@ -115,7 +115,7 @@ module SharedDiffNote
end
step
'I should see add a diff comment button'
do
page
.
should
have_css
(
".js-add-diff-note-button"
,
visible:
fals
e
)
page
.
should
have_css
(
'.js-add-diff-note-button'
,
visible:
tru
e
)
end
step
'I should see an empty diff comment form'
do
...
...
features/steps/shared/note.rb
View file @
e683d054
...
...
@@ -64,7 +64,7 @@ module SharedNote
step
'I should not see the comment text field'
do
within
(
".js-main-target-form"
)
do
page
.
should
have_css
(
".js-note-text"
,
visible:
false
)
expect
(
find
(
'.js-note-text'
)).
not_to
be_visible
end
end
...
...
lib/api/internal.rb
View file @
e683d054
...
...
@@ -25,8 +25,8 @@ module API
# project. This applies the correct project permissions to
# the wiki repository as well.
access
=
if
project_path
=~
/\.wiki\Z/
project_path
.
sub!
(
/\.wiki\Z/
,
'
'
)
if
project_path
.
end_with?
(
'.wiki'
)
project_path
.
chomp!
(
'.wiki
'
)
Gitlab
::
GitAccessWiki
.
new
else
Gitlab
::
GitAccess
.
new
...
...
lib/tasks/gitlab/import.rake
View file @
e683d054
...
...
@@ -25,7 +25,7 @@ namespace :gitlab do
puts
"Processing
#{
repo_path
}
"
.
yellow
if
path
=~
/\.wiki\Z/
if
path
.
end_with?
(
'.wiki'
)
puts
" * Skipping wiki repo"
next
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