Sha256: 85ad6e37ae0ce498acb15cb79b3c8a59d9381fbc5581f8aeb1e0890747e6c21d

Contents?: true

Size: 683 Bytes

Versions: 99

Compression:

Stored size: 683 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'] == false
          self.action.output[:post_action_skipped] = true
          false
        elsif action.input.keys.include?('matching_content') && action.input['matching_content'] == true
          self.action.output[:post_action_skipped] = true
          false
        else
          true
        end
      end
    end
  end
end

Version data entries

99 entries across 99 versions & 1 rubygems

Version Path
katello-4.10.0 app/lib/actions/middleware/execute_if_contents_changed.rb
katello-4.9.2 app/lib/actions/middleware/execute_if_contents_changed.rb
katello-4.10.0.rc2 app/lib/actions/middleware/execute_if_contents_changed.rb
katello-4.10.0.rc1 app/lib/actions/middleware/execute_if_contents_changed.rb
katello-4.8.4 app/lib/actions/middleware/execute_if_contents_changed.rb
katello-4.9.1 app/lib/actions/middleware/execute_if_contents_changed.rb
katello-4.8.3 app/lib/actions/middleware/execute_if_contents_changed.rb
katello-4.9.0 app/lib/actions/middleware/execute_if_contents_changed.rb
katello-4.7.6 app/lib/actions/middleware/execute_if_contents_changed.rb
katello-4.8.2 app/lib/actions/middleware/execute_if_contents_changed.rb
katello-4.9.0.rc2 app/lib/actions/middleware/execute_if_contents_changed.rb
katello-4.9.0.rc1 app/lib/actions/middleware/execute_if_contents_changed.rb
katello-4.8.1 app/lib/actions/middleware/execute_if_contents_changed.rb
katello-4.7.5 app/lib/actions/middleware/execute_if_contents_changed.rb
katello-4.8.0 app/lib/actions/middleware/execute_if_contents_changed.rb
katello-4.8.0.rc2 app/lib/actions/middleware/execute_if_contents_changed.rb
katello-4.7.4 app/lib/actions/middleware/execute_if_contents_changed.rb
katello-4.8.0.rc1 app/lib/actions/middleware/execute_if_contents_changed.rb
katello-4.7.3 app/lib/actions/middleware/execute_if_contents_changed.rb
katello-4.7.2 app/lib/actions/middleware/execute_if_contents_changed.rb