mumukit-assistant 0.2.1 → 0.4.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/narrator.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/rule.rb +2 -2
- data/lib/mumukit/assistant/version.rb +1 -1
- metadata +28 -21
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 508791b10c86f98d4f383aa2677e2f1758f0b8d5720fe5053a6411a84d97b484
|
4
|
+
data.tar.gz: 9311ede89533d1e9a254aef5d825a9e956ee190f73aa613f50181e87ed15ab6e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bb4842ffe871313b6340995ff3b20ece3da4a3420a3aae10f88576f353ee133f79dc6c4b4f1b3067f7e06d193a436b772b159c41cd4afedb553fed002771cb07
|
7
|
+
data.tar.gz: 0f8cca256392188bcaf8cca3dcb4d33164a806bada09c59a2aca75a7c9cb5820a7b4835046e36ba9fd19cf2ca761cf117b7b2b622e6f9dce5971ecc50679ab1b
|
@@ -12,7 +12,7 @@ class Mumukit::Assistant::Narrator
|
|
12
12
|
# Generated a markdown explanation using the seeded phrases. Uses `I18n` to get
|
13
13
|
# the appropriate locale.
|
14
14
|
def compose_explanation(tips)
|
15
|
-
"
|
15
|
+
"**#{explanation_introduction_phrase}**\n\n#{explanation_paragraphs(tips).join("\n\n")}\n\n#{retry_phrase}\n"
|
16
16
|
end
|
17
17
|
|
18
18
|
# Generates an html explantion.
|
@@ -58,7 +58,7 @@ class Mumukit::Assistant::Narrator
|
|
58
58
|
private
|
59
59
|
|
60
60
|
def t(key, args={})
|
61
|
-
I18n.t "narrator.#{key}_#{@seed[key]}", args
|
61
|
+
I18n.t "narrator.#{key}_#{@seed[key]}", **args
|
62
62
|
end
|
63
63
|
|
64
64
|
def self.random_index
|
@@ -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
|
@@ -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
|
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.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Julián Berbel Alt
|
@@ -9,70 +9,78 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2023-04-16 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: '13.0'
|
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: '13.0'
|
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'
|
49
|
+
type: :development
|
50
|
+
prerelease: false
|
51
|
+
version_requirements: !ruby/object:Gem::Requirement
|
52
|
+
requirements:
|
53
|
+
- - "~>"
|
54
|
+
- !ruby/object:Gem::Version
|
55
|
+
version: '3.0'
|
56
|
+
- !ruby/object:Gem::Dependency
|
57
|
+
name: i18n
|
58
|
+
requirement: !ruby/object:Gem::Requirement
|
59
|
+
requirements:
|
60
|
+
- - "~>"
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
version: '1.0'
|
55
63
|
type: :development
|
56
64
|
prerelease: false
|
57
65
|
version_requirements: !ruby/object:Gem::Requirement
|
58
66
|
requirements:
|
59
67
|
- - "~>"
|
60
68
|
- !ruby/object:Gem::Version
|
61
|
-
version: '
|
69
|
+
version: '1.0'
|
62
70
|
- !ruby/object:Gem::Dependency
|
63
71
|
name: mumukit-core
|
64
72
|
requirement: !ruby/object:Gem::Requirement
|
65
73
|
requirements:
|
66
74
|
- - "~>"
|
67
75
|
- !ruby/object:Gem::Version
|
68
|
-
version: '1.
|
76
|
+
version: '1.20'
|
69
77
|
type: :runtime
|
70
78
|
prerelease: false
|
71
79
|
version_requirements: !ruby/object:Gem::Requirement
|
72
80
|
requirements:
|
73
81
|
- - "~>"
|
74
82
|
- !ruby/object:Gem::Version
|
75
|
-
version: '1.
|
83
|
+
version: '1.20'
|
76
84
|
description:
|
77
85
|
email:
|
78
86
|
- julian@mumuki.org
|
@@ -111,15 +119,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
111
119
|
requirements:
|
112
120
|
- - ">="
|
113
121
|
- !ruby/object:Gem::Version
|
114
|
-
version: '0'
|
122
|
+
version: '3.0'
|
115
123
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
116
124
|
requirements:
|
117
125
|
- - ">="
|
118
126
|
- !ruby/object:Gem::Version
|
119
127
|
version: '0'
|
120
128
|
requirements: []
|
121
|
-
|
122
|
-
rubygems_version: 2.7.7
|
129
|
+
rubygems_version: 3.4.10
|
123
130
|
signing_key:
|
124
131
|
specification_version: 4
|
125
132
|
summary: Library for providing assistance with mumuki exercises
|