Commit e5ff5c28694daee117f22ba3a8c21f38a5f14966

Authored by Dmitriy Zaporozhets
1 parent 30d63707

Use project with namespace in email subject

app/mailers/notify.rb
... ... @@ -154,6 +154,6 @@ class Notify < ActionMailer::Base
154 154 # >> subject('Lorem ipsum', 'Dolor sit amet')
155 155 # => "GitLab | Lorem ipsum | Dolor sit amet"
156 156 def subject(*extra)
157   - "GitLab | " << extra.join(' | ') << (@project ? " | #{@project.name}" : "")
  157 + "GitLab | " << extra.join(' | ') << (@project ? " | #{@project.name_with_namespace}" : "")
158 158 end
159 159 end
... ...
lib/gitlab/graph/json_builder.rb
... ... @@ -17,14 +17,14 @@ module Gitlab
17 17 @commits = collect_commits
18 18 @days = index_commits
19 19 end
20   -
  20 +
21 21 def to_json(*args)
22 22 {
23 23 days: @days.compact.map { |d| [d.day, d.strftime("%b")] },
24 24 commits: @commits.map(&:to_graph_hash)
25 25 }.to_json(*args)
26 26 end
27   -
  27 +
28 28 protected
29 29  
30 30 # Get commits from repository
... ...
lib/tasks/gitlab/backup.rake
... ... @@ -118,10 +118,10 @@ namespace :gitlab do
118 118 task :create => :environment do
119 119 backup_path_repo = File.join(Gitlab.config.backup.path, "repositories")
120 120 FileUtils.mkdir_p(backup_path_repo) until Dir.exists?(backup_path_repo)
121   - puts "Dumping repositories ..."
  121 + puts "Dumping repositories ...".blue
122 122  
123 123 Project.find_each(:batch_size => 1000) do |project|
124   - print "#{project.path_with_namespace} ... "
  124 + print " * #{project.path_with_namespace} ... "
125 125  
126 126 if project.empty_repo?
127 127 puts "[SKIPPED]".cyan
... ... @@ -174,9 +174,9 @@ namespace :gitlab do
174 174 backup_path_db = File.join(Gitlab.config.backup.path, "db")
175 175 FileUtils.mkdir_p(backup_path_db) unless Dir.exists?(backup_path_db)
176 176  
177   - puts "Dumping database tables ... "
  177 + puts "Dumping database tables ... ".blue
178 178 ActiveRecord::Base.connection.tables.each do |tbl|
179   - print "#{tbl.yellow} ... "
  179 + print " * #{tbl.yellow} ... "
180 180 count = 1
181 181 File.open(File.join(backup_path_db, tbl + ".yml"), "w+") do |file|
182 182 ActiveRecord::Base.connection.select_all("SELECT * FROM `#{tbl}`").each do |line|
... ...