lib/health-data-standards/tasks/bundle.rake in health-data-standards-3.6.1 vs lib/health-data-standards/tasks/bundle.rake in health-data-standards-3.7.0

- old
+ new

@@ -24,16 +24,19 @@ desc %{ Download measure/test deck bundle. options nlm_user - the nlm username to authenticate to the server - will prompt is not supplied nlm_passwd - the nlm password for authenticating to the server - will prompt if not supplied - version - the version of the bundle to download. This will default to the version + version - the version of the bundle to download - this must be supplied example usage: rake bundle:download nlm_name=username nlm_passwd=password version=2.1.0-latest } task :download => :environment do + bundle_version = ENV.fetch("version") do + raise ArgumentError.new("Required argument 'version' was not supplied") + end nlm_user = ENV["nlm_user"] nlm_passwd = ENV["nlm_pass"] measures_dir = File.join(Dir.pwd, "bundles") while nlm_user.nil? || nlm_user == "" @@ -43,15 +46,14 @@ while nlm_passwd.nil? || nlm_passwd == "" nlm_passwd = ask("NLM Password?: "){ |q| q.echo = false q.readline = true } end - bundle_version = ENV["version"] || "latest" @bundle_name = "bundle-#{bundle_version}.zip" puts "Downloading and saving #{@bundle_name} to #{measures_dir}" # Pull down the list of bundles and download the version we're looking for - bundle_uri = "https://demo.projectcypress.org/bundles/#{@bundle_name}" + bundle_uri = "https://cypressdemo.healthit.gov/measure_bundles/#{@bundle_name}" bundle = nil tries = 0 max_tries = 10 last_error = nil