Sha256: 129331e8c6d09cc252a51206c16ee37ce90bde2209995019cd336b9c81b5fbff
Contents?: true
Size: 649 Bytes
Versions: 3
Compression:
Stored size: 649 Bytes
Contents
# frozen_string_literal: true module AppMap module Service class Guesser POSSIBLE_PATHS = %w[app/controllers app/models lib] class << self def guess_name reponame = lambda do next unless File.directory?('.git') repo_name = `git config --get remote.origin.url`.strip repo_name.split('/').last.split('.').first unless repo_name == '' end dirname = -> { Dir.pwd.split('/').last } reponame.() || dirname.() end def guess_paths POSSIBLE_PATHS.select { |path| File.directory?(path) } end end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
appmap-0.52.0 | lib/appmap/service/guesser.rb |
appmap-0.51.3 | lib/appmap/service/guesser.rb |
appmap-0.51.2 | lib/appmap/service/guesser.rb |