dockerfile2bash 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/dockerfile2bash.rb +7 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6d714ab2466fba00c96e0846b76de01e14219d5e
|
4
|
+
data.tar.gz: d48f47819f7218f4a289de1ed4b5264dac6e0538
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 57ea14e232c46d3624d13eb66cb48acb6be9b8ea0ff5980862c48f43a6ae524d305310a0ddf9f2b943d4bf1fc0d136f2b08ab4c61374c894e4e7caf88f74f327
|
7
|
+
data.tar.gz: '08c1a8b4e4e3a99ff34f3fe338384133f903e70bd6b516d0d0ca6f7da5b5759a849f250d2e63e536a605104512d80eaf9cae10d38cc3f60b3d21f781fba4659f'
|
data/lib/dockerfile2bash.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'json'
|
2
2
|
|
3
3
|
class Dockerfile2bash
|
4
|
-
VERSION = '0.1.
|
4
|
+
VERSION = '0.1.3'
|
5
5
|
attr_reader :commands
|
6
6
|
FIELDS = %w(from user run add copy arg env expose cmd onbuild)
|
7
7
|
|
@@ -33,8 +33,13 @@ class Dockerfile2bash
|
|
33
33
|
@commands << { "arg" => args }
|
34
34
|
end
|
35
35
|
when "env"
|
36
|
+
if segments[1] =~ /^[a-zA-Z_].[a-zA-Z0-9_]+?=("|')[^"']*?\1$/
|
37
|
+
@commands << { "env" => segments[1] }
|
38
|
+
next
|
39
|
+
end
|
40
|
+
|
36
41
|
envs = segments[1].split
|
37
|
-
pattern = %r/^[a-zA-
|
42
|
+
pattern = %r/^[a-zA-Z_].[a-zA-Z0-9_]+?=.+$/
|
38
43
|
case envs.length
|
39
44
|
when 1
|
40
45
|
@commands << { "env" => segments[1] }
|