Skip to content

Commit

Permalink
RuboCop: Lint with automatic fixing
Browse files Browse the repository at this point in the history
  • Loading branch information
olleolleolle authored and ioquatix committed May 25, 2020
1 parent e43d2ba commit 4db9d29
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ end
task :external do
Bundler.with_clean_env do
clone_and_test("https://github.com/kickstarter/rack-attack", "rack-attack", "bundle exec rake")
clone_and_test("https://github.com/rtomayko/rack-cache", "rack-cache","bundle exec rake")
clone_and_test("https://github.com/rtomayko/rack-cache", "rack-cache", "bundle exec rake")
clone_and_test("https://github.com/socketry/falcon", "falcon", "bundle exec rspec")
end
end
2 changes: 1 addition & 1 deletion lib/rack/handler/cgi.rb
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def self.send_body(body)
}
end
end

register 'cgi', 'Rack::Handler::CGI'
end
end
2 changes: 1 addition & 1 deletion lib/rack/mock.rb
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ def identify_cookie_attributes(cookie_filling)
cookie_attributes.store('value', cookie_bits[0].strip)
cookie_bits.drop(1).each do |bit|
if bit.include? '='
cookie_attribute, attribute_value = bit.split('=',2)
cookie_attribute, attribute_value = bit.split('=', 2)
cookie_attributes.store(cookie_attribute.strip, attribute_value.strip)
if cookie_attribute.include? 'max-age'
cookie_attributes.store('expires', Time.now + attribute_value.strip.to_i)
Expand Down
2 changes: 1 addition & 1 deletion test/spec_mock.rb
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@
end

it "parses cookie headers with equals sign at the end" do
res = Rack::MockRequest.new(->(env) { [200, {"Set-Cookie" => "__cf_bm=_somebase64encodedstringwithequalsatthened=; array=awesome"}, [""]] }).get("")
res = Rack::MockRequest.new(->(env) { [200, { "Set-Cookie" => "__cf_bm=_somebase64encodedstringwithequalsatthened=; array=awesome" }, [""]] }).get("")
cookie = res.cookie("__cf_bm")
cookie.value[0].must_equal "_somebase64encodedstringwithequalsatthened="
end
Expand Down

0 comments on commit 4db9d29

Please sign in to comment.