flay 2.9.0 → 2.10.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/History.txt +6 -0
- data/lib/flay.rb +25 -4
- metadata +2 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 73416b286d8de1583c4861f2da639893f0012111
|
4
|
+
data.tar.gz: 31671f4f0671c63d9432e3651d850796aacbbce3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a6574f751315f6d8da0857c7b13d0e0ba4becfbece092e86b310c9a393f0f801700a1a4a3904a0afdaca967bb618187569eecad6ec7a8bd01574748dbee7f09e
|
7
|
+
data.tar.gz: 161a7012a55cf51110f7d535f768f8d1e5ab7eba061ec5fce660cb6595ac67751ad58cb15b4200e62a214e0022d550ada00d52352a805fece333bd4061add125
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/History.txt
CHANGED
data/lib/flay.rb
CHANGED
@@ -16,7 +16,7 @@ class File
|
|
16
16
|
end
|
17
17
|
|
18
18
|
class Flay
|
19
|
-
VERSION = "2.
|
19
|
+
VERSION = "2.10.0" # :nodoc:
|
20
20
|
|
21
21
|
class Item < Struct.new(:structural_hash, :name, :bonus, :mass, :locations)
|
22
22
|
alias identical? bonus
|
@@ -327,18 +327,39 @@ class Flay
|
|
327
327
|
end
|
328
328
|
end
|
329
329
|
|
330
|
+
##
|
331
|
+
# Given an array of sexp patterns (see sexp_processor), delete any
|
332
|
+
# buckets whose members match any of the patterns.
|
333
|
+
|
334
|
+
def filter *patterns
|
335
|
+
return if patterns.empty?
|
336
|
+
|
337
|
+
self.hashes.delete_if { |_, sexps|
|
338
|
+
sexps.any? { |sexp|
|
339
|
+
patterns.any? { |pattern|
|
340
|
+
pattern =~ sexp
|
341
|
+
}
|
342
|
+
}
|
343
|
+
}
|
344
|
+
end
|
345
|
+
|
330
346
|
##
|
331
347
|
# Prunes nodes that aren't relevant to analysis or are already
|
332
|
-
# covered by another node.
|
348
|
+
# covered by another node. Also deletes nodes based on the
|
349
|
+
# +:filters+ option.
|
333
350
|
|
334
351
|
def prune
|
335
352
|
# prune trees that aren't duped at all, or are too small
|
336
353
|
self.hashes.delete_if { |_,nodes| nodes.size == 1 }
|
337
354
|
self.hashes.delete_if { |_,nodes| nodes.all?(&:modified?) }
|
338
355
|
|
339
|
-
|
356
|
+
if option[:liberal] then
|
357
|
+
prune_liberally
|
358
|
+
else
|
359
|
+
prune_conservatively
|
360
|
+
end
|
340
361
|
|
341
|
-
|
362
|
+
self.filter(*option[:filters])
|
342
363
|
end
|
343
364
|
|
344
365
|
##
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: flay
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.10.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryan Davis
|
@@ -30,7 +30,7 @@ cert_chain:
|
|
30
30
|
E4oJcnPkJAr0rw504JGtlZtONZQblwmRJOIdXzolaE3NRGUzGVOUSptZppAKiavY
|
31
31
|
fO6tdKQc/5RfA8oQEkg8hrxA5PQSz4TOFJGLpFvIapEk6tMruQ0bHgkhr9auXg==
|
32
32
|
-----END CERTIFICATE-----
|
33
|
-
date: 2017-
|
33
|
+
date: 2017-07-17 00:00:00.000000000 Z
|
34
34
|
dependencies:
|
35
35
|
- !ruby/object:Gem::Dependency
|
36
36
|
name: sexp_processor
|
metadata.gz.sig
CHANGED
Binary file
|