ufo 3.5.5 → 3.5.6

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: 2f3cffb0c5f3bb15b7f6a236fab1821ec671a0a58f316d05546b0cc2343df31f
4
- data.tar.gz: 0cbe0fe89dad15e6501ec136ecf5eb762861b6827939d520616d16d871a7bbaa
3
+ metadata.gz: 5bd34e1498279908085f391c5496c1aa8081447be4e00df457aa44ad12ad0b3a
4
+ data.tar.gz: b607ce6631b39b7db8a92f5457bace98ad8efed5df552c3aa7bbf496b351d1a5
5
5
  SHA512:
6
- metadata.gz: 19ccd9c0ed6f4cb8b2277e5895e3a92effdf47b40ea6424b1f64cc158f73182c402feebdc3fae45234b10b1b92f3b039b85b76ce5047fb61a554b42016a16f73
7
- data.tar.gz: 633bc8eba241b343ee35e7927fd2d47bd609b5ca370096de8ab39581cd1608bac757e111a7b1cd02fc44b3b03b818a5848003523e84de57a6b32aab3980424cd
6
+ metadata.gz: 654a0b5f161aaf4e31c13f3737d3b4aeb1592935235149f222f7019862f6b7d72fb412a8fc5eb8bfd692b06619a0db48b2c647fc4565b986e95f5e9f7818cb4e
7
+ data.tar.gz: 5d166cd32cc455b49ebc919415d945efde71198b00028509120c95bbe49d2eb79fb7e271148db2ddc9dcc99b9c194f45727eb10fdd12a26637f6ab514fdd937f
data/.gitignore CHANGED
@@ -9,7 +9,6 @@ doc/
9
9
  InstalledFiles
10
10
  lib/bundler/man
11
11
  pkg
12
- pkg
13
12
  rdoc
14
13
  spec/fixtures/hi
15
14
  spec/fixtures/home
@@ -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.6]
7
+ - upgrade ufo with cli-template, link cli help to website reference help
8
+
6
9
  ## [3.5.5]
7
10
  - Merge pull request #39 from hnatt/fix-docs
8
11
  - Merge pull request #41 from tongueroo/params-template-scope
data/Rakefile CHANGED
@@ -1,7 +1,7 @@
1
1
  require "bundler/gem_tasks"
2
2
  require "rspec/core/rake_task"
3
3
 
4
- task :default => :spec
4
+ task default: :spec
5
5
 
6
6
  RSpec::Core::RakeTask.new
7
7
 
@@ -4,12 +4,12 @@ title: FAQ
4
4
 
5
5
  **Q: Is AWS ECS Fargate supported?**
6
6
 
7
- Yes, Fargate is supported. To use ufo with Fargate, you will need to adjust the template in `.ufo/templates` to use a structure support by Fargate. There are 2 key items to adjust:
7
+ Yes, Fargate is supported. To use ufo with Fargate, you will need to adjust the template in `.ufo/templates` to a structure supported by Fargate. There are 2 key items to adjust:
8
8
 
9
- 1. The task definition json. Notably, it has the `requiresCompatibilities`, `networkMode`, and `executionRoleArn` attributes. It also moves the `cpu` and `memory` outside of the `containerDefinitions` attributes to the root as top-level attributes. For details on how to adjust the task definition refer to [Task Definitions]({% link _docs/tutorial-ufo-tasks-build.md %}).
10
- 2. The params that get sent to the `create_service` or `run_task` api methods. For details on how to adjust the params refer to [Params]({% link _docs/params.md %})
9
+ 1. The task definition JSON. Notably, the JSON structure has the `requiresCompatibilities`, `networkMode`, and `executionRoleArn` attributes. The `cpu` and `memory` attributes also move outside of the `containerDefinitions` level to the top-level attributes. For details on how to adjust the task definition refer to [Task Definitions]({% link _docs/tutorial-ufo-tasks-build.md %}).
10
+ 2. The params that get sent to the `create_service` or `run_task` API methods. For details on how to adjust the params refer to [Params]({% link _docs/params.md %})
11
11
 
