modsvaskr 0.1.7 → 0.1.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/modsvaskr/in_game_tests_suite.rb +39 -0
- data/lib/modsvaskr/tests_suites/exterior_cell.rb +12 -24
- data/lib/modsvaskr/tests_suites/interior_cell.rb +12 -24
- data/lib/modsvaskr/tests_suites/npc.rb +12 -24
- data/lib/modsvaskr/tests_suites/npc_head.rb +12 -24
- data/lib/modsvaskr/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3a5763808fa45e04cd82bcaf607b12729ca43b5c2a40b8e3476abb3f012154e2
|
4
|
+
data.tar.gz: 428994ca324ac277fcfcb3e76f2c0a88ee6f8a53d0e862fbdbf7b6abca5323ed
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 629deb5ebde244b3d4eee1d0195aa6c8e84a96282a6968fc99e95a878e911d98bb3d50dd9538ede549163225e54bec1a92e3ac6c5befdca6dc15d3b4bc7c925b
|
7
|
+
data.tar.gz: 62f17178509041879839df331bcb6db369484159d6b13fe4a2c542ea70878a8571294dd006f68ae92ed0150f65b53daad8c10fbcd1563e2ea07796fedf5c7dff
|
@@ -0,0 +1,39 @@
|
|
1
|
+
module Modsvaskr
|
2
|
+
|
3
|
+
# Mixin adding methods to map directly a tests suite to an in-game tests suite
|
4
|
+
# Uses the following methods:
|
5
|
+
# * *in_game_tests_suite* -> Symbol: Name of the in-gamer tests suite on which we forward the tests run
|
6
|
+
module InGameTestsSuite
|
7
|
+
|
8
|
+
# Get the list of tests to be run in-game for a given list of test names.
|
9
|
+
# [API] - This method is mandatory for tests needing to be run in-game.
|
10
|
+
#
|
11
|
+
# Parameters::
|
12
|
+
# * *tests* (Array<String>): List of test names
|
13
|
+
# Result::
|
14
|
+
# * Hash<Symbol, Array<String> >: List of in-game test names, per in-game tests suite
|
15
|
+
def in_game_tests_for(tests)
|
16
|
+
{ in_game_tests_suite => tests }
|
17
|
+
end
|
18
|
+
|
19
|
+
# Set statuses based on the result of AutoTest statuses.
|
20
|
+
# AutoTest names are case insensitive.
|
21
|
+
# [API] - This method is mandatory for tests needing to be run in-game.
|
22
|
+
#
|
23
|
+
# Parameters::
|
24
|
+
# * *tests* (Array<String>): List of test names
|
25
|
+
# * *auto_test_statuses* (Hash<Symbol, Hash<String, String> >): In-game test statuses, per in-game test name, per in-game tests suite
|
26
|
+
# Result::
|
27
|
+
# * Array<[String, String]>: Corresponding list of [test name, test status]
|
28
|
+
def parse_auto_tests_statuses_for(tests, auto_test_statuses)
|
29
|
+
in_game_test_statuses = auto_test_statuses[in_game_tests_suite] || {}
|
30
|
+
tests.map do |test_name|
|
31
|
+
test_downcase = test_name.downcase
|
32
|
+
_in_game_test, in_game_test_status = in_game_test_statuses.find { |search_in_game_test, _search_in_game_test_status| search_in_game_test.downcase == test_downcase }
|
33
|
+
in_game_test_status.nil? ? nil : [test_name, in_game_test_status]
|
34
|
+
end.compact
|
35
|
+
end
|
36
|
+
|
37
|
+
end
|
38
|
+
|
39
|
+
end
|
@@ -1,9 +1,21 @@
|
|
1
|
+
require 'modsvaskr/in_game_tests_suite'
|
2
|
+
|
1
3
|
module Modsvaskr
|
2
4
|
|
3
5
|
module TestsSuites
|
4
6
|
|
5
7
|
class ExteriorCell < TestsSuite
|
6
8
|
|
9
|
+
include InGameTestsSuite
|
10
|
+
|
11
|
+
# Return the in-game tests suite to which we forward the tests to be run
|
12
|
+
#
|
13
|
+
# Result::
|
14
|
+
# * Symbol: In-game tests suite
|
15
|
+
def in_game_tests_suite
|
16
|
+
:locations
|
17
|
+
end
|
18
|
+
|
7
19
|
# Discover the list of tests information that could be run.
|
8
20
|
# [API] - This method is mandatory
|
9
21
|
#
|
@@ -98,30 +110,6 @@ module Modsvaskr
|
|
98
110
|
tests
|
99
111
|
end
|
100
112
|
|
101
|
-
# Get the list of tests to be run in-game for a given list of test names.
|
102
|
-
# [API] - This method is mandatory for tests needing to be run in-game.
|
103
|
-
#
|
104
|
-
# Parameters::
|
105
|
-
# * *tests* (Array<String>): List of test names
|
106
|
-
# Result::
|
107
|
-
# * Hash<Symbol, Array<String> >: List of in-game test names, per in-game tests suite
|
108
|
-
def in_game_tests_for(tests)
|
109
|
-
{ locations: tests }
|
110
|
-
end
|
111
|
-
|
112
|
-
# Set statuses based on the result of AutoTest statuses.
|
113
|
-
# AutoTest names are case insensitive.
|
114
|
-
# [API] - This method is mandatory for tests needing to be run in-game.
|
115
|
-
#
|
116
|
-
# Parameters::
|
117
|
-
# * *tests* (Array<String>): List of test names
|
118
|
-
# * *auto_test_statuses* (Hash<Symbol, Array<[String, String]> >): Ordered list of AutoTest [test name, test status], per AutoTest tests suite
|
119
|
-
# Result::
|
120
|
-
# * Array<[String, String]>: Corresponding list of [test name, test status]
|
121
|
-
def parse_auto_tests_statuses_for(tests, auto_test_statuses)
|
122
|
-
auto_test_statuses.key?(:locations) ? auto_test_statuses[:locations] : []
|
123
|
-
end
|
124
|
-
|
125
113
|
end
|
126
114
|
|
127
115
|
end
|
@@ -1,9 +1,21 @@
|
|
1
|
+
require 'modsvaskr/in_game_tests_suite'
|
2
|
+
|
1
3
|
module Modsvaskr
|
2
4
|
|
3
5
|
module TestsSuites
|
4
6
|
|
5
7
|
class InteriorCell < TestsSuite
|
6
8
|
|
9
|
+
include InGameTestsSuite
|
10
|
+
|
11
|
+
# Return the in-game tests suite to which we forward the tests to be run
|
12
|
+
#
|
13
|
+
# Result::
|
14
|
+
# * Symbol: In-game tests suite
|
15
|
+
def in_game_tests_suite
|
16
|
+
:locations
|
17
|
+
end
|
18
|
+
|
7
19
|
# Discover the list of tests information that could be run.
|
8
20
|
# [API] - This method is mandatory
|
9
21
|
#
|
@@ -44,30 +56,6 @@ module Modsvaskr
|
|
44
56
|
]
|
45
57
|
end
|
46
58
|
|
47
|
-
# Get the list of tests to be run in-game for a given list of test names.
|
48
|
-
# [API] - This method is mandatory for tests needing to be run in-game.
|
49
|
-
#
|
50
|
-
# Parameters::
|
51
|
-
# * *tests* (Array<String>): List of test names
|
52
|
-
# Result::
|
53
|
-
# * Hash<Symbol, Array<String> >: List of in-game test names, per in-game tests suite
|
54
|
-
def in_game_tests_for(tests)
|
55
|
-
{ locations: tests }
|
56
|
-
end
|
57
|
-
|
58
|
-
# Set statuses based on the result of AutoTest statuses.
|
59
|
-
# AutoTest names are case insensitive.
|
60
|
-
# [API] - This method is mandatory for tests needing to be run in-game.
|
61
|
-
#
|
62
|
-
# Parameters::
|
63
|
-
# * *tests* (Array<String>): List of test names
|
64
|
-
# * *auto_test_statuses* (Hash<Symbol, Array<[String, String]> >): Ordered list of AutoTest [test name, test status], per AutoTest tests suite
|
65
|
-
# Result::
|
66
|
-
# * Array<[String, String]>: Corresponding list of [test name, test status]
|
67
|
-
def parse_auto_tests_statuses_for(tests, auto_test_statuses)
|
68
|
-
auto_test_statuses.key?(:locations) ? auto_test_statuses[:locations] : []
|
69
|
-
end
|
70
|
-
|
71
59
|
end
|
72
60
|
|
73
61
|
end
|
@@ -1,9 +1,21 @@
|
|
1
|
+
require 'modsvaskr/in_game_tests_suite'
|
2
|
+
|
1
3
|
module Modsvaskr
|
2
4
|
|
3
5
|
module TestsSuites
|
4
6
|
|
5
7
|
class Npc < TestsSuite
|
6
8
|
|
9
|
+
include InGameTestsSuite
|
10
|
+
|
11
|
+
# Return the in-game tests suite to which we forward the tests to be run
|
12
|
+
#
|
13
|
+
# Result::
|
14
|
+
# * Symbol: In-game tests suite
|
15
|
+
def in_game_tests_suite
|
16
|
+
:npcs
|
17
|
+
end
|
18
|
+
|
7
19
|
# Discover the list of tests information that could be run.
|
8
20
|
# [API] - This method is mandatory
|
9
21
|
#
|
@@ -20,30 +32,6 @@ module Modsvaskr
|
|
20
32
|
tests
|
21
33
|
end
|
22
34
|
|
23
|
-
# Get the list of tests to be run in-game for a given list of test names.
|
24
|
-
# [API] - This method is mandatory for tests needing to be run in-game.
|
25
|
-
#
|
26
|
-
# Parameters::
|
27
|
-
# * *tests* (Array<String>): List of test names
|
28
|
-
# Result::
|
29
|
-
# * Hash<Symbol, Array<String> >: List of in-game test names, per in-game tests suite
|
30
|
-
def in_game_tests_for(tests)
|
31
|
-
{ npcs: tests }
|
32
|
-
end
|
33
|
-
|
34
|
-
# Set statuses based on the result of AutoTest statuses.
|
35
|
-
# AutoTest names are case insensitive.
|
36
|
-
# [API] - This method is mandatory for tests needing to be run in-game.
|
37
|
-
#
|
38
|
-
# Parameters::
|
39
|
-
# * *tests* (Array<String>): List of test names
|
40
|
-
# * *auto_test_statuses* (Hash<Symbol, Array<[String, String]> >): Ordered list of AutoTest [test name, test status], per AutoTest tests suite
|
41
|
-
# Result::
|
42
|
-
# * Array<[String, String]>: Corresponding list of [test name, test status]
|
43
|
-
def parse_auto_tests_statuses_for(tests, auto_test_statuses)
|
44
|
-
auto_test_statuses.key?(:npcs) ? auto_test_statuses[:npcs] : []
|
45
|
-
end
|
46
|
-
|
47
35
|
end
|
48
36
|
|
49
37
|
end
|
@@ -1,9 +1,21 @@
|
|
1
|
+
require 'modsvaskr/in_game_tests_suite'
|
2
|
+
|
1
3
|
module Modsvaskr
|
2
4
|
|
3
5
|
module TestsSuites
|
4
6
|
|
5
7
|
class NpcHead < TestsSuite
|
6
8
|
|
9
|
+
include InGameTestsSuite
|
10
|
+
|
11
|
+
# Return the in-game tests suite to which we forward the tests to be run
|
12
|
+
#
|
13
|
+
# Result::
|
14
|
+
# * Symbol: In-game tests suite
|
15
|
+
def in_game_tests_suite
|
16
|
+
:npcshead
|
17
|
+
end
|
18
|
+
|
7
19
|
# Discover the list of tests information that could be run.
|
8
20
|
# [API] - This method is mandatory
|
9
21
|
#
|
@@ -20,30 +32,6 @@ module Modsvaskr
|
|
20
32
|
tests
|
21
33
|
end
|
22
34
|
|
23
|
-
# Get the list of tests to be run in-game for a given list of test names.
|
24
|
-
# [API] - This method is mandatory for tests needing to be run in-game.
|
25
|
-
#
|
26
|
-
# Parameters::
|
27
|
-
# * *tests* (Array<String>): List of test names
|
28
|
-
# Result::
|
29
|
-
# * Hash<Symbol, Array<String> >: List of in-game test names, per in-game tests suite
|
30
|
-
def in_game_tests_for(tests)
|
31
|
-
{ npcshead: tests }
|
32
|
-
end
|
33
|
-
|
34
|
-
# Set statuses based on the result of AutoTest statuses.
|
35
|
-
# AutoTest names are case insensitive.
|
36
|
-
# [API] - This method is mandatory for tests needing to be run in-game.
|
37
|
-
#
|
38
|
-
# Parameters::
|
39
|
-
# * *tests* (Array<String>): List of test names
|
40
|
-
# * *auto_test_statuses* (Hash<Symbol, Array<[String, String]> >): Ordered list of AutoTest [test name, test status], per AutoTest tests suite
|
41
|
-
# Result::
|
42
|
-
# * Array<[String, String]>: Corresponding list of [test name, test status]
|
43
|
-
def parse_auto_tests_statuses_for(tests, auto_test_statuses)
|
44
|
-
auto_test_statuses.key?(:npcshead) ? auto_test_statuses[:npcshead] : []
|
45
|
-
end
|
46
|
-
|
47
35
|
end
|
48
36
|
|
49
37
|
end
|
data/lib/modsvaskr/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: modsvaskr
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Muriel Salvan
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-02-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: curses_menu
|
@@ -107,6 +107,7 @@ files:
|
|
107
107
|
- lib/modsvaskr/game.rb
|
108
108
|
- lib/modsvaskr/games/skyrim_se.rb
|
109
109
|
- lib/modsvaskr/in_game_tests_runner.rb
|
110
|
+
- lib/modsvaskr/in_game_tests_suite.rb
|
110
111
|
- lib/modsvaskr/logger.rb
|
111
112
|
- lib/modsvaskr/run_cmd.rb
|
112
113
|
- lib/modsvaskr/tests_runner.rb
|