skeem 0.2.16 → 0.2.20

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: c6b187bafcc1084e3c45a68f552bb5756b8dc51338f5241fa64ad5f60f1f94c7
4
- data.tar.gz: f6925b7497ab8a2ab678c7b5483907b374caed4f7a9b00e1d22d3d53c141191c
3
+ metadata.gz: f17c469661c1ebfa3ad17ae7685ac52a90b30fcd4b31d1d01b5af1c54ccfb765
4
+ data.tar.gz: ccb061b50470a01a740c99f3e01c89a5e962216fa80d3147fa5d7bbc759b6a1d
5
5
  SHA512:
6
- metadata.gz: b8e2cd533cd3e1661f1c205ab87179e8d1a48a1e23d5c5867c6106f54b56fe076fda0ae2eaa1a28045633dc4e3eb80ec891abf8dd3f03f6698e53c5e308173be
7
- data.tar.gz: 68e3b66e4821062f9792e37b9b2d89134e10a21fcb6f0e3fc1a591243a1be8930cb5a18fcc9add86850a47cbfa9be4f7c2a2239bb94e3f187082efb2a2392412
6
+ metadata.gz: bf7120cc110af075a3c5c3294492e5246e2857fe86d6090fba57fd8b8425f47871249710af82b1acf4471dc2ab2bf34770977acee3e98cee1cc7631382953930
7
+ data.tar.gz: af3025b621249db56813fa5c91fee6b33a47943d025a18cf50e5490f92d99b6750225b2af47d66c57bd72947faafb6e96f84cf4ab3038bf437e306308c09fa89
data/.rubocop.yml CHANGED
@@ -1,6 +1,17 @@
1
1
  AllCops:
2
2
  Exclude:
3
3
  - 'exp/**/*'
4
+ - 'demo/**/*'
5
+
6
+ Gemspec/DateAssignment:
7
+ Enabled: true
8
+
9
+ Layout/ArgumentAlignment:
10
+ Enabled: false
11
+
12
+ Layout/ArrayAlignment:
13
+ Enabled: true
14
+ EnforcedStyle: with_fixed_indentation
4
15
 
5
16
  Layout/CaseIndentation:
6
17
  Enabled: false
@@ -24,39 +35,127 @@ Layout/EndOfLine:
24
35
  Enabled: true
25
36
  EnforcedStyle: lf
26
37
 
38
+ Layout/FirstArgumentIndentation:
39
+ Enabled: false
40
+
41
+ Layout/HashAlignment:
42
+ Enabled: false
43
+
27
44
  Layout/IndentationWidth:
28
45
  Enabled: false
29
46
 
30
47
  Layout/IndentationConsistency:
31
48
  Enabled: true
32
49
 
33
- Layout/IndentHeredoc:
50
+ Layout/HeredocIndentation:
34
51
  Enabled: false
35
52
 
53
+ Layout/LineEndStringConcatenationIndentation:
54
+ Enabled: true
55
+
36
56
  Layout/MultilineHashBraceLayout:
37
57
  Enabled: true
38
58
 
59
+ Layout/MultilineMethodCallBraceLayout:
60
+ Enabled: true
61
+ EnforcedStyle: same_line
62
+
39
63
  Layout/SpaceAroundOperators:
40
64
  Enabled: true
41
65
 
66
+ Layout/SpaceBeforeBrackets:
67
+ Enabled: true
68
+
42
69
  Layout/SpaceInsideParens:
43
70
  Enabled: true
44
71
 
45
- Layout/Tab:
72
+ Layout/IndentationStyle:
73
+ Enabled: true
74
+
75
+ Layout/SpaceAroundMethodCallOperator:
46
76
  Enabled: true
47
77
 
48
- Layout/TrailingBlankLines:
78
+ Layout/TrailingEmptyLines:
49
79
  Enabled: true
50
80
 
51
81
  Layout/TrailingWhitespace:
52
82
  Enabled: true
53
83
 
84
+ Lint/AmbiguousAssignment:
85
+ Enabled: true
86
+
87
+ Lint/AmbiguousOperatorPrecedence: # new in 1.21
88
+ Enabled: true
89
+
90
+ Lint/AmbiguousRange:
91
+ Enabled: true
92
+
93
+ Lint/DeprecatedConstants:
94
+ Enabled: true
95
+
96
+ Lint/DuplicateBranch:
97
+ Enabled: true
98
+
99
+ Lint/DuplicateRegexpCharacterClassElement:
100
+ Enabled: true
101
+
102
+ Lint/EmptyBlock:
103
+ Enabled: true
104
+
105
+ Lint/EmptyClass:
106
+ Enabled: false
107
+
108
+ Lint/EmptyInPattern:
109
+ Enabled: true
110
+
111
+ Lint/IncompatibleIoSelectWithFiberScheduler: # new in 1.21
112
+ Enabled: true
113
+
114
+ Lint/LambdaWithoutLiteralBlock:
115
+ Enabled: true
116
+
54
117
  Lint/Loop:
