module-cluster 1.4.8 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (108) hide show
  1. data/README.md +127 -337
  2. data/lib/module-cluster.rb +1 -153
  3. data/lib/module/cluster.rb +341 -0
  4. data/lib/module/cluster/class_support.rb +22 -0
  5. data/lib/module/cluster/cluster.rb +10 -0
  6. data/lib/module/cluster/cluster/cluster_interface.rb +550 -0
  7. data/lib/module/cluster/exception/module_not_in_stack.rb +26 -0
  8. data/lib/module/cluster/instance_controller.rb +14 -0
  9. data/lib/module/cluster/instance_controller/hook_controller.rb +33 -0
  10. data/lib/module/cluster/instance_controller/hook_controller/chain_proxy.rb +511 -0
  11. data/lib/module/cluster/instance_controller/hook_controller/hook_controller_interface.rb +830 -0
  12. data/lib/module/cluster/instance_controller/instance_controller_interface.rb +269 -0
  13. data/lib/module/cluster/instance_controller/multiple_hook_controller_proxy.rb +359 -0
  14. data/lib/module/cluster/instance_controller/multiple_hook_controller_proxy/chain_proxy.rb +442 -0
  15. data/lib/module/cluster/module_support.rb +67 -0
  16. data/lib/module/namespaces.rb +13 -0
  17. data/lib/module/requires.rb +32 -0
  18. data/spec/module/cluster/cluster_spec.rb +473 -0
  19. data/spec/module/cluster/instance_controller/hook_controller_spec.rb +922 -0
  20. data/spec/module/cluster/instance_controller/multiple_hook_controller_proxy_spec.rb +1240 -0
  21. data/spec/module/cluster_spec.rb +1794 -0
  22. metadata +27 -98
  23. data/README.rdoc +0 -395
  24. data/lib/module-cluster/ModuleCluster.rb +0 -9
  25. data/lib/module-cluster/ModuleCluster/Define.rb +0 -12
  26. data/lib/module-cluster/ModuleCluster/Define/Block.rb +0 -9
  27. data/lib/module-cluster/ModuleCluster/Define/Block/CascadingClass.rb +0 -83
  28. data/lib/module-cluster/ModuleCluster/Define/Block/CascadingClassOrModule.rb +0 -70
  29. data/lib/module-cluster/ModuleCluster/Define/Block/CascadingModule.rb +0 -79
  30. data/lib/module-cluster/ModuleCluster/Define/Block/CascadingModuleOrSubclass.rb +0 -21
  31. data/lib/module-cluster/ModuleCluster/Define/Block/Class.rb +0 -77
  32. data/lib/module-cluster/ModuleCluster/Define/Block/ClassOrInstance.rb +0 -78
  33. data/lib/module-cluster/ModuleCluster/Define/Block/ClassOrModule.rb +0 -78
  34. data/lib/module-cluster/ModuleCluster/Define/Block/ClassOrModuleOrInstance.rb +0 -78
  35. data/lib/module-cluster/ModuleCluster/Define/Block/ClassOrModuleOrSubclass.rb +0 -36
  36. data/lib/module-cluster/ModuleCluster/Define/Block/ClassOrSubclass.rb +0 -29
  37. data/lib/module-cluster/ModuleCluster/Define/Block/Instance.rb +0 -45
  38. data/lib/module-cluster/ModuleCluster/Define/Block/Module.rb +0 -77
  39. data/lib/module-cluster/ModuleCluster/Define/Block/ModuleOrInstance.rb +0 -78
  40. data/lib/module-cluster/ModuleCluster/Define/Block/ModuleOrSubclass.rb +0 -29
  41. data/lib/module-cluster/ModuleCluster/Define/Block/Subclass.rb +0 -56
  42. data/lib/module-cluster/ModuleCluster/Define/ClassCluster.rb +0 -193
  43. data/lib/module-cluster/ModuleCluster/Define/ClassOrInstanceCluster.rb +0 -128
  44. data/lib/module-cluster/ModuleCluster/Define/Cluster.rb +0 -181
  45. data/lib/module-cluster/ModuleCluster/Define/ClusterCascades.rb +0 -185
  46. data/lib/module-cluster/ModuleCluster/Define/ClusterCascadesToClass.rb +0 -181
  47. data/lib/module-cluster/ModuleCluster/Define/ClusterCascadesToModule.rb +0 -181
  48. data/lib/module-cluster/ModuleCluster/Define/Deprecated.rb +0 -40
  49. data/lib/module-cluster/ModuleCluster/Define/InstanceCluster.rb +0 -45
  50. data/lib/module-cluster/ModuleCluster/Define/ModuleCluster.rb +0 -193
  51. data/lib/module-cluster/ModuleCluster/Define/ModuleOrClassCluster.rb +0 -209
  52. data/lib/module-cluster/ModuleCluster/Define/ModuleOrInstanceCluster.rb +0 -128
  53. data/lib/module-cluster/ModuleCluster/Define/Status.rb +0 -106
  54. data/lib/module-cluster/ModuleCluster/Suspend.rb +0 -7
  55. data/lib/module-cluster/ModuleCluster/Suspend/Hooks.rb +0 -315
  56. data/lib/module-cluster/ModuleCluster/Suspend/WithoutHooks.rb +0 -153
  57. data/lib/module-cluster/_private_/ModuleCluster/CascadeFeatures.rb +0 -77
  58. data/lib/module-cluster/_private_/ModuleCluster/CascadeFeatures/ClusterStack.rb +0 -44
  59. data/lib/module-cluster/_private_/ModuleCluster/CascadeFeatures/PerformCascades.rb +0 -292
  60. data/lib/module-cluster/_private_/ModuleCluster/CascadeFeatures/Subclass.rb +0 -24
  61. data/lib/module-cluster/_private_/ModuleCluster/ClusterStack.rb +0 -12
  62. data/lib/module-cluster/_private_/ModuleCluster/ClusterStack/Block.rb +0 -9
  63. data/lib/module-cluster/_private_/ModuleCluster/ClusterStack/Block/Class.rb +0 -36
  64. data/lib/module-cluster/_private_/ModuleCluster/ClusterStack/Block/Inherited.rb +0 -20
  65. data/lib/module-cluster/_private_/ModuleCluster/ClusterStack/Block/Instance.rb +0 -20
  66. data/lib/module-cluster/_private_/ModuleCluster/ClusterStack/Block/Module.rb +0 -36
  67. data/lib/module-cluster/_private_/ModuleCluster/ClusterStack/Block/Set.rb +0 -6
  68. data/lib/module-cluster/_private_/ModuleCluster/ClusterStack/Extends.rb +0 -140
  69. data/lib/module-cluster/_private_/ModuleCluster/ClusterStack/Includes.rb +0 -110
  70. data/lib/module-cluster/_private_/ModuleCluster/ClusterStack/PrependsExtends.rb +0 -140
  71. data/lib/module-cluster/_private_/ModuleCluster/ClusterStack/PrependsIncludes.rb +0 -110
  72. data/lib/module-cluster/_private_/ModuleCluster/ClusterStack/Set.rb +0 -35
  73. data/lib/module-cluster/_private_/ModuleCluster/ClusterStack/Set/MultiSetProxy.rb +0 -359
  74. data/lib/module-cluster/_private_/ModuleCluster/ClusterStack/Status.rb +0 -55
  75. data/lib/module-cluster/_private_/ModuleCluster/ClusterStack/Suspend.rb +0 -199
  76. data/lib/module-cluster/_private_/ModuleCluster/ExtendForCascade.rb +0 -34
  77. data/spec/ModuleCluster/Define/Block/CascadingClassOrModule_spec.rb +0 -285
  78. data/spec/ModuleCluster/Define/Block/CascadingClass_spec.rb +0 -254
  79. data/spec/ModuleCluster/Define/Block/CascadingModuleOrSubclass_spec.rb +0 -56
  80. data/spec/ModuleCluster/Define/Block/CascadingModule_spec.rb +0 -278
  81. data/spec/ModuleCluster/Define/Block/ClassOrInstance_spec.rb +0 -230
  82. data/spec/ModuleCluster/Define/Block/ClassOrModuleOrInstance_spec.rb +0 -238
  83. data/spec/ModuleCluster/Define/Block/ClassOrModuleOrSubclass_spec.rb +0 -54
  84. data/spec/ModuleCluster/Define/Block/ClassOrModule_spec.rb +0 -231
  85. data/spec/ModuleCluster/Define/Block/ClassOrSubclass_spec.rb +0 -54
  86. data/spec/ModuleCluster/Define/Block/Class_spec.rb +0 -224
  87. data/spec/ModuleCluster/Define/Block/Instance_spec.rb +0 -78
  88. data/spec/ModuleCluster/Define/Block/ModuleOrInstance_spec.rb +0 -54
  89. data/spec/ModuleCluster/Define/Block/ModuleOrSubclass_spec.rb +0 -51
  90. data/spec/ModuleCluster/Define/Block/Module_spec.rb +0 -230
  91. data/spec/ModuleCluster/Define/Block/Subclass_spec.rb +0 -73
  92. data/spec/ModuleCluster/Define/Block_spec.rb +0 -18
  93. data/spec/ModuleCluster/Define/ClassCluster_spec.rb +0 -728
  94. data/spec/ModuleCluster/Define/ClassOrInstanceCluster_spec.rb +0 -576
  95. data/spec/ModuleCluster/Define/ClusterCascadesToClass_spec.rb +0 -659
  96. data/spec/ModuleCluster/Define/ClusterCascadesToModule_spec.rb +0 -678
  97. data/spec/ModuleCluster/Define/ClusterCascades_spec.rb +0 -644
  98. data/spec/ModuleCluster/Define/Cluster_spec.rb +0 -708
  99. data/spec/ModuleCluster/Define/InstanceCluster_spec.rb +0 -102
  100. data/spec/ModuleCluster/Define/ModuleCluster_spec.rb +0 -728
  101. data/spec/ModuleCluster/Define/ModuleOrClassCluster_spec.rb +0 -728
  102. data/spec/ModuleCluster/Define/ModuleOrInstanceCluster_spec.rb +0 -576
  103. data/spec/ModuleCluster/Suspend/Hooks_spec.rb +0 -573
  104. data/spec/ModuleCluster/Suspend/WithoutHooks_spec.rb +0 -559
  105. data/spec/ModuleCluster_spec.rb +0 -15
  106. data/spec/_private_/ModuleCluster/CascadeFeatures/PerformCascades_spec.rb +0 -386
  107. data/spec/_private_/ModuleCluster/ClusterStack/Set/MultiSetProxy_spec.rb +0 -419
  108. data/spec/_private_/ModuleCluster/ClusterStack/Suspend_spec.rb +0 -242
