class Gem::Specification
def add_bundler_dependencies(*groups)
def add_bundler_dependencies(*groups) groups = [:default] if groups.empty? Bundler.definition.dependencies.each do |dep| if dep.groups.include?(:development) self.add_development_dependency(dep.name, dep.requirement.to_s) elsif (dep.groups & groups).any? self.add_dependency(dep.name, dep.requirement.to_s) end end end