Open jrafanie opened 10 years ago
@jrafanie can you elaborate what you are trying to do? This is the intent of the dependency_versions
method, it retrieves all the versions of all the specified packages in your configured targets.
If you would like to check to see if any see particular gem / version is built you can use the Koji#has_build
and/or Koji#has_build_satisfying?
method.
Alternately you can take the result from #dependency_versions
and cross reference it w/ your gemfile w/ a simple 'each' loop + the Gem::Dependency#match?
method (eg see the #has_build_satisfying?
implementation). We can add a helper method to polisher doing this if you'd like (perhaps Polisher::Gemfile#built?
or similar)
@movitto I'm suggesting that Polisher::Gemfile.parse(gemfile).dependency_versions
not discard the version constraint as that's part of parsing a Gemfile.
I should have some PRs for related features soon.
Polisher::Gemfile#dependency_versions ignores the Gemfile version constraint and just returns all versions of all gem dependencies from the Gemfile available in koji. It doesn't check the version constraint.
Output:
Even though the Gemfile says ~> 1.6.0, Polisher::Gemfile#dependency_versions ignores this and only returns the versions of all dependencies.