Fix Rubocop linting issues
This commit is contained in:
parent
d75ba79b3d
commit
58f130c132
3 changed files with 8 additions and 7 deletions
11
app/helpers/external/mailbluster_helper.rb
vendored
11
app/helpers/external/mailbluster_helper.rb
vendored
|
|
@ -1,4 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require 'httparty'
|
require 'httparty'
|
||||||
|
|
||||||
module External
|
module External
|
||||||
|
|
@ -12,10 +13,10 @@ module External
|
||||||
def create_lead(user)
|
def create_lead(user)
|
||||||
options = {
|
options = {
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type' => 'application/json',
|
'Content-Type' => 'application/json',
|
||||||
'Authorization' => ENV['MAILBLUSTER_API_KEY']
|
'Authorization' => ENV['MAILBLUSTER_API_KEY']
|
||||||
},
|
},
|
||||||
body: {
|
body: {
|
||||||
'email' => user.email,
|
'email' => user.email,
|
||||||
'firstName' => user.name,
|
'firstName' => user.name,
|
||||||
'overrideExisting' => true,
|
'overrideExisting' => true,
|
||||||
|
|
@ -32,10 +33,10 @@ module External
|
||||||
def edit_lead(user, add_tags: [], remove_tags: [], old_email: nil)
|
def edit_lead(user, add_tags: [], remove_tags: [], old_email: nil)
|
||||||
options = {
|
options = {
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type' => 'application/json',
|
'Content-Type' => 'application/json',
|
||||||
'Authorization' => ENV['MAILBLUSTER_API_KEY']
|
'Authorization' => ENV['MAILBLUSTER_API_KEY']
|
||||||
},
|
},
|
||||||
body: {
|
body: {
|
||||||
'email' => user.email,
|
'email' => user.email,
|
||||||
'firstName' => user.name,
|
'firstName' => user.name,
|
||||||
'overrideExisting' => true,
|
'overrideExisting' => true,
|
||||||
|
|
@ -52,7 +53,7 @@ module External
|
||||||
email_hash = Digest::MD5.hexdigest user.email
|
email_hash = Digest::MD5.hexdigest user.email
|
||||||
options = {
|
options = {
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type' => 'application/json',
|
'Content-Type' => 'application/json',
|
||||||
'Authorization' => ENV['MAILBLUSTER_API_KEY']
|
'Authorization' => ENV['MAILBLUSTER_API_KEY']
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -363,7 +363,7 @@ class User < ApplicationRecord
|
||||||
User.count == 1 && User.first.email == 'deleted@localhost.osem'
|
User.count == 1 && User.first.email == 'deleted@localhost.osem'
|
||||||
end
|
end
|
||||||
|
|
||||||
# TODO email_hash function for mailbluster
|
# TODO: email_hash function for mailbluster
|
||||||
# def email_hash
|
# def email_hash
|
||||||
# Digest::MD5.hexdigest user.email
|
# Digest::MD5.hexdigest user.email
|
||||||
# end
|
# end
|
||||||
|
|
|
||||||
|
|
@ -49,7 +49,7 @@
|
||||||
require 'spec_helper'
|
require 'spec_helper'
|
||||||
|
|
||||||
describe User do
|
describe User do
|
||||||
|
|
||||||
let(:user_admin) { create(:admin) }
|
let(:user_admin) { create(:admin) }
|
||||||
let(:conference) { create(:conference, short_title: 'oSC16', title: 'openSUSE Conference 2016') }
|
let(:conference) { create(:conference, short_title: 'oSC16', title: 'openSUSE Conference 2016') }
|
||||||
let(:conference2) { create(:conference, short_title: 'oSC15', title: 'openSUSE Conference 2015') }
|
let(:conference2) { create(:conference, short_title: 'oSC15', title: 'openSUSE Conference 2015') }
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue