lib/licensed/source/manifest.rb
# Returns the top-most directory that is common to all paths in `sources`
Returns the top-most directory that is common to all paths in `sources`
Returns the top - most directory that is common to all paths in ` sources `
def sources_license_path(sources, root)
          return source_directory(sources[0]) if sources.size == 1
          common_prefix = Pathname.common_prefix(*sources).to_path
          return common_prefix if common_prefix != root
          source_directory(sources.first)
        end
def sources_license_path ( sources , root ) return source_directory ( sources [ 0 ] ) if sources . size == 1 common_prefix = Pathname . common_prefix ( * sources ) . to_path return common_prefix if common_prefix != root source_directory ( sources . first ) end
Returns the top-most directory that is common to all paths in `sources`
Returns the top - most directory that is common to all paths in ` sources `
# return the source directory if there is only one source given # don't allow the workspace root to be used as common prefix # the project this is run for should be excluded from the manifest, # or ignored in the config.  any license in the root should be ignored. # use the first source directory as the license path.
sources
root