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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b53a86446e9bf8c12ff15ecf6f81cbe610ae360f
4
- data.tar.gz: 3d79b8b4fdba03e2b6b44e9d24481a130f2de56c
3
+ metadata.gz: 59627a946d24d3bbf4d6cbd026670f1679cb1ebb
4
+ data.tar.gz: 0f9495a259ae7eff0f25ec6d4de1eca250d592f7
5
5
  SHA512:
6
- metadata.gz: 3bf07b8a78833ae65cde6e2b4ecbeaba5059da734bf96350d6fbd02d1354fa83cae3df68ae8266b57f0cf1d58c38b491c30555f06b5845c5c51868f1b10e65ba
7
- data.tar.gz: 9301510029f2c7d7bb2bd287348e2378fc11a7e818d0473ffcf4b30ca411c2b405dd4261e2b83e8413e9d6e4f6764c84b026f7e09108068a89abaf585ae2e872
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 NoStackDefinitionConfigurationFile unless File.exists?(specfile)
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 NoStackDefinitionConfigurationFile < StandardError; end
41
+ class NoStackDefinitionConfigurationFileError < StandardError; end
36
42
 
37
43
  end
38
44
  end
@@ -1,5 +1,5 @@
1
1
  module Cloudspin
2
2
  module Stack
3
- VERSION = '0.1.21'
3
+ VERSION = '0.1.22'
4
4
  end
5
5
  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.21
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-24 00:00:00.000000000 Z
11
+ date: 2018-09-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ruby-terraform