mumuki-gobstones-runner 1.12.0 → 1.12.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/checker.rb +5 -1
  3. data/lib/version_hook.rb +1 -1
  4. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1e36d7b11f8825eeb025a780fce051608454b8de38e264a96b3d052e5925bc29
4
- data.tar.gz: 5c4fe022a38ce11a63bd0281118432ef50c0bbc4abf1be7eb9af45270a880713
3
+ metadata.gz: 723bbfbcc40eeb896fff1a108034ed476bece40a65c756d3142de9d557063c7e
4
+ data.tar.gz: 7da68cd760020ce4bd4fdaa49443101a53f72d8c1957444767da42578cfa0c5c
5
5
  SHA512:
6
- metadata.gz: abbc0be7c630768d595e92ba3a73b09985fdbaf11a691a2b348a2ef3941cd1e25ec0c2427400420dd612adb5c8bdc9158cde055af9d0591b620d52bd7251a838
7
- data.tar.gz: cce358699eb00043da2d7a1c543418dc75e53231db57bc0a86fee4a01b139bc7ef9b43240b908fbafabf31ea150676d1e1291e1e52eb5298d59a9e89d22c8752
6
+ metadata.gz: 8451a0d0d8c65ab5af1e2986aec3126dc46e887a83fca0ddfea0f9bbfa3f7206749d981cd51bced05da712d37af8e7a1368e9bcf9a227f156cffd39e3abbda39
7
+ data.tar.gz: c226b89c9ef297094423efd971e29c233c8dff01fada80b4451c217857dd27f2cb047716aa36e5b25e448fbed1792be916bcae88cb2289e582f8b4e4f03298e9
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 code.include? 'type-mismatch'
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
@@ -1,3 +1,3 @@
1
1
  module GobstonesVersionHook
2
- VERSION = '1.12.0'
2
+ VERSION = '1.12.1'
3
3
  end
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: 1.12.0
4
+ version: 1.12.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-02-21 00:00:00.000000000 Z
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.2
211
+ rubygems_version: 3.0.3
212
212
  signing_key:
213
213
  specification_version: 4
214
214
  summary: Gobstones Runner for Mumuki