ecs_compose 0.1.0.pre33 → 0.1.0.pre34
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ecs_compose/json_generator.rb +12 -4
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e53ba48d1b6bf3d23dcccfddad36405ff5e72104
|
4
|
+
data.tar.gz: d37288d632cd3741327c525259813cb6d7224024
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a83f90f37847dd28dbb201a8d786aed7f52cca8a922eef6879f17b0baf1f869ea318650a057fc6167e5e38ed0134ef5b332a1a4003f3ef07b93a56cedc175c55
|
7
|
+
data.tar.gz: a2293736fd99d92a546a1b92b68605ddf85a41b95bfd12563310610aac1ae95c2f078f677776e682864a81784776d2e07533139c23bbf46db802f7a2e7263944
|
@@ -162,11 +162,19 @@ module EcsCompose
|
|
162
162
|
# Parse a Docker-style port mapping and convert to ECS format.
|
163
163
|
def port_mapping(port)
|
164
164
|
case port.to_s
|
165
|
-
when /\A(\d+)
|
165
|
+
when /\A(\d+)(?:\/([a-z]+))?\z/
|
166
166
|
port = $1.to_i
|
167
|
-
{
|
168
|
-
|
169
|
-
|
167
|
+
{
|
168
|
+
"hostPort" => port,
|
169
|
+
"containerPort" => port,
|
170
|
+
"protocol" => $2 || "tcp"
|
171
|
+
}
|
172
|
+
when /\A(\d+):(\d+)(?:\/([a-z]+))?\z/
|
173
|
+
{
|
174
|
+
"hostPort" => $1.to_i,
|
175
|
+
"containerPort" => $2.to_i,
|
176
|
+
"protocol" => $3 || "tcp"
|
177
|
+
}
|
170
178
|
else
|
171
179
|
raise "Cannot parse port specification: #{port}"
|
172
180
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ecs_compose
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.0.
|
4
|
+
version: 0.1.0.pre34
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eric Kidd
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-06-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: docopt
|