Sha256: fce17aaf46ccb2d47f47b369c7ff5d2c72bc521c87895ad212f7935b4a481b89
Contents?: true
Size: 655 Bytes
Versions: 1
Compression:
Stored size: 655 Bytes
Contents
require 'rubygems' require 'bundler' Bundler.setup require 'pathname' require 'addressable/uri' require 'ruby-debug' Debugger.start require 'dm-core' def path_to(gem_name, version=nil) version = version ? Gem::Requirement.create(version) : Gem::Requirement.default specs = Gem.source_index.find_name(gem_name, version) paths = specs.map do |spec| spec_path = spec.loaded_from expanded_path = File.join(File.dirname(spec_path), '..', 'gems', "#{spec.name}-#{spec.version}") end end def path_in_gem(name, *paths) loaded_gem = Gem.loaded_specs[name] return null unless loaded_gem File.join(loaded_gem.full_gem_path, *paths) end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
dm-persevere-adapter-0.72.0 | spec/spec_helper.rb |