Sha256: aa5801b193ce7700a6c014df24dec93171caac5f54046f15d7e7536b5ae15dcb
Contents?: true
Size: 636 Bytes
Versions: 32
Compression:
Stored size: 636 Bytes
Contents
class Jets::Controller class Stage def initialize(host, url) @host, @url = host, url end def add return @url unless add_stage? stage_name = Jets::Resource::ApiGateway::Deployment.stage_name "/#{stage_name}#{@url}" end def add_stage? return false if on_cloud9? @host.include?("amazonaws.com") && @url.starts_with?('/') end def on_cloud9? self.class.on_cloud9?(@host) end class << self def add(host, url) new(host, url).add end def on_cloud9?(host) !!(host =~ /cloud9\..*\.amazonaws\.com/) end end end end
Version data entries
32 entries across 32 versions & 2 rubygems