modl 0.3.4 → 0.3.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 54f3321cf2f6325e99bae9efc3cfb8630ff764ff68e8b12378a517dcf60edc10
4
- data.tar.gz: ed2c4999d2e0d2abd71f2fe11b377594ba8356e9a2b9a8f42e61c6af911e0f84
3
+ metadata.gz: d523ed6cc09d2f413a4f0df27405a219d107c5f5219e2a8fcb2acb78f3f42370
4
+ data.tar.gz: 0cb8e6e85ca9d0421f87ca0a77532fe1a1c740864007136826b60eacab73f9ec
5
5
  SHA512:
6
- metadata.gz: aa50e7a3e4e54ed5310363b196e27d154ea8d6691e12c1a0a29d4d946a32602cabc8219293b2e7ff7dfbdc2c49e6b5bcd77b0b27aedc83c157fcffa137724bb1
7
- data.tar.gz: 9e5e8f8ae9634da50f48b64710864c2aa55c1f51b819943d2f646f788c07a7418b2b375569a3743f9e22edd86d85c6afe57bd87a577d5500e2c715414dd11c6c
6
+ metadata.gz: d3aa20fafe4caddf80691a676ff0e3e60c6a12b75a0831594d2dd676f31a9198926b4deef043502d9855bb247673368df449b74793db279afd9f162e4e88e030
7
+ data.tar.gz: 61414bce44abce673ce36303aa53aa981cf8445fd22d43a7843dc8d6fa906f4a466da3726bb883a730ead90daeb773df0a17eafd486dfd024a0ee1963344b2bd
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ 0.3.5
2
+ ===
3
+ - Fixed another bug with class handling to expand classes properly.
4
+
1
5
  0.3.4
2
6
  ===
3
7
  - Fixed a bug with class handling to expand classes properly.
@@ -992,5 +992,8 @@
992
992
  "expected_output": "{\"a\":3}"},
993
993
  {"input": "x=[1;;;;;;;2:::::::::3;;;;;;;;;;4:::::::::5]",
994
994
  "minimised_modl": "x=[1;;;;;;;2:::::::::3;;;;;;;;;;4:::::::::5]",
995
- "expected_output": "{\"x\" : [ 1, null, null, null, null, null, null, [2, null, null, null, null, null, null, null, null, 3], null, null, null, null, null, null, null, null, null, [4, null, null, null, null, null, null, null, null, 5] ]}"}
995
+ "expected_output": "{\"x\" : [ 1, null, null, null, null, null, null, [2, null, null, null, null, null, null, null, null, 3], null, null, null, null, null, null, null, null, null, [4, null, null, null, null, null, null, null, null, 5] ]}"},
996
+ {"input": "*LOAD=\"http://modules.num.uk/1.txt\";o=Tesco:Every Little Helps:[t=Customer Service:0845555555];",
997
+ "minimised_modl": "*LOAD=\"http://modules.num.uk/1.txt\";o=Tesco:Every Little Helps:[t=Customer Service:0845555555];",
998
+ "expected_output": "{\n \"organisation\": {\n \"object_type\": \"entity\",\n \"object_display_name\": \"Organisation\",\n \"description_default\": \"View Organisation\",\n \"name\": \"Tesco\",\n \"slogan\": \"Every Little Helps\",\n \"objects\": [\n {\n \"telephone\": {\n \"object_type\": \"media\",\n \"object_display_name\": \"Telephone\",\n \"description_default\": \"Call\",\n \"prefix\": \"tel://\",\n \"media_type\": \"core\",\n \"description\": \"Customer Service\",\n \"value\": \"0845555555\"\n }\n }\n ]\n }\n}\n"}
996
999
  ]
@@ -151,13 +151,10 @@ module MODL
151
151
  end
152
152
 
153
153
  def self.key_list(global, clazz, len)
154
+ return [] if clazz.nil?
154
155
  list = clazz.keylist_of_length(len)
155
156
  return list if !list.nil? && list.length > 0
156
157
  superclass = global.classs(clazz.superclass)
157
- if superclass.nil?
158
- raise InterpreterError,
159
- 'No key list of the correct length in class ' + clazz.name_or_id + ' - looking for one of length ' + len.to_s
160
- end
161
158
  key_list(global, superclass, len)
162
159
  end
163
160
 
@@ -1,5 +1,5 @@
1
1
  module MODL
2
2
  module Parser
3
- VERSION = "0.3.4"
3
+ VERSION = "0.3.5"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: modl
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.4
4
+ version: 0.3.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tony Walmsley