From 37c2d0ddd751e15d0c87a51e2d9f9849093571dc Mon Sep 17 00:00:00 2001 From: Vsevolod Romashov <7@7vn.ru> Date: Tue, 23 Jan 2018 06:35:17 +0300 Subject: add hanami to the list of wrapped gems (#6334) --- plugins/bundler/bundler.plugin.zsh | 1 + 1 file changed, 1 insertion(+) (limited to 'plugins/bundler/bundler.plugin.zsh') diff --git a/plugins/bundler/bundler.plugin.zsh b/plugins/bundler/bundler.plugin.zsh index c5284dbb1..6b10b78d1 100644 --- a/plugins/bundler/bundler.plugin.zsh +++ b/plugins/bundler/bundler.plugin.zsh @@ -14,6 +14,7 @@ bundled_commands=( cucumber foodcritic guard + hanami irb jekyll kitchen -- cgit v1.2.3-70-g09d2 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/bundler.plugin.zsh') 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/bundler.plugin.zsh') 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/bundler.plugin.zsh') 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 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/bundler.plugin.zsh') 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/bundler.plugin.zsh') 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 From fc9093b745096a970c8b87b2275a69ad13d665db Mon Sep 17 00:00:00 2001 From: David Shaffer Date: Thu, 26 Sep 2019 10:12:30 -0400 Subject: Add rubocop to bundled_commands --- plugins/bundler/bundler.plugin.zsh | 1 + 1 file changed, 1 insertion(+) (limited to 'plugins/bundler/bundler.plugin.zsh') diff --git a/plugins/bundler/bundler.plugin.zsh b/plugins/bundler/bundler.plugin.zsh index 668e15d2f..c4a4fd40a 100644 --- a/plugins/bundler/bundler.plugin.zsh +++ b/plugins/bundler/bundler.plugin.zsh @@ -27,6 +27,7 @@ bundled_commands=( rainbows rake rspec + rubocop shotgun sidekiq spec -- cgit v1.2.3-70-g09d2 From a41d308f70181db085938c5a8f2fe3d0d8e312c5 Mon Sep 17 00:00:00 2001 From: Nick Fagerlund Date: Fri, 18 Oct 2019 09:43:25 -0700 Subject: bundler: make it play nice with functions that call wrapped commands (#8271) When another function calls one of the bundler plugin's wrapper functions, the command to run gets passed as an array instead of a space-separated string. That works fine when the arguments are expanded alone, like `bundle exec $@`, but something like `./bin/$@` will expand to something like `./bin/rake ./bin/--silent ./bin/--tasks`, which of course will explode. This was causing a nasty interaction with the rake-fast plugin, and I'd be shocked if it wasn't causing other problems. The fix is to explicitly turn off the `RC_EXPAND_PARAM` option for that expansion. See http://zsh.sourceforge.net/Doc/Release/Expansion.html#Parameter-Expansion for more details. --- plugins/bundler/bundler.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins/bundler/bundler.plugin.zsh') diff --git a/plugins/bundler/bundler.plugin.zsh b/plugins/bundler/bundler.plugin.zsh index c4a4fd40a..d93fac01e 100644 --- a/plugins/bundler/bundler.plugin.zsh +++ b/plugins/bundler/bundler.plugin.zsh @@ -95,7 +95,7 @@ _binstubbed() { _run-with-bundler() { if _bundler-installed && _within-bundled-project; then if _binstubbed $1; then - ./bin/$@ + ./bin/${^^@} else bundle exec $@ fi -- cgit v1.2.3-70-g09d2 From 6b6f2b6dfdc4bc327e814477170f81f0b91a9740 Mon Sep 17 00:00:00 2001 From: Vsevolod Romashov <7@7vn.ru> Date: Fri, 18 Oct 2019 22:55:56 +0300 Subject: bundler: support new file naming convention (#6594) --- plugins/bundler/bundler.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins/bundler/bundler.plugin.zsh') diff --git a/plugins/bundler/bundler.plugin.zsh b/plugins/bundler/bundler.plugin.zsh index d93fac01e..665cb5e43 100644 --- a/plugins/bundler/bundler.plugin.zsh +++ b/plugins/bundler/bundler.plugin.zsh @@ -82,7 +82,7 @@ _bundler-installed() { _within-bundled-project() { local check_dir="$PWD" while [ "$check_dir" != "/" ]; do - [ -f "$check_dir/Gemfile" ] && return + [ -f "$check_dir/Gemfile" -o -f "$check_dir/gems.rb" ] && return check_dir="$(dirname $check_dir)" done false -- cgit v1.2.3-70-g09d2