refract 0.0.2 → 1.0.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 +5 -5
- data/LICENSE.txt +21 -0
- data/README.md +7 -0
- data/lib/refract/basic_visitor.rb +45 -0
- data/lib/refract/converter.rb +1204 -0
- data/lib/refract/formatter.rb +1304 -0
- data/lib/refract/mutation_visitor.rb +895 -0
- data/lib/refract/nodes/alias_global_variable_node.rb +14 -0
- data/lib/refract/nodes/alias_method_node.rb +14 -0
- data/lib/refract/nodes/alternation_pattern_node.rb +14 -0
- data/lib/refract/nodes/and_node.rb +15 -0
- data/lib/refract/nodes/arguments_node.rb +13 -0
- data/lib/refract/nodes/array_node.rb +13 -0
- data/lib/refract/nodes/array_pattern_node.rb +16 -0
- data/lib/refract/nodes/assoc_node.rb +14 -0
- data/lib/refract/nodes/assoc_splat_node.rb +13 -0
- data/lib/refract/nodes/back_reference_read_node.rb +13 -0
- data/lib/refract/nodes/begin_node.rb +16 -0
- data/lib/refract/nodes/block_argument_node.rb +13 -0
- data/lib/refract/nodes/block_local_variable_node.rb +13 -0
- data/lib/refract/nodes/block_node.rb +14 -0
- data/lib/refract/nodes/block_parameter_node.rb +13 -0
- data/lib/refract/nodes/block_parameters_node.rb +14 -0
- data/lib/refract/nodes/break_node.rb +13 -0
- data/lib/refract/nodes/call_and_write_node.rb +15 -0
- data/lib/refract/nodes/call_node.rb +16 -0
- data/lib/refract/nodes/call_operator_write_node.rb +16 -0
- data/lib/refract/nodes/call_or_write_node.rb +15 -0
- data/lib/refract/nodes/call_target_node.rb +14 -0
- data/lib/refract/nodes/capture_pattern_node.rb +14 -0
- data/lib/refract/nodes/case_match_node.rb +15 -0
- data/lib/refract/nodes/case_node.rb +15 -0
- data/lib/refract/nodes/class_node.rb +15 -0
- data/lib/refract/nodes/class_variable_and_write_node.rb +14 -0
- data/lib/refract/nodes/class_variable_operator_write_node.rb +15 -0
- data/lib/refract/nodes/class_variable_or_write_node.rb +14 -0
- data/lib/refract/nodes/class_variable_read_node.rb +13 -0
- data/lib/refract/nodes/class_variable_target_node.rb +13 -0
- data/lib/refract/nodes/class_variable_write_node.rb +14 -0
- data/lib/refract/nodes/constant_and_write_node.rb +14 -0
- data/lib/refract/nodes/constant_operator_write_node.rb +15 -0
- data/lib/refract/nodes/constant_or_write_node.rb +14 -0
- data/lib/refract/nodes/constant_path_and_write_node.rb +14 -0
- data/lib/refract/nodes/constant_path_node.rb +14 -0
- data/lib/refract/nodes/constant_path_operator_write_node.rb +15 -0
- data/lib/refract/nodes/constant_path_or_write_node.rb +14 -0
- data/lib/refract/nodes/constant_path_target_node.rb +14 -0
- data/lib/refract/nodes/constant_path_write_node.rb +14 -0
- data/lib/refract/nodes/constant_read_node.rb +13 -0
- data/lib/refract/nodes/constant_target_node.rb +13 -0
- data/lib/refract/nodes/constant_write_node.rb +14 -0
- data/lib/refract/nodes/def_node.rb +16 -0
- data/lib/refract/nodes/defined_node.rb +13 -0
- data/lib/refract/nodes/else_node.rb +13 -0
- data/lib/refract/nodes/embedded_statements_node.rb +13 -0
- data/lib/refract/nodes/embedded_variable_node.rb +13 -0
- data/lib/refract/nodes/ensure_node.rb +13 -0
- data/lib/refract/nodes/false_node.rb +9 -0
- data/lib/refract/nodes/find_pattern_node.rb +16 -0
- data/lib/refract/nodes/flip_flop_node.rb +15 -0
- data/lib/refract/nodes/float_node.rb +13 -0
- data/lib/refract/nodes/for_node.rb +15 -0
- data/lib/refract/nodes/forwarding_arguments_node.rb +9 -0
- data/lib/refract/nodes/forwarding_parameter_node.rb +9 -0
- data/lib/refract/nodes/forwarding_super_node.rb +13 -0
- data/lib/refract/nodes/global_variable_and_write_node.rb +14 -0
- data/lib/refract/nodes/global_variable_operator_write_node.rb +15 -0
- data/lib/refract/nodes/global_variable_or_write_node.rb +14 -0
- data/lib/refract/nodes/global_variable_read_node.rb +13 -0
- data/lib/refract/nodes/global_variable_target_node.rb +13 -0
- data/lib/refract/nodes/global_variable_write_node.rb +14 -0
- data/lib/refract/nodes/hash_node.rb +13 -0
- data/lib/refract/nodes/hash_pattern_node.rb +14 -0
- data/lib/refract/nodes/if_node.rb +16 -0
- data/lib/refract/nodes/imaginary_node.rb +13 -0
- data/lib/refract/nodes/implicit_node.rb +13 -0
- data/lib/refract/nodes/implicit_rest_node.rb +9 -0
- data/lib/refract/nodes/in_node.rb +14 -0
- data/lib/refract/nodes/index_and_write_node.rb +16 -0
- data/lib/refract/nodes/index_operator_write_node.rb +17 -0
- data/lib/refract/nodes/index_or_write_node.rb +16 -0
- data/lib/refract/nodes/index_target_node.rb +15 -0
- data/lib/refract/nodes/instance_variable_and_write_node.rb +14 -0
- data/lib/refract/nodes/instance_variable_operator_write_node.rb +15 -0
- data/lib/refract/nodes/instance_variable_or_write_node.rb +14 -0
- data/lib/refract/nodes/instance_variable_read_node.rb +13 -0
- data/lib/refract/nodes/instance_variable_target_node.rb +13 -0
- data/lib/refract/nodes/instance_variable_write_node.rb +14 -0
- data/lib/refract/nodes/integer_node.rb +13 -0
- data/lib/refract/nodes/interpolated_match_last_line_node.rb +17 -0
- data/lib/refract/nodes/interpolated_regular_expression_node.rb +17 -0
- data/lib/refract/nodes/interpolated_string_node.rb +13 -0
- data/lib/refract/nodes/interpolated_symbol_node.rb +13 -0
- data/lib/refract/nodes/interpolated_x_string_node.rb +13 -0
- data/lib/refract/nodes/it_local_variable_read_node.rb +9 -0
- data/lib/refract/nodes/it_parameters_node.rb +9 -0
- data/lib/refract/nodes/keyword_hash_node.rb +13 -0
- data/lib/refract/nodes/keyword_rest_parameter_node.rb +13 -0
- data/lib/refract/nodes/lambda_node.rb +14 -0
- data/lib/refract/nodes/local_variable_and_write_node.rb +15 -0
- data/lib/refract/nodes/local_variable_operator_write_node.rb +16 -0
- data/lib/refract/nodes/local_variable_or_write_node.rb +15 -0
- data/lib/refract/nodes/local_variable_read_node.rb +13 -0
- data/lib/refract/nodes/local_variable_target_node.rb +13 -0
- data/lib/refract/nodes/local_variable_write_node.rb +14 -0
- data/lib/refract/nodes/match_last_line_node.rb +17 -0
- data/lib/refract/nodes/match_predicate_node.rb +14 -0
- data/lib/refract/nodes/match_required_node.rb +14 -0
- data/lib/refract/nodes/match_write_node.rb +14 -0
- data/lib/refract/nodes/missing_node.rb +9 -0
- data/lib/refract/nodes/module_node.rb +14 -0
- data/lib/refract/nodes/multi_target_node.rb +15 -0
- data/lib/refract/nodes/multi_write_node.rb +16 -0
- data/lib/refract/nodes/next_node.rb +13 -0
- data/lib/refract/nodes/nil_node.rb +9 -0
- data/lib/refract/nodes/no_keywords_parameter_node.rb +9 -0
- data/lib/refract/nodes/numbered_parameters_node.rb +9 -0
- data/lib/refract/nodes/numbered_reference_read_node.rb +13 -0
- data/lib/refract/nodes/optional_keyword_parameter_node.rb +14 -0
- data/lib/refract/nodes/optional_parameter_node.rb +14 -0
- data/lib/refract/nodes/or_node.rb +15 -0
- data/lib/refract/nodes/parameters_node.rb +19 -0
- data/lib/refract/nodes/parentheses_node.rb +13 -0
- data/lib/refract/nodes/pinned_expression_node.rb +13 -0
- data/lib/refract/nodes/pinned_variable_node.rb +13 -0
- data/lib/refract/nodes/post_execution_node.rb +13 -0
- data/lib/refract/nodes/pre_execution_node.rb +13 -0
- data/lib/refract/nodes/program_node.rb +13 -0
- data/lib/refract/nodes/range_node.rb +15 -0
- data/lib/refract/nodes/rational_node.rb +14 -0
- data/lib/refract/nodes/redo_node.rb +9 -0
- data/lib/refract/nodes/regular_expression_node.rb +17 -0
- data/lib/refract/nodes/required_keyword_parameter_node.rb +13 -0
- data/lib/refract/nodes/required_parameter_node.rb +13 -0
- data/lib/refract/nodes/rescue_modifier_node.rb +14 -0
- data/lib/refract/nodes/rescue_node.rb +16 -0
- data/lib/refract/nodes/rest_parameter_node.rb +13 -0
- data/lib/refract/nodes/retry_node.rb +9 -0
- data/lib/refract/nodes/return_node.rb +13 -0
- data/lib/refract/nodes/self_node.rb +9 -0
- data/lib/refract/nodes/shareable_constant_node.rb +13 -0
- data/lib/refract/nodes/singleton_class_node.rb +14 -0
- data/lib/refract/nodes/source_encoding_node.rb +9 -0
- data/lib/refract/nodes/source_file_node.rb +9 -0
- data/lib/refract/nodes/source_line_node.rb +9 -0
- data/lib/refract/nodes/splat_node.rb +13 -0
- data/lib/refract/nodes/statements_node.rb +13 -0
- data/lib/refract/nodes/string_node.rb +13 -0
- data/lib/refract/nodes/super_node.rb +14 -0
- data/lib/refract/nodes/symbol_node.rb +13 -0
- data/lib/refract/nodes/true_node.rb +9 -0
- data/lib/refract/nodes/undef_node.rb +13 -0
- data/lib/refract/nodes/unless_node.rb +16 -0
- data/lib/refract/nodes/until_node.rb +15 -0
- data/lib/refract/nodes/when_node.rb +14 -0
- data/lib/refract/nodes/while_node.rb +15 -0
- data/lib/refract/nodes/x_string_node.rb +13 -0
- data/lib/refract/nodes/yield_node.rb +13 -0
- data/lib/refract/version.rb +5 -0
- data/lib/refract/visitor.rb +689 -0
- data/lib/refract.rb +50 -55
- data/lib/rubocop/cop/refract/ordered_visit_methods.rb +107 -0
- data/lib/rubocop/cop/refract_cops.rb +3 -0
- metadata +189 -26
data/lib/refract.rb
CHANGED
@@ -1,56 +1,51 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
elementArray.each do |e|
|
52
|
-
elements += " element :#{e}, " + '"' + "[#{identifier}=" + "'#{e}']" + '"' + "\n"
|
53
|
-
end
|
54
|
-
elements
|
55
|
-
end
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "zeitwerk"
|
4
|
+
|
5
|
+
module Refract
|
6
|
+
Loader = Zeitwerk::Loader.for_gem.tap do |loader|
|
7
|
+
loader.ignore("#{__dir__}/ruby_lsp")
|
8
|
+
loader.ignore("#{__dir__}/rubocop")
|
9
|
+
loader.collapse("#{__dir__}/refract/errors")
|
10
|
+
loader.collapse("#{__dir__}/refract/nodes")
|
11
|
+
loader.setup
|
12
|
+
end
|
13
|
+
|
14
|
+
class Node
|
15
|
+
def self.type
|
16
|
+
return @type if defined?(@type)
|
17
|
+
demodularized_name = name.split("::").last
|
18
|
+
@type = demodularized_name.gsub(/(?<=[A-Z])(?=[A-Z][a-z])|(?<=[a-z\d])(?=[A-Z])/, "_").downcase
|
19
|
+
end
|
20
|
+
|
21
|
+
def type
|
22
|
+
self.class.type
|
23
|
+
end
|
24
|
+
|
25
|
+
def accept(visitor)
|
26
|
+
self.class.class_eval(<<~RUBY, __FILE__, __LINE__ + 1)
|
27
|
+
# frozen_string_literal: true
|
28
|
+
|
29
|
+
def accept(visitor)
|
30
|
+
visitor.visit_#{type}(self)
|
31
|
+
end
|
32
|
+
RUBY
|
33
|
+
|
34
|
+
accept(visitor)
|
35
|
+
end
|
36
|
+
|
37
|
+
def start_line
|
38
|
+
@prism_node&.location&.start_line
|
39
|
+
end
|
40
|
+
|
41
|
+
def copy(**props)
|
42
|
+
duplicate = dup
|
43
|
+
|
44
|
+
props.each do |k, v|
|
45
|
+
duplicate.public_send("#{k}=", v)
|
46
|
+
end
|
47
|
+
|
48
|
+
duplicate.freeze
|
49
|
+
end
|
50
|
+
end
|
56
51
|
end
|
@@ -0,0 +1,107 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module RuboCop
|
4
|
+
module Cop
|
5
|
+
module Refract
|
6
|
+
class OrderedVisitMethods < Base
|
7
|
+
extend AutoCorrector
|
8
|
+
|
9
|
+
MSG = "Visit blocks should be sorted alphabetically by node type. Expected `visit %<expected>s` but found `visit %<actual>s`."
|
10
|
+
|
11
|
+
def on_class(node)
|
12
|
+
visit_blocks = find_visit_blocks(node)
|
13
|
+
return if visit_blocks.size < 2
|
14
|
+
|
15
|
+
check_ordering(visit_blocks)
|
16
|
+
end
|
17
|
+
|
18
|
+
private def find_visit_blocks(class_node)
|
19
|
+
visit_blocks = []
|
20
|
+
|
21
|
+
class_node.each_descendant(:block) do |block_node|
|
22
|
+
send_node = block_node.send_node
|
23
|
+
next unless visit_method_call?(send_node)
|
24
|
+
|
25
|
+
visit_blocks << {
|
26
|
+
node: block_node,
|
27
|
+
node_type: extract_node_type(send_node),
|
28
|
+
line: block_node.loc.line,
|
29
|
+
}
|
30
|
+
end
|
31
|
+
|
32
|
+
visit_blocks
|
33
|
+
end
|
34
|
+
|
35
|
+
private def visit_method_call?(node)
|
36
|
+
return false unless node.send_type?
|
37
|
+
node.method_name == :visit &&
|
38
|
+
node.arguments.size == 1 &&
|
39
|
+
node.first_argument.const_type?
|
40
|
+
end
|
41
|
+
|
42
|
+
private def extract_node_type(node)
|
43
|
+
node.first_argument.const_name
|
44
|
+
end
|
45
|
+
|
46
|
+
private def check_ordering(visit_blocks)
|
47
|
+
sorted_blocks = visit_blocks.sort_by { |b| b[:node_type] }
|
48
|
+
|
49
|
+
visit_blocks.each_with_index do |block, index|
|
50
|
+
next if block[:node_type] == sorted_blocks[index][:node_type]
|
51
|
+
|
52
|
+
expected_type = sorted_blocks[index][:node_type]
|
53
|
+
actual_type = block[:node_type]
|
54
|
+
|
55
|
+
add_offense(
|
56
|
+
block[:node].send_node.first_argument,
|
57
|
+
message: format(MSG, expected: expected_type, actual: actual_type),
|
58
|
+
) do |corrector|
|
59
|
+
autocorrect(corrector, visit_blocks, sorted_blocks)
|
60
|
+
end
|
61
|
+
|
62
|
+
# Only report the first out-of-order block to avoid confusion
|
63
|
+
break
|
64
|
+
end
|
65
|
+
end
|
66
|
+
|
67
|
+
private def autocorrect(corrector, original_blocks, sorted_blocks)
|
68
|
+
# Create a mapping of node types to their block sources
|
69
|
+
block_sources = {}
|
70
|
+
original_blocks.each do |block|
|
71
|
+
block_sources[block[:node_type]] = extract_block_source(block[:node])
|
72
|
+
end
|
73
|
+
|
74
|
+
# Replace each block with its sorted version
|
75
|
+
original_blocks.each_with_index do |original_block, index|
|
76
|
+
sorted_type = sorted_blocks[index][:node_type]
|
77
|
+
corrector.replace(
|
78
|
+
original_block[:node].source_range,
|
79
|
+
block_sources[sorted_type],
|
80
|
+
)
|
81
|
+
end
|
82
|
+
end
|
83
|
+
|
84
|
+
private def extract_block_source(block_node)
|
85
|
+
# Get the source including proper indentation
|
86
|
+
source = block_node.source
|
87
|
+
|
88
|
+
# Check if there's a blank line after this block
|
89
|
+
if has_blank_line_after?(block_node)
|
90
|
+
source += "\n"
|
91
|
+
end
|
92
|
+
|
93
|
+
source
|
94
|
+
end
|
95
|
+
|
96
|
+
private def has_blank_line_after?(node)
|
97
|
+
last_line = node.loc.end.line
|
98
|
+
next_line = last_line + 1
|
99
|
+
|
100
|
+
return false if next_line >= processed_source.lines.size
|
101
|
+
|
102
|
+
processed_source.lines[next_line].blank?
|
103
|
+
end
|
104
|
+
end
|
105
|
+
end
|
106
|
+
end
|
107
|
+
end
|
metadata
CHANGED
@@ -1,54 +1,219 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: refract
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
-
|
8
|
-
autorequire:
|
7
|
+
- Joel Drapper
|
9
8
|
bindir: bin
|
10
9
|
cert_chain: []
|
11
|
-
date:
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
12
11
|
dependencies:
|
13
12
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
13
|
+
name: prism
|
15
14
|
requirement: !ruby/object:Gem::Requirement
|
16
15
|
requirements:
|
17
|
-
- - "
|
16
|
+
- - ">="
|
18
17
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0
|
18
|
+
version: '0'
|
20
19
|
type: :runtime
|
21
20
|
prerelease: false
|
22
21
|
version_requirements: !ruby/object:Gem::Requirement
|
23
22
|
requirements:
|
24
|
-
- - "
|
23
|
+
- - ">="
|
25
24
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0
|
25
|
+
version: '0'
|
27
26
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
27
|
+
name: zeitwerk
|
29
28
|
requirement: !ruby/object:Gem::Requirement
|
30
29
|
requirements:
|
31
|
-
- - "
|
30
|
+
- - ">="
|
32
31
|
- !ruby/object:Gem::Version
|
33
|
-
version: 0
|
34
|
-
type: :
|
32
|
+
version: '0'
|
33
|
+
type: :runtime
|
35
34
|
prerelease: false
|
36
35
|
version_requirements: !ruby/object:Gem::Requirement
|
37
36
|
requirements:
|
38
|
-
- - "
|
37
|
+
- - ">="
|
39
38
|
- !ruby/object:Gem::Version
|
40
|
-
version: 0
|
41
|
-
description:
|
42
|
-
email:
|
39
|
+
version: '0'
|
40
|
+
description: Ruby code rewriter.
|
41
|
+
email:
|
42
|
+
- joel@drapper.me
|
43
43
|
executables: []
|
44
44
|
extensions: []
|
45
45
|
extra_rdoc_files: []
|
46
46
|
files:
|
47
|
+
- LICENSE.txt
|
48
|
+
- README.md
|
47
49
|
- lib/refract.rb
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
50
|
+
- lib/refract/basic_visitor.rb
|
51
|
+
- lib/refract/converter.rb
|
52
|
+
- lib/refract/formatter.rb
|
53
|
+
- lib/refract/mutation_visitor.rb
|
54
|
+
- lib/refract/nodes/alias_global_variable_node.rb
|
55
|
+
- lib/refract/nodes/alias_method_node.rb
|
56
|
+
- lib/refract/nodes/alternation_pattern_node.rb
|
57
|
+
- lib/refract/nodes/and_node.rb
|
58
|
+
- lib/refract/nodes/arguments_node.rb
|
59
|
+
- lib/refract/nodes/array_node.rb
|
60
|
+
- lib/refract/nodes/array_pattern_node.rb
|
61
|
+
- lib/refract/nodes/assoc_node.rb
|
62
|
+
- lib/refract/nodes/assoc_splat_node.rb
|
63
|
+
- lib/refract/nodes/back_reference_read_node.rb
|
64
|
+
- lib/refract/nodes/begin_node.rb
|
65
|
+
- lib/refract/nodes/block_argument_node.rb
|
66
|
+
- lib/refract/nodes/block_local_variable_node.rb
|
67
|
+
- lib/refract/nodes/block_node.rb
|
68
|
+
- lib/refract/nodes/block_parameter_node.rb
|
69
|
+
- lib/refract/nodes/block_parameters_node.rb
|
70
|
+
- lib/refract/nodes/break_node.rb
|
71
|
+
- lib/refract/nodes/call_and_write_node.rb
|
72
|
+
- lib/refract/nodes/call_node.rb
|
73
|
+
- lib/refract/nodes/call_operator_write_node.rb
|
74
|
+
- lib/refract/nodes/call_or_write_node.rb
|
75
|
+
- lib/refract/nodes/call_target_node.rb
|
76
|
+
- lib/refract/nodes/capture_pattern_node.rb
|
77
|
+
- lib/refract/nodes/case_match_node.rb
|
78
|
+
- lib/refract/nodes/case_node.rb
|
79
|
+
- lib/refract/nodes/class_node.rb
|
80
|
+
- lib/refract/nodes/class_variable_and_write_node.rb
|
81
|
+
- lib/refract/nodes/class_variable_operator_write_node.rb
|
82
|
+
- lib/refract/nodes/class_variable_or_write_node.rb
|
83
|
+
- lib/refract/nodes/class_variable_read_node.rb
|
84
|
+
- lib/refract/nodes/class_variable_target_node.rb
|
85
|
+
- lib/refract/nodes/class_variable_write_node.rb
|
86
|
+
- lib/refract/nodes/constant_and_write_node.rb
|
87
|
+
- lib/refract/nodes/constant_operator_write_node.rb
|
88
|
+
- lib/refract/nodes/constant_or_write_node.rb
|
89
|
+
- lib/refract/nodes/constant_path_and_write_node.rb
|
90
|
+
- lib/refract/nodes/constant_path_node.rb
|
91
|
+
- lib/refract/nodes/constant_path_operator_write_node.rb
|
92
|
+
- lib/refract/nodes/constant_path_or_write_node.rb
|
93
|
+
- lib/refract/nodes/constant_path_target_node.rb
|
94
|
+
- lib/refract/nodes/constant_path_write_node.rb
|
95
|
+
- lib/refract/nodes/constant_read_node.rb
|
96
|
+
- lib/refract/nodes/constant_target_node.rb
|
97
|
+
- lib/refract/nodes/constant_write_node.rb
|
98
|
+
- lib/refract/nodes/def_node.rb
|
99
|
+
- lib/refract/nodes/defined_node.rb
|
100
|
+
- lib/refract/nodes/else_node.rb
|
101
|
+
- lib/refract/nodes/embedded_statements_node.rb
|
102
|
+
- lib/refract/nodes/embedded_variable_node.rb
|
103
|
+
- lib/refract/nodes/ensure_node.rb
|
104
|
+
- lib/refract/nodes/false_node.rb
|
105
|
+
- lib/refract/nodes/find_pattern_node.rb
|
106
|
+
- lib/refract/nodes/flip_flop_node.rb
|
107
|
+
- lib/refract/nodes/float_node.rb
|
108
|
+
- lib/refract/nodes/for_node.rb
|
109
|
+
- lib/refract/nodes/forwarding_arguments_node.rb
|
110
|
+
- lib/refract/nodes/forwarding_parameter_node.rb
|
111
|
+
- lib/refract/nodes/forwarding_super_node.rb
|
112
|
+
- lib/refract/nodes/global_variable_and_write_node.rb
|
113
|
+
- lib/refract/nodes/global_variable_operator_write_node.rb
|
114
|
+
- lib/refract/nodes/global_variable_or_write_node.rb
|
115
|
+
- lib/refract/nodes/global_variable_read_node.rb
|
116
|
+
- lib/refract/nodes/global_variable_target_node.rb
|
117
|
+
- lib/refract/nodes/global_variable_write_node.rb
|
118
|
+
- lib/refract/nodes/hash_node.rb
|
119
|
+
- lib/refract/nodes/hash_pattern_node.rb
|
120
|
+
- lib/refract/nodes/if_node.rb
|
121
|
+
- lib/refract/nodes/imaginary_node.rb
|
122
|
+
- lib/refract/nodes/implicit_node.rb
|
123
|
+
- lib/refract/nodes/implicit_rest_node.rb
|
124
|
+
- lib/refract/nodes/in_node.rb
|
125
|
+
- lib/refract/nodes/index_and_write_node.rb
|
126
|
+
- lib/refract/nodes/index_operator_write_node.rb
|
127
|
+
- lib/refract/nodes/index_or_write_node.rb
|
128
|
+
- lib/refract/nodes/index_target_node.rb
|
129
|
+
- lib/refract/nodes/instance_variable_and_write_node.rb
|
130
|
+
- lib/refract/nodes/instance_variable_operator_write_node.rb
|
131
|
+
- lib/refract/nodes/instance_variable_or_write_node.rb
|
132
|
+
- lib/refract/nodes/instance_variable_read_node.rb
|
133
|
+
- lib/refract/nodes/instance_variable_target_node.rb
|
134
|
+
- lib/refract/nodes/instance_variable_write_node.rb
|
135
|
+
- lib/refract/nodes/integer_node.rb
|
136
|
+
- lib/refract/nodes/interpolated_match_last_line_node.rb
|
137
|
+
- lib/refract/nodes/interpolated_regular_expression_node.rb
|
138
|
+
- lib/refract/nodes/interpolated_string_node.rb
|
139
|
+
- lib/refract/nodes/interpolated_symbol_node.rb
|
140
|
+
- lib/refract/nodes/interpolated_x_string_node.rb
|
141
|
+
- lib/refract/nodes/it_local_variable_read_node.rb
|
142
|
+
- lib/refract/nodes/it_parameters_node.rb
|
143
|
+
- lib/refract/nodes/keyword_hash_node.rb
|
144
|
+
- lib/refract/nodes/keyword_rest_parameter_node.rb
|
145
|
+
- lib/refract/nodes/lambda_node.rb
|
146
|
+
- lib/refract/nodes/local_variable_and_write_node.rb
|
147
|
+
- lib/refract/nodes/local_variable_operator_write_node.rb
|
148
|
+
- lib/refract/nodes/local_variable_or_write_node.rb
|
149
|
+
- lib/refract/nodes/local_variable_read_node.rb
|
150
|
+
- lib/refract/nodes/local_variable_target_node.rb
|
151
|
+
- lib/refract/nodes/local_variable_write_node.rb
|
152
|
+
- lib/refract/nodes/match_last_line_node.rb
|
153
|
+
- lib/refract/nodes/match_predicate_node.rb
|
154
|
+
- lib/refract/nodes/match_required_node.rb
|
155
|
+
- lib/refract/nodes/match_write_node.rb
|
156
|
+
- lib/refract/nodes/missing_node.rb
|
157
|
+
- lib/refract/nodes/module_node.rb
|
158
|
+
- lib/refract/nodes/multi_target_node.rb
|
159
|
+
- lib/refract/nodes/multi_write_node.rb
|
160
|
+
- lib/refract/nodes/next_node.rb
|
161
|
+
- lib/refract/nodes/nil_node.rb
|
162
|
+
- lib/refract/nodes/no_keywords_parameter_node.rb
|
163
|
+
- lib/refract/nodes/numbered_parameters_node.rb
|
164
|
+
- lib/refract/nodes/numbered_reference_read_node.rb
|
165
|
+
- lib/refract/nodes/optional_keyword_parameter_node.rb
|
166
|
+
- lib/refract/nodes/optional_parameter_node.rb
|
167
|
+
- lib/refract/nodes/or_node.rb
|
168
|
+
- lib/refract/nodes/parameters_node.rb
|
169
|
+
- lib/refract/nodes/parentheses_node.rb
|
170
|
+
- lib/refract/nodes/pinned_expression_node.rb
|
171
|
+
- lib/refract/nodes/pinned_variable_node.rb
|
172
|
+
- lib/refract/nodes/post_execution_node.rb
|
173
|
+
- lib/refract/nodes/pre_execution_node.rb
|
174
|
+
- lib/refract/nodes/program_node.rb
|
175
|
+
- lib/refract/nodes/range_node.rb
|
176
|
+
- lib/refract/nodes/rational_node.rb
|
177
|
+
- lib/refract/nodes/redo_node.rb
|
178
|
+
- lib/refract/nodes/regular_expression_node.rb
|
179
|
+
- lib/refract/nodes/required_keyword_parameter_node.rb
|
180
|
+
- lib/refract/nodes/required_parameter_node.rb
|
181
|
+
- lib/refract/nodes/rescue_modifier_node.rb
|
182
|
+
- lib/refract/nodes/rescue_node.rb
|
183
|
+
- lib/refract/nodes/rest_parameter_node.rb
|
184
|
+
- lib/refract/nodes/retry_node.rb
|
185
|
+
- lib/refract/nodes/return_node.rb
|
186
|
+
- lib/refract/nodes/self_node.rb
|
187
|
+
- lib/refract/nodes/shareable_constant_node.rb
|
188
|
+
- lib/refract/nodes/singleton_class_node.rb
|
189
|
+
- lib/refract/nodes/source_encoding_node.rb
|
190
|
+
- lib/refract/nodes/source_file_node.rb
|
191
|
+
- lib/refract/nodes/source_line_node.rb
|
192
|
+
- lib/refract/nodes/splat_node.rb
|
193
|
+
- lib/refract/nodes/statements_node.rb
|
194
|
+
- lib/refract/nodes/string_node.rb
|
195
|
+
- lib/refract/nodes/super_node.rb
|
196
|
+
- lib/refract/nodes/symbol_node.rb
|
197
|
+
- lib/refract/nodes/true_node.rb
|
198
|
+
- lib/refract/nodes/undef_node.rb
|
199
|
+
- lib/refract/nodes/unless_node.rb
|
200
|
+
- lib/refract/nodes/until_node.rb
|
201
|
+
- lib/refract/nodes/when_node.rb
|
202
|
+
- lib/refract/nodes/while_node.rb
|
203
|
+
- lib/refract/nodes/x_string_node.rb
|
204
|
+
- lib/refract/nodes/yield_node.rb
|
205
|
+
- lib/refract/version.rb
|
206
|
+
- lib/refract/visitor.rb
|
207
|
+
- lib/rubocop/cop/refract/ordered_visit_methods.rb
|
208
|
+
- lib/rubocop/cop/refract_cops.rb
|
209
|
+
homepage: https://github.com/yippee-fun/refract
|
210
|
+
licenses:
|
211
|
+
- MIT
|
212
|
+
metadata:
|
213
|
+
homepage_uri: https://github.com/yippee-fun/refract
|
214
|
+
source_code_uri: https://github.com/yippee-fun/refract
|
215
|
+
funding_uri: https://github.com/sponsors/joeldrapper
|
216
|
+
rubygems_mfa_required: 'true'
|
52
217
|
rdoc_options: []
|
53
218
|
require_paths:
|
54
219
|
- lib
|
@@ -56,16 +221,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
56
221
|
requirements:
|
57
222
|
- - ">="
|
58
223
|
- !ruby/object:Gem::Version
|
59
|
-
version: '
|
224
|
+
version: '3.1'
|
60
225
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
61
226
|
requirements:
|
62
227
|
- - ">="
|
63
228
|
- !ruby/object:Gem::Version
|
64
229
|
version: '0'
|
65
230
|
requirements: []
|
66
|
-
|
67
|
-
rubygems_version: 2.6.8
|
68
|
-
signing_key:
|
231
|
+
rubygems_version: 3.6.7
|
69
232
|
specification_version: 4
|
70
|
-
summary:
|
233
|
+
summary: Ruby code rewriter.
|
71
234
|
test_files: []
|