-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
stubbing cloudformation template generator
- Loading branch information
1 parent
5242225
commit 83f828f
Showing
8 changed files
with
161 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
lib/formatron/configuration/formatronfile/cloud_formation.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
class Formatron | ||
class Configuration | ||
class Formatronfile | ||
# Generates the CloudFormation templates | ||
module CloudFormation | ||
def self.bootstrap_template | ||
end | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,20 @@ | ||
class Formatron | ||
# manage the CloudFormation template stored on S3 | ||
module S3CloudFormationTemplate | ||
def self.deploy(_aws, _formatronfile, _target) | ||
def self.deploy(aws, configuration, target) | ||
aws.upload( | ||
configuration.kms_key(target), | ||
configuration.bucket(target), | ||
S3Path.path(configuration, target, 'cloud_formation_template.json'), | ||
configuration.cloud_formation_template(target) | ||
) | ||
end | ||
|
||
def self.destroy(_aws, _formatronfile, _target) | ||
def self.destroy(aws, configuration, target) | ||
aws.delete( | ||
configuration.bucket(target), | ||
S3Path.path(configuration, target, 'cloud_formation_template.json') | ||
) | ||
end | ||
end | ||
end |
10 changes: 10 additions & 0 deletions
10
spec/formatron/configuration/formatronfile/cloud_formation_spec.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
require 'spec_helper' | ||
require 'formatron/configuration/formatronfile/cloud_formation' | ||
|
||
describe Formatron::Configuration::Formatronfile::CloudFormation do | ||
describe '::bootstrap_template' do | ||
skip 'should return the CloudFormation template for ' \ | ||
'a bootstrap configuration' do | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters