desc "Bundle all Gemfiles"
task :bundle do
  ["Gemfile", *Dir.glob("gemfiles/*.gemfile")].each do |gemfile|
    Bundler.with_original_env do
      system({ "BUNDLE_GEMFILE" => gemfile }, "bundle install")
    end
  end
end

desc "Bundle all Gemfiles"
task :bundle do |_t, opts|
  ["Gemfile", *Dir.glob("gemfiles/*.gemfile")].each do |gemfile|
    Bundler.with_original_env do
      system({ "BUNDLE_GEMFILE" => gemfile }, "bundle", opts)
    end
  end
end

Allow passing args to `bundle` task
Allow passing args to `bundle` task

For example, to upgrade a gem, you can do

```
bundle exec rake bundle[update,parallel_tests]
```