12
- If it's a brand new project, you can use `ufo init` with the `--launch-type fargate` option and it will generate a starter JSON file that has the right Fargate structure. More info is available at [ufo init reference](/reference/ufo-init/#fargate-support).
12
+ If it's a brand new project, you can use `ufo init` with the `--launch-type fargate` option and it will generate a starter task definition JSON file that has the right Fargate structure. More info is available at [ufo init reference](/reference/ufo-init/#fargate-support).
13
13
 
14
14
  **Q: Can I tell ufo to use specific docker build options?**
15
15
 
@@ -7,6 +7,7 @@ Ufo creates a `.ufo` folder within your project which contains the required file
7
7
  ```sh
8
8
  .ufo
9
9
  ├── output
10
+ ├── params.yml
10
11
  ├── settings.yml
11
12
  ├── task_definitions.rb
12
13
  ├── templates
@@ -22,6 +23,7 @@ The table below covers the purpose of each folder and file.
22
23
  File / Directory | Description
23
24
  ------------- | -------------
24
25
  <code>output/</code> | The folder where the generated task definitions are written to. The way the task definitions are generated is covered in [ufo tasks build]({% link _docs/tutorial-ufo-tasks-build.md %}).
26
+ <code>params</code> | This is where you can adjust the params that get send to the aws-sdk api calls. More info at [Params]({% link _docs/params.md %}).
25
27
  <code>settings.yml</code> | Ufo's settings file, where you adjust the default [settings]({% link _docs/settings.md %}).
26
28
  <code>task_definitions.rb</code> | This is where you define the task definitions and specify the variables to be used by the ERB templates.
27
29
  <code>templates/</code> | The ERB templates with the task definition json code. The templates are covered in more detail in [ufo tasks build]({% link _docs/tutorial-ufo-tasks-build.md %}).
@@ -4,14 +4,14 @@ title: Task Definitions
4
4
 
5
5
  ## Build the ECS Task Definitions
6
6
 
7
- Now that we have a docker image pushed to a registry we can use that image for ECS. Ufo takes that image and adds it to an ECS task definition. This is where ufo is super powerful. Ufo gives you the power to build and control your ECS task definition easily.
7
+ Now that we have a docker image pushed to a registry we can use that image for ECS. Ufo takes that image and adds it to an ECS task definition. This is where ufo is powerful. Ufo gives you the power to build and control your ECS task definition directly.
8
8
 
9
9
  Let's take a look at the 2 files that are used by ufo to build the ECS task definition. These files were generated by the `ufo init` command at the beginning.
10
10
 
11
11
  1. `.ufo/templates/main.json.erb`
12
12
  2. `.ufo/task_definitions.rb`
13
13
 
14
- Ufo task definitions are written as an ERB template that makes it every easily accessible and configurable to your requirements. Here is is an example of an ERB template `.ufo/templates/main.json.erb` that shows how easy it is to modfied the task definition you want to be uploaded by ufo:
14
+ Ufo task definitions are written as an ERB template that makes it directly accessible. You can configure to your requirements. Here is an example of an ERB template `.ufo/templates/main.json.erb` that shows how to modify the task definition you want ufo to upload:
15
15
 
16
16
  **.ufo/templates/main.json.erb**:
17
17
 
@@ -61,7 +61,7 @@ end
61
61
 
62
62
  ## Shared Variables
63
63
 
64
- Ufo has a concept of shared variables, covered in [Shared Variables]({% link _docs/variables.md %}). The shared variables are set in the `variables` folder and essentially allow you to use a set of shared variables through your templates:
64
+ Ufo has a concept of shared variables, covered in [Shared Variables]({% link _docs/variables.md %}). The shared variables are set in the `variables` folder and essentially allow you to use a set of shared variables throughout your templates:
65
65
 
66
66
  **.ufo/variables/base.rb**:
67
67
 
@@ -83,7 +83,7 @@ Ufo has a concept of shared variables, covered in [Shared Variables]({% link _do
83
83
 
84
84
  Ufo combines the `main.json.erb` template, `task_definitions.rb` definitions, and variables in the `.ufo/variables` folder. It then generates the raw AWS formatted task definition in the `output` folder.
85
85
 
86
- If you need to modify the task definition template to suite your own needs it is super simple, just edit `main.json.erb`. You do not have to dive deep into internal code somewhere. It is all there for you to fully control.
86
+ If you need to modify the task definition template to suit your own needs it is simple, just edit `main.json.erb`. You do not have to dive deep into internal code somewhere. It is all there for you to control fully.
87
87
 
88
88
  The `task_definition.rb` has access to some useful helper methods detailed in [Helpers]({% link _docs/helpers.md %}).
89
89
 
@@ -156,7 +156,7 @@ You have built the ECS task definitions locally on your machine. To register the
156
156
  ufo tasks register
157
157
  ```
