leftovers 0.5.0 → 0.5.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +19 -0
- data/README.md +2 -2
- data/docs/Configuration.md +13 -0
- data/leftovers.gemspec +1 -0
- data/lib/.DS_Store +0 -0
- data/lib/config/activesupport.yml +1 -0
- data/lib/config/ruby.yml +3 -0
- data/lib/config/slim.yml +4 -0
- data/lib/leftovers/config.rb +4 -0
- data/lib/leftovers/config_validator/schema_hash.rb +13 -24
- data/lib/leftovers/erb.rb +3 -3
- data/lib/leftovers/file.rb +10 -4
- data/lib/leftovers/matcher_builders/node_value.rb +15 -7
- data/lib/leftovers/merged_config.rb +24 -8
- data/lib/leftovers/slim.rb +21 -0
- data/lib/leftovers/value_processors/camelize.rb +1 -1
- data/lib/leftovers/value_processors/deconstantize.rb +1 -1
- data/lib/leftovers/value_processors/demodulize.rb +1 -1
- data/lib/leftovers/value_processors/parameterize.rb +1 -1
- data/lib/leftovers/value_processors/pluralize.rb +1 -1
- data/lib/leftovers/value_processors/singularize.rb +1 -1
- data/lib/leftovers/value_processors/titleize.rb +1 -1
- data/lib/leftovers/value_processors/underscore.rb +1 -1
- data/lib/leftovers/version.rb +1 -1
- data/lib/leftovers.rb +2 -1
- metadata +20 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cc87c83e3671055ddbbd445768b73d55576676da6cfff8d83f5ceb57eb1d78e8
|
4
|
+
data.tar.gz: a3cc4945b1d4158817d0a6b5a0c0cc8bc8ad1d2e7a402d0b0a3221cebba7dc02
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 450162ef45051251a698a5cfbd0451ac50d175339b2a9888edd7790e29071a4360f7677ca4f8d6b927bfdc004b0e4fde747884804c8e480659b76a5b39d0f8e3
|
7
|
+
data.tar.gz: 6ae0474561c71a1eddd0f6ecb0ba184de668eaca4aea36da0460fbeec313f9f095533f913863913de89ad192903b1cadaaffb3231432136138b2720df094f636
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,22 @@
|
|
1
|
+
# 0.5.4
|
2
|
+
- Add support for slim templates #13 - thanks @veganstraightedge
|
3
|
+
- fix the #how-to-resolve link #11 - thanks @veganstraightedge
|
4
|
+
|
5
|
+
# v0.5.3
|
6
|
+
- fix incompatibility with activesupport 7.
|
7
|
+
|
8
|
+
# v0.5.2
|
9
|
+
- allow config entries to have duplicates (especially as --write-todo) can write a file with duplicates)
|
10
|
+
|
11
|
+
# v0.5.1
|
12
|
+
- fixed a bug with the erb parsing where it was incorrectly compiling comments:
|
13
|
+
```
|
14
|
+
<% # Comment %>
|
15
|
+
<% if query? %>
|
16
|
+
<%= content %>
|
17
|
+
<% end %>
|
18
|
+
```
|
19
|
+
|
1
20
|
# v0.5.0
|
2
21
|
- `has_receiver:` will match the receiver for methods and the namespace for constants.
|
3
22
|
- `has_value_type:` is now `has_value: type:`
|
data/README.md
CHANGED
@@ -57,7 +57,7 @@ Not directly called at all:
|
|
57
57
|
lib/hello_world.rb:6:6 generated_method= attr_accessor :generated_method
|
58
58
|
lib/hello_world.rb:6:6 generated_method attr_accessor :generated_method
|
59
59
|
|
60
|
-
how to resolve: https://github.com/robotdana/leftovers/tree/main/Readme.md#
|
60
|
+
how to resolve: https://github.com/robotdana/leftovers/tree/main/Readme.md#how-to-resolve
|
61
61
|
```
|
62
62
|
|
63
63
|
if there is an overwhelming number of results, try using [`--write-todo`](#write-todo)
|
@@ -163,7 +163,7 @@ see the [built in config files](https://github.com/robotdana/leftovers/tree/main
|
|
163
163
|
|
164
164
|
Add the method/pattern to the `dynamic:` list with `skip: true` in the `.leftovers.yml`, or add an inline comment with the list of possibilities `# leftovers:call my_method_1, my_method_2`.
|
165
165
|
- Leftovers compares by name only, so multiple definitions with the same name will count as used even if only one is.
|
166
|
-
- haml & erb line and column numbers will be wrong as the files have to be precompiled before checking.
|
166
|
+
- haml, slim & erb line and column numbers will be wrong as the files have to be precompiled before checking.
|
167
167
|
|
168
168
|
## Other tools
|
169
169
|
|
data/docs/Configuration.md
CHANGED
@@ -7,6 +7,7 @@ Its presence is optional and all of these settings are optional.
|
|
7
7
|
- [`exclude_paths:`](#exclude_paths)
|
8
8
|
- [`test_paths:`](#test_paths)
|
9
9
|
- [`haml_paths:`](#haml_paths)
|
10
|
+
- [`slim_paths:`](#slim_paths)
|
10
11
|
- [`erb_paths:`](#erb_paths)
|
11
12
|
- [`requires:`](#requires)
|
12
13
|
- [`gems:`](#gems)
|
@@ -92,6 +93,18 @@ haml_paths:
|
|
92
93
|
|
93
94
|
Arrays are not necessary for single values. `*.haml` is recognized by default
|
94
95
|
|
96
|
+
## `slim_paths:`
|
97
|
+
|
98
|
+
list filenames/paths of test directories that are in the slim format
|
99
|
+
Defined using the [.gitignore pattern format](https://git-scm.com/docs/gitignore#_pattern_format)
|
100
|
+
|
101
|
+
```yml
|
102
|
+
slim_paths:
|
103
|
+
- '*.slim'
|
104
|
+
```
|
105
|
+
|
106
|
+
Arrays are not necessary for single values. `*.slim` is recognized by default
|
107
|
+
|
95
108
|
## `erb_paths:`
|
96
109
|
|
97
110
|
list filenames/paths of test directories that are in the erb format
|
data/leftovers.gemspec
CHANGED
@@ -42,6 +42,7 @@ Gem::Specification.new do |spec|
|
|
42
42
|
spec.add_development_dependency 'rubocop-rspec', '~> 1.44.1'
|
43
43
|
spec.add_development_dependency 'simplecov', '>= 0.18.5'
|
44
44
|
spec.add_development_dependency 'simplecov-console'
|
45
|
+
spec.add_development_dependency 'slim'
|
45
46
|
spec.add_development_dependency 'timecop'
|
46
47
|
spec.add_development_dependency 'tty_string', '>= 0.2.1'
|
47
48
|
|
data/lib/.DS_Store
ADDED
Binary file
|
data/lib/config/ruby.yml
CHANGED
data/lib/config/slim.yml
ADDED
data/lib/leftovers/config.rb
CHANGED
@@ -36,8 +36,7 @@ module Leftovers
|
|
36
36
|
{
|
37
37
|
'type' => 'array',
|
38
38
|
'items' => { '$ref' => '#/definitions/string' },
|
39
|
-
'minItems' => 1
|
40
|
-
'uniqueItems' => true
|
39
|
+
'minItems' => 1
|
41
40
|
},
|
42
41
|
{ '$ref' => '#/definitions/string' }
|
43
42
|
]
|
@@ -65,8 +64,7 @@ module Leftovers
|
|
65
64
|
{
|
66
65
|
'type' => 'array',
|
67
66
|
'items' => { '$ref' => '#/definitions/name' },
|
68
|
-
'minItems' => 1
|
69
|
-
'uniqueItems' => true
|
67
|
+
'minItems' => 1
|
70
68
|
},
|
71
69
|
{ '$ref' => '#/definitions/name' }
|
72
70
|
]
|
@@ -84,8 +82,7 @@ module Leftovers
|
|
84
82
|
{
|
85
83
|
'type' => 'array',
|
86
84
|
'items' => { '$ref' => '#/definitions/argumentPosition' },
|
87
|
-
'minItems' => 1
|
88
|
-
'uniqueItems' => true
|
85
|
+
'minItems' => 1
|
89
86
|
}
|
90
87
|
]
|
91
88
|
},
|
@@ -99,8 +96,7 @@ module Leftovers
|
|
99
96
|
{
|
100
97
|
'type' => 'array',
|
101
98
|
'items' => { '$ref' => '#/definitions/valueType' },
|
102
|
-
'minItems' => 1
|
103
|
-
'uniqueItems' => true
|
99
|
+
'minItems' => 1
|
104
100
|
}
|
105
101
|
]
|
106
102
|
},
|
@@ -153,8 +149,7 @@ module Leftovers
|
|
153
149
|
{
|
154
150
|
'type' => 'array',
|
155
151
|
'items' => { '$ref' => '#/definitions/hasValue' },
|
156
|
-
'minItems' => 1
|
157
|
-
'uniqueItems' => true
|
152
|
+
'minItems' => 1
|
158
153
|
}
|
159
154
|
]
|
160
155
|
},
|
@@ -184,8 +179,7 @@ module Leftovers
|
|
184
179
|
{
|
185
180
|
'type' => 'array',
|
186
181
|
'items' => { '$ref' => '#/definitions/hasArgument' },
|
187
|
-
'minItems' => 1
|
188
|
-
'uniqueItems' => true
|
182
|
+
'minItems' => 1
|
189
183
|
}
|
190
184
|
]
|
191
185
|
},
|
@@ -298,8 +292,7 @@ module Leftovers
|
|
298
292
|
{
|
299
293
|
'type' => 'array',
|
300
294
|
'items' => { '$ref' => '#/definitions/transform' },
|
301
|
-
'minItems' => 1
|
302
|
-
'uniqueItems' => true
|
295
|
+
'minItems' => 1
|
303
296
|
}
|
304
297
|
]
|
305
298
|
},
|
@@ -314,8 +307,7 @@ module Leftovers
|
|
314
307
|
{
|
315
308
|
'type' => 'array',
|
316
309
|
'items' => { '$ref' => '#/definitions/keyword' },
|
317
|
-
'minItems' => 1
|
318
|
-
'uniqueItems' => true
|
310
|
+
'minItems' => 1
|
319
311
|
}
|
320
312
|
]
|
321
313
|
},
|
@@ -384,8 +376,7 @@ module Leftovers
|
|
384
376
|
{
|
385
377
|
'type' => 'array',
|
386
378
|
'items' => { '$ref' => '#/definitions/action' },
|
387
|
-
'minItems' => 1
|
388
|
-
'uniqueItems' => true
|
379
|
+
'minItems' => 1
|
389
380
|
}
|
390
381
|
]
|
391
382
|
},
|
@@ -415,8 +406,7 @@ module Leftovers
|
|
415
406
|
{
|
416
407
|
'type' => 'array',
|
417
408
|
'items' => { '$ref' => '#/definitions/ruleMatcher' },
|
418
|
-
'minItems' => 1
|
419
|
-
'uniqueItems' => true
|
409
|
+
'minItems' => 1
|
420
410
|
},
|
421
411
|
{ '$ref' => '#/definitions/ruleMatcher' }
|
422
412
|
]
|
@@ -481,8 +471,7 @@ module Leftovers
|
|
481
471
|
{
|
482
472
|
'type' => 'array',
|
483
473
|
'items' => { '$ref' => '#/definitions/dynamic' },
|
484
|
-
'minItems' => 1
|
485
|
-
'uniqueItems' => true
|
474
|
+
'minItems' => 1
|
486
475
|
},
|
487
476
|
{ '$ref' => '#/definitions/dynamic' }
|
488
477
|
]
|
@@ -517,8 +506,7 @@ module Leftovers
|
|
517
506
|
{
|
518
507
|
'type' => 'array',
|
519
508
|
'items' => { '$ref' => '#/definitions/keepTestOnly' },
|
520
|
-
'minItems' => 1
|
521
|
-
'uniqueItems' => true
|
509
|
+
'minItems' => 1
|
522
510
|
},
|
523
511
|
{ '$ref' => '#/definitions/keepTestOnly' }
|
524
512
|
]
|
@@ -529,6 +517,7 @@ module Leftovers
|
|
529
517
|
'exclude_paths' => { '$ref' => '#/definitions/stringList' },
|
530
518
|
'test_paths' => { '$ref' => '#/definitions/stringList' },
|
531
519
|
'haml_paths' => { '$ref' => '#/definitions/stringList' },
|
520
|
+
'slim_paths' => { '$ref' => '#/definitions/stringList' },
|
532
521
|
'erb_paths' => { '$ref' => '#/definitions/stringList' },
|
533
522
|
'requires' => { '$ref' => '#/definitions/stringList' },
|
534
523
|
'gems' => { '$ref' => '#/definitions/stringList' },
|
data/lib/leftovers/erb.rb
CHANGED
@@ -4,17 +4,17 @@ require 'erb'
|
|
4
4
|
|
5
5
|
module Leftovers
|
6
6
|
class ERB < ::ERB::Compiler
|
7
|
-
def self.precompile(erb)
|
7
|
+
def self.precompile(erb, _name)
|
8
8
|
@compiler ||= new('-')
|
9
9
|
@compiler.compile(erb).first
|
10
10
|
end
|
11
11
|
|
12
12
|
def add_insert_cmd(out, content) # leftovers:keep
|
13
|
-
out.push("#{content}\n")
|
13
|
+
out.push("\n#{content}\n")
|
14
14
|
end
|
15
15
|
|
16
16
|
def add_put_cmd(out, _content) # leftovers:keep
|
17
|
-
out
|
17
|
+
out.push("\n")
|
18
18
|
end
|
19
19
|
end
|
20
20
|
end
|
data/lib/leftovers/file.rb
CHANGED
@@ -15,12 +15,18 @@ module Leftovers
|
|
15
15
|
end
|
16
16
|
|
17
17
|
def ruby
|
18
|
+
precompiler&.precompile(read, self) || read
|
19
|
+
end
|
20
|
+
|
21
|
+
private
|
22
|
+
|
23
|
+
def precompiler
|
18
24
|
if Leftovers.config.haml_paths.allowed?(relative_path)
|
19
|
-
::Leftovers::Haml
|
25
|
+
::Leftovers::Haml
|
26
|
+
elsif Leftovers.config.slim_paths.allowed?(relative_path)
|
27
|
+
::Leftovers::Slim
|
20
28
|
elsif Leftovers.config.erb_paths.allowed?(relative_path)
|
21
|
-
::Leftovers::ERB
|
22
|
-
else
|
23
|
-
read
|
29
|
+
::Leftovers::ERB
|
24
30
|
end
|
25
31
|
end
|
26
32
|
end
|
@@ -12,7 +12,7 @@ module Leftovers
|
|
12
12
|
when ::String
|
13
13
|
::Leftovers::MatcherBuilders::NodeName.build(pat)
|
14
14
|
when ::Hash
|
15
|
-
build_from_hash(pat)
|
15
|
+
build_from_hash(**pat)
|
16
16
|
# :nocov:
|
17
17
|
else raise
|
18
18
|
# :nocov:
|
@@ -22,18 +22,26 @@ module Leftovers
|
|
22
22
|
|
23
23
|
private
|
24
24
|
|
25
|
-
def build_from_hash(
|
25
|
+
def build_from_hash( # rubocop:disable Metrics/MethodLength, Metrics/ParameterLists
|
26
|
+
at: nil, has_value: nil,
|
27
|
+
match: nil, has_prefix: nil, has_suffix: nil,
|
28
|
+
type: nil,
|
29
|
+
has_receiver: nil,
|
30
|
+
unless_arg: nil
|
31
|
+
)
|
26
32
|
matcher = ::Leftovers::MatcherBuilders::And.build([
|
27
|
-
::Leftovers::MatcherBuilders::NodeHasArgument.build(
|
33
|
+
::Leftovers::MatcherBuilders::NodeHasArgument.build(
|
34
|
+
at: at, has_value: has_value
|
35
|
+
),
|
28
36
|
::Leftovers::MatcherBuilders::NodeName.build(
|
29
|
-
|
37
|
+
match: match, has_prefix: has_prefix, has_suffix: has_suffix
|
30
38
|
),
|
31
|
-
::Leftovers::MatcherBuilders::NodeType.build(
|
32
|
-
::Leftovers::MatcherBuilders::NodeHasReceiver.build(
|
39
|
+
::Leftovers::MatcherBuilders::NodeType.build(type),
|
40
|
+
::Leftovers::MatcherBuilders::NodeHasReceiver.build(has_receiver)
|
33
41
|
])
|
34
42
|
|
35
43
|
::Leftovers::MatcherBuilders::AndNot.build(
|
36
|
-
matcher, ::Leftovers::MatcherBuilders::NodeValue.build(
|
44
|
+
matcher, ::Leftovers::MatcherBuilders::NodeValue.build(unless_arg)
|
37
45
|
)
|
38
46
|
end
|
39
47
|
end
|
@@ -37,14 +37,22 @@ module Leftovers
|
|
37
37
|
Leftovers::Config.new(:'.leftovers_todo.yml', path: Leftovers.pwd + '.leftovers_todo.yml')
|
38
38
|
end
|
39
39
|
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
40
|
+
MEMOIZED_IVARS = %i{
|
41
|
+
@exclude_paths
|
42
|
+
@include_paths
|
43
|
+
@test_paths
|
44
|
+
@haml_paths
|
45
|
+
@slim_paths
|
46
|
+
@erb_paths
|
47
|
+
@dynamic
|
48
|
+
@keep
|
49
|
+
@test_only
|
50
|
+
}.freeze
|
51
|
+
|
52
|
+
def unmemoize
|
53
|
+
MEMOIZED_IVARS.each do |ivar|
|
54
|
+
remove_instance_variable(ivar) if instance_variable_get(ivar)
|
55
|
+
end
|
48
56
|
end
|
49
57
|
|
50
58
|
def exclude_paths
|
@@ -71,6 +79,14 @@ module Leftovers
|
|
71
79
|
)
|
72
80
|
end
|
73
81
|
|
82
|
+
def slim_paths
|
83
|
+
@slim_paths ||= FastIgnore.new(
|
84
|
+
include_rules: @configs.flat_map(&:slim_paths),
|
85
|
+
gitignore: false,
|
86
|
+
root: Leftovers.pwd
|
87
|
+
)
|
88
|
+
end
|
89
|
+
|
74
90
|
def erb_paths
|
75
91
|
@erb_paths ||= FastIgnore.new(
|
76
92
|
include_rules: @configs.flat_map(&:erb_paths),
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Leftovers
|
4
|
+
module Slim
|
5
|
+
module_function
|
6
|
+
|
7
|
+
def precompile(file, name)
|
8
|
+
return '' unless Leftovers.try_require('slim', message: <<~MESSAGE) # rubocop:disable Layout/EmptyLineAfterGuardClause
|
9
|
+
Skipped parsing #{name.relative_path}, because the slim gem was not available
|
10
|
+
`gem install slim`
|
11
|
+
MESSAGE
|
12
|
+
|
13
|
+
begin
|
14
|
+
::Slim::Engine.new(file: file).call(file)
|
15
|
+
rescue ::Slim::Parser::SyntaxError => e
|
16
|
+
Leftovers.warn "#{e.class}: \"#{e.error}\" #{name.relative_path}:#{e.lineno}:#{e.column}"
|
17
|
+
''
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -16,7 +16,7 @@ module Leftovers
|
|
16
16
|
rescue NoMethodError
|
17
17
|
Leftovers.error <<~MESSAGE
|
18
18
|
Tried using the String#camelize method, but the activesupport gem was not available and/or not required
|
19
|
-
`gem install activesupport`, and/or add `requires: 'active_support/core_ext/string'` to your .leftovers.yml
|
19
|
+
`gem install activesupport`, and/or add `requires: ['active_support', 'active_support/core_ext/string']` to your .leftovers.yml
|
20
20
|
MESSAGE
|
21
21
|
end
|
22
22
|
end
|
@@ -16,7 +16,7 @@ module Leftovers
|
|
16
16
|
rescue NoMethodError
|
17
17
|
Leftovers.error <<~MESSAGE
|
18
18
|
Tried using the String#deconstantize method, but the activesupport gem was not available and/or not required
|
19
|
-
`gem install activesupport`, and/or add `requires: 'active_support/core_ext/string'` to your .leftovers.yml
|
19
|
+
`gem install activesupport`, and/or add `requires: ['active_support', 'active_support/core_ext/string']` to your .leftovers.yml
|
20
20
|
MESSAGE
|
21
21
|
end
|
22
22
|
end
|
@@ -16,7 +16,7 @@ module Leftovers
|
|
16
16
|
rescue NoMethodError
|
17
17
|
Leftovers.error <<~MESSAGE
|
18
18
|
Tried using the String#demodulize method, but the activesupport gem was not available and/or not required
|
19
|
-
`gem install activesupport`, and/or add `requires: 'active_support/core_ext/string'` to your .leftovers.yml
|
19
|
+
`gem install activesupport`, and/or add `requires: ['active_support', 'active_support/core_ext/string']` to your .leftovers.yml
|
20
20
|
MESSAGE
|
21
21
|
end
|
22
22
|
end
|
@@ -16,7 +16,7 @@ module Leftovers
|
|
16
16
|
rescue NoMethodError
|
17
17
|
Leftovers.error <<~MESSAGE
|
18
18
|
Tried using the String#parameterize method, but the activesupport gem was not available and/or not required
|
19
|
-
`gem install activesupport`, and/or add `requires: 'active_support/core_ext/string'` to your .leftovers.yml
|
19
|
+
`gem install activesupport`, and/or add `requires: ['active_support', 'active_support/core_ext/string']` to your .leftovers.yml
|
20
20
|
MESSAGE
|
21
21
|
end
|
22
22
|
end
|
@@ -16,7 +16,7 @@ module Leftovers
|
|
16
16
|
rescue NoMethodError
|
17
17
|
Leftovers.error <<~MESSAGE
|
18
18
|
Tried using the String#pluralize method, but the activesupport gem was not available and/or not required
|
19
|
-
`gem install activesupport`, and/or add `requires: 'active_support/core_ext/string'` to your .leftovers.yml
|
19
|
+
`gem install activesupport`, and/or add `requires: ['active_support', 'active_support/core_ext/string']` to your .leftovers.yml
|
20
20
|
MESSAGE
|
21
21
|
end
|
22
22
|
end
|
@@ -16,7 +16,7 @@ module Leftovers
|
|
16
16
|
rescue NoMethodError
|
17
17
|
Leftovers.error <<~MESSAGE
|
18
18
|
Tried using the String#singularize method, but the activesupport gem was not available and/or not required
|
19
|
-
`gem install activesupport`, and/or add `requires: 'active_support/core_ext/string'` to your .leftovers.yml
|
19
|
+
`gem install activesupport`, and/or add `requires: ['active_support', 'active_support/core_ext/string']` to your .leftovers.yml
|
20
20
|
MESSAGE
|
21
21
|
end
|
22
22
|
end
|
@@ -16,7 +16,7 @@ module Leftovers
|
|
16
16
|
rescue NoMethodError
|
17
17
|
Leftovers.error <<~MESSAGE
|
18
18
|
Tried using the String#titleize method, but the activesupport gem was not available and/or not required
|
19
|
-
`gem install activesupport`, and/or add `requires: 'active_support/core_ext/string'` to your .leftovers.yml
|
19
|
+
`gem install activesupport`, and/or add `requires: ['active_support', 'active_support/core_ext/string']` to your .leftovers.yml
|
20
20
|
MESSAGE
|
21
21
|
end
|
22
22
|
end
|
@@ -16,7 +16,7 @@ module Leftovers
|
|
16
16
|
rescue NoMethodError
|
17
17
|
Leftovers.error <<~MESSAGE
|
18
18
|
Tried using the String#underscore method, but the activesupport gem was not available and/or not required
|
19
|
-
`gem install activesupport`, and/or add `requires: 'active_support/core_ext/string'` to your .leftovers.yml
|
19
|
+
`gem install activesupport`, and/or add `requires: ['active_support', 'active_support/core_ext/string']` to your .leftovers.yml
|
20
20
|
MESSAGE
|
21
21
|
end
|
22
22
|
end
|
data/lib/leftovers/version.rb
CHANGED
data/lib/leftovers.rb
CHANGED
@@ -24,6 +24,7 @@ module Leftovers # rubocop:disable Metrics/ModuleLength
|
|
24
24
|
autoload(:ProcessorBuilders, "#{__dir__}/leftovers/processor_builders")
|
25
25
|
autoload(:RakeTask, "#{__dir__}/leftovers/rake_task")
|
26
26
|
autoload(:Reporter, "#{__dir__}/leftovers/reporter")
|
27
|
+
autoload(:Slim, "#{__dir__}/leftovers/slim")
|
27
28
|
autoload(:TodoReporter, "#{__dir__}/leftovers/todo_reporter")
|
28
29
|
autoload(:DynamicProcessors, "#{__dir__}/leftovers/dynamic_processors")
|
29
30
|
autoload(:ValueProcessors, "#{__dir__}/leftovers/value_processors")
|
@@ -93,7 +94,7 @@ module Leftovers # rubocop:disable Metrics/ModuleLength
|
|
93
94
|
end
|
94
95
|
|
95
96
|
def resolution_instructions_link
|
96
|
-
"https://github.com/robotdana/leftovers/tree/v#{Leftovers::VERSION}/README.md#
|
97
|
+
"https://github.com/robotdana/leftovers/tree/v#{Leftovers::VERSION}/README.md#how-to-resolve"
|
97
98
|
end
|
98
99
|
|
99
100
|
def warn(message)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: leftovers
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dana Sherson
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-02-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -178,6 +178,20 @@ dependencies:
|
|
178
178
|
- - ">="
|
179
179
|
- !ruby/object:Gem::Version
|
180
180
|
version: '0'
|
181
|
+
- !ruby/object:Gem::Dependency
|
182
|
+
name: slim
|
183
|
+
requirement: !ruby/object:Gem::Requirement
|
184
|
+
requirements:
|
185
|
+
- - ">="
|
186
|
+
- !ruby/object:Gem::Version
|
187
|
+
version: '0'
|
188
|
+
type: :development
|
189
|
+
prerelease: false
|
190
|
+
version_requirements: !ruby/object:Gem::Requirement
|
191
|
+
requirements:
|
192
|
+
- - ">="
|
193
|
+
- !ruby/object:Gem::Version
|
194
|
+
version: '0'
|
181
195
|
- !ruby/object:Gem::Dependency
|
182
196
|
name: timecop
|
183
197
|
requirement: !ruby/object:Gem::Requirement
|
@@ -291,6 +305,7 @@ files:
|
|
291
305
|
- docs/Configuration.md
|
292
306
|
- exe/leftovers
|
293
307
|
- leftovers.gemspec
|
308
|
+
- lib/.DS_Store
|
294
309
|
- lib/config/actioncable.yml
|
295
310
|
- lib/config/actionmailer.yml
|
296
311
|
- lib/config/actionpack.yml
|
@@ -322,6 +337,7 @@ files:
|
|
322
337
|
- lib/config/selenium-webdriver.yml
|
323
338
|
- lib/config/sidekiq.yml
|
324
339
|
- lib/config/simplecov.yml
|
340
|
+
- lib/config/slim.yml
|
325
341
|
- lib/config/will_paginate.yml
|
326
342
|
- lib/leftovers.rb
|
327
343
|
- lib/leftovers/ast.rb
|
@@ -406,6 +422,7 @@ files:
|
|
406
422
|
- lib/leftovers/processor_builders/value.rb
|
407
423
|
- lib/leftovers/rake_task.rb
|
408
424
|
- lib/leftovers/reporter.rb
|
425
|
+
- lib/leftovers/slim.rb
|
409
426
|
- lib/leftovers/todo_reporter.rb
|
410
427
|
- lib/leftovers/value_processors.rb
|
411
428
|
- lib/leftovers/value_processors/add_dynamic_prefix.rb
|
@@ -465,7 +482,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
465
482
|
- !ruby/object:Gem::Version
|
466
483
|
version: '0'
|
467
484
|
requirements: []
|
468
|
-
rubygems_version: 3.
|
485
|
+
rubygems_version: 3.2.15
|
469
486
|
signing_key:
|
470
487
|
specification_version: 4
|
471
488
|
summary: Find unused methods and classes/modules
|