cloudspin-stack 0.1.21 → 0.1.22
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/cloudspin/stack/definition.rb +10 -4
- data/lib/cloudspin/stack/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: 59627a946d24d3bbf4d6cbd026670f1679cb1ebb
|
4
|
+
data.tar.gz: 0f9495a259ae7eff0f25ec6d4de1eca250d592f7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a0a5c2df90337b85aa8006b1d013ae7ff9795a4249887c28d55134897afe6fce1f7905bd2af1675b6c464fcccf0388a1bd3bda43b4d956b9bdcb4a050b2f63fa
|
7
|
+
data.tar.gz: b2fe3a4e898e610aa42e937f5bd24d2bd3c1661303cf345804ab832ddab93e666ae6933025d04ce39067534941db45120ba220fc7ca77708716d93864590e9eb
|
@@ -8,20 +8,22 @@ module Cloudspin
|
|
8
8
|
attr_reader :version
|
9
9
|
attr_reader :source_path
|
10
10
|
|
11
|
-
def initialize(source_path:, stack_name:, stack_version: '0')
|
11
|
+
def initialize(source_path:, stack_name:, stack_version: '0', github_tag: false)
|
12
12
|
@source_path = source_path
|
13
13
|
@name = stack_name
|
14
14
|
@version = stack_version
|
15
|
+
@github_tag = !github_tag.nil? && (github_tag || /^(true|yes|1)$/i.match(github_tag))
|
15
16
|
end
|
16
17
|
|
17
18
|
def self.from_file(specfile)
|
18
|
-
raise
|
19
|
+
raise NoStackDefinitionConfigurationFileError, specfile unless File.exists?(specfile)
|
19
20
|
source_path = File.dirname(specfile)
|
20
21
|
spec_hash = YAML.load_file(specfile)
|
21
22
|
self.new(
|
22
23
|
source_path: source_path,
|
23
24
|
stack_name: spec_hash.dig('stack', 'name'),
|
24
|
-
stack_version: spec_hash.dig('stack', 'version')
|
25
|
+
stack_version: spec_hash.dig('stack', 'version'),
|
26
|
+
github_tag: spec_hash.dig('stack', 'github_tag')
|
25
27
|
)
|
26
28
|
end
|
27
29
|
|
@@ -29,10 +31,14 @@ module Cloudspin
|
|
29
31
|
from_file("#{definition_folder}/stack-definition.yaml")
|
30
32
|
end
|
31
33
|
|
34
|
+
def github_tag?
|
35
|
+
@github_tag
|
36
|
+
end
|
37
|
+
|
32
38
|
end
|
33
39
|
|
34
40
|
|
35
|
-
class
|
41
|
+
class NoStackDefinitionConfigurationFileError < StandardError; end
|
36
42
|
|
37
43
|
end
|
38
44
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cloudspin-stack
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.22
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- 'kief '
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-09-
|
11
|
+
date: 2018-09-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ruby-terraform
|