Commit 125793f1 authored by Douwe Maan's avatar Douwe Maan

Merge branch 'dz-use-less-deprecated-methods-2' into 'master'

Use Project#full_name instead of name_with_namespace

See merge request gitlab-org/gitlab-ce!17601
parents 82ea46a7 aeab4e62
......@@ -117,7 +117,7 @@ class Notify < BaseMailer
if Gitlab::IncomingEmail.enabled? && @sent_notification
address = Mail::Address.new(Gitlab::IncomingEmail.reply_address(reply_key))
address.display_name = @project.name_with_namespace
address.display_name = @project.full_name
headers['Reply-To'] = address
......
......@@ -85,7 +85,7 @@ module Projects
end
def after_create_actions
log_info("#{@project.owner.name} created a new project \"#{@project.name_with_namespace}\"")
log_info("#{@project.owner.name} created a new project \"#{@project.full_name}\"")
unless @project.gitlab_project_import?
@project.write_repository_config
......
......@@ -66,7 +66,7 @@ class EmailsOnPushWorker
# These are input errors and won't be corrected even if Sidekiq retries
rescue Net::SMTPFatalError, Net::SMTPSyntaxError => e
logger.info("Failed to send e-mail for project '#{project.name_with_namespace}' to #{recipient}: #{e}")
logger.info("Failed to send e-mail for project '#{project.full_name}' to #{recipient}: #{e}")
end
end
ensure
......
......@@ -82,7 +82,7 @@ module SharedProject
step 'I should see project "Shop" activity feed' do
project = Project.find_by(name: "Shop")
expect(page).to have_content "#{@user.name} pushed new branch fix at #{project.name_with_namespace}"
expect(page).to have_content "#{@user.name} pushed new branch fix at #{project.full_name}"
end
step 'I should see project settings' do
......@@ -113,12 +113,12 @@ module SharedProject
step 'I should not see project "Archive"' do
project = Project.find_by(name: "Archive")
expect(page).not_to have_content project.name_with_namespace
expect(page).not_to have_content project.full_name
end
step 'I should see project "Archive"' do
project = Project.find_by(name: "Archive")
expect(page).to have_content project.name_with_namespace
expect(page).to have_content project.full_name
end
# ----------------------------------------
......
......@@ -135,7 +135,7 @@ module Gitlab
if label.valid?
@labels[label_params[:title]] = label
else
raise "Failed to create label \"#{label_params[:title]}\" for project \"#{project.name_with_namespace}\""
raise "Failed to create label \"#{label_params[:title]}\" for project \"#{project.full_name}\""
end
end
end
......
......@@ -31,7 +31,7 @@ module Gitlab
# TODO: do we still need it?
project_id: project.id,
project_name: project.name_with_namespace,
project_name: project.full_name,
user: {
id: user.try(:id),
......
......@@ -38,7 +38,7 @@ module Gitlab
end
def project_link
"[#{project.name_with_namespace}](#{project.web_url})"
"[#{project.full_name}](#{project.web_url})"
end
def author_profile_link
......
......@@ -53,7 +53,7 @@ module Gitlab
end
def pretext
"Issue *#{@resource.to_reference}* from #{project.name_with_namespace}"
"Issue *#{@resource.to_reference}* from #{project.full_name}"
end
end
end
......
......@@ -50,7 +50,7 @@ module SystemCheck
if should_sanitize?
"#{project.namespace_id.to_s.color(:yellow)}/#{project.id.to_s.color(:yellow)} ... "
else
"#{project.name_with_namespace.color(:yellow)} ... "
"#{project.full_name.color(:yellow)} ... "
end
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment