Skip to content

Commit 7ef5c89

Browse files
committed
Upgraded RuboCop to 0.33.0.
1 parent e5b42e7 commit 7ef5c89

File tree

6 files changed

+44
-22
lines changed

6 files changed

+44
-22
lines changed

.rubocop_todo.yml

Lines changed: 42 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
# This configuration was generated by `rubocop --auto-gen-config`
2-
# on 2015-06-05 09:21:59 -0400 using RuboCop version 0.27.1.
1+
# This configuration was generated by
2+
# `rubocop --auto-gen-config`
3+
# on 2015-08-15 16:01:39 -0400 using RuboCop version 0.33.0.
34
# The point is for the user to remove these configuration records
45
# one by one as the offenses are removed from the code base.
56
# Note that changes in the inspected code, or installation of new
@@ -10,7 +11,7 @@
1011
Metrics/ClassLength:
1112
Max: 103
1213

13-
# Offense count: 78
14+
# Offense count: 80
1415
# Configuration parameters: AllowURI, URISchemes.
1516
Metrics/LineLength:
1617
Max: 142
@@ -20,28 +21,58 @@ Metrics/LineLength:
2021
Metrics/MethodLength:
2122
Max: 14
2223

24+
# Offense count: 3
25+
# Configuration parameters: CountComments.
26+
Metrics/ModuleLength:
27+
Max: 238
28+
2329
# Offense count: 1
2430
Style/AsciiComments:
25-
Enabled: false
31+
Exclude:
32+
- 'lib/hyperclient/collection.rb'
2633

2734
# Offense count: 2
2835
# Configuration parameters: EnforcedStyle, SupportedStyles.
2936
Style/ClassAndModuleChildren:
30-
Enabled: false
37+
Exclude:
38+
- 'features/steps/api_navigation.rb'
39+
- 'features/steps/default_config.rb'
3140

3241
# Offense count: 14
3342
Style/Documentation:
34-
Enabled: false
43+
Exclude:
44+
- 'features/steps/api_navigation.rb'
45+
- 'features/steps/default_config.rb'
46+
- 'features/support/api.rb'
47+
- 'features/support/fixtures.rb'
48+
- 'lib/hyperclient/version.rb'
49+
- 'test/faraday/connection_test.rb'
50+
- 'test/hyperclient/attributes_test.rb'
51+
- 'test/hyperclient/collection_test.rb'
52+
- 'test/hyperclient/curie_test.rb'
53+
- 'test/hyperclient/entry_point_test.rb'
54+
- 'test/hyperclient/link_collection_test.rb'
55+
- 'test/hyperclient/link_test.rb'
56+
- 'test/hyperclient/resource_collection_test.rb'
57+
- 'test/hyperclient/resource_test.rb'
3558

3659
# Offense count: 2
3760
Style/DoubleNegation:
38-
Enabled: false
61+
Exclude:
62+
- 'lib/hyperclient/curie.rb'
63+
- 'lib/hyperclient/link.rb'
3964

4065
# Offense count: 5
66+
# Cop supports --auto-correct.
4167
Style/Lambda:
42-
Enabled: false
68+
Exclude:
69+
- 'test/hyperclient/entry_point_test.rb'
70+
- 'test/hyperclient/link_test.rb'
71+
- 'test/hyperclient/resource_test.rb'
4372

44-
# Offense count: 5
45-
# Configuration parameters: MaxSlashes.
73+
# Offense count: 1
74+
# Cop supports --auto-correct.
75+
# Configuration parameters: EnforcedStyle, SupportedStyles, AllowInnerSlashes.
4676
Style/RegexpLiteral:
47-
Enabled: false
77+
Exclude:
78+
- 'features/support/api.rb'

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ gem 'redcarpet'
1313
gem 'yard', '~> 0.8'
1414
gem 'yard-tomdoc'
1515
gem 'simplecov', require: false
16-
gem 'rubocop', '~> 0.27.0', require: false
16+
gem 'rubocop', '~> 0.33.0', require: false

lib/hyperclient/collection.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ def to_s
7575
#
7676
# Returns an Object.
7777
def method_missing(method_name, *_args, &_block)
78-
@collection.fetch(method_name.to_s) do
78+
@collection.fetch(method_name.to_s) do
7979
fail "Could not find `#{method_name}` in #{self.class.name}"
8080
end
8181
end

test/hyperclient/collection_test.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,5 @@ module Hyperclient
7070
end
7171
end
7272
end
73-
7473
end
7574
end

test/hyperclient/link_test.rb

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,6 @@ module Hyperclient
179179
let(:link) { Link.new('key', { 'href' => '/productions/1' }, entry_point) }
180180

181181
it 'sends a POST request with the link url and params' do
182-
183182
stub_request(entry_point.connection) do |stub|
184183
stub.post('http://api.example.org/productions/1') { [200, {}, nil] }
185184
end
@@ -188,7 +187,6 @@ module Hyperclient
188187
end
189188

190189
it 'defaults params to an empty hash' do
191-
192190
stub_request(entry_point.connection) do |stub|
193191
stub.post('http://api.example.org/productions/1') { [200, {}, nil] }
194192
end
@@ -201,7 +199,6 @@ module Hyperclient
201199
let(:link) { Link.new('key', { 'href' => '/productions/1' }, entry_point) }
202200

203201
it 'sends a PUT request with the link url and params' do
204-
205202
stub_request(entry_point.connection) do |stub|
206203
stub.put('http://api.example.org/productions/1', '{"foo":"bar"}') { [200, {}, nil] }
207204
end
@@ -210,7 +207,6 @@ module Hyperclient
210207
end
211208

212209
it 'defaults params to an empty hash' do
213-
214210
stub_request(entry_point.connection) do |stub|
215211
stub.put('http://api.example.org/productions/1') { [200, {}, nil] }
216212
end
@@ -223,7 +219,6 @@ module Hyperclient
223219
let(:link) { Link.new('key', { 'href' => '/productions/1' }, entry_point) }
224220

225221
it 'sends a PATCH request with the link url and params' do
226-
227222
stub_request(entry_point.connection) do |stub|
228223
stub.patch('http://api.example.org/productions/1', '{"foo":"bar"}') { [200, {}, nil] }
229224
end
@@ -286,7 +281,6 @@ module Hyperclient
286281

287282
describe 'resource' do
288283
before do
289-
290284
stub_request(entry_point.connection) do |stub|
291285
stub.get('http://myapi.org/orders') { [200, {}, '{"resource": "This is the resource"}'] }
292286
end

test/test_helper.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,8 @@
99
require 'pry'
1010

1111
MiniTest::Unit::TestCase.class_eval do
12-
1312
def stub_request(conn, adapter_class = Faraday::Adapter::Test, &stubs_block)
1413
adapter_handler = conn.builder.handlers.find { |h| h.klass < Faraday::Adapter }
1514
conn.builder.swap(adapter_handler, adapter_class, &stubs_block)
1615
end
17-
1816
end

0 commit comments

Comments
 (0)