flay 2.12.0 → 2.12.1

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: 3477e1943a1382b0b51cbce9a5e4f5b60c34adc2f38e1e4b713b05f6b7476160
4
- data.tar.gz: 042ef82c48aec49077113d53cbe425e6157fd61b36e7118af18dc7369561e77e
3
+ metadata.gz: 82b6642b1277bcd3a44da4c3ce4b5e72fa4432f7660a3d497d933ca4c2950556
4
+ data.tar.gz: c865cbbdf68e0183bbf3fb6a1ff6188651034634398364aac77c4eed451384c3
5
5
  SHA512:
6
- metadata.gz: c05914fd7779c957f60e6e8f32d04a4069d427cf6ecb57b7be97fd53cd9d07969c0076bad6978077f09e47d73a5d7c76c5795233f846a20bc22aef2abbb41dad
7
- data.tar.gz: bdcc376f6c7651d1fe4d7ace6349a945a221fc89152bba731719ec4083996b98d98358e6b2506fa58ca6d919dd07d99433f3c6942e0639062909f4e1d55e44e6
6
+ metadata.gz: 5ed7081512167da74c114acbd37098f1b6ff01a0521c2f400408da1243441030e6d342d7e34b400702eb74cf97a66879bd5b276339564c83582f1105c624fe15
7
+ data.tar.gz: c57fdc2be2bb6c85523fa4e895fc6cbe04ffd158a17a0d946768950dec545653a132ccdfa9ab51c25502a66076f7a7e8f45ba78dafc921995b175aabe22f1531
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -1,3 +1,9 @@
1
+ === 2.12.1 / 2019-10-08
2
+
3
+ * 1 bug fix:
4
+
5
+ * Fixed some sexp access under STRICT_SEXP=1.
6
+
1
7
  === 2.12.0 / 2018-04-29
2
8
 
3
9
  * 1 minor enhancement:
@@ -17,7 +17,7 @@ class File
17
17
  end
18
18
 
19
19
  class Flay
20
- VERSION = "2.12.0" # :nodoc:
20
+ VERSION = "2.12.1" # :nodoc:
21
21
 
22
22
  class Item < Struct.new(:structural_hash, :name, :bonus, :mass, :locations)
23
23
  alias identical? bonus
@@ -228,10 +228,11 @@ class Flay
228
228
  update_masses
229
229
 
230
230
  sorted = masses.sort_by { |h,m|
231
+ exp = hashes[h].first
231
232
  [-m,
232
- hashes[h].first.file,
233
- hashes[h].first.line,
234
- hashes[h].first.first.to_s]
233
+ exp.file,
234
+ exp.line,
235
+ exp.sexp_type.to_s]
235
236
  }
236
237
 
237
238
  sorted.map { |hash, mass|
@@ -249,7 +250,7 @@ class Flay
249
250
  Location[x.file, x.line, extra]
250
251
  }
251
252
 
252
- Item[hash, node.first, bonus, mass, locs]
253
+ Item[hash, node.sexp_type, bonus, mass, locs]
253
254
  }.compact
254
255
  end
255
256
 
@@ -579,7 +580,10 @@ class Sexp
579
580
  s
580
581
  end
581
582
 
583
+ alias :[] :[] # needed for STRICT_SEXP
584
+
582
585
  def [] a # :nodoc:
586
+ # TODO: figure out a way to make this STRICT_SEXP happy
583
587
  s = super
584
588
  if Sexp === s then
585
589
  s.file = self.file
@@ -636,7 +640,7 @@ class Sexp # straight from flay-persistent
636
640
  def pure_ruby_hash # :nodoc: see above
637
641
  hash = 0
638
642
 
639
- n = NODE_NAMES[first]
643
+ n = NODE_NAMES[sexp_type]
640
644
 
641
645
  raise "Bad lookup: #{first} in #{sexp.inspect}" unless n
642
646
 
@@ -65,7 +65,7 @@ class TestSexp < Minitest::Test
65
65
  assert_equal expected, x.sort.uniq
66
66
  end
67
67
 
68
- DOG_AND_CAT = Ruby18Parser.new.process <<-RUBY
68
+ DOG_AND_CAT = RubyParser.new.process <<-RUBY
69
69
  ##
70
70
  # I am a dog.
71
71
 
@@ -88,7 +88,7 @@ class TestSexp < Minitest::Test
88
88
  end
89
89
  RUBY
90
90
 
91
- ROUND = Ruby18Parser.new.process <<-RUBY
91
+ ROUND = RubyParser.new.process <<-RUBY
92
92
  def x(n)
93
93
  if n % 2 == 0
94
94
  return n
@@ -196,7 +196,7 @@ class TestSexp < Minitest::Test
196
196
 
197
197
  flay.process_sexp ROUND.deep_clone
198
198
 
199
- actual = flay.hashes.values.map { |sexps| sexps.map { |sexp| sexp.first } }
199
+ actual = flay.hashes.values.map { |sexps| sexps.map(&:sexp_type) }
200
200
 
201
201
  assert_equal expected, actual.sort_by { |a| a.inspect }
202
202
  end
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.12.0
4
+ version: 2.12.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Davis
@@ -10,9 +10,9 @@ bindir: bin
10
10
  cert_chain:
11
11
  - |
12
12
  -----BEGIN CERTIFICATE-----
13
- MIIDPjCCAiagAwIBAgIBAjANBgkqhkiG9w0BAQUFADBFMRMwEQYDVQQDDApyeWFu
13
+ MIIDPjCCAiagAwIBAgIBAzANBgkqhkiG9w0BAQsFADBFMRMwEQYDVQQDDApyeWFu
14
14
  ZC1ydWJ5MRkwFwYKCZImiZPyLGQBGRYJemVuc3BpZGVyMRMwEQYKCZImiZPyLGQB
