dockerfile2bash 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/dockerfile2bash.rb +7 -2
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5c10341f38cbf916362d40e80de112f43b12a709
4
- data.tar.gz: daf9f2c0866e96a1835b3f8252c74e3875bbc898
3
+ metadata.gz: 6d714ab2466fba00c96e0846b76de01e14219d5e
4
+ data.tar.gz: d48f47819f7218f4a289de1ed4b5264dac6e0538
5
5
  SHA512:
6
- metadata.gz: e2946deadf412b6aaaf03d4f1d57655c3711dbbc17c625a98980b67079a4c7be6b44e9395f103bd6f6c3a53fbf27d2febc12e7deff3d775228addbcc979183ba
7
- data.tar.gz: b8032f7962094bf0f9939c17deb1560bc674a45e3d3a713a3f275b4a74db8c946f12d2ec6518f9c655986a2f2b43064379dea95af40f99748994e72a867db9c6
6
+ metadata.gz: 57ea14e232c46d3624d13eb66cb48acb6be9b8ea0ff5980862c48f43a6ae524d305310a0ddf9f2b943d4bf1fc0d136f2b08ab4c61374c894e4e7caf88f74f327
7
+ data.tar.gz: '08c1a8b4e4e3a99ff34f3fe338384133f903e70bd6b516d0d0ca6f7da5b5759a849f250d2e63e536a605104512d80eaf9cae10d38cc3f60b3d21f781fba4659f'
@@ -1,7 +1,7 @@
1
1
  require 'json'
2
2
 
3
3
  class Dockerfile2bash
4
- VERSION = '0.1.2'
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-Z].[a-zA-Z0-9]+?=.+$/
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] }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dockerfile2bash
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - B1nj0y