From 15f7aa4ba38312d31b1243fb5df1038dfc55dacb Mon Sep 17 00:00:00 2001 From: James Herdman Date: Mon, 25 Feb 2019 14:14:36 -0500 Subject: [PATCH] [RuboCop] Trailing Blank Lines Violations --- .rubocop_todo.yml | 7 ------- Gemfile | 1 - bin/console | 2 +- lib/faraday/encoders/flat_params_encoder.rb | 2 +- lib/faraday/encoders/nested_params_encoder.rb | 2 +- lib/faraday/options.rb | 2 +- lib/faraday/options/connection_options.rb | 2 +- lib/faraday/options/proxy_options.rb | 2 +- lib/faraday/options/request_options.rb | 2 +- lib/faraday/options/ssl_options.rb | 2 +- lib/faraday/request.rb | 1 - lib/faraday/request/authorization.rb | 1 - lib/faraday/request/basic_authentication.rb | 1 - lib/faraday/request/token_authentication.rb | 1 - spec/faraday/adapter/patron_spec.rb | 2 +- spec/faraday/composite_read_io_spec.rb | 2 +- spec/faraday/error_spec.rb | 2 +- spec/faraday/options/env_spec.rb | 2 +- spec/faraday/options/options_spec.rb | 2 +- spec/faraday/options/proxy_options_spec.rb | 2 +- spec/faraday/options/request_options_spec.rb | 2 +- spec/faraday/params_encoders/flat_spec.rb | 2 +- spec/faraday/params_encoders/nested_spec.rb | 2 +- spec/faraday/rack_builder_spec.rb | 2 +- spec/faraday/request/instrumentation_spec.rb | 2 +- spec/faraday/request/multipart_spec.rb | 2 +- spec/faraday/request/url_encoded_spec.rb | 2 +- spec/faraday/response/middleware_spec.rb | 2 +- spec/faraday/utils_spec.rb | 2 +- spec/faraday_spec.rb | 2 +- spec/support/fake_safe_buffer.rb | 2 +- spec/support/helper_methods.rb | 2 +- spec/support/shared_examples/params_encoder.rb | 2 +- spec/support/streaming_response_checker.rb | 2 +- 34 files changed, 28 insertions(+), 40 deletions(-) diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 3df459d84..4824eb5e0 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -196,13 +196,6 @@ Layout/SpaceInsidePercentLiteralDelimiters: Exclude: - 'lib/faraday/adapter/rack.rb' -# Offense count: 41 -# Cop supports --auto-correct. -# Configuration parameters: EnforcedStyle. -# SupportedStyles: final_newline, final_blank_line -Layout/TrailingBlankLines: - Enabled: false - # Offense count: 6 # Cop supports --auto-correct. # Configuration parameters: AllowInHeredoc. diff --git a/Gemfile b/Gemfile index edaed6165..293c019dd 100644 --- a/Gemfile +++ b/Gemfile @@ -34,4 +34,3 @@ group :test do end gemspec - diff --git a/bin/console b/bin/console index 84ecc5641..40446e2f1 100755 --- a/bin/console +++ b/bin/console @@ -12,4 +12,4 @@ require 'faraday' # Pry.start require 'irb' -IRB.start(__FILE__) \ No newline at end of file +IRB.start(__FILE__) diff --git a/lib/faraday/encoders/flat_params_encoder.rb b/lib/faraday/encoders/flat_params_encoder.rb index c38dabbb6..fcf98f163 100644 --- a/lib/faraday/encoders/flat_params_encoder.rb +++ b/lib/faraday/encoders/flat_params_encoder.rb @@ -69,4 +69,4 @@ def self.decode(query) end end end -end \ No newline at end of file +end diff --git a/lib/faraday/encoders/nested_params_encoder.rb b/lib/faraday/encoders/nested_params_encoder.rb index fc050250a..714aae61f 100644 --- a/lib/faraday/encoders/nested_params_encoder.rb +++ b/lib/faraday/encoders/nested_params_encoder.rb @@ -143,4 +143,4 @@ def self.dehash(hash, depth) end end end -end \ No newline at end of file +end diff --git a/lib/faraday/options.rb b/lib/faraday/options.rb index 427e77eb1..f38afb4ef 100644 --- a/lib/faraday/options.rb +++ b/lib/faraday/options.rb @@ -211,4 +211,4 @@ def self.fetch_error_class require 'faraday/options/ssl_options' require 'faraday/options/proxy_options' require 'faraday/options/connection_options' -require 'faraday/options/env' \ No newline at end of file +require 'faraday/options/env' diff --git a/lib/faraday/options/connection_options.rb b/lib/faraday/options/connection_options.rb index 6a499edff..6b3257b58 100644 --- a/lib/faraday/options/connection_options.rb +++ b/lib/faraday/options/connection_options.rb @@ -16,4 +16,4 @@ def new_builder(block) builder_class.new(&block) end end -end \ No newline at end of file +end diff --git a/lib/faraday/options/proxy_options.rb b/lib/faraday/options/proxy_options.rb index fbef77c0d..73ea0f588 100644 --- a/lib/faraday/options/proxy_options.rb +++ b/lib/faraday/options/proxy_options.rb @@ -22,4 +22,4 @@ def self.from(value) memoized(:user) { uri && uri.user && Utils.unescape(uri.user) } memoized(:password) { uri && uri.password && Utils.unescape(uri.password) } end -end \ No newline at end of file +end diff --git a/lib/faraday/options/request_options.rb b/lib/faraday/options/request_options.rb index 9fb3db766..6566af7f8 100644 --- a/lib/faraday/options/request_options.rb +++ b/lib/faraday/options/request_options.rb @@ -17,4 +17,4 @@ def stream_response? on_data.is_a?(Proc) end end -end \ No newline at end of file +end diff --git a/lib/faraday/options/ssl_options.rb b/lib/faraday/options/ssl_options.rb index 2f5251a09..4d7d2da63 100644 --- a/lib/faraday/options/ssl_options.rb +++ b/lib/faraday/options/ssl_options.rb @@ -55,4 +55,4 @@ def disable? !verify? end end -end \ No newline at end of file +end diff --git a/lib/faraday/request.rb b/lib/faraday/request.rb index 1a9b9ca21..b43f131fd 100644 --- a/lib/faraday/request.rb +++ b/lib/faraday/request.rb @@ -134,4 +134,3 @@ def to_env(connection) end end end - diff --git a/lib/faraday/request/authorization.rb b/lib/faraday/request/authorization.rb index a1c1d459d..b97eff835 100644 --- a/lib/faraday/request/authorization.rb +++ b/lib/faraday/request/authorization.rb @@ -49,4 +49,3 @@ def call(env) end end end - diff --git a/lib/faraday/request/basic_authentication.rb b/lib/faraday/request/basic_authentication.rb index 281a5d649..e4a5fe244 100644 --- a/lib/faraday/request/basic_authentication.rb +++ b/lib/faraday/request/basic_authentication.rb @@ -16,4 +16,3 @@ def self.header(login, pass) end end end - diff --git a/lib/faraday/request/token_authentication.rb b/lib/faraday/request/token_authentication.rb index cfa30f701..48bd094fd 100644 --- a/lib/faraday/request/token_authentication.rb +++ b/lib/faraday/request/token_authentication.rb @@ -14,4 +14,3 @@ def initialize(app, token, options = nil) end end end - diff --git a/spec/faraday/adapter/patron_spec.rb b/spec/faraday/adapter/patron_spec.rb index d01fd541d..81de1eace 100644 --- a/spec/faraday/adapter/patron_spec.rb +++ b/spec/faraday/adapter/patron_spec.rb @@ -15,4 +15,4 @@ expect { conn.get('/') }.to raise_error(RuntimeError, 'Configuration block called') end -end \ No newline at end of file +end diff --git a/spec/faraday/composite_read_io_spec.rb b/spec/faraday/composite_read_io_spec.rb index 75a0bdc80..d5c18545d 100644 --- a/spec/faraday/composite_read_io_spec.rb +++ b/spec/faraday/composite_read_io_spec.rb @@ -77,4 +77,4 @@ def composite_io(*parts) expect(subject.read(3)).to be_nil end end -end \ No newline at end of file +end diff --git a/spec/faraday/error_spec.rb b/spec/faraday/error_spec.rb index 2b01152a7..936d2d103 100644 --- a/spec/faraday/error_spec.rb +++ b/spec/faraday/error_spec.rb @@ -42,4 +42,4 @@ it { expect(subject.inspect).to eq('#>') } end end -end \ No newline at end of file +end diff --git a/spec/faraday/options/env_spec.rb b/spec/faraday/options/env_spec.rb index 0ecf88511..78159d007 100644 --- a/spec/faraday/options/env_spec.rb +++ b/spec/faraday/options/env_spec.rb @@ -67,4 +67,4 @@ end end end -end \ No newline at end of file +end diff --git a/spec/faraday/options/options_spec.rb b/spec/faraday/options/options_spec.rb index a00143a2d..22d561270 100644 --- a/spec/faraday/options/options_spec.rb +++ b/spec/faraday/options/options_spec.rb @@ -282,4 +282,4 @@ class ParentOptions < Faraday::Options.new(:a, :b, :c) end end end -end \ No newline at end of file +end diff --git a/spec/faraday/options/proxy_options_spec.rb b/spec/faraday/options/proxy_options_spec.rb index 9e039059e..667b41b44 100644 --- a/spec/faraday/options/proxy_options_spec.rb +++ b/spec/faraday/options/proxy_options_spec.rb @@ -32,4 +32,4 @@ expect(proxy.password).to eq('pw d') expect(proxy[:password]).to eq('pw d') end -end \ No newline at end of file +end diff --git a/spec/faraday/options/request_options_spec.rb b/spec/faraday/options/request_options_spec.rb index f1bdf2c75..05d7163a6 100644 --- a/spec/faraday/options/request_options_spec.rb +++ b/spec/faraday/options/request_options_spec.rb @@ -14,4 +14,4 @@ options.proxy = nil expect(options.proxy).to be_nil end -end \ No newline at end of file +end diff --git a/spec/faraday/params_encoders/flat_spec.rb b/spec/faraday/params_encoders/flat_spec.rb index 6fe479ed7..93a8c6c7d 100644 --- a/spec/faraday/params_encoders/flat_spec.rb +++ b/spec/faraday/params_encoders/flat_spec.rb @@ -10,4 +10,4 @@ expected = {'a' => %w(one two three) } expect(subject.decode(query)).to eq(expected) end -end \ No newline at end of file +end diff --git a/spec/faraday/params_encoders/nested_spec.rb b/spec/faraday/params_encoders/nested_spec.rb index dcd5234da..090c87993 100644 --- a/spec/faraday/params_encoders/nested_spec.rb +++ b/spec/faraday/params_encoders/nested_spec.rb @@ -121,4 +121,4 @@ let(:error_message) { "expected Array (got String) for param `a'" } it_behaves_like 'a wrong decoding' end -end \ No newline at end of file +end diff --git a/spec/faraday/rack_builder_spec.rb b/spec/faraday/rack_builder_spec.rb index 915b61245..88ec2522f 100644 --- a/spec/faraday/rack_builder_spec.rb +++ b/spec/faraday/rack_builder_spec.rb @@ -193,4 +193,4 @@ class Broken < Faraday::Middleware end end end -end \ No newline at end of file +end diff --git a/spec/faraday/request/instrumentation_spec.rb b/spec/faraday/request/instrumentation_spec.rb index 4be668c1a..8e0d867f5 100644 --- a/spec/faraday/request/instrumentation_spec.rb +++ b/spec/faraday/request/instrumentation_spec.rb @@ -73,4 +73,4 @@ def instrument(name, env) it { expect(options.instrumenter).to eq(:custom) } end -end \ No newline at end of file +end diff --git a/spec/faraday/request/multipart_spec.rb b/spec/faraday/request/multipart_spec.rb index a9381ff12..fb023f0ea 100644 --- a/spec/faraday/request/multipart_spec.rb +++ b/spec/faraday/request/multipart_spec.rb @@ -55,4 +55,4 @@ let(:payload) { { :a => 1, :b => [{ :c => Faraday::UploadIO.new(__FILE__, 'text/x-ruby'), :d => 2 }] } } it_behaves_like 'a multipart request' end -end \ No newline at end of file +end diff --git a/spec/faraday/request/url_encoded_spec.rb b/spec/faraday/request/url_encoded_spec.rb index 150a26075..ab9b519c2 100644 --- a/spec/faraday/request/url_encoded_spec.rb +++ b/spec/faraday/request/url_encoded_spec.rb @@ -67,4 +67,4 @@ response = conn.post('/echo', {'a'=>{'b'=>{'c'=>['d']}}}) expect(response.body).to eq("a%5Bb%5D%5Bc%5D%5B%5D=d") end -end \ No newline at end of file +end diff --git a/spec/faraday/response/middleware_spec.rb b/spec/faraday/response/middleware_spec.rb index 7e7e20f29..e5b18f5fa 100644 --- a/spec/faraday/response/middleware_spec.rb +++ b/spec/faraday/response/middleware_spec.rb @@ -49,4 +49,4 @@ def parse(body) expect(conn.get('not_modified').body).to be_nil end end -end \ No newline at end of file +end diff --git a/spec/faraday/utils_spec.rb b/spec/faraday/utils_spec.rb index 0c8b9ec3e..d4ed6ab03 100644 --- a/spec/faraday/utils_spec.rb +++ b/spec/faraday/utils_spec.rb @@ -53,4 +53,4 @@ expect(headers).not_to have_key('authorization') end end -end \ No newline at end of file +end diff --git a/spec/faraday_spec.rb b/spec/faraday_spec.rb index c89aa780c..446fb3383 100644 --- a/spec/faraday_spec.rb +++ b/spec/faraday_spec.rb @@ -4,4 +4,4 @@ it 'has a version number' do expect(Faraday::VERSION).not_to be nil end -end \ No newline at end of file +end diff --git a/spec/support/fake_safe_buffer.rb b/spec/support/fake_safe_buffer.rb index 03cae6c9f..8801080e3 100644 --- a/spec/support/fake_safe_buffer.rb +++ b/spec/support/fake_safe_buffer.rb @@ -10,4 +10,4 @@ def gsub(regex) yield(match) } end -end \ No newline at end of file +end diff --git a/spec/support/helper_methods.rb b/spec/support/helper_methods.rb index 678a05e53..fa765c71a 100644 --- a/spec/support/helper_methods.rb +++ b/spec/support/helper_methods.rb @@ -96,4 +96,4 @@ def big_string (32..126).map{|i| i.chr}.cycle.take(50*kb).join end end -end \ No newline at end of file +end diff --git a/spec/support/shared_examples/params_encoder.rb b/spec/support/shared_examples/params_encoder.rb index f95d8f4c0..38c856799 100644 --- a/spec/support/shared_examples/params_encoder.rb +++ b/spec/support/shared_examples/params_encoder.rb @@ -15,4 +15,4 @@ it 'encodes nil' do expect(subject.encode('a' => nil)).to eq('a') end -end \ No newline at end of file +end diff --git a/spec/support/streaming_response_checker.rb b/spec/support/streaming_response_checker.rb index 3caa52363..b22980bc8 100644 --- a/spec/support/streaming_response_checker.rb +++ b/spec/support/streaming_response_checker.rb @@ -32,4 +32,4 @@ def check_streaming_response(streamed, options = {}) end end end -end \ No newline at end of file +end