-
Notifications
You must be signed in to change notification settings - Fork 128
/
Rakefile
47 lines (41 loc) · 1.49 KB
/
Rakefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# All commands are prefixed with "treat:".
namespace :treat do
# Require the Treat library.
require_relative 'lib/treat'
# Sandbox a script, for development.
# Syntax: rake treat:sandbox
task :sandbox do
require_relative 'spec/sandbox'
end
# Prints the current version of Treat.
# Syntax: rake treat:version
task :version do
puts Treat::VERSION
end
# Installs a language pack (default to english).
# A language pack is a set of gems, binaries and
# model files that support the various workers
# that are available for that particular language.
# Syntax: rake treat:install (installs english)
# - OR - rake treast:install[some_language]
task :install, [:language] do |t, args|
language = args.language || 'english'
Treat::Core::Installer.install(language)
end
# Runs 1) the core library specs and 2) the
# worker specs for a) all languages (default)
# or b) a specific language (if specified).
# Also outputs the coverage for the whole
# library to treat/coverage (using SimpleCov).
# N.B. the worker specs are dynamically defined
# following the examples found in spec/workers.
# (see /spec/language/workers for more info)
# Syntax: rake treat:spec (core + all langs)
# - OR - rake treat:spec[some_language]
task :spec, [:language] do |t, args|
require_relative 'spec/helper'
Treat::Specs::Helper.start_coverage
Treat::Specs::Helper.run_library_specs
Treat::Specs::Helper.run_language_specs(args.language)
end
end