Class: BundleHack::GemspecSources::Path

Inherits:
Base
  • Object
show all
Defined in:
lib/bundle_hack/gemspec_sources/path.rb

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from BundleHack::GemspecSources::Base

Instance Method Details

#specObject



6
7
8
9
10
11
12
13
14
# File 'lib/bundle_hack/gemspec_sources/path.rb', line 6

def spec
  # If the gem comes from a path (including git) then we will have the
  # gemspec available in the gem directory (unlike when it comes from
  # rubygems)
  gemspec_path = @gem.path.join("#{@gem.name}.gemspec")
  return nil unless File.exist?(gemspec_path)

  File.read(gemspec_path)
end