acts-as-messageable 0.5.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (221) 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 +200 -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/ancestry@4.3.2.rbi +631 -0
  114. data/sorbet/rbi/gems/appraisal@2.4.1.rbi +584 -0
  115. data/sorbet/rbi/gems/ast@2.4.2.rbi +584 -0
  116. data/sorbet/rbi/gems/builder@3.2.4.rbi +8 -0
  117. data/sorbet/rbi/gems/coderay@1.1.3.rbi +3426 -0
  118. data/sorbet/rbi/gems/commander@4.6.0.rbi +8 -0
  119. data/sorbet/rbi/gems/concurrent-ruby@1.2.2.rbi +11545 -0
  120. data/sorbet/rbi/gems/coveralls_reborn@0.27.0.rbi +8 -0
  121. data/sorbet/rbi/gems/crass@1.0.6.rbi +622 -0
  122. data/sorbet/rbi/gems/descendants_tracker@0.0.4.rbi +8 -0
  123. data/sorbet/rbi/gems/diff-lcs@1.5.0.rbi +1079 -0
  124. data/sorbet/rbi/gems/docile@1.4.0.rbi +8 -0
  125. data/sorbet/rbi/gems/erubi@1.12.0.rbi +146 -0
  126. data/sorbet/rbi/gems/faraday@0.9.2.rbi +964 -0
  127. data/sorbet/rbi/gems/git@1.11.0.rbi +2700 -0
  128. data/sorbet/rbi/gems/github_api@0.16.0.rbi +8 -0
  129. data/sorbet/rbi/gems/hashie@5.0.0.rbi +8 -0
  130. data/sorbet/rbi/gems/highline@2.0.3.rbi +8 -0
  131. data/sorbet/rbi/gems/i18n@1.12.0.rbi +2296 -0
  132. data/sorbet/rbi/gems/jeweler@2.3.9.rbi +1591 -0
  133. data/sorbet/rbi/gems/json@2.6.3.rbi +1541 -0
  134. data/sorbet/rbi/gems/jwt@2.5.0.rbi +8 -0
  135. data/sorbet/rbi/gems/loofah@2.19.1.rbi +904 -0
  136. data/sorbet/rbi/gems/method_source@1.0.0.rbi +272 -0
  137. data/sorbet/rbi/gems/mime-types@2.99.3.rbi +8 -0
  138. data/sorbet/rbi/gems/minitest@5.18.0.rbi +1491 -0
  139. data/sorbet/rbi/gems/multi_json@1.15.0.rbi +8 -0
  140. data/sorbet/rbi/gems/multi_xml@0.6.0.rbi +8 -0
  141. data/sorbet/rbi/gems/multipart-post@2.2.3.rbi +8 -0
  142. data/sorbet/rbi/gems/netrc@0.11.0.rbi +158 -0
  143. data/sorbet/rbi/gems/nokogiri@1.14.2.rbi +7244 -0
  144. data/sorbet/rbi/gems/oauth2@1.4.8.rbi +8 -0
  145. data/sorbet/rbi/gems/parallel@1.22.1.rbi +277 -0
  146. data/sorbet/rbi/gems/parser@3.2.2.0.rbi +7253 -0
  147. data/sorbet/rbi/gems/pg@1.4.6.rbi +2574 -0
  148. data/sorbet/rbi/gems/polyfill@1.9.0.rbi +8 -0
  149. data/sorbet/rbi/gems/pry@0.14.2.rbi +10081 -0
  150. data/sorbet/rbi/gems/psych@4.0.6.rbi +1819 -0
  151. data/sorbet/rbi/gems/racc@1.6.2.rbi +155 -0
  152. data/sorbet/rbi/gems/rack-test@2.0.2.rbi +943 -0
  153. data/sorbet/rbi/gems/rack@2.2.6.4.rbi +5659 -0
  154. data/sorbet/rbi/gems/rails-dom-testing@2.0.3.rbi +455 -0
  155. data/sorbet/rbi/gems/rails-html-sanitizer@1.5.0.rbi +685 -0
  156. data/sorbet/rbi/gems/railties@7.0.4.3.rbi +4553 -0
  157. data/sorbet/rbi/gems/rainbow@3.1.1.rbi +8 -0
  158. data/sorbet/rbi/gems/rake@13.0.6.rbi +2959 -0
  159. data/sorbet/rbi/gems/rbi@0.0.16.rbi +3008 -0
  160. data/sorbet/rbi/gems/rbs@2.8.0.rbi +8 -0
  161. data/sorbet/rbi/gems/rchardet@1.8.0.rbi +1078 -0
  162. data/sorbet/rbi/gems/rdoc@6.5.0.rbi +12441 -0
  163. data/sorbet/rbi/gems/regexp_parser@2.7.0.rbi +8 -0
  164. data/sorbet/rbi/gems/rexml@3.2.5.rbi +8 -0
  165. data/sorbet/rbi/gems/rspec-core@3.12.0.rbi +10798 -0
  166. data/sorbet/rbi/gems/rspec-expectations@3.12.0.rbi +8090 -0
  167. data/sorbet/rbi/gems/rspec-mocks@3.12.0.rbi +5296 -0
  168. data/sorbet/rbi/gems/rspec-support@3.12.0.rbi +1617 -0
  169. data/sorbet/rbi/gems/rspec@3.12.0.rbi +88 -0
  170. data/sorbet/rbi/gems/rubocop-ast@1.28.0.rbi +8 -0
  171. data/sorbet/rbi/gems/ruby-progressbar@1.13.0.rbi +8 -0
  172. data/sorbet/rbi/gems/safe_type@1.1.1.rbi +8 -0
  173. data/sorbet/rbi/gems/semver2@3.4.2.rbi +8 -0
  174. data/sorbet/rbi/gems/simplecov-html@0.12.3.rbi +8 -0
  175. data/sorbet/rbi/gems/simplecov@0.22.0.rbi +8 -0
  176. data/sorbet/rbi/gems/simplecov_json_formatter@0.1.4.rbi +8 -0
  177. data/sorbet/rbi/gems/sorbet-coerce@0.7.0.rbi +8 -0
  178. data/sorbet/rbi/gems/spoom@1.2.1.rbi +2503 -0
  179. data/sorbet/rbi/gems/sqlite3@1.6.2.rbi +1673 -0
  180. data/sorbet/rbi/gems/stringio@3.0.2.rbi +8 -0
  181. data/sorbet/rbi/gems/sync@0.5.0.rbi +8 -0
  182. data/sorbet/rbi/gems/tapioca@0.11.4-a4319794491b54d9db1c06df7f3bdffcdf7bf684.rbi +3260 -0
  183. data/sorbet/rbi/gems/term-ansicolor@1.7.1.rbi +8 -0
  184. data/sorbet/rbi/gems/thor@1.2.1.rbi +3956 -0
  185. data/sorbet/rbi/gems/thread_safe@0.3.6.rbi +8 -0
  186. data/sorbet/rbi/gems/timecop@0.9.6.rbi +361 -0
  187. data/sorbet/rbi/gems/tins@1.32.1.rbi +8 -0
  188. data/sorbet/rbi/gems/tzinfo@2.0.6.rbi +5917 -0
  189. data/sorbet/rbi/gems/unicode-display_width@2.4.2.rbi +8 -0
  190. data/sorbet/rbi/gems/unparser@0.6.7.rbi +4515 -0
  191. data/sorbet/rbi/gems/webrick@1.7.0.rbi +2553 -0
  192. data/sorbet/rbi/gems/yard-sorbet@0.8.1.rbi +428 -0
  193. data/sorbet/rbi/gems/yard@0.9.28.rbi +17954 -0
  194. data/sorbet/rbi/gems/zeitwerk@2.6.7.rbi +966 -0
  195. data/sorbet/rbi/models/acts-as-messageable/message.rbi +668 -0
  196. data/sorbet/rbi/models/acts-as-messageable/user.rbi +343 -0
  197. data/sorbet/rbi/rails-rbi/active_record_base.rbi +119 -0
  198. data/sorbet/rbi/rails-rbi/active_record_relation.rbi +180 -0
  199. data/sorbet/rbi/shims/activerecord.rbi +4 -0
  200. data/sorbet/rbi/shims/model.rbi +9 -0
  201. data/sorbet/tapioca/config.yml +10 -0
  202. data/sorbet/tapioca/pre_require.rb +5 -0
  203. data/sorbet/tapioca/require.rb +10 -0
  204. data/spec/acts_as_messageable_spec.rb +7 -4
  205. data/spec/custom_class_spec.rb +1 -0
  206. data/spec/custom_required_spec.rb +8 -4
  207. data/spec/group_messages_spec.rb +1 -0
  208. data/spec/migrations_spec.rb +2 -1
  209. data/spec/spec_helper.rb +19 -9
  210. data/spec/support/admin.rb +3 -0
  211. data/spec/support/custom_message.rb +3 -0
  212. data/spec/support/custom_message_uuid.rb +1 -0
  213. data/spec/support/custom_search_user.rb +3 -0
  214. data/spec/support/men.rb +1 -0
  215. data/spec/support/send_message.rb +8 -1
  216. data/spec/support/table_schema.rb +7 -6
  217. data/spec/support/user.rb +3 -0
  218. data/spec/support/uuid_user.rb +3 -0
  219. data/tasks/types.rake +46 -0
  220. metadata +268 -11
  221. data/.travis.yml +0 -55
