mumukit 2.38.0 → 2.39.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: b3876e1a398e3f2e0cf33f7aa1a4df85979cca7ffef37b4070d5344c2072e952
4
- data.tar.gz: 9dcde120df168b2898461e08cb08ca26c219fdaf0791bc38a133891a7dba51ad
3
+ metadata.gz: 5b9858200475db12bcde59a3fa64da16b23378dbc1267e2afca1c022819e53ac
4
+ data.tar.gz: 610db1e398ff3d5cd4fcbd11254ea9efddbb4be58d49a476253ada519cc573a1
5
5
  SHA512:
6
- metadata.gz: 6863a908811d9df5f390827c8c3fdea11d0c3de67b07435658d037d8b5ba9ae9d9c13cb92236bbab0e29bf942d7d668468112295ca1ce9f6cda2312cc1e0c328
7
- data.tar.gz: 2ab1f2822e74a9b7c0a628f4661749a6e1d87e2c69c833844a34cc434ba626e61026a7f61e554a8dfccd9dc60e414b1836ad143fbfeafcbc2199e3b01801e63c
6
+ metadata.gz: fc2fdf2ae6b17a495a7e016466046c54127f8acb8ec1628ed2e97dc16756caa8e18dbcc5cad8cd637a6e840597da70ea7da25664ed21a30ae4577d39de7a2e1e
7
+ data.tar.gz: 3e2cb601a96843576d46c5e401ff1999a0a4435be949e1fb66e2f15c94ed108a6c33b64af9e6bfd008ef0514ff6cde1deab888ddbff82d0ebd8d2eea478edbdf
@@ -24,7 +24,11 @@ module Mumukit
24
24
  exclude: (expectations[:exceptions] + default_smell_exceptions)
25
25
  },
26
26
  domainLanguage: domain_language
27
- }.merge({normalizationOptions: normalization_options(request).presence}.compact))
27
+ }.merge({
28
+ originalLanguage: original_language,
29
+ autocorrectionRules: autocorrection_rules.try { |it| positive_and_negative it }.presence,
30
+ normalizationOptions: normalization_options(request).presence
31
+ }.compact))
28
32
  end
29
33
 
30
34
  def run_mulang_analysis(analysis)
@@ -33,7 +37,6 @@ module Mumukit
33
37
  raise Mumukit::CompilationError, "Can not handle mulang results for analysis #{analysis}"
34
38
  end
35
39
 
36
-
37
40
  def domain_language
38
41
  {
39
42
  caseStyle: "CamelCase",
@@ -46,6 +49,13 @@ module Mumukit
46
49
  request.dig(:settings, :normalization_options) || {}
47
50
  end
48
51
 
52
+ def autocorrection_rules
53
+ {}
54
+ end
55
+
56
+ def original_language
57
+ end
58
+
49
59
  def default_smell_exceptions
50
60
  []
51
61
  end
@@ -81,5 +91,11 @@ module Mumukit
81
91
  include Mumukit::Templates::WithCodeSmells
82
92
  end
83
93
  end
94
+
95
+ private
96
+
97
+ def positive_and_negative(rules)
98
+ rules.flat_map { |k, v| [[k, v], ["Not:#{k}", "Not:#{v}"]] }.to_h
99
+ end
84
100
  end
85
101
  end
@@ -1,3 +1,3 @@
1
1
  module Mumukit
2
- VERSION = '2.38.0'
2
+ VERSION = '2.39.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.38.0
4
+ version: 2.39.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: 2021-01-20 00:00:00.000000000 Z
11
+ date: 2021-01-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler