cloudspin-stack-rake 0.1.12 → 0.1.13
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/cloudspin/stack/rake/stack_task.rb +13 -5
- data/lib/cloudspin/stack/rake/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 74ddadd8baaf4af1ae16f3d66b280ed337c38db420bb1ce56073cbc86309b757
|
4
|
+
data.tar.gz: 8b7ab9bc491a3db38201aefca8fa3ee1e3eb3cc2bf49c7c98fa2126e119d1ae8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a653e3900cb5263f1abce2cf23cf28c06358c6054a7fb8280503b086f411c0ea11496558fc7dc3f78630297682c7173f5e204d846fb1630d8ed22b751096bdb8
|
7
|
+
data.tar.gz: 2b7b09dcc37e4d8da48758b62e67e62052f63048bdec22cf460238a8e27597abd5b0b42a6a3c4815a00797f7f1ab28fd72f021cecc07483084410c802f29d406
|
@@ -6,15 +6,19 @@ module Cloudspin
|
|
6
6
|
class StackTask < ::Rake::TaskLib
|
7
7
|
|
8
8
|
attr_reader :instance
|
9
|
+
attr_reader :environment
|
10
|
+
attr_reader :role
|
9
11
|
attr_reader :configuration_files
|
10
12
|
|
11
13
|
def initialize(
|
12
14
|
environment = nil,
|
15
|
+
role: 'instance',
|
13
16
|
definition_folder: './src',
|
14
17
|
base_folder: '.',
|
15
18
|
configuration_files: nil
|
16
19
|
)
|
17
20
|
@environment = environment
|
21
|
+
@role = role
|
18
22
|
@base_folder = base_folder
|
19
23
|
@configuration_files = configuration_files || instance_configuration_files
|
20
24
|
|
@@ -30,10 +34,10 @@ module Cloudspin
|
|
30
34
|
def instance_configuration_files
|
31
35
|
file_list = default_configuration_files
|
32
36
|
if @environment
|
33
|
-
if File.exists? environment_config_file
|
37
|
+
if File.exists? full_path_of(environment_config_file)
|
34
38
|
file_list << environment_config_file
|
35
39
|
else
|
36
|
-
raise "Missing configuration file for environment #{
|
40
|
+
raise "Missing configuration file for environment #{@environment} (#{environment_config_file})"
|
37
41
|
end
|
38
42
|
end
|
39
43
|
file_list
|
@@ -41,13 +45,17 @@ module Cloudspin
|
|
41
45
|
|
42
46
|
def default_configuration_files
|
43
47
|
[
|
44
|
-
"#{@base_folder}/stack-
|
45
|
-
"#{@base_folder}/stack-
|
48
|
+
"#{@base_folder}/stack-#{@role}-defaults.yaml",
|
49
|
+
"#{@base_folder}/stack-#{@role}-local.yaml"
|
46
50
|
]
|
47
51
|
end
|
48
52
|
|
49
53
|
def environment_config_file
|
50
|
-
|
54
|
+
"#{@base_folder}/environments/stack-#{@role}-#{@environment}.yaml"
|
55
|
+
end
|
56
|
+
|
57
|
+
def full_path_of(supplied_path)
|
58
|
+
Pathname.new(supplied_path).realdirpath.to_s
|
51
59
|
end
|
52
60
|
|
53
61
|
def define
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cloudspin-stack-rake
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.13
|
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-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: cloudspin-stack
|