158
158
 
159
- You should see something similiar to this:
159
+ You should see something similar to this:
160
160
 
161
161
  ```sh
162
162
  hi-clock task definition registered.
@@ -167,4 +167,3 @@ hi-worker task definition registered.
167
167
  <a id="prev" class="btn btn-basic" href="{% link _docs/tutorial-ufo-docker-build.md %}">Back</a>
168
168
  <a id="next" class="btn btn-primary" href="{% link _docs/tutorial-ufo-ship.md %}">Next Step</a>
169
169
  <p class="keyboard-tip">Pro tip: Use the <- and -> arrow keys to move back and forward.</p>
170
-
@@ -42,6 +42,41 @@ module Ufo
42
42
 
43
43
  super
44
44
  end
45
+
46
+ # Override command_help to include the description at the top of the
47
+ # long_description.
48
+ def command_help(shell, command_name)
49
+ meth = normalize_command_name(command_name)
50
+ command = all_commands[meth]
51
+ alter_command_description(command)
52
+ super
53
+ end
54
+
55
+ def alter_command_description(command)
56
+ return unless command
57
+
58
+ # Add description to beginning of long_description
59
+ long_desc = if command.long_description
60
+ "#{command.description}\n\n#{command.long_description}"
61
+ else
62
+ command.description
63
+ end
64
+
65
+ # add reference url to end of the long_description
66
+ unless website.empty?
67
+ full_command = [command.ancestor_name, command.name].compact.join('-')
68
+ url = "#{website}/reference/ufo-#{full_command}"
69
+ long_desc += "\n\nHelp also available at: #{url}"
70
+ end
71
+
72
+ command.long_description = long_desc
73
+ end
74
+ private :alter_command_description
75
+
76
+ # meant to be overriden
77
+ def website
78
+ "http://ufoships.com"
79
+ end
45
80
  end
46
81
  end
47
82
  end
@@ -1,3 +1,3 @@
1
- To use, add the following to your ~/.bashrc or ~/.profile
1
+ To use, add the following to your `~/.bashrc` or `~/.profile`
2
2
 
3
- eval $(ufo completion_script)
3
+ eval $(ufo completion_script)
@@ -1,3 +1,3 @@
1
1
  module Ufo
2
- VERSION = "3.5.5"
2
+ VERSION = "3.5.6"
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.5.5
4
+ version: 3.5.6
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-05-24 00:00:00.000000000 Z
11
+ date: 2018-06-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-cloudwatchlogs
@@ -421,7 +421,6 @@ files:
421
421
  - lib/ufo/help/docker/clean.md
422
422
  - lib/ufo/help/docker/name.md
423
423
  - lib/ufo/help/docker/push.md
424
- - lib/ufo/help/hello.md
425
424
  - lib/ufo/help/init.md
426
425
  - lib/ufo/help/scale.md
427
426
  - lib/ufo/help/ship.md
@@ -484,7 +483,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
484
483
  version: '0'
485
484
  requirements: []
486
485
  rubyforge_project:
487
- rubygems_version: 2.7.3
486
+ rubygems_version: 2.7.6
488
487
  signing_key:
489
488
  specification_version: 4
490
489
  summary: Build Docker Containers and Ship Them to AWS ECS
@@ -1,5 +0,0 @@
1
- ## Examples
2
-
3
- ufo hello
4
- ufo hello NAME
5
- ufo hello NAME --from me