Node/Ruby interop module that queries Bundler for gem paths matching a glob


0.2.0a month ago4 years agoMinified + gzip package size for @epublishing/get-gem-paths in KB



This is a Node module that provides Ruby/Bundler interoperability. It's used to find the locations of installed gems in the Jade Rails stack, which grunt-epublishing then uses to resolve the front-end assets it needs.

This is meant to be installed into a Jade site or engine with a Gemfile present. It uses the current working directory to initialize Bundler and query its gem registry. It runs a Ruby script to do this, so you must have a working ruby somewhere in your PATH.

Installation & Usage

npm install @epublishing/get-gem-paths
const getGemPaths = require('@epublishing/get-gem-paths');

// getGemPaths is a function that returns a promise containing an array of result objects:
getGemPaths('jade').then((results) => {

 * each result is an object with the following shape:
 * {
 *   name: 'jade',
 *   path: '/path/to/jade',
 *   version: '6.7.pre'
 * }

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.