Sha256: 3203a38a626daf059e7f157b5dab36f92138b5589c28b798af6bd3af3bdf1d09

Contents?: true

Size: 1.04 KB

Versions: 6

Compression:

Stored size: 1.04 KB

Contents

# frozen_string_literal: true

# https://guides.rubygems.org/plugins/
# https://github.com/rvm/executable-hooks/blob/master/lib/rubygems_plugin.rb
require "pathname"
def run(action, installer)
  path = Pathname.new(installer.spec.lib_dirs_glob) / "#{action}.rb"
  return unless path.exist?

  delete = false
  unless $LOAD_PATH.include?(installer.spec.lib_dirs_glob)
    $LOAD_PATH.unshift installer.spec.lib_dirs_glob
    delete = true
  end
  # noinspection RubyResolve
  require action
  $LOAD_PATH.delete installer.spec.lib_dirs_glob if delete
  true
end

Gem.pre_install do |installer|
  run "pre_install", installer
end

Gem.pre_uninstall do |installer|
  run "pre_uninstall", installer
end

Gem.post_build do |installer|
  run "post_build", installer
end

Gem.post_install do |installer|
  run "post_install", installer
end

Gem.post_uninstall do |installer|
  run "post_uninstall", installer
end

# TODO: el caller o que solo se haga una vez
# bundle clean --force
# gem uninstall --ignore-dependencies --all -x
# gem install bundle bundler irb
# bundle install

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
brew_lib-0.1.16 lib/rubygems_plugin.rb
brew_lib-0.1.15 lib/rubygems_plugin.rb
brew_lib-0.1.14 lib/rubygems_plugin.rb
brew_lib-0.1.13 lib/rubygems_plugin.rb
brew_lib-0.1.12 lib/rubygems_plugin.rb
brew_lib-0.1.11 lib/rubygems_plugin.rb