lono 0.5.1 → 0.5.2

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: 5f22815f0d37b64630426f8d41b5ce9dda35d769
4
- data.tar.gz: eda8b669d1bfc0f329aca5023675a1ee8b34749e
3
+ metadata.gz: 95168f2761fc2cc741be8c7bd629397cda724e63
4
+ data.tar.gz: 4c1deb7dff498115fdaa348e139e9cab1368c9aa
5
5
  SHA512:
6
- metadata.gz: be44035d6b9839f41856712b65198de7470aef27917399e86638e27610f1af6f72afc3de1280f0e0b828920f97560582ad34ebf52f502fb85712d41d93ac8122
7
- data.tar.gz: 38a7df0f01dade04897f3b717f34b8e29bab0e51e55814598445b6830781b2daa9f212eb44595973c4af601eaa5dd1f73637d068033d84b4937b509b279ede55
6
+ metadata.gz: f374bb0ef8c7bad94927613cd0497a7029ec607273132aeaa6a4a8829ef8a888354fba66cb9135a3dea133089de647c9f86135deec7f2cc463f4b6e085d00bdd
7
+ data.tar.gz: c1d292f6a35608743516b947ddd0763d98f07ed3554b91ab2b602bb9c9ec7609515efab2ced0c08c1a0a14d9ba55c1125d8939a631e3d6b26a03cb07c729978a
@@ -3,6 +3,9 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  This project *tries* to adhere to [Semantic Versioning](http://semver.org/), even before v1.0.
5
5
 
6
+ ## [0.5.2]
7
+ - Add helper encode_base64 method in case you want to base64 encode a string in the ERB template and you are using lono outside of the context of CloudFormation where you will not have access to the FN::Base64 Function.
8
+
6
9
  ## [0.5.1]
7
10
  - move ensure_dir up above validation so folder gets created even with bad json. fixes #14
8
11
 
@@ -1,5 +1,6 @@
1
1
  require 'erb'
2
2
  require 'json'
3
+ require "base64"
3
4
 
4
5
  module Lono
5
6
  class Template
@@ -201,5 +202,12 @@ module Lono
201
202
  def evaluate(line)
202
203
  recompose(decompose(line))
203
204
  end
205
+
206
+ # For simple just parameters files that can also be generated with lono, the CFN
207
+ # Fn::Base64 function is not available and as lono is not being used in the context
208
+ # of CloudFormation. So this can be used in it's place.
209
+ def encode_base64(text)
210
+ Base64.strict_encode64(text).strip
211
+ end
204
212
  end
205
213
  end
@@ -1,3 +1,3 @@
1
1
  module Lono
2
- VERSION = "0.5.1"
2
+ VERSION = "0.5.2"
3
3
  end
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.5.1
4
+ version: 0.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tung Nguyen
@@ -238,4 +238,3 @@ test_files:
238
238
  - spec/fixtures/cfn.json
239
239
  - spec/lib/lono_spec.rb
240
240
  - spec/spec_helper.rb
241
- has_rdoc: