Sha256: 5e6c54fbe974ac524e0cf4f4da06ad05f976aebb40dd50ee2acfa39e271bb168
Contents?: true
Size: 834 Bytes
Versions: 2
Compression:
Stored size: 834 Bytes
Contents
module Licensee class Project class PackageInfo < Licensee::Project::File def possible_matchers case ::File.extname(filename) when '.gemspec' [Matchers::Gemspec] when '.json' [Matchers::NpmBower] else if filename == 'DESCRIPTION' && content.match(/^Package:/) [Matchers::Cran] elsif filename == 'dist.ini' [Matchers::DistZilla] else [] end end end def self.name_score(filename) return 1.0 if ::File.extname(filename) == '.gemspec' return 1.0 if filename == 'package.json' return 0.8 if filename == 'dist.ini' return 0.9 if filename == 'DESCRIPTION' return 0.75 if filename == 'bower.json' 0.0 end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
licensee-8.9.2 | lib/licensee/project_files/package_info.rb |
licensee-8.9.0 | lib/licensee/project_files/package_info.rb |