packwerk 2.2.0 → 2.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (187) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/ci.yml +29 -20
  3. data/.github/workflows/cla.yml +22 -0
  4. data/.rubocop.yml +48 -19
  5. data/Gemfile +7 -2
  6. data/Gemfile.lock +201 -175
  7. data/README.md +1 -1
  8. data/RESOLVING_VIOLATIONS.md +81 -0
  9. data/Rakefile +1 -1
  10. data/USAGE.md +14 -5
  11. data/bin/m +1 -1
  12. data/bin/rake +1 -1
  13. data/bin/rubocop +1 -1
  14. data/bin/srb +1 -1
  15. data/bin/tapioca +1 -1
  16. data/gemfiles/Gemfile-rails-6-0 +1 -1
  17. data/gemfiles/Gemfile-rails-6-1 +22 -0
  18. data/lib/packwerk/application_validator.rb +7 -6
  19. data/lib/packwerk/association_inspector.rb +17 -15
  20. data/lib/packwerk/cache.rb +36 -29
  21. data/lib/packwerk/cli.rb +5 -6
  22. data/lib/packwerk/const_node_inspector.rb +8 -7
  23. data/lib/packwerk/constant_name_inspector.rb +2 -2
  24. data/lib/packwerk/deprecated_references.rb +34 -19
  25. data/lib/packwerk/file_processor.rb +14 -14
  26. data/lib/packwerk/files_for_processing.rb +27 -31
  27. data/lib/packwerk/formatters/offenses_formatter.rb +3 -3
  28. data/lib/packwerk/formatters/progress_formatter.rb +2 -2
  29. data/lib/packwerk/node.rb +1 -294
  30. data/lib/packwerk/node_helpers.rb +335 -0
  31. data/lib/packwerk/node_processor.rb +6 -5
  32. data/lib/packwerk/node_processor_factory.rb +3 -3
  33. data/lib/packwerk/node_visitor.rb +1 -1
  34. data/lib/packwerk/offense_collection.rb +6 -3
  35. data/lib/packwerk/offenses_formatter.rb +2 -2
  36. data/lib/packwerk/package.rb +3 -0
  37. data/lib/packwerk/package_set.rb +2 -0
  38. data/lib/packwerk/parse_run.rb +15 -13
  39. data/lib/packwerk/parsed_constant_definitions.rb +23 -20
  40. data/lib/packwerk/parsers/erb.rb +3 -3
  41. data/lib/packwerk/reference_checking/checkers/checker.rb +16 -3
  42. data/lib/packwerk/reference_checking/checkers/dependency_checker.rb +16 -0
  43. data/lib/packwerk/reference_checking/checkers/privacy_checker.rb +18 -0
  44. data/lib/packwerk/reference_checking/reference_checker.rb +3 -1
  45. data/lib/packwerk/reference_extractor.rb +51 -48
  46. data/lib/packwerk/reference_offense.rb +3 -27
  47. data/lib/packwerk/run_context.rb +3 -3
  48. data/lib/packwerk/spring_command.rb +1 -1
  49. data/lib/packwerk/version.rb +1 -1
  50. data/lib/packwerk.rb +1 -0
  51. data/packwerk.gemspec +4 -12
  52. data/sorbet/rbi/gems/actioncable@7.0.3.1.rbi +2754 -0
  53. data/sorbet/rbi/gems/actionmailbox@7.0.3.1.rbi +1496 -0
  54. data/sorbet/rbi/gems/actionmailer@7.0.3.1.rbi +2362 -0
  55. data/sorbet/rbi/gems/actionpack@7.0.3.1.rbi +19397 -0
  56. data/sorbet/rbi/gems/actiontext@7.0.3.1.rbi +1569 -0
  57. data/sorbet/rbi/gems/actionview@7.0.3.1.rbi +14907 -0
  58. data/sorbet/rbi/gems/activejob@7.0.3.1.rbi +2553 -0
  59. data/sorbet/rbi/gems/activemodel@7.0.3.1.rbi +5999 -0
  60. data/sorbet/rbi/gems/activerecord@7.0.3.1.rbi +37832 -0
  61. data/sorbet/rbi/gems/activestorage@7.0.3.1.rbi +2321 -0
  62. data/sorbet/rbi/gems/activesupport@7.0.3.1.rbi +18818 -0
  63. data/sorbet/rbi/gems/concurrent-ruby@1.1.10.rbi +11722 -0
  64. data/sorbet/rbi/gems/constant_resolver@0.2.0.rbi +90 -0
  65. data/sorbet/rbi/gems/diff-lcs@1.5.0.rbi +1079 -0
  66. data/sorbet/rbi/gems/digest@3.1.0.rbi +189 -0
  67. data/sorbet/rbi/gems/erubi@1.11.0.rbi +140 -0
  68. data/sorbet/rbi/gems/globalid@1.0.0.rbi +572 -0
  69. data/sorbet/rbi/gems/i18n@1.12.0.rbi +2296 -0
  70. data/sorbet/rbi/gems/json@2.6.2.rbi +1548 -0
  71. data/sorbet/rbi/gems/language_server-protocol@3.16.0.3.rbi +8 -0
  72. data/sorbet/rbi/gems/loofah@2.18.0.rbi +877 -0
  73. data/sorbet/rbi/gems/m@1.6.0.rbi +257 -0
  74. data/sorbet/rbi/gems/marcel@1.0.2.rbi +220 -0
  75. data/sorbet/rbi/gems/mini_mime@1.1.2.rbi +170 -0
  76. data/sorbet/rbi/gems/mini_portile2@2.8.0.rbi +8 -0
  77. data/sorbet/rbi/gems/minitest-focus@1.3.1.rbi +104 -0
  78. data/sorbet/rbi/gems/minitest@5.16.2.rbi +2136 -0
  79. data/sorbet/rbi/gems/mocha@1.14.0.rbi +4177 -0
  80. data/sorbet/rbi/gems/net-imap@0.2.3.rbi +2147 -0
  81. data/sorbet/rbi/gems/net-pop@0.1.1.rbi +926 -0
  82. data/sorbet/rbi/gems/net-protocol@0.1.3.rbi +11 -0
  83. data/sorbet/rbi/gems/net-smtp@0.3.1.rbi +1108 -0
  84. data/sorbet/rbi/gems/netrc@0.11.0.rbi +153 -0
  85. data/sorbet/rbi/gems/nio4r@2.5.8.rbi +292 -0
  86. data/sorbet/rbi/gems/nokogiri@1.13.8.rbi +6478 -0
  87. data/sorbet/rbi/gems/parallel@1.22.1.rbi +277 -0
  88. data/sorbet/rbi/gems/parser@3.1.2.1.rbi +9029 -0
  89. data/sorbet/rbi/gems/prettier_print@0.1.0.rbi +8 -0
  90. data/sorbet/rbi/gems/pry@0.14.1.rbi +8 -0
  91. data/sorbet/rbi/gems/racc@1.6.0.rbi +152 -0
  92. data/sorbet/rbi/gems/rack-test@2.0.2.rbi +953 -0
  93. data/sorbet/rbi/gems/rack@2.2.4.rbi +5636 -0
  94. data/sorbet/rbi/gems/rails-html-sanitizer@1.4.3.rbi +688 -0
  95. data/sorbet/rbi/gems/rails@7.0.3.1.rbi +8 -0
  96. data/sorbet/rbi/gems/railties@7.0.3.1.rbi +3507 -0
  97. data/sorbet/rbi/gems/rainbow@3.1.1.rbi +392 -0
  98. data/sorbet/rbi/gems/rake@13.0.6.rbi +2924 -0
  99. data/sorbet/rbi/gems/rbi@0.0.15.rbi +3007 -0
  100. data/sorbet/rbi/gems/regexp_parser@2.5.0.rbi +3383 -0
  101. data/sorbet/rbi/gems/rexml@3.2.5.rbi +4714 -0
  102. data/sorbet/rbi/gems/rubocop-ast@1.21.0.rbi +6961 -0
  103. data/sorbet/rbi/gems/rubocop-performance@1.14.3.rbi +2986 -0
  104. data/sorbet/rbi/gems/{rubocop-shopify@2.0.1.rbi → rubocop-shopify@2.9.0.rbi} +4 -4
  105. data/sorbet/rbi/gems/rubocop-sorbet@0.6.11.rbi +992 -0
  106. data/sorbet/rbi/gems/rubocop@1.34.1.rbi +51820 -0
  107. data/sorbet/rbi/gems/ruby-lsp@0.2.1.rbi +11 -0
  108. data/sorbet/rbi/gems/smart_properties@1.17.0.rbi +474 -0
  109. data/sorbet/rbi/gems/spoom@1.1.11.rbi +2181 -0
  110. data/sorbet/rbi/gems/spring@4.0.0.rbi +411 -0
  111. data/sorbet/rbi/gems/strscan@3.0.4.rbi +8 -0
  112. data/sorbet/rbi/gems/syntax_tree@3.3.0.rbi +8 -0
  113. data/sorbet/rbi/gems/tapioca@0.9.2.rbi +3181 -0
  114. data/sorbet/rbi/gems/thor@1.2.1.rbi +3956 -0
  115. data/sorbet/rbi/gems/timeout@0.3.0.rbi +142 -0
  116. data/sorbet/rbi/gems/tzinfo@2.0.5.rbi +5896 -0
  117. data/sorbet/rbi/gems/unicode-display_width@2.2.0.rbi +48 -0
  118. data/sorbet/rbi/gems/unparser@0.6.5.rbi +4529 -0
  119. data/sorbet/rbi/gems/webrick@1.7.0.rbi +2582 -0
  120. data/sorbet/rbi/gems/websocket-driver@0.7.5.rbi +993 -0
  121. data/sorbet/rbi/gems/yard-sorbet@0.6.1.rbi +388 -0
  122. data/sorbet/rbi/gems/yard@0.9.28.rbi +18242 -0
  123. data/sorbet/rbi/gems/zeitwerk@2.6.0.rbi +867 -0
  124. data/sorbet/rbi/shims/psych.rbi +5 -0
  125. data/sorbet/tapioca/require.rb +2 -3
  126. metadata +88 -157
  127. data/.github/probots.yml +0 -2
  128. data/library.yml +0 -6
  129. data/service.yml +0 -1
  130. data/sorbet/rbi/gems/actioncable@7.0.0.alpha-d612542336d9a61381311c95a27d801bb4094779.rbi +0 -860
  131. data/sorbet/rbi/gems/actionmailbox@7.0.0.alpha-d612542336d9a61381311c95a27d801bb4094779.rbi +0 -568
  132. data/sorbet/rbi/gems/actionmailer@7.0.0.alpha-d612542336d9a61381311c95a27d801bb4094779.rbi +0 -587
  133. data/sorbet/rbi/gems/actionpack@7.0.0.alpha-d612542336d9a61381311c95a27d801bb4094779.rbi +0 -5314
  134. data/sorbet/rbi/gems/actiontext@7.0.0.alpha-d612542336d9a61381311c95a27d801bb4094779.rbi +0 -699
  135. data/sorbet/rbi/gems/actionview@7.0.0.alpha-d612542336d9a61381311c95a27d801bb4094779.rbi +0 -2515
  136. data/sorbet/rbi/gems/activejob@7.0.0.alpha-d612542336d9a61381311c95a27d801bb4094779.rbi +0 -624
  137. data/sorbet/rbi/gems/activemodel@7.0.0.alpha-d612542336d9a61381311c95a27d801bb4094779.rbi +0 -1248
  138. data/sorbet/rbi/gems/activerecord@7.0.0.alpha-d612542336d9a61381311c95a27d801bb4094779.rbi +0 -8363
  139. data/sorbet/rbi/gems/activestorage@7.0.0.alpha-d612542336d9a61381311c95a27d801bb4094779.rbi +0 -876
  140. data/sorbet/rbi/gems/activesupport@7.0.0.alpha-d612542336d9a61381311c95a27d801bb4094779.rbi +0 -3987
  141. data/sorbet/rbi/gems/colorize@0.8.1.rbi +0 -40
  142. data/sorbet/rbi/gems/commander@4.5.2.rbi +0 -8
  143. data/sorbet/rbi/gems/concurrent-ruby@1.1.8.rbi +0 -1969
  144. data/sorbet/rbi/gems/constant_resolver@0.1.5.rbi +0 -26
  145. data/sorbet/rbi/gems/erubi@1.10.0.rbi +0 -41
  146. data/sorbet/rbi/gems/globalid@0.4.2.rbi +0 -178
  147. data/sorbet/rbi/gems/highline@2.0.3.rbi +0 -8
  148. data/sorbet/rbi/gems/i18n@1.8.10.rbi +0 -600
  149. data/sorbet/rbi/gems/loofah@2.9.0.rbi +0 -274
  150. data/sorbet/rbi/gems/m@1.5.1.rbi +0 -108
  151. data/sorbet/rbi/gems/marcel@1.0.0.rbi +0 -70
  152. data/sorbet/rbi/gems/mini_mime@1.0.3.rbi +0 -71
  153. data/sorbet/rbi/gems/minitest-focus@1.2.1.rbi +0 -8
  154. data/sorbet/rbi/gems/minitest@5.14.4.rbi +0 -544
  155. data/sorbet/rbi/gems/mocha@1.12.0.rbi +0 -953
  156. data/sorbet/rbi/gems/nio4r@2.5.7.rbi +0 -90
  157. data/sorbet/rbi/gems/nokogiri@1.11.2.rbi +0 -1647
  158. data/sorbet/rbi/gems/parallel@1.20.1.rbi +0 -117
  159. data/sorbet/rbi/gems/parlour@6.0.0.rbi +0 -1272
  160. data/sorbet/rbi/gems/parser@3.0.0.0.rbi +0 -1745
  161. data/sorbet/rbi/gems/pry@0.14.0.rbi +0 -8
  162. data/sorbet/rbi/gems/psych@3.3.2.rbi +0 -24
  163. data/sorbet/rbi/gems/racc@1.5.2.rbi +0 -57
  164. data/sorbet/rbi/gems/rack-test@1.1.0.rbi +0 -335
  165. data/sorbet/rbi/gems/rack@2.2.3.rbi +0 -1718
  166. data/sorbet/rbi/gems/rails-html-sanitizer@1.3.0.rbi +0 -213
  167. data/sorbet/rbi/gems/rails@7.0.0.alpha-d612542336d9a61381311c95a27d801bb4094779.rbi +0 -8
  168. data/sorbet/rbi/gems/railties@7.0.0.alpha-d612542336d9a61381311c95a27d801bb4094779.rbi +0 -880
  169. data/sorbet/rbi/gems/rainbow@3.0.0.rbi +0 -155
  170. data/sorbet/rbi/gems/rake@13.0.3.rbi +0 -837
  171. data/sorbet/rbi/gems/regexp_parser@2.1.1.rbi +0 -8
  172. data/sorbet/rbi/gems/rexml@3.2.4.rbi +0 -8
  173. data/sorbet/rbi/gems/rubocop-ast@1.4.1.rbi +0 -8
  174. data/sorbet/rbi/gems/rubocop-performance@1.10.2.rbi +0 -8
  175. data/sorbet/rbi/gems/rubocop-sorbet@0.6.1.rbi +0 -8
  176. data/sorbet/rbi/gems/rubocop@1.12.0.rbi +0 -8
  177. data/sorbet/rbi/gems/smart_properties@1.15.0.rbi +0 -168
  178. data/sorbet/rbi/gems/spoom@1.1.0.rbi +0 -1061
  179. data/sorbet/rbi/gems/spring@2.1.1.rbi +0 -160
  180. data/sorbet/rbi/gems/sprockets-rails@3.2.2.rbi +0 -451
  181. data/sorbet/rbi/gems/sprockets@4.0.2.rbi +0 -1133
  182. data/sorbet/rbi/gems/tapioca@0.4.19.rbi +0 -603
  183. data/sorbet/rbi/gems/thor@1.1.0.rbi +0 -893
  184. data/sorbet/rbi/gems/tzinfo@2.0.4.rbi +0 -566
  185. data/sorbet/rbi/gems/unicode-display_width@2.0.0.rbi +0 -8
  186. data/sorbet/rbi/gems/websocket-driver@0.7.3.rbi +0 -438
  187. data/sorbet/rbi/gems/zeitwerk@2.4.2.rbi +0 -177
