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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-ce
Commits
e5ff5c28
Commit
e5ff5c28
authored
Dec 31, 2012
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use project with namespace in email subject
parent
30d63707
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
7 deletions
+7
-7
app/mailers/notify.rb
app/mailers/notify.rb
+1
-1
lib/gitlab/graph/json_builder.rb
lib/gitlab/graph/json_builder.rb
+2
-2
lib/tasks/gitlab/backup.rake
lib/tasks/gitlab/backup.rake
+4
-4
No files found.
app/mailers/notify.rb
View file @
e5ff5c28
...
...
@@ -154,6 +154,6 @@ class Notify < ActionMailer::Base
# >> subject('Lorem ipsum', 'Dolor sit amet')
# => "GitLab | Lorem ipsum | Dolor sit amet"
def
subject
(
*
extra
)
"GitLab | "
<<
extra
.
join
(
' | '
)
<<
(
@project
?
" |
#{
@project
.
name
}
"
:
""
)
"GitLab | "
<<
extra
.
join
(
' | '
)
<<
(
@project
?
" |
#{
@project
.
name
_with_namespace
}
"
:
""
)
end
end
lib/gitlab/graph/json_builder.rb
View file @
e5ff5c28
...
...
@@ -17,14 +17,14 @@ module Gitlab
@commits
=
collect_commits
@days
=
index_commits
end
def
to_json
(
*
args
)
{
days:
@days
.
compact
.
map
{
|
d
|
[
d
.
day
,
d
.
strftime
(
"%b"
)]
},
commits:
@commits
.
map
(
&
:to_graph_hash
)
}.
to_json
(
*
args
)
end
protected
# Get commits from repository
...
...
lib/tasks/gitlab/backup.rake
View file @
e5ff5c28
...
...
@@ -118,10 +118,10 @@ namespace :gitlab do
task
:create
=>
:environment
do
backup_path_repo
=
File
.
join
(
Gitlab
.
config
.
backup
.
path
,
"repositories"
)
FileUtils
.
mkdir_p
(
backup_path_repo
)
until
Dir
.
exists?
(
backup_path_repo
)
puts
"Dumping repositories ..."
puts
"Dumping repositories ..."
.
blue
Project
.
find_each
(
:batch_size
=>
1000
)
do
|
project
|
print
"
#{
project
.
path_with_namespace
}
... "
print
"
*
#{
project
.
path_with_namespace
}
... "
if
project
.
empty_repo?
puts
"[SKIPPED]"
.
cyan
...
...
@@ -174,9 +174,9 @@ namespace :gitlab do
backup_path_db
=
File
.
join
(
Gitlab
.
config
.
backup
.
path
,
"db"
)
FileUtils
.
mkdir_p
(
backup_path_db
)
unless
Dir
.
exists?
(
backup_path_db
)
puts
"Dumping database tables ... "
puts
"Dumping database tables ... "
.
blue
ActiveRecord
::
Base
.
connection
.
tables
.
each
do
|
tbl
|
print
"
#{
tbl
.
yellow
}
... "
print
"
*
#{
tbl
.
yellow
}
... "
count
=
1
File
.
open
(
File
.
join
(
backup_path_db
,
tbl
+
".yml"
),
"w+"
)
do
|
file
|
ActiveRecord
::
Base
.
connection
.
select_all
(
"SELECT * FROM `
#{
tbl
}
`"
).
each
do
|
line
|
...
...
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