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.14.1 app/lib/actions/middleware/execute_if_contents_changed.rb
katello-3.13.4 app/lib/actions/middleware/execute_if_contents_changed.rb
katello-3.14.0 app/lib/actions/middleware/execute_if_contents_changed.rb
katello-3.13.3 app/lib/actions/middleware/execute_if_contents_changed.rb
katello-3.14.0.rc2 app/lib/actions/middleware/execute_if_contents_changed.rb
katello-3.13.2 app/lib/actions/middleware/execute_if_contents_changed.rb
katello-3.14.0.rc1 app/lib/actions/middleware/execute_if_contents_changed.rb
katello-3.13.1 app/lib/actions/middleware/execute_if_contents_changed.rb
katello-3.13.0 app/lib/actions/middleware/execute_if_contents_changed.rb
katello-3.13.0.rc2.1 app/lib/actions/middleware/execute_if_contents_changed.rb
katello-3.13.0.rc2 app/lib/actions/middleware/execute_if_contents_changed.rb
katello-3.12.3 app/lib/actions/middleware/execute_if_contents_changed.rb
katello-3.12.2 app/lib/actions/middleware/execute_if_contents_changed.rb
katello-3.13.0.rc1 app/lib/actions/middleware/execute_if_contents_changed.rb
katello-3.12.1 app/lib/actions/middleware/execute_if_contents_changed.rb
katello-3.11.2 app/lib/actions/middleware/execute_if_contents_changed.rb
katello-3.10.2 app/lib/actions/middleware/execute_if_contents_changed.rb
katello-3.12.0 app/lib/actions/middleware/execute_if_contents_changed.rb
katello-3.12.0.rc2 app/lib/actions/middleware/execute_if_contents_changed.rb
katello-3.10.1.1 app/lib/actions/middleware/execute_if_contents_changed.rb