Permalink
Browse files

Lock the versions of the dependencies to those specified in the gemspec.

  • Loading branch information...
1 parent c6522b6 commit db388279fb7060109fcab615c680a84805b5ec67 @matheusmoreira committed Feb 28, 2012
Showing with 8 additions and 0 deletions.
  1. +8 −0 lib/safeguard.rb
View
@@ -47,6 +47,14 @@ def gemspec
Gem::Specification.load gemspec_file
end
+ # Ensure the correct versions of all gems specified as dependencies in the
+ # gem specification are loaded.
+ def ensure_correct_versions
+ gemspec.dependencies.each do |dependency|
+ gem dependency.name, dependency.requirement if dependency.type == :runtime
+ end
+ end
+
end
end

0 comments on commit db38827

Please sign in to comment.