mumuki-gobstones-runner 2.0.0 → 2.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/checker.rb +5 -1
- data/lib/version_hook.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f44adc9fe38060062bccce5f76013a2dc72c7250945fc5752fd4f3cdbf2e88cc
|
4
|
+
data.tar.gz: 48b3344ff040307cdce4f4b52482de950bd020ff6d9b6653b64d1a40165ea64e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: de465e0e24873c663f402fc24af2929f3ae31ce035dcda624895816e2341b4234404059e8e99599bcd09ba1bf2768d842f7ceb4f32beb7f457e2fdc2f0ba0574
|
7
|
+
data.tar.gz: 150f956d8eb244b5a9d71a88d43f1f68e8854596e7e65323cf499104e7f31b620bb0ce5dc022ead09a994aff64e4da2ed7a1a7c24272eccd7a9ef1a79604f22c
|
data/lib/checker.rb
CHANGED
@@ -113,12 +113,16 @@ module Gobstones
|
|
113
113
|
return "no_stones" if code == 'cannot-remove-stone'
|
114
114
|
return "out_of_board" if code == 'cannot-move-to'
|
115
115
|
return "unassigned_variable" if code == 'undefined-variable'
|
116
|
-
return "wrong_argument_type" if
|
116
|
+
return "wrong_argument_type" if has_wrong_argument_type? code
|
117
117
|
return "wrong_arguments_quantity" if code.include? 'arity-mismatch'
|
118
118
|
|
119
119
|
code
|
120
120
|
end
|
121
121
|
|
122
|
+
def has_wrong_argument_type?(code)
|
123
|
+
code.match Regexp.union('type-mismatch', 'expected-value-of-type')
|
124
|
+
end
|
125
|
+
|
122
126
|
def adapt_value(return_value)
|
123
127
|
type = return_value[:type]
|
124
128
|
value = return_value[:value]
|
data/lib/version_hook.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mumuki-gobstones-runner
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rodrigo Alfonso
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-03-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mumukit
|
@@ -208,7 +208,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
208
208
|
- !ruby/object:Gem::Version
|
209
209
|
version: '0'
|
210
210
|
requirements: []
|
211
|
-
rubygems_version: 3.0.
|
211
|
+
rubygems_version: 3.0.3
|
212
212
|
signing_key:
|
213
213
|
specification_version: 4
|
214
214
|
summary: Gobstones Runner for Mumuki
|