This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

Parse Ruby's Gemfiles

Project Description

Installation

If using pip, use the command sudo pip install gemfileparser
Else use the following commands
git clone https://github.com/balasankarc/gemfileparser.git
cd gemfileparser
python setup.py install

Usage

from gemfileparser import GemfileParser
parser = GemfileParser(<path to Gemfile>, <name of the application (optional)>)
dependency_dictionary = parser.parse()

The parse() method returns a dict object of the following format

{
'development': [list of dependency objects inside group 'development'],
'runtime': [list of runtime dependency objects],
.
.
.}

Each dependency object contains the following attributes

name - Name of the gem
requirement - Version requirement
autorequire - Autorequire value
source - Source URL of the gem
parent - Dependency of which gem
group - Group in which gem is a member of (default : runtime)

Example

from gemfileparser import GemfileParser
n = GemfileParser('Gemfile', 'diaspora')
deps = n.parse()
for key in deps:
   if deps[key]:
       print key
       for dependency in deps[key]:
           print "  ", dependency

License

gemfileparser is released under GNU GPL version 3 (or above) License.

Release History

Release History

This version
History Node

0.6.2

History Node

0.6.1

History Node

0.6

History Node

0.5

History Node

0.4

History Node

0.3

History Node

0.2.2

History Node

0.2.1

History Node

0.2

History Node

0.1

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
gemfileparser-0.6.2.tar.gz (4.0 kB) Copy SHA256 Checksum SHA256 Source Jun 23, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting