lono 0.2.3 → 0.2.4

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -79,6 +79,8 @@ Within a user_data script you can call another helper method called ref.
79
79
 
80
80
  * ref - can be use to reference other parameter or resource value within the cloud formation template. An [example](lib/starter_project/templates/user_data/db.sh.erb) is in the [starter_project](lib/starter_project).
81
81
 
82
+ * find_in_map - can be use to call the find_in_map function within the cloud formation template. An [example](lib/starter_project/templates/user_data/db.sh.erb) is in the [starter_project](lib/starter_project).
83
+
82
84
  ## Breaking up config/lono.rb
83
85
 
84
86
  If you have a lot of templates, the config/lono.rb file can get unwieldy long. You can break up the lono.rb file and put template defintions in the config/lono directory. Any file in this directory will be automatically loaded. An [example](lib/starter_project/config/lono/api.rb) is in the starter project.
@@ -50,8 +50,8 @@ module Lono
50
50
  %Q|{"Ref"=>"#{name}"}|
51
51
  end
52
52
 
53
- # http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-ref.html
54
- def findinmap(*args)
53
+ # http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-findinmap.html
54
+ def find_in_map(*args)
55
55
  args.map! {|x| x =~ /=>/ ? x : x.inspect }
56
56
  %Q|{"Fn::FindInMap" => [ #{args.join(',')} ]}|
57
57
  end
@@ -1,3 +1,3 @@
1
1
  module Lono
2
- VERSION = "0.2.3"
2
+ VERSION = "0.2.4"
3
3
  end
@@ -1,8 +1,8 @@
1
1
  #!/bin/bash -lexv
2
2
  exec > >(tee /var/log/user-data.log|logger -t user-data -s 2>/dev/console) 2>&1
3
3
 
4
- FINDINMAP_TEST=<%= findinmap("MapName", "TopLevelKey", "SecondLevelKey") %>
5
- HOSTNAME_PREFIX=<%= findinmap("EnvironmentMapping", "HostnamePrefix", ref("Environment")) %>
4
+ FINDINMAP_TEST=<%= find_in_map("MapName", "TopLevelKey", "SecondLevelKey") %>
5
+ HOSTNAME_PREFIX=<%= find_in_map("EnvironmentMapping", "HostnamePrefix", ref("Environment")) %>
6
6
 
7
7
  echo <%= ref("AWS::StackName") %> > /tmp/stack_name
8
8
  # Helper function
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lono
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.2.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: