Skip to content

Commit

Permalink
[Bundle] Update RuboCop
Browse files Browse the repository at this point in the history
  • Loading branch information
segiddins committed Apr 1, 2016
1 parent 5892bb2 commit 18a239c
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 16 deletions.
19 changes: 18 additions & 1 deletion .rubocop_cocoapods.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,10 @@ Encoding:

# Having these make it easier to *not* forget to add one when adding a new
# value and you can simply copy the previous line.
TrailingComma:
Style/TrailingCommaInArguments:
EnforcedStyleForMultiline: comma

Style/TrailingCommaInLiteral:
EnforcedStyleForMultiline: comma

Style/MultilineOperationIndentation:
Expand All @@ -54,6 +57,11 @@ GuardClause:
Next:
Enabled: false

# Autocorrect makes this cop much more useful, taking away needless guessing
Lint/EndAlignment:
AutoCorrect: true


# Arbitrary max lengths for classes simply do not work and enabling this will
# lead to a never ending stream of annoyance and changes.
Metrics/ClassLength:
Expand Down Expand Up @@ -83,6 +91,11 @@ Metrics/AbcSize:
Metrics/CyclomaticComplexity:
Enabled: false

# It will be obvious which code is complex, Rubocop should only lint simple
# rules for us.
Metrics/PerceivedComplexity:
Enabled: false

#- CocoaPods support for Ruby 1.8.7 ------------------------------------------#

HashSyntax:
Expand All @@ -107,6 +120,10 @@ AmbiguousRegexpLiteral:
Exclude:
- spec/**/*

Performance/RedundantMatch:
Exclude:
- spec/**/*

# Allow `object.should == object` syntax.
Void:
Exclude:
Expand Down
19 changes: 9 additions & 10 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,7 @@ GEM
thread_safe (~> 0.3, >= 0.3.4)
tzinfo (~> 1.1)
addressable (2.3.8)
ast (2.1.0)
astrolabe (1.3.1)
parser (~> 2.2)
ast (2.2.0)
bacon (1.2.0)
cocoapods-downloader (0.9.3)
cocoapods-plugins (0.4.2)
Expand Down Expand Up @@ -92,24 +90,24 @@ GEM
nap (1.0.0)
netrc (0.7.8)
notify (0.5.2)
parser (2.2.2.6)
ast (>= 1.1, < 3.0)
parser (2.3.0.7)
ast (~> 2.2)
powerpack (0.1.1)
prettybacon (0.0.2)
bacon (~> 1.2)
rainbow (2.0.0)
rainbow (2.1.0)
rake (10.4.2)
rb-fsevent (0.9.5)
rb-inotify (0.9.5)
ffi (>= 0.5.0)
rb-kqueue (0.2.4)
ffi (>= 0.5.0)
rubocop (0.33.0)
astrolabe (~> 1.3)
parser (>= 2.2.2.5, < 3.0)
rubocop (0.39.0)
parser (>= 2.3.0.7, < 3.0)
powerpack (~> 0.1)
rainbow (>= 1.99.1, < 3.0)
ruby-progressbar (~> 1.4)
ruby-progressbar (~> 1.7)
unicode-display_width (~> 1.0, >= 1.0.1)
ruby-progressbar (1.7.5)
safe_yaml (1.0.4)
simplecov (0.9.2)
Expand All @@ -120,6 +118,7 @@ GEM
thread_safe (0.3.5)
tzinfo (1.2.2)
thread_safe (~> 0.1)
unicode-display_width (1.0.3)
webmock (1.21.0)
addressable (>= 2.3.6)
crack (>= 0.3.2)
Expand Down
4 changes: 2 additions & 2 deletions lib/pod/command/trunk.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class Trunk < Command
self.summary = 'Interact with the CocoaPods API (e.g. publishing new specs)'

SCHEME_AND_HOST = ENV['TRUNK_SCHEME_AND_HOST'] || 'https://trunk.cocoapods.org'
BASE_URL = "#{SCHEME_AND_HOST}/api/v1"
BASE_URL = "#{SCHEME_AND_HOST}/api/v1".freeze

require 'pod/command/trunk/add_owner'
require 'pod/command/trunk/delete'
Expand All @@ -26,7 +26,7 @@ class Trunk < Command

def request_url(action, url, *args)
response = create_request(action, url, *args)
if (400...600).include?(response.status_code)
if (400...600).cover?(response.status_code)
print_error(response.body)
end
response
Expand Down
2 changes: 1 addition & 1 deletion spec/command/trunk/addowner_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ module Pod
it 'should successfully add an owner' do
url = 'https://trunk.cocoapods.org/api/v1/pods/QueryKit/owners'
WebMock::API.stub_request(:patch, url).
with(:body => "{\"email\":\"[email protected]\"}",
with(:body => '{"email":"[email protected]"}',
:headers => { 'Authorization' => 'Token 527d11fe429f3426cb8dbeba183a0d80' }).
to_return(:status => 200, :body => '[]', :headers => {})

Expand Down
2 changes: 0 additions & 2 deletions spec/command/trunk/delete_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ module Pod
command.send(:confirm_deletion?).should.be.true
command.send(:confirm_deletion?).should.be.false

# rubocop:disable Metrics/LineLength
UI.output.should == <<-OUTPUT.gsub(/^>$/, '> ')
\e[33mWARNING: It is generally considered bad behavior to remove versions of a Pod that others are depending on!
Please consider using the `deprecate` command instead.\e[0m
Expand All @@ -38,7 +37,6 @@ module Pod
Are you sure you want to delete this Pod version?
>
OUTPUT
# rubocop:enable Metrics/LineLength
end

it 'does not delete if the user does not confirm' do
Expand Down

0 comments on commit 18a239c

Please sign in to comment.