# Return an `Array` of the non-empty lines in `self`
#
- # assert ["a", "asdf", "", " ", " ", "b"].to_clean_lines == ["a", "asdf", "b"]
+ # assert ["a", "asdf", "", " ", " ", "b"].join("\n").to_clean_lines == ["a", "asdf", "b"]
fun to_clean_lines: Array[String]
do
var orig_lines = split_with("\n")
generate_email(beer_events)
# Save as sample email to file
- var f = new OFStream.open(sample_email_path)
+ var f = new FileWriter.open(sample_email_path)
f.write email_title + "\n"
for line in email_content do f.write line + "\n"
f.close
# Fetch the Web page at `url`
fun download_html_page: String
do
- var curl = new Curl
-
- var request = new CurlHTTPRequest(url, curl)
+ var request = new CurlHTTPRequest(url)
var response = request.execute
if response isa CurlResponseSuccess then
var body = response.body_str
- curl.destroy
return body
else if response isa CurlResponseFailed then
print "Failed downloading URL '{url}' with: {response.error_msg} ({response.error_code})"
end
var ben = new Benitlux("sherbrooke")
-ben.run(opts.send_emails.value or else false)
+ben.run(opts.send_emails.value)
# The parsing logic for the wellington locaiton is active (to gather data)
# but the web interface do not allow to subscribe to its mailing list.
#
# TODO revamp mailing list Web interface
ben = new Benitlux("wellington")
-ben.run(opts.send_emails.value or else false)
+ben.run(opts.send_emails.value)