require "govuk_content_models/action_processors/base_processor"
Dir[File.join(File.dirname(__FILE__), 'action_processors', '*.rb')].each { |f| require f }

module GovukContentModels
  module ActionProcessors
    REQUEST_TYPE_TO_PROCESSOR = {
      assign: 'AssignProcessor',
      create_edition: 'CreateEditionProcessor',
      request_review: 'RequestReviewProcessor',
      approve_review: 'ApproveReviewProcessor',
      send_fact_check: 'SendFactCheckProcessor',
      receive_fact_check: 'ReceiveFactCheckProcessor',
      approve_fact_check: 'ApproveFactCheckProcessor',
      skip_fact_check: 'SkipFactCheckProcessor',
      request_amendments: 'RequestAmendmentsProcessor',
      schedule_for_publishing: 'ScheduleForPublishingProcessor',
      cancel_scheduled_publishing: 'CancelScheduledPublishingProcessor',
      publish: 'PublishProcessor',
      archive: 'ArchiveProcessor',
      new_version: 'NewVersionProcessor',
    }
  end
end

require "govuk_content_models/action_processors/base_processor"
Dir[File.join(File.dirname(__FILE__), 'action_processors', '*.rb')].each { |f| require f }

module GovukContentModels
  module ActionProcessors
    REQUEST_TYPE_TO_PROCESSOR = {
      assign: 'AssignProcessor',
      create: 'CreateEditionProcessor',
      request_review: 'RequestReviewProcessor',
      approve_review: 'ApproveReviewProcessor',
      send_fact_check: 'SendFactCheckProcessor',
      receive_fact_check: 'ReceiveFactCheckProcessor',
      approve_fact_check: 'ApproveFactCheckProcessor',
      skip_fact_check: 'SkipFactCheckProcessor',
      request_amendments: 'RequestAmendmentsProcessor',
      schedule_for_publishing: 'ScheduleForPublishingProcessor',
      cancel_scheduled_publishing: 'CancelScheduledPublishingProcessor',
      publish: 'PublishProcessor',
      archive: 'ArchiveProcessor',
      new_version: 'NewVersionProcessor',
    }
  end
end

Correct request type for create edition
Correct request type for create edition

continuing with:
https://github.com/alphagov/govuk_content_models/pull/245

for a create edition action the request
type should be recorded as 'create'. this
ensures that we show the correct message
under 'History and Notes', and send the
correct notification out to editors when
changes happen.
