Module: Branchy

Defined in:
lib/branchy/branch.rb,
lib/branchy/cli.rb,
lib/branchy/version.rb,
lib/branchy/drivers/git.rb

Overview

A library for interacting with branched database. I.E. each of your feature branches may have its own database to keep schema changes seperated until each is merged into the mainline.

Supported SCMs:

  • git

Example:

-> Branchy.git.db('my_project_development')
-> "my_project_development_branch_name"

Example with optional branching enabled:

-> Branchy.git.db_if_enabled('my_project_development')
-> "my_project_development_branch_name"

Example with optional branching disabled:

-> Branchy.git.db_if_enabled('my_project_development')
-> "my_project_development"

To enable or disable branched databases in a branch, check out your branch and run:

$ branchy --enable|--disable

Defined Under Namespace

Modules: CLI, Drivers Classes: Branch

Constant Summary collapse

CommandFailed =

Exception for failed CLI commands

Class.new(RuntimeError)
VERSION =

The gem version

'0.6.0'.freeze

Class Method Summary collapse

Class Method Details

.gitObject

Returns a new Branchy object initialized for use with git



26
27
28
# File 'lib/branchy/branch.rb', line 26

def self.git
  Branch.new(Drivers::Git)
end