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.0.2.1 app/lib/actions/middleware/execute_if_contents_changed.rb
katello-4.1.2.1 app/lib/actions/middleware/execute_if_contents_changed.rb
katello-4.0.2 app/lib/actions/middleware/execute_if_contents_changed.rb
katello-4.1.2 app/lib/actions/middleware/execute_if_contents_changed.rb
katello-4.1.1 app/lib/actions/middleware/execute_if_contents_changed.rb
katello-4.1.0 app/lib/actions/middleware/execute_if_contents_changed.rb
katello-4.0.1.2 app/lib/actions/middleware/execute_if_contents_changed.rb
katello-4.1.0.rc2.2 app/lib/actions/middleware/execute_if_contents_changed.rb
katello-4.1.0.rc2.1 app/lib/actions/middleware/execute_if_contents_changed.rb
katello-4.0.1.1 app/lib/actions/middleware/execute_if_contents_changed.rb
katello-4.1.0.rc2 app/lib/actions/middleware/execute_if_contents_changed.rb
katello-4.0.1 app/lib/actions/middleware/execute_if_contents_changed.rb
katello-4.1.0.rc1.1 app/lib/actions/middleware/execute_if_contents_changed.rb
katello-4.1.0.rc1 app/lib/actions/middleware/execute_if_contents_changed.rb
katello-4.0.0 app/lib/actions/middleware/execute_if_contents_changed.rb
katello-4.0.0.rc3.1 app/lib/actions/middleware/execute_if_contents_changed.rb
katello-4.0.0.rc3 app/lib/actions/middleware/execute_if_contents_changed.rb
katello-4.0.0.rc2 app/lib/actions/middleware/execute_if_contents_changed.rb
katello-4.0.0.rc1 app/lib/actions/middleware/execute_if_contents_changed.rb