acts-as-messageable 0.5.0 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (214) hide show
  1. checksums.yaml +4 -4
  2. data/.github/dependabot.yml +8 -0
  3. data/.github/workflows/test.yml +152 -0
  4. data/.rubocop.yml +14 -1
  5. data/.rubocop_todo.yml +49 -7
  6. data/.ruby-version +1 -0
  7. data/Appraisals +11 -0
  8. data/Dockerfile +2 -1
  9. data/Gemfile +19 -13
  10. data/Gemfile.lock +186 -97
  11. data/README.md +2 -3
  12. data/Rakefile +6 -1
  13. data/VERSION +1 -1
  14. data/acts-as-messageable.gemspec +193 -40
  15. data/bin/tapioca +29 -0
  16. data/docker-compose.yml +82 -71
  17. data/gemfiles/rails_3.2.gemfile +14 -9
  18. data/gemfiles/rails_4.2.gemfile +14 -9
  19. data/gemfiles/rails_5.2.gemfile +14 -9
  20. data/gemfiles/rails_6.0.gemfile +14 -9
  21. data/gemfiles/rails_7.0.gemfile +29 -0
  22. data/gemfiles/rails_master.gemfile +15 -9
  23. data/lib/acts-as-messageable.rb +1 -0
  24. data/lib/acts_as_messageable/message.rb +62 -5
  25. data/lib/acts_as_messageable/model.rb +71 -20
  26. data/lib/acts_as_messageable/rails3.rb +27 -2
  27. data/lib/acts_as_messageable/rails4.rb +31 -4
  28. data/lib/acts_as_messageable/rails6.rb +34 -2
  29. data/lib/acts_as_messageable/railtie.rb +1 -0
  30. data/lib/acts_as_messageable/relation.rb +18 -2
  31. data/lib/acts_as_messageable/scopes.rb +11 -0
  32. data/lib/acts_as_messageable.rb +18 -0
  33. data/lib/generators/acts_as_messageable/migration/migration_generator.rb +4 -0
  34. data/lib/generators/acts_as_messageable/migration/templates/migration.rb +1 -0
  35. data/lib/generators/acts_as_messageable/migration/templates/migration_indexes.rb +1 -0
  36. data/lib/generators/acts_as_messageable/migration/templates/migration_opened_as_datetime.rb +1 -0
  37. data/lib/generators/acts_as_messageable/migration/templates/migration_permanent.rb +1 -0
  38. data/sorbet/config +4 -0
  39. data/sorbet/rbi/annotations/actionpack.rbi +428 -0
  40. data/sorbet/rbi/annotations/actionview.rbi +77 -0
  41. data/sorbet/rbi/annotations/activerecord.rbi +18 -0
  42. data/sorbet/rbi/annotations/activesupport.rbi +52 -0
  43. data/sorbet/rbi/annotations/faraday.rbi +17 -0
  44. data/sorbet/rbi/annotations/railties.rbi +58 -0
  45. data/sorbet/rbi/annotations/rainbow.rbi +269 -0
  46. data/sorbet/rbi/dsl/abstract_controller/caching/fragments.rbi +23 -0
  47. data/sorbet/rbi/dsl/abstract_controller/caching.rbi +30 -0
  48. data/sorbet/rbi/dsl/abstract_controller/callbacks.rbi +23 -0
  49. data/sorbet/rbi/dsl/abstract_controller/helpers.rbi +23 -0
  50. data/sorbet/rbi/dsl/abstract_controller/rendering.rbi +9 -0
  51. data/sorbet/rbi/dsl/abstract_controller/url_for.rbi +23 -0
  52. data/sorbet/rbi/dsl/action_controller/caching.rbi +29 -0
  53. data/sorbet/rbi/dsl/action_controller/conditional_get.rbi +23 -0
  54. data/sorbet/rbi/dsl/action_controller/content_security_policy.rbi +31 -0
  55. data/sorbet/rbi/dsl/action_controller/data_streaming.rbi +9 -0
  56. data/sorbet/rbi/dsl/action_controller/etag_with_flash.rbi +24 -0
  57. data/sorbet/rbi/dsl/action_controller/etag_with_template_digest.rbi +30 -0
  58. data/sorbet/rbi/dsl/action_controller/flash.rbi +19 -0
  59. data/sorbet/rbi/dsl/action_controller/form_builder.rbi +19 -0
  60. data/sorbet/rbi/dsl/action_controller/helpers.rbi +36 -0
  61. data/sorbet/rbi/dsl/action_controller/params_wrapper.rbi +23 -0
  62. data/sorbet/rbi/dsl/action_controller/redirecting.rbi +24 -0
  63. data/sorbet/rbi/dsl/action_controller/renderers/all.rbi +24 -0
  64. data/sorbet/rbi/dsl/action_controller/renderers.rbi +23 -0
  65. data/sorbet/rbi/dsl/action_controller/request_forgery_protection.rbi +31 -0
  66. data/sorbet/rbi/dsl/action_controller/rescue.rbi +24 -0
  67. data/sorbet/rbi/dsl/action_controller/test_case/behavior.rbi +24 -0
  68. data/sorbet/rbi/dsl/action_controller/url_for.rbi +24 -0
  69. data/sorbet/rbi/dsl/action_dispatch/routing/url_for.rbi +23 -0
  70. data/sorbet/rbi/dsl/action_view/helpers/form_helper.rbi +10 -0
  71. data/sorbet/rbi/dsl/action_view/helpers/form_tag_helper.rbi +10 -0
  72. data/sorbet/rbi/dsl/action_view/helpers/text_helper.rbi +9 -0
  73. data/sorbet/rbi/dsl/action_view/helpers.rbi +10 -0
  74. data/sorbet/rbi/dsl/action_view/layouts.rbi +24 -0
  75. data/sorbet/rbi/dsl/action_view/rendering.rbi +9 -0
  76. data/sorbet/rbi/dsl/active_model/attribute_methods.rbi +27 -0
  77. data/sorbet/rbi/dsl/active_model/attributes.rbi +34 -0
  78. data/sorbet/rbi/dsl/active_model/dirty.rbi +28 -0
  79. data/sorbet/rbi/dsl/active_model/serializers/json.rbi +22 -0
  80. data/sorbet/rbi/dsl/active_model/validations/callbacks.rbi +22 -0
  81. data/sorbet/rbi/dsl/active_model/validations.rbi +27 -0
  82. data/sorbet/rbi/dsl/active_record/attribute_methods/dirty.rbi +38 -0
  83. data/sorbet/rbi/dsl/active_record/attribute_methods/time_zone_conversion.rbi +32 -0
  84. data/sorbet/rbi/dsl/active_record/attribute_methods.rbi +53 -0
  85. data/sorbet/rbi/dsl/active_record/attributes.rbi +19 -0
  86. data/sorbet/rbi/dsl/active_record/callbacks.rbi +22 -0
  87. data/sorbet/rbi/dsl/active_record/core.rbi +55 -0
  88. data/sorbet/rbi/dsl/active_record/encryption/encryptable_record.rbi +23 -0
  89. data/sorbet/rbi/dsl/active_record/inheritance.rbi +27 -0
  90. data/sorbet/rbi/dsl/active_record/integration.rbi +32 -0
  91. data/sorbet/rbi/dsl/active_record/locking/optimistic.rbi +22 -0
  92. data/sorbet/rbi/dsl/active_record/model_schema.rbi +52 -0
  93. data/sorbet/rbi/dsl/active_record/nested_attributes.rbi +22 -0
  94. data/sorbet/rbi/dsl/active_record/readonly_attributes.rbi +19 -0
  95. data/sorbet/rbi/dsl/active_record/reflection.rbi +32 -0
  96. data/sorbet/rbi/dsl/active_record/scoping/default.rbi +23 -0
  97. data/sorbet/rbi/dsl/active_record/scoping.rbi +23 -0
  98. data/sorbet/rbi/dsl/active_record/serialization.rbi +22 -0
  99. data/sorbet/rbi/dsl/active_record/signed_id.rbi +22 -0
  100. data/sorbet/rbi/dsl/active_record/test_fixtures.rbi +58 -0
  101. data/sorbet/rbi/dsl/active_record/timestamp.rbi +23 -0
  102. data/sorbet/rbi/dsl/active_record/validations.rbi +28 -0
  103. data/sorbet/rbi/dsl/active_support/actionable_error.rbi +23 -0
  104. data/sorbet/rbi/dsl/active_support/callbacks.rbi +22 -0
  105. data/sorbet/rbi/dsl/active_support/rescuable.rbi +23 -0
  106. data/sorbet/rbi/dsl/active_support/testing/file_fixtures.rbi +22 -0
  107. data/sorbet/rbi/gems/actionpack@7.0.4.3.rbi +19265 -0
  108. data/sorbet/rbi/gems/actionview@7.0.4.3.rbi +15482 -0
  109. data/sorbet/rbi/gems/activemodel@7.0.4.3.rbi +6025 -0
  110. data/sorbet/rbi/gems/activerecord@7.0.4.3.rbi +37852 -0
  111. data/sorbet/rbi/gems/activesupport@7.0.4.3.rbi +18788 -0
  112. data/sorbet/rbi/gems/addressable@2.4.0.rbi +8 -0
  113. data/sorbet/rbi/gems/appraisal@2.4.1.rbi +584 -0
  114. data/sorbet/rbi/gems/ast@2.4.2.rbi +584 -0
  115. data/sorbet/rbi/gems/builder@3.2.4.rbi +8 -0
  116. data/sorbet/rbi/gems/coderay@1.1.3.rbi +3426 -0
  117. data/sorbet/rbi/gems/commander@4.6.0.rbi +8 -0
  118. data/sorbet/rbi/gems/concurrent-ruby@1.2.2.rbi +11545 -0
  119. data/sorbet/rbi/gems/coveralls_reborn@0.27.0.rbi +8 -0
  120. data/sorbet/rbi/gems/crass@1.0.6.rbi +622 -0
  121. data/sorbet/rbi/gems/descendants_tracker@0.0.4.rbi +8 -0
  122. data/sorbet/rbi/gems/diff-lcs@1.5.0.rbi +1079 -0
  123. data/sorbet/rbi/gems/docile@1.4.0.rbi +8 -0
  124. data/sorbet/rbi/gems/erubi@1.12.0.rbi +146 -0
  125. data/sorbet/rbi/gems/faraday@0.9.2.rbi +964 -0
  126. data/sorbet/rbi/gems/git@1.11.0.rbi +2700 -0
  127. data/sorbet/rbi/gems/github_api@0.16.0.rbi +8 -0
  128. data/sorbet/rbi/gems/hashie@5.0.0.rbi +8 -0
  129. data/sorbet/rbi/gems/highline@2.0.3.rbi +8 -0
  130. data/sorbet/rbi/gems/i18n@1.12.0.rbi +2296 -0
  131. data/sorbet/rbi/gems/jeweler@2.3.9.rbi +1591 -0
  132. data/sorbet/rbi/gems/json@2.6.3.rbi +1541 -0
  133. data/sorbet/rbi/gems/jwt@2.5.0.rbi +8 -0
  134. data/sorbet/rbi/gems/loofah@2.19.1.rbi +904 -0
  135. data/sorbet/rbi/gems/method_source@1.0.0.rbi +272 -0
  136. data/sorbet/rbi/gems/mime-types@2.99.3.rbi +8 -0
  137. data/sorbet/rbi/gems/minitest@5.18.0.rbi +1491 -0
  138. data/sorbet/rbi/gems/multi_json@1.15.0.rbi +8 -0
  139. data/sorbet/rbi/gems/multi_xml@0.6.0.rbi +8 -0
  140. data/sorbet/rbi/gems/multipart-post@2.2.3.rbi +8 -0
  141. data/sorbet/rbi/gems/netrc@0.11.0.rbi +158 -0
  142. data/sorbet/rbi/gems/nokogiri@1.14.2.rbi +7244 -0
  143. data/sorbet/rbi/gems/oauth2@1.4.8.rbi +8 -0
  144. data/sorbet/rbi/gems/parallel@1.22.1.rbi +277 -0
  145. data/sorbet/rbi/gems/pg@1.4.6.rbi +2574 -0
  146. data/sorbet/rbi/gems/polyfill@1.9.0.rbi +8 -0
  147. data/sorbet/rbi/gems/pry@0.14.2.rbi +10081 -0
  148. data/sorbet/rbi/gems/psych@4.0.6.rbi +1819 -0
  149. data/sorbet/rbi/gems/racc@1.6.2.rbi +155 -0
  150. data/sorbet/rbi/gems/rack-test@2.0.2.rbi +943 -0
  151. data/sorbet/rbi/gems/rack@2.2.6.4.rbi +5659 -0
  152. data/sorbet/rbi/gems/rails-dom-testing@2.0.3.rbi +455 -0
  153. data/sorbet/rbi/gems/rails-html-sanitizer@1.5.0.rbi +685 -0
  154. data/sorbet/rbi/gems/railties@7.0.4.3.rbi +4553 -0
  155. data/sorbet/rbi/gems/rainbow@3.1.1.rbi +8 -0
  156. data/sorbet/rbi/gems/rake@13.0.6.rbi +2959 -0
  157. data/sorbet/rbi/gems/rbi@0.0.16.rbi +3008 -0
  158. data/sorbet/rbi/gems/rbs@2.8.0.rbi +8 -0
  159. data/sorbet/rbi/gems/rchardet@1.8.0.rbi +1078 -0
  160. data/sorbet/rbi/gems/rdoc@6.5.0.rbi +12441 -0
  161. data/sorbet/rbi/gems/regexp_parser@2.7.0.rbi +8 -0
  162. data/sorbet/rbi/gems/rexml@3.2.5.rbi +8 -0
  163. data/sorbet/rbi/gems/rspec-core@3.12.0.rbi +10798 -0
  164. data/sorbet/rbi/gems/rspec-expectations@3.12.0.rbi +8090 -0
  165. data/sorbet/rbi/gems/rspec-mocks@3.12.0.rbi +5296 -0
  166. data/sorbet/rbi/gems/rspec-support@3.12.0.rbi +1617 -0
  167. data/sorbet/rbi/gems/rspec@3.12.0.rbi +88 -0
  168. data/sorbet/rbi/gems/ruby-progressbar@1.13.0.rbi +8 -0
  169. data/sorbet/rbi/gems/safe_type@1.1.1.rbi +8 -0
  170. data/sorbet/rbi/gems/semver2@3.4.2.rbi +8 -0
  171. data/sorbet/rbi/gems/simplecov-html@0.12.3.rbi +8 -0
  172. data/sorbet/rbi/gems/simplecov@0.22.0.rbi +8 -0
  173. data/sorbet/rbi/gems/simplecov_json_formatter@0.1.4.rbi +8 -0
  174. data/sorbet/rbi/gems/sorbet-coerce@0.7.0.rbi +8 -0
  175. data/sorbet/rbi/gems/stringio@3.0.2.rbi +8 -0
  176. data/sorbet/rbi/gems/sync@0.5.0.rbi +8 -0
  177. data/sorbet/rbi/gems/term-ansicolor@1.7.1.rbi +8 -0
  178. data/sorbet/rbi/gems/thor@1.2.1.rbi +3956 -0
  179. data/sorbet/rbi/gems/thread_safe@0.3.6.rbi +8 -0
  180. data/sorbet/rbi/gems/timecop@0.9.6.rbi +361 -0
  181. data/sorbet/rbi/gems/tins@1.32.1.rbi +8 -0
  182. data/sorbet/rbi/gems/tzinfo@2.0.6.rbi +5917 -0
  183. data/sorbet/rbi/gems/unicode-display_width@2.4.2.rbi +8 -0
  184. data/sorbet/rbi/gems/unparser@0.6.7.rbi +4515 -0
  185. data/sorbet/rbi/gems/webrick@1.7.0.rbi +2553 -0
  186. data/sorbet/rbi/gems/yard@0.9.28.rbi +17954 -0
  187. data/sorbet/rbi/gems/zeitwerk@2.6.7.rbi +966 -0
  188. data/sorbet/rbi/models/acts-as-messageable/message.rbi +668 -0
  189. data/sorbet/rbi/models/acts-as-messageable/user.rbi +343 -0
  190. data/sorbet/rbi/rails-rbi/active_record_base.rbi +119 -0
  191. data/sorbet/rbi/rails-rbi/active_record_relation.rbi +180 -0
  192. data/sorbet/rbi/shims/activerecord.rbi +4 -0
  193. data/sorbet/rbi/shims/model.rbi +9 -0
  194. data/sorbet/tapioca/config.yml +10 -0
  195. data/sorbet/tapioca/pre_require.rb +5 -0
  196. data/sorbet/tapioca/require.rb +10 -0
  197. data/spec/acts_as_messageable_spec.rb +7 -4
  198. data/spec/custom_class_spec.rb +1 -0
  199. data/spec/custom_required_spec.rb +8 -4
  200. data/spec/group_messages_spec.rb +1 -0
  201. data/spec/migrations_spec.rb +2 -1
  202. data/spec/spec_helper.rb +19 -9
  203. data/spec/support/admin.rb +3 -0
  204. data/spec/support/custom_message.rb +3 -0
  205. data/spec/support/custom_message_uuid.rb +1 -0
  206. data/spec/support/custom_search_user.rb +3 -0
  207. data/spec/support/men.rb +1 -0
  208. data/spec/support/send_message.rb +8 -1
  209. data/spec/support/table_schema.rb +7 -6
  210. data/spec/support/user.rb +3 -0
  211. data/spec/support/uuid_user.rb +3 -0
  212. data/tasks/types.rake +46 -0
  213. metadata +261 -11
  214. data/.travis.yml +0 -55
