Lowendinsight
Lowendinsight is a simple module to parse and analyze various package manager's dependency definitions. Currently supported is Ruby Gems' Gemfile and gemspec, Node.js' package.json, and Maven's pom.xml files. More to come, as well as helper methods for checking currency and stuff like that.
Installation
Add this line to your application's Gemfile:
gem 'lowendinsight'
or referencing the latest from Github:
gem 'lowendinsight', :git => 'https://github.com/ion-channel/lowendinsight.git'
And then execute:
$ bundle
Or install it yourself as:
$ gem install lowendinsight
Usage example
Super simple, get dependencies (as a Ruby Hash):
Lowendinsight::GemfileDependencies.get_dependencies_from_repo "https://github.com/org/repo"
Returns:
{"git"=>"= 1.2.9.1", "gemnasium-parser"=>"= 0.1.9", "bundler"=>"~> 1.10", "rake"=>"~> 10.0", "minitest"=>">= 0"}
or
Lowendinsight::GemspecDependencies.get_dependencies_from_file File.join("../../some.gemspec")
Lowendinsight also can determine the project type for you (pom, package, Gemfile/gemspec):
Lowendinsight::ProjectType.determine_project_type_from_repo "https://github.com/org/repo"
Returns:
{"type" => "pom"}
See the specs for other examples.
Development
After checking out the repo, run bin/setup to install dependencies. Then, run rake test to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.
To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and tags, and push the .gem file to rubygems.org.
Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/ion-channel/lowendinsight.
License
The gem is available as open source under the terms of the MIT License.