Lolcommits Lolsrv

Gem Version Travis Build Status Test Coverage Code Climate Gem Dependency Status

lolcommits takes a snapshot with your webcam every time you git commit code, and archives a lolcat style image with it. Git blame has never been so much fun!

This plugin syncs lolcommits to a remote server. After enabling, your next lolcommit will be uploaded, along with all existing lolcommits images that you've already captured. Syncing is then performed after each commit, only uploading images that have not already been synced.

You configure the plugin by setting the base url of the remote server. The server must respond to these requests.

POST /uplol

These params are submitted as multipart/form-data.

  • lol - captured lolcommit image file
  • url - remote repository URL (with commit SHA appended)
  • repo - repository name e.g. mroth/lolcommits
  • date - UTC date time for the commit (ISO8601)
  • sha - commit SHA

GET /lols

Should return a JSON array of all lolcommits already synced. The commit sha is the only required JSON attribute (used to identify the already synced image).

Requirements

Installation

After installing the lolcommits gem, install this plugin with:

$ gem install lolcommits-lolsrv

Then configure to enable it and set the server url:

$ lolcommits --config -p lolsrv
# set enabled to `true`
# set the server base url (must begin with http(s)://)

That's it! Provided the endpoints are responding correctly, your lolcommits will be synced to the remote server. To disable use:

$ lolcommits --config -p lolsrv
# and set enabled to `false`

Development

Check out this repo and run bin/setup, this will install all dependencies and generate docs. Run bundle exec rake to run all tests and generate a coverage report.

You can also run bin/console for an interactive prompt that will allow you to experiment with the gem code.

Tests

MiniTest is used for testing. Run the test suite with:

$ rake test

Docs

Generate docs for this gem with:

$ rake rdoc

Troubles?

If you think something is broken or missing, please raise a new issue. Take a moment to check it hasn't been raised in the past (and possibly closed).

Contributing

Bug reports and pull requests are welcome on GitHub.

When submitting pull requests, remember to add tests covering any new behaviour, and ensure all tests are passing on Travis CI. Read the contributing guidelines for more details.

This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct. See here for more details.

License

The gem is available as open source under the terms of LGPL-3.

Links