@@ -0,0 +1,189 @@
1
+ # typed: true
2
+
3
+ # DO NOT EDIT MANUALLY
4
+ # This is an autogenerated file for types exported from the `digest` gem.
5
+ # Please instead update this file by running `bin/tapioca gem digest`.
6
+
7
+ # source://digest-3.1.0/lib/digest/version.rb:3
8
+ module Digest
9
+ class << self
10
+ # source://digest-3.1.0/lib/digest.rb:22
11
+ def const_missing(name); end
12
+ end
13
+ end
14
+
15
+ # source://digest-3.1.0/lib/digest.rb:41
16
+ class Digest::Class
17
+ include ::Digest::Instance
18
+
19
+ class << self
20
+ # Returns the base64 encoded hash value of a given _string_. The
21
+ # return value is properly padded with '=' and contains no line
22
+ # feeds.
23
+ #
24
+ # source://digest-3.1.0/lib/digest.rb:55
25
+ def base64digest(str, *args); end
26
+
27
+ # Creates a digest object and reads a given file, _name_.
28
+ # Optional arguments are passed to the constructor of the digest
29
+ # class.
30
+ #
31
+ # p Digest::SHA256.file("X11R6.8.2-src.tar.bz2").hexdigest
32
+ # # => "f02e3c85572dc9ad7cb77c2a638e3be24cc1b5bea9fdbb0b0299c9668475c534"
33
+ #
34
+ # source://digest-3.1.0/lib/digest.rb:48
35
+ def file(name, *args); end
36
+ end
37
+ end
38
+
39
+ # source://digest-3.1.0/lib/digest.rb:60
40
+ module Digest::Instance
41
+ # If none is given, returns the resulting hash value of the digest
42
+ # in a base64 encoded form, keeping the digest's state.
43
+ #
44
+ # If a +string+ is given, returns the hash value for the given
45
+ # +string+ in a base64 encoded form, resetting the digest to the
46
+ # initial state before and after the process.
47
+ #
48
+ # In either case, the return value is properly padded with '=' and
49
+ # contains no line feeds.
50
+ #
51
+ # source://digest-3.1.0/lib/digest.rb:82
52
+ def base64digest(str = T.unsafe(nil)); end
53
+
54
+ # Returns the resulting hash value and resets the digest to the
55
+ # initial state.
56
+ #
57
+ # source://digest-3.1.0/lib/digest.rb:88
58
+ def base64digest!; end
59
+
60
+ # Updates the digest with the contents of a given file _name_ and
61
+ # returns self.
62
+ #
63
+ # source://digest-3.1.0/lib/digest.rb:63
64
+ def file(name); end
65
+ end
66
+
67
+ # A meta digest provider class for SHA256, SHA384 and SHA512.
68
+ #
69
+ # FIPS 180-2 describes SHA2 family of digest algorithms. It defines
70
+ # three algorithms:
71
+ # * one which works on chunks of 512 bits and returns a 256-bit
72
+ # digest (SHA256),
73
+ # * one which works on chunks of 1024 bits and returns a 384-bit
74
+ # digest (SHA384),
75
+ # * and one which works on chunks of 1024 bits and returns a 512-bit
76
+ # digest (SHA512).
77
+ #
78
+ # ==Examples
79
+ # require 'digest'
80
+ #
81
+ # # Compute a complete digest
82
+ # Digest::SHA2.hexdigest 'abc' # => "ba7816bf8..."
83
+ # Digest::SHA2.new(256).hexdigest 'abc' # => "ba7816bf8..."
84
+ # Digest::SHA256.hexdigest 'abc' # => "ba7816bf8..."
85
+ #
86
+ # Digest::SHA2.new(384).hexdigest 'abc' # => "cb00753f4..."
87
+ # Digest::SHA384.hexdigest 'abc' # => "cb00753f4..."
88
+ #
89
+ # Digest::SHA2.new(512).hexdigest 'abc' # => "ddaf35a19..."
90
+ # Digest::SHA512.hexdigest 'abc' # => "ddaf35a19..."
91
+ #
92
+ # # Compute digest by chunks
93
+ # sha2 = Digest::SHA2.new # =>#<Digest::SHA2:256>
94
+ # sha2.update "ab"
95
+ # sha2 << "c" # alias for #update
96
+ # sha2.hexdigest # => "ba7816bf8..."
97
+ #
98
+ # # Use the same object to compute another digest
99
+ # sha2.reset
100
+ # sha2 << "message"
101
+ # sha2.hexdigest # => "ab530a13e..."
102
+ #
103
+ # source://digest-3.1.0/lib/digest/sha2.rb:60
104
+ class Digest::SHA2 < ::Digest::Class
105
+ # call-seq:
106
+ # Digest::SHA2.new(bitlen = 256) -> digest_obj
107
+ #
108
+ # Create a new SHA2 hash object with a given bit length.
109
+ #
110
+ # Valid bit lengths are 256, 384 and 512.
111
+ #
112
+ # @return [SHA2] a new instance of SHA2
113
+ #
114
+ # source://digest-3.1.0/lib/digest/sha2.rb:61
115
+ def initialize(bitlen = T.unsafe(nil)); end
116
+
117
+ # call-seq:
118
+ # digest_obj.update(string) -> digest_obj
119
+ # digest_obj << string -> digest_obj
120
+ #
121
+ # Update the digest using a given _string_ and return self.
122
+ #
123
+ # source://digest-3.1.0/lib/digest/sha2.rb:89
124
+ def <<(str); end
125
+
126
+ # call-seq:
127
+ # digest_obj.block_length -> Integer
128
+ #
129
+ # Return the block length of the digest in bytes.
130
+ #
131
+ # Digest::SHA256.new.block_length * 8
132
+ # # => 512
133
+ # Digest::SHA384.new.block_length * 8
134
+ # # => 1024
135
+ # Digest::SHA512.new.block_length * 8
136
+ # # => 1024
137
+ #
138
+ # source://digest-3.1.0/lib/digest/sha2.rb:112
139
+ def block_length; end
140
+
141
+ # call-seq:
142
+ # digest_obj.digest_length -> Integer
143
+ #
144
+ # Return the length of the hash value (the digest) in bytes.
145
+ #
146
+ # Digest::SHA256.new.digest_length * 8
147
+ # # => 256
148
+ # Digest::SHA384.new.digest_length * 8
149
+ # # => 384
150
+ # Digest::SHA512.new.digest_length * 8
151
+ # # => 512
152
+ #
153
+ # For example, digests produced by Digest::SHA256 will always be 32 bytes
154
+ # (256 bits) in size.
155
+ #
156
+ # source://digest-3.1.0/lib/digest/sha2.rb:130
157
+ def digest_length; end
158
+
159
+ # source://digest-3.1.0/lib/digest/sha2.rb:138
160
+ def inspect; end
161
+
162
+ # call-seq:
163
+ # digest_obj.reset -> digest_obj
164
+ #
165
+ # Reset the digest to the initial state and return self.
166
+ #
167
+ # source://digest-3.1.0/lib/digest/sha2.rb:79
168
+ def reset; end
169
+
170
+ # call-seq:
171
+ # digest_obj.update(string) -> digest_obj
172
+ # digest_obj << string -> digest_obj
173
+ #
174
+ # Update the digest using a given _string_ and return self.
175
+ #
176
+ # source://digest-3.1.0/lib/digest/sha2.rb:89
177
+ def update(str); end
178
+
179
+ private
180
+
181
+ # source://digest-3.1.0/lib/digest/sha2.rb:95
182
+ def finish; end
183
+
184
+ # source://digest-3.1.0/lib/digest/sha2.rb:134
185
+ def initialize_copy(other); end
186
+ end
187
+
188
+ # source://digest-3.1.0/lib/digest/version.rb:4
189
+ Digest::VERSION = T.let(T.unsafe(nil), String)
@@ -0,0 +1,140 @@
1
+ # typed: true
2
+
3
+ # DO NOT EDIT MANUALLY
4
+ # This is an autogenerated file for types exported from the `erubi` gem.
5
+ # Please instead update this file by running `bin/tapioca gem erubi`.
6
+
7
+ # source://erubi-1.11.0/lib/erubi.rb:3
8
+ module Erubi
9
+ class << self
10
+ # source://erubi-1.11.0/lib/erubi.rb:28
11
+ def h(value); end
12
+ end
13
+ end
14
+
15
+ # source://erubi-1.11.0/lib/erubi.rb:46
16
+ class Erubi::Engine
17
+ # Initialize a new Erubi::Engine. Options:
18
+ # +:bufval+ :: The value to use for the buffer variable, as a string (default <tt>'::String.new'</tt>).
19
+ # +:bufvar+ :: The variable name to use for the buffer variable, as a string.
20
+ # +:chain_appends+ :: Whether to chain <tt><<</t> calls to the buffer variable. Offers better
21
+ # performance, but can cause issues when the buffer variable is reassigned during
22
+ # template rendering (default +false+).
23
+ # +:ensure+ :: Wrap the template in a begin/ensure block restoring the previous value of bufvar.
24
+ # +:escapefunc+ :: The function to use for escaping, as a string (default: <tt>'::Erubi.h'</tt>).
25
+ # +:escape+ :: Whether to make <tt><%=</tt> escape by default, and <tt><%==</tt> not escape by default.
26
+ # +:escape_html+ :: Same as +:escape+, with lower priority.
27
+ # +:filename+ :: The filename for the template.
28
+ # the resulting source code. Note this may cause problems if you are wrapping the resulting
29
+ # source code in other code, because the magic comment only has an effect at the beginning of
30
+ # the file, and having the magic comment later in the file can trigger warnings.
31
+ # +:freeze_template_literals+ :: Whether to suffix all literal strings for template code with <tt>.freeze</tt>
32
+ # (default: +true+ on Ruby 2.1+, +false+ on Ruby 2.0 and older).
33
+ # Can be set to +false+ on Ruby 2.3+ when frozen string literals are enabled
34
+ # in order to improve performance.
35
+ # +:literal_prefix+ :: The prefix to output when using escaped tag delimiters (default <tt>'<%'</tt>).
36
+ # +:literal_postfix+ :: The postfix to output when using escaped tag delimiters (default <tt>'%>'</tt>).
37
+ # +:outvar+ :: Same as +:bufvar+, with lower priority.
38
+ # +:postamble+ :: The postamble for the template, by default returns the resulting source code.
39
+ # +:preamble+ :: The preamble for the template, by default initializes the buffer variable.
40
+ # +:regexp+ :: The regexp to use for scanning.
41
+ # +:src+ :: The initial value to use for the source code, an empty string by default.
42
+ # +:trim+ :: Whether to trim leading and trailing whitespace, true by default.
43
+ #
44
+ # @return [Engine] a new instance of Engine
45
+ #
46
+ # source://erubi-1.11.0/lib/erubi.rb:86
47
+ def initialize(input, properties = T.unsafe(nil)); end
48
+
49
+ # The variable name used for the buffer variable.
50
+ #
51
+ # source://erubi-1.11.0/lib/erubi.rb:57
52
+ def bufvar; end
53
+
54
+ # The filename of the template, if one was given.
55
+ #
56
+ # source://erubi-1.11.0/lib/erubi.rb:54
57
+ def filename; end
58
+
59
+ # The frozen ruby source code generated from the template, which can be evaled.
60
+ #
61
+ # source://erubi-1.11.0/lib/erubi.rb:51
62
+ def src; end
63
+
64
+ private
65
+
66
+ # Add ruby code to the template
67
+ #
68
+ # source://erubi-1.11.0/lib/erubi.rb:218
69
+ def add_code(code); end
70
+
71
+ # Add the given ruby expression result to the template,
72
+ # escaping it based on the indicator given and escape flag.
73
+ #
74
+ # source://erubi-1.11.0/lib/erubi.rb:227
75
+ def add_expression(indicator, code); end
76
+
77
+ # Add the result of Ruby expression to the template
78
+ #
79
+ # source://erubi-1.11.0/lib/erubi.rb:236
80
+ def add_expression_result(code); end
81
+
82
+ # Add the escaped result of Ruby expression to the template
83
+ #
84
+ # source://erubi-1.11.0/lib/erubi.rb:241
85
+ def add_expression_result_escaped(code); end
86
+
87
+ # Add the given postamble to the src. Can be overridden in subclasses
88
+ # to make additional changes to src that depend on the current state.
89
+ #
90
+ # source://erubi-1.11.0/lib/erubi.rb:247
91
+ def add_postamble(postamble); end
92
+
93
+ # Add raw text to the template. Modifies argument if argument is mutable as a memory optimization.
94
+ # Must be called with a string, cannot be called with nil (Rails's subclass depends on it).
95
+ #
96
+ # source://erubi-1.11.0/lib/erubi.rb:205
97
+ def add_text(text); end
98
+
99
+ # Raise an exception, as the base engine class does not support handling other indicators.
100
+ #
101
+ # @raise [ArgumentError]
102
+ #
103
+ # source://erubi-1.11.0/lib/erubi.rb:253
104
+ def handle(indicator, code, tailch, rspace, lspace); end
105
+
106
+ # Make sure that any current expression has been terminated.
107
+ # The default is to terminate all expressions, but when
108
+ # the chain_appends option is used, expressions may not be
109
+ # terminated.
110
+ #
111
+ # source://erubi-1.11.0/lib/erubi.rb:281
112
+ def terminate_expression; end
113
+
114
+ # Make sure the buffer variable is the target of the next append
115
+ # before yielding to the block. Mark that the buffer is the target
116
+ # of the next append after the block executes.
117
+ #
118
+ # This method should only be called if the block will result in
119
+ # code where << will append to the bufvar.
120
+ #
121
+ # source://erubi-1.11.0/lib/erubi.rb:263
122
+ def with_buffer; end
123
+ end
124
+
125
+ # The default regular expression used for scanning.
126
+ #
127
+ # source://erubi-1.11.0/lib/erubi.rb:48
128
+ Erubi::Engine::DEFAULT_REGEXP = T.let(T.unsafe(nil), Regexp)
129
+
130
+ # source://erubi-1.11.0/lib/erubi.rb:15
131
+ Erubi::MATCH_METHOD = T.let(T.unsafe(nil), Symbol)
132
+
133
+ # source://erubi-1.11.0/lib/erubi.rb:8
134
+ Erubi::RANGE_FIRST = T.let(T.unsafe(nil), Integer)
135
+
136
+ # source://erubi-1.11.0/lib/erubi.rb:9
137
+ Erubi::RANGE_LAST = T.let(T.unsafe(nil), Integer)
138
+
139
+ # source://erubi-1.11.0/lib/erubi.rb:4
140
+ Erubi::VERSION = T.let(T.unsafe(nil), String)