flay 2.14.0 → 2.14.2
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 +4 -4
- checksums.yaml.gz.sig +0 -0
- data/History.rdoc +14 -0
- data/Rakefile +3 -4
- data/lib/flay.rb +3 -50
- data/test/test_flay.rb +2 -2
- data.tar.gz.sig +0 -0
- metadata +21 -21
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: bc9ce0202d55742699dc59bcc8793683a7efc68a7f9f395c5f740b97836c0c85
|
|
4
|
+
data.tar.gz: f389db1f4bae7f7f2535986317a566d355108ffc5e0652cba87b0a6c2f7566c4
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 742fa42cabacbe0cf3d65a5c7083c60b019a014f0f1e9509edd00507809335bf7315f9e254eccda05f347f32c39c034963cddea8bdd3ad8735648380d3ded6b9
|
|
7
|
+
data.tar.gz: 804293d0ccedb1900e65bd4bcec84246e9d3caf01fd87a411c36e2116affc915b1d0b694d88aaa9d527357e09332e2ae5c1a37def8d47852f925acaf725ea63e
|
checksums.yaml.gz.sig
CHANGED
|
Binary file
|
data/History.rdoc
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
=== 2.14.2 / 2026-01-06
|
|
2
|
+
|
|
3
|
+
* 1 bug fix:
|
|
4
|
+
|
|
5
|
+
* Namespace NotRubyParser to avoid problems with bundler's horrid eager loading. (nateberkopec)
|
|
6
|
+
|
|
7
|
+
=== 2.14.1 / 2025-12-20
|
|
8
|
+
|
|
9
|
+
* 3 bug fixes:
|
|
10
|
+
|
|
11
|
+
* Bumped dependency to prism to get some upstreamed fixes.
|
|
12
|
+
* Loosened the minitest dependency to include MT6.
|
|
13
|
+
* Removed local copy of the upstreamed fixes.
|
|
14
|
+
|
|
1
15
|
=== 2.14.0 / 2025-12-11
|
|
2
16
|
|
|
3
17
|
* 2 minor enhancements:
|
data/Rakefile
CHANGED
|
@@ -4,14 +4,13 @@ require "rubygems"
|
|
|
4
4
|
require "hoe"
|
|
5
5
|
|
|
6
6
|
Hoe::add_include_dirs("../../sexp_processor/dev/lib",
|
|
7
|
-
"../../ruby_parser/dev/lib",
|
|
8
7
|
"../../ruby2ruby/dev/lib",
|
|
9
8
|
"../../ZenTest/dev/lib",
|
|
10
9
|
"../../path_expander/dev/lib",
|
|
11
10
|
"lib")
|
|
12
11
|
|
|
13
12
|
Hoe.plugin :seattlerb
|
|
14
|
-
Hoe.plugin :
|
|
13
|
+
Hoe.plugin :isolate_binaries
|
|
15
14
|
Hoe.plugin :rdoc
|
|
16
15
|
Hoe.plugin :bundler
|
|
17
16
|
|
|
@@ -20,11 +19,11 @@ Hoe.spec "flay" do
|
|
|
20
19
|
license "MIT"
|
|
21
20
|
|
|
22
21
|
dependency "sexp_processor", "~> 4.0"
|
|
23
|
-
dependency "prism", "~> 1.
|
|
22
|
+
dependency "prism", "~> 1.7"
|
|
24
23
|
dependency "erubi", "~> 1.10"
|
|
25
24
|
dependency "path_expander", "~> 2.0"
|
|
26
25
|
|
|
27
|
-
dependency "minitest", "
|
|
26
|
+
dependency "minitest", "> 5.8", :dev
|
|
28
27
|
dependency "ruby2ruby", "~> 2.2.0", :dev
|
|
29
28
|
|
|
30
29
|
self.flay_threshold = 250
|
data/lib/flay.rb
CHANGED
|
@@ -5,60 +5,13 @@ require "sexp_processor"
|
|
|
5
5
|
require "path_expander"
|
|
6
6
|
require "timeout"
|
|
7
7
|
require "zlib"
|
|
8
|
-
|
|
9
8
|
require "prism"
|
|
10
9
|
require "prism/translation/ruby_parser"
|
|
11
10
|
|
|
12
|
-
unless Prism::Translation::RubyParser.method_defined? :process then
|
|
13
|
-
module PrismCompilerMonkeyPatches
|
|
14
|
-
def attach_comments sexp, node
|
|
15
|
-
return unless node.comments
|
|
16
|
-
return if node.comments.empty?
|
|
17
|
-
|
|
18
|
-
extra = node.location.start_line - node.comments.last.location.start_line
|
|
19
|
-
comments = node.comments.map(&:slice)
|
|
20
|
-
comments.concat [nil] * extra
|
|
21
|
-
sexp.comments = comments.join "\n"
|
|
22
|
-
end
|
|
23
|
-
|
|
24
|
-
def visit_class_node(node) = super.tap { |sexp| attach_comments sexp, node }
|
|
25
|
-
def visit_def_node(node) = super.tap { |sexp| attach_comments sexp, node }
|
|
26
|
-
def visit_module_node(node) = super.tap { |sexp| attach_comments sexp, node }
|
|
27
|
-
end
|
|
28
|
-
|
|
29
|
-
module PrismRPMonkeyPatches
|
|
30
|
-
def process ruby, file="(string)", timeout=nil
|
|
31
|
-
Timeout.timeout timeout do
|
|
32
|
-
parse ruby, file
|
|
33
|
-
end
|
|
34
|
-
end
|
|
35
|
-
|
|
36
|
-
def translate(result, filepath)
|
|
37
|
-
result.attach_comments!
|
|
38
|
-
super
|
|
39
|
-
end
|
|
40
|
-
end
|
|
41
|
-
|
|
42
|
-
module Prism
|
|
43
|
-
module Translation
|
|
44
|
-
class RubyParser
|
|
45
|
-
prepend PrismRPMonkeyPatches
|
|
46
|
-
|
|
47
|
-
class Compiler
|
|
48
|
-
prepend PrismCompilerMonkeyPatches
|
|
49
|
-
end
|
|
50
|
-
end
|
|
51
|
-
end
|
|
52
|
-
end
|
|
53
|
-
else
|
|
54
|
-
warn "Tell zenspider to remove prism monkeypatches: #{caller.first}"
|
|
55
|
-
end
|
|
56
|
-
|
|
57
|
-
class NotRubyParser < Prism::Translation::RubyParser # compatibility layer
|
|
58
|
-
end
|
|
59
|
-
|
|
60
11
|
class Flay
|
|
61
|
-
VERSION = "2.14.
|
|
12
|
+
VERSION = "2.14.2" # :nodoc:
|
|
13
|
+
|
|
14
|
+
NotRubyParser = Class.new Prism::Translation::RubyParser # compatibility layer :nodoc:
|
|
62
15
|
|
|
63
16
|
class Item < Struct.new(:structural_hash, :name, :bonus, :mass, :locations)
|
|
64
17
|
alias identical? bonus
|
data/test/test_flay.rb
CHANGED
|
@@ -4,8 +4,6 @@ require "minitest/autorun"
|
|
|
4
4
|
require "flay"
|
|
5
5
|
require "tmpdir"
|
|
6
6
|
|
|
7
|
-
$: << "../../sexp_processor/dev/lib"
|
|
8
|
-
|
|
9
7
|
class TestSexp < Minitest::Test
|
|
10
8
|
OPTS = Flay.parse_options %w[--mass=1 -v]
|
|
11
9
|
|
|
@@ -64,6 +62,8 @@ class TestSexp < Minitest::Test
|
|
|
64
62
|
assert_equal expected, x.sort.uniq
|
|
65
63
|
end
|
|
66
64
|
|
|
65
|
+
NotRubyParser = Flay::NotRubyParser
|
|
66
|
+
|
|
67
67
|
DOG_AND_CAT = NotRubyParser.new.process <<~RUBY
|
|
68
68
|
##
|
|
69
69
|
# I am a dog.
|
data.tar.gz.sig
CHANGED
|
Binary file
|
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.14.
|
|
4
|
+
version: 2.14.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ryan Davis
|
|
@@ -9,9 +9,9 @@ bindir: bin
|
|
|
9
9
|
cert_chain:
|
|
10
10
|
- |
|
|
11
11
|
-----BEGIN CERTIFICATE-----
|
|
12
|
-
|
|
12
|
+
MIIDPjCCAiagAwIBAgIBCjANBgkqhkiG9w0BAQsFADBFMRMwEQYDVQQDDApyeWFu
|
|
13
13
|
ZC1ydWJ5MRkwFwYKCZImiZPyLGQBGRYJemVuc3BpZGVyMRMwEQYKCZImiZPyLGQB
|
|
14
|
-
|
|
14
|
+
GRYDY29tMB4XDTI2MDEwNzAxMDkxNFoXDTI3MDEwNzAxMDkxNFowRTETMBEGA1UE
|
|
15
15
|
AwwKcnlhbmQtcnVieTEZMBcGCgmSJomT8ixkARkWCXplbnNwaWRlcjETMBEGCgmS
|
|
16
16
|
JomT8ixkARkWA2NvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALda
|
|
17
17
|
b9DCgK+627gPJkB6XfjZ1itoOQvpqH1EXScSaba9/S2VF22VYQbXU1xQXL/WzCkx
|
|
@@ -21,12 +21,12 @@ cert_chain:
|
|
|
21
21
|
qhtV7HJxNKuPj/JFH0D2cswvzznE/a5FOYO68g+YCuFi5L8wZuuM8zzdwjrWHqSV
|
|
22
22
|
gBEfoTEGr7Zii72cx+sCAwEAAaM5MDcwCQYDVR0TBAIwADALBgNVHQ8EBAMCBLAw
|
|
23
23
|
HQYDVR0OBBYEFEfFe9md/r/tj/Wmwpy+MI8d9k/hMA0GCSqGSIb3DQEBCwUAA4IB
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
24
|
+
AQA/X8/PKTTc/IkYQEUL6XWtfK8fAfbuLJzmLcz6f2ZWrtBvPsYvqRuwI1bWUtil
|
|
25
|
+
2ibJEfIuSIHX6BsUTX18+hlaIussf6EWq/YkE7e2BKmgQE42vSOZMce0kCEAPbx0
|
|
26
|
+
rQtqonfWTHQ8UbQ7GqCL3gDQ0QDD2B+HUlb4uaCZ2icxqa/eOtxMvHC2tj+h0xKY
|
|
27
|
+
xL84ipM5kr0bHGf9/MRZJWcw51urueNycBXu1Xh+pEN8qBmYsFRR4SIODLClybAO
|
|
28
|
+
6cbm2PyPQgKNiqE4H+IQrDVHd9bJs1XgLElk3qoaJBWXc/5fy0J1imYb25UqmiHG
|
|
29
|
+
snGe1hrppvBRdcyEzvhfIPjI
|
|
30
30
|
-----END CERTIFICATE-----
|
|
31
31
|
date: 1980-01-02 00:00:00.000000000 Z
|
|
32
32
|
dependencies:
|
|
@@ -50,14 +50,14 @@ dependencies:
|
|
|
50
50
|
requirements:
|
|
51
51
|
- - "~>"
|
|
52
52
|
- !ruby/object:Gem::Version
|
|
53
|
-
version: '1.
|
|
53
|
+
version: '1.7'
|
|
54
54
|
type: :runtime
|
|
55
55
|
prerelease: false
|
|
56
56
|
version_requirements: !ruby/object:Gem::Requirement
|
|
57
57
|
requirements:
|
|
58
58
|
- - "~>"
|
|
59
59
|
- !ruby/object:Gem::Version
|
|
60
|
-
version: '1.
|
|
60
|
+
version: '1.7'
|
|
61
61
|
- !ruby/object:Gem::Dependency
|
|
62
62
|
name: erubi
|
|
63
63
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -90,16 +90,16 @@ dependencies:
|
|
|
90
90
|
name: minitest
|
|
91
91
|
requirement: !ruby/object:Gem::Requirement
|
|
92
92
|
requirements:
|
|
93
|
-
- - "
|
|
93
|
+
- - ">"
|
|
94
94
|
- !ruby/object:Gem::Version
|
|
95
|
-
version: 5.8
|
|
95
|
+
version: '5.8'
|
|
96
96
|
type: :development
|
|
97
97
|
prerelease: false
|
|
98
98
|
version_requirements: !ruby/object:Gem::Requirement
|
|
99
99
|
requirements:
|
|
100
|
-
- - "
|
|
100
|
+
- - ">"
|
|
101
101
|
- !ruby/object:Gem::Version
|
|
102
|
-
version: 5.8
|
|
102
|
+
version: '5.8'
|
|
103
103
|
- !ruby/object:Gem::Dependency
|
|
104
104
|
name: ruby2ruby
|
|
105
105
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -120,34 +120,34 @@ dependencies:
|
|
|
120
120
|
requirements:
|
|
121
121
|
- - ">="
|
|
122
122
|
- !ruby/object:Gem::Version
|
|
123
|
-
version: '
|
|
123
|
+
version: '6.0'
|
|
124
124
|
- - "<"
|
|
125
125
|
- !ruby/object:Gem::Version
|
|
126
|
-
version: '
|
|
126
|
+
version: '8'
|
|
127
127
|
type: :development
|
|
128
128
|
prerelease: false
|
|
129
129
|
version_requirements: !ruby/object:Gem::Requirement
|
|
130
130
|
requirements:
|
|
131
131
|
- - ">="
|
|
132
132
|
- !ruby/object:Gem::Version
|
|
133
|
-
version: '
|
|
133
|
+
version: '6.0'
|
|
134
134
|
- - "<"
|
|
135
135
|
- !ruby/object:Gem::Version
|
|
136
|
-
version: '
|
|
136
|
+
version: '8'
|
|
137
137
|
- !ruby/object:Gem::Dependency
|
|
138
138
|
name: hoe
|
|
139
139
|
requirement: !ruby/object:Gem::Requirement
|
|
140
140
|
requirements:
|
|
141
141
|
- - "~>"
|
|
142
142
|
- !ruby/object:Gem::Version
|
|
143
|
-
version: '4.
|
|
143
|
+
version: '4.5'
|
|
144
144
|
type: :development
|
|
145
145
|
prerelease: false
|
|
146
146
|
version_requirements: !ruby/object:Gem::Requirement
|
|
147
147
|
requirements:
|
|
148
148
|
- - "~>"
|
|
149
149
|
- !ruby/object:Gem::Version
|
|
150
|
-
version: '4.
|
|
150
|
+
version: '4.5'
|
|
151
151
|
description: |-
|
|
152
152
|
Flay analyzes code for structural similarities. Differences in literal
|
|
153
153
|
values, variable, class, method names, whitespace, programming style,
|
metadata.gz.sig
CHANGED
|
Binary file
|