automan 2.4.1 → 2.5.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2bf6f3ba54e3992bdfb73a8151cc31ec35e2f00b
4
- data.tar.gz: fb0621083299dfbf474aa90e4ba46a520432edbb
3
+ metadata.gz: 2d5813974d3509c078564a120f5f33e1a64484d7
4
+ data.tar.gz: 7a5ced766015bfabf5270c0a3db39ddd93acf4ea
5
5
  SHA512:
6
- metadata.gz: 9dd3e1c72155f318cec831c661dbf07ff73cd464f2f617157e799e1ed0e4c697dee44787b9e9f6a166f95cf4f024f9c57f57acf2d6deff966bb38a1b7caa24b6
7
- data.tar.gz: 15b0e024fe045714e812d6fadf05d6c1caa773a44ab380ba14ff9a25deb91aee4860e0500b6cac8d1a5008ba6407586f89bee2691b09cdf07e9f7a4dea8568d7
6
+ metadata.gz: 186c2f6634592623985484550c491e214ca399cc24affdc905f13ca9e257f0d4e279204ed64fcb50d869abd39edce984c9718625f3067f14b70099e86e437569
7
+ data.tar.gz: 8e531dac8aea4a23a7d86a254f09c45fa4350d88880cc08c31d4f013c249b931e2ecaaaa0e715563022f6fa473066a02806f949828cae3aa36335edfab8a7d86
@@ -1,3 +1,3 @@
1
1
  module Automan
2
- VERSION = "2.4.1"
2
+ VERSION = "2.5.0"
3
3
  end
@@ -0,0 +1,26 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require '<%= @app_name %>/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "<%= @app_name %>"
8
+ spec.version = <%= @app_name.split('_').map {|x| x.capitalize}.join('') %>::VERSION
9
+ spec.authors = []
10
+ spec.email = []
11
+ spec.summary = %q{TODO: Write a short summary. Required.}
12
+ spec.description = %q{TODO: Write a longer description. Optional.}
13
+ spec.homepage = ""
14
+ spec.license = ""
15
+
16
+ spec.files = `git ls-files -z`.split("\x0")
17
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
+ spec.require_paths = ["lib"]
20
+
21
+ spec.add_development_dependency "bundler", "~> 1.6"
22
+ spec.add_development_dependency "rake"
23
+ spec.add_dependency "cloudformation-ruby-dsl"
24
+ spec.add_dependency "automan"
25
+ spec.add_dependency "json"
26
+ end
@@ -6,9 +6,4 @@
6
6
  # This .env file is in gitignore to help keep application
7
7
  # secrets from leaking out into source code control.
8
8
  #
9
- export VPC_ID=vpc-foo
10
- export SUBNET_ID=subnet-foo
11
- export REMOTE_ACCESS_SG=sg-foo
12
- export KEYPAIR_NAME=fookey
13
- export INSTANCE_TYPE=m3.medium
14
- export IMAGE_ID=ami-foo
9
+ export ENVIRONMENT=dev
@@ -1,2 +1,3 @@
1
1
  .env
2
- *.json
2
+ templates/*.json
3
+ templates/*.parameters
@@ -1,4 +1,3 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
- gem 'cloudformation-ruby-dsl'
4
- gem 'automan'
3
+ gemspec
@@ -0,0 +1,7 @@
1
+ {
2
+ 'Mappings' => {
3
+ 'EnvironmentMap' => {
4
+ dev: { }
5
+ }
6
+ }
7
+ }
@@ -0,0 +1,4 @@
1
+ <script>
2
+ cfn-init.exe -v -c config -s {{ ref('AWS::StackId') }} -r {{ locals[:resource] }} --region {{ ref('AWS::Region') }}
3
+ cfn-signal.exe -e %ERRORLEVEL% -r %ERRORLEVEL% "{{ locals[:wait_handle]}}"
4
+ </script>
@@ -0,0 +1,6 @@
1
+ require "<%= @app_name %>/version"
2
+ require "<%= @app_name %>/helpers"
3
+
4
+ module <%= @app_name.split('_').map {|x| x.capitalize}.join('') %>
5
+ # Your code goes here...
6
+ end
@@ -0,0 +1,48 @@
1
+ require 'json'
2
+ require 'cloudformation-ruby-dsl/cfntemplate'
3
+
4
+ module <%= @app_name.split('_').map {|x| x.capitalize}.join('') %>
5
+ module Helpers
6
+
7
+ def includes_path
8
+ cwd = File.expand_path(File.dirname(__FILE__))
9
+ File.join(cwd, '..', '..', 'includes')
10
+ end
11
+
12
+ def templates_path
13
+ cwd = File.expand_path(File.dirname(__FILE__))
14
+ File.join(cwd, '..', '..', 'templates')
15
+ end
16
+
17
+ def include_file(filename, locals={})
18
+ cwd = File.expand_path(File.dirname(__FILE__))
19
+ path = File.join( includes_path, filename )
20
+ interpolate(file(path), locals)
21
+ end
22
+
23
+ def add_environment_map
24
+ environment_map = 'environment_map.rb'
25
+ mapping 'EnvironmentMap', File.join(includes_path, environment_map)
26
+ end
27
+
28
+ def find_in_env(name)
29
+ find_in_map('EnvironmentMap', ref('Environment'), name)
30
+ end
31
+
32
+ def write_template(name, template)
33
+ path = File.join(templates_path, "#{name}.json")
34
+ $stderr.puts "Writing template to #{File.realdirpath(path)}"
35
+ File.open(path, 'w') do |file|
36
+ file.puts(JSON.pretty_generate(template))
37
+ end
38
+ end
39
+
40
+ def write_parameter_mappings(name, mappings)
41
+ path = File.join(templates_path, "#{name}.parameters")
42
+ $stderr.puts "Writing parameters to #{File.realdirpath(path)}"
43
+ File.open(path, 'w') do |file|
44
+ file.puts(mappings.join(' '))
45
+ end
46
+ end
47
+ end
48
+ end
@@ -0,0 +1,3 @@
1
+ module <%= @app_name.split('_').map {|x| x.capitalize}.join('') %>
2
+ VERSION = "0.0.1"
3
+ end
File without changes
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: automan
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.4.1
4
+ version: 2.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Chalfant
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-11-23 00:00:00.000000000 Z
12
+ date: 2016-05-31 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -236,6 +236,7 @@ files:
236
236
  - spec/mixins/aws_caller_spec.rb
237
237
  - spec/mixins/utils_spec.rb
238
238
  - spec/rds/snapshot_spec.rb
239
+ - templates/stacker/%app_name%.gemspec.tt
239
240
  - templates/stacker/.env.example
240
241
  - templates/stacker/.gitignore
241
242
  - templates/stacker/.ruby-gemset.tt
@@ -243,6 +244,12 @@ files:
243
244
  - templates/stacker/Gemfile
244
245
  - templates/stacker/bin/%app_name%.tt
245
246
  - templates/stacker/bin/launch_%app_name%.sh.tt
247
+ - templates/stacker/includes/environment_map.rb
248
+ - templates/stacker/includes/userdata
249
+ - templates/stacker/lib/%app_name%.rb.tt
250
+ - templates/stacker/lib/%app_name%/helpers.rb.tt
251
+ - templates/stacker/lib/%app_name%/version.rb.tt
252
+ - templates/stacker/templates/.keep
246
253
  homepage: ''
247
254
  licenses: []
248
255
  metadata: {}