docker_core 0.0.35 → 0.0.38
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/docker_core.rb +43 -7
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 84c5592237fab2fc9462002fc3870d3da83bb10c2ea4f63f03ff63bde07361a8
|
4
|
+
data.tar.gz: 4ad64ad05766be5c697e290f6fdbb3ced7fac33fc22cdea7191e7d08db13f3d5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 96fc38fdee4e4c1de0ef4451cef42c4189b3d88799256b30b7d7d596cdf6df15915d3b239aa5f2a209e62a88afedfaafc7ee0329e49c2e1110233c737c17bac4
|
7
|
+
data.tar.gz: 5a7fe3401d9fc59997e34e406b89db012d5d0a31c036df0e65b608764b805b6f7fe446dd9c38af453339ccbad000b452295b8c1509bfc19f4ca04f3cc419bef7
|
data/lib/docker_core.rb
CHANGED
@@ -113,13 +113,47 @@ module DockerCore
|
|
113
113
|
return File.expand_path('~/.swarm')
|
114
114
|
end
|
115
115
|
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
116
|
+
def self.profile_path
|
117
|
+
return File.realpath('profile.sh', self.deploy_path)
|
118
|
+
end
|
119
|
+
|
120
|
+
def self.runner_path
|
121
|
+
return File.realpath('runner.rb', self.deploy_path)
|
122
|
+
end
|
123
|
+
|
124
|
+
# @see https://github.com/moby/moby/issues/31564
|
125
|
+
# @see https://www.geeksforgeeks.org/how-to-validate-a-domain-name-using-regular-expression
|
126
|
+
# @param [String] name
|
127
|
+
# @param [Boolean] echo
|
128
|
+
def self.check_name(name, echo: false)
|
129
|
+
color = Color::YELLOW
|
130
|
+
name = "#{name}"
|
131
|
+
items = name.chars
|
132
|
+
|
133
|
+
if items.empty? || 63 < items.length
|
134
|
+
if echo
|
135
|
+
Color.echo("'#{name}' should be between 1 and 63 characters long", color)
|
136
|
+
end
|
137
|
+
|
138
|
+
return false
|
139
|
+
end
|
140
|
+
|
141
|
+
if [items.first, items.last].include?('-')
|
142
|
+
if echo
|
143
|
+
Color.echo("'#{name}' should not start or end with a hyphen(-)", color)
|
144
|
+
end
|
145
|
+
|
146
|
+
return false
|
147
|
+
end
|
148
|
+
|
149
|
+
test = name.match?(/^[a-zA-Z0-9-]+$/)
|
150
|
+
|
151
|
+
if false == test && echo
|
152
|
+
Color.echo("'#{name}' should be a-z or A-Z or 0-9 and hyphen (-)", color)
|
153
|
+
end
|
154
|
+
|
155
|
+
return test
|
156
|
+
end
|
123
157
|
|
124
158
|
# @param [String] swarm
|
125
159
|
def self.write_swarm(swarm = '')
|
@@ -192,6 +226,7 @@ module DockerCore
|
|
192
226
|
end
|
193
227
|
end
|
194
228
|
|
229
|
+
#noinspection RubyUnusedLocalVariable
|
195
230
|
# @param [Array] arguments
|
196
231
|
# @param [Hash] environment
|
197
232
|
# @param [Hash] bind
|
@@ -204,6 +239,7 @@ module DockerCore
|
|
204
239
|
Error.no_method(__method__)
|
205
240
|
end
|
206
241
|
|
242
|
+
#noinspection RubyUnusedLocalVariable
|
207
243
|
# @param [Array] arguments
|
208
244
|
# @param [Hash] environment
|
209
245
|
# @param [Hash] bind
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: docker_core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.38
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- agrozyme
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-07-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fileutils
|
@@ -58,14 +58,14 @@ dependencies:
|
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '
|
61
|
+
version: '2'
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: '
|
68
|
+
version: '2'
|
69
69
|
description:
|
70
70
|
email:
|
71
71
|
executables: []
|