Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Guard gem overview

Guard gem overview

Quick presentation given by @thibaudgg & me at Geneva.rb on Apr 17, 2013.

Rémy Coutable

April 17, 2013
Tweet

Other Decks in Programming

Transcript

  1. Guard
    https://github.com/guard/guard
    Thibaud Guillaume-Gentil
    @thibaudgg
    Rémy Coutable
    @rymai
    1

    View Slide

  2. Origin
    • RSpactor
    • Scaling issues (RSpec, Spork, LiveReload)
    • WatchR
    • Duplicated logic
    2

    View Slide

  3. Strengths
    • Decentralized: Guard delegates all the work
    to its plugins
    • Everyone can write a Guard plugin
    https://github.com/guard/guard/wiki/Create-a-guard
    • Very simple Guard plugin API (9 methods)
    • Maintenance / Issues are handled by plugins
    authors
    3

    View Slide

  4. Some numbers
    • 2,000,000+ downloads since Oct 2, 2010
    • 1495 commits, ~13,000 LOC
    • 193 Guard plugins
    4

    View Slide

  5. File system listener
    • Originally handled by Guard
    • Moved out into the Listen gem
    • Slow & unreliable tests
    • Adapters vendored into Guard
    • Used by many projects: Sass, Spring,
    Kicker...
    5

    View Slide

  6. Notifications system
    • Support many adapters:
    • Growl
    • Libnotify
    • TMux...
    • Should probably be delegated /
    extracted
    6

    View Slide

  7. Project organization
    • We work:
    • Remotely
    • Asynchronously
    • We are very responsive
    • We are very open to new ideas
    Michael Kessler
    Maher Sallam
    Thibaud Guillaume-Gentil
    Rémy Coutable
    7

    View Slide

  8. Contributions
    • 91 commiters on Guard
    • 175 pull-requests on Guard
    • 1000 issues & pull-requests under the org.
    • Open commit bit policy (inspired by Rbx)
    8

    View Slide

  9. Project dependencies
    • Listen: File system listener
    • Thor: Command-line
    • Pry: IRB alternative
    • Lumberjack: Logging
    • Formatador: Stdout text formatting
    9

    View Slide

  10. Project ecosystem
    • Travis CI
    • Code Climate
    • Coveralls
    • Gemnasium
    • Fury.io
    10

    View Slide

  11. Project icon
    Octave Zangs
    @octavez
    Actually modelized in
    Cinema 4D!!
    11

    View Slide

  12. https://ruby-toolbox.com/projects/guard
    12

    View Slide

  13. We have some fun
    “Hello,
    I'd like Guard to notify me when my test suite
    passes or fails by controlling an arduino with an
    rgb led.
    Don't be turned off by my hipster interest in
    arduino.”
    https://groups.google.com/forum/#!msg/guard-dev/wz5zlLJUEQA/gji7B9FS1UAJ
    13

    View Slide

  14. Guard 2.0
    • 1.0.0 released on Jan 19, 2012
    • 2.0.0 released on Jun XX, 2013 soon!
    • Streamlined Guard API
    • Drop Ruby 1.8! Yay!
    • Website! Yay!
    14

    View Slide

  15. ?
    15

    View Slide