lib/cloudstrap/config.rb in cloudstrap-0.43.0.pre vs lib/cloudstrap/config.rb in cloudstrap-0.43.2.pre
- old
+ new
@@ -149,9 +149,28 @@
"#{artifact_prefix}/hcp"
end.squeeze('/')
end
Contract None => String
+ def hcp_channel
+ lookup(:hcp_channel) do
+ case channel
+ when 'dev'
+ 'hcp_0.9_development'
+ when 'release'
+ 'hcp_1.0_stable'
+ end
+ end
+ end
+
+ Contract None => String
+ def hcp_metadata
+ lookup(:hcp_metadata) do
+ "#{hcp_prefix}/cli/update/#{hcp_channel}/linux-amd64.json"
+ end.squeeze('/')
+ end
+
+ Contract None => String
def hcp_dir
@hcp_dir ||= File.expand_path(ENV.fetch('BOOTSTRAP_HCP_DIR') { dir })
end
Contract None => String