Sha256: 9237a15e7eb8d2d5c8378cf716b4acfbd4bbe90c382490556fe46ce3d11fefcb

Contents?: true

Size: 510 Bytes

Versions: 14

Compression:

Stored size: 510 Bytes

Contents

module Bundler
  class Specification < Gem::Specification
    attr_accessor :relative_loaded_from

    def self.from_gemspec(gemspec)
      spec = allocate
      gemspec.instance_variables.each do |ivar|
        spec.instance_variable_set(ivar, gemspec.instance_variable_get(ivar))
      end
      spec
    end

    def loaded_from
      return super unless relative_loaded_from
      source.path.join(relative_loaded_from)
    end

    def full_gem_path
      loaded_from.dirname.expand_path
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
bundler-0.9.7 lib/bundler/specification.rb
bundler-0.9.6 lib/bundler/specification.rb
bundler-0.9.5 lib/bundler/specification.rb
bundler-0.9.4 lib/bundler/specification.rb
bundler-0.9.3 lib/bundler/specification.rb
bundler-0.9.2 lib/bundler/specification.rb
bundler-0.9.1 lib/bundler/specification.rb
bundler-0.9.1.pre1 lib/bundler/specification.rb
bundler-0.9.0 lib/bundler/specification.rb
bundler-0.9.0.pre5 lib/bundler/specification.rb
bundler-0.9.0.pre4 lib/bundler/specification.rb
bundler-0.9.0.pre3 lib/bundler/specification.rb
bundler-0.9.0.pre2 lib/bundler/specification.rb
bundler-0.9.0.pre1 lib/bundler/specification.rb