55
118
  Enabled: true
56
119
 
120
+ Lint/NoReturnInBeginEndBlocks:
121
+ Enabled: true
122
+
123
+ Lint/NumberedParameterAssignment:
124
+ Enabled: true
125
+
126
+ Lint/OrAssignmentToConstant:
127
+ Enabled: true
128
+
129
+ Lint/RaiseException:
130
+ Enabled: true
131
+
132
+ Lint/RedundantDirGlobSort:
133
+ Enabled: true
134
+
135
+ Lint/RequireRelativeSelfPath: # new in 1.22
136
+ Enabled: true
137
+
57
138
  Lint/RescueException:
58
139
  Enabled: true
59
140
 
141
+ Lint/StructNewOverride:
142
+ Enabled: true
143
+
144
+ Lint/SymbolConversion:
145
+ Enabled: true
146
+
147
+ Lint/ToEnumArguments:
148
+ Enabled: true
149
+
150
+ Lint/TripleQuotes:
151
+ Enabled: true
152
+
153
+ Lint/UnexpectedBlockArity:
154
+ Enabled: true
155
+
156
+ Lint/UnmodifiedReduceAccumulator:
157
+ Enabled: true
158
+
60
159
  Lint/UnusedMethodArgument:
61
160
  Enabled: true
62
161
 
@@ -76,20 +175,24 @@ Metrics/BlockLength:
76
175
  Enabled: true
77
176
  Max: 350
78
177
 
178
+ Metrics/BlockNesting:
179
+ Enabled: true
180
+ Max: 5
181
+
79
182
  Metrics/ClassLength:
80
183
  Enabled: true
81
- Max: 350
184
+ Max: 450
82
185
 
83
186
  Metrics/CyclomaticComplexity:
84
187
  Enabled: false
85
188
 
86
- Metrics/LineLength:
189
+ Layout/LineLength:
87
190
  Enabled: false
88
191
  Max: 90
89
192
 
90
193
  Metrics/MethodLength:
91
194
  Enabled: true
92
- Max: 40
195
+ Max: 60
93
196
 
94
197
  Metrics/ModuleLength:
95
198
  Enabled: true
@@ -104,20 +207,29 @@ Naming/ConstantName:
104
207
  Naming/ClassAndModuleCamelCase:
105
208
  Enabled: false
106
209
 
107
- Naming/UncommunicativeBlockParamName:
210
+ Naming/BlockParameterName:
211
+ Enabled: true
212
+
213
+ Naming/InclusiveLanguage:
108
214
  Enabled: true
109
215
 
110
- Naming/UncommunicativeMethodParamName:
216
+ Naming/MethodParameterName:
217
+ Enabled: false
218
+
219
+ Naming/MethodName:
111
220
  Enabled: false
112
221
 
113
222
  Naming/VariableName:
114
223
  Enabled: false
115
224
 
225
+ Security/IoMethods: # new in 1.22
226
+ Enabled: true
227
+
116
228
  Style/Alias:
117
229
  Enabled: true
118
230
 
119
- Layout/AlignHash:
120
- Enabled: false
231
+ Style/ArgumentsForwarding:
232
+ Enabled: true
121
233
 
122
234
  Style/AsciiComments:
123
235
  Enabled: false
@@ -137,6 +249,9 @@ Style/ClassCheck:
137
249
  Style/ClassVars:
138
250
  Enabled: false
139
251
 
252
+ Style/CollectionCompact:
253
+ Enabled: true
254
+
140
255
  Style/ColonMethodCall:
141
256
  Enabled: false
142
257
 
@@ -155,47 +270,204 @@ Style/DefWithParentheses:
155
270
  Style/Documentation:
156
271
  Enabled: false
157
272
 
273
+ Style/DocumentDynamicEvalDefinition:
274
+ Enabled: true
275
+
158
276
  Style/ExpandPathArguments:
159
277
  Enabled: false
160
278
 
279
+ Style/ExponentialNotation:
280
+ Enabled: true
281
+
161
282
  Style/GuardClause:
162
283
  Enabled: false
163
284
 
285
+ Style/HashEachMethods:
286
+ Enabled: true
287
+
288
+ Style/HashExcept:
289
+ Enabled: true
290
+
291
+ Style/HashTransformKeys:
292
+ Enabled: true
293
+
294
+ Style/HashTransformValues:
295
+ Enabled: true
296
+
164
297
  Style/IfUnlessModifier:
