mirror of
https://github.com/KevinMidboe/linguist.git
synced 2025-10-29 09:40:21 +00:00
prefer to load from languages.json if it exists
This commit is contained in:
9
Rakefile
9
Rakefile
@@ -1,5 +1,7 @@
|
||||
require 'rake/clean'
|
||||
require 'rake/testtask'
|
||||
require 'yaml'
|
||||
require 'json'
|
||||
|
||||
task :default => :test
|
||||
|
||||
@@ -13,6 +15,13 @@ task :samples do
|
||||
File.open('lib/linguist/samples.json', 'w') { |io| io.write json }
|
||||
end
|
||||
|
||||
task :build_gem do
|
||||
languages = YAML.load_file("lib/linguist/languages.yml")
|
||||
File.write("lib/linguist/languages.json", JSON.dump(languages))
|
||||
`gem build github-linguist.gemspec`
|
||||
File.delete("lib/linguist/languages.json")
|
||||
end
|
||||
|
||||
namespace :classifier do
|
||||
LIMIT = 1_000
|
||||
|
||||
|
||||
Reference in New Issue
Block a user