dockly 3.1.1 → 3.2.0.pre.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/dockly.rb +6 -5
- data/lib/dockly/cli.rb +47 -16
- data/lib/dockly/rake_task.rb +1 -1
- data/lib/dockly/version.rb +3 -3
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
N2MzMTNlNjU1OGM5MDJmY2M5MDYxNzk2YjA0OGIyMTVhZmNlNTBkYQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MzRhMzcwZTNjYTRmYjFjODk3NTNjNWZjZDJiMGE3YmE2OGE4NjU2Mw==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
NzNmMjE0ZWE2NmI1OTcxOTNhZTY1MzU0NzhlNGRmYTQwMzc2NWNhOGYwZWRm
|
10
|
+
ZDljZGI3ODZiYjdkZjI3MzM2NzAwODM1ZDEwYjU1MjIzOGQ5YzQ2OWRlMjg0
|
11
|
+
MWNjNjBlMGI0M2NkYTBjNmI4ZmI1ZjZlYTcxZjBlY2I0MmViMDU=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NDQwYWNkOWViYWFmZDg3NzljNGMyM2VmNjc0NGZhOTUyMDQ0Yjc4MTlmMDRj
|
14
|
+
NDQzNzVjMjEyMjBjODllMmJkOWY4ZDE4NGQ1NjIxZWMyZjQzZTUzZjg3NDU1
|
15
|
+
NWVhMTRlYjg1NWVjMmQ1MDMzNDNhOTA2NDQ5MjNiZGQzYTlmNGQ=
|
data/lib/dockly.rb
CHANGED
@@ -10,8 +10,9 @@ require 'open3'
|
|
10
10
|
module Dockly
|
11
11
|
LOAD_FILE = 'dockly.rb'
|
12
12
|
|
13
|
-
|
14
|
-
|
13
|
+
class << self
|
14
|
+
attr_writer :load_file
|
15
|
+
end
|
15
16
|
|
16
17
|
autoload :Foreman, 'dockly/foreman'
|
17
18
|
autoload :BashBuilder, 'dockly/bash_builder'
|
@@ -30,7 +31,7 @@ module Dockly
|
|
30
31
|
@load_file || LOAD_FILE
|
31
32
|
end
|
32
33
|
|
33
|
-
def
|
34
|
+
def instance
|
34
35
|
@instance ||= load_inst
|
35
36
|
end
|
36
37
|
|
@@ -82,7 +83,7 @@ module Dockly
|
|
82
83
|
|
83
84
|
[:debs, :rpms, :dockers, :foremans].each do |method|
|
84
85
|
define_method(method) do
|
85
|
-
|
86
|
+
instance[method]
|
86
87
|
end
|
87
88
|
|
88
89
|
module_function method
|
@@ -96,7 +97,7 @@ module Dockly
|
|
96
97
|
}.each do |method, klass|
|
97
98
|
define_method(method) do |sym, &block|
|
98
99
|
if block.nil?
|
99
|
-
|
100
|
+
instance[:"#{method}s"][sym]
|
100
101
|
else
|
101
102
|
klass.new!(:name => sym, &block)
|
102
103
|
end
|
data/lib/dockly/cli.rb
CHANGED
@@ -14,17 +14,40 @@ class Dockly::AbstractCommand < Clamp::Command
|
|
14
14
|
end
|
15
15
|
end
|
16
16
|
|
17
|
-
class Dockly::
|
17
|
+
class Dockly::BuildOrCopyAllCommand < Dockly::AbstractCommand
|
18
|
+
def execute
|
19
|
+
super
|
20
|
+
Rake::Task["dockly:build_or_copy_all"].invoke
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
class Dockly::BuildDebCommand < Dockly::AbstractCommand
|
25
|
+
parameter 'PACKAGE', 'the name to build the package for', :attribute_name => :package_name
|
26
|
+
option ['-n', '--no-export'], :flag, 'do not export', :default => false, :attribute_name => :noexport
|
27
|
+
|
28
|
+
def execute
|
29
|
+
super
|
30
|
+
if Dockly.debs[package_name.to_sym]
|
31
|
+
if noexport?
|
32
|
+
Rake::Task["dockly:deb:prepare"].invoke(package_name)
|
33
|
+
else
|
34
|
+
Rake::Task["dockly:deb:build"].invoke(package_name)
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
class Dockly::BuildRpmCommand < Dockly::AbstractCommand
|
18
41
|
parameter 'PACKAGE', 'the name to build the package for', :attribute_name => :package_name
|
19
|
-
option ['-
|
42
|
+
option ['-n', '--no-export'], :flag, 'do not export', :default => false, :attribute_name => :noexport
|
20
43
|
|
21
44
|
def execute
|
22
45
|
super
|
23
|
-
if
|
24
|
-
if
|
25
|
-
|
46
|
+
if Dockly.rpms[package_name.to_sym]
|
47
|
+
if noexport?
|
48
|
+
Rake::Task["dockly:rpm:prepare"].invoke(package_name)
|
26
49
|
else
|
27
|
-
|
50
|
+
Rake::Task["dockly:rpm:build"].invoke(package_name)
|
28
51
|
end
|
29
52
|
end
|
30
53
|
end
|
@@ -32,20 +55,15 @@ end
|
|
32
55
|
|
33
56
|
class Dockly::DockerCommand < Dockly::AbstractCommand
|
34
57
|
parameter 'DOCKER', 'the name to generate the docker image for', :attribute_name => :docker_name
|
35
|
-
option ['-f', '--force'], :flag, 'force the package build', :default => false, :attribute_name => :force
|
36
58
|
option ['-n', '--no-export'], :flag, 'do not export', :default => false, :attribute_name => :noexport
|
37
59
|
|
38
60
|
def execute
|
39
61
|
super
|
40
|
-
if
|
41
|
-
if
|
42
|
-
|
43
|
-
docker.generate_build
|
44
|
-
else
|
45
|
-
docker.generate!
|
46
|
-
end
|
62
|
+
if Dockly.dockers[docker_name.to_sym]
|
63
|
+
if noexport?
|
64
|
+
Rake::Task["dockly:docker:prepare"].invoke(docker_name)
|
47
65
|
else
|
48
|
-
|
66
|
+
Rake::Task["dockly:docker:build"].invoke(docker_name)
|
49
67
|
end
|
50
68
|
end
|
51
69
|
end
|
@@ -56,6 +74,7 @@ class Dockly::ListCommand < Dockly::AbstractCommand
|
|
56
74
|
super
|
57
75
|
dockers = Dockly.dockers.dup
|
58
76
|
debs = Dockly.debs
|
77
|
+
rpms = Dockly.rpms
|
59
78
|
|
60
79
|
puts "Debs" unless debs.empty?
|
61
80
|
debs.each_with_index do |(name, package), index|
|
@@ -66,6 +85,15 @@ class Dockly::ListCommand < Dockly::AbstractCommand
|
|
66
85
|
end
|
67
86
|
end
|
68
87
|
|
88
|
+
puts "RPMs" unless rpms.empty?
|
89
|
+
rpms.each_with_index do |(name, package), index|
|
90
|
+
puts "#{index + 1}. #{name}"
|
91
|
+
if package.docker
|
92
|
+
dockers.delete(package.docker.name)
|
93
|
+
puts " - Docker: #{package.docker.name}"
|
94
|
+
end
|
95
|
+
end
|
96
|
+
|
69
97
|
puts "Dockers" unless dockers.empty?
|
70
98
|
dockers.each_with_index do |(name, docker), index|
|
71
99
|
puts "#{index + 1}. #{name}"
|
@@ -104,7 +132,10 @@ class Dockly::BuildCacheCommand < Dockly::AbstractCommand
|
|
104
132
|
end
|
105
133
|
|
106
134
|
class Dockly::Cli < Dockly::AbstractCommand
|
107
|
-
subcommand ['build'
|
135
|
+
subcommand ['build-or-copy-all'], 'Run build or copy all Rake task', Dockly::BuildOrCopyAllCommand
|
136
|
+
subcommand ['build', 'b'], 'Create deb package', Dockly::BuildDebCommand
|
137
|
+
subcommand ['build-deb', 'bd'], 'Create deb package', Dockly::BuildDebCommand
|
138
|
+
subcommand ['build-rpm', 'br'], 'Create RPM package', Dockly::BuildRpmCommand
|
108
139
|
subcommand ['docker', 'd'], 'Generate docker image', Dockly::DockerCommand
|
109
140
|
subcommand ['list', 'l'], 'List packages', Dockly::ListCommand
|
110
141
|
subcommand ['build_cache', 'bc'], 'Build Cache commands', Dockly::BuildCacheCommand
|
data/lib/dockly/rake_task.rb
CHANGED
data/lib/dockly/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dockly
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.2.0.pre.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Swipely, Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-04-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: clamp
|
@@ -305,9 +305,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
305
305
|
version: '0'
|
306
306
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
307
307
|
requirements:
|
308
|
-
- - ! '
|
308
|
+
- - ! '>'
|
309
309
|
- !ruby/object:Gem::Version
|
310
|
-
version:
|
310
|
+
version: 1.3.1
|
311
311
|
requirements: []
|
312
312
|
rubyforge_project:
|
313
313
|
rubygems_version: 2.6.2
|