rake_docker 0.3.0 → 0.4.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
  SHA1:
3
- metadata.gz: 7f0670d5964650486c71eef2618217cfdfa90e52
4
- data.tar.gz: 744d08187889a515b2eabbc04fd14bb140ac5886
3
+ metadata.gz: 6769a28f711f605cb756ef1773272de189786d6c
4
+ data.tar.gz: 84e5ce8d0a1802b6c2c36b0ed121e179495671a7
5
5
  SHA512:
6
- metadata.gz: b6c10b6a64a9934604db529720a4e59952c535e94a2d801627d4d7b7a43aa4b5d05ab033fa39ee80c92faeba06dd892da781eaf69ad5513b83658248bc289400
7
- data.tar.gz: c0b3f1c626025c792446c6f221cfee72288de7d4cecf7fb9688916c1b55a675dcb20e4c4389f849ea69786f55f140b9613789f7d81c1a27bfaaa0dd40d559bc7
6
+ metadata.gz: 1f3b58dcddce17be6dacd323cf267b8e69cb26f5ff0c87f3b6c0df1dbbc9e6d688d1177db26c3e6cec04524b5b3aa46fc6fb313c967ea839c93665188d6ff7df
7
+ data.tar.gz: f46f367db858bfce8ae440f38adfea0d95cefb0fe8cda7ca822aa7d63b2d5ec8e35c36eb11949da098da8f78d93b0b6b415db856217f3c41313c0b3751f5371c
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rake_docker (0.3.0)
4
+ rake_docker (0.4.0)
5
5
  docker-api (~> 1.33)
6
6
 
7
7
  GEM
@@ -11,13 +11,19 @@ module RakeDocker
11
11
 
12
12
  parameter :work_directory, :required => true
13
13
 
14
+ parameter :prepare_task, :default => :prepare
15
+
14
16
  def process_arguments(args)
15
17
  self.name = args[0] if args[0]
16
18
  end
17
19
 
18
20
  def define
21
+ prerequisites = prepare_task ?
22
+ [scoped_task_name(prepare_task)] :
23
+ []
24
+
19
25
  desc "Build #{image_name} image"
20
- task name do
26
+ task name => prerequisites do
21
27
  Docker::Image.build_from_dir(
22
28
  File.join(work_directory, image_name),
23
29
  {t: repository_name}) do |chunk|
@@ -25,6 +31,12 @@ module RakeDocker
25
31
  end
26
32
  end
27
33
  end
34
+
35
+ private
36
+
37
+ def scoped_task_name(task_name)
38
+ Rake.application.current_scope.path_with_task_name(task_name)
39
+ end
28
40
  end
29
41
  end
30
42
  end
@@ -1,3 +1,3 @@
1
1
  module RakeDocker
2
- VERSION = '0.3.0'
2
+ VERSION = '0.4.0'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rake_docker
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Toby Clemson