Reading documentation

This file and other guides are written using yard, best place to read docs is:

http://rubydoc.info/gems/rubycut-babushka/frames

About this repo

While using this gem, keep in mind:

Development status

This gem is not fully tested in realistic environment, although all the spec work.

babushka: test-driven sysadmin.

When you spend time researching something new, it's pretty easy to forget what you found, and have to re-research it again next time.

A lot of the tech jobs we do manually aren't challenging or fun, but they're finicky and have to be done just right. They're chores. Things that are important to do, but that are better automated than done manually by us people, right? After all, that's what is supposed to happen in the future. And the future is good, because in the future, we'll all have jetpants. So, onward.

The idea is this: you take a job that you'd rather not do manually, and describe it to babushka using its DSL. The way it works, babushka not only knows how to accomplish each part of the job, it also knows how to check if each part is already done. You're teaching babushka to achieve an end goal with whatever runtime conditions you throw at it, not just to perform the task that would get you there from the very start.

Beginner

Advanced

a runtime example

All that means that babushka isn't just blindly running a bunch of code to make things happen. Each step of the way, it's checking what should be done, and only doing the bits that aren't done already. (In babushka parlance, it's only meeting dependencies that aren't already met.)

If you already have TextMate installed, babushka notices and just installs the bundle.

Cucumber.tmbundle {
  TextMate.app {
    Found at /Applications/TextMate.app.
  } √ TextMate.app
  not already met.
  Cloning from https://github.com/bmabey/cucumber-tmbundle.git... done.
  Cucumber.tmbundle met.
} √ Cucumber.tmbundle

But if you don't have TextMate, that's an unmet dependency, so it gets pulled in too.

Cucumber.tmbundle {
  TextMate.app {
    not already met.
    Downloading http://download-b.macromates.com/TextMate_1.5.9.dmg... done.
    Attaching TextMate_1.5.9.dmg... done.
    Found TextMate.app in the DMG, copying to /Applications... done.
    Detaching TextMate_1.5.9.dmg... done.
    Found at /Applications/TextMate.app.
    TextMate.app met.
  } √ TextMate.app
  not already met.
  Cloning from https://github.com/bmabey/cucumber-tmbundle.git... done.
  Cucumber.tmbundle met.
} √ Cucumber.tmbundle

WARNING

A dep can run any code. Run deps of unknown origin at your own risk, and when choosing deps and dep sources, use the only real security there is: a network of trust.

Many deps will change your system irreversibly, which is kind of the whole point, but it has to be said anyway. Use caution and always have a backup.

acknowledgements

Fancypath, by Myles Byrne & Chris Lloyd. It's how I made the paths so fancy.

Levenshtein, for typo correction. Thanks to Paul Battley for letting me dual-license it under BSD.

Thanks to my rubyist friends who've helped with brainstorming and testing---the likes of @glenmaddern, @nathan_scott, @notahat, @quamen, @dgoodlad, @chrisberkhout, @pat, @brentsnook, @odaeus, @lachlanhardy, @aussiegeek, @bjeanes, @chendo, @ryanbigg & @drnic.

license

Babushka is licensed under the BSD license, except for the following exception:

lib/support/levenshtein.rb, which is licensed under the MIT license.

The BSD license can be found in full in the LICENSE file, and the MIT license at the top of lib/support/levenshtein.rb.