Module: EndOfLife::Parsers::Gemfile

Extended by:
Helpers::SilentBundler, Gemfile
Included in:
Gemfile
Defined in:
lib/end_of_life/parsers/gemfile.rb

Instance Method Summary collapse

Methods included from Helpers::SilentBundler

silence_bundler

Instance Method Details

#parse(file_content) ⇒ Object



7
8
9
10
11
12
13
14
# File 'lib/end_of_life/parsers/gemfile.rb', line 7

def parse(file_content)
  with_temp_gemfile(file_content) do |gemfile|
    silence_bundler do
      # This is security problem, since it runs the code inside the file
      Bundler::Definition.build(gemfile.path, nil, {})
    end
  end
end