leftovers 0.5.5 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -0
- data/README.md +21 -1
- data/docs/Configuration.md +106 -2
- data/leftovers.gemspec +7 -4
- data/lib/config/ruby.yml +7 -0
- data/lib/leftovers/collector.rb +3 -1
- data/lib/leftovers/config.rb +8 -4
- data/lib/leftovers/config_validator/schema_hash.rb +170 -149
- data/lib/leftovers/config_validator.rb +1 -0
- data/lib/leftovers/definition.rb +1 -1
- data/lib/leftovers/dynamic_processors/call.rb +0 -4
- data/lib/leftovers/dynamic_processors/call_definition.rb +0 -4
- data/lib/leftovers/dynamic_processors/definition.rb +0 -4
- data/lib/leftovers/file.rb +52 -10
- data/lib/leftovers/file_collector.rb +33 -2
- data/lib/leftovers/json.rb +28 -0
- data/lib/leftovers/matcher_builders/document.rb +13 -0
- data/lib/leftovers/matcher_builders/node.rb +3 -1
- data/lib/leftovers/matcher_builders/node_has_argument.rb +3 -4
- data/lib/leftovers/matcher_builders/node_has_keyword_argument.rb +1 -1
- data/lib/leftovers/matcher_builders/node_has_positional_argument.rb +1 -1
- data/lib/leftovers/matcher_builders.rb +1 -0
- data/lib/leftovers/matchers/all.rb +0 -4
- data/lib/leftovers/matchers/and.rb +0 -4
- data/lib/leftovers/matchers/any.rb +0 -4
- data/lib/leftovers/matchers/node_has_any_keyword_argument.rb +1 -7
- data/lib/leftovers/matchers/node_has_any_positional_argument_with_value.rb +1 -7
- data/lib/leftovers/matchers/node_has_positional_argument_with_value.rb +0 -4
- data/lib/leftovers/matchers/node_name.rb +0 -4
- data/lib/leftovers/matchers/node_pair_value.rb +0 -4
- data/lib/leftovers/matchers/node_path.rb +0 -4
- data/lib/leftovers/matchers/node_scalar_value.rb +0 -4
- data/lib/leftovers/matchers/node_type.rb +0 -4
- data/lib/leftovers/matchers/not.rb +0 -4
- data/lib/leftovers/matchers/or.rb +0 -4
- data/lib/leftovers/merged_config.rb +19 -1
- data/lib/leftovers/processor_builders/dynamic.rb +2 -1
- data/lib/leftovers/todo_reporter.rb +10 -35
- data/lib/leftovers/value_processors/delete_prefix.rb +0 -6
- data/lib/leftovers/value_processors/delete_suffix.rb +0 -6
- data/lib/leftovers/value_processors/keyword.rb +0 -4
- data/lib/leftovers/value_processors/keyword_argument.rb +0 -4
- data/lib/leftovers/value_processors/return_definition.rb +0 -4
- data/lib/leftovers/version.rb +1 -1
- data/lib/leftovers/yaml.rb +73 -0
- data/lib/leftovers.rb +6 -7
- metadata +33 -16
- data/lib/leftovers/backports.rb +0 -40
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.
|
4
|
+
version: 0.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dana Sherson
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-02-
|
11
|
+
date: 2022-02-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -112,44 +112,58 @@ dependencies:
|
|
112
112
|
name: rubocop
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
114
114
|
requirements:
|
115
|
-
- - "
|
115
|
+
- - ">="
|
116
116
|
- !ruby/object:Gem::Version
|
117
|
-
version: 0
|
117
|
+
version: '0'
|
118
118
|
type: :development
|
119
119
|
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
121
|
requirements:
|
122
|
-
- - "
|
122
|
+
- - ">="
|
123
123
|
- !ruby/object:Gem::Version
|
124
|
-
version: 0
|
124
|
+
version: '0'
|
125
125
|
- !ruby/object:Gem::Dependency
|
126
126
|
name: rubocop-performance
|
127
127
|
requirement: !ruby/object:Gem::Requirement
|
128
128
|
requirements:
|
129
|
-
- - "
|
129
|
+
- - ">="
|
130
130
|
- !ruby/object:Gem::Version
|
131
|
-
version:
|
131
|
+
version: '0'
|
132
132
|
type: :development
|
133
133
|
prerelease: false
|
134
134
|
version_requirements: !ruby/object:Gem::Requirement
|
135
135
|
requirements:
|
136
|
-
- - "
|
136
|
+
- - ">="
|
137
137
|
- !ruby/object:Gem::Version
|
138
|
-
version:
|
138
|
+
version: '0'
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: rubocop-rake
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - ">="
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: '0'
|
146
|
+
type: :development
|
147
|
+
prerelease: false
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - ">="
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: '0'
|
139
153
|
- !ruby/object:Gem::Dependency
|
140
154
|
name: rubocop-rspec
|
141
155
|
requirement: !ruby/object:Gem::Requirement
|
142
156
|
requirements:
|
143
|
-
- - "
|
157
|
+
- - ">="
|
144
158
|
- !ruby/object:Gem::Version
|
145
|
-
version:
|
159
|
+
version: '0'
|
146
160
|
type: :development
|
147
161
|
prerelease: false
|
148
162
|
version_requirements: !ruby/object:Gem::Requirement
|
149
163
|
requirements:
|
150
|
-
- - "
|
164
|
+
- - ">="
|
151
165
|
- !ruby/object:Gem::Version
|
152
|
-
version:
|
166
|
+
version: '0'
|
153
167
|
- !ruby/object:Gem::Dependency
|
154
168
|
name: simplecov
|
155
169
|
requirement: !ruby/object:Gem::Requirement
|
@@ -343,7 +357,6 @@ files:
|
|
343
357
|
- lib/leftovers/ast.rb
|
344
358
|
- lib/leftovers/ast/builder.rb
|
345
359
|
- lib/leftovers/ast/node.rb
|
346
|
-
- lib/leftovers/backports.rb
|
347
360
|
- lib/leftovers/cli.rb
|
348
361
|
- lib/leftovers/collector.rb
|
349
362
|
- lib/leftovers/config.rb
|
@@ -364,9 +377,11 @@ files:
|
|
364
377
|
- lib/leftovers/file_collector.rb
|
365
378
|
- lib/leftovers/file_list.rb
|
366
379
|
- lib/leftovers/haml.rb
|
380
|
+
- lib/leftovers/json.rb
|
367
381
|
- lib/leftovers/matcher_builders.rb
|
368
382
|
- lib/leftovers/matcher_builders/and.rb
|
369
383
|
- lib/leftovers/matcher_builders/and_not.rb
|
384
|
+
- lib/leftovers/matcher_builders/document.rb
|
370
385
|
- lib/leftovers/matcher_builders/name.rb
|
371
386
|
- lib/leftovers/matcher_builders/node.rb
|
372
387
|
- lib/leftovers/matcher_builders/node_has_argument.rb
|
@@ -460,6 +475,7 @@ files:
|
|
460
475
|
- lib/leftovers/value_processors/underscore.rb
|
461
476
|
- lib/leftovers/value_processors/upcase.rb
|
462
477
|
- lib/leftovers/version.rb
|
478
|
+
- lib/leftovers/yaml.rb
|
463
479
|
homepage: http://github.com/robotdana/leftovers
|
464
480
|
licenses:
|
465
481
|
- MIT
|
@@ -467,6 +483,7 @@ metadata:
|
|
467
483
|
homepage_uri: http://github.com/robotdana/leftovers
|
468
484
|
source_code_uri: http://github.com/robotdana/leftovers
|
469
485
|
changelog_uri: http://github.com/robotdana/leftovers/blob/main/CHANGELOG.md
|
486
|
+
rubygems_mfa_required: 'true'
|
470
487
|
post_install_message:
|
471
488
|
rdoc_options: []
|
472
489
|
require_paths:
|
@@ -475,7 +492,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
475
492
|
requirements:
|
476
493
|
- - ">="
|
477
494
|
- !ruby/object:Gem::Version
|
478
|
-
version: 2.
|
495
|
+
version: 2.5.0
|
479
496
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
480
497
|
requirements:
|
481
498
|
- - ">="
|
data/lib/leftovers/backports.rb
DELETED
@@ -1,40 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Leftovers
|
4
|
-
module Backports
|
5
|
-
ruby_version = Gem::Version.new(RUBY_VERSION)
|
6
|
-
|
7
|
-
unless ruby_version >= Gem::Version.new('2.5')
|
8
|
-
require 'set'
|
9
|
-
module SetCaseEq
|
10
|
-
refine ::Set do
|
11
|
-
def ===(value)
|
12
|
-
include?(value)
|
13
|
-
end
|
14
|
-
end
|
15
|
-
end
|
16
|
-
|
17
|
-
module StringDeletePrefixSuffix
|
18
|
-
refine ::String do
|
19
|
-
def delete_prefix!(str)
|
20
|
-
slice!(0..(str.length - 1)) if start_with?(str)
|
21
|
-
self
|
22
|
-
end
|
23
|
-
|
24
|
-
def delete_suffix!(str)
|
25
|
-
slice!(-str.length..-1) if end_with?(str)
|
26
|
-
self
|
27
|
-
end
|
28
|
-
|
29
|
-
def delete_prefix(str)
|
30
|
-
dup.delete_prefix!(str)
|
31
|
-
end
|
32
|
-
|
33
|
-
def delete_suffix(str)
|
34
|
-
dup.delete_suffix!(str)
|
35
|
-
end
|
36
|
-
end
|
37
|
-
end
|
38
|
-
end
|
39
|
-
end
|
40
|
-
end
|