From be5bff2e86872c00536191265aa9fdef225af100 Mon Sep 17 00:00:00 2001 From: Marc Cornellà Date: Tue, 12 Jun 2018 19:54:47 +0200 Subject: Allow FreeBSD to correctly detect number of CPUs Use the same scheme as Darwin - sysctl instead of nproc, which doesn't exist in FreeBSD Closes #2545 Co-authored-by: Daniel Bye --- plugins/bundler/bundler.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins/bundler') diff --git a/plugins/bundler/bundler.plugin.zsh b/plugins/bundler/bundler.plugin.zsh index 6b10b78d1..ea199d09a 100644 --- a/plugins/bundler/bundler.plugin.zsh +++ b/plugins/bundler/bundler.plugin.zsh @@ -57,7 +57,7 @@ bundle_install() { if _bundler-installed && _within-bundled-project; then local bundler_version=`bundle version | cut -d' ' -f3` if [[ $bundler_version > '1.4.0' || $bundler_version = '1.4.0' ]]; then - if [[ "$OSTYPE" = darwin* ]] + if [[ "$OSTYPE" = (darwin|freebsd)* ]] then local cores_num="$(sysctl -n hw.ncpu)" else -- cgit v1.2.3-70-g09d2 From d302e3eebeb5e3dd25811fae7035c2427739be91 Mon Sep 17 00:00:00 2001 From: Marc Cornellà Date: Wed, 18 Jul 2018 23:34:38 +0200 Subject: bundler: fix bundle version git error It seems that `bundle version` calls git to know the commit sha, while `bundle --version` only shows the version of bundler. Fixes #6988 --- plugins/bundler/bundler.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins/bundler') diff --git a/plugins/bundler/bundler.plugin.zsh b/plugins/bundler/bundler.plugin.zsh index ea199d09a..b0b286af5 100644 --- a/plugins/bundler/bundler.plugin.zsh +++ b/plugins/bundler/bundler.plugin.zsh @@ -55,7 +55,7 @@ done bundle_install() { if _bundler-installed && _within-bundled-project; then - local bundler_version=`bundle version | cut -d' ' -f3` + local bundler_version=`bundle --version | cut -d' ' -f3` if [[ $bundler_version > '1.4.0' || $bundler_version = '1.4.0' ]]; then if [[ "$OSTYPE" = (darwin|freebsd)* ]] then -- cgit v1.2.3-70-g09d2 From 2991f237aeacb0a1918cdd6d4b98fe4b21980038 Mon Sep 17 00:00:00 2001 From: Marc Cornellà Date: Tue, 7 Aug 2018 21:04:09 +0200 Subject: bundler: allow aliases in `bundle exec` This means that if you have, for example, `alias rs='rails server'`, you can run `be rs` and have it expanded to `bundle exec rails server`. Fixes #5818 --- plugins/bundler/bundler.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins/bundler') diff --git a/plugins/bundler/bundler.plugin.zsh b/plugins/bundler/bundler.plugin.zsh index b0b286af5..589f2cfce 100644 --- a/plugins/bundler/bundler.plugin.zsh +++ b/plugins/bundler/bundler.plugin.zsh @@ -1,4 +1,4 @@ -alias be="bundle exec" +alias be="bundle exec " alias bl="bundle list" alias bp="bundle package" alias bo="bundle open" -- cgit v1.2.3-70-g09d2 From 91d55dce11cc975309cd7dc8955c51f82de8548c Mon Sep 17 00:00:00 2001 From: Marc Cornellà Date: Wed, 8 Aug 2018 13:36:27 +0200 Subject: bundler: update README with latest changes --- plugins/bundler/README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'plugins/bundler') diff --git a/plugins/bundler/README.md b/plugins/bundler/README.md index 04d551447..dc2f17008 100644 --- a/plugins/bundler/README.md +++ b/plugins/bundler/README.md @@ -2,7 +2,8 @@ - adds completion for basic bundler commands - adds short aliases for common bundler commands - - `be` aliased to `bundle exec` + - `be` aliased to `bundle exec`. + It also supports aliases (if `rs` is `rails server`, `be rs` will bundle-exec `rails server`). - `bl` aliased to `bundle list` - `bp` aliased to `bundle package` - `bo` aliased to `bundle open` @@ -13,7 +14,8 @@ - looks for a binstub under `./bin/` and executes it (if present) - calls `bundle exec ` otherwise -For a full list of *common gems* being wrapped by default please look at the `bundler.plugin.zsh` file. +Common gems wrapped by default (by name of the executable): +`annotate`, `cap`, `capify`, `cucumber`, `foodcritic`, `guard`, `hanami`, `irb`, `jekyll`, `kitchen`, `knife`, `middleman`, `nanoc`, `pry`, `puma`, `rackup`, `rainbows`, `rake`, `rspec`, `shotgun`, `sidekiq`, `spec`, `spork`, `spring`, `strainer`, `tailor`, `taps`, `thin`, `thor`, `unicorn` and `unicorn_rails`. ## Configuration -- cgit v1.2.3-70-g09d2 From a52a5fb1f4a5ca4bacc67e117872cfc4eb1d6417 Mon Sep 17 00:00:00 2001 From: Dennis Hägler Date: Thu, 16 Aug 2018 17:52:45 +0200 Subject: Remove the white space The white space is causing an error and bundler cannot find any commands! --- plugins/bundler/bundler.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins/bundler') diff --git a/plugins/bundler/bundler.plugin.zsh b/plugins/bundler/bundler.plugin.zsh index 589f2cfce..b0b286af5 100644 --- a/plugins/bundler/bundler.plugin.zsh +++ b/plugins/bundler/bundler.plugin.zsh @@ -1,4 +1,4 @@ -alias be="bundle exec " +alias be="bundle exec" alias bl="bundle list" alias bp="bundle package" alias bo="bundle open" -- cgit v1.2.3-70-g09d2 From 08a280863661dd44aad20d494187d9c4ba12fac9 Mon Sep 17 00:00:00 2001 From: Iulian Onofrei <6d0847b9@opayq.com> Date: Sun, 9 Sep 2018 01:39:23 +0300 Subject: Fix incorrect error message when running bi without having bundler installed (#7112) --- plugins/bundler/bundler.plugin.zsh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'plugins/bundler') diff --git a/plugins/bundler/bundler.plugin.zsh b/plugins/bundler/bundler.plugin.zsh index b0b286af5..668e15d2f 100644 --- a/plugins/bundler/bundler.plugin.zsh +++ b/plugins/bundler/bundler.plugin.zsh @@ -54,8 +54,12 @@ done ## Functions bundle_install() { - if _bundler-installed && _within-bundled-project; then - local bundler_version=`bundle --version | cut -d' ' -f3` + if ! _bundler-installed; then + echo "Bundler is not installed" + elif ! _within-bundled-project; then + echo "Can't 'bundle install' outside a bundled project" + else + local bundler_version=`bundle version | cut -d' ' -f3` if [[ $bundler_version > '1.4.0' || $bundler_version = '1.4.0' ]]; then if [[ "$OSTYPE" = (darwin|freebsd)* ]] then @@ -67,8 +71,6 @@ bundle_install() { else bundle install $@ fi - else - echo "Can't 'bundle install' outside a bundled project" fi } -- cgit v1.2.3-70-g09d2