A version control system api supporting almost any versioning system
Ruby
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
bin
lib
spec
.gitignore
CHANGELOG.rdoc
LICENSE
README.textile
Rakefile
versioning.gemspec

README.textile

Versioning System

A gem for handling the various version control systems:

  • git
  • subversion
  • mercurial
  • bazaar

Examples of how you can use this gem, programmatically:

Simple init, add and commits


  Versioning::System.hg :init
  
  Versioning::System.hg :init, :add, :commit => "-m 'First commit'"
  
  Versioning::System.git :init, :add => '.', :commit => "-m 'First commit'"
  
  Versioning::System.svn :add => "twofile.rb", :commit => "-m 'First Subversion commit'"
  
  Versioning::System.bzr :commit => "-m 'First Bazaar commit'"

Doing the same basic funtions but with creating the dot ignore file.


  Versioning::System.hg(:init, :add, :commit => "-m 'First Commit'") do
    ignore_file <<-IGNORE
       syntax: glob

       .DS_Store
       config/database.yml
       *.log
       *.pid
       tmp/**/*
       coverage/*

    IGNORE
  end
  
  Versioning::System.git(:init, :add => '.', :commit => "-m 'First Commit'") do
    ignore_file
  end