mumukit 2.43.0 → 2.44.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: e040afd28d4d12898e0c213d39b5f5404c7ba05cda3f05875700fb418fc33ddd
4
- data.tar.gz: be2b5fe4e2240b8056dbb7147a2a6def7a7dfaf7c8d2a0b2b23475f4a5fed83e
3
+ metadata.gz: 027a4f91a42c7b90c17b418228e73956f751f707e51d6ded4c4802126f25d1c4
4
+ data.tar.gz: e6fe7203e99fecf139597da9b5c833717b49af81a1cd5402d05fd6d752f9e7f3
5
5
  SHA512:
6
- metadata.gz: 5fe277900418f475fdfebd7eb9481503bf2f0c5cd83caa8ee6386eacca9d8321810aba13a1ae4eb48cc128a91712fe82abdac244e1b52864680008b6039769ef
7
- data.tar.gz: 5b3d7125b58decee7c8e74304444191153545f17dce74dfd190f6669aa6016ecca64df515b2ec072693e14f8aed9732b7f68c6c95a2526b82cc8a60bd0482e99
6
+ metadata.gz: cc83fce40d4e6c02abbdc0fb05dbc481d8eab5538d4cd7109646a853cc2b4f88e168569857eafe02be21c7a76fb2e3214d7a048b49f170563c5c07f6a2eaecc8
7
+ data.tar.gz: 67ab25ad98d772145044d999bcc6af135d314c5102293b3604fcfb4c50dc0e34ef4d1fe6d9ddde428999a73fadd40a5942fd5a2f0905be59f3266b5543544ede
@@ -8,15 +8,19 @@ class Mumukit::Explainer
8
8
  private
9
9
 
10
10
  def explanations(content, test_results)
11
+ eval_explain_methods(content, test_results)
12
+ .map { |explain| I18n.t(explain[:key], **explain[:binding]) }
13
+ end
14
+
15
+ def eval_explain_methods(content, test_results)
11
16
  explain_methods
12
17
  .map { |selector, key| eval_explain(selector, key, content, test_results) }
13
18
  .compact
14
- .map { |explain| I18n.t(explain[:key], explain[:binding]) }
15
19
  end
16
20
 
17
21
  def eval_explain(selector, key, content, test_results)
18
22
  send(selector, content, test_results).try do |it|
19
- {key: key, binding: it}
23
+ {key: key, binding: it.is_a?(Hash) ? it : {}}
20
24
  end
21
25
  end
22
26
 
data/lib/mumukit/hook.rb CHANGED
@@ -7,8 +7,8 @@ class Mumukit::Hook
7
7
  @config = (config||{}).with_indifferent_access
8
8
  end
9
9
 
10
- def t(*args)
11
- I18n.t(*args)
10
+ def t(*args, **kwargs)
11
+ I18n.t(*args, **kwargs)
12
12
  end
13
13
 
14
14
  def method_missing(name, *args, &block)
@@ -68,8 +68,8 @@ module Mumukit::Metatest
68
68
  I18n.t locale(:goal_passed)
69
69
  end
70
70
 
71
- def fail_t(sym, *args)
72
- fail I18n.t locale(sym), *args
71
+ def fail_t(sym, **kwargs)
72
+ fail I18n.t(locale(sym), **kwargs)
73
73
  end
74
74
 
75
75
  def locale(sym)
@@ -1,3 +1,3 @@
1
1
  module Mumukit
2
- VERSION = '2.43.0'
2
+ VERSION = '2.44.0'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mumukit
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.43.0
4
+ version: 2.44.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Franco Leonardo Bulgarelli
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-04-21 00:00:00.000000000 Z
11
+ date: 2023-04-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '12.3'
33
+ version: '13.0'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '12.3'
40
+ version: '13.0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rspec
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -126,16 +126,22 @@ dependencies:
126
126
  name: i18n
127
127
  requirement: !ruby/object:Gem::Requirement
128
128
  requirements:
129
- - - "~>"
129
+ - - ">="
130
130
  - !ruby/object:Gem::Version
131
131
  version: '0.7'
132
+ - - "<"
133
+ - !ruby/object:Gem::Version
134
+ version: '2'
132
135
  type: :runtime
133
136
  prerelease: false
134
137
  version_requirements: !ruby/object:Gem::Requirement
135
138
  requirements:
136
- - - "~>"
139
+ - - ">="
137
140
  - !ruby/object:Gem::Version
138
141
  version: '0.7'
142
+ - - "<"
143
+ - !ruby/object:Gem::Version
144
+ version: '2'
139
145
  - !ruby/object:Gem::Dependency
140
146
  name: puma
141
147
  requirement: !ruby/object:Gem::Requirement
@@ -156,14 +162,14 @@ dependencies:
156
162
  requirements:
157
163
  - - "~>"
158
164
  - !ruby/object:Gem::Version
159
- version: '1.25'
165
+ version: '2.0'
160
166
  type: :runtime
161
167
  prerelease: false
162
168
  version_requirements: !ruby/object:Gem::Requirement
163
169
  requirements:
164
170
  - - "~>"
165
171
  - !ruby/object:Gem::Version
166
- version: '1.25'
172
+ version: '2.0'
167
173
  - !ruby/object:Gem::Dependency
168
174
  name: excon
169
175
  requirement: !ruby/object:Gem::Requirement
@@ -246,28 +252,28 @@ dependencies:
246
252
  requirements:
247
253
  - - "~>"
248
254
  - !ruby/object:Gem::Version
249
- version: '1.3'
255
+ version: '1.20'
250
256
  type: :runtime
251
257
  prerelease: false
252
258
  version_requirements: !ruby/object:Gem::Requirement
253
259
  requirements:
254
260
  - - "~>"
255
261
  - !ruby/object:Gem::Version
256
- version: '1.3'
262
+ version: '1.20'
257
263
  - !ruby/object:Gem::Dependency
258
264
  name: mumukit-directives
259
265
  requirement: !ruby/object:Gem::Requirement
260
266
  requirements:
261
267
  - - "~>"
262
268
  - !ruby/object:Gem::Version
263
- version: '0.4'
269
+ version: '0.6'
264
270
  type: :runtime
265
271
  prerelease: false
266
272
  version_requirements: !ruby/object:Gem::Requirement
267
273
  requirements:
268
274
  - - "~>"
269
275
  - !ruby/object:Gem::Version
270
- version: '0.4'
276
+ version: '0.6'
271
277
  - !ruby/object:Gem::Dependency
272
278
  name: mumukit-content-type
273
279
  requirement: !ruby/object:Gem::Requirement
@@ -368,14 +374,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
368
374
  requirements:
369
375
  - - ">="
370
376
  - !ruby/object:Gem::Version
371
- version: '0'
377
+ version: '3.0'
372
378
  required_rubygems_version: !ruby/object:Gem::Requirement
373
379
  requirements:
374
380
  - - ">="
375
381
  - !ruby/object:Gem::Version
376
382
  version: '0'
377
383
  requirements: []
378
- rubygems_version: 3.0.3
384
+ rubygems_version: 3.4.10
379
385
  signing_key:
380
386
  specification_version: 4
381
387
  summary: Mumuki Test Server Development Kit