1if ENV['RACK_ENV'] == "production" 2 task default: %w[build] 3else 4 require 'rspec/core/rake_task' 5 task default: %w[validate spec build] 6end 7 8task :validate do 9 ruby "tools/yaml/validate-header.rb hyph-utf8/tex/generic/hyph-utf8/patterns/tex" 10end 11 12task :spec do 13 task = RSpec::Core::RakeTask.new 14 task.pattern = File.join(File.expand_path('../hyph-utf8/source/generic/hyph-utf8', __FILE__), RSpec::Core::RakeTask::DEFAULT_PATTERN) 15end 16 17# TODO: Rubocop 18task :build do 19 ruby "hyph-utf8/source/generic/hyph-utf8/generate-converters.rb" 20 ruby "hyph-utf8/source/generic/hyph-utf8/generate-pattern-loaders.rb" 21 ruby "hyph-utf8/source/generic/hyph-utf8/generate-ptex-patterns.rb" 22 ruby "hyph-utf8/source/generic/hyph-utf8/generate-tl-files.rb" 23 ruby "hyph-utf8/source/generic/hyph-utf8/generate-plain-patterns.rb" 24 system "tools/make_CTAN_zip.sh" 25end 26