Module: IronWorkerNG::Feature::Python::MergeRequirements::InstanceMethods

Included in:
Code::Runtime::Python
Defined in:
lib/iron_worker_ng/feature/python/merge_requirements.rb

Instance Method Summary collapse

Instance Method Details

#merge_requirements(path) ⇒ Object Also known as: requirements



7
8
9
10
11
12
13
14
# File 'lib/iron_worker_ng/feature/python/merge_requirements.rb', line 7

def merge_requirements(path)
  feature = IronWorkerNG::Feature::Base.new(self)
  IronWorkerNG::Fetcher.fetch_to_file(feature.rebase(path)) do |requirements|
    specs = parse_requirements(requirements)
    specs.each {|spec| merge_pip(spec[:name], spec[:version])}
  end
  @features << feature
end