Captain's Log: 2013.08.05
- Continued editing Preview, Example, and Amazon specs on
preview-refactor
branch
- edited Preview spec to use Example fixture and fakeweb
- we want the spec to not request a website, and to use our fixture
- we need to ask why is this important? Don't we want tests to fail once an actual website changes?
- created
response()
function in html spec helper for less repetitive code in specs- used
let()
to do lazy assignments
- ex:
let(:link) { "http://example.com" }
- finished creating and passing all tests for Amazon
- First spec finished with least amount of input from Captain Kurt yet!
- JZ: write tests
- Vyki: make tests pass
- learned more about Nokogiri, used
.first["src"]
to get src attribute for product image
- First pull request from Robin
- tiny change to keep us up-to-date with discourse/discourse
- oneboxer changes to discourse/discourse being redirected our way
- New recommended resources
- Bitcast.io - Captain Kurt suggested we use it for learning by creating our own screencasts on top of watching existing screencasts
- Rails 4 In Action - Book, check out the early access edition
- HOMEWORK: Listen to more RubyRogues, checkout Ruby Tapas
Meet @jzeta & @toastergrrl from Team Dysania! They are developers by night AND can make balloon arches:http://t.co/6cdokfAiN7 #teamoftheweek
— Rails Girls SoC (@RailsGirlsSoC) August 5, 2013
Captain's Log: 2013.08.01
- Skipped Ruby study group for this week, but will attend next week's LA Ruby/Rails August meetup
- Created fixtures for all the rest of the oneboxes
- Took up most of our session since oneboxer currently supports 30+ sites
- Certain sites (i.e. Hulu, Google Play) kept making
curl
hang for some reason- Now we'll focus on creating specs specific to each onebox
- Started to clean up fixtures but still need to finish
- According to
whitelist.rb
if a site supports OpenGraph then it is already supported by oneboxer -- will have to keep that in mind when making tests- Captain Kurt's challenge: if we make the 1st failing test from yesterday (out of 2) pass, he'll get us pizza during the next session
- Used Nokogiri's
inner_text()
method to get just text of extracted data, without HTML tags --> CHALLENGE COMPLETED- Also made 2nd test pass technically...by commenting it out for now (bad test that we'll need to rewrite)
- Monday will be Pizza Day! Or hopefully perhaps something healthier
- First tiny code review from mentor Robin
- Mostly positive, asked for reasoning behind using
require_relative
andadd_onebox
manually for each onebox instead of just including the whole onebox directory- We replied that we figured it would be easier to understand and would reduce security risk
- Planning on registering discourse-oneboxer gem to RubyGems.org on Monday
- Captain Kurt joked that he would register it himself tomorrow without us (we don't meet on Fridays)
- We were not amused
- Worked on RGSoC introduction blog post
- Forked summer-of-code repo, created new branch
- Converted approved rough draft to Markdown
- Will submit pull request by Monday
- Captain Kurt suggested creating Ruby wrapper in future for Apsis game engine by @wilkieii
Captain's Log: 2013.07.31
- Still working on
preview-refactor
branch- TDD:
- JZ: making tests pass
- Vyki: created tests that failed
- Added
amazon
spec- Created fixtures for
amazon
andexample
- Made
preview
andamazon
specs pass- Learned how to get contents of url in bash using curl
curl --output spec/fixtures/amazon.response -L -X GET http://amzn.com/193609620X
- how we will create fixtures for all oneboxes
- Vyki bought The Well-Grounded Rubyist from Lili's recommendation
- JZ didn't die from Day 2 of bike commuting and was reunited with her lost keys
- Gave status update to our RGSoC supervisor Benedikt
- Sent in our introduction blog post to RGSoC organizers for review -- to be published Monday!
- HOMEWORK (Vyki): Clean up Amazon response (remove CSS and whitespace)
- HOMEWORK (JZ): Create fixture for
example
, pick another onebox to refactor and capture response for it