@@ -0,0 +1,272 @@
1
+ # typed: true
2
+
3
+ # DO NOT EDIT MANUALLY
4
+ # This is an autogenerated file for types exported from the `method_source` gem.
5
+ # Please instead update this file by running `bin/tapioca gem method_source`.
6
+
7
+ # source://method_source//lib/method_source.rb#127
8
+ class Method
9
+ include ::MethodSource::SourceLocation::MethodExtensions
10
+ include ::MethodSource::MethodExtensions
11
+ end
12
+
13
+ # source://method_source//lib/method_source/version.rb#1
14
+ module MethodSource
15
+ extend ::MethodSource::CodeHelpers
16
+
17
+ class << self
18
+ # Helper method responsible for opening source file and buffering up
19
+ # the comments for a specified method. Defined here to avoid polluting
20
+ # `Method` class.
21
+ #
22
+ # @param source_location [Array] The array returned by Method#source_location
23
+ # @param method_name [String]
24
+ # @raise [SourceNotFoundError]
25
+ # @return [String] The comments up to the point of the method.
26
+ #
27
+ # source://method_source//lib/method_source.rb#38
28
+ def comment_helper(source_location, name = T.unsafe(nil)); end
29
+
30
+ # @deprecated — use MethodSource::CodeHelpers#expression_at
31
+ #
32
+ # source://method_source//lib/method_source.rb#66
33
+ def extract_code(source_location); end
34
+
35
+ # Load a memoized copy of the lines in a file.
36
+ #
37
+ # @param file_name [String]
38
+ # @param method_name [String]
39
+ # @raise [SourceNotFoundError]
40
+ # @return [Array<String>] the contents of the file
41
+ #
42
+ # source://method_source//lib/method_source.rb#51
43
+ def lines_for(file_name, name = T.unsafe(nil)); end
44
+
45
+ # Helper method responsible for extracting method body.
46
+ # Defined here to avoid polluting `Method` class.
47
+ #
48
+ # @param source_location [Array] The array returned by Method#source_location
49
+ # @param method_name [String]
50
+ # @return [String] The method body
51
+ #
52
+ # source://method_source//lib/method_source.rb#23
53
+ def source_helper(source_location, name = T.unsafe(nil)); end
54
+
55
+ # @deprecated — use MethodSource::CodeHelpers#complete_expression?
56
+ # @return [Boolean]
57
+ #
58
+ # source://method_source//lib/method_source.rb#59
59
+ def valid_expression?(str); end
60
+ end
61
+ end
62
+
63
+ # source://method_source//lib/method_source/code_helpers.rb#3
64
+ module MethodSource::CodeHelpers
65
+ # Retrieve the comment describing the expression on the given line of the given file.
66
+ #
67
+ # This is useful to get module or method documentation.
68
+ #
69
+ # @param file [Array<String>, File, String] The file to parse, either as a File or as
70
+ # a String or an Array of lines.
71
+ # @param line_number [Integer] The line number at which to look.
72
+ # NOTE: The first line in a file is line 1!
73
+ # @return [String] The comment
74
+ #
75
+ # source://method_source//lib/method_source/code_helpers.rb#52
76
+ def comment_describing(file, line_number); end
77
+
78
+ # Determine if a string of code is a complete Ruby expression.
79
+ #
80
+ # @example
81
+ # complete_expression?("class Hello") #=> false
82
+ # complete_expression?("class Hello; end") #=> true
83
+ # complete_expression?("class 123") #=> SyntaxError: unexpected tINTEGER
84
+ # @param code [String] The code to validate.
85
+ # @raise [SyntaxError] Any SyntaxError that does not represent incompleteness.
86
+ # @return [Boolean] Whether or not the code is a complete Ruby expression.
87
+ #
88
+ # source://method_source//lib/method_source/code_helpers.rb#66
89
+ def complete_expression?(str); end
90
+
91
+ # Retrieve the first expression starting on the given line of the given file.
92
+ #
93
+ # This is useful to get module or method source code.
94
+ #
95
+ # line 1!
96
+ #
97
+ # @option options
98
+ # @option options
99
+ # @param file [Array<String>, File, String] The file to parse, either as a File or as
100
+ # @param line_number [Integer] The line number at which to look.
101
+ # NOTE: The first line in a file is
102
+ # @param options [Hash] The optional configuration parameters.
103
+ # @raise [SyntaxError] If the first complete expression can't be identified
104
+ # @return [String] The first complete expression
105
+ #
106
+ # source://method_source//lib/method_source/code_helpers.rb#20
107
+ def expression_at(file, line_number, options = T.unsafe(nil)); end
108
+
109
+ private
110
+
111
+ # Get the first expression from the input.
112
+ #
113
+ # @param lines [Array<String>]
114
+ # @param consume [Integer] A number of lines to automatically
115
+ # consume (add to the expression buffer) without checking for validity.
116
+ # @raise [SyntaxError]
117
+ # @return [String] a valid ruby expression
118
+ # @yield a clean-up function to run before checking for complete_expression
119
+ #
120
+ # source://method_source//lib/method_source/code_helpers.rb#92
121
+ def extract_first_expression(lines, consume = T.unsafe(nil), &block); end
122
+
123
+ # Get the last comment from the input.
124
+ #
125
+ # @param lines [Array<String>]
126
+ # @return [String]
127
+ #
128
+ # source://method_source//lib/method_source/code_helpers.rb#106
129
+ def extract_last_comment(lines); end
130
+ end
131
+
132
+ # An exception matcher that matches only subsets of SyntaxErrors that can be
133
+ # fixed by adding more input to the buffer.
134
+ #
135
+ # source://method_source//lib/method_source/code_helpers.rb#124
136
+ module MethodSource::CodeHelpers::IncompleteExpression
137
+ class << self
138
+ # source://method_source//lib/method_source/code_helpers.rb#137
139
+ def ===(ex); end
140
+
141
+ # @return [Boolean]
142
+ #
143
+ # source://method_source//lib/method_source/code_helpers.rb#149
144
+ def rbx?; end
145
+ end
146
+ end
147
+
148
+ # source://method_source//lib/method_source/code_helpers.rb#125
149
+ MethodSource::CodeHelpers::IncompleteExpression::GENERIC_REGEXPS = T.let(T.unsafe(nil), Array)
150
+
151
+ # source://method_source//lib/method_source/code_helpers.rb#133
152
+ MethodSource::CodeHelpers::IncompleteExpression::RBX_ONLY_REGEXPS = T.let(T.unsafe(nil), Array)
153
+
154
+ # This module is to be included by `Method` and `UnboundMethod` and
155
+ # provides the `#source` functionality
156
+ #
157
+ # source://method_source//lib/method_source.rb#72
158
+ module MethodSource::MethodExtensions
159
+ # Return the comments associated with the method as a string.
160
+ #
161
+ # @example
162
+ # Set.instance_method(:clear).comment.display
163
+ # =>
164
+ # # Removes all elements and returns self.
165
+ # @raise SourceNotFoundException
166
+ # @return [String] The method's comments as a string
167
+ #
168
+ # source://method_source//lib/method_source.rb#121
169
+ def comment; end
170
+
171
+ # Return the sourcecode for the method as a string
172
+ #
173
+ # @example
174
+ # Set.instance_method(:clear).source.display
175
+ # =>
176
+ # def clear
177
+ # @hash.clear
178
+ # self
179
+ # end
180
+ # @raise SourceNotFoundException
181
+ # @return [String] The method sourcecode as a string
182
+ #
183
+ # source://method_source//lib/method_source.rb#109
184
+ def source; end
185
+
186
+ class << self
187
+ # We use the included hook to patch Method#source on rubinius.
188
+ # We need to use the included hook as Rubinius defines a `source`
189
+ # on Method so including a module will have no effect (as it's
190
+ # higher up the MRO).
191
+ #
192
+ # @param klass [Class] The class that includes the module.
193
+ #
194
+ # source://method_source//lib/method_source.rb#79
195
+ def included(klass); end
196
+ end
197
+ end
198
+
199
+ # source://method_source//lib/method_source/source_location.rb#2
200
+ module MethodSource::ReeSourceLocation
201
+ # Ruby enterprise edition provides all the information that's
202
+ # needed, in a slightly different way.
203
+ #
204
+ # source://method_source//lib/method_source/source_location.rb#5
205
+ def source_location; end
206
+ end
207
+
208
+ # source://method_source//lib/method_source/source_location.rb#10
209
+ module MethodSource::SourceLocation; end
210
+
211
+ # source://method_source//lib/method_source/source_location.rb#11
212
+ module MethodSource::SourceLocation::MethodExtensions
213
+ # Return the source location of a method for Ruby 1.8.
214
+ #
215
+ # @return [Array] A two element array. First element is the
216
+ # file, second element is the line in the file where the
217
+ # method definition is found.
218
+ #
219
+ # source://method_source//lib/method_source/source_location.rb#40
220
+ def source_location; end
221
+
222
+ private
223
+
224
+ # source://method_source//lib/method_source/source_location.rb#26
225
+ def trace_func(event, file, line, id, binding, classname); end
226
+ end
227
+
228
+ # source://method_source//lib/method_source/source_location.rb#54
229
+ module MethodSource::SourceLocation::ProcExtensions
230
+ # Return the source location for a Proc (in implementations
231
+ # without Proc#source_location)
232
+ #
233
+ # @return [Array] A two element array. First element is the
234
+ # file, second element is the line in the file where the
235
+ # proc definition is found.
236
+ #
237
+ # source://method_source//lib/method_source/source_location.rb#74
238
+ def source_location; end
239
+ end
240
+
241
+ # source://method_source//lib/method_source/source_location.rb#81
242
+ module MethodSource::SourceLocation::UnboundMethodExtensions
243
+ # Return the source location of an instance method for Ruby 1.8.
244
+ #
245
+ # @return [Array] A two element array. First element is the
246
+ # file, second element is the line in the file where the
247
+ # method definition is found.
248
+ #
249
+ # source://method_source//lib/method_source/source_location.rb#101
250
+ def source_location; end
251
+ end
252
+
253
+ # An Exception to mark errors that were raised trying to find the source from
254
+ # a given source_location.
255
+ #
256
+ # source://method_source//lib/method_source.rb#16
257
+ class MethodSource::SourceNotFoundError < ::StandardError; end
258
+
259
+ # source://method_source//lib/method_source/version.rb#2
260
+ MethodSource::VERSION = T.let(T.unsafe(nil), String)
261
+
262
+ # source://method_source//lib/method_source.rb#137
263
+ class Proc
264
+ include ::MethodSource::SourceLocation::ProcExtensions
265
+ include ::MethodSource::MethodExtensions
266
+ end
267
+
268
+ # source://method_source//lib/method_source.rb#132
269
+ class UnboundMethod
270
+ include ::MethodSource::SourceLocation::UnboundMethodExtensions
271
+ include ::MethodSource::MethodExtensions
272
+ end
@@ -0,0 +1,8 @@
1
+ # typed: true
2
+
3
+ # DO NOT EDIT MANUALLY
4
+ # This is an autogenerated file for types exported from the `mime-types` gem.
5
+ # Please instead update this file by running `bin/tapioca gem mime-types`.
6
+
7
+ # THIS IS AN EMPTY RBI FILE.
8
+ # see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem