skeem 0.2.17 → 0.2.18

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.
@@ -47,8 +47,8 @@ module Skeem
47
47
  tokens.each { |token| expect(token).to be_kind_of(Rley::Lexical::Token) }
48
48
  terminals = tokens.map(&:terminal)
49
49
  prediction = %w[LPAREN RPAREN APOSTROPHE
50
- GRAVE_ACCENT PERIOD
51
- COMMA COMMA_AT_SIGN ]
50
+ GRAVE_ACCENT PERIOD
51
+ COMMA COMMA_AT_SIGN ]
52
52
  expect(terminals).to eq(prediction)
53
53
  end
54
54
  end # context
@@ -129,6 +129,7 @@ module Skeem
129
129
  end # context
130
130
 
131
131
  context 'Real number recognition:' do
132
+ # rubocop: disable Style/ExponentialNotation
132
133
  it 'should tokenize real numbers' do
133
134
  tests = [
134
135
  # couple [raw input, expected]
@@ -140,6 +141,7 @@ module Skeem
140
141
 
141
142
  check_tokens(tests, 'REAL')
142
143
  end
144
+ # rubocop: enable Style/ExponentialNotation
143
145
  end # context
144
146
 
145
147
  context 'Character literal recognition:' do
data/spec/spec_helper.rb CHANGED
@@ -17,26 +17,29 @@ RSpec.configure do |config|
17
17
  config.full_backtrace = true
18
18
  end
19
19
 
20
+
20
21
  module InterpreterSpec
21
22
  def expect_expr(aSkeemExpr)
22
23
  result = subject.run(aSkeemExpr)
23
24
  expect(result)
24
25
  end
25
26
 
27
+ # rubocop: disable Lint/RescueException
28
+
26
29
  # This method assumes that 'subject' is a Skeem::Interpreter instance.
27
30
  def compare_to_predicted(arrActualsPredictions)
28
31
  arrActualsPredictions.each_with_index do |(source, predicted), index|
29
- begin
30
- result = subject.run(source)
31
- if block_given?
32
- yield result, predicted
33
- else
34
- expect(result).to eq(predicted)
35
- end
36
- rescue Exception => e
37
- $stderr.puts "Row #{index + 1} failed."
38
- throw e
32
+ result = subject.run(source)
33
+ if block_given?
34
+ yield result, predicted
35
+ else
36
+ expect(result).to eq(predicted)
39
37
  end
38
+
39
+ rescue Exception => e
40
+ $stderr.puts "Row #{index + 1} failed."
41
+ throw e
40
42
  end
41
43
  end
44
+ # rubocop: enable Lint/RescueException
42
45
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: skeem
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.17
4
+ version: 0.2.18
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dimitri Geshef
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-05-09 00:00:00.000000000 Z
11
+ date: 2021-08-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rley
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '0.7'
19
+ version: 0.8.03
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '0.7'
26
+ version: 0.8.03
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: bundler
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -140,7 +140,7 @@ homepage: https://github.com/famished-tiger/Skeem
140
140
  licenses:
141
141
  - MIT
142
142
  metadata: {}
143
- post_install_message:
143
+ post_install_message:
144
144
  rdoc_options:
145
145
  - --charset=UTF-8 --exclude="examples|spec"
146
146
  require_paths:
@@ -149,15 +149,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
149
149
  requirements:
150
150
  - - ">="
151
151
  - !ruby/object:Gem::Version
152
- version: 2.3.0
152
+ version: 2.5.0
153
153
  required_rubygems_version: !ruby/object:Gem::Requirement
154
154
  requirements:
155
155
  - - ">="
156
156
  - !ruby/object:Gem::Version
157
157
  version: '0'
158
158
  requirements: []
159
- rubygems_version: 3.0.3
160
- signing_key:
159
+ rubygems_version: 3.1.4
160
+ signing_key:
161
161
  specification_version: 4
162
162
  summary: Skeem is an interpreter of a subset of the Scheme programming language. Scheme
163
163
  is a descendent of the Lisp language.