title: Synchronizing Jeweler's gem version with version string in program itself
body: <p>So I'm using <a href="https://github.com/technicalpickles/jeweler" rel="nofollow">Jeweler</a> to maintain a <a href="https://github.com/jpatokal/mediawiki-gateway" rel="nofollow">little gem of mine</a>, and it provides a set of handy <code>rake version:*</code> tasks for managing the version number.  Jeweler apparently stores the version number in a file called VERSION, which is then read on <code>rake gemspec</code>.  The only problem is, the actual Ruby code in the library <em>also</em> contains a version, which is eg. sent out in HTTP request headers created by the library:</p>
  
  <pre><code>module MediaWiki
    class &lt;&lt; self
      def version
        "0.1.6"
      end
      ...
  </code></pre>
  
  <p>Any ideas for keeping these two in sync automatically?  Alternatively, is there some way the MediaWiki library can query the gem it was turned into to find its own version?</p>