• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

pulibrary / tigerdata-app / c07767c7-9bab-45c6-b01b-5090ca4940a4

26 Nov 2025 09:10PM UTC coverage: 87.633% (+16.0%) from 71.597%
c07767c7-9bab-45c6-b01b-5090ca4940a4

Pull #2250

circleci

JaymeeH
persisting the approval provenance in the project
Pull Request #2250: Organize the submission provenance for a project

4 of 5 new or added lines in 2 files covered. (80.0%)

986 existing lines in 43 files now uncovered.

2806 of 3202 relevant lines covered (87.63%)

411.27 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

100.0
/app/models/mediaflux/iterator_destroy_request.rb
1
# frozen_string_literal: true
UNCOV
2
module Mediaflux
3✔
UNCOV
3
  class IteratorDestroyRequest < Request
3✔
4
    # Constructor
5
    # @param session_token [String] the API token for the authenticated session
6
    # @iterator [Int] The iterator to destroy (This is the value returned by QueryRequest)
UNCOV
7
    def initialize(session_token:, iterator:)
3✔
UNCOV
8
      super(session_token: session_token)
17✔
UNCOV
9
      @iterator = iterator
17✔
UNCOV
10
    end
11

12
    # Specifies the Mediaflux service to use when running a query
13
    # @return [String]
UNCOV
14
    def self.service
3✔
UNCOV
15
      "asset.query.iterator.destroy"
34✔
UNCOV
16
    end
17

18
    # Returns empty string if iterator was destroyed, error message otherwise.
19
    # Notice that once have run through an iterator Mediaflux destroys it automatically
20
    # so it is possible to get an error indicating that an iterator does not exist if
21
    # Mediaflux deleted it on its own.
UNCOV
22
    def result
3✔
23
      xml = response_xml
1✔
24
      xml.xpath("/response/reply['error']").text
1✔
UNCOV
25
    end
26

UNCOV
27
    private
3✔
28

UNCOV
29
      def build_http_request_body(name:)
3✔
UNCOV
30
        super do |xml|
34✔
UNCOV
31
          xml.args do
34✔
UNCOV
32
            xml.id @iterator
34✔
33
            # An iterator can be destroyed by Mediaflux when we have read all its contents.
34
            # For example if an iterator query has only a few results and we read them all
35
            # in the first iteration then Mediaflux deletes the iterator behind the scenes.
UNCOV
36
            xml.send("ignore-missing") do
34✔
UNCOV
37
              xml.text(true)
34✔
UNCOV
38
            end
UNCOV
39
          end
UNCOV
40
        end
UNCOV
41
      end
UNCOV
42
  end
UNCOV
43
end
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc