Sha256: 3fa52245fda3bc26cf82ba16c1db1bb484cedd3659b9397a70150ccf6cd8d9cf

Contents?: true

Size: 494 Bytes

Versions: 43

Compression:

Stored size: 494 Bytes

Contents

module Actions
  module Middleware
    class ExecuteIfContentsChanged < Dynflow::Middleware
      def run(*args)
        pass(*args) if execute?
      end

      def finalize(*args)
        pass(*args) if execute?
      end

      private

      def execute?
        if action.input.keys.include?('contents_changed') && !action.input['contents_changed']
          self.action.output[:post_sync_skipped] = true
          false
        else
          true
        end
      end
    end
  end
end

Version data entries

43 entries across 43 versions & 1 rubygems

Version Path
katello-3.8.0.rc1 app/lib/actions/middleware/execute_if_contents_changed.rb
katello-3.7.0.rc2 app/lib/actions/middleware/execute_if_contents_changed.rb
katello-3.7.0.rc1 app/lib/actions/middleware/execute_if_contents_changed.rb