@@ -0,0 +1,8 @@
1
+ # typed: true
2
+
3
+ # DO NOT EDIT MANUALLY
4
+ # This is an autogenerated file for types exported from the `addressable` gem.
5
+ # Please instead update this file by running `bin/tapioca gem addressable`.
6
+
7
+ # THIS IS AN EMPTY RBI FILE.
8
+ # see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem
@@ -0,0 +1,631 @@
1
+ # typed: true
2
+
3
+ # DO NOT EDIT MANUALLY
4
+ # This is an autogenerated file for types exported from the `ancestry` gem.
5
+ # Please instead update this file by running `bin/tapioca gem ancestry`.
6
+
7
+ # source://ancestry//lib/ancestry/version.rb#1
8
+ module Ancestry
9
+ class << self
10
+ # The value changes the default way that ancestry is stored in the database
11
+ #
12
+ # :materialized_path (default and legacy)
13
+ #
14
+ # Ancestry is of the form null (for no ancestors) and 1/2/ for children
15
+ #
16
+ # :materialized_path2 (preferred)
17
+ #
18
+ # Ancestry is of the form '/' (for no ancestors) and '/1/2/' for children
19
+ #
20
+ # source://ancestry//lib/ancestry.rb#52
21
+ def default_ancestry_format; end
22
+
23
+ # source://ancestry//lib/ancestry.rb#56
24
+ def default_ancestry_format=(value); end
25
+
26
+ # The value represents the way the id looks for validation
27
+ #
28
+ # '[0-9]+' (default) for integer ids
29
+ # '[-A-Fa-f0-9]{36}' for uuids (though you can find other regular expressions)
30
+ #
31
+ # source://ancestry//lib/ancestry.rb#67
32
+ def default_primary_key_format; end
33
+
34
+ # source://ancestry//lib/ancestry.rb#71
35
+ def default_primary_key_format=(value); end
36
+
37
+ # The value changes the default way that ancestry is updated for associated records
38
+ #
39
+ # :ruby (default and legacy value)
40
+ #
41
+ # Child records will be loaded into memory and updated. callbacks will get called
42
+ # The callbacks of interest are those that cache values based upon the ancestry value
43
+ #
44
+ # :sql (currently only valid in postgres)
45
+ #
46
+ # Child records are updated in sql and callbacks will not get called.
47
+ # Associated records in memory will have the wrong ancestry value
48
+ #
49
+ # source://ancestry//lib/ancestry.rb#32
50
+ def default_update_strategy; end
51
+
52
+ # source://ancestry//lib/ancestry.rb#36
53
+ def default_update_strategy=(value); end
54
+ end
55
+ end
56
+
57
+ # source://ancestry//lib/ancestry/exceptions.rb#2
58
+ class Ancestry::AncestryException < ::RuntimeError; end
59
+
60
+ # source://ancestry//lib/ancestry/exceptions.rb#5
61
+ class Ancestry::AncestryIntegrityException < ::Ancestry::AncestryException; end
62
+
63
+ # source://ancestry//lib/ancestry/class_methods.rb#2
64
+ module Ancestry::ClassMethods
65
+ # Get all nodes and sort them into an empty hash
66
+ #
67
+ # source://ancestry//lib/ancestry/class_methods.rb#41
68
+ def arrange(options = T.unsafe(nil)); end
69
+
70
+ # arranges array of nodes to a hierarchical hash
71
+ #
72
+ # If a node's parent is not included, the node will be included as if it is a top level node
73
+ #
74
+ # @param nodes [Array[Node]] nodes to be arranged
75
+ #
76
+ # source://ancestry//lib/ancestry/class_methods.rb#54
77
+ def arrange_nodes(nodes); end
78
+
79
+ # Arrangement to nested array for serialization
80
+ # You can also supply your own serialization logic using blocks
81
+ # also allows you to pass the order just as you can pass it to the arrange method
82
+ #
83
+ # source://ancestry//lib/ancestry/class_methods.rb#80
84
+ def arrange_serializable(options = T.unsafe(nil), nodes = T.unsafe(nil), &block); end
85
+
86
+ # Build ancestry from parent ids for migration purposes
87
+ #
88
+ # source://ancestry//lib/ancestry/class_methods.rb#215
89
+ def build_ancestry_from_parent_ids!(column = T.unsafe(nil), parent_id = T.unsafe(nil), ancestor_ids = T.unsafe(nil)); end
90
+
91
+ # Integrity checking
92
+ # compromised tree integrity is unlikely without explicitly setting cyclic parents or invalid ancestry and circumventing validation
93
+ # just in case, raise an AncestryIntegrityException if issues are detected
94
+ # specify :report => :list to return an array of exceptions or :report => :echo to echo any error messages
95
+ #
96
+ # source://ancestry//lib/ancestry/class_methods.rb#127
97
+ def check_ancestry_integrity!(options = T.unsafe(nil)); end
98
+
99
+ # convert a hash of the form {node => children} to an array of nodes, child first
100
+ #
101
+ # @param arranged [Hash{Node => {Node => {}, Node => {}}}] arranged nodes
102
+ #
103
+ # source://ancestry//lib/ancestry/class_methods.rb#69
104
+ def flatten_arranged_nodes(arranged, nodes = T.unsafe(nil)); end
105
+
106
+ # Orphan strategy writer
107
+ #
108
+ # source://ancestry//lib/ancestry/class_methods.rb#25
109
+ def orphan_strategy=(orphan_strategy); end
110
+
111
+ # @return [Boolean]
112
+ #
113
+ # source://ancestry//lib/ancestry/class_methods.rb#244
114
+ def primary_key_is_an_integer?; end
115
+
116
+ # Rebuild depth cache if it got corrupted or if depth caching was just turned on
117
+ #
118
+ # @raise [Ancestry::AncestryException]
119
+ #
120
+ # source://ancestry//lib/ancestry/class_methods.rb#227
121
+ def rebuild_depth_cache!; end
122
+
123
+ # Integrity restoration
124
+ #
125
+ # source://ancestry//lib/ancestry/class_methods.rb#175
126
+ def restore_ancestry_integrity!; end
127
+
128
+ # Scope on relative depth options
129
+ #
130
+ # source://ancestry//lib/ancestry/class_methods.rb#13
131
+ def scope_depth(depth_options, depth); end
132
+
133
+ # Pseudo-preordered array of nodes. Children will always follow parents,
134
+ # This is deterministic unless the parents are missing *and* a sort block is specified
135
+ #
136
+ # source://ancestry//lib/ancestry/class_methods.rb#107
137
+ def sort_by_ancestry(nodes, &block); end
138
+
139
+ # Fetch tree node if necessary
140
+ #
141
+ # source://ancestry//lib/ancestry/class_methods.rb#4
142
+ def to_node(object); end
143
+
144
+ # source://ancestry//lib/ancestry/class_methods.rb#91
145
+ def tree_view(column, data = T.unsafe(nil)); end
146
+
147
+ # @yield [self.ancestry_base_class.default_scoped.unscope(:where)]
148
+ #
149
+ # source://ancestry//lib/ancestry/class_methods.rb#239
150
+ def unscoped_where; end
151
+ end
152
+
153
+ # source://ancestry//lib/ancestry/class_methods.rb#243
154
+ Ancestry::ClassMethods::ANCESTRY_UNCAST_TYPES = T.let(T.unsafe(nil), Array)
155
+
156
+ # source://ancestry//lib/ancestry/has_ancestry.rb#2
157
+ module Ancestry::HasAncestry
158
+ # source://ancestry//lib/ancestry/has_ancestry.rb#108
159
+ def acts_as_tree(*args); end
160
+
161
+ # @raise [Ancestry::AncestryException]
162
+ #
163
+ # source://ancestry//lib/ancestry/has_ancestry.rb#3
164
+ def has_ancestry(options = T.unsafe(nil)); end
165
+ end
166
+
167
+ # source://ancestry//lib/ancestry/instance_methods.rb#2
168
+ module Ancestry::InstanceMethods
169
+ # @return [Boolean]
170
+ #
171
+ # source://ancestry//lib/ancestry/instance_methods.rb#152
172
+ def ancestor_of?(node); end
173
+
174
+ # source://ancestry//lib/ancestry/instance_methods.rb#123
175
+ def ancestors(depth_options = T.unsafe(nil)); end
176
+
177
+ # Ancestors
178
+ #
179
+ # @return [Boolean]
180
+ #
181
+ # source://ancestry//lib/ancestry/instance_methods.rb#94
182
+ def ancestors?; end
183
+
184
+ # @return [Boolean]
185
+ #
186
+ # source://ancestry//lib/ancestry/instance_methods.rb#304
187
+ def ancestry_callbacks_disabled?; end
188
+
189
+ # @return [Boolean]
190
+ #
191
+ # source://ancestry//lib/ancestry/instance_methods.rb#99
192
+ def ancestry_changed?; end
193
+
194
+ # Validate that the ancestors don't include itself
195
+ #
196
+ # source://ancestry//lib/ancestry/instance_methods.rb#4
197
+ def ancestry_exclude_self; end
198
+
199
+ # Apply orphan strategy (before destroy - no changes)
200
+ #
201
+ # source://ancestry//lib/ancestry/instance_methods.rb#24
202
+ def apply_orphan_strategy; end
203
+
204
+ # source://ancestry//lib/ancestry/instance_methods.rb#148
205
+ def cache_depth; end
206
+
207
+ # source://ancestry//lib/ancestry/instance_methods.rb#214
208
+ def child_ids; end
209
+
210
+ # @return [Boolean]
211
+ #
212
+ # source://ancestry//lib/ancestry/instance_methods.rb#228
213
+ def child_of?(node); end
214
+
215
+ # @return [Boolean]
216
+ #
217
+ # source://ancestry//lib/ancestry/instance_methods.rb#223
218
+ def childless?; end
219
+
220
+ # Children
221
+ #
222
+ # source://ancestry//lib/ancestry/instance_methods.rb#210
223
+ def children; end
224
+
225
+ # @return [Boolean]
226
+ #
227
+ # source://ancestry//lib/ancestry/instance_methods.rb#218
228
+ def children?; end
229
+
230
+ # source://ancestry//lib/ancestry/instance_methods.rb#68
231
+ def decrease_parent_counter_cache; end
232
+
233
+ # source://ancestry//lib/ancestry/instance_methods.rb#144
234
+ def depth; end
235
+
236
+ # source://ancestry//lib/ancestry/instance_methods.rb#263
237
+ def descendant_ids(depth_options = T.unsafe(nil)); end
238
+
239
+ # @return [Boolean]
240
+ #
241
+ # source://ancestry//lib/ancestry/instance_methods.rb#267
242
+ def descendant_of?(node); end
243
+
244
+ # Descendants
245
+ #
246
+ # source://ancestry//lib/ancestry/instance_methods.rb#259
247
+ def descendants(depth_options = T.unsafe(nil)); end
248
+
249
+ # @return [Boolean]
250
+ #
251
+ # source://ancestry//lib/ancestry/instance_methods.rb#218
252
+ def has_children?; end
253
+
254
+ # Ancestors
255
+ #
256
+ # @return [Boolean]
257
+ #
258
+ # source://ancestry//lib/ancestry/instance_methods.rb#94
259
+ def has_parent?; end
260
+
261
+ # @return [Boolean]
262
+ #
263
+ # source://ancestry//lib/ancestry/instance_methods.rb#243
264
+ def has_siblings?; end
265
+
266
+ # Counter Cache
267
+ #
268
+ # source://ancestry//lib/ancestry/instance_methods.rb#64
269
+ def increase_parent_counter_cache; end
270
+
271
+ # source://ancestry//lib/ancestry/instance_methods.rb#277
272
+ def indirect_ids(depth_options = T.unsafe(nil)); end
273
+
274
+ # @return [Boolean]
275
+ #
276
+ # source://ancestry//lib/ancestry/instance_methods.rb#281
277
+ def indirect_of?(node); end
278
+
279
+ # Indirects
280
+ #
281
+ # source://ancestry//lib/ancestry/instance_methods.rb#273
282
+ def indirects(depth_options = T.unsafe(nil)); end
283
+
284
+ # @return [Boolean]
285
+ #
286
+ # source://ancestry//lib/ancestry/instance_methods.rb#223
287
+ def is_childless?; end
288
+
289
+ # @return [Boolean]
290
+ #
291
+ # source://ancestry//lib/ancestry/instance_methods.rb#248
292
+ def is_only_child?; end
293
+
294
+ # @return [Boolean]
295
+ #
296
+ # source://ancestry//lib/ancestry/instance_methods.rb#199
297
+ def is_root?; end
298
+
299
+ # @return [Boolean]
300
+ #
301
+ # source://ancestry//lib/ancestry/instance_methods.rb#248
302
+ def only_child?; end
303
+
304
+ # source://ancestry//lib/ancestry/instance_methods.rb#173
305
+ def parent; end
306
+
307
+ # currently parent= does not work in after save callbacks
308
+ # assuming that parent hasn't changed
309
+ #
310
+ # source://ancestry//lib/ancestry/instance_methods.rb#160
311
+ def parent=(parent); end
312
+
313
+ # source://ancestry//lib/ancestry/instance_methods.rb#168
314
+ def parent_id; end
315
+
316
+ # source://ancestry//lib/ancestry/instance_methods.rb#164
317
+ def parent_id=(new_parent_id); end
318
+
319
+ # Ancestors
320
+ #
321
+ # @return [Boolean]
322
+ #
323
+ # source://ancestry//lib/ancestry/instance_methods.rb#94
324
+ def parent_id?; end
325
+
326
+ # @return [Boolean]
327
+ #
328
+ # source://ancestry//lib/ancestry/instance_methods.rb#181
329
+ def parent_of?(node); end
330
+
331
+ # source://ancestry//lib/ancestry/instance_methods.rb#140
332
+ def path(depth_options = T.unsafe(nil)); end
333
+
334
+ # source://ancestry//lib/ancestry/instance_methods.rb#128
335
+ def path_ids; end
336
+
337
+ # source://ancestry//lib/ancestry/instance_methods.rb#132
338
+ def path_ids_before_last_save; end
339
+
340
+ # source://ancestry//lib/ancestry/instance_methods.rb#136
341
+ def path_ids_in_database; end
342
+
343
+ # source://ancestry//lib/ancestry/instance_methods.rb#191
344
+ def root; end
345
+
346
+ # @return [Boolean]
347
+ #
348
+ # source://ancestry//lib/ancestry/instance_methods.rb#199
349
+ def root?; end
350
+
351
+ # Root
352
+ #
353
+ # source://ancestry//lib/ancestry/instance_methods.rb#187
354
+ def root_id; end
355
+
356
+ # @return [Boolean]
357
+ #
358
+ # source://ancestry//lib/ancestry/instance_methods.rb#204
359
+ def root_of?(node); end
360
+
361
+ # @return [Boolean]
362
+ #
363
+ # source://ancestry//lib/ancestry/instance_methods.rb#106
364
+ def sane_ancestor_ids?; end
365
+
366
+ # NOTE: includes self
367
+ #
368
+ # source://ancestry//lib/ancestry/instance_methods.rb#239
369
+ def sibling_ids; end
370
+
371
+ # @return [Boolean]
372
+ #
373
+ # source://ancestry//lib/ancestry/instance_methods.rb#253
374
+ def sibling_of?(node); end
375
+
376
+ # Siblings
377
+ #
378
+ # source://ancestry//lib/ancestry/instance_methods.rb#234
379
+ def siblings; end
380
+
381
+ # @return [Boolean]
382
+ #
383
+ # source://ancestry//lib/ancestry/instance_methods.rb#243
384
+ def siblings?; end
385
+
386
+ # Subtree
387
+ #
388
+ # source://ancestry//lib/ancestry/instance_methods.rb#287
389
+ def subtree(depth_options = T.unsafe(nil)); end
390
+
391
+ # source://ancestry//lib/ancestry/instance_methods.rb#291
392
+ def subtree_ids(depth_options = T.unsafe(nil)); end
393
+
394
+ # Touch each of this record's ancestors (after save)
395
+ #
396
+ # source://ancestry//lib/ancestry/instance_methods.rb#52
397
+ def touch_ancestors_callback; end
398
+
399
+ # Update descendants with new ancestry (after update)
400
+ #
401
+ # source://ancestry//lib/ancestry/instance_methods.rb#9
402
+ def update_descendants_with_new_ancestry; end
403
+
404
+ # source://ancestry//lib/ancestry/instance_methods.rb#80
405
+ def update_parent_counter_cache; end
406
+
407
+ # Callback disabling
408
+ #
409
+ # source://ancestry//lib/ancestry/instance_methods.rb#297
410
+ def without_ancestry_callbacks; end
411
+
412
+ private
413
+
414
+ # works with after save context (hence before_last_save)
415
+ #
416
+ # source://ancestry//lib/ancestry/instance_methods.rb#322
417
+ def unscoped_current_and_previous_ancestors; end
418
+
419
+ # source://ancestry//lib/ancestry/instance_methods.rb#309
420
+ def unscoped_descendants; end
421
+
422
+ # source://ancestry//lib/ancestry/instance_methods.rb#315
423
+ def unscoped_descendants_before_save; end
424
+
425
+ # source://ancestry//lib/ancestry/instance_methods.rb#328
426
+ def unscoped_find(id); end
427
+
428
+ # source://ancestry//lib/ancestry/instance_methods.rb#334
429
+ def unscoped_where; end
430
+ end
431
+
432
+ # store ancestry as grandparent_id/parent_id
433
+ # root a=nil,id=1 children=id,id/% == 1, 1/%
434
+ # 3: a=1/2,id=3 children=a/id,a/id/% == 1/2/3, 1/2/3/%
435
+ #
436
+ # source://ancestry//lib/ancestry/materialized_path.rb#5
437
+ module Ancestry::MaterializedPath
438
+ # source://ancestry//lib/ancestry/materialized_path.rb#18
439
+ def ancestors_of(object); end
440
+
441
+ # source://ancestry//lib/ancestry/materialized_path.rb#91
442
+ def ancestry_root; end
443
+
444
+ # source://ancestry//lib/ancestry/materialized_path.rb#30
445
+ def children_of(object); end
446
+
447
+ # source://ancestry//lib/ancestry/materialized_path.rb#57
448
+ def descendant_before_save_conditions(object); end
449
+
450
+ # source://ancestry//lib/ancestry/materialized_path.rb#52
451
+ def descendant_conditions(object); end
452
+
453
+ # source://ancestry//lib/ancestry/materialized_path.rb#47
454
+ def descendants_by_ancestry(ancestry); end
455
+
456
+ # source://ancestry//lib/ancestry/materialized_path.rb#43
457
+ def descendants_of(object); end
458
+
459
+ # indirect = anyone who is a descendant, but not a child
460
+ #
461
+ # source://ancestry//lib/ancestry/materialized_path.rb#37
462
+ def indirects_of(object); end
463
+
464
+ # source://ancestry//lib/ancestry/materialized_path.rb#24
465
+ def inpath_of(object); end
466
+
467
+ # source://ancestry//lib/ancestry/materialized_path.rb#74
468
+ def ordered_by_ancestry(order = T.unsafe(nil)); end
469
+
470
+ # source://ancestry//lib/ancestry/materialized_path.rb#87
471
+ def ordered_by_ancestry_and(order); end
472
+
473
+ # source://ancestry//lib/ancestry/materialized_path.rb#10
474
+ def path_of(object); end
475
+
476
+ # source://ancestry//lib/ancestry/materialized_path.rb#14
477
+ def roots; end
478
+
479
+ # source://ancestry//lib/ancestry/materialized_path.rb#68
480
+ def siblings_of(object); end
481
+
482
+ # source://ancestry//lib/ancestry/materialized_path.rb#62
483
+ def subtree_of(object); end
484
+
485
+ private
486
+
487
+ # source://ancestry//lib/ancestry/materialized_path.rb#108
488
+ def ancestry_format_regexp; end
489
+
490
+ # @return [Boolean]
491
+ #
492
+ # source://ancestry//lib/ancestry/materialized_path.rb#104
493
+ def ancestry_nil_allowed?; end
494
+
495
+ # source://ancestry//lib/ancestry/materialized_path.rb#97
496
+ def ancestry_validation_options; end
497
+
498
+ class << self
499
+ # @private
500
+ #
501
+ # source://ancestry//lib/ancestry/materialized_path.rb#6
502
+ def extended(base); end
503
+ end
504
+ end
505
+
506
+ # store ancestry as /grandparent_id/parent_id/
507
+ # root: a=/,id=1 children=#{a}#{id}/% == /1/%
508
+ # 3: a=/1/2/,id=3 children=#{a}#{id}/% == /1/2/3/%
509
+ #
510
+ # source://ancestry//lib/ancestry/materialized_path2.rb#5
511
+ module Ancestry::MaterializedPath2
512
+ include ::Ancestry::MaterializedPath
513
+
514
+ # source://ancestry//lib/ancestry/materialized_path2.rb#27
515
+ def ancestry_root; end
516
+
517
+ # source://ancestry//lib/ancestry/materialized_path2.rb#23
518
+ def descendants_by_ancestry(ancestry); end
519
+
520
+ # source://ancestry//lib/ancestry/materialized_path2.rb#13
521
+ def indirects_of(object); end
522
+
523
+ # source://ancestry//lib/ancestry/materialized_path2.rb#19
524
+ def ordered_by_ancestry(order = T.unsafe(nil)); end
525
+
526
+ private
527
+
528
+ # source://ancestry//lib/ancestry/materialized_path2.rb#37
529
+ def ancestry_format_regexp; end
530
+
531
+ # @return [Boolean]
532
+ #
533
+ # source://ancestry//lib/ancestry/materialized_path2.rb#33
534
+ def ancestry_nil_allowed?; end
535
+
536
+ class << self
537
+ # @private
538
+ #
539
+ # source://ancestry//lib/ancestry/materialized_path2.rb#8
540
+ def extended(base); end
541
+ end
542
+ end
543
+
544
+ # source://ancestry//lib/ancestry/materialized_path2.rb#41
545
+ module Ancestry::MaterializedPath2::InstanceMethods
546
+ # @raise [Ancestry::AncestryException]
547
+ #
548
+ # source://ancestry//lib/ancestry/materialized_path2.rb#42
549
+ def child_ancestry; end
550
+
551
+ # @raise [Ancestry::AncestryException]
552
+ #
553
+ # source://ancestry//lib/ancestry/materialized_path2.rb#48
554
+ def child_ancestry_before_save; end
555
+
556
+ # source://ancestry//lib/ancestry/materialized_path2.rb#54
557
+ def generate_ancestry(ancestor_ids); end
558
+ end
559
+
560
+ # source://ancestry//lib/ancestry/materialized_path.rb#112
561
+ module Ancestry::MaterializedPath::InstanceMethods
562
+ # source://ancestry//lib/ancestry/materialized_path.rb#123
563
+ def ancestor_ids; end
564
+
565
+ # source://ancestry//lib/ancestry/materialized_path.rb#119
566
+ def ancestor_ids=(value); end
567
+
568
+ # source://ancestry//lib/ancestry/materialized_path.rb#131
569
+ def ancestor_ids_before_last_save; end
570
+
571
+ # source://ancestry//lib/ancestry/materialized_path.rb#127
572
+ def ancestor_ids_in_database; end
573
+
574
+ # optimization - better to go directly to column and avoid parsing
575
+ #
576
+ # @return [Boolean]
577
+ #
578
+ # source://ancestry//lib/ancestry/materialized_path.rb#114
579
+ def ancestors?; end
580
+
581
+ # private (public so class methods can find it)
582
+ # The ancestry value for this record's children (before save)
583
+ # This is technically child_ancestry_was
584
+ #
585
+ # @raise [Ancestry::AncestryException]
586
+ #
587
+ # source://ancestry//lib/ancestry/materialized_path.rb#151
588
+ def child_ancestry; end
589
+
590
+ # @raise [Ancestry::AncestryException]
591
+ #
592
+ # source://ancestry//lib/ancestry/materialized_path.rb#157
593
+ def child_ancestry_before_save; end
594
+
595
+ # source://ancestry//lib/ancestry/materialized_path.rb#169
596
+ def generate_ancestry(ancestor_ids); end
597
+
598
+ # optimization - better to go directly to column and avoid parsing
599
+ #
600
+ # @return [Boolean]
601
+ #
602
+ # source://ancestry//lib/ancestry/materialized_path.rb#114
603
+ def has_parent?; end
604
+
605
+ # source://ancestry//lib/ancestry/materialized_path.rb#139
606
+ def parent_id_before_last_save; end
607
+
608
+ # source://ancestry//lib/ancestry/materialized_path.rb#135
609
+ def parent_id_in_database; end
610
+
611
+ # source://ancestry//lib/ancestry/materialized_path.rb#163
612
+ def parse_ancestry_column(obj); end
613
+
614
+ # optimization - better to go directly to column and avoid parsing
615
+ #
616
+ # @return [Boolean]
617
+ #
618
+ # source://ancestry//lib/ancestry/materialized_path.rb#144
619
+ def sibling_of?(node); end
620
+ end
621
+
622
+ # source://ancestry//lib/ancestry/materialized_path_pg.rb#2
623
+ module Ancestry::MaterializedPathPg
624
+ # Update descendants with new ancestry (after update)
625
+ #
626
+ # source://ancestry//lib/ancestry/materialized_path_pg.rb#4
627
+ def update_descendants_with_new_ancestry; end
628
+ end
629
+
630
+ # source://ancestry//lib/ancestry/version.rb#2
631
+ Ancestry::VERSION = T.let(T.unsafe(nil), String)