rumrunner 0.2.6 → 0.3.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: 1167b81015a97308cc3d5e9be344d455ffbc0d9d8966a9c392a2385d91930293
4
- data.tar.gz: a4cc455763338c7f4a45ab80291f9f496c9deb44e76af5998a43d3272a0b1200
3
+ metadata.gz: 8595b9e4d67acb2af46be0def2d1b5ed7421e2457020e7c52f8aeb374aa3e417
4
+ data.tar.gz: a0898e3d08df28f43dafbda1438a6824d5580515ddf023f29c9eebf8d330ffb8
5
5
  SHA512:
6
- metadata.gz: 4488ca01b9c39cea03ceb77db44997acc91554262813cd96c9edc952165ddf3b32a91cc8fd9fee526edc81c94b5919c6e3213707d55fc3667a20e17d2a2cc23e
7
- data.tar.gz: 1984f5ccd2768f7df0d75e18ac39d374b687920e2a434362c2ef32e2bbdb198ef68e4fbc0fb54acb264588ad7ca3e123b6039bb5b2eb5f943864bc180f7347fd
6
+ metadata.gz: 27039a4980ad7c03f7ebad864abc0e900b35f4cae41ee786a15e58dc7cdb3a6e32ee3630084d5645af5675bc6c70ee8418112fb7d24121843ea85757f06c0587
7
+ data.tar.gz: 7788edd704c871de3f0902a2ecc32433bb01148b1ebf2df2bfcd9e41156dce1b986b7e7baad48e6f4a3084c967f01dd8dce7a1c55e733e0c7d43c96c6ee37718
data/README.md CHANGED
@@ -77,19 +77,30 @@ Run `rum --tasks` to view the installed tasks:
77
77
 
78
78
  ```bash
79
79
  rum build # Build `build` stage
80
- rum build:clean # Remove any temporary images and products from `build` stage
81
- rum build:shell[shell] # Shell into `build` stage
82
80
  rum clean # Remove any temporary images and products
81
+ rum clean:build # Remove any temporary images and products through `build` stage
82
+ rum clean:deploy # Remove any temporary images and products through `deploy` stage
83
+ rum clean:test # Remove any temporary images and products through `test` stage
83
84
  rum clobber # Remove any generated files
84
85
  rum deploy # Build `deploy` stage
85
- rum deploy:clean # Remove any temporary images and products from `deploy` stage
86
- rum deploy:shell[shell] # Shell into `deploy` stage
86
+ rum shell:build[shell] # Shell into `build` stage
87
+ rum shell:deploy[shell] # Shell into `deploy` stage
88
+ rum shell:test[shell] # Shell into `test` stage
87
89
  rum test # Build `test` stage
88
- rum test:clean # Remove any temporary images and products from `test` stage
89
- rum test:shell[shell] # Shell into `test` stage
90
90
  ```
91
91
 
92
- ## Naming Convention
92
+ ## Task Naming Convention
93
+
94
+ As of v0.3, rum runner uses a "verb-first" naming convention (eg. `clean:stage`) for tasks.
95
+
96
+ To revert to the previous convention of "stage-first" (eg. `stage:clean`) use the environmental variable `RUM_TASK_NAMES`:
97
+
98
+ ```bash
99
+ export RUM_TASK_NAMES=STAGE_FIRST # => rum stage:clean
100
+ export RUM_TASK_NAMES=VERB_FIRST # => rum clean:stage (default)
101
+ ```
102
+
103
+ ## Image Naming Convention
93
104
 
94
105
  The name of the images are taken from the first argument to the main block and appended with the name of the stage.
95
106
 
@@ -144,7 +144,7 @@ module Rum
144
144
  #
145
145
  def shell(*args, &block)
146
146
  target = Rake.application.resolve_args(args).first
147
- name = :"#{target}:shell"
147
+ name = task_name shell: target
148
148
  image = "#{@image}-#{target}"
149
149
  iidfile = File.join(root, image)
150
150
 
@@ -234,7 +234,7 @@ module Rum
234
234
  # Install clean tasks for cleaning up stage image and iidfile
235
235
  def stage_clean(name, iidfile, deps)
236
236
  # Clean stage image
237
- desc "Remove any temporary images and products from `#{name}` stage"
237
+ desc "Remove any temporary images and products through `#{name}` stage"
238
238
  task task_name(clean: name) do
239
239
  if File.exist? iidfile
240
240
  sh "docker", "image", "rm", "--force", File.read(iidfile)
@@ -265,7 +265,7 @@ module Rum
265
265
  # Install clobber tasks for cleaning up generated files
266
266
  def artifact_clobber(name, path)
267
267
  desc "Remove any generated files"
268
- task :clobber do
268
+ task :clobber => :clean do
269
269
  rm name if File.exist?(name)
270
270
  rm_r path if Dir.exist?(path) && path != "."
271
271
  end
@@ -274,13 +274,13 @@ module Rum
274
274
  ##
275
275
  # Get name of support task
276
276
  def task_name(verb_stage)
277
- case ENV["RUM_TASK_NAME"]&.upcase
277
+ case ENV["RUM_TASK_NAMES"]&.upcase
278
278
  when "STAGE_FIRST"
279
279
  verb_stage.first.reverse
280
280
  when "VERB_FIRST"
281
281
  verb_stage.first
282
282
  else
283
- verb_stage.first.reverse
283
+ verb_stage.first
284
284
  end.join(":").to_sym
285
285
  end
286
286
  end
@@ -1,5 +1,5 @@
1
1
  module Rum
2
2
  ##
3
3
  # Rum Runner gem version.
4
- VERSION = "0.2.6"
4
+ VERSION = "0.3.0"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rumrunner
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.6
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexander Mancevice