From a55d55a156e29dad981f848ce347cd6b7c252ddb Mon Sep 17 00:00:00 2001 From: masatoshi_moritsuka Date: Fri, 1 May 2026 00:28:03 +0900 Subject: [PATCH 1/3] feat(ancestry): Add Ancestry::VERSION --- gems/ancestry/4.3/ancestry.rbs | 2 ++ gems/ancestry/5.0/ancestry.rbs | 2 ++ 2 files changed, 4 insertions(+) diff --git a/gems/ancestry/4.3/ancestry.rbs b/gems/ancestry/4.3/ancestry.rbs index 39949208..f98e24a4 100644 --- a/gems/ancestry/4.3/ancestry.rbs +++ b/gems/ancestry/4.3/ancestry.rbs @@ -1,4 +1,6 @@ module Ancestry + VERSION: String + type depth_options = Hash[:before_depth | :to_depth | :at_depth | :from_depth | :after_depth, Integer] def self.default_update_strategy: () -> (:sql | :ruby) diff --git a/gems/ancestry/5.0/ancestry.rbs b/gems/ancestry/5.0/ancestry.rbs index 39949208..f98e24a4 100644 --- a/gems/ancestry/5.0/ancestry.rbs +++ b/gems/ancestry/5.0/ancestry.rbs @@ -1,4 +1,6 @@ module Ancestry + VERSION: String + type depth_options = Hash[:before_depth | :to_depth | :at_depth | :from_depth | :after_depth, Integer] def self.default_update_strategy: () -> (:sql | :ruby) From 1dd3a7a5c58c735f43a8406dd662bb5b4d6dc1b0 Mon Sep 17 00:00:00 2001 From: masatoshi_moritsuka Date: Fri, 1 May 2026 00:31:58 +0900 Subject: [PATCH 2/3] feat(ancestry): Remove apply_orphan_strategy from v5.0 `apply_orphan_strategy` is dynamically defined as an alias by `has_ancestry`. cf. https://github.com/stefankroes/ancestry/blob/v5.0.0/lib/ancestry/has_ancestry.rb#L64 --- gems/ancestry/5.0/ancestry/instance_methods.rbs | 2 -- 1 file changed, 2 deletions(-) diff --git a/gems/ancestry/5.0/ancestry/instance_methods.rbs b/gems/ancestry/5.0/ancestry/instance_methods.rbs index 3c0dacb9..6ee97bc2 100644 --- a/gems/ancestry/5.0/ancestry/instance_methods.rbs +++ b/gems/ancestry/5.0/ancestry/instance_methods.rbs @@ -4,8 +4,6 @@ module Ancestry def update_descendants_with_new_ancestry: () -> void - def apply_orphan_strategy: () -> void - def apply_orphan_strategy_rootify: () -> void def apply_orphan_strategy_destroy: () -> void From 80aa3402e7e180535dcc0aaa30351ebfbebf31fe Mon Sep 17 00:00:00 2001 From: masatoshi_moritsuka Date: Fri, 1 May 2026 00:57:14 +0900 Subject: [PATCH 3/3] feat(ancestry): Allow `Symbol` in the `ancestry_column` of `construct_depth_sql` cf. https://github.com/stefankroes/ancestry/blob/v5.0.0/lib/ancestry/has_ancestry.rb#L24-L25 cf. Ancestry::HasAncestry#has_ancestry --- gems/ancestry/5.0/ancestry/materialized_path.rbs | 2 +- gems/ancestry/5.0/ancestry/materialized_path2.rbs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gems/ancestry/5.0/ancestry/materialized_path.rbs b/gems/ancestry/5.0/ancestry/materialized_path.rbs index 5fa4cfda..d2745fca 100644 --- a/gems/ancestry/5.0/ancestry/materialized_path.rbs +++ b/gems/ancestry/5.0/ancestry/materialized_path.rbs @@ -42,7 +42,7 @@ module Ancestry def concat: (*String args) -> String - def self.construct_depth_sql: (String table_name, String ancestry_column, String ancestry_delimiter) -> String + def self.construct_depth_sql: (String table_name, String | Symbol ancestry_column, String ancestry_delimiter) -> String private diff --git a/gems/ancestry/5.0/ancestry/materialized_path2.rbs b/gems/ancestry/5.0/ancestry/materialized_path2.rbs index 9534f539..5ca94d4d 100644 --- a/gems/ancestry/5.0/ancestry/materialized_path2.rbs +++ b/gems/ancestry/5.0/ancestry/materialized_path2.rbs @@ -16,7 +16,7 @@ module Ancestry def generate_ancestry: (Array[PrimaryKey]? ancestor_ids) -> String - def self.construct_depth_sql: (String table_name, String ancestry_column, String ancestry_delimiter) -> String + def self.construct_depth_sql: (String table_name, String | Symbol ancestry_column, String ancestry_delimiter) -> String private