Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ruby Warnings #634

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions lib/koala/api.rb
Original file line number Diff line number Diff line change
@@ -18,6 +18,7 @@ class API
def initialize(access_token = Koala.config.access_token, app_secret = Koala.config.app_secret)
@access_token = access_token
@app_secret = app_secret
@app_access_token = nil
end

attr_reader :access_token, :app_secret
2 changes: 1 addition & 1 deletion lib/koala/api/batch_operation.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
require 'koala/api'
require 'koala/api/graph_batch_api'

module Koala
module Facebook
@@ -23,6 +22,7 @@ def initialize(options = {})
@url = options[:url]
@method = options[:method].to_sym
@post_processing = options[:post_processing]
@files = nil

process_binary_args

3 changes: 2 additions & 1 deletion lib/koala/http_service/uploadable_io.rb
Original file line number Diff line number Diff line change
@@ -7,13 +7,14 @@ class UploadableIO
attr_reader :io_or_path, :content_type, :filename

def initialize(io_or_path_or_mixed, content_type = nil, filename = nil)
@io_or_path = nil
# see if we got the right inputs
parse_init_mixed_param io_or_path_or_mixed, content_type

# filename is used in the Ads API
# if it's provided, take precedence over the detected filename
# otherwise, fall back to a dummy name
@filename = filename || @filename || "koala-io-file.dum"
@filename = filename || (defined?(@filename) && @filename) || "koala-io-file.dum"

raise KoalaError.new("Invalid arguments to initialize an UploadableIO") unless @io_or_path
raise KoalaError.new("Unable to determine MIME type for UploadableIO") if !@content_type
2 changes: 1 addition & 1 deletion lib/koala/oauth.rb
Original file line number Diff line number Diff line change
@@ -174,7 +174,7 @@ def get_access_token_info(code, options = {})
def get_access_token(code, options = {})
# upstream methods will throw errors if needed
if info = get_access_token_info(code, options)
string = info["access_token"]
info["access_token"]
end
end

2 changes: 1 addition & 1 deletion lib/koala/realtime_updates.rb
Original file line number Diff line number Diff line change
@@ -7,7 +7,7 @@ class RealtimeUpdates
# @note: to subscribe to real-time updates, you must have an application access token
# or provide the app secret when initializing your RealtimeUpdates object.

attr_reader :app_id, :app_access_token, :secret
attr_reader :app_id, :secret

# Create a new RealtimeUpdates instance.
# If you don't have your app's access token, provide the app's secret and
2 changes: 0 additions & 2 deletions lib/koala/test_users.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
require 'koala'

module Koala
module Facebook