ufo 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +4 -6
- data/lib/ufo/cli.rb +1 -1
- data/lib/ufo/cli/help.rb +3 -8
- data/lib/ufo/task.rb +1 -2
- data/lib/ufo/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e3d8f1f8c2b21980b90a1b68dfb5d79387c24aa1
|
4
|
+
data.tar.gz: 0e9a2a98ed9672e1afcbab2b227cb1ddf451b879
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 293470c3e6910644e4ab203af44f7b46a6b424f34adefe3fda97e430382c88043ef99f6d521dafa61d3ed9cab530f15e3430e23bee32484154272d666998ea14
|
7
|
+
data.tar.gz: d0a9fa4d3043a1cf834658299fef0f1cb142194d819ace3cc89967bee9888882776e254e5e7c4a84af258b54f6bf5517c861d4731734eb62b12f967c7266b291
|
data/CHANGELOG.md
CHANGED
@@ -3,6 +3,10 @@
|
|
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
|
+
## [1.0.1]
|
7
|
+
|
8
|
+
* simplify `ufo task` command option
|
9
|
+
|
6
10
|
## [1.0.0]
|
7
11
|
|
8
12
|
* add `ufo task` command
|
data/README.md
CHANGED
@@ -253,16 +253,14 @@ Sometimes you do not want to run a long running `service` but a one time task. R
|
|
253
253
|
ufo task hi-migrate-prod
|
254
254
|
```
|
255
255
|
|
256
|
-
You will need to define a task definition for the migrate command also in `ufo/task_definitions.rb`. If you only need to override the Docker command and can re-use an existing task definition like `hi-web-prod`. You can use the `--
|
256
|
+
You will need to define a task definition for the migrate command also in `ufo/task_definitions.rb`. If you only need to override the Docker command and can re-use an existing task definition like `hi-web-prod`. You can use the `--command` option:
|
257
257
|
|
258
258
|
```
|
259
|
-
ufo task hi-web-prod --
|
260
|
-
ufo task hi-web-prod --
|
261
|
-
ufo task hi-web-prod --override-command "bin/with_env bundle exec rake db:migrate:redo VERSION=xxx"
|
262
|
-
ufo task hi-web-prod --override-command '["bin/with_env", "bundle", "exec", "rake", "db:migrate:redo", "VERSION=xxx"]''
|
259
|
+
ufo task hi-web-prod --command bin/migrate
|
260
|
+
ufo task hi-web-prod --command bin/with_env bundle exec rake db:migrate:redo VERSION=xxx
|
263
261
|
```
|
264
262
|
|
265
|
-
The `--
|
263
|
+
The `--command` option takes a string. If the string has brackets in it then it will be evaluated as an Array but the option must be a string.
|
266
264
|
|
267
265
|
## Scale
|
268
266
|
|
data/lib/ufo/cli.rb
CHANGED
@@ -112,7 +112,7 @@ module Ufo
|
|
112
112
|
desc "task [TASK_DEFINITION]", "runs a one time task"
|
113
113
|
long_desc Help.task
|
114
114
|
option :docker, type: :boolean, desc: "Enable docker build and push", default: true
|
115
|
-
option :command, desc: "Override the command used for the container"
|
115
|
+
option :command, type: :array, desc: "Override the command used for the container"
|
116
116
|
def task(task_definition)
|
117
117
|
build_docker(options)
|
118
118
|
register_task(task_definition, options)
|
data/lib/ufo/cli/help.rb
CHANGED
@@ -145,17 +145,12 @@ To run a one time task with ECS:
|
|
145
145
|
|
146
146
|
$ ufo task hi-migrate-prod
|
147
147
|
|
148
|
-
You can also override the command used by the Docker container in the task definitions via
|
148
|
+
You can also override the command used by the Docker container in the task definitions via command.
|
149
149
|
|
150
|
-
ufo task hi-web-prod --
|
150
|
+
ufo task hi-web-prod --command bin/migrate
|
151
151
|
|
152
|
-
ufo task hi-web-prod --
|
152
|
+
ufo task hi-web-prod --command bin/with_env bundle exec rake db:migrate:redo VERSION=xxx
|
153
153
|
|
154
|
-
ufo task hi-web-prod --override-command "bin/with_env bundle exec rake db:migrate:redo VERSION=xxx"
|
155
|
-
|
156
|
-
ufo task hi-web-prod --override-command '["bin/with_env","bundle","exec","rake","db:migrate:redo","VERSION=xxx"]''
|
157
|
-
|
158
|
-
The `--override-command` option takes a string. If the string has brackets in it then it will be evaluated as an Array but the optoin must be a string. Also there can be no spaces in the string.
|
159
154
|
EOL
|
160
155
|
end
|
161
156
|
|
data/lib/ufo/task.rb
CHANGED
@@ -24,8 +24,7 @@ module Ufo
|
|
24
24
|
private
|
25
25
|
# only using the overrides to override the container command
|
26
26
|
def overrides
|
27
|
-
command = @options[:command]
|
28
|
-
command = eval(command) if command.include?('[') # command is in Array form
|
27
|
+
command = @options[:command] # Thor parser ensure this is always an array
|
29
28
|
container_definition = get_original_container_definition
|
30
29
|
{
|
31
30
|
container_overrides: [
|
data/lib/ufo/version.rb
CHANGED