Sha256: 1644bc28191705f1e6332db65d6ad213b217f25eceb6e704f3887c14f98a17c9

Contents?: true

Size: 807 Bytes

Versions: 8

Compression:

Stored size: 807 Bytes

Contents

# Simulate require_relative - it's required as the plugin can be called in wrong version or from bundler.
require File.expand_path('../gem-wrappers/specification.rb', __FILE__)

called_path, called_version = __FILE__.match(/^(.*\/gem-wrappers-([^\/]+)\/lib).*$/)[1..2]

# continue only if loaded and called versions all the same, and not shared gems disabled in bundler
if
  ( $:.include?(called_path) || GemWrappers::Specification.version == called_version ) and
  ( !defined?(Bundler) || ( defined?(Bundler) && Bundler::SharedHelpers.in_bundle? && !Bundler.settings[:disable_shared_gems]) )

  require 'gem-wrappers'
  require 'gem-wrappers/command'

  Gem.post_install do |installer|
    GemWrappers.install(installer.spec.executables)
  end
  Gem::CommandManager.instance.register_command :wrappers
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
gem-wrappers-1.0.0 lib/rubygems_plugin.rb
gem-wrappers-0.9.2 lib/rubygems_plugin.rb
gem-wrappers-0.9.1 lib/rubygems_plugin.rb
gem-wrappers-0.9.0 lib/rubygems_plugin.rb
gem-wrappers-0.8.1 lib/rubygems_plugin.rb
gem-wrappers-0.8.0 lib/rubygems_plugin.rb
gem-wrappers-0.7.1 lib/rubygems_plugin.rb
gem-wrappers-0.7.0 lib/rubygems_plugin.rb