Browse Source

fixed rubocop issues.

Martin Edenhofer 9 years ago
parent
commit
0f2b0fc7bb

+ 1 - 1
app/models/channel/driver/facebook.rb

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

+ 1 - 1
app/models/channel/driver/twitter.rb

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

+ 2 - 2
db/migrate/20150824000002_update_channel.rb

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

+ 2 - 2
lib/email_helper/probe.rb

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

+ 0 - 1
lib/email_helper/verify.rb

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

+ 1 - 1
test/integration/facebook_test.rb

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