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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 53201d5487d8074486f75afc6e14e3078240714b721e84f32405c41a8fe64b16
4
- data.tar.gz: 546cfdd56445e30f6c2791970fa9ad04921075895ba1bee7601f7570d2b06873
3
+ metadata.gz: 8603e4de3fb2be69fe4067d948377452ea08cc91f8b6f543dbc8d32b48b38bd9
4
+ data.tar.gz: bb1e8bc5d349091d40f4af2f24336444dd1169a8019998020e85435ed924ba30
5
5
  SHA512:
6
- metadata.gz: 030546c273054b55929bf1d0f22ff4602a122985dd90757ee45dabc1cf2dbaca605236231c9fd195172121b49364d38efd44a730be65e00379341b718ddda24d
7
- data.tar.gz: 4a072047fa10c03bafae95f8f8eb9e3d73197c924615fbe77058906e9480b7e60cc1d492ed645c9eb132e78a2812491f0cfbc822d744c5b29ba32dec6acf512f
6
+ metadata.gz: b9a6a95df195a1d9349220b9dbbd0160613b836d2df63cead1e4987357f07a11eb0a2befe54482828686d13541377045d5d20d75fc584e6ff79aa6fa67bd8656
7
+ data.tar.gz: cf070e26340633ee2490f1fe9cb6dc6bca76988736461454e7ce77340f257814ea6390b546f9e65773ab256dd3aa59b96057befd774bb38cc5a41f0069179c9f
@@ -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
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ufo (3.4.3)
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.80.0)
26
- aws-sdk-cloudwatchlogs (1.2.0)
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.19.0)
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.29.0)
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)
@@ -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 a good example of a one off task. Here is an example of how you would run a one time task.
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
- vars = template_scope.assign_instance_variables
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
@@ -17,8 +17,8 @@ module Ufo
17
17
  def data
18
18
  upgrade_message!
19
19
 
20
- vars = Ufo::TemplateScope.new(helper).assign_instance_variables
21
- result = RenderMePretty.result(@params_path, vars)
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
@@ -1,8 +1,11 @@
1
1
  module Ufo
2
2
  class TemplateScope
3
3
  attr_reader :helper
4
- def initialize(helper=nil)
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
@@ -1,3 +1,3 @@
1
1
  module Ufo
2
- VERSION = "3.4.4"
2
+ VERSION = "3.5.0"
3
3
  end
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.4
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-21 00:00:00.000000000 Z
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