mumukit-assistant 0.2.1 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/mumukit/assistant/rule.rb +2 -2
- data/lib/mumukit/assistant/rule/content_empty.rb +1 -1
- data/lib/mumukit/assistant/rule/these_expectations_failed.rb +3 -3
- data/lib/mumukit/assistant/rule/these_tests_failed.rb +2 -2
- data/lib/mumukit/assistant/version.rb +1 -1
- metadata +10 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 29885fb93c1ff49b04ede27436856e8e7549d80289fde87d4fe8718cbaaf5c4d
|
4
|
+
data.tar.gz: 140e8f60b57c926d1d742597a0b452fa60c433b2a027b97b3da5ac435322e516
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5e8416c033c88103c41cd856f97c10a2dc761ae31b307f26a1f648b56fe7e8129f641ee21613de3873da210972df97ee1c7db716edc8b475b7c01835b09af2d4
|
7
|
+
data.tar.gz: 769602b7fe979b352c2a8de7e4cde8ed91933823bf25e7c618f670e9944c791c16c5dce6398c2634946311678926fae51bb94041dfff25a3238ecffdd986bfb3
|
@@ -1,7 +1,7 @@
|
|
1
1
|
module Mumukit::Assistant::Rule
|
2
2
|
def self.parse(hash)
|
3
|
-
message = Mumukit::Assistant::Message.parse hash
|
4
|
-
w = hash
|
3
|
+
message = Mumukit::Assistant::Message.parse hash.indifferent_get(:then)
|
4
|
+
w = hash.indifferent_get(:when)
|
5
5
|
if w.is_a? Hash
|
6
6
|
parse_complex_when w.first, message
|
7
7
|
else
|
@@ -17,11 +17,11 @@ class Mumukit::Assistant::Rule::TheseExpectationsFailed < Mumukit::Assistant::Ru
|
|
17
17
|
end
|
18
18
|
|
19
19
|
def failed_expectations(submission)
|
20
|
-
@failed_expectations ||= submission.expectation_results.select { |it| it
|
20
|
+
@failed_expectations ||= submission.expectation_results.select { |it| it.indifferent_get(:result).failed? }
|
21
21
|
end
|
22
22
|
|
23
23
|
def includes_failing_expectation?(humanized_expectation, submission)
|
24
24
|
binding, inspection = humanized_expectation.split(' ')
|
25
|
-
failed_expectations(submission).any? { |it| it
|
25
|
+
failed_expectations(submission).any? { |it| it.indifferent_get(:binding) == binding && it.indifferent_get(:inspection) == inspection }
|
26
26
|
end
|
27
|
-
end
|
27
|
+
end
|
@@ -16,10 +16,10 @@ class Mumukit::Assistant::Rule::TheseTestsFailed < Mumukit::Assistant::Rule::Sub
|
|
16
16
|
end
|
17
17
|
|
18
18
|
def includes_failing_test?(title, submission)
|
19
|
-
failed_tests(submission).map { |it| it
|
19
|
+
failed_tests(submission).map { |it| it.indifferent_get(:title).strip }.include?(title.strip)
|
20
20
|
end
|
21
21
|
|
22
22
|
def failed_tests(submission)
|
23
|
-
@failed_tests ||= submission.test_results.select { |it| it
|
23
|
+
@failed_tests ||= submission.test_results.select { |it| it.indifferent_get(:status).failed? }
|
24
24
|
end
|
25
25
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mumukit-assistant
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Julián Berbel Alt
|
@@ -9,56 +9,50 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2020-
|
12
|
+
date: 2020-05-15 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|
16
16
|
requirement: !ruby/object:Gem::Requirement
|
17
17
|
requirements:
|
18
|
-
- - "
|
19
|
-
- !ruby/object:Gem::Version
|
20
|
-
version: '1.16'
|
21
|
-
- - "<"
|
18
|
+
- - "~>"
|
22
19
|
- !ruby/object:Gem::Version
|
23
|
-
version: '
|
20
|
+
version: '2.0'
|
24
21
|
type: :development
|
25
22
|
prerelease: false
|
26
23
|
version_requirements: !ruby/object:Gem::Requirement
|
27
24
|
requirements:
|
28
|
-
- - "
|
29
|
-
- !ruby/object:Gem::Version
|
30
|
-
version: '1.16'
|
31
|
-
- - "<"
|
25
|
+
- - "~>"
|
32
26
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
27
|
+
version: '2.0'
|
34
28
|
- !ruby/object:Gem::Dependency
|
35
29
|
name: rake
|
36
30
|
requirement: !ruby/object:Gem::Requirement
|
37
31
|
requirements:
|
38
32
|
- - "~>"
|
39
33
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
34
|
+
version: '12.3'
|
41
35
|
type: :development
|
42
36
|
prerelease: false
|
43
37
|
version_requirements: !ruby/object:Gem::Requirement
|
44
38
|
requirements:
|
45
39
|
- - "~>"
|
46
40
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
41
|
+
version: '12.3'
|
48
42
|
- !ruby/object:Gem::Dependency
|
49
43
|
name: rspec
|
50
44
|
requirement: !ruby/object:Gem::Requirement
|
51
45
|
requirements:
|
52
46
|
- - "~>"
|
53
47
|
- !ruby/object:Gem::Version
|
54
|
-
version: '3'
|
48
|
+
version: '3.0'
|
55
49
|
type: :development
|
56
50
|
prerelease: false
|
57
51
|
version_requirements: !ruby/object:Gem::Requirement
|
58
52
|
requirements:
|
59
53
|
- - "~>"
|
60
54
|
- !ruby/object:Gem::Version
|
61
|
-
version: '3'
|
55
|
+
version: '3.0'
|
62
56
|
- !ruby/object:Gem::Dependency
|
63
57
|
name: mumukit-core
|
64
58
|
requirement: !ruby/object:Gem::Requirement
|