Hi, thanks for your answer. The problem with that approach is that I now have to specify the version twice: once in my gemspec (where I define the dependency) and then again in my Gemfile (where the version requirement would be totally ignored). Additionally, if a new version came out, I'd have to maintain and update every Gemfile I have which surely would be error-prone and tedious.

What I have tried now is to write a script inside the Gemfile: In my gemspec, I define a global variable to be a reference to the gemspec object such that I have the requirements info available in my Gemfile. There I load a list of all tagged commits from git and then manually analyze it for a best match. Afterwards, I load it via gem ..., :tag => ...
It somewhat works, however it feels awkward and Bundler will execute the code at every command, not just when doing "bundle install" which is kind of annoying. Is there any sort of "hook" where I can listen on particular events like bundle install or bundle update?

Kind regards,
Manfred

Unsubscribe: <mailto:ruby-talk-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk>