cloudspin-stack-artefact 0.1.6 → 0.1.7

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 83ddb6d50a51b32adac821167b735bea775e6cfd
4
- data.tar.gz: 2d883d5d12f833e9a9ddaa853afce64757593c7d
3
+ metadata.gz: 919593bd5c77587b969f61b69b25f4b96603891e
4
+ data.tar.gz: e3169cf4155d409f8548bd3d7d2741c8cf40b703
5
5
  SHA512:
6
- metadata.gz: 91fdc14e8ae156aa9fca30dcb2c0d60a5ab3d64d72e13cc8244deb6eea2b0df40da2f7655c9b9f6a52991ee71153279aae823b817a0ba791217710664f2aa1f7
7
- data.tar.gz: 9cd8f7b609184f6120b4f8417fe584f0c79a4063e84b17549e3009888844cb088b6ba00e38c1a26680c78574fca3366aabed862d1b9f0b348497fd272d40e432
6
+ metadata.gz: f3535fc216a2509a36cbd93f3b147834ab9ac535c39e2aacbefef5d4651c50f38d767a8bc2af47bac0c3728fc26010a925852a57578d765b79c7a7312cf33eac
7
+ data.tar.gz: d73b482ffa552e9d8ee77a07d1a44556cbf4bb8225e67e6e83aca40100f474a92e92a404f85b92a144db63d7037defc114fbe9d9c5b1b51ddc7dbd82e14be71b
@@ -12,6 +12,12 @@ module Cloudspin
12
12
  :default => './dist',
13
13
  :desc => 'The artefact will be created in this folder'
14
14
 
15
+ class_option :source,
16
+ :aliases => '-s',
17
+ :banner => 'PATH',
18
+ :default => './src',
19
+ :desc => 'Folder with the terraform project source files'
20
+
15
21
  desc 'build', 'Assemble the files to be packaged'
16
22
  option :test_folder,
17
23
  :aliases => '-t',
@@ -25,11 +31,6 @@ module Cloudspin
25
31
  :aliases => '-f',
26
32
  :banner => 'FILENAME',
27
33
  :default => './stack-instance-defaults.yaml'
28
- option :source,
29
- :aliases => '-s',
30
- :banner => 'PATH',
31
- :default => './src',
32
- :desc => 'Folder with the terraform project source files'
33
34
  def build
34
35
  add_folder(options[:test_folder])
35
36
  add_folder(options[:environments_folder])
@@ -37,7 +38,7 @@ module Cloudspin
37
38
  builder.build
38
39
  end
39
40
 
40
- desc 'dist', 'Package the files'
41
+ desc 'package', 'Package the files'
41
42
  def package
42
43
  builder.package
43
44
  end
@@ -70,7 +71,13 @@ module Cloudspin
70
71
  end
71
72
 
72
73
  def stack_definition
73
- @definition ||= Cloudspin::Stack::Definition.from_file(options[:source] + '/stack-definition.yaml')
74
+ Cloudspin::Stack::Definition.from_file(stack_definition_file)
75
+ end
76
+
77
+ def stack_definition_file
78
+ raise NoStackDefinitionFolder unless Dir.exists? options[:source]
79
+ raise NoStackDefinitionConfigurationFile unless File.exists? "#{options[:source]}/stack-definition.yaml"
80
+ "#{options[:source]}/stack-definition.yaml"
74
81
  end
75
82
  end
76
83
 
@@ -80,6 +87,9 @@ module Cloudspin
80
87
 
81
88
  end
82
89
 
90
+ class NoStackDefinitionFolder < StandardError; end
91
+ class NoStackDefinitionConfigurationFile < StandardError; end
92
+
83
93
  end
84
94
 
85
95
  end
@@ -1,7 +1,7 @@
1
1
  module Cloudspin
2
2
  module Stack
3
3
  module Artefact
4
- VERSION = '0.1.6'
4
+ VERSION = '0.1.7'
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cloudspin-stack-artefact
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - 'kief '