Commit b4b67b02 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Merge branch 'deprecated_warnings' into 'master'

Git rid of deprecated warnings after rails update

https://gitlab.com/gitlab-org/gitlab-ce/issues/3798

https://gitlab.com/gitlab-org/gitlab-ce/issues/3797

See merge request !1946
parents 843df4ed f21bbd44
...@@ -116,23 +116,8 @@ GEM ...@@ -116,23 +116,8 @@ GEM
activemodel (>= 3.2.0) activemodel (>= 3.2.0)
activesupport (>= 3.2.0) activesupport (>= 3.2.0)
json (>= 1.7) json (>= 1.7)
celluloid (0.17.2) celluloid (0.16.0)
celluloid-essentials timers (~> 4.0.0)
celluloid-extras
celluloid-fsm
celluloid-pool
celluloid-supervision
timers (>= 4.1.1)
celluloid-essentials (0.20.5)
timers (>= 4.1.1)
celluloid-extras (0.20.5)
timers (>= 4.1.1)
celluloid-fsm (0.20.5)
timers (>= 4.1.1)
celluloid-pool (0.20.5)
timers (>= 4.1.1)
celluloid-supervision (0.20.5)
timers (>= 4.1.1)
charlock_holmes (0.7.3) charlock_holmes (0.7.3)
chunky_png (1.3.5) chunky_png (1.3.5)
cliver (0.3.2) cliver (0.3.2)
...@@ -757,7 +742,7 @@ GEM ...@@ -757,7 +742,7 @@ GEM
thor (0.19.1) thor (0.19.1)
thread_safe (0.3.5) thread_safe (0.3.5)
tilt (1.4.1) tilt (1.4.1)
timers (4.1.1) timers (4.0.4)
hitimes hitimes
timfel-krb5-auth (0.8.3) timfel-krb5-auth (0.8.3)
tinder (1.10.1) tinder (1.10.1)
......
...@@ -37,7 +37,7 @@ class BuildkiteService < CiService ...@@ -37,7 +37,7 @@ class BuildkiteService < CiService
def compose_service_hook def compose_service_hook
hook = service_hook || build_service_hook hook = service_hook || build_service_hook
hook.url = webhook_url hook.url = webhook_url
hook.enable_ssl_verification = enable_ssl_verification hook.enable_ssl_verification = !!enable_ssl_verification
hook.save hook.save
end end
......
...@@ -34,7 +34,7 @@ class DroneCiService < CiService ...@@ -34,7 +34,7 @@ class DroneCiService < CiService
hook = service_hook || build_service_hook hook = service_hook || build_service_hook
# If using a service template, project may not be available # If using a service template, project may not be available
hook.url = [drone_url, "/api/hook", "?owner=#{project.namespace.path}", "&name=#{project.path}", "&access_token=#{token}"].join if project hook.url = [drone_url, "/api/hook", "?owner=#{project.namespace.path}", "&name=#{project.path}", "&access_token=#{token}"].join if project
hook.enable_ssl_verification = enable_ssl_verification hook.enable_ssl_verification = !!enable_ssl_verification
hook.save hook.save
end end
......
...@@ -690,7 +690,7 @@ class User < ActiveRecord::Base ...@@ -690,7 +690,7 @@ class User < ActiveRecord::Base
end end
def starred?(project) def starred?(project)
starred_projects.exists?(project) starred_projects.exists?(project.id)
end end
def toggle_star(project) def toggle_star(project)
...@@ -794,4 +794,9 @@ class User < ActiveRecord::Base ...@@ -794,4 +794,9 @@ class User < ActiveRecord::Base
Gitlab::SQL::Union.new([personal_projects.select(:id), groups.select(:id), Gitlab::SQL::Union.new([personal_projects.select(:id), groups.select(:id),
other.select(:id)]) other.select(:id)])
end end
# Added according to https://github.com/plataformatec/devise/blob/7df57d5081f9884849ca15e4fde179ef164a575f/README.md#activejob-integration
def send_devise_notification(notification, *args)
devise_mailer.send(notification, self, *args).deliver_later
end
end end
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
= @project.name = @project.name
%p %p
Commit: #{link_to @build.short_sha, namespace_project_commit_path(@build.gl_project.namespace, @build.gl_project, @build.sha)} Commit: #{link_to @build.short_sha, namespace_project_commit_url(@build.gl_project.namespace, @build.gl_project, @build.sha)}
%p %p
Author: #{@build.commit.git_author_name} Author: #{@build.commit.git_author_name}
%p %p
......
...@@ -32,7 +32,7 @@ Rails.application.configure do ...@@ -32,7 +32,7 @@ Rails.application.configure do
# config.force_ssl = true # config.force_ssl = true
# See everything in the log (default is :info) # See everything in the log (default is :info)
# config.log_level = :debug config.log_level = :info
# Suppress 'Rendered template ...' messages in the log # Suppress 'Rendered template ...' messages in the log
# source: http://stackoverflow.com/a/16369363 # source: http://stackoverflow.com/a/16369363
......
...@@ -260,7 +260,7 @@ module Gitlab ...@@ -260,7 +260,7 @@ module Gitlab
end end
def link_to_project(object) def link_to_project(object)
if object && !object.projects.exists?(@project) if object && !object.projects.exists?(@project.id)
object.projects << @project object.projects << @project
object.save object.save
end end
......
...@@ -247,7 +247,7 @@ describe Notify do ...@@ -247,7 +247,7 @@ describe Notify do
end end
describe 'that have been reassigned' do describe 'that have been reassigned' do
subject { Notify.reassigned_issue_email(recipient.id, issue.id, previous_assignee.id, current_user) } subject { Notify.reassigned_issue_email(recipient.id, issue.id, previous_assignee.id, current_user.id) }
it_behaves_like 'a multiple recipients email' it_behaves_like 'a multiple recipients email'
it_behaves_like 'an answer to an existing thread', 'issue' it_behaves_like 'an answer to an existing thread', 'issue'
...@@ -278,7 +278,7 @@ describe Notify do ...@@ -278,7 +278,7 @@ describe Notify do
describe 'status changed' do describe 'status changed' do
let(:status) { 'closed' } let(:status) { 'closed' }
subject { Notify.issue_status_changed_email(recipient.id, issue.id, status, current_user) } subject { Notify.issue_status_changed_email(recipient.id, issue.id, status, current_user.id) }
it_behaves_like 'an answer to an existing thread', 'issue' it_behaves_like 'an answer to an existing thread', 'issue'
it_behaves_like 'it should show Gmail Actions View Issue link' it_behaves_like 'it should show Gmail Actions View Issue link'
...@@ -382,7 +382,7 @@ describe Notify do ...@@ -382,7 +382,7 @@ describe Notify do
describe 'status changed' do describe 'status changed' do
let(:status) { 'reopened' } let(:status) { 'reopened' }
subject { Notify.merge_request_status_email(recipient.id, merge_request.id, status, current_user) } subject { Notify.merge_request_status_email(recipient.id, merge_request.id, status, current_user.id) }
it_behaves_like 'an answer to an existing thread', 'merge_request' it_behaves_like 'an answer to an existing thread', 'merge_request'
it_behaves_like 'it should show Gmail Actions View Merge request link' it_behaves_like 'it should show Gmail Actions View Merge request link'
...@@ -597,8 +597,10 @@ describe Notify do ...@@ -597,8 +597,10 @@ describe Notify do
let(:user) { create(:user, email: 'old-email@mail.com') } let(:user) { create(:user, email: 'old-email@mail.com') }
before do before do
user.email = "new-email@mail.com" perform_enqueued_jobs do
user.save user.email = "new-email@mail.com"
user.save
end
end end
subject { ActionMailer::Base.deliveries.last } subject { ActionMailer::Base.deliveries.last }
......
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