Category:Video game levels
Category:Steve Meretzky games
Category:1984 video games#!/usr/bin/env ruby
require 'rubygems'
require 'fileutils'
require 'net/http'
require'rest-client'
def test_date
orig = IO.readlines(Dir.getwd + "/test/examples/fixtures/http_date.xml").map(&:chomp)
if orig[0] == "#"
orig.shift
File.open("test/examples/fixtures/http_date.xml", "r").close
end
data = []
File.open("test/examples/fixtures/http_date.xml", "r").each do |line|
line.chomp!
data ")[1].split(">")[0]
end
data.sort!
data.join("
")
end
def test_url
orig = IO.readlines(Dir.getwd + "/test/examples/fixtures/http_url.xml").map(&:chomp)
if orig[0] == "#"
orig.shift
File.open("test/examples/fixtures/http_url.xml", "r").close
end
data = []
File.open("test/examples/fixtures/http_url.xml", "r").each do |line|
line.chomp!
data ")[1].split(">")[0]
end
data.sort!
data.join("
")
end
def http_get(uri)
options = {
:uri => uri,
:headers => {
"Content-Type" => "text/xml",
"Date" => Time.now.to_s
}
}
res = RestClient::Request.execute(method: :get, options)
return res
end
puts "Fetching date data be359ba680
Related links:
Comments