lib/jets/resource/api_gateway/rest_api/routes/change.rb in jets-2.1.1 vs lib/jets/resource/api_gateway/rest_api/routes/change.rb in jets-2.1.2

- old
+ new

@@ -1,8 +1,16 @@ # Detects route changes class Jets::Resource::ApiGateway::RestApi::Routes class Change + include Jets::AwsServices + def changed? - To.changed? || Variable.changed? || ENV['JETS_REPLACE_API'] + return false unless parent_stack_exists? + + MediaTypes.changed? || To.changed? || Variable.changed? || Page.changed? || ENV['JETS_REPLACE_API'] + end + + def parent_stack_exists? + stack_exists?(Jets::Naming.parent_stack_name) end end end