Sha256: 331a661c0a51fbf2a0a0bdc6fc62dfad6913f04b35bd0fac24e46d469b8dd471
Contents?: true
Size: 814 Bytes
Versions: 1
Compression:
Stored size: 814 Bytes
Contents
# frozen_string_literal: true require 'xezat' require 'xezat/ext/linguist/file_blob' module Xezat module Command class Bump def get_languages(top_src_dir) Xezat.logger.debug(' Collect languages') languages_file = File.expand_path(File.join(DATA_DIR, 'languages.yaml')) languages_candidates = YAML.safe_load(File.open(languages_file), [Symbol]) languages = [] Find.find(top_src_dir) do |path| next if FileTest.directory?(path) name = languages_candidates[File.extname(path)] if name.nil? language = Xezat::Linguist::FileBlob.new(path).language next if language.nil? name = language.name end languages << name end languages.uniq end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
xezat-0.2.3 | lib/xezat/command/bump/language.rb |