# -*- encoding: utf-8 -*- # stub: convection 0.2.3 ruby lib Gem::Specification.new do |s| s.name = "convection".freeze s.version = "0.2.3".freeze s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version= s.require_paths = ["lib".freeze] s.authors = ["John Manero".freeze] s.date = "2015-09-17" s.description = "# Convection [![Build Status](https://travis-ci.org/rapid7/convection.svg)](https://travis-ci.org/rapid7/convection)\n_A fully generic, modular DSL for AWS CloudFormation_\n\nThis gem aims to provide a reusable model for AWS CloudFormation in Ruby. It exposes a DSL for template definition, and a simple, decoupled abstraction of a CloudFormation Stack to compile and apply templates.\n\n## Version 0.0.1\nThis is an Alpha release. It is still lacking functionality and testing. We plan to develop/improve features as we begin to use it for our own deployments in the coming months. PRs welcome.\n\n## Installation\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'convection'\n```\n\nAnd then execute:\n\n $ bundle\n\nOr install it yourself as:\n\n $ gem install convection\n\n## Template DSL\nThe core DSL provides all of the available JSON primatives of CloudFormation in the form of ruby methods. These primatives are used to compose higher-order methods for commonly used definitions:\n\n```ruby\nrequire 'convection'\n\n## Create a new instance of Convection::Model::Template\nConvection.template do\n description 'An example template'\n\n parameter 'InstanceSize' do\n type 'String'\n description 'Instance Size'\n default 'm3.medium'\n\n allow 'm3.medium'\n allow 'm3.large'\n allow 'm3.xlarge'\n end\n\n ## The `resource` method can be used to define any resource\n ## supported by CloudFormation: See http://docs.aws.amazon.com/\\\n ## AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html\n resource 'AnEC2Instance' do\n type 'AWS::EC2::Instance'\n property 'AvailabilityZone', 'us-east-1a'\n property 'ImageId', 'ami-76e27e1e' ## Ubuntu 14.04 hvm:ebs\n property 'KeyName', 'test'\n property 'SecurityGroupIds', ['sg-dd733c41', 'sg-dd738df3']\n property 'Tags', [{\n 'Key' => 'Name',\n 'Value' => 'test-1'\n }]\n\n property 'DisableApiTermination', false\n end\n\n ## `ec2_instnce` extends `resource`. The following results in JSON\n ## identical to that of Resource[AnEC2Instance]\n ec2_instance 'AnOtherInstance' do\n availability_zone 'us-east-1a'\n image_id 'ami-76e27e1e'\n key_name 'test'\n\n security_group 'sg-dd733c41'\n security_group 'sg-dd738df3'\n\n tag 'Name', 'test-2'\n\n ## All of the methods of the `resource` primative are available in\n ## its children:\n property 'DisableApiTermination', false\n end\nend.to_json\n```\n\n### Parameters\nhttp://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/parameters-section-structure.html\n\n```ruby\nparameter 'InstanceType' do\n type 'String'\n description 'Set the thing\\'s instance flavor'\n default 'm3.medium'\n\n allow 'm3.medium'\n allow 'm3.large'\n allow 'm3.xlarge'\nend\n```\n\n### Mappings\nhttp://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/mappings-section-structure.html\n\n```ruby\nmapping 'RegionalAMIs' do\n item 'us-east-1', 'hvm', 'ami-76e27e1e'\n item 'us-west-1', 'hvm', 'ami-d5180890'\n item 'us-east-1', 'pv', 'ami-64e27e0c'\n item 'us-west-1', 'pv', 'ami-c5180880'\nend\n```\n\n### Conditions\nhttp://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/conditions-section-structure.html\n\n```ruby\ncondition 'ThisCondition' do\n fn_equals( fn_ref('SomeParameter'), 'value_x' )\nend\n\ncondition 'ThatCondition' do\n fn_or(\n fn_equals( fn_ref('SomeParameter'), 'value_y' ),\n fn_equals( fn_ref('SomeParameter'), 'value_z' )\n )\nend\n```\n\n### Resources\nhttp://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/resources-section-structure.html\n\n```ruby\nresource 'AnInstance' do\n type 'AWS::EC2::Instance'\n\n ## Optional condition reference\n condition 'SomeCondition'\n\n ## Add Resource Properties\n property 'AvailabilityZone', 'us-east-1a'\n property 'ImageId', 'ami-76e27e1e' ## Ubuntu 14.04 hvm:ebs\n property 'KeyName', 'test'\n ...\nend\n```\n\nUsing a condition to set a resource property:\n\n```ruby\nresource 'MySQL' do\n type 'AWS::RDS::DBInstance'\n ...\n property 'Iops', fn_if('ThisCondition', '1000', fn_ref('AWS::NoValue'))\n ...\nend\n```\n\n### Outputs\nhttp://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/outputs-section-structure.html\n\n```ruby\noutput 'SomeName' do\n description 'An Important Attribute'\n value get_att('Resource', 'Attribute')\n\n ## Optional condition reference\n condition 'SomeCondition'\nend\n```\n\n### Intrinsic Functions\nhttp://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference.html\n\nAll intrinsic functions are available as helper methods:\n\n * base64(content)\n * fn_and(conditions...)\n * fn_equals(value_1, value_2)\n * fn_if(condition, value_true, value_false)\n * fn_not(condition)\n * fn_or(conditions...)\n * find_in_map(map_name, key_1, key_2)\n * get_att(resource, attr_name)\n * get_azs(region)\n * join(delimiter, values...)\n * select(index, objects...)\n * fn_ref(resource)\n\n```ruby\nec2_instance \"TestInstanceFoo\#{ i }\" do\n image_id find_in_map('RegionalAMIs', fn_ref('AWS::Region'), 'hvm')\n instance_type 'm3.medium'\n key_name find_in_map('RegionalKeys', fn_ref('AWS::Region'), 'test')\n security_group fn_ref('LousySecurityGroup')\n subnet fn_ref(\"TestSubnet\")\nend\n```\n\n## Stack Control\nThe `Stack` class provides a state wrapper for CloudFormation Stacks. It tracks the state of the managed stack, and creates/updates accordingly. `Stack` is also region-aware, and can be used within a template to define resources that depend upon availability-zones or other region-specific neuances that cannot be represented as maps or require iteration.\n\n### Class `Convection::Control::Stack`\n* `.new(name, template, options = {})`\n * _name_ CloudFormation Stack name\n * _template_ Instance of Convection::Model::Template\n * _options_ - Hash\n * _region_ - AWS region, format `us-east-1`. Default us-east-1\n * _credentials_ - Optional instance of AWS::Credentials. See the [AWS-SDK Documentation](http://docs.aws.amazon.com/sdkforruby/api/frames.html)\n * _parameters_ - Stack parameters, as a `Hash` of `{ key => value }`\n * _tags_ - Stack tags, as a `Hash` of `{ key => value }`\n * _on_failure_ - Create failure action. Default `DELETE`\n * _capabilities_ - See the [AWS-SDK Documentation](http://docs.aws.amazon.com/sdkforruby/api/Aws/CloudFormation/Client.html#create_stack-instance_method)\n * Additional options will be passed directly to `create_stack` and `update_stack`\n\n* `#status` - Returns the stack status\n* `#exist?` - Returns true if the stack exists and is not in a DELETED state\n* `#complete?`\n* `#rollback?`\n* `#fail?`\n* `#render` - Populates the provided template with any environment data included in the stack (e.g. availability zones). Returns a `Hash`\n* `#to_json` - Render template and transofrm to a pretty-generated JSON `String`\n* `#apply` - Renter template and create/update CloudFormation Stack\n* `#delete` - Delete CloudFormation Stack\n* `#availability_zones(&block)` - Return an array of strings representing the region's availability zones. Provided codeblock will be called for each AZ.\n\n## Futures\n*\n\n## License\n_Copyright (c) 2015 John Manero, Rapid7 LLC._\n\n```\nMIT License\n===========\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n\"Software\"), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\nLIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\nOF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\nWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n```\n".freeze s.email = ["jmanero@rapid7.com".freeze] s.executables = ["convection".freeze] s.files = [".gitignore".freeze, ".rubocop.yml".freeze, ".rubocop_todo.yml".freeze, ".ruby-version".freeze, ".travis.yml".freeze, "Gemfile".freeze, "LICENSE".freeze, "README.md".freeze, "Rakefile".freeze, "Thorfile".freeze, "bin/convection".freeze, "convection.gemspec".freeze, "example/.ruby-version".freeze, "example/Cloudfile".freeze, "example/deprecated/elb.rb".freeze, "example/deprecated/iam_access_key.rb".freeze, "example/deprecated/iam_group.rb".freeze, "example/deprecated/iam_role.rb".freeze, "example/deprecated/iam_user.rb".freeze, "example/deprecated/rds.rb".freeze, "example/deprecated/s3.rb".freeze, "example/deprecated/sqs.rb".freeze, "example/deprecated/vpc.rb".freeze, "example/foobar.rb".freeze, "example/output/vpc.json".freeze, "example/security-groups.rb".freeze, "example/trust_cloudtrail.rb".freeze, "example/vpc.rb".freeze, "ext/resource_generator.sh".freeze, "lib/convection.rb".freeze, "lib/convection/control/cloud.rb".freeze, "lib/convection/control/stack.rb".freeze, "lib/convection/dsl/helpers.rb".freeze, "lib/convection/dsl/intrinsic_functions.rb".freeze, "lib/convection/model/attributes.rb".freeze, "lib/convection/model/cloudfile.rb".freeze, "lib/convection/model/diff.rb".freeze, "lib/convection/model/event.rb".freeze, "lib/convection/model/exceptions.rb".freeze, "lib/convection/model/mixin/cidr_block.rb".freeze, "lib/convection/model/mixin/colorize.rb".freeze, "lib/convection/model/mixin/conditional.rb".freeze, "lib/convection/model/mixin/policy.rb".freeze, "lib/convection/model/mixin/protocol.rb".freeze, "lib/convection/model/mixin/taggable.rb".freeze, "lib/convection/model/template.rb".freeze, "lib/convection/model/template/condition.rb".freeze, "lib/convection/model/template/mapping.rb".freeze, "lib/convection/model/template/output.rb".freeze, "lib/convection/model/template/parameter.rb".freeze, "lib/convection/model/template/resource.rb".freeze, "lib/convection/model/template/resource/aws_auto_scaling_auto_scaling_group.rb".freeze, "lib/convection/model/template/resource/aws_auto_scaling_launch_configuration.rb".freeze, "lib/convection/model/template/resource/aws_auto_scaling_scaling_policy.rb".freeze, "lib/convection/model/template/resource/aws_cloud_watch_alarm.rb".freeze, "lib/convection/model/template/resource/aws_ec2_instance.rb".freeze, "lib/convection/model/template/resource/aws_ec2_internet_gateway.rb".freeze, "lib/convection/model/template/resource/aws_ec2_network_acl.rb".freeze, "lib/convection/model/template/resource/aws_ec2_network_acl_entry.rb".freeze, "lib/convection/model/template/resource/aws_ec2_route.rb".freeze, "lib/convection/model/template/resource/aws_ec2_route_table.rb".freeze, "lib/convection/model/template/resource/aws_ec2_security_group.rb".freeze, "lib/convection/model/template/resource/aws_ec2_security_group_ingres.rb".freeze, "lib/convection/model/template/resource/aws_ec2_subnet.rb".freeze, "lib/convection/model/template/resource/aws_ec2_subnet_network_acl_association.rb".freeze, "lib/convection/model/template/resource/aws_ec2_subnet_route_table_association.rb".freeze, "lib/convection/model/template/resource/aws_ec2_vpc.rb".freeze, "lib/convection/model/template/resource/aws_ec2_vpc_gateway_attachment.rb".freeze, "lib/convection/model/template/resource/aws_elasticache_cluster.rb".freeze, "lib/convection/model/template/resource/aws_elasticache_parameter_group.rb".freeze, "lib/convection/model/template/resource/aws_elasticache_security_group.rb".freeze, "lib/convection/model/template/resource/aws_elasticache_security_group_ingress.rb".freeze, "lib/convection/model/template/resource/aws_elb.rb".freeze, "lib/convection/model/template/resource/aws_iam_access_key.rb".freeze, "lib/convection/model/template/resource/aws_iam_group.rb".freeze, "lib/convection/model/template/resource/aws_iam_instance_profile.rb".freeze, "lib/convection/model/template/resource/aws_iam_policy.rb".freeze, "lib/convection/model/template/resource/aws_iam_role.rb".freeze, "lib/convection/model/template/resource/aws_iam_user.rb".freeze, "lib/convection/model/template/resource/aws_logs_loggroup.rb".freeze, "lib/convection/model/template/resource/aws_rds_db_instance.rb".freeze, "lib/convection/model/template/resource/aws_rds_db_parameter_group.rb".freeze, "lib/convection/model/template/resource/aws_rds_db_security_group.rb".freeze, "lib/convection/model/template/resource/aws_rds_db_subnet_group.rb".freeze, "lib/convection/model/template/resource/aws_route53_health_check.rb".freeze, "lib/convection/model/template/resource/aws_route53_recordset.rb".freeze, "lib/convection/model/template/resource/aws_s3_bucket.rb".freeze, "lib/convection/model/template/resource/aws_s3_bucket_policy.rb".freeze, "lib/convection/model/template/resource/aws_sns_topic.rb".freeze, "lib/convection/model/template/resource/aws_sns_topic_policy.rb".freeze, "lib/convection/model/template/resource/aws_sqs_queue.rb".freeze, "lib/convection/model/template/resource/aws_sqs_queue_policy.rb".freeze, "lib/convection/version.rb".freeze, "test/convection/model/test_conditions.rb".freeze, "test/convection/model/test_elasticache.rb".freeze, "test/convection/model/test_loggroups.rb".freeze, "test/convection/model/test_rds.rb".freeze, "test/convection/model/test_template.rb".freeze, "test/convection/model/test_validation.rb".freeze, "test/test_helper.rb".freeze] s.homepage = "https://github.com/rapid7/convection".freeze s.licenses = ["MIT".freeze] s.rubygems_version = "3.5.10".freeze s.summary = "A fully generic, modular DSL for AWS CloudFormation".freeze s.test_files = ["test/convection/model/test_conditions.rb".freeze, "test/convection/model/test_elasticache.rb".freeze, "test/convection/model/test_loggroups.rb".freeze, "test/convection/model/test_rds.rb".freeze, "test/convection/model/test_template.rb".freeze, "test/convection/model/test_validation.rb".freeze, "test/test_helper.rb".freeze] s.specification_version = 4 s.add_runtime_dependency(%q.freeze, [">= 2".freeze]) s.add_runtime_dependency(%q.freeze, ["~> 0.13".freeze]) s.add_runtime_dependency(%q.freeze, ["~> 1.5".freeze]) s.add_runtime_dependency(%q.freeze, ["~> 0.19".freeze]) end