Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you create pre-release gems?

Tags:

ruby

rubygems

Can't seem to find docs on it, like what the gemspec should look like, etc.

like image 662
Travis Reeder Avatar asked Apr 11 '11 05:04

Travis Reeder


People also ask

How is Gemfile lock created?

When you first call bundle install, it will create this Gemfile. lock and uses this file in all subsequent calls to bundle install, which ensures that you have all the dependencies installed and will skip dependency installation.

What is a Gemspec file?

Developer file that specifies the attributes of a RubyGems . GEM package; saves information such as the author, a description, an example usage, and the usage license; saved in a simple plain text format.


2 Answers

Just add '.pre' to the version.

'pre' seems to be the convention but any text is fine, you just add any text characters to the version number and it's then considered a pre-release version.

gem.version = "1.0.0.pre"      # convention used by rubygems itself
gem.version = "1.0.0.beta"   
gem.version = "1.0.0.rc1"
gem.version = "1.0.0.bacon"

Reference: http://guides.rubygems.org/patterns/#prerelease-gems

like image 117
Evolve Avatar answered Sep 30 '22 16:09

Evolve


Any Gem whose version number contains a letter is a pre-release Gem.

like image 39
Jörg W Mittag Avatar answered Sep 30 '22 15:09

Jörg W Mittag