Skip to content
/ bw Public

bundle wrapper: run gem command with bundle if available in current context or run globally installed one

Notifications You must be signed in to change notification settings

CedricGatay/bw

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bw - bundle wrapper

TLDR bundle wrapper that allows you to run bundle commands without thinking you do

Inspired by github/srs/gw but for bundle commands

Features

Classical usage

Runs the binary as if it was ran with bundle exec if a Gemfile is detected in current directory (or any parent).

For instance, to run fastlane one would do bundle exec fastlane ios test, it is now possible to do bw fastlane ios test.

This saves a few keystrokes, and with habit it becomes clear.

Aliasing usage

If you do not want to change what’s your used to type, you can alias it in your favorite shell fastlane=bw fastlane and it will run either bundle version (if a Gemfile is found) or globally installed one otherwise.

If you make a symlink to bw binary by appending an additional character (w recommended), it will automatically wrap that command in the same way.

For instance, if you make a symbolic link named fastlanew to bw, running fastlanew will automatically initiate bw logic for fastlane binary.

Installation

Github actions build the binary for linux / macOS. Needs to adjust a few moving pieces for Windows.

You can get latest version here

Technical stack

This is written in Rust 🦀, because I wanted something fast, portable and fun.

LICENSE

The MIT License (MIT) Copyright © 2021 Cedric Gatay | Code-Troopers

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

About

bundle wrapper: run gem command with bundle if available in current context or run globally installed one

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages