Forum: Ruby [Bundler] Using a Git repository as ruby gem server

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
3f524a8aa88a0610561f622463d3b91b?d=identicon&s=25 Manfred Ruhl (manfred_ruhl)
on 2017-03-29 09:52
Hello everyone!

As surely everyone knows, one can specify a Git repository in the
Gemfile as a gem source, like

gem 'mygem', :git => git@git.myserver.com:myuser/mygem.git'

However, this doesn't fully accomplish my needs. Imagine my repository
has some tagged commits, like "1.1.0", "1.1.1", "1.2.0" etc. If I
specify a dependency on "mygem" with a version requirement of, say, "~>
1.1.0, <= 1.2.0", how can I pull the commit with the best-matching
version number? Right now, it would only check out one particular commit
(HEAD on master branch), scanning its gemspec and either deliver it if
it doesn't contradict the requirements or returns an error if it does,
rather than searching through all commits for the best fit. Is there any
way I can do that? I really would not like to use an additional gem
server besides my Git repository.

Kind regards,
Manfred
This topic is locked and can not be replied to.