lib/cocoapods-flutter/native/archive/remote.rb in cocoapods-flutter-dt-0.2.7 vs lib/cocoapods-flutter/native/archive/remote.rb in cocoapods-flutter-dt-0.4.1

- old
+ new

@@ -6,10 +6,11 @@ def initialize if ENV['FLUTTER_BINARY_SERVER_BASEURL'].nil? raise StandardError, "Need 'FLUTTER_BINARY_SERVER_BASEURL' in env" end @base_url = ENV['FLUTTER_BINARY_SERVER_BASEURL'] + @coverage_base_url = ENV['COVERAGE_SERVER_BASEURL'] end def exist?(name, version, tag) uri = URI.join @base_url, "/frameworks/exit/#{name}/#{version}/#{tag}" resp = RestClient.get(uri.to_s) @@ -66,8 +67,21 @@ :version => version, :tag => hash } ) req.execute + end + + def config_coverage(bundle_id, version, git_commit_hash, index_db_path, git_repo, build_base_dir) + uri = URI.join @coverage_base_url, "/coverage/flutter/report/config" + Pod::UserInterface.info "Uploading coverage config info to #{uri.to_s}" + resp = RestClient.post(uri.to_s, { + index_db: File.new(index_db_path, 'rb'), + git_commit_hash: git_commit_hash, + git_repo: git_repo, + build_base_dir: build_base_dir, + bundle_id: bundle_id, + version: version + }) end end \ No newline at end of file