Module: Awspec::Helper::Type

Included in:
RSpec::Core::ExampleGroup, RSpec::Core::ExampleGroup
Defined in:
lib/awspec/helper/type.rb

Constant Summary collapse

TYPES =
%w(
  ami autoscaling_group cloudtrail cloudwatch_alarm directconnect_virtual_interface
  ebs ec2 elasticache elasticache_cache_parameter_group elb iam_group
  iam_policy iam_role iam_user lambda launch_configuration nat_gateway
  network_acl network_interface rds rds_db_cluster_parameter_group rds_db_parameter_group route53_hosted_zone
  route_table s3_bucket security_group ses_identity subnet vpc cloudfront_distribution
  elastictranscoder_pipeline
)

Class Method Summary collapse

Class Method Details

.deprecate_resource_type(old_type, new_type) ⇒ Object



23
24
25
26
27
28
29
# File 'lib/awspec/helper/type.rb', line 23

def self.deprecate_resource_type(old_type, new_type)
  define_method(old_type) do |*args, &block|
    puts ''
    warn Color.on_red(Color.white("!!! `#{old_type}` type is deprecated. use `#{new_type}` !!!"))
    send(new_type, *args, &block)
  end
end