Skip to content

Commit 8c2a947

Browse files
committed
Fix formatting issues
1 parent dcb8166 commit 8c2a947

3 files changed

Lines changed: 8 additions & 8 deletions

File tree

lib/super_good/csrf_protection.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ def call(env)
1515
raise(Error, "Invalid Sec-Fetch-Site header")
1616
end
1717

18-
@app.call(env)
18+
@app.call(env)
1919
end
2020

2121
private
@@ -24,4 +24,4 @@ def unsafe_request?(env)
2424
env["REQUEST_METHOD"] != "GET"
2525
end
2626
end
27-
end
27+
end

lib/super_good/csrf_protection/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ module SuperGood
44
class CSRFProtection
55
VERSION = "0.1.0"
66
end
7-
end
7+
end

spec/super_good/csrf_protection_spec.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# frozen_string_literal: true
2-
2+
33
RSpec.describe SuperGood::CSRFProtection do
44
subject { described_class.new(app) }
5-
let(:app) { proc { |env| [200, { "Content-Type" => "text/plain" }, ["OK"]] } }
5+
let(:app) { proc { |env| [200, {"Content-Type" => "text/plain"}, ["OK"]] } }
66
let(:get_env) { Rack::MockRequest.env_for("http://example.com:8080/", {:method => "GET", "HTTP_SEC_FETCH_SITE" => sec_fetch_site}) }
77
let(:post_env) { Rack::MockRequest.env_for("http://example.com:8080/", {:method => "POST", "HTTP_SEC_FETCH_SITE" => sec_fetch_site}) }
88

@@ -12,7 +12,7 @@
1212
it "raises an error for POST" do
1313
expect { subject.call(post_env) }.to raise_error(SuperGood::CSRFProtection::Error)
1414
end
15-
15+
1616
it "calls the app for GET" do
1717
expect(subject.call(get_env).first).to eq(200)
1818
end
@@ -24,9 +24,9 @@
2424
it "calls the app for POST" do
2525
expect(subject.call(post_env).first).to eq(200)
2626
end
27-
27+
2828
it "calls the app for GET" do
2929
expect(subject.call(get_env).first).to eq(200)
3030
end
3131
end
32-
end
32+
end

0 commit comments

Comments
 (0)