ufo 3.4.4 → 3.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/Gemfile.lock +5 -5
- data/docs/_docs/single-task.md +3 -1
- data/lib/ufo/dsl/task_definition.rb +2 -3
- data/lib/ufo/param.rb +2 -2
- data/lib/ufo/template_scope.rb +5 -2
- data/lib/ufo/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8603e4de3fb2be69fe4067d948377452ea08cc91f8b6f543dbc8d32b48b38bd9
|
4
|
+
data.tar.gz: bb1e8bc5d349091d40f4af2f24336444dd1169a8019998020e85435ed924ba30
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b9a6a95df195a1d9349220b9dbbd0160613b836d2df63cead1e4987357f07a11eb0a2befe54482828686d13541377045d5d20d75fc584e6ff79aa6fa67bd8656
|
7
|
+
data.tar.gz: cf070e26340633ee2490f1fe9cb6dc6bca76988736461454e7ce77340f257814ea6390b546f9e65773ab256dd3aa59b96057befd774bb38cc5a41f0069179c9f
|
data/CHANGELOG.md
CHANGED
@@ -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
|
+
## [3.5.0]
|
7
|
+
- allow usage of template_definition_method in env variables files
|
8
|
+
|
6
9
|
## [3.4.4]
|
7
10
|
- Merge pull request #34 from tongueroo/show-aws-cli-commands
|
8
11
|
- Show equivalent cli commands when possible
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
ufo (3.4.
|
4
|
+
ufo (3.4.4)
|
5
5
|
aws-sdk-cloudwatchlogs
|
6
6
|
aws-sdk-ec2
|
7
7
|
aws-sdk-ecr
|
@@ -22,15 +22,15 @@ GEM
|
|
22
22
|
i18n (>= 0.7, < 2)
|
23
23
|
minitest (~> 5.1)
|
24
24
|
tzinfo (~> 1.1)
|
25
|
-
aws-partitions (1.
|
26
|
-
aws-sdk-cloudwatchlogs (1.
|
25
|
+
aws-partitions (1.81.0)
|
26
|
+
aws-sdk-cloudwatchlogs (1.3.0)
|
27
27
|
aws-sdk-core (~> 3)
|
28
28
|
aws-sigv4 (~> 1.0)
|
29
|
-
aws-sdk-core (3.
|
29
|
+
aws-sdk-core (3.20.1)
|
30
30
|
aws-partitions (~> 1.0)
|
31
31
|
aws-sigv4 (~> 1.0)
|
32
32
|
jmespath (~> 1.0)
|
33
|
-
aws-sdk-ec2 (1.
|
33
|
+
aws-sdk-ec2 (1.30.0)
|
34
34
|
aws-sdk-core (~> 3)
|
35
35
|
aws-sigv4 (~> 1.0)
|
36
36
|
aws-sdk-ecr (1.3.0)
|
data/docs/_docs/single-task.md
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
title: Run Single Task
|
3
3
|
---
|
4
4
|
|
5
|
-
Sometimes you do not want to run a long running `service` but a one time task. Running Rails migrations are
|
5
|
+
Sometimes you do not want to run a long running `service` but a one time task. Running Rails migrations are an example of a one off task. Here is an example of how you would run a one time task.
|
6
6
|
|
7
7
|
```
|
8
8
|
ufo task hi-web --command bundle exec rake db:migrate
|
@@ -24,6 +24,8 @@ You can describe that task for more details:
|
|
24
24
|
aws ecs describe-tasks --tasks arn:aws:ecs:us-west-2:994926937775:task/a0e4229d-3d39-4b26-9151-6ab6869b84d4
|
25
25
|
```
|
26
26
|
|
27
|
+
You can check out the [ufo task](http://ufoships.com/reference/ufo-task/) reference for more details.
|
28
|
+
|
27
29
|
<a id="prev" class="btn btn-basic" href="{% link _docs/run-in-pieces.md %}">Back</a>
|
28
30
|
<a id="next" class="btn btn-primary" href="{% link _docs/migrations.md %}">Next Step</a>
|
29
31
|
<p class="keyboard-tip">Pro tip: Use the <- and -> arrow keys to move back and forward.</p>
|
@@ -18,13 +18,12 @@ module Ufo
|
|
18
18
|
end
|
19
19
|
|
20
20
|
def template_scope
|
21
|
-
@template_scope ||= Ufo::TemplateScope.new(helper)
|
21
|
+
@template_scope ||= Ufo::TemplateScope.new(helper, @task_definition_name)
|
22
22
|
end
|
23
23
|
|
24
24
|
def build
|
25
25
|
instance_eval(&@block)
|
26
|
-
|
27
|
-
RenderMePretty.result(source_path, vars)
|
26
|
+
RenderMePretty.result(source_path, context: template_scope)
|
28
27
|
end
|
29
28
|
|
30
29
|
# at this point instance_eval has been called and source has possibly been called
|
data/lib/ufo/param.rb
CHANGED
@@ -17,8 +17,8 @@ module Ufo
|
|
17
17
|
def data
|
18
18
|
upgrade_message!
|
19
19
|
|
20
|
-
|
21
|
-
result = RenderMePretty.result(@params_path,
|
20
|
+
context = Ufo::TemplateScope.new(helper, nil)
|
21
|
+
result = RenderMePretty.result(@params_path, context: context)
|
22
22
|
YAML.load(result)
|
23
23
|
end
|
24
24
|
memoize :data
|
data/lib/ufo/template_scope.rb
CHANGED
@@ -1,8 +1,11 @@
|
|
1
1
|
module Ufo
|
2
2
|
class TemplateScope
|
3
3
|
attr_reader :helper
|
4
|
-
|
4
|
+
attr_reader :task_definition_name
|
5
|
+
def initialize(helper=nil, task_definition_name=nil)
|
5
6
|
@helper = helper
|
7
|
+
@task_definition_name = task_definition_name # only available from task_definition
|
8
|
+
# not available from params
|
6
9
|
load_variables_file("base")
|
7
10
|
load_variables_file(Ufo.env)
|
8
11
|
end
|
@@ -29,7 +32,7 @@ module Ufo
|
|
29
32
|
# Wasnt able to make local variables available.
|
30
33
|
def load_variables_file(filename)
|
31
34
|
path = "#{Ufo.root}/.ufo/variables/#{filename}.rb"
|
32
|
-
instance_eval(IO.read(path)) if File.exist?(path)
|
35
|
+
instance_eval(IO.read(path), path) if File.exist?(path)
|
33
36
|
end
|
34
37
|
|
35
38
|
def assign_instance_variables
|
data/lib/ufo/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ufo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tung Nguyen
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-04-
|
11
|
+
date: 2018-04-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk-cloudwatchlogs
|