dockerfile2bash 0.1.5 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/dockerfile2bash.gemspec +1 -1
- data/lib/dockerfile2bash.rb +4 -3
- 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: c4e66ed1ae9e3b3d9ac762f563aa35bece711ae0
|
4
|
+
data.tar.gz: 847c173aed9eed2b274482513a250ef5dc644dde
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e4d09eff0365b47d52cf76f5ee07e02137004ddc58497e38404699bf2db1a59004e9d4bf266a87cf0878da3f47d2eadb7c811274168469fabbcd967c098c8958
|
7
|
+
data.tar.gz: 2026d576033b5d32989ad384d4a3150a809e0940d70d1f2e4d1999264620f451f7a04391252d148aa614ce5d3724517b771a5ce5bfaa882a69c9c51ac2f1ae22
|
data/dockerfile2bash.gemspec
CHANGED
@@ -7,7 +7,7 @@ Gem::Specification.new do |spec|
|
|
7
7
|
spec.version = Dockerfile2bash::VERSION
|
8
8
|
spec.authors = ["B1nj0y"]
|
9
9
|
spec.email = ["idegorepl@gmail.com"]
|
10
|
-
spec.date = '2018-01-
|
10
|
+
spec.date = '2018-01-31'
|
11
11
|
spec.summary = %q{Parse and Convert a Dockerfile to Bash.}
|
12
12
|
spec.description = %q{The Gem can be used to parse and convert a Dockerfile to a Bash script.}
|
13
13
|
spec.homepage = "https://github.com/beijingrb/dockerfile2bash"
|
data/lib/dockerfile2bash.rb
CHANGED
@@ -2,8 +2,10 @@ require 'json'
|
|
2
2
|
require 'rest-client'
|
3
3
|
|
4
4
|
class Dockerfile2bash
|
5
|
-
VERSION = '0.1.5'
|
6
5
|
attr_reader :commands
|
6
|
+
attr_accessor :content
|
7
|
+
|
8
|
+
VERSION = '0.1.6'
|
7
9
|
FIELDS = %w(from user run add copy arg env expose cmd onbuild)
|
8
10
|
|
9
11
|
def initialize(dockerfile)
|
@@ -14,8 +16,7 @@ class Dockerfile2bash
|
|
14
16
|
|
15
17
|
def parse
|
16
18
|
return if !@content || @content.empty?
|
17
|
-
@content.gsub
|
18
|
-
lines = @content.split(/\r?\n+/) || []
|
19
|
+
lines = @content.gsub("\\\n", "").split(/\r?\n+/) || []
|
19
20
|
|
20
21
|
lines.each do |line|
|
21
22
|
# ignore blank and comment lines
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dockerfile2bash
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- B1nj0y
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-01-
|
11
|
+
date: 2018-01-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rest-client
|