Sha256: 66596ad3f4a0abbb61d0977181689808ec0b5c20d0bd8a5383a9cc3ee8db505c

Contents?: true

Size: 645 Bytes

Versions: 43

Compression:

Stored size: 645 Bytes

Contents

module Dev
class Deps < Hash
  def refresh
    puts_debug "Dev::Deps.refresh"
    self.each{ |k,v|
	  if !v.nil? && v.kind_of?(Hash)
	    v[:dir]=get_dir(v) if !v.has_key?(:dir)
		v[:rev]=get_rev(v) if !v.has_key?(:rev) && !get_rev(v).nil?
	  end
	}
  end

  def get_dir(h)
    uri=Dev::Environment.expand_string_variables(h[:uri])
    uri_words=uri.split('/')
    while(uri_words.length > 3) do
      uri_words.shift 
    end
    return uri_words.join('/')
  end

  def get_rev(h)
    if(h.has_key?(:uri) && h[:uri].include?('@'))
	  return h[:uri].split('@')[1]
	end
	nil
  end

end # class Deps
end # module Dev

Version data entries

43 entries across 43 versions & 1 rubygems

Version Path
dev-1.0.192 lib/dev/Deps.rb
dev-1.0.191 lib/dev/Deps.rb
dev-1.0.190 lib/dev/Deps.rb
dev-1.0.189 lib/dev/Deps.rb
dev-1.0.188 lib/dev/Deps.rb
dev-1.0.187 lib/dev/Deps.rb
dev-1.0.186 lib/dev/Deps.rb
dev-1.0.185 lib/dev/Deps.rb
dev-1.0.184 lib/dev/Deps.rb
dev-1.0.182 lib/dev/Deps.rb
dev-1.0.181 lib/dev/Deps.rb
dev-1.0.180 lib/dev/Deps.rb
dev-1.0.179 lib/dev/Deps.rb
dev-1.0.178 lib/dev/Deps.rb
dev-1.0.177 lib/dev/Deps.rb
dev-1.0.176 lib/dev/Deps.rb
dev-1.0.175 lib/dev/Deps.rb
dev-1.0.174 lib/dev/Deps.rb
dev-1.0.173 lib/dev/Deps.rb
dev-1.0.172 lib/dev/Deps.rb