promptworks/stacker_bee

View on GitHub
lib/stacker_bee/middleware/cloud_stack_api.rb

Summary

Maintainability
A
0 mins
Test Coverage
module StackerBee
  module Middleware
    class CloudStackAPI < Base
      RESPONSE_TYPE = 'json'

      def before(env)
        env.request.params.merge!(
          api_key:  api_key,
          command:  env.request.endpoint_name,
          response: RESPONSE_TYPE
        )
        env.request.path ||= api_path
      end
    end
  end
end