165
298
  Enabled: false
166
299
 
300
+ Style/InPatternThen:
301
+ Enabled: true
302
+
167
303
  Style/InverseMethods:
304
+ Enabled: false
305
+
306
+ Style/MissingRespondToMissing:
307
+ Enabled: false
308
+
309
+ Style/MultilineInPatternThen:
310
+ Enabled: true
311
+
312
+ Style/NegatedIfElseCondition:
168
313
  Enabled: true
169
314
 
170
315
  Style/Next:
171
316
  Enabled: false
172
317
 
318
+ Style/NilLambda:
319
+ Enabled: true
320
+
321
+ Style/NumberedParameters: # new in 1.22
322
+ Enabled: true
323
+
324
+ Style/NumberedParametersLimit: # new in 1.22
325
+ Enabled: true
326
+
173
327
  Style/NumericLiterals:
174
328
  Enabled: false
175
329
 
330
+ Style/QuotedSymbols:
331
+ Enabled: true
332
+
176
333
  Style/RaiseArgs:
177
334
  Enabled: true
178
335
 
336
+ Style/RedundantArgument:
337
+ Enabled: true
338
+
179
339
  Style/RedundantReturn:
180
340
  Enabled: false
181
341
 
182
342
  Style/RedundantSelf:
183
343
  Enabled: true
184
344
 
345
+ Style/RedundantSelfAssignmentBranch:
346
+ Enabled: true
347
+
185
348
  Style/RegexpLiteral:
186
349
  Enabled: false
187
350
 
188
351
  Style/PercentLiteralDelimiters:
189
352
  Enabled: false
190
353
 
354
+ Style/SelectByRegexp: # new in 1.22
355
+ Enabled: true
356
+
191
357
  Style/StderrPuts:
192
358
  Enabled: false
193
359
 
194
360
  Style/StringLiterals:
195
361
  Enabled: true
196
362
 
363
+ Style/SwapValues:
364
+ Enabled: true
365
+
197
366
  Style/TernaryParentheses:
198
367
  Enabled: false
199
368
 
200
369
  Style/UnlessElse:
