Skip to content

Commit be81aa0

Browse files
committed
RuboCop: Style/TrailingCommaInHashLiteral
1 parent 272291c commit be81aa0

File tree

6 files changed

+21
-21
lines changed

6 files changed

+21
-21
lines changed

lib/webmention/client.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ def request_options_for(target)
136136
opts = {
137137
source: source_url,
138138
target: target,
139-
vouch: vouch_url
139+
vouch: vouch_url,
140140
}
141141

142142
opts.transform_values! { |value| value.to_s.strip }

lib/webmention/parsers/html_parser.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class HtmlParser < Parser
1414
"href" => %w[a area],
1515
"poster" => %w[video],
1616
"src" => %w[audio embed img source track video],
17-
"srcset" => %w[img source]
17+
"srcset" => %w[img source],
1818
}.freeze
1919

2020
CSS_SELECTORS_ARRAY = HTML_ATTRIBUTES_MAP.flat_map do |attribute, names|

lib/webmention/request.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,16 @@ class Request
66
# @see https://www.w3.org/TR/webmention/#limits-on-get-requests
77
HTTP_CLIENT_OPTS = {
88
follow: {
9-
max_hops: 20
9+
max_hops: 20,
1010
},
1111
headers: {
1212
accept: "*/*",
13-
user_agent: "Webmention Client (https://rubygems.org/gems/webmention)"
13+
user_agent: "Webmention Client (https://rubygems.org/gems/webmention)",
1414
},
1515
timeout_options: {
1616
connect_timeout: 5,
17-
read_timeout: 5
18-
}
17+
read_timeout: 5,
18+
},
1919
}.freeze
2020

2121
private_constant :HTTP_CLIENT_OPTS

spec/lib/webmention_mentioned_urls_spec.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
before do
2020
stub_request(:get, source_url).to_return(
2121
headers: {
22-
"Content-Type": "foo/bar"
22+
"Content-Type": "foo/bar",
2323
}
2424
)
2525
end
@@ -34,7 +34,7 @@
3434
stub_request(:get, source_url).to_return(
3535
body: load_fixture(:sample_post_no_links),
3636
headers: {
37-
"Content-Type": "text/html"
37+
"Content-Type": "text/html",
3838
}
3939
)
4040
end
@@ -58,7 +58,7 @@
5858
stub_request(:get, source_url).to_return(
5959
body: load_fixture(:sample_post),
6060
headers: {
61-
"Content-Type": "text/html"
61+
"Content-Type": "text/html",
6262
}
6363
)
6464
end
@@ -79,7 +79,7 @@
7979
stub_request(:get, source_url).to_return(
8080
body: load_fixture(:sample_post_anchors_only),
8181
headers: {
82-
"Content-Type": "text/html"
82+
"Content-Type": "text/html",
8383
}
8484
)
8585
end

spec/lib/webmention_send_webmention_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
before do
4343
stub_request(:get, target_url).to_return(
4444
headers: {
45-
Link: %(<#{webmention_endpoint}>; rel="webmention")
45+
Link: %(<#{webmention_endpoint}>; rel="webmention"),
4646
}
4747
)
4848

spec/lib/webmention_verify_webmention_spec.rb

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@
1212
{
1313
source_mentions_target?: false,
1414
verified?: false,
15-
verify_vouch?: false
15+
verify_vouch?: false,
1616
}
1717
end
1818

1919
before do
2020
stub_request(:get, source_url).to_return(
2121
body: load_fixture(:sample_post_no_links),
2222
headers: {
23-
"Content-Type": "text/html"
23+
"Content-Type": "text/html",
2424
}
2525
)
2626
end
@@ -34,15 +34,15 @@
3434
{
3535
source_mentions_target?: true,
3636
verified?: true,
37-
verify_vouch?: false
37+
verify_vouch?: false,
3838
}
3939
end
4040

4141
before do
4242
stub_request(:get, source_url).to_return(
4343
body: %({"url":"#{target_url}"}),
4444
headers: {
45-
"Content-Type": "application/json"
45+
"Content-Type": "application/json",
4646
}
4747
)
4848
end
@@ -59,22 +59,22 @@
5959
source_mentions_target?: true,
6060
verified?: false,
6161
verify_vouch?: true,
62-
vouch_mentions_source?: false
62+
vouch_mentions_source?: false,
6363
}
6464
end
6565

6666
before do
6767
stub_request(:get, source_url).to_return(
6868
body: load_fixture(:sample_post_anchors_only),
6969
headers: {
70-
"Content-Type": "text/html"
70+
"Content-Type": "text/html",
7171
}
7272
)
7373

7474
stub_request(:get, vouch_url).to_return(
7575
body: load_fixture(:sample_post_no_links),
7676
headers: {
77-
"Content-Type": "text/html"
77+
"Content-Type": "text/html",
7878
}
7979
)
8080
end
@@ -91,22 +91,22 @@
9191
source_mentions_target?: true,
9292
verified?: true,
9393
verify_vouch?: true,
94-
vouch_mentions_source?: true
94+
vouch_mentions_source?: true,
9595
}
9696
end
9797

9898
before do
9999
stub_request(:get, source_url).to_return(
100100
body: load_fixture(:sample_post_anchors_only),
101101
headers: {
102-
"Content-Type": "text/html"
102+
"Content-Type": "text/html",
103103
}
104104
)
105105

106106
stub_request(:get, vouch_url).to_return(
107107
body: "I vouch for:\n\nhttps://jgarber.example\nhttps://adactio.example",
108108
headers: {
109-
"Content-Type": "text/plain"
109+
"Content-Type": "text/plain",
110110
}
111111
)
112112
end

0 commit comments

Comments
 (0)