Piku’s Blog

February 4, 2008

Installing rspec with Braid [Updated]

Filed under: Git, Ruby on Rails — Tags: , , , , , , , , , — Piku @ 7:08 pm

See my Braid 0.4 post for informations about how to upgrade.

Updated to work with the latest version (0.3.1)

Braid is a tool made by Cristi Balan and is a simple tool to help track vendor branches across different SCMs.

It was originally named giston, and was providing functionality similar to piston for git. Braid, however, will work with most SCMs as both source and host.

Warning, Braid is still under development and may change in the future.

To start you need to get and install, on a linux like my ubuntu you can do it by writing:

mihai@mihai-laptop:~$ sudo gem install main open4
mihai@mihai-laptop:~$ git clone git://github.com/evilchelu/braid.git braid
mihai@mihai-laptop:~$ cd braid
mihai@mihai-laptop:~$ sudo ruby setup.rb

For this example I will use it to install rspec (the development version) on a Rails project. Go to your project root and type:

mihai@mihai-laptop:~/Web/piku$ git config --global mirror.summary true
mihai@mihai-laptop:~/Web/piku$ braid add http://rspec.rubyforge.org/svn/trunk/rspec --type svn vendor/plugins/rspec
braid: Creating work branch 'braid/track'
braid: Checking out work branch 'braid/track'.
braid: Adding svn mirror from 'http://rspec.rubyforge.org/svn/trunk/rspec' into 'vendor/plugins/rspec' using local branch 'master'.
braid: Setting up remote branch and fetching data
mihai@mihai-laptop:~/Web/piku$ git merge braid/track

You do the same to install rspec_on_rails:

mihai@mihai-laptop:~/Web/piku$ braid add http://rspec.rubyforge.org/svn/trunk/rspec_on_rails --type svn vendor/plugins/rspec_on_rails
braid: Creating work branch 'braid/track'
braid: Checking out work branch 'braid/track'.
braid: Adding svn mirror from 'http://rspec.rubyforge.org/svn/trunk/rspec_on_rails' into 'vendor/plugins/rspec_on_rails' using local branch 'master'.
braid: Setting up remote branch and fetching data
mihai@mihai-laptop:~/Web/piku$ git merge braid/track

That installed rspec, now just type

mihai@mihai-laptop:~/Web/piku$ ruby script/generate rspec

and you are ready to spec. Have fun testing and using git.

To update to the latest version your plugins just type

mihai@kodo:~/Web/piku$ braid update

and to update just rspec use

mihai@kodo:~/Web/piku$ braid update vendor/plugins/rspec

Braid stores the meta information in a file called .braids

mihai@kodo:~/Web/piku$ cat .braids
---
vendor/plugins/rspec:
local_branch: braid/svn/vendor/plugins/rspec
type: svn
branch: master
remote: http://rspec.rubyforge.org/svn/trunk/rspec
vendor/plugins/rspec_on_rails:
local_branch: braid/svn/vendor/plugins/rspec-on-rails
type: svn
branch: master
remote: http://rspec.rubyforge.org/svn/trunk/rspec_on_rails

Reddit itSave it to del.icio.us

Get Organized and Collaborate

About these ads

12 Comments »

  1. What`s your OS and devel machine ?

    Comment by Bogdan Gaza — February 4, 2008 @ 10:48 pm

  2. I’m using Ubuntu Gutsy on a Fujitsu Siemens S7110 laptop.

    Comment by Piku — February 4, 2008 @ 11:00 pm

  3. Hey,

    Just a quick note.

    This article was written for an unreleased version of braid, which changed substantially since then. There is a “Usage” section in the braid. Please use that as a reference until Piku has the time to upgrade this page.

    Sorry for the confusion!
    Cristi, braid author

    Comment by Cristi Balan — February 14, 2008 @ 11:21 am

  4. [...] About ← Installing rspec with Braid [Updated] [...]

    Pingback by Braid updated to 0.3 « Piku’s Blog — February 14, 2008 @ 4:45 pm

  5. [...] Installing rspec with Braid (Giston) [...]

    Pingback by Rails Podcast Brasil - Episdio 5 — February 14, 2008 @ 5:50 pm

  6. Salutare.

    Dacă te interesează o invitaţie la Github, page me.

    Comment by Andrei — February 27, 2008 @ 11:39 am

  7. Am primit, multumesc.

    Comment by Piku — February 27, 2008 @ 11:54 am

  8. If you’re using OSX Leopard and ports, make sure you have git-core +svn installed, or you might get an error like this:

    braid: Error occured:
    braid: Resetting braid/track to e06ed8f63c23c2b751e62bcb19e29c6551f752a6.
    braid: Checking out branch ‘master’.
    braid: An exception has occured: ()

    Comment by Nick Poulden — March 6, 2008 @ 1:47 pm

  9. [...] Braid – here’s a braid with rspec tutorial [...]

    Pingback by Shane Sveller » Blog Archive » All kinds of new stuff — March 28, 2008 @ 8:24 pm

  10. @Nick Poulden,

    I’m getting that error (The exception is “fatal: file ‘vendor/plugins/rspec’ already exists”) but I *do* have git-core +svn installed. What then?

    Comment by Dave Myron — April 23, 2008 @ 7:47 am

  11. [...] May 1, 2008 · No Comments Braid 0.4 has been released, Braid is a simple tool to help track git and svn vendor branches in a git repository. I had a previous coverage of Braid 0.3. [...]

    Pingback by Braid 0.4 « Piku’s Blog — May 1, 2008 @ 2:10 pm

  12. [...] Braid – here’s a braid with rspec tutorial [...]

    Pingback by All kinds of new stuff « Shane Sveller — November 17, 2009 @ 5:39 am


RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

The Shocking Blue Green Theme. Create a free website or blog at WordPress.com.

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: