rake_docker 0.9.0 → 0.10.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: 4ee46becd847550b87ba64e56cc3a934ad0593db
4
- data.tar.gz: 17e6d56618d77a704592f7666e8614274bf2b855
3
+ metadata.gz: 70941f2c33fa30e4f4894080ef9e871361c1c1e2
4
+ data.tar.gz: ea0a0c347a27136eec74269dab59baaf7f40d048
5
5
  SHA512:
6
- metadata.gz: 3923660e56ccd10751476ff84dd6718e6a0511791494b4347f9a512cb30e39ebc51abe31d6abc1fd124e23270e25817e337dbe984e71e446ed0d26c3eee88219
7
- data.tar.gz: eaf15ed5f7ec7d657abfd47c7047f410ba0f3b6cba7b6486d53a7566a3454f4757ede3f00df8e6acf0f1bdde4a6152d47b9561056c8360af35379c08992fae65
6
+ metadata.gz: 66d7cf4dd4fbd6fd1bf3aad59c2ff5b28730df63713384129a126c624e7e14fd2fbdf00c20d1bd6bce54c12bc263a76984f4e1f3b8d1fb6a48b2ebc36149136b
7
+ data.tar.gz: fb8d586987274ee45e267725ec4bc67cc5bc9737ce3574a5efd627821d164144dc9a3e4b861df57ef0ae3042a26957cc77a72afe832f2117b94942acd8c4d59c
data/CHANGELOG.md ADDED
@@ -0,0 +1,14 @@
1
+ ## 0.10.0 (October 24th, 2017)
2
+
3
+ BACKWARDS INCOMPATIBILITIES / NOTES:
4
+
5
+ * The push and tag rake tasks now accept an `argument_names` parameter
6
+ providing names of the arguments passed to the task. These arguments are in
7
+ turn passed to any factory functions. Previously the factory functions took
8
+ the task parameters as the first argument, now they take the task arguments
9
+ as the first argument and the task parameters as the second.
10
+
11
+ IMPROVEMENTS:
12
+
13
+ * All factory functions now take the task arguments for the push and tag rake
14
+ tasks.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rake_docker (0.9.0)
4
+ rake_docker (0.10.0)
5
5
  aws-sdk (~> 2.10)
6
6
  docker-api (~> 1.33)
7
7
 
@@ -13,20 +13,20 @@ GEM
13
13
  minitest (~> 5.1)
14
14
  thread_safe (~> 0.3, >= 0.3.4)
15
15
  tzinfo (~> 1.1)
16
- aws-sdk (2.10.9)
17
- aws-sdk-resources (= 2.10.9)
18
- aws-sdk-core (2.10.9)
16
+ aws-sdk (2.10.70)
17
+ aws-sdk-resources (= 2.10.70)
18
+ aws-sdk-core (2.10.70)
19
19
  aws-sigv4 (~> 1.0)
20
20
  jmespath (~> 1.0)
21
- aws-sdk-resources (2.10.9)
22
- aws-sdk-core (= 2.10.9)
23
- aws-sigv4 (1.0.0)
21
+ aws-sdk-resources (2.10.70)
22
+ aws-sdk-core (= 2.10.70)
23
+ aws-sigv4 (1.0.2)
24
24
  diff-lcs (1.3)
25
25
  docile (1.1.5)
26
26
  docker-api (1.33.6)
27
27
  excon (>= 0.38.0)
28
28
  json
29
- excon (0.57.1)
29
+ excon (0.59.0)
30
30
  gem-release (0.7.4)
31
31
  i18n (0.8.4)
32
32
  jmespath (1.3.1)
@@ -70,4 +70,4 @@ DEPENDENCIES
70
70
  simplecov (~> 0.13)
71
71
 
72
72
  BUNDLED WITH
73
- 1.14.5
73
+ 1.16.0.pre.2
@@ -20,6 +20,8 @@ module RakeDocker
20
20
  parameter :copy_spec, :default => []
21
21
  parameter :create_spec, :default => []
22
22
 
23
+ parameter :argument_names, :default => []
24
+
23
25
  parameter :tags, :required => true
24
26
 
25
27
  parameter :credentials
@@ -66,6 +68,7 @@ module RakeDocker
66
68
  end
67
69
  Tag.new do |t|
68
70
  t.name = tag_task_name
71
+ t.argument_names = argument_names
69
72
  t.image_name = image_name
70
73
  t.repository_name = repository_name
71
74
  t.repository_url = repository_url
@@ -73,6 +76,7 @@ module RakeDocker
73
76
  end
74
77
  Push.new do |t|
75
78
  t.name = push_task_name
79
+ t.argument_names = argument_names
76
80
  t.image_name = image_name
77
81
  t.repository_url = repository_url
78
82
  t.tags = tags
@@ -6,6 +6,7 @@ module RakeDocker
6
6
  module Tasks
7
7
  class Push < TaskLib
8
8
  parameter :name, :default => :push
9
+ parameter :argument_names, :default => []
9
10
 
10
11
  parameter :image_name, :required => true
11
12
  parameter :repository_url, :required => true
@@ -19,7 +20,7 @@ module RakeDocker
19
20
 
20
21
  def define
21
22
  desc "Push #{image_name} image to repository"
22
- task name do
23
+ task name, argument_names do |_, args|
23
24
  params = OpenStruct.new(
24
25
  image_name: image_name,
25
26
  repository_url: repository_url,
@@ -28,13 +29,13 @@ module RakeDocker
28
29
  )
29
30
 
30
31
  derived_repository_url = repository_url.respond_to?(:call) ?
31
- repository_url.call(*[params].slice(0, repository_url.arity)) :
32
+ repository_url.call(*[args, params].slice(0, repository_url.arity)) :
32
33
  repository_url
33
34
  derived_credentials = credentials.respond_to?(:call) ?
34
- credentials.call(*[params].slice(0, credentials.arity)) :
35
+ credentials.call(*[args, params].slice(0, credentials.arity)) :
35
36
  credentials
36
37
  derived_tags = tags.respond_to?(:call) ?
37
- tags.call(*[params].slice(0, tags.arity)) :
38
+ tags.call(*[args, params].slice(0, tags.arity)) :
38
39
  tags
39
40
 
40
41
  Docker.authenticate!(derived_credentials) if derived_credentials
@@ -6,6 +6,7 @@ module RakeDocker
6
6
  module Tasks
7
7
  class Tag < TaskLib
8
8
  parameter :name, :default => :tag
9
+ parameter :argument_names, :default => []
9
10
 
10
11
  parameter :image_name, :required => true
11
12
  parameter :repository_name, :required => true
@@ -19,17 +20,17 @@ module RakeDocker
19
20
 
20
21
  def define
21
22
  desc "Tag #{image_name} image for repository"
22
- task name do
23
+ task name, argument_names do |_, args|
23
24
  params = OpenStruct.new(
24
25
  image_name: image_name,
25
26
  repository_name: repository_name
26
27
  )
27
28
 
28
29
  derived_repository_url = repository_url.respond_to?(:call) ?
29
- repository_url.call(*[params].slice(0, repository_url.arity)) :
30
+ repository_url.call(*[args, params].slice(0, repository_url.arity)) :
30
31
  repository_url
31
32
  derived_tags = tags.respond_to?(:call) ?
32
- tags.call(*[params].slice(0, tags.arity)) :
33
+ tags.call(*[args, params].slice(0, tags.arity)) :
33
34
  tags
34
35
 
35
36
  images = Docker::Image.all(filter: repository_name)
@@ -1,3 +1,3 @@
1
1
  module RakeDocker
2
- VERSION = '0.9.0'
2
+ VERSION = '0.10.0'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rake_docker
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.0
4
+ version: 0.10.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Toby Clemson
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-08-06 00:00:00.000000000 Z
11
+ date: 2017-10-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: docker-api
@@ -147,6 +147,7 @@ files:
147
147
  - .gitignore
148
148
  - .rspec
149
149
  - .ruby-version
150
+ - CHANGELOG.md
150
151
  - CODE_OF_CONDUCT.md
151
152
  - Gemfile
152
153
  - Gemfile.lock