Vorx

Vorx let you manage multiple git repositories with ruby code!

Installation

Add this line to your application's Gemfile:

gem 'vorx'

And then execute:

$ bundle install

Or install it yourself as:

$ gem install vorx

Usage

  require 'vorx'

  store = Vorx::Store.new

  store.fetch('catks/docker-ruby') # Git clone or git fetch and pull https://github.com/catks/docker-ruby on master branch

  store.fetch('catks/docker-ruby:1.0.0') # Git clone or git fetch and pull https://github.com/catks/docker-ruby on 1.0.0

  store.fetch('github:catks/docker-ruby:1.0.0') # Git clone or git fetch and pull https://github.com/catks/docker-ruby on version 1.0.0

  store.fetch('bitbucket:catks/docker-ruby') # Git clone or git fetch and pull https://bitbucket.org/catks/docker-ruby on master branch

  store.fetch('gitlab:catks/docker-ruby') # Git clone or git fetch and pull https://gitlab.com/catks/docker-ruby on master branch

  # You can customize the folder to clone the repositories (default to ~/vorx/store), the store file (default to vorx_store.yml) and the stderr

  stderr_output = StringIO.new
  store = Vorx::Store.new('~/my_repos', store_file: 'my_store.yml', stderr: stderr_output)

  store.add('catks/docker-ruby') # Adds git repository reference but not clone
  store.add('catks/docker-go') # Adds git repository reference but not clone

  store.fetch_all # Clone ou Update every repository

  store.delete('catks/docker-ruby') # Delete git repository reference and folder if cloned

  store.delete_all # Deletes all git repositories references and folders

  # Repository Prefix

  store = Vorx::Store.new(repository_prefix: 'vorx-')

  store.fetch('catks/docker-ruby') # Git clone or git fetch and pull https://github.com/catks/vorx-docker-ruby on master branch

Development

After checking out the repo, run bin/setup to install dependencies. Then, run rake spec to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and tags, and push the .gem file to rubygems.org.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/vorx.

License

The gem is available as open source under the terms of the MIT License.