Skip to content

Commit

Permalink
Merge 9959c99 into bc911e9
Browse files Browse the repository at this point in the history
  • Loading branch information
mvz committed Sep 24, 2017
2 parents bc911e9 + 9959c99 commit fd8724c
Show file tree
Hide file tree
Showing 9 changed files with 23 additions and 7 deletions.
20 changes: 15 additions & 5 deletions .rubocop.yml
@@ -1,3 +1,12 @@
Layout/AccessModifierIndentation:
EnforcedStyle: outdent

Layout/DotPosition:
EnforcedStyle: trailing

Layout/SpaceInsideHashLiteralBraces:
EnforcedStyle: no_space

Metrics/BlockLength:
Max: 36
Exclude:
Expand All @@ -21,9 +30,6 @@ Metrics/ParameterLists:
Max: 4
CountKeywordArgs: true

Style/AccessModifierIndentation:
EnforcedStyle: outdent

Style/CollectionMethods:
Enabled: true
PreferredMethods:
Expand All @@ -45,8 +51,12 @@ Style/FrozenStringLiteralComment:
Style/NumericPredicate:
Enabled: false

Style/SpaceInsideHashLiteralBraces:
EnforcedStyle: no_space
Style/PercentLiteralDelimiters:
PreferredDelimiters:
'%w': ()

Style/SymbolArray:
EnforcedStyle: brackets

Style/TrailingCommaInLiteral:
EnforcedStyleForMultiline: 'comma'
2 changes: 1 addition & 1 deletion lib/twitter/profile.rb
Expand Up @@ -88,7 +88,7 @@ def insecure_uri(uri)
end

def profile_image_suffix(size)
:original == size.to_sym ? '\\1' : "_#{size}\\1"
size.to_sym == :original ? '\\1' : "_#{size}\\1"
end
end
end
2 changes: 1 addition & 1 deletion lib/twitter/rest/tweets.rb
Expand Up @@ -328,7 +328,7 @@ def unretweet(*args)
#
# @see https://dev.twitter.com/rest/public/uploading-media
def upload(media) # rubocop:disable MethodLength, AbcSize
if !(File.basename(media) =~ /\.mp4$/)
if File.basename(media) !~ /\.mp4$/
Twitter::REST::Request.new(self, :multipart_post, 'https://upload.twitter.com/1.1/media/upload.json', key: :media, file: media).perform
else
init = Twitter::REST::Request.new(self, :post, 'https://upload.twitter.com/1.1/media/upload.json',
Expand Down
1 change: 1 addition & 0 deletions spec/twitter/direct_message_spec.rb
@@ -1,4 +1,5 @@
# coding: utf-8

require 'helper'

describe Twitter::DirectMessage do
Expand Down
1 change: 1 addition & 0 deletions spec/twitter/entity/uri_spec.rb
@@ -1,4 +1,5 @@
# coding: utf-8

require 'helper'

describe Twitter::Entity::URI do
Expand Down
1 change: 1 addition & 0 deletions spec/twitter/rest/favorites_spec.rb
@@ -1,4 +1,5 @@
# coding: utf-8

require 'helper'

describe Twitter::REST::Favorites do
Expand Down
1 change: 1 addition & 0 deletions spec/twitter/rest/tweets_spec.rb
@@ -1,4 +1,5 @@
# coding: utf-8

require 'helper'

describe Twitter::REST::Tweets do
Expand Down
1 change: 1 addition & 0 deletions spec/twitter/tweet_spec.rb
@@ -1,4 +1,5 @@
# coding: utf-8

require 'helper'

describe Twitter::Tweet do
Expand Down
1 change: 1 addition & 0 deletions spec/twitter/user_spec.rb
@@ -1,4 +1,5 @@
# coding: utf-8

require 'helper'

describe Twitter::User do
Expand Down

0 comments on commit fd8724c

Please sign in to comment.