Skip to content

Commit

Permalink
Updated the README with a use case
Browse files Browse the repository at this point in the history
I wrote up the use-case to describe why I wrote Mergit to
[reddit](http://redd.it/1cpq9k) and thought it might be
useful here.

I also added a note explaining that it works great with `gzexe`.
  • Loading branch information
docwhat committed Apr 21, 2013
1 parent ebef913 commit 9bf068f
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions README.md
Expand Up @@ -15,6 +15,38 @@ Some use cases include:
* Simple tools
* Programs that need to work on any ruby without installing gems

## My original use case

When I wrote the original mergit, my goal was to distribute development/build
scripts to a variety of systems.

These scripts had the following requirements:

1. The scripts needed to be easy to install.
* Our developers hadn't had experience with Ruby yet. This is before ruby
1.9.2 was released!
* We didn't have an in-house RPM server (which wouldn't help our Windows
systems anyway).
2. The scripts needed minimal or no requirements.
* Bundler and RVM were new and a pain to automatically install.
* Not all systems had the (easy) root access needed to install required
gems or build tools.
* All the CentOS systems had Ruby (>= 1.8.7 by default)
* All the Windows systems could easily get a version of Ruby (a quirk of
our development/build environment).
* We had a mechanism to get a reasonably current ruby for Solaris.
3. The scripts needed to work on Windows, Solaris, and CentOS.
4. I wanted to write the scripts with the best practices; unit tests,
one-class-per-file, SOLID design.
* I needed the scripts to work reliably, so I needed good tests.
* It was easier to work on if we followed SOLID design principles.

The scripts I wrote in the end could be installed on any development or build
system via a simple `curl` and only required *any* working ruby of version
1.8.7 or greater.

This was possible because all the `.rb` files were merged into single files, including the one gem I needed (the pure ruby `minitar`).

## Limitations

Mergit uses simple text processing, therefore it can be tripped up. Some known problems include:
Expand Down Expand Up @@ -83,6 +115,10 @@ Simple usage:

For more detailed information, see the [documentation](http://rubydoc.info/gems/mergit/frames).

## Additional Notes

To use up less space, you can compress the resulting script with `gzexe`.

## Contributing

### Level 1 -- Apprentice
Expand Down

0 comments on commit 9bf068f

Please sign in to comment.