forked from appium/ruby_lib_core
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRakefile
More file actions
88 lines (76 loc) · 2.34 KB
/
Rakefile
File metadata and controls
88 lines (76 loc) · 2.34 KB
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
require 'bundler/gem_tasks'
require 'rake/testtask'
require 'yard'
require 'rubocop/rake_task'
desc('setup development environment')
task :setup do |_t, _args|
system %w(bundle install)
end
namespace :test do
namespace :func do
desc('Run all iOS related tests in test directory')
Rake::TestTask.new(:ios) do |t|
t.libs << 'test'
t.libs << 'lib'
t.test_files = FileList['test/functional/ios/**/*_test.rb']
end
desc('Run all Android related tests in test directory')
Rake::TestTask.new(:android) do |t|
t.libs << 'test'
t.libs << 'lib'
t.test_files = FileList['test/functional/android/**/*_test.rb']
end
end
desc('Run all unit tests in test directory')
Rake::TestTask.new(:unit) do |t|
t.libs << 'test'
t.libs << 'lib'
t.test_files = FileList['test/unit/**/*_test.rb']
end
namespace :unit do
desc('Run all iOS related unit tests in test directory')
Rake::TestTask.new(:ios) do |t|
t.libs << 'test'
t.libs << 'lib'
t.test_files = FileList['test/unit/ios/**/*_test.rb']
end
desc('Run all Android related unit tests in test directory')
Rake::TestTask.new(:android) do |t|
t.libs << 'test'
t.libs << 'lib'
t.test_files = FileList['test/unit/android/**/*_test.rb']
end
desc('Run all common related unit tests in test directory')
Rake::TestTask.new(:common) do |t|
t.libs << 'test'
t.libs << 'lib'
t.test_files = FileList['test/unit/common/**/*_test.rb']
end
end
end
desc('Generate yardoc')
YARD::Rake::YardocTask.new do |t|
t.files = %w(lib/**/*.rb)
end
desc('Execute RuboCop static code analysis')
RuboCop::RakeTask.new(:rubocop) do |t|
t.patterns = %w(lib test script)
t.options = %w(-D)
t.fail_on_error = true
end
desc("print commands which haven't implemented yet.")
namespace :commands do
require './script/commands'
task :mjsonwp do |_t, _args|
c = Script::CommandsChecker.new
c.get_mjsonwp_routes
c.get_all_command_path './mjsonwp_routes.js'
c.all_diff_commands_mjsonwp.each { |key, value| puts("command: #{key}, method: #{value}") }
end
task :w3c do |_t, _args|
c = Script::CommandsChecker.new
c.get_mjsonwp_routes
c.get_all_command_path './mjsonwp_routes.js'
c.all_diff_commands_w3c.each { |key, value| puts("command: #{key}, method: #{value}") }
end
end