The Artima Developer Community
Sponsored Link

Ruby Buzz Forum
Why are you updating your VERSION twice?

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Eric Hodel

Posts: 660
Nickname: drbrain
Registered: Mar, 2006

Eric Hodel is a long-time Rubyist and co-founder of Seattle.rb.
Why are you updating your VERSION twice? Posted: Jul 9, 2011 6:21 PM
Reply to this message Reply

This post originated from an RSS feed registered with Ruby Buzz by Eric Hodel.
Original Post: Why are you updating your VERSION twice?
Feed Title: Segment7
Feed URL: http://blog.segment7.net/articles.rss
Feed Description: Posts about and around Ruby, MetaRuby, ruby2c, ZenTest and work at The Robot Co-op.
Latest Ruby Buzz Posts
Latest Ruby Buzz Posts by Eric Hodel
Latest Posts From Segment7

Advertisement

I was looking at a project on GitHub and noticed two commits, one after the other, each updating the version of the project in different files.

Then I looked through GitHub's popular forked repositories list and picked out the first several ruby projects and poked through them to see how many made commits two the version to multiple files.

While my sample size was only seven or eight ruby libraries, only one updated the version in one place. (Looking through other gems in the past has shown me that most gem maintainers update their versions in multiple files, so pointing out the guilty would be pointless.)

I'm continually puzzled that Ruby projects don't apply the DRY principle to what I have found to be the most error-prone portion of being a library maintainer, releasing the library correctly.

Since Ryan and I put Hoe together there have been several other projects that claim various benefits over Hoe, but I haven't seen a single one that has the "single, unambiguous, authoritative representation" for such a basic piece of information as the version.

Looking through the commit messages of the popular project, one project was released with differing versions between the gemspec and the VERSION constant. Why use a release tool (or process) that allows this to happen? Hoe doesn't! It checks to make sure the VERSION you release matches up with the VERSION in your source (the single, unambiguous authoritative representation) so you can't do that!

Please, please, look at the tools you use to manage your project. Do they make you do extra work like editing the same data twice? Do they prevent you from shooting yourself in the foot?

If they don't make your life easier then fix them or ditch them. While I know that Hoe is the best tool available for developing, maintaining and releasing gems, I know that not everyone seems to agree (even though they're wrong ☺). If you don't like Hoe or don't want to switch to Hoe the least you could do is fix the tool you use to help you instead of hinder you.

Read: Why are you updating your VERSION twice?

Topic: Why are you updating your VERSION twice? Previous Topic   Next Topic Topic: Locking Mac OS X using Applescript

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use