Skip to content

Commit c05eb51

Browse files
committed
Modify tasks to check for supported formats.
1 parent 2f37b2a commit c05eb51

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/fhir_client/tasks/tasks.rake

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ namespace :fhir do
4040
desc 'count all resources for a given server'
4141
task :count, [:url, :display_zero] do |_t, args|
4242
client = FHIR::Client.new(args.url)
43+
client.try_conformance_formats(FHIR::Formats::ResourceFormat::RESOURCE_JSON)
4344
display_zero = (args.display_zero == 'true')
4445
counts = {}
4546
fhir_resources.each do |klass|
@@ -59,6 +60,7 @@ namespace :fhir do
5960
desc 'delete all resources for a given server'
6061
task :clean, [:url] do |_t, args|
6162
client = FHIR::Client.new(args.url)
63+
client.try_conformance_formats(FHIR::Formats::ResourceFormat::RESOURCE_JSON)
6264
fhir_resources.each do |klass|
6365
puts "Reading #{klass.name.demodulize}..."
6466
skipped = []

0 commit comments

Comments
 (0)