15
- GRYDY29tMB4XDTE3MTEyMTIxMTExMFoXDTE4MTEyMTIxMTExMFowRTETMBEGA1UE
15
+ GRYDY29tMB4XDTE4MTIwNDIxMzAxNFoXDTE5MTIwNDIxMzAxNFowRTETMBEGA1UE
16
16
  AwwKcnlhbmQtcnVieTEZMBcGCgmSJomT8ixkARkWCXplbnNwaWRlcjETMBEGCgmS
17
17
  JomT8ixkARkWA2NvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALda
18
18
  b9DCgK+627gPJkB6XfjZ1itoOQvpqH1EXScSaba9/S2VF22VYQbXU1xQXL/WzCkx
@@ -21,15 +21,15 @@ cert_chain:
21
21
  GiadM9GHRaDiaxuX0cIUBj19T01mVE2iymf9I6bEsiayK/n6QujtyCbTWsAS9Rqt
22
22
  qhtV7HJxNKuPj/JFH0D2cswvzznE/a5FOYO68g+YCuFi5L8wZuuM8zzdwjrWHqSV
23
23
  gBEfoTEGr7Zii72cx+sCAwEAAaM5MDcwCQYDVR0TBAIwADALBgNVHQ8EBAMCBLAw
24
- HQYDVR0OBBYEFEfFe9md/r/tj/Wmwpy+MI8d9k/hMA0GCSqGSIb3DQEBBQUAA4IB
25
- AQAfAXSQpsW7YSxd1csRtA/M4Zt0AMXFMd76GJ8Lgtg8G0+VFbdChRyDuDb0kPlW
26
- h9QQX/YABfCW8vxmssbMGrP+VGBAn7BbdTcfTlgCWrvMX1uL5aRL74nA4urKXqdW
27
- a0nP70K4958P3GffBdtE3KGkU5xstFnXGajxuBRnL66E15KU0BNehVxdG258bdPu
28
- EKN6MqBPftFiev3tuwqDV11r2GquDpniYcT+Mi8/PgeAgVT/afBeVgbB3KaZeTRR
29
- AhXhF6Wi2GTMezlj5jlI5XV7WsJUSwTp/YiVvcmT74ZaCRvexm6EnNhkrvJJ1Xeu
30
- V+HB+LYYhXWitInO/eXxDrFB
24
+ HQYDVR0OBBYEFEfFe9md/r/tj/Wmwpy+MI8d9k/hMA0GCSqGSIb3DQEBCwUAA4IB
25
+ AQCbJwLmpJR2PomLU+Zzw3KRzH/hbyUWc/ftru71AopZ1fy4iY9J/BW5QYKVYwbP
26
+ V0FSBWtvfI/RdwfKGtuGhPKECZgmLieGuZ3XCc09qPu1bdg7i/tu1p0t0c6163ku
27
+ nDMDIC/t/DAFK0TY9I3HswuyZGbLW7rgF0DmiuZdN/RPhHq2pOLMLXJmFclCb/im
28
+ 9yToml/06TJdUJ5p64mkBs0TzaK66DIB1Smd3PdtfZqoRV+EwaXMdx0Hb3zdR1JR
29
+ Em82dBUFsipwMLCYj39kcyHWAxyl6Ae1Cn9r/ItVBCxoeFdrHjfavnrIEoXUt4bU
30
+ UfBugfLD19bu3nvL+zTAGx/U
31
31
  -----END CERTIFICATE-----
32
- date: 2018-04-30 00:00:00.000000000 Z
32
+ date: 2019-10-09 00:00:00.000000000 Z
33
33
  dependencies:
34
34
  - !ruby/object:Gem::Dependency
35
35
  name: sexp_processor
@@ -119,30 +119,36 @@ dependencies:
119
119
  name: rdoc
120
120
  requirement: !ruby/object:Gem::Requirement
121
121
  requirements:
122
- - - "~>"
122
+ - - ">="
123
123
  - !ruby/object:Gem::Version
124
124
  version: '4.0'
125
+ - - "<"
126
+ - !ruby/object:Gem::Version
127
+ version: '7'
125
128
  type: :development
126
129
  prerelease: false
127
130
  version_requirements: !ruby/object:Gem::Requirement
128
131
  requirements:
129
- - - "~>"
132
+ - - ">="
130
133
  - !ruby/object:Gem::Version
131
134
  version: '4.0'
135
+ - - "<"
136
+ - !ruby/object:Gem::Version
137
+ version: '7'
132
138
  - !ruby/object:Gem::Dependency
133
139
  name: hoe
134
140
  requirement: !ruby/object:Gem::Requirement
135
141
  requirements:
136
142
  - - "~>"
137
143
  - !ruby/object:Gem::Version
138
- version: '3.16'
144
+ version: '3.18'
139
145
  type: :development
140
146
  prerelease: false
141
147
  version_requirements: !ruby/object:Gem::Requirement
142
148
  requirements:
143
149
  - - "~>"
144
150
  - !ruby/object:Gem::Version
145
- version: '3.16'
151
+ version: '3.18'
146
152
  description: |-
147
153
  Flay analyzes code for structural similarities. Differences in literal
148
154
  values, variable, class, method names, whitespace, programming style,
@@ -188,8 +194,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
188
194
  - !ruby/object:Gem::Version
189
195
  version: '0'
190
196
  requirements: []
191
- rubyforge_project:
192
- rubygems_version: 2.7.3
197
+ rubygems_version: 3.0.6
193
198
  signing_key:
194
199
  specification_version: 4
195
200
  summary: Flay analyzes code for structural similarities
metadata.gz.sig CHANGED
Binary file