fix more rubocop failures

This commit is contained in:
stve 2015-02-09 00:42:31 -05:00
parent 5161c68b5a
commit 29e49c1ed7
10 changed files with 43 additions and 44 deletions

View file

@ -11,14 +11,14 @@ module Instapaper
consumer_key: consumer_key, consumer_key: consumer_key,
consumer_secret: consumer_secret, consumer_secret: consumer_secret,
token: oauth_token, token: oauth_token,
token_secret: oauth_token_secret token_secret: oauth_token_secret,
} }
end end
def consumer_tokens def consumer_tokens
{ {
consumer_key: consumer_key, consumer_key: consumer_key,
consumer_secret: consumer_secret consumer_secret: consumer_secret,
} }
end end

View file

@ -2,7 +2,7 @@ module Instapaper
class Client class Client
# Defines methods related to bookmarks # Defines methods related to bookmarks
module Bookmark module Bookmark
# Lists the users unread bookmarks, and can also synchronize reading positions. # Lists the user's unread bookmarks, and can also synchronize reading positions.
# @option limit: Optional. A number between 1 and 500, default 25. # @option limit: Optional. A number between 1 and 500, default 25.
# @option folder_id: Optional. Possible values are unread (default), starred, archive, or a folder_id value from /api/1/folders/list. # @option folder_id: Optional. Possible values are unread (default), starred, archive, or a folder_id value from /api/1/folders/list.
# @option have: Optional. A concatenation of bookmark_id values that the client already has from the specified folder. See below. # @option have: Optional. A concatenation of bookmark_id values that the client already has from the specified folder. See below.
@ -10,7 +10,7 @@ module Instapaper
post('bookmarks/list', options)[2..-1] post('bookmarks/list', options)[2..-1]
end end
# Updates the users reading progress on a single article. # Updates the user's reading progress on a single article.
# @param bookmark_id [String] The id of the bookmark to update. # @param bookmark_id [String] The id of the bookmark to update.
# @param progress [Float] The users progress, as a floating-point number between 0.0 and 1.0, defined as the top edge of the users current viewport, expressed as a percentage of the articles total length. # @param progress [Float] The users progress, as a floating-point number between 0.0 and 1.0, defined as the top edge of the users current viewport, expressed as a percentage of the articles total length.
# @param progress_timestamp [Integer] The Unix timestamp value of the time that the progress was recorded. # @param progress_timestamp [Integer] The Unix timestamp value of the time that the progress was recorded.
@ -18,14 +18,14 @@ module Instapaper
post('bookmarks/update_read_progress', bookmark_id: bookmark_id, progress: progress, progress_timestamp: progress_timestamp.to_i).first post('bookmarks/update_read_progress', bookmark_id: bookmark_id, progress: progress, progress_timestamp: progress_timestamp.to_i).first
end end
# Adds a new unread bookmark to the users account. # Adds a new unread bookmark to the user's account.
# @param url [String] The url of the bookmark. # @param url [String] The url of the bookmark.
def add_bookmark(url, options = {}) def add_bookmark(url, options = {})
post('bookmarks/add', options.merge(url: url)).first post('bookmarks/add', options.merge(url: url)).first
end end
# Permanently deletes the specified bookmark. # Permanently deletes the specified bookmark.
# This is NOT the same as Archive. Please be clear to users if youre going to do this. # This is NOT the same as Archive. Please be clear to users if you're going to do this.
# @param bookmark_id [String] The id of the bookmark. # @param bookmark_id [String] The id of the bookmark.
def delete_bookmark(bookmark_id) def delete_bookmark(bookmark_id)
post('bookmarks/delete', bookmark_id: bookmark_id) post('bookmarks/delete', bookmark_id: bookmark_id)
@ -67,7 +67,7 @@ module Instapaper
end end
alias_method :move_bookmark, :move alias_method :move_bookmark, :move
# Returns the specified bookmarks processed text-view HTML, which is # Returns the specified bookmark's processed text-view HTML, which is
# always text/html encoded as UTF-8. # always text/html encoded as UTF-8.
# @param bookmark_id [String] The id of the bookmark. # @param bookmark_id [String] The id of the bookmark.
def text(bookmark_id) def text(bookmark_id)

View file

@ -2,7 +2,7 @@ module Instapaper
class Client class Client
# Defines methods related to folders # Defines methods related to folders
module Folder module Folder
# List the accounts user-created folders. # List the account's user-created folders.
# @note This only includes organizational folders and does not include RSS-feed folders or starred-subscription folders # @note This only includes organizational folders and does not include RSS-feed folders or starred-subscription folders
def folders def folders
post('folders/list') post('folders/list')
@ -20,7 +20,7 @@ module Instapaper
post('folders/delete', folder_id: folder_id) post('folders/delete', folder_id: folder_id)
end end
# Re-orders a users folders. # Re-orders a user's folders.
# @param order [Array] An array of folder_id:position pairs joined by commas. # @param order [Array] An array of folder_id:position pairs joined by commas.
# @example Ordering folder_ids 100, 200, and 300 # @example Ordering folder_ids 100, 200, and 300
# Instapaper.set_order(['100:1','200:2','300:3']) # Instapaper.set_order(['100:1','200:2','300:3'])

View file

@ -12,7 +12,6 @@ module Instapaper
'User-Agent' => user_agent 'User-Agent' => user_agent
}, },
proxy: proxy, proxy: proxy,
ssl: { verify: false },
url: api_endpoint) url: api_endpoint)
Faraday.new(merged_options) do |builder| Faraday.new(merged_options) do |builder|