Created
March 8, 2012 16:21
-
-
Save peterhellberg/2001873 to your computer and use it in GitHub Desktop.
Check if all the old blog posts has been transferred to athega.se
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "net/http" | |
remote_cmd = 'cat /tmp/2012-03-05-blogg.athega.se.sql | grep -E "^20../"' | |
slugs = `ssh athega.se #{remote_cmd}`.split("\n") | |
req = Net::HTTP.new('athega.se', 80) | |
slugs.each do |slug| | |
response = req.request_head("/blogg/#{slug}") | |
puts (response.code != "200") ? "Missing: #{slug}" : "OK: #{slug}" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment