fixed rubocop issues.

This commit is contained in:
Martin Edenhofer 2015-08-28 03:02:21 +02:00
parent 6a733396f9
commit 0f2b0fc7bb
6 changed files with 7 additions and 8 deletions

View file

@ -4,7 +4,7 @@ require 'facebook'
class Channel::Driver::Facebook class Channel::Driver::Facebook
def fetch (adapter_options, channel) def fetch (_adapter_options, channel)
@channel = channel @channel = channel
@facebook = Facebook.new( @channel[:options] ) @facebook = Facebook.new( @channel[:options] )

View file

@ -2,7 +2,7 @@
class Channel::Driver::Twitter class Channel::Driver::Twitter
def fetch (adapter_options, channel) def fetch (_adapter_options, channel)
@channel = channel @channel = channel
@tweet = Tweet.new( @channel[:options][:auth] ) @tweet = Tweet.new( @channel[:options][:auth] )

View file

@ -4,9 +4,9 @@ class UpdateChannel < ActiveRecord::Migration
add_column :email_addresses, :channel_id, :integer, null: true add_column :email_addresses, :channel_id, :integer, null: true
EmailAddress.reset_column_information EmailAddress.reset_column_information
channel = Channel.find_by(area: 'Email::Inbound') channel_inbound = Channel.find_by(area: 'Email::Inbound')
EmailAddress.all.each {|email_address| EmailAddress.all.each {|email_address|
email_address.channel_id = channel.id email_address.channel_id = channel_inbound.id
email_address.save email_address.save
} }

View file

@ -310,8 +310,8 @@ returns on fail
driver_class = Object.const_get("Channel::Driver::#{adapter.to_classname}") driver_class = Object.const_get("Channel::Driver::#{adapter.to_classname}")
driver_instance = driver_class.new driver_instance = driver_class.new
driver_instance.send( driver_instance.send(
params[:options], params[:options],
mail, mail,
) )
rescue => e rescue => e

View file

@ -61,7 +61,6 @@ or
else else
subject = params[:subject] subject = params[:subject]
end end
puts "VERIFY #{subject.inspect}/#{params[:sender]}"
result = EmailHelper::Probe.outbound(params[:outbound], params[:sender], subject) result = EmailHelper::Probe.outbound(params[:outbound], params[:sender], subject)
# looking for verify email # looking for verify email

View file

@ -32,7 +32,7 @@ class FacebookTest < ActiveSupport::TestCase
} }
# add channel # add channel
current = Channel.where( adapter: 'Facebook' ) current = Channel.where(area: 'Facebook::Account')
current.each(&:destroy) current.each(&:destroy)
Channel.create( Channel.create(
area: 'Facebook::Account', area: 'Facebook::Account',