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 +4 -4
- data/lib/automan/version.rb +1 -1
- data/templates/stacker/%app_name%.gemspec.tt +26 -0
- data/templates/stacker/.env.example +1 -6
- data/templates/stacker/.gitignore +2 -1
- data/templates/stacker/Gemfile +1 -2
- data/templates/stacker/includes/environment_map.rb +7 -0
- data/templates/stacker/includes/userdata +4 -0
- data/templates/stacker/lib/%app_name%.rb.tt +6 -0
- data/templates/stacker/lib/%app_name%/helpers.rb.tt +48 -0
- data/templates/stacker/lib/%app_name%/version.rb.tt +3 -0
- data/templates/stacker/templates/.keep +0 -0
- metadata +9 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2d5813974d3509c078564a120f5f33e1a64484d7
|
4
|
+
data.tar.gz: 7a5ced766015bfabf5270c0a3db39ddd93acf4ea
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 186c2f6634592623985484550c491e214ca399cc24affdc905f13ca9e257f0d4e279204ed64fcb50d869abd39edce984c9718625f3067f14b70099e86e437569
|
7
|
+
data.tar.gz: 8e531dac8aea4a23a7d86a254f09c45fa4350d88880cc08c31d4f013c249b931e2ecaaaa0e715563022f6fa473066a02806f949828cae3aa36335edfab8a7d86
|
data/lib/automan/version.rb
CHANGED
@@ -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
|
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
|
data/templates/stacker/Gemfile
CHANGED
@@ -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
|
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
|
+
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:
|
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: {}
|