* start link validation check * keep PRs small * rearrange check flow * need a change to switch accounts * Rescue from SocketError to surface a better error message * some updates * handle 301s * address Travis failures * implement request stub * add needed unified-embed tag spec * add needed unified-embed tag spec * nudge Travis * Address PR review comments * special-case displaying "base" * undo change to errors.add * nudge Travis * more succinct code Co-authored-by: aritmock <aritmock@example.com> Co-authored-by: Dwight Scott <dwight@forem.com>
11 lines
269 B
Ruby
11 lines
269 B
Ruby
module EmbedsHelpers
|
|
def stub_request_head(url, status_code = 200)
|
|
stub_request(:head, url)
|
|
.with(
|
|
headers: {
|
|
Accept: "*/*",
|
|
"User-Agent": "Ruby"
|
|
},
|
|
).to_return(status: status_code, body: "", headers: {})
|
|
end
|
|
end
|