jarl 0.4.0 → 0.5.0
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/jarl/application.rb +8 -4
- data/lib/jarl/jarl_file.rb +1 -1
- data/lib/jarl/version.rb +1 -1
- 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: 2b885c31df83e4e1d596fd35a7c0e2226037720c
|
4
|
+
data.tar.gz: 58d6d75c3e4de1c7388cf71efcbacf5a39eacbb4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 09300a56b2a21148d43f9aa67f1f63581537c2f04ca4515ab3410c61dad06a2e0f9eff9e9bb10d9837d61ec7b55bd81d38e4f64d3c1d0423755a32987f13fb6d
|
7
|
+
data.tar.gz: 4661d30f738b71f06ae2a0dd3b0c353a7bcbb5d32025d0e8a259f5865afc4a5a8adf834bb48fafd04d31b7459dc33942514af6c0ec49656136b72cc9a2e79205
|
data/lib/jarl/application.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
module Jarl
|
2
2
|
class Application
|
3
|
-
attr_reader :group, :name, :hostname
|
3
|
+
attr_reader :group, :name, :hostname, :base_path
|
4
4
|
attr_reader :image, :volumes, :ports, :environment, :entrypoint, :command
|
5
5
|
attr_reader :serial
|
6
6
|
|
@@ -14,9 +14,10 @@ module Jarl
|
|
14
14
|
# - 1234:5678
|
15
15
|
# command: blabla
|
16
16
|
#
|
17
|
-
def initialize(group, name, params)
|
17
|
+
def initialize(group, name, params, base_path)
|
18
18
|
@group = group
|
19
19
|
@name = name
|
20
|
+
@base_path = base_path
|
20
21
|
@image = params['image'] || fail("Application '#{self}' has no 'image' defined")
|
21
22
|
unless @image.is_a?(String)
|
22
23
|
fail "Application '#{self}' has invalid 'image' definition, String is expected"
|
@@ -92,8 +93,7 @@ module Jarl
|
|
92
93
|
end
|
93
94
|
|
94
95
|
def build
|
95
|
-
|
96
|
-
Docker::Image.new(image_name, image_path).build!
|
96
|
+
Docker::Image.new(image_name, image_full_path).build!
|
97
97
|
end
|
98
98
|
|
99
99
|
def image_name
|
@@ -104,6 +104,10 @@ module Jarl
|
|
104
104
|
image_is_a_path? ? image : nil
|
105
105
|
end
|
106
106
|
|
107
|
+
def image_full_path
|
108
|
+
image_is_a_path? ? Pathname.new(base_path).join(image).expand_path : nil
|
109
|
+
end
|
110
|
+
|
107
111
|
def to_s
|
108
112
|
full_name
|
109
113
|
end
|
data/lib/jarl/jarl_file.rb
CHANGED
data/lib/jarl/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jarl
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alex Kukushkin
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-03-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|