2

I'm developing a new gem (fork of nifty-generators).

Right now my "deployment" consists on the following:

  1. I make changes on the gem's source code
  2. I commit to github
  3. I update the gemspec lower numer (i.e. go from 0.1.1 to 0.1.2)
  4. Build the gem and push it to gemcutter (gem build, gem push)
  5. Install the new gem (sudo gem install mygem)
  6. Then y try the new gem.

I'm sure there must be a more correct way of doing things. Right now, I'm uploading to gemcutter so that I can test my gem.. and that doesn't feel right.

What is the best way to "test your gem before uploading to gemcutter"?

kikito
  • 51,734
  • 32
  • 149
  • 189

3 Answers3

4

Once you have your gemspec, you can run gem build yourgem.gemspec. That will produce a .gem file for you to install....try the following commands out to verify it:

gem install --local gem spec gem unpack

You have to push a built gem to RubyGems.org anyway, so you're pretty much there :)

qrush
  • 1,003
  • 10
  • 11
1

if you're using jeweler, try this

rake install

(rake --tasks will tell you more)

stephenmurdoch
  • 34,024
  • 29
  • 114
  • 189
0

launch all test unit or rspec test.

You can try in our project after install it on your system.

shingara
  • 46,608
  • 11
  • 99
  • 105
  • mm sorry but automated testing doesn't help much on this case - for example, I've updated a css file used by the gem. Tests validate, as before. I just want to "try that new css" on my system before creating a new gem. Can you clarify what you mean by "try in our project after install it on your system"? – kikito Mar 23 '10 at 17:12