offense_to_corrector 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: e3aa29d338b6fbe90a8b026e2a5a7008e4772bfe52b988a26856b6cd4c585a1b
4
+ data.tar.gz: 63a528f40daa7da31df15a872d66fc0181a72fb457b1e5c23885deb752dbe6f1
5
+ SHA512:
6
+ metadata.gz: b565e890a4a449467882d5ed53787990342fa5515c38e50f71653480594f4113bb564c1f353be2bdf879ca6cb9263dd9dbf5a58bef4b048e3106febaa303026b
7
+ data.tar.gz: 23de46b53c06aa98dfc0c4342cce5e4344c955187dbc7d65c5161e96271a7268a89f0fe09939a46a34e7b7f524ed37e24958eeddb647bf69e0a08170be13f41d
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --format documentation
2
+ --color
3
+ --require spec_helper
data/CHANGELOG.md ADDED
@@ -0,0 +1,5 @@
1
+ ## [Unreleased]
2
+
3
+ ## [0.1.0] - 2022-02-20
4
+
5
+ - Initial release
@@ -0,0 +1,84 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
6
+
7
+ We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
8
+
9
+ ## Our Standards
10
+
11
+ Examples of behavior that contributes to a positive environment for our community include:
12
+
13
+ * Demonstrating empathy and kindness toward other people
14
+ * Being respectful of differing opinions, viewpoints, and experiences
15
+ * Giving and gracefully accepting constructive feedback
16
+ * Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
17
+ * Focusing on what is best not just for us as individuals, but for the overall community
18
+
19
+ Examples of unacceptable behavior include:
20
+
21
+ * The use of sexualized language or imagery, and sexual attention or
22
+ advances of any kind
23
+ * Trolling, insulting or derogatory comments, and personal or political attacks
24
+ * Public or private harassment
25
+ * Publishing others' private information, such as a physical or email
26
+ address, without their explicit permission
27
+ * Other conduct which could reasonably be considered inappropriate in a
28
+ professional setting
29
+
30
+ ## Enforcement Responsibilities
31
+
32
+ Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
33
+
34
+ Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.
35
+
36
+ ## Scope
37
+
38
+ This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
39
+
40
+ ## Enforcement
41
+
42
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at keystonelemur@gmail.com. All complaints will be reviewed and investigated promptly and fairly.
43
+
44
+ All community leaders are obligated to respect the privacy and security of the reporter of any incident.
45
+
46
+ ## Enforcement Guidelines
47
+
48
+ Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
49
+
50
+ ### 1. Correction
51
+
52
+ **Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
53
+
54
+ **Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
55
+
56
+ ### 2. Warning
57
+
58
+ **Community Impact**: A violation through a single incident or series of actions.
59
+
60
+ **Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
61
+
62
+ ### 3. Temporary Ban
63
+
64
+ **Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.
65
+
66
+ **Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
67
+
68
+ ### 4. Permanent Ban
69
+
70
+ **Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
71
+
72
+ **Consequence**: A permanent ban from any sort of public interaction within the community.
73
+
74
+ ## Attribution
75
+
76
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0,
77
+ available at https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
78
+
79
+ Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity).
80
+
81
+ [homepage]: https://www.contributor-covenant.org
82
+
83
+ For answers to common questions about this code of conduct, see the FAQ at
84
+ https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations.
data/Gemfile ADDED
@@ -0,0 +1,10 @@
1
+ # frozen_string_literal: true
2
+
3
+ source "https://rubygems.org"
4
+
5
+ # Specify your gem's dependencies in offense_to_corrector.gemspec
6
+ gemspec
7
+
8
+ gem "rake", "~> 13.0"
9
+
10
+ gem "rspec", "~> 3.0"
data/Gemfile.lock ADDED
@@ -0,0 +1,55 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ offense_to_corrector (0.0.1)
5
+ rubocop
6
+
7
+ GEM
8
+ remote: https://rubygems.org/
9
+ specs:
10
+ ast (2.4.2)
11
+ diff-lcs (1.5.0)
12
+ parallel (1.21.0)
13
+ parser (3.1.0.0)
14
+ ast (~> 2.4.1)
15
+ rainbow (3.1.1)
16
+ rake (13.0.6)
17
+ regexp_parser (2.2.1)
18
+ rexml (3.2.5)
19
+ rspec (3.11.0)
20
+ rspec-core (~> 3.11.0)
21
+ rspec-expectations (~> 3.11.0)
22
+ rspec-mocks (~> 3.11.0)
23
+ rspec-core (3.11.0)
24
+ rspec-support (~> 3.11.0)
25
+ rspec-expectations (3.11.0)
26
+ diff-lcs (>= 1.2.0, < 2.0)
27
+ rspec-support (~> 3.11.0)
28
+ rspec-mocks (3.11.0)
29
+ diff-lcs (>= 1.2.0, < 2.0)
30
+ rspec-support (~> 3.11.0)
31
+ rspec-support (3.11.0)
32
+ rubocop (1.25.1)
33
+ parallel (~> 1.10)
34
+ parser (>= 3.1.0.0)
35
+ rainbow (>= 2.2.2, < 4.0)
36
+ regexp_parser (>= 1.8, < 3.0)
37
+ rexml
38
+ rubocop-ast (>= 1.15.1, < 2.0)
39
+ ruby-progressbar (~> 1.7)
40
+ unicode-display_width (>= 1.4.0, < 3.0)
41
+ rubocop-ast (1.15.2)
42
+ parser (>= 3.0.1.1)
43
+ ruby-progressbar (1.11.0)
44
+ unicode-display_width (2.1.0)
45
+
46
+ PLATFORMS
47
+ x86_64-darwin-20
48
+
49
+ DEPENDENCIES
50
+ offense_to_corrector!
51
+ rake (~> 13.0)
52
+ rspec (~> 3.0)
53
+
54
+ BUNDLED WITH
55
+ 2.3.5
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2022 Brandon Weaver
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,106 @@
1
+ # OffenseToCorrector
2
+
3
+ > **WARNING**: This is an experimental alpha used as a proof-of-concept, and will
4
+ > require some work to be ready for full-time use in the field.
5
+
6
+ Takes a RuboCop of Ruby offense like so:
7
+
8
+ ```ruby
9
+ code = <<~RUBY
10
+ update_attributes_book.update_attributes(author: "Alice")
11
+ ^^^^^^^^^^^^^^^^^ Use `update` instead of `update_attributes`.
12
+ RUBY
13
+ ```
14
+
15
+ ...and turns it into a skeleton for a RuboCop corrector:
16
+
17
+ ```ruby
18
+ puts OffenseToCorrector.node_offense_data(CODE)
19
+
20
+ {
21
+ offending_node: %(#<struct OffenseToCorrector::AtomNode
22
+ source="update_attributes",
23
+ range=23..40,
24
+ parent=s(:send,
25
+ s(:send, nil, :update_attributes_book), :update_attributes,
26
+ s(:hash,
27
+ s(:pair,
28
+ s(:sym, :author),
29
+ s(:str, "Alice"))))>),
30
+ offending_node_matcher: "(send ... :update_attributes ...)"
31
+ }
32
+
33
+ puts OffenseToCorrector.offense_to_cop(code)
34
+
35
+ # Generated content
36
+ module RuboCop
37
+ module Cop
38
+ module Lint
39
+ class TODO < Cop
40
+ MSG = "Use `update` instead of `update_attributes`."
41
+
42
+ def_node_matcher :matches?, <<~PATTERN
43
+ (send ... :update_attributes ...)
44
+ PATTERN
45
+
46
+ def on_send(node)
47
+ return false unless matches?(node)
48
+
49
+ add_offense(node,
50
+ message: MSG,
51
+ location: :selector,
52
+ severity: :warning
53
+ )
54
+ end
55
+
56
+ # def autocorrect(node)
57
+ # lambda do |corrector|
58
+ # corrector.replace(
59
+ # node.loc.selector,
60
+ # "<NEW_CODE_HERE>"
61
+ # )
62
+ # end
63
+ # end
64
+ end
65
+ end
66
+ end
67
+ end
68
+ ```
69
+
70
+ ## Installation
71
+
72
+ Add this line to your application's Gemfile:
73
+
74
+ ```ruby
75
+ gem 'offense_to_corrector'
76
+ ```
77
+
78
+ And then execute:
79
+
80
+ ```
81
+ $ bundle install
82
+ ```
83
+
84
+ Or install it yourself as:
85
+
86
+ ```
87
+ $ gem install offense_to_corrector
88
+ ```
89
+
90
+ ## Development
91
+
92
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
93
+
94
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
95
+
96
+ ## Contributing
97
+
98
+ Bug reports and pull requests are welcome on GitHub at https://github.com/baweaver/offense_to_corrector. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/baweaver/offense_to_corrector/blob/main/CODE_OF_CONDUCT.md).
99
+
100
+ ## License
101
+
102
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
103
+
104
+ ## Code of Conduct
105
+
106
+ Everyone interacting in the OffenseToCorrector project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/baweaver/offense_to_corrector/blob/main/CODE_OF_CONDUCT.md).
data/Rakefile ADDED
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "bundler/gem_tasks"
4
+ require "rspec/core/rake_task"
5
+
6
+ RSpec::Core::RakeTask.new(:spec)
7
+
8
+ task default: :spec
@@ -0,0 +1,32 @@
1
+ module RuboCop
2
+ module Cop
3
+ module <%= cop_type %>
4
+ class <%= class_name %> < Cop
5
+ MSG = "<%= error_message %>"
6
+
7
+ def_node_matcher :matches?, <<~PATTERN
8
+ <%= match_pattern %>
9
+ PATTERN
10
+
11
+ def on_<%= node_type %>(node)
12
+ return false unless matches?(node)
13
+
14
+ add_offense(node,
15
+ message: MSG,
16
+ location: :<%= node_location.to_sym %>,
17
+ severity: :<%= offense_severity.to_sym %>
18
+ )
19
+ end
20
+
21
+ # def autocorrect(node)
22
+ # lambda do |corrector|
23
+ # corrector.replace(
24
+ # node.loc.<%= node_location.to_s %>,
25
+ # "<NEW_CODE_HERE>"
26
+ # )
27
+ # end
28
+ # end
29
+ end
30
+ end
31
+ end
32
+ end
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module OffenseToCorrector
4
+ VERSION = "0.0.1"
5
+ end
@@ -0,0 +1,258 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "offense_to_corrector/version"
4
+
5
+ require "rubocop"
6
+ require "erb"
7
+
8
+ module OffenseToCorrector
9
+ module_function def load_template(name)
10
+ File.join(File.dirname(__FILE__), "offense_to_corrector/templates", name)
11
+ end
12
+
13
+ module_function def node_offense_data(code)
14
+ OffenseParser.new(code).node_offense_info
15
+ end
16
+
17
+ module_function def offense_to_cop(code)
18
+ OffenseParser.new(code).render
19
+ end
20
+
21
+ # The annoying thing is that `RuboCop::AST::Node` 's children / descendant
22
+ # methods don't capture all the relevant data, so we have to cheat a bit
23
+ # by wrapping atoms (String, Symbol, Int, etc) in a class to get around that.
24
+ AtomNode = Struct.new(:source, :range, :parent, keyword_init: true) do
25
+ def type
26
+ self.parent.type
27
+ end
28
+
29
+ def to_s
30
+ relevant_children = self.parent.children.map do |c|
31
+ next "..." unless c.to_s == self.source.to_s # Wildcard
32
+
33
+ case c
34
+ when String then %("#{c}") # Literal string
35
+ when Symbol then ":#{c}" # Literal symbol
36
+ else c
37
+ end
38
+ end
39
+
40
+ # The trick here is that these aren't nodes, but we do care about
41
+ # what the "parent" is that contains it to get something we can
42
+ # work with. All other children are replaced with wildcards.
43
+ "(#{self.parent.type} #{relevant_children.join(' ')})"
44
+ end
45
+ end
46
+
47
+ module AstTools
48
+ def atom?(value)
49
+ !value.is_a?(RuboCop::AST::Node)
50
+ end
51
+
52
+ # I may have to work on getting this one later to try and
53
+ # narrow the band of `AtomNode`
54
+ # def childless?(node)
55
+ # false # TODO
56
+ # end
57
+
58
+ # How much do two ranges overlap? Used to see how well a node
59
+ # matches with the associated underline
60
+ def range_overlap_count(a, b)
61
+ return (b.begin...[a.end, b.end].min).size if a.cover?(b.begin)
62
+ return (a.begin...[a.end, b.end].min).size if b.cover?(a.begin)
63
+
64
+ 0
65
+ end
66
+
67
+ # See if a range overlaps another one, bidirectional
68
+ def range_overlap?(a, b)
69
+ a.cover?(b.begin) || b.cover?(a.begin)
70
+ end
71
+
72
+ # To get an AST we need the processed source of a string
73
+ def processed_source_from(string)
74
+ RuboCop::ProcessedSource.new(string, RUBY_VERSION.to_f)
75
+ end
76
+
77
+ # So why bother with the above then? If we end up into correctors
78
+ # and tree-rewrites we need that original processed source to be
79
+ # the basis of the AST, otherwise we get object ID mismatches.
80
+ def ast_from(value)
81
+ case value
82
+ when RuboCop::ProcessedSource
83
+ value.ast
84
+ else
85
+ processed_source_from(value).ast
86
+ end
87
+ end
88
+
89
+ # Not needed quite yet, but could very potentially be used to verify
90
+ # how accurate generated cops are.
91
+ def get_corrector(value)
92
+ RuboCop::Cop::Corrector.new(value.buffer)
93
+ end
94
+
95
+ # Descendants leaves out a _lot_ of detail potentially. There has to
96
+ # be a better way to deal with this, but not thinking of one right now.
97
+ def get_children(source_node)
98
+ recurse = -> node do
99
+ collected_children = []
100
+ node.children.each do |child|
101
+ next if child.nil?
102
+
103
+ # If it's a regular node carry on as you were
104
+ unless atom?(child) # || childless?(child)
105
+ collected_children.concat([child, *recurse[child]])
106
+ next
107
+ end
108
+
109
+ # Otherwise we want to find where that node is in the source code,
110
+ # and the range it exists in, to create an `AtomNode`
111
+ child_string = child.to_s
112
+ range_begin = source_node.source.index(/\b#{child_string}\b/)
113
+ range_end = range_begin + child_string.size
114
+
115
+ collected_children << AtomNode.new(
116
+ parent: node,
117
+ source: child_string,
118
+ range: range_begin..range_end
119
+ )
120
+ end
121
+
122
+ collected_children
123
+ end
124
+
125
+ [source_node, *recurse[source_node]]
126
+ end
127
+ end
128
+
129
+ # ERB template for rendering a cop skeleton, may make this more useful
130
+ # later, but mostly quick templating for now.
131
+ class OffenseTemplate
132
+ def initialize(name: "autocorrector_template.erb")
133
+ @template = File.read(OffenseToCorrector.load_template(name))
134
+ @erb = ERB.new(@template)
135
+ end
136
+
137
+ def render(
138
+ class_name: "TODO",
139
+ match_pattern:,
140
+ error_message: "",
141
+ node_type:,
142
+ cop_type: "Lint",
143
+ node_location: "selector",
144
+ offense_severity: "warning"
145
+ )
146
+ @erb.result_with_hash(
147
+ class_name:,
148
+ match_pattern:,
149
+ error_message:,
150
+ node_type:,
151
+ cop_type:,
152
+ node_location:,
153
+ offense_severity:
154
+ )
155
+ end
156
+ end
157
+
158
+ # Bit more of a structured container for an offense (the underline)
159
+ Offense = Struct.new(:line, :error, :range, keyword_init: true)
160
+
161
+ class OffenseParser
162
+ include AstTools
163
+
164
+ # How many underline carots (^), and potentially an error after
165
+ OFFENSE_MATCH = /^ *?(?<underline>\^+) *?(?<error>.*)?$/
166
+
167
+ attr_reader :ast, :source, :offense
168
+
169
+ def initialize(string)
170
+ @ast_lines, @offense = parse_string(string)
171
+ @source = processed_source_from(@ast_lines.join("\n"))
172
+ @ast = ast_from(@source)
173
+ @ast_nodes = get_children(@ast)
174
+ @template = OffenseTemplate.new
175
+ end
176
+
177
+ # Render that into the cop skeleton. Perhaps having too much
178
+ # fun here with rightward assignment.
179
+ def render
180
+ call => {
181
+ offense: { error: },
182
+ node_offense_info: { offending_node:, offending_node_matcher: }
183
+ }
184
+
185
+ @template.render(
186
+ class_name: "TODO",
187
+ match_pattern: offending_node_matcher,
188
+ error_message: error,
189
+ node_type: offending_node.type,
190
+ cop_type: "Lint",
191
+ node_location: "selector",
192
+ offense_severity: "warning"
193
+ )
194
+ end
195
+
196
+ # Quick info on what all is being worked on and what info we got
197
+ def call
198
+ { ast:, offense:, node_offense_info: }
199
+ end
200
+
201
+ def node_offense_info
202
+ return @node_offense_info if defined?(@node_offense_info)
203
+
204
+ # Find the node, or atom, with the most overlap with the offense
205
+ # range defined by that underline.
206
+ offending_node = @ast_nodes.max do |node|
207
+ node_range = if node.is_a?(AtomNode)
208
+ node.range
209
+ else
210
+ node.location.expression.to_range
211
+ end
212
+
213
+ # Except we're doing it as a percentage, otherwise parent nodes
214
+ # will dominate that count potentially. The closer to 100% overlap
215
+ # the better.
216
+ overlap_count = range_overlap_count(node_range, @offense[:range])
217
+ overlap_count.fdiv(node.source.size)
218
+ end
219
+
220
+ @node_offense_info ||= {
221
+ offending_node:,
222
+ offending_node_matcher: offending_node.to_s
223
+ }
224
+ end
225
+
226
+ # See if there's an underline, if so get how long it is and
227
+ # the error message after it
228
+ private def offending_meta_from(line)
229
+ match_data = OFFENSE_MATCH.match(line) or return nil
230
+ underline = match_data[:underline]
231
+ error = match_data[:error].lstrip
232
+
233
+ underline_start = line.index(underline)
234
+ underline_end = underline_start + underline.size
235
+
236
+ { match_data:, error:, range: underline_start..underline_end }
237
+ end
238
+
239
+ # Figure which part of the passed in code string is AST vs offense
240
+ private def parse_string(string)
241
+ ast_lines = []
242
+ offense = nil
243
+
244
+ string.lines.each_with_index do |line, i|
245
+ meta_info = offending_meta_from(line)
246
+
247
+ if meta_info
248
+ raise "Cannot have multiple offenses" unless offense.nil?
249
+ offense = Offense.new(line: i, **meta_info.slice(:error, :range))
250
+ else
251
+ ast_lines << line
252
+ end
253
+ end
254
+
255
+ [ast_lines, offense]
256
+ end
257
+ end
258
+ end
@@ -0,0 +1,4 @@
1
+ module OffenseToCorrector
2
+ VERSION: String
3
+ # See the writing guide of rbs: https://github.com/ruby/rbs#guides
4
+ end
metadata ADDED
@@ -0,0 +1,72 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: offense_to_corrector
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Brandon Weaver
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2022-02-21 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rubocop
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ description:
28
+ email:
29
+ - keystonelemur@gmail.com
30
+ executables: []
31
+ extensions: []
32
+ extra_rdoc_files: []
33
+ files:
34
+ - ".rspec"
35
+ - CHANGELOG.md
36
+ - CODE_OF_CONDUCT.md
37
+ - Gemfile
38
+ - Gemfile.lock
39
+ - LICENSE.txt
40
+ - README.md
41
+ - Rakefile
42
+ - lib/offense_to_corrector.rb
43
+ - lib/offense_to_corrector/templates/autocorrector_template.erb
44
+ - lib/offense_to_corrector/version.rb
45
+ - sig/offense_to_corrector.rbs
46
+ homepage: https://www.github.com/baweaver/offense_to_corrector
47
+ licenses:
48
+ - MIT
49
+ metadata:
50
+ homepage_uri: https://www.github.com/baweaver/offense_to_corrector
51
+ source_code_uri: https://www.github.com/baweaver/offense_to_corrector
52
+ changelog_uri: https://www.github.com/baweaver/offense_to_corrector/CHANGELOG.md
53
+ post_install_message:
54
+ rdoc_options: []
55
+ require_paths:
56
+ - lib
57
+ required_ruby_version: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: 3.0.0
62
+ required_rubygems_version: !ruby/object:Gem::Requirement
63
+ requirements:
64
+ - - ">="
65
+ - !ruby/object:Gem::Version
66
+ version: '0'
67
+ requirements: []
68
+ rubygems_version: 3.3.3
69
+ signing_key:
70
+ specification_version: 4
71
+ summary: Transform a RuboCop or Ruby offense into a corrector skeleton
72
+ test_files: []