flay 2.6.1 → 2.7.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7bf871fe44959479214522037b66919a9896cd83
4
- data.tar.gz: 67ca161b52f3416a3b00505bf19d91013e2ab5a6
3
+ metadata.gz: f1c0f1551528a45340225c5bd74349a396bba865
4
+ data.tar.gz: 8f2fcda92e948267073c31a4aa3cbddc044cd83e
5
5
  SHA512:
6
- metadata.gz: eb4a7c61d71762bc91ffe3e1f4e5d88d474859eeaf35aea96c49523f671e864a44b66aadeefc1c560c1d9a4cc73c7cdc5f90fce17ef789fbf8cd2423590444a8
7
- data.tar.gz: f641519f4096053f5adfd52f923311918d91b47f9a841fcbd467ae096958ab2e9d9432dfe7ac7bf45c445c9d947ad92c9a7c98672cc23f11f72312c185f99cc3
6
+ metadata.gz: a81499c489c9d49cf066a4feef7bf5bb834850b74623de8539ee4dea339b543d3afe52097546f35888038a0637be4da32704b000b45b91dbadfd541ba9bf46fb
7
+ data.tar.gz: 4c96b08538b1b54866df0ca31a17e5963233fd2965f1f6c8a4ad9cf0792eceadf3ec428b4a8a8783a4a133194fab23dd82c2d7ad9284a6dbc25c395a667c0b6f
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -1,3 +1,9 @@
1
+ === 2.7.0 / 2016-01-21
2
+
3
+ * 1 minor enhancement:
4
+
5
+ * Switched to erubis to make more compatible w/ rails usage.
6
+
1
7
  === 2.6.1 / 2015-01-30
2
8
 
3
9
  * 1 bug fix:
data/README.txt CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  home :: http://ruby.sadi.st/
4
4
  code :: https://github.com/seattlerb/flay
5
- rdoc :: http://seattlerb.rubyforge.org/flay
5
+ rdoc :: http://docs.seattlerb.org/flay/
6
6
 
7
7
  == DESCRIPTION:
8
8
 
data/Rakefile CHANGED
@@ -10,6 +10,7 @@ Hoe::add_include_dirs("../../sexp_processor/dev/lib",
10
10
  "lib")
11
11
 
12
12
  Hoe.plugin :seattlerb
13
+ Hoe.plugin :isolate
13
14
 
14
15
  Hoe.spec "flay" do
15
16
  developer "Ryan Davis", "ryand-ruby@zenspider.com"
@@ -17,11 +18,12 @@ Hoe.spec "flay" do
17
18
 
18
19
  dependency "sexp_processor", "~> 4.0"
19
20
  dependency "ruby_parser", "~> 3.0"
21
+ dependency "erubis", "~> 2.7.0"
20
22
 
21
23
  self.flay_threshold = 250
22
24
  end
23
25
 
24
- task :debug do
26
+ task :debug => :isolate do
25
27
  require "flay"
26
28
 
27
29
  file = ENV["F"]
@@ -15,7 +15,7 @@ class File
15
15
  end
16
16
 
17
17
  class Flay
18
- VERSION = "2.6.1" # :nodoc:
18
+ VERSION = "2.7.0" # :nodoc:
19
19
 
20
20
  class Item < Struct.new(:structural_hash, :name, :bonus, :mass, :locations)
21
21
  alias identical? bonus
@@ -174,7 +174,7 @@ class Flay
174
174
  end
175
175
 
176
176
  ##
177
- # Loads all flay plugins. Files must be named "flog_*.rb".
177
+ # Loads all flay plugins. Files must be named "flay_*.rb".
178
178
 
179
179
  def self.load_plugins
180
180
  unless defined? @@plugins then
@@ -2,7 +2,7 @@
2
2
 
3
3
  require "rubygems"
4
4
  require "flay"
5
- require "erb"
5
+ require "erubis"
6
6
 
7
7
  class Flay
8
8
 
@@ -13,7 +13,7 @@ class Flay
13
13
  def process_erb file
14
14
  erb = File.read file
15
15
 
