Class: GemfileHelper

Inherits:
Object
  • Object
show all
Defined in:
lib/huginn_agent/patches/gemfile_helper.rb

Overview

This Gemfile modification was generated by the rake prepare command

Class Method Summary collapse

Class Method Details

.parse_huginn_agent_gems(dependencies) ⇒ Object



5
6
7
8
9
10
11
12
13
14
# File 'lib/huginn_agent/patches/gemfile_helper.rb', line 5

def self.parse_huginn_agent_gems(dependencies)
  base_path = File.expand_path('../../../', __FILE__)
  gemspec = Dir["#{base_path}/*.gemspec"].first
  previous_gems = Hash[dependencies.map { |dep| [dep.name, dep] }]
  Gem::Specification.load(gemspec).development_dependencies.each do |args|
    next if previous_gems.key?(args.name)

    yield args.name, *args.requirements_list
  end
end