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