module Bundler::ShellsplitPlugin

Plugin module containing the hotfix for the shellsplit error.

Constants

NEWEST_AFFECTED
OLDEST_AFFECTED
VERSION

Public Class Methods

bundler_affected?() click to toggle source
# File lib/bundler/shellsplit_plugin.rb, line 25
def bundler_affected?
  bundler_version = Gem::Version.new(Bundler::VERSION)
  bundler_version >= OLDEST_AFFECTED && bundler_version <= NEWEST_AFFECTED
end
register() click to toggle source
# File lib/bundler/shellsplit_plugin.rb, line 30
def register
  unless bundler_affected?
    Warning.warn('The Bundler::ShellsplitPlugin plugin is intended ' \
                 'for Bundler versions >= 1.17.3 and <= 2.0.2. It ' \
                 'has no effect on other versions, which do not have ' \
                 'the bug it attempts to fix.')
    return
  end

  Bundler::Plugin.add_hook('before-install') do
    Bundler::GemInstaller.prepend ShellsplitSpecSettings
  end
end