Skip to content
This repository has been archived by the owner on Apr 14, 2021. It is now read-only.

Commit

Permalink
First gem version 0.0.1 instead of 0.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
indirect committed Aug 15, 2010
1 parent e7ac2ab commit 2bb1e80
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/bundler/templates/newgem/lib/newgem/version.rb.tt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<%- config[:constant_array].each_with_index do |c,i| -%>
<%= ' '*i %>module <%= c %>
<%- end -%>
<%= ' '*config[:constant_array].size %>VERSION = "0.0.0"
<%= ' '*config[:constant_array].size %>VERSION = "0.0.1"

This comment has been minimized.

Copy link
@jodysalt

jodysalt May 15, 2012

If bundler is using semantic versioning (i.e. http://semver.org/), shouldn't the first release be 0.1.0?

Here is my rational:

If versions are in the form A.B.C where

  • A = non backwards compatible features
  • B = backwards compatible features
  • C = fixes and implementation changes

Therefore:

  • 0.0.0 would mean "no features of any kind", where as
  • 0.0.1 would mean "a bug fix or implementation change for no features", which doesn't make any sense as you can't re-implement or change something that does not exist yet. However,
  • 0.1.0 would mean "the first set of feature(s)".

I'm just curious what your thinking is/was on this.

I appreciate this was done a while back and things have change a lot since then (e.g. semver.org didn't exist). However I think it could do with a re-visit.

What do you think?

This comment has been minimized.

Copy link
@jodysalt

jodysalt May 15, 2012

So basically you should use your own conventions below 1.0.0? This would seem a bit messy.

If you go to the faq "How should I deal with revisions in the 0.y.z initial development phase?" on http://semver.org/ he suggests:

"The simplest thing to do is start your initial development release at 0.1.0 and then increment the minor version for each subsequent release."

Which based on my rational I agree; and believe it to be a good suggestion.

Even below version 1.0.0 I think there is no real reason why good versioning shouldn't be encouraged.

<%- config[:constant_array].size.downto(0) do |i| -%>
<%= ' '*i %>end
<%- end -%>
6 changes: 3 additions & 3 deletions spec/other/gem_helper_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,20 +36,20 @@

it "builds" do
@helper.build_gem
bundled_app('test/pkg/test-0.0.0.gem').should exist
bundled_app('test/pkg/test-0.0.1.gem').should exist
end

it "installs" do
@helper.install_gem
should_be_installed("test 0.0.0")
should_be_installed("test 0.0.1")
end

it "shouldn't push if there are uncommitted files" do
proc { @helper.push_gem }.should raise_error(/files that need to be committed/)
end

it "pushes" do
@helper.should_receive(:rubygem_push).with(bundled_app('test/pkg/test-0.0.0.gem').to_s)
@helper.should_receive(:rubygem_push).with(bundled_app('test/pkg/test-0.0.1.gem').to_s)
Dir.chdir(@app) {
`git init --bare #{gem_repo1}`
`git remote add origin file://#{gem_repo1}`
Expand Down

0 comments on commit 2bb1e80

Please sign in to comment.