0.0
No commit activity in last 3 years
No release in over 3 years
Create install scripts without the complexity of shell commands.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 0.11
~> 12
~> 3.8
~> 0.56.0

Runtime

 Project Readme

BinInstall

Simple DSL for creating install scripts.

It's used at Deliv to increase developer happiness.

Installation

Add this line to your application's Gemfile:

gem 'bin_install'

Usage

To create install scripts run:

$ rails generate bin_install:install

Will create the following files with some common defaults:

  • bin/install
  • bin/update
  • bin/kill

Bang! vs No Bang

Most methods in this library have also have a bang version that will halt all further execution. No bang methods will only display the error output of the command but execution will continue.

Atom

Install Atom:

BinInstall::Atom.install # or install!

Ask before installing Atom:

BinInstall::Atom.ask # or ask!

Install Atom packages:

BinInstall::Atom::Package.install(package) # or install!(package)

Install popular Atom packages:

BinInstall::Atom::Package.install_popular # or install_popular!

Ask before installing popular Atom packages:

BinInstall::Atom::Package.ask_popular # or ask_popular!

Brew

Require Homebrew before continuing:

BinInstall::Brew.require!

Update Homebrew:

BinInstall::Brew.update # or update!

Install Homebrew package:

BinInstall::Brew::Package.install('package') # or install!('package')

Upgrade Homebrew package:

BinInstall::Brew::Package.upgrade('package') # upgrade!('package')

Install or Upgrade with one command:

BinInstall::Brew::Package.install_or_upgrade('package') # or install_or_upgrade!('package')

Gem

Install all gems with:

BinInstall::Gem.install # or install!

Update all gems with:

BinInstall::Gem.update # or update!

Git

Install Git with:

BinInstall::Git.install # or install!

Mysql

Install MySQL with:

BinInstall::Mysql.install # or install!

Create root user with blank password:

BinInstall::Mysql.create_root # or create_root!

Create user with username and password:

BinInstall::Mysql.create_user('username', 'password')

Node

Install Node.js and Yarn with:

BinInstall::Node.install # or install!

Install packages with:

BinInstall::Node.yarn_install # or yarn_install!

Upgrade packages with:

BinInstall::Node.yarn_upgrade # or yarn_upgrade!

Postgres

Install PostgreSQL with:

BinInstall::Postgres.install # or install!

Create a user with a username and blank password:

BinInstall::Postgres.create_user('username') # or create_user!('username')

Create a superuser with a username and blank password:

BinInstall::Postgres.create_superuser('username') # or create_superuser!('username')

Rails

Setup database with:

BinInstall::Rails.db_setup # or db_setup!

Migrate database with:

BinInstall::Rails.db_migrate # db_migrate!

Clear log and tmp files:

BinInstall::Rails.clear # or clear!

Redis

Install Redis with:

BinInstall::Redis.install # or install!

Ruby

Install rbenv unless RVM is installed with:

BinInstall::Ruby.install # or install!

Server

Forcefully kill the server with:

BinInstall::Server.kill # or kill!

Contributing

All pull requests must pass RuboCop.

TODO

  • [] GitHub SSH stuff
  • [] Mysql dev stuff
  • [] test brew install without root