@@ -1,128 +0,0 @@
1
-
2
- module ::ModuleCluster::Define::ModuleOrInstanceCluster
3
-
4
- include ::ModuleCluster::CascadeFeatures::ClusterStack
5
- include ::ModuleCluster::Suspend::WithoutHooks
6
-
7
- extend ::ModuleCluster::ExtendForCascade
8
-
9
- ####################################
10
- # self.should_include_or_extend? #
11
- ####################################
12
-
13
- def self.should_include_or_extend?( class_or_module_or_instance )
14
- return ! class_or_module_or_instance.is_a?( Class )
15
- end
16
-
17
- ##########################
18
- # self.should_cascade? #
19
- ##########################
20
-
21
- def self.should_cascade?( class_or_module_or_instance )
22
- return false
23
- end
24
-
25
- ##########################################################################
26
- # module_include_or_extend_or_instance_extend_also_includes_or_extends #
27
- ##########################################################################
28
-
29
- def module_include_or_extend_or_instance_extend_also_includes_or_extends( *includes_or_extends, & runtime_includes_or_extends_block )
30
- include_set = cluster_stack.module_include_includes( ::ModuleCluster::Define::ModuleOrInstanceCluster, __method__, includes_or_extends, runtime_includes_or_extends_block )
31
- extend_set = cluster_stack.module_extend_extends( ::ModuleCluster::Define::ModuleOrInstanceCluster, __method__, includes_or_extends, runtime_includes_or_extends_block )
32
- extend_set_two = cluster_stack.instance_extend_extends( ::ModuleCluster::Define::ModuleOrInstanceCluster, __method__, includes_or_extends, runtime_includes_or_extends_block )
33
- return ::ModuleCluster::ClusterStack::Set::MultiSetProxy.new( include_set, extend_set )
34
- end
35
-
36
- ##############################################################
37
- # module_include_or_extend_or_instance_extend_also_extends #
38
- ##############################################################
39
-
40
- def module_include_or_extend_or_instance_extend_also_extends( *includes_or_extends, & runtime_includes_or_extends_block )
41
- include_set = cluster_stack.module_include_extends( ::ModuleCluster::Define::ModuleOrInstanceCluster, __method__, includes_or_extends, runtime_includes_or_extends_block )
42
- extend_set = cluster_stack.module_extend_extends( ::ModuleCluster::Define::ModuleOrInstanceCluster, __method__, includes_or_extends, runtime_includes_or_extends_block )
43
- extend_set_two = cluster_stack.instance_extend_extends( ::ModuleCluster::Define::ModuleOrInstanceCluster, __method__, includes_or_extends, runtime_includes_or_extends_block )
44
- return ::ModuleCluster::ClusterStack::Set::MultiSetProxy.new( include_set, extend_set )
45
- end
46
-
47
- ################################################################
48
- # module_include_or_instance_extend_also_includes_or_extends #
49
- ################################################################
50
-
51
- def module_include_or_instance_extend_also_includes_or_extends( *includes_or_extends, & runtime_includes_or_extends_block )
52
- include_set = cluster_stack.module_include_includes( ::ModuleCluster::Define::ModuleOrInstanceCluster, __method__, includes_or_extends, runtime_includes_or_extends_block )
53
- extend_set = cluster_stack.instance_extend_extends( ::ModuleCluster::Define::ModuleOrInstanceCluster, __method__, includes_or_extends, runtime_includes_or_extends_block )
54
- return ::ModuleCluster::ClusterStack::Set::MultiSetProxy.new( include_set, extend_set )
55
- end
56
-
57
- ####################################################
58
- # module_include_or_instance_extend_also_extends #
59
- ####################################################
60
-
61
- def module_include_or_instance_extend_also_extends( *extends, & runtime_extends_block )
62
- include_set = cluster_stack.module_include_extends( ::ModuleCluster::Define::ModuleOrInstanceCluster, __method__, extends, runtime_extends_block )
63
- extend_set = cluster_stack.instance_extend_extends( ::ModuleCluster::Define::ModuleOrInstanceCluster, __method__, extends, runtime_extends_block )
64
- return ::ModuleCluster::ClusterStack::Set::MultiSetProxy.new( include_set, extend_set )
65
- end
66
-
67
- ############################################
68
- # module_or_instance_extend_also_extends #
69
- ############################################
70
-
71
- def module_or_instance_extend_also_extends( *extends, & runtime_extends_block )
72
- include_set = cluster_stack.module_extend_extends( ::ModuleCluster::Define::ModuleOrInstanceCluster, __method__, extends, runtime_extends_block )
73
- extend_set = cluster_stack.instance_extend_extends( ::ModuleCluster::Define::ModuleOrInstanceCluster, __method__, extends, runtime_extends_block )
74
- return ::ModuleCluster::ClusterStack::Set::MultiSetProxy.new( include_set, extend_set )
75
- end
76
-
77
- ##############################################################################
78
- # module_include_or_extend_or_instance_extend_prepends_includes_or_extends #
79
- ##############################################################################
80
-
81
- def module_include_or_extend_or_instance_extend_prepends_includes_or_extends( *includes_or_extends, & runtime_includes_or_extends_block )
82
- include_set = cluster_stack.module_include_prepends_includes( ::ModuleCluster::Define::ModuleOrInstanceCluster, __method__, includes_or_extends, runtime_includes_or_extends_block )
83
- extend_set = cluster_stack.module_extend_prepends_extends( ::ModuleCluster::Define::ModuleOrInstanceCluster, __method__, includes_or_extends, runtime_includes_or_extends_block )
84
- extend_set_two = cluster_stack.instance_extend_prepends_extends( ::ModuleCluster::Define::ModuleOrInstanceCluster, __method__, includes_or_extends, runtime_includes_or_extends_block )
85
- return ::ModuleCluster::ClusterStack::Set::MultiSetProxy.new( include_set, extend_set )
86
- end
87
-
88
- ####################################################################
89
- # module_include_or_instance_extend_prepends_includes_or_extends #
90
- ####################################################################
91
-
92
- def module_include_or_instance_extend_prepends_includes_or_extends( *includes_or_extends, & runtime_includes_or_extends_block )
93
- include_set = cluster_stack.module_include_prepends_includes( ::ModuleCluster::Define::ModuleOrInstanceCluster, __method__, includes_or_extends, runtime_includes_or_extends_block )
94
- extend_set = cluster_stack.instance_extend_prepends_extends( ::ModuleCluster::Define::ModuleOrInstanceCluster, __method__, includes_or_extends, runtime_includes_or_extends_block )
95
- return ::ModuleCluster::ClusterStack::Set::MultiSetProxy.new( include_set, extend_set )
96
- end
97
-
98
- ##################################################################
99
- # module_include_or_extend_or_instance_extend_prepends_extends #
100
- ##################################################################
101
-
102
- def module_include_or_extend_or_instance_extend_prepends_extends( *includes_or_extends, & runtime_includes_or_extends_block )
103
- include_set = cluster_stack.module_include_prepends_includes( ::ModuleCluster::Define::ModuleOrInstanceCluster, __method__, includes_or_extends, runtime_includes_or_extends_block )
104
- extend_set = cluster_stack.instance_extend_prepends_extends( ::ModuleCluster::Define::ModuleOrInstanceCluster, __method__, includes_or_extends, runtime_includes_or_extends_block )
105
- return ::ModuleCluster::ClusterStack::Set::MultiSetProxy.new( include_set, extend_set )
106
- end
107
-
108
- ########################################################
109
- # module_include_or_instance_extend_prepends_extends #
110
- ########################################################
111
-
112
- def module_include_or_instance_extend_prepends_extends( *extends, & runtime_extends_block )
113
- include_set = cluster_stack.module_include_prepends_extends( ::ModuleCluster::Define::ModuleOrInstanceCluster, __method__, extends, runtime_extends_block )
114
- extend_set = cluster_stack.instance_extend_prepends_extends( ::ModuleCluster::Define::ModuleOrInstanceCluster, __method__, extends, runtime_extends_block )
115
- return ::ModuleCluster::ClusterStack::Set::MultiSetProxy.new( include_set, extend_set )
116
- end
117
-
118
- ################################################
119
- # module_or_instance_extend_prepends_extends #
120
- ################################################
121
-
122
- def module_or_instance_extend_prepends_extends( *extends, & runtime_extends_block )
123
- include_set = cluster_stack.module_extend_prepends_extends( ::ModuleCluster::Define::ModuleOrInstanceCluster, __method__, extends, runtime_extends_block )
124
- extend_set = cluster_stack.instance_extend_prepends_extends( ::ModuleCluster::Define::ModuleOrInstanceCluster, __method__, extends, runtime_extends_block )
125
- return ::ModuleCluster::ClusterStack::Set::MultiSetProxy.new( include_set, extend_set )
126
- end
127
-
128
- end
@@ -1,106 +0,0 @@
1
-
2
- module ::ModuleCluster::Define::Status
3
-
4
- ###################
5
- # include_hooks #
6
- ###################
7
-
8
- def include_hooks
9
- return cluster_stack.include_hooks
10
- end
11
-
12
- ##################
13
- # extend_hooks #
14
- ##################
15
-
16
- def extend_hooks
17
- return cluster_stack.extend_hooks
18
- end
19
-
20
- ###########################
21
- # prepend_include_hooks #
22
- ###########################
23
-
24
- def prepend_include_hooks
25
- return cluster_stack.prepend_include_hooks
26
- end
27
-
28
- ##########################
29
- # prepend_extend_hooks #
30
- ##########################
31
-
32
- def prepend_extend_hooks
33
- return cluster_stack.prepend_extend_hooks
34
- end
35
-
36
- #######################
37
- # all_include_hooks #
38
- #######################
39
-
40
- def all_include_hooks
41
- return cluster_stack.prepend_include_hooks.dup.concat( cluster_stack.include_hooks )
42
- end
43
-
44
- ######################
45
- # all_extend_hooks #
46
- ######################
47
-
48
- def all_extend_hooks
49
- return cluster_stack.prepend_extend_hooks.dup.concat( cluster_stack.extend_hooks )
50
- end
51
-
52
- #######################
53
- # has_include_hook? #
54
- #######################
55
-
56
- def has_include_hook?( *modules )
57
- return cluster_stack.has_hook?( cluster_stack.include_hooks, *modules )
58
- end
59
- alias_method :has_include_hooks?, :has_include_hook?
60
-
61
- ######################
62
- # has_extend_hook? #
63
- ######################
64
-
65
- def has_extend_hook?( *modules )
66
- return cluster_stack.has_hook?( cluster_stack.extend_hooks, *modules )
67
- end
68
- alias_method :has_extend_hooks?, :has_extend_hook?
69
-
70
- ###############################
71
- # has_prepend_include_hook? #
72
- ###############################
73
-
74
- def has_prepend_include_hook?( *modules )
75
- return cluster_stack.has_hook?( cluster_stack.prepend_include_hooks, *modules )
76
- end
77
- alias_method :has_prepend_include_hooks?, :has_prepend_include_hook?
78
-
79
- ##############################
80
- # has_prepend_extend_hook? #
81
- ##############################
82
-
83
- def has_prepend_extend_hook?( *modules )
84
- return cluster_stack.has_hook?( cluster_stack.prepend_extend_hooks, *modules )
85
- end
86
- alias_method :has_prepend_extend_hooks?, :has_prepend_extend_hook?
87
-
88
- ###########################
89
- # has_any_include_hook? #
90
- ###########################
91
-
92
- def has_any_include_hook?( *modules )
93
- return has_prepend_include_hook?( *modules ) || has_include_hook?( *modules )
94
- end
95
- alias_method :has_any_include_hooks?, :has_any_include_hook?
96
-
97
- ##########################
98
- # has_any_extend_hook? #
99
- ##########################
100
-
101
- def has_any_extend_hook?( *modules )
102
- return has_prepend_extend_hook?( *modules ) || has_extend_hook?( *modules )
103
- end
104
- alias_method :has_any_extend_hooks?, :has_any_extend_hook?
105
-
106
- end
@@ -1,7 +0,0 @@
1
-
2
- module ::ModuleCluster::Suspend
3
-
4
- include Hooks
5
- include WithoutHooks
6
-
7
- end
@@ -1,315 +0,0 @@
1
-
2
- module ::ModuleCluster::Suspend::Hooks
3
-
4
- #######################
5
- # suspend_any_hooks #
6
- #######################
7
-
8
- def suspend_any_hooks( description = nil )
9
- if description
10
- # we don't want to end up unsuspending any sets that were already suspended
11
- # so we add to the description only sets that are not suspended
12
- description[ :suspended ] = false
13
- sets = cluster_stack.all_hooks.hooks_with( description )
14
- sets.suspend
15
- return_sets = sets
16
- else
17
- cluster_stack.suspend_any_hooks
18
- return_sets = cluster_stack.all_hooks
19
- end
20
- return return_sets
21
- end
22
-
23
- ###############################
24
- # suspend_any_include_hooks #
25
- ###############################
26
-
27
- def suspend_any_include_hooks( description = nil )
28
- if description
29
- # we don't want to end up unsuspending any sets that were already suspended
30
- # so we add to the description only sets that are not suspended
31
- description[ :suspended ] = false
32
- sets = cluster_stack.all_include_hooks.hooks_with( description )
33
- sets.suspend
34
- return_sets = sets
35
- else
36
- cluster_stack.suspend_any_include_hooks
37
- return_sets = cluster_stack.all_include_hooks
38
- end
39
- return return_sets
40
- end
41
-
42
- ##############################
43
- # suspend_any_extend_hooks #
44
- ##############################
45
-
46
- def suspend_any_extend_hooks( description = nil )
47
- if description
48
- # we don't want to end up unsuspending any sets that were already suspended
49
- # so we add to the description only sets that are not suspended
50
- description[ :suspended ] = false
51
- sets = cluster_stack.all_extend_hooks.hooks_with( description )
52
- sets.suspend
53
- return_sets = sets
54
- else
55
- cluster_stack.suspend_any_extend_hooks
56
- return_sets = cluster_stack.all_extend_hooks
57
- end
58
- return return_sets
59
- end
60
-
61
- ###########################
62
- # suspend_include_hooks #
63
- ###########################
64
-
65
- def suspend_include_hooks( description = nil )
66
- if description
67
- # we don't want to end up unsuspending any sets that were already suspended
68
- # so we add to the description only sets that are not suspended
69
- description[ :suspended ] = false
70
- sets = cluster_stack.include_hooks.hooks_with( description )
71
- sets.suspend
72
- return_sets = sets
73
- else
74
- cluster_stack.suspend_include_hooks
75
- return_sets = cluster_stack.include_hooks
76
- end
77
- return return_sets
78
- end
79
-
80
- ##########################
81
- # suspend_extend_hooks #
82
- ##########################
83
-
84
- def suspend_extend_hooks( description = nil )
85
- if description
86
- # we don't want to end up unsuspending any sets that were already suspended
87
- # so we add to the description only sets that are not suspended
88
- description[ :suspended ] = false
89
- sets = cluster_stack.extend_hooks.hooks_with( description )
90
- sets.suspend
91
- return_sets = sets
92
- else
93
- cluster_stack.suspend_extend_hooks
94
- return_sets = cluster_stack.extend_hooks
95
- end
96
- return return_sets
97
- end
98
-
99
- ###################################
100
- # suspend_prepend_include_hooks #
101
- ###################################
102
-
103
- def suspend_prepend_include_hooks( description = nil )
104
- if description
105
- # we don't want to end up unsuspending any sets that were already suspended
106
- # so we add to the description only sets that are not suspended
107
- description[ :suspended ] = false
108
- sets = cluster_stack.prepend_include_hooks.hooks_with( description )
109
- sets.suspend
110
- return_sets = sets
111
- else
112
- cluster_stack.suspend_prepend_include_hooks
113
- return_sets = cluster_stack.prepend_include_hooks
114
- end
115
- return return_sets
116
- end
117
-
118
- ##################################
119
- # suspend_prepend_extend_hooks #
120
- ##################################
121
-
122
- def suspend_prepend_extend_hooks( description = nil )
123
- if description
124
- # we don't want to end up unsuspending any sets that were already suspended
125
- # so we add to the description only sets that are not suspended
126
- description[ :suspended ] = false
127
- sets = cluster_stack.prepend_extend_hooks.hooks_with( description )
128
- sets.suspend
129
- return_sets = sets
130
- else
131
- cluster_stack.suspend_prepend_extend_hooks
132
- return_sets = cluster_stack.prepend_extend_hooks
133
- end
134
- return return_sets
135
- end
136
-
137
- ######################
138
- # hooks_suspended? #
139
- ######################
140
-
141
- def hooks_suspended?( action )
142
- return cluster_stack.hooks_suspended?( action )
143
- end
144
-
145
- ##########################
146
- # all_hooks_suspended? #
147
- ##########################
148
-
149
- def all_hooks_suspended?
150
- return cluster_stack.all_hooks_suspended?
151
- end
152
-
153
- ##################################
154
- # all_include_hooks_suspended? #
155
- ##################################
156
-
157
- def all_include_hooks_suspended?
158
- return cluster_stack.all_include_hooks_suspended?
159
- end
160
-
161
- #################################
162
- # all_extend_hooks_suspended? #
163
- #################################
164
-
165
- def all_extend_hooks_suspended?
166
- return cluster_stack.all_extend_hooks_suspended?
167
- end
168
-
169
- ##############################
170
- # include_hooks_suspended? #
171
- ##############################
172
-
173
- def include_hooks_suspended?
174
- return cluster_stack.include_hooks_suspended?
175
- end
176
-
177
- #############################
178
- # extend_hooks_suspended? #
179
- #############################
180
-
181
- def extend_hooks_suspended?
182
- return cluster_stack.extend_hooks_suspended?
183
- end
184
-
185
- ######################################
186
- # prepend_include_hooks_suspended? #
187
- ######################################
188
-
189
- def prepend_include_hooks_suspended?
190
- return cluster_stack.prepend_include_hooks_suspended?
191
- end
192
-
193
- #####################################
194
- # prepend_extend_hooks_suspended? #
195
- #####################################
196
-
197
- def prepend_extend_hooks_suspended?
198
- return cluster_stack.prepend_extend_hooks_suspended?
199
- end
200
-
201
- ######################
202
- # resume_any_hooks #
203
- ######################
204
-
205
- def resume_any_hooks( description = nil )
206
- if description
207
- sets = cluster_stack.all_hooks.hooks_with( description )
208
- sets.resume
209
- return_sets = sets
210
- else
211
- cluster_stack.resume_any_hooks
212
- return_sets = cluster_stack.all_hooks
213
- end
214
- return return_sets
215
- end
216
-
217
- ##############################
218
- # resume_any_include_hooks #
219
- ##############################
220
-
221
- def resume_any_include_hooks( description = nil )
222
- if description
223
- sets = cluster_stack.all_include_hooks.hooks_with( description )
224
- sets.resume
225
- return_sets = sets
226
- else
227
- cluster_stack.resume_any_include_hooks
228
- return_sets = cluster_stack.all_include_hooks
229
- end
230
- return return_sets
231
- end
232
-
233
- #############################
234
- # resume_any_extend_hooks #
235
- #############################
236
-
237
- def resume_any_extend_hooks( description = nil )
238
- if description
239
- sets = cluster_stack.all_extend_hooks.hooks_with( description )
240
- sets.resume
241
- return_sets = sets
242
- else
243
- cluster_stack.resume_any_extend_hooks
244
- return_sets = cluster_stack.all_extend_hooks
245
- end
246
- return return_sets
247
- end
248
-
249
- ##########################
250
- # resume_include_hooks #
251
- ##########################
252
-
253
- def resume_include_hooks( description = nil )
254
- if description
255
- sets = cluster_stack.include_hooks.hooks_with( description )
256
- sets.resume
257
- return_sets = sets
258
- else
259
- cluster_stack.resume_include_hooks
260
- return_sets = cluster_stack.include_hooks
261
- end
262
- return return_sets
263
- end
264
-
265
- #########################
266
- # resume_extend_hooks #
267
- #########################
268
-
269
- def resume_extend_hooks( description = nil )
270
- if description
271
- sets = cluster_stack.extend_hooks.hooks_with( description )
272
- sets.resume
273
- return_sets = sets
274
- else
275
- cluster_stack.resume_extend_hooks
276
- return_sets = cluster_stack.extend_hooks
277
- end
278
- return return_sets
279
- end
280
-
281
- ##################################
282
- # resume_prepend_include_hooks #
283
- ##################################
284
-
285
- def resume_prepend_include_hooks( description = nil )
286
- if description
287
- sets = cluster_stack.prepend_include_hooks.hooks_with( description )
288
- sets.resume
289
- return_sets = sets
290
- else
291
- cluster_stack.resume_prepend_include_hooks
292
- return_sets = cluster_stack.prepend_include_hooks
293
- end
294
- return return_sets
295
- end
296
-
297
- #################################
298
- # resume_prepend_extend_hooks #
299
- #################################
300
-
301
- def resume_prepend_extend_hooks( description = nil )
302
- if description
303
- sets = cluster_stack.prepend_extend_hooks.hooks_with( description )
304
- sets.resume
305
- return_sets = sets
306
- else
307
- cluster_stack.resume_prepend_extend_hooks
308
- return_sets = cluster_stack.prepend_extend_hooks
309
- end
310
- return return_sets
311
- end
312
-
313
-
314
-
315
- end