lib/lc_discovery/utility.rb
###
# Every doc gets this for provenance 
Every doc gets this for provenance
Every doc gets this for provenance
def base_doc(proj, label)
    proj_host = Discovery.parse_host(proj)
    norm_path =
      proj.gsub(/\\|\/|:/, "_").chomp.strip.squeeze("_").gsub(/^_|_$/,"")
    {
      label: label,
      project_id: "#{label}:#{proj_host}:#{norm_path}".downcase,
      project_path: proj,
      project_name: File.basename(proj),
      project_home: Discovery.parse_home(proj),
      project_host: proj_host
    }
  end
def base_doc ( proj , label ) proj_host = Discovery . parse_host ( proj ) norm_path = proj . gsub ( / \\ | \/ |: / , "_" ) . chomp . strip . squeeze ( "_" ) . gsub ( / ^_|_$ / , "" ) { label : label , project_id : "#{label}:#{proj_host}:#{norm_path}" . downcase , project_path : proj , project_name : File . basename ( proj ) , project_home : Discovery . parse_home ( proj ) , project_host : proj_host } end
Every doc gets this for provenance
Every doc gets this for provenance
proj
label