Sha256: d9c102f859b014c8eec63b7e178ead6b1215ee8ad34ea8344d664a0820bfada9

Contents?: true

Size: 916 Bytes

Versions: 9

Compression:

Stored size: 916 Bytes

Contents

module Context
  module Studio
    module Deployer
      def self.set(deployer_class)
        @deployer = deployer_class if @deployer.nil?
        @deployer
      end

      def self.execute(action)
        @deployer.send(action)
      end

      def self.method_missing(method_name, *argv, &block)
        @deployer.debug_context_log "Searching method #{method_name} in context #{@deployer}"
        is_deploy_context_respond_to_action = @deployer.respond_to?(method_name) && @deployer.actions_permitted?(method_name.to_s)
        if is_deploy_context_respond_to_action
          @deployer.execute_action(@deployer, method_name)
        else
          @deployer.debug_context_log "\n\nUnavailable action '#{method_name}' for context #{@deployer.context_name} as #{@deployer.respond_to?(method_name)} and #{@deployer.actions_permitted?(method_name)} for #{@deployer.class}\n"
        end
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
deploy-context-2.13.39 x86_64-linux/lib/deploy-context/studio/deployer.rb
deploy-context-2.13.38 x86_64-linux/lib/deploy-context/studio/deployer.rb
deploy-context-2.13.36 x86_64-linux/lib/deploy-context/studio/deployer.rb
deploy-context-2.13.35 x86_64-linux/lib/deploy-context/studio/deployer.rb
deploy-context-2.13.34 x86_64-linux/lib/deploy-context/studio/deployer.rb
deploy-context-2.13.26 /home/jimboadmin/deploy-context/habitat/plan.sh/x86_64-linux/lib/deploy-context/studio/deployer.rb
deploy-context-2.13.25 /home/jimboadmin/deploy-context/habitat/plan.sh/x86_64-linux/lib/deploy-context/studio/deployer.rb
deploy-context-2.13.17 /home/jimboadmin/deploy-context/habitat/plan.sh/x86_64-linux/lib/deploy-context/studio/deployer.rb
deploy-context-2.13.8 /src/libraries/deploy-context/helpers/../../../libraries/deploy-context/studio/deployer.rb