cloudstrap 0.42.4.pre → 0.42.9.pre

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/cloudstrap/config.rb +36 -1
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ba2f7342226feb7fe79936b4341e83f125538c25
4
- data.tar.gz: 50872fa0926e1a57c7e127bb0701a621a8757c60
3
+ metadata.gz: 566838b2117aeed7217fba23e9c2302974d64ac1
4
+ data.tar.gz: 809041189de906bbdc2b1786ab7ccd273933d50f
5
5
  SHA512:
6
- metadata.gz: 9ef8915943e4fa876f579f8afde7f992cf0eb48abcd47aab3ada18703e41c17f43eef2cd3e748875dd52d566bbb197e1f08085777bc3767ffaab3ec1c41ec9c4
7
- data.tar.gz: 5f1b8128a82d0cf97ef6279db130ac1af00390a52baa078074a897d5ebf8d4d1fdca1aa07ee2b91dab0eec5123fd8dbe22a2dbe7c8c7d2cd27f5c1a388340587
6
+ metadata.gz: e9cb451185640133d5d67b5807d40148dd52676e1c45c3d68f7abb825b13d52a5286d4d4c8245e2227b834faa73beb4ae28d37c0055943b3e2a03c0cad263b03
7
+ data.tar.gz: 2f2ca1c9a749e295f6c9ea7f33bf590d630769632884dd0e2d818edcf10fe7939f3daac68733ac2dbf8e5dd3ce0c9048b6e7ef2554cff51d300491812634e82c
@@ -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
- "#{hcp_origin}/hcp-bootstrap_#{hcp_version.gsub('+', '%2B')}_amd64.deb"
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
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cloudstrap
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.42.4.pre
4
+ version: 0.42.9.pre
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Olstrom