cloudstrap 0.42.4.pre → 0.42.9.pre
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/cloudstrap/config.rb +36 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 566838b2117aeed7217fba23e9c2302974d64ac1
|
|
4
|
+
data.tar.gz: 809041189de906bbdc2b1786ab7ccd273933d50f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e9cb451185640133d5d67b5807d40148dd52676e1c45c3d68f7abb825b13d52a5286d4d4c8245e2227b834faa73beb4ae28d37c0055943b3e2a03c0cad263b03
|
|
7
|
+
data.tar.gz: 2f2ca1c9a749e295f6c9ea7f33bf590d630769632884dd0e2d818edcf10fe7939f3daac68733ac2dbf8e5dd3ce0c9048b6e7ef2554cff51d300491812634e82c
|
data/lib/cloudstrap/config.rb
CHANGED
|
@@ -91,6 +91,35 @@ module Cloudstrap
|
|
|
91
91
|
lookup(:ssh_username) { 'ubuntu' }
|
|
92
92
|
end
|
|
93
93
|
|
|
94
|
+
Contract None => Enum['dev', 'release']
|
|
95
|
+
def channel
|
|
96
|
+
lookup(:channel) { 'release' }
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
Contract None => String
|
|
100
|
+
def artifact_origin
|
|
101
|
+
lookup(:artifact_origin) do
|
|
102
|
+
case channel
|
|
103
|
+
when 'release'
|
|
104
|
+
'release.stackato.com'
|
|
105
|
+
when 'dev'
|
|
106
|
+
'dev.stackato.com'
|
|
107
|
+
end
|
|
108
|
+
end
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
Contract None => String
|
|
112
|
+
def artifact_prefix
|
|
113
|
+
lookup(:artifact_prefix) { '/downloads' }
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
Contract None => String
|
|
117
|
+
def hcp_prefix
|
|
118
|
+
lookup(:hcp_prefix) do
|
|
119
|
+
"#{artifact_prefix}/hcp"
|
|
120
|
+
end.squeeze('/')
|
|
121
|
+
end
|
|
122
|
+
|
|
94
123
|
Contract None => String
|
|
95
124
|
def hcp_dir
|
|
96
125
|
@hcp_dir ||= File.expand_path(ENV.fetch('BOOTSTRAP_HCP_DIR') { dir })
|
|
@@ -113,7 +142,13 @@ module Cloudstrap
|
|
|
113
142
|
Contract None => String
|
|
114
143
|
def hcp_bootstrap_package_url
|
|
115
144
|
lookup(:hcp_bootstrap_package_url) do
|
|
116
|
-
|
|
145
|
+
version = hcp_bootstrap_version.gsub('+', '%2B')
|
|
146
|
+
'https://' + [
|
|
147
|
+
artifact_origin,
|
|
148
|
+
hcp_prefix,
|
|
149
|
+
'bootstrap',
|
|
150
|
+
"hcp-bootstrap_#{version}_amd64.deb"
|
|
151
|
+
].join('/').squeeze('/')
|
|
117
152
|
end
|
|
118
153
|
end
|
|
119
154
|
|