I'm trying to get an old version from a repository using bundler
.
For instance, in my Gemfile I have:
...
gem "custom-metrics", "~> 0.14.0", git: "https://gitlab.custom.co/gems/custom-metrics.git"
...
This is properly installing the version 0.14.0
. Then I pushed a 0.14.1
version in the dependency repository, and it's still the same, as expected.
In the dependency, I'm setting the version in my .gemspec
file as:
Gem::Specification.new do |spec|
spec.name = "custom-metrics"
spec.version = 0.14.0
...
end
If I now push a 0.15.0
version, it would stop working. In this case, I have to specify the ref:
to the previous commit. So it seems it's not that bundler can't install the version, but that it only looks for versions in the last MINOR version (in this case, it would be in 0.15.*
)
I couldn't find any doc that confirms my hypothesis.
> Am I missing something?
> Would it be possible to specify a version and be sure that bundler will always find it?