From 76e1816d3feb711712c61b45ded8e7e35f4936f1 Mon Sep 17 00:00:00 2001 From: Andrew Tomaka Date: Tue, 8 Nov 2016 22:42:53 -0500 Subject: [PATCH] Use code blocks in README --- README.md | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 17cc804..099859a 100644 --- a/README.md +++ b/README.md @@ -4,24 +4,30 @@ Text alerting on a website content change * web request +``` require 'net/http' uri = URI('https://github.com/chrisvfritz') content = Net::HTTP.get(uri) +``` * parse content +``` require 'nokogiri' parsed = Nokogiri::HTML(content) -chris\_face = parse.css('.avatar').attr('src').value +chris_face = parse.css('.avatar').attr('src').value +``` * ??? (process) * send text +``` require 'twilio-ruby' -client = Twilio::REST::Client.new(account\_sid, auth\_token) +client = Twilio::REST::Client.new(account_sid, auth_token) client.messages.create( - from: from\_number, - to: notification\_number, + from: from_number, + to: notification_number, body: 'Repos changed' ) +```