Captain's Log: 2013.08.15
- Pizza! Sodapop! courtesy of Captain Kurt, our prize for making all of our tests pass on 8/1/2013
- Added pessimistic version numbers for all of the gems in gemspec
- Find current version number with
gem list -r <gemname>
- Add latest version number excluding the last decimal number:
spec.add_runtime_dependency "<gemname>", "~>, x.x"
- Continued working on adding Open Graph support
- Switched from opengraph to opengraph_parser
- opengraph's Nokogiri version dependency hasn't been updated in a while, so it breaks our code
- opengraph_parser has bad version dependencies generally, but would still rather use that
- Moved duplicated code from oneboxes to new
Engine
module
- All oneboxes include
Engine
--> share methods- Onebox engines now only need to define their own
extracted_data()
function- Handlebars templates must follow name pattern
def template_name
self.class.name.split("::").last.downcase
end
- Created new function
read()
inEngine
to open url
- Will eventually use eithr Nokogiri or opengraph_parser depending on website
- Refactored Engine spec
- Cleaned up onebox specs, used
let:
to handle repetitive tasks- Created a few more merge conflicts while we were both editing gemspec
- Cleaned them up ourselves like we learned on Tuesday
Captain's Log: 2013.08.14
- Dealt w/ a LOT of merge conflicts
- We had pull requested a few onebox branches before we refactored
- Qik
- Wikipedia
- StackExchange
- Renamespaced oneboxes to
Engine
module instead ofPreview
class- Cleaned up local and remote branches in
dysania/onebox
- Started looking at VerbalExpressions
- Learned about the difference between
include
andextend
re: singleton class methods- For sites that support OpenGraph, we decided we'll be using the opengraph gem
- markijbema asked about why we created Matcher object (issue #43)
- He thought it made sense that we keep url matching code close to onebox conversion code since it would define which urls we support
- We created
Matcher
object becausePreview
should only have to worry about onebox conversion and not how to find the correct onebox- Discussed our lightning talk for next week
- Semantic versioning
- Ruby's pessimistic operator
- Our experience so far extracting feature as a gem (the meetup's theme is gems)
- HOMEWORK:
- Add
require opengraph
in gemfile, commit in new branch for issue #44
- Add
Captain's Log: 2013.08.13
- created
Matcher
class
- TDD
Engine
module to be included by oneboxes- refactor
preview
, move url matching functionality toMatcher.oneboxed
- JZ added new oneboxes
- Qik
- StackExchange
- Captain Kurt helped add test for Qik video embedding and make spec DRYer
- we don't know how to grab video embed code yet
- still undecided on how to display videos in regards to autoplay
- embed or linked thumbnail ?
- learned about Null Object
- learned how to autoclose issues with a commit message!
git commit -m "Fixes #[issue number]"
- unable to merge
wikipedia-onebox
branch due to conflicts with master
- learned how to deal with conflicts
git pull --rebase origin master
fix conflicts
git add .
git rebase --continue
git push -f origin wikipedia-onebox
- How to make a good pull request via Robin and Jeff:
Now *this* is how you make a good pull request: https://t.co/WWKEI0OAok
— Robin Ward (@evil_trout) August 14, 2013
Look at this pull request.. LOOK AT IT https://t.co/CzA91l6oQw
— Jeff Atwood (@codinghorror) August 13, 2013
- HOMEWORK:
- refactor tests so more DRY
- Read up on:
- VerbalExpressions for Ruby
parse_open_graph