Parse Ruby Gemfile, .gemspec and Cocoapod .podspec files using Python. Current version 0.9.4, requires Python >=3.7. Maintenance cadence is sporadic.
pip install gemfileparser2Verified import paths — ran on the pinned version, not inferred.
Read and parse a Ruby Gemfile.
Change 'from gemfileparser import ...' to 'from gemfileparser2 import ...'
Read the file content with open() and pass the string to parse().
Use 'gemfileparser2' instead of 'gemfileparser'.
Install gemfileparser2 and import from gemfileparser2.
Open the file and read its content: open('Gemfile').read()Ensure the Gemfile is valid Ruby syntax.