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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 518474522ae613afe0b7304efbac59c26aa0151baf03709e4364e257d4712e3c
4
- data.tar.gz: 7d287f14be1ab7ff6885517a1660572352aaae5fb1b6b0bf17f6935dc1990174
3
+ metadata.gz: 508791b10c86f98d4f383aa2677e2f1758f0b8d5720fe5053a6411a84d97b484
4
+ data.tar.gz: 9311ede89533d1e9a254aef5d825a9e956ee190f73aa613f50181e87ed15ab6e
5
5
  SHA512:
6
- metadata.gz: 4e46e653a4fee5e2b65e4f679de06710395a4e83bb7679a04f0eb58fc8f42b68a802476a05463858036094c4f6088970778c12919b939c0a17b253da60968f5a
7
- data.tar.gz: c7c5300ac824bb579cfa19969a45502f0cddc830dd3412fa73d795e7317cf9457f7c63f84d89c9bd8ef2d46fa24b467a47cbf689c65b52ef28bec67b1d4fcbcb
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
- "#{explanation_introduction_phrase}\n\n#{explanation_paragraphs(tips).join("\n\n")}\n\n#{retry_phrase}\n"
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
@@ -1,5 +1,5 @@
1
1
  class Mumukit::Assistant::Rule::ContentEmpty < Mumukit::Assistant::Rule::Base
2
2
  def matches?(submission)
3
- submission.solution.empty?
3
+ submission.solution.blank?
4
4
  end
5
5
  end
@@ -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[:result].failed? }
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[:binding] == binding && it[:inspection] == inspection }
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[:title].strip }.include?(title.strip)
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[:status].failed? }
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[:then]
4
- w = hash[:when]
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
@@ -1,5 +1,5 @@
1
1
  module Mumukit
2
2
  class Assistant
3
- VERSION = "0.2.1"
3
+ VERSION = "0.4.0"
4
4
  end
5
5
  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.2.1
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: 2020-03-22 00:00:00.000000000 Z
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: '3'
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: '3'
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: '10.0'
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: '10.0'
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: '3'
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.3'
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.3'
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
- rubyforge_project:
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