Agenda

  1. Demo

What are we going to create?

We are creating utility to unfurl links from webpages with ability to extend with custom logic.

  1. Init app

https://crystal-lang.org/docs/installation/ https://crystal-lang.org/docs/ https://crystal-lang.org/api/0.25.1/

Tools:

http://crystalshards.xyz/ https://github.com/veelenga/awesome-crystal https://github.com/crystal-community/icr

  1. Code structure
  1. Configure guardian:

https://github.com/f/guardian

  1. Ruby diff

https://docs.google.com/presentation/d/1XeIRwl1Y9IUAxsFdmUmRjpLl1CrIzRgFo5wdWJrsYTc

  1. Design the lib/app

classes:

Usage:

link = Unfurl::Link.new(uri)
link.unfurl

Configuration:

Resolver:

Unfurling:

FOR EACH resolver:
    IF resolver matches uri THEN
        resolve uri
        IF result IS NIL THEN
            return NOT_FOUND, "message"
        ELSE
            return OK, "url"

WHEN no resolvers found:
    return ERROR, "message"
  1. Refactor

Unfurling:

  1. Extras https://github.com/luckyframework/habitat https://github.com/crystal-community/cossack https://github.com/waterlink/spec2.cr https://github.com/waterlink/mocks.cr