16
- ruby = ERB.new(erb).src
16
+ ruby = Erubis.new(erb).src
17
17
  begin
18
18
  RubyParser.new.process(ruby, file)
19
19
  rescue => e
@@ -21,4 +21,24 @@ class Flay
21
21
  raise e
22
22
  end
23
23
  end
24
+
25
+ class Erubis < ::Erubis::Eruby # :nodoc:
26
+ BLOCK_EXPR = /\s+(do|\{)(\s*\|[^|]*\|)?\s*\Z/
27
+
28
+ def add_expr_literal(src, code)
29
+ if code =~ BLOCK_EXPR
30
+ src << '@output_buffer.append= ' << code
31
+ else
32
+ src << '@output_buffer.append=(' << code << ');'
33
+ end
34
+ end
35
+
36
+ def add_expr_escaped(src, code)
37
+ if code =~ BLOCK_EXPR
38
+ src << "@output_buffer.safe_append= " << code
39
+ else
40
+ src << "@output_buffer.safe_append=(" << code << ");"
41
+ end
42
+ end
43
+ end
24
44
  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.6.1
4
+ version: 2.7.0
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
+ MIIDPjCCAiagAwIBAgIBAzANBgkqhkiG9w0BAQUFADBFMRMwEQYDVQQDDApyeWFu
14
14
  ZC1ydWJ5MRkwFwYKCZImiZPyLGQBGRYJemVuc3BpZGVyMRMwEQYKCZImiZPyLGQB
15
- GRYDY29tMB4XDTE0MDkxNzIzMDcwN1oXDTE1MDkxNzIzMDcwN1owRTETMBEGA1UE
15
+ GRYDY29tMB4XDTE1MDkxOTIwNTEyMloXDTE2MDkxODIwNTEyMlowRTETMBEGA1UE
16
16
  AwwKcnlhbmQtcnVieTEZMBcGCgmSJomT8ixkARkWCXplbnNwaWRlcjETMBEGCgmS
17
17
  JomT8ixkARkWA2NvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALda
18
18
  b9DCgK+627gPJkB6XfjZ1itoOQvpqH1EXScSaba9/S2VF22VYQbXU1xQXL/WzCkx
@@ -22,14 +22,14 @@ cert_chain:
22
22
  qhtV7HJxNKuPj/JFH0D2cswvzznE/a5FOYO68g+YCuFi5L8wZuuM8zzdwjrWHqSV
23
23
  gBEfoTEGr7Zii72cx+sCAwEAAaM5MDcwCQYDVR0TBAIwADALBgNVHQ8EBAMCBLAw
24
24
  HQYDVR0OBBYEFEfFe9md/r/tj/Wmwpy+MI8d9k/hMA0GCSqGSIb3DQEBBQUAA4IB
25
- AQAFoDJRokCQdxFfOrmsKX41KOFlU/zjrbDVM9hgB/Ur999M6OXGSi8FitXNtMwY
26
- FVjsiAPeU7HaWVVcZkj6IhINelTkXsxgGz/qCzjHy3iUMuZWw36cS0fiWJ5rvH+e
27
- hD7uXxJSFuyf1riDGI1aeWbQ74WMwvNstOxLUMiV5a1fzBhlxPqb537ubDjq/M/h
28
- zPUFPVYeL5KjDHLCqI2FwIk2sEMOQgjpXHzl+3NlD2LUgUhHDMevmgVua0e2GT1B
29
- xJcC6UN6NHMOVMyAXsr2HR0gRRx4ofN1LoP2KhXzSr8UMvQYlwPmE0N5GQv1b5AO
30
- VpzF30vNaJK6ZT7xlIsIlwmH
25
+ AQB+Hx8xUgrpZa4P8H8gR8zme5kISwQrG80MbpqJV6/G3/ZicRFhN5sjwu0uHGue
26
+ bd9Cymf6oIRwHVarJux2M32T6bL07Hmi07w2QaPc3MnMKB/D46SRZ2JSSGPFRBTc
27
+ SilobMRoGs/7B15uGFUEnNrCB/ltMqhwwSx1r++UQPfeySHEV9uqu03E5Vb7J37O
28
+ 2Er6PLXHRiYsIycD1LkMi6YnixdITRHmrqJYE2rsjaIfpIehiusVAPHkNf7qbpHq
29
+ qx3h45R1CAsObX0SQDIT+rRbQrtKz1GHIZTOFYvEJjUY1XmRTZupD3CJ8Q7sDqSy
30
+ NLq5jm1fq6Y9Uolu3RJbmycf
31
31
  -----END CERTIFICATE-----
32
- date: 2015-01-30 00:00:00.000000000 Z
32
+ date: 2016-01-21 00:00:00.000000000 Z
33
33
  dependencies:
34
34
  - !ruby/object:Gem::Dependency
35
35
  name: sexp_processor
@@ -59,20 +59,34 @@ dependencies:
59
59
  - - ~>
60
60
  - !ruby/object:Gem::Version
61
61
  version: '3.0'
62
+ - !ruby/object:Gem::Dependency
63
+ name: erubis
64
+ requirement: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ~>
67
+ - !ruby/object:Gem::Version
68
+ version: 2.7.0
69
+ type: :runtime
70
+ prerelease: false
71
+ version_requirements: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ~>
74
+ - !ruby/object:Gem::Version
75
+ version: 2.7.0
62
76
  - !ruby/object:Gem::Dependency
63
77
  name: minitest
64
78
  requirement: !ruby/object:Gem::Requirement
65
79
  requirements:
66
80
  - - ~>
67
81
  - !ruby/object:Gem::Version
68
- version: '5.5'
82
+ version: '5.8'
69
83
  type: :development
70
84
  prerelease: false
71
85
  version_requirements: !ruby/object:Gem::Requirement
72
86
  requirements:
73
87
  - - ~>
74
88
  - !ruby/object:Gem::Version
75
- version: '5.5'
89
+ version: '5.8'
76
90
  - !ruby/object:Gem::Dependency
77
91
  name: rdoc
78
92
  requirement: !ruby/object:Gem::Requirement
@@ -93,14 +107,14 @@ dependencies:
93
107
  requirements:
94
108
  - - ~>
95
109
  - !ruby/object:Gem::Version
96
- version: '3.13'
110
+ version: '3.14'
97
111
  type: :development
98
112
  prerelease: false
99
113
  version_requirements: !ruby/object:Gem::Requirement
100
114
  requirements:
101
115
  - - ~>
102
116
  - !ruby/object:Gem::Version
103
- version: '3.13'
117
+ version: '3.14'
104
118
  description: |-
105
119
  Flay analyzes code for structural similarities. Differences in literal
106
120
  values, variable, class, method names, whitespace, programming style,
@@ -115,7 +129,6 @@ extra_rdoc_files:
115
129
  - Manifest.txt
116
130
  - README.txt
117
131
  files:
118
- - .gemtest
119
132
  - History.txt
120
133
  - Manifest.txt
121
134
  - README.txt
@@ -152,5 +165,4 @@ rubygems_version: 2.4.5
152
165
  signing_key:
153
166
  specification_version: 4
154
167
  summary: Flay analyzes code for structural similarities
155
- test_files:
156
- - test/test_flay.rb
168
+ test_files: []
metadata.gz.sig CHANGED
@@ -1,3 +1,2 @@
1
- ��3 g9 ��h�b�̺H
2
- ��o��sf������SFS����"�#���K:
3
- �,t�7�8/P%��3�r ���Ǧj?�;Fn���`��4�PV�5�:B՗���{�K.!H�Sì��AZi
1
+ ����9i'm61c~������@s%��_�h@�ب��Hb<�*���R�@�@li��I����Dn����+CHAw
2
+ �ܸ���ޑ~�ej�gZ>�9zUPc��]Xg�����s(��Kj�����&�hkZ�/k������7��p­�~��~��C[#l d�����`"�ʈh�Z+8���4��[.HL椽j0��@��-}F�['�l�F��I���Fׇک ���.Z8;��6 Fv��ը
data/.gemtest DELETED
File without changes