201
- Enabled: false
370
+ Enabled: false
371
+
372
+ # Rubocop complains when it doesn't find an explicit setting for the following cops:
373
+ Layout/EmptyLinesAroundAttributeAccessor:
374
+ Enabled: true
375
+
376
+ Lint/BinaryOperatorWithIdenticalOperands:
377
+ Enabled: true
378
+
379
+ Lint/DeprecatedOpenSSLConstant:
380
+ Enabled: true
381
+
382
+ Lint/DuplicateElsifCondition:
383
+ Enabled: true
384
+
385
+ Lint/DuplicateRescueException:
386
+ Enabled: true
387
+
388
+ Lint/EmptyConditionalBody:
389
+ Enabled: true
390
+
391
+ Lint/FloatComparison:
392
+ Enabled: true
393
+
394
+ Lint/MissingSuper:
395
+ Enabled: true
396
+
397
+ Lint/MixedRegexpCaptureTypes:
398
+ Enabled: true
399
+
400
+ Lint/OutOfRangeRegexpRef:
401
+ Enabled: true
402
+
403
+ Lint/SelfAssignment:
404
+ Enabled: true
405
+
406
+ Lint/TopLevelReturnWithArgument:
407
+ Enabled: true
408
+
409
+ Lint/UnreachableLoop:
410
+ Enabled: true
411
+
412
+ Style/AccessorGrouping:
413
+ Enabled: true
414
+
415
+ Style/ArrayCoercion:
416
+ Enabled: true
417
+
418
+ Style/BisectedAttrAccessor:
419
+ Enabled: true
420
+
421
+ Style/CaseLikeIf:
422
+ Enabled: true
423
+
424
+ Style/EndlessMethod:
425
+ Enabled: true
426
+
427
+ Style/ExplicitBlockArgument:
428
+ Enabled: true
429
+
430
+ Style/GlobalStdStream:
431
+ Enabled: true
432
+
433
+ Style/HashAsLastArrayItem:
434
+ Enabled: true
435
+
436
+ Style/HashConversion:
437
+ Enabled: true
438
+
439
+ Style/HashLikeCase:
440
+ Enabled: true
441
+
442
+ Style/IfWithBooleanLiteralBranches:
443
+ Enabled: true
444
+
445
+ Style/OptionalBooleanParameter:
446
+ Enabled: true
447
+
448
+ Style/RedundantAssignment:
449
+ Enabled: true
450
+
451
+ Style/RedundantFetchBlock:
452
+ Enabled: true
453
+
454
+ Style/RedundantFileExtensionInRequire:
455
+ Enabled: true
456
+
457
+ Style/RedundantRegexpCharacterClass:
458
+ Enabled: true
459
+
460
+ Style/RedundantRegexpEscape:
461
+ Enabled: true
462
+
463
+ Style/SingleArgumentDig:
464
+ Enabled: true
465
+
466
+ Style/SlicingWithRange:
467
+ Enabled: true
468
+
469
+ Style/StringChars:
470
+ Enabled: true
471
+
472
+ Style/StringConcatenation:
473
+ Enabled: true
data/.travis.yml ADDED
@@ -0,0 +1,27 @@
1
+ language: ruby
2
+ dist: trusty
3
+
4
+ before_install:
5
+ - gem update --system
6
+ - gem install bundler
7
+
8
+ script:
9
+ - bundle exec rake
10
+
11
+ rvm:
12
+ - 2.6.3
13
+ - 2.5.5
14
+ - 2.4.6
15
+ - 2.3.8
16
+ - jruby-9.1.9.0
17
+
18
+ matrix:
19
+ allow_failures:
20
+ - rvm: ruby-head
21
+ - rvm: jruby-head
22
+
23
+
24
+ # whitelist
25
+ branches:
26
+ only:
27
+ - master
data/CHANGELOG.md CHANGED
@@ -1,8 +1,37 @@
1
+ ## [0.2.20] - 2021-11-01
2
+ - Code update to cope with changes in `Rley` v. 0.8.08
3
+
4
+ ### Changed
5
+ - File `grammar.rb`: Refactoring to cope with ? quantifier changes
6
+ - File `s_expr_builder.rb`: Refactoring to cope with ? quantifier changes
7
+ - File `skeem.gemspec` dependency updated for `Rley` v. 0.8.08
8
+
9
+ ## [0.2.19] - 2021-08-30
10
+ - Grammar refactoring: use ?, * and + modifiers in Rley 0.8.03 rules
11
+
12
+ ### Changed
13
+ - File `grammar.rb`: Remove redundant rules after introduction of ?, * and + modifiers
14
+ - Class `SkmBuilder`: Removal of useless methods after removal of their rule counterpart
15
+
16
+
17
+
18
+ ## [0.2.18] - 2021-08-29
19
+ - Minor refactoring for Rley 0.8.03
20
+ - Code restyling to please rubocop 1.19.1.
21
+
22
+ ### Changed
23
+ - File `.rubocop.yml` updated with newer Rubocop cops
24
+ - File `grammar.rb`: Calling `Rley::grammar_builder`, replace `LET*` token by `LET_STAR`
25
+ - Other files changed to get rid of Rubocop offences
26
+
27
+ ## [0.2.17] - 2020-05-09
28
+ - Updated `.rubocop.yml` file.
29
+ - Code restyling to please rubocop 0.8.0.
30
+
1
31
  ## [0.2.16] - 2019-08-18
2
32
  - Code refactoring to use string frozen magic comments (as a consequence, srl_ruby runs only on Rubies 2.3 or newer).
3
33
  - Code restyling to please rubocop 0.7.40.
4
34
 
5
-
6
35
  ## [0.2.15] - 2019-07-02
7
36
  - Added a basic command-line and console interface for Skeem interpreter.
8
37
  - Added procedures: `display!`, `newline`, `make-list`
data/README.md CHANGED
@@ -392,7 +392,7 @@ This project is intended to be a safe, welcoming space for collaboration, and co
392
392
 
393
393
  Copyright
394
394
  ---------
395
- Copyright (c) 2018-2019, Dimitri Geshef.
395
+ Copyright (c) 2018-2021, Dimitri Geshef.
396
396
  __Skeem__ is released under the MIT License see [LICENSE.txt](https://github.com/famished-tiger/Skeem/blob/master/LICENSE.txt) for details.
397
397
 
398
398
  ## Code of Conduct
data/bin/skeem CHANGED
@@ -25,10 +25,10 @@ class SkeemREPL
25
25
  if File.exist?(aFilename)
26
26
  valid_fname = aFilename
27
27
  elsif File.extname(aFilename).empty? # Retry by adding extension...
28
- if File.exist?(aFilename + '.skm')
29
- valid_fname = aFilename + '.skm'
30
- elsif File.exist?(aFilename + '.scm')
31
- valid_fname = aFilename + '.scm'
28
+ if File.exist?("#{aFilename}.skm")
29
+ valid_fname = "#{aFilename}.skm"
30
+ elsif File.exist?("#{aFilename}.scm")
31
+ valid_fname = "#{aFilename}.scm"
32
32
  else
33
33
  valid_fname = nil
34
34
  end