Giter Club home page Giter Club logo

bindeps's Introduction

Bindeps

Build Status Dependency Status Coverage Status Code Climate Gem Version License

Simple binary dependency management for Ruby gems

Installation

$ gem install bindeps

Usage

Create a YAML file describing your dependencies as a dictionary. Read the bindeps YAML format specifications.

bowtie2:
  binaries:
    - bowtie2
    - bowtie2-align-l
    - bowtie2-align-s
    - bowtie2-build
    - bowtie2-build-l
    - bowtie2-build-s
    - bowtie2-inspect
    - bowtie2-inspect-l
    - bowtie2-inspect-s
  version:
    number: '2.2.3'
    command: 'bowtie2 --version'
  url:
    64bit:
      linux: http://downloads.sourceforge.net/project/bowtie-bio/bowtie2/2.2.3/bowtie2-2.2.3-linux-x86_64.zip
      macosx: http://downloads.sourceforge.net/project/bowtie-bio/bowtie2/2.2.3/bowtie2-2.2.3-macos-x86_64.zip
  unpack: true

Then as soon as your app is executed, let bindeps check for and install any missing dependencies.

require 'bindeps'

Bindeps.require 'binary_dependencies.yaml'

bindeps will check run the version:command for each dependency. If the return value of the command doesn't match a regular expression test against the version:number field, bindeps will download the file that matches your system architecture, unpack it unless unpack is set to false, and place the binary in your path. Specifically, it is added to the bin directory of your RubyGems installation. This means the binary will be in the PATH as long as this version of RubyGems is in use (which is ideal for gem dependencies). If the return value does match, bindeps will do nothing.

Specifying an install directory

Simply pass the destination directory as the second argument to Bindeps::require():

Bindeps.require('deps.yaml', '/some/install/directory')

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes with tests (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

bindeps's People

Contributors

blahah avatar cboursnell avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

bindeps's Issues

add support for installing libs alonside binaries

User would specify both/either of binaries and libraries. Bindeps first looks for the files in the root of the unpacked directory, then if not found, looks in bin or lib subdirectories. Lib files get moved to a lib directory placed at ../lib relative to the ruby gem bin directory.

yaml format would be like:

flux-simulator:
  binaries:
    - flux-simulator
  libraries:
    - barna.commons-1.22.jar
    - dom4j-1.6.1.jar
    - jdbm-2.3.jar
    - slf4j-nop-1.6.1.jar
    - barna.io-1.22.jar
    - groovy-all-1.8.4.jar
    - jfreechart-1.0.0.jar
    - xml-apis-1.0.b2.jar
    - barna.model-1.22.jar
    - guava-r08.jar
    - jsap-2.1.jar
    - xpp3_min-1.1.3.4.O.jar
    - barna.simulator-1.2.1.jar
    - itext-2.0.7.jar
    - reflections-0.9.5.jar
    - xstream-1.2.2.jar
    - commons-cli-1.2.jar
    - javassist-3.12.1.GA.jar
    - samtools-1.79.jar
    - commons-math-2.2.jar
    - jcommon-1.0.0.jar
    - slf4j-api-1.6.1.jar
  version:
    number: '1.2.1'
    command: 'flux-simulator'
  url:
    64bit:
      macosx: http://artifactory.sammeth.net/artifactory/barna/barna/barna.simulator/1.2.1/flux-simulator-1.2.1.tgz
      linux: http://artifactory.sammeth.net/artifactory/barna/barna/barna.simulator/1.2.1/flux-simulator-1.2.1.tgz

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.