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

pulibrary / tigerdata-app / 5205f704-d89d-4c43-8cfa-9e6783edc33a

29 Feb 2024 07:04PM UTC coverage: 60.206% (-29.9%) from 90.092%
5205f704-d89d-4c43-8cfa-9e6783edc33a

push

circleci

jrgriffiniii
Ensuring that the storage usage and storage capacity is retrieved for
Mediaflux Projects and rendered on the "contents" Project View

11 of 34 new or added lines in 4 files covered. (32.35%)

451 existing lines in 34 files now uncovered.

935 of 1553 relevant lines covered (60.21%)

9.47 hits per line

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

47.83
/app/models/mediaflux/http/range_query_request.rb
1
# frozen_string_literal: true
2
module Mediaflux
1✔
3
  module Http
1✔
4
    class RangeQueryRequest < Request
1✔
5
      attr_reader :aql_query, :idx, :size, :collection, :namespace, :action
1✔
6

7
      # Constructor
8
      # @param session_token [String] the API token for the authenticated session
9
      # @param collection [Integer] collection id
10
      # @param xpath [String]  xpath expression for item to calculate the range against
11
      def initialize(session_token:, collection: nil, xpath: nil)
1✔
12
        super(session_token: session_token)
2✔
UNCOV
13
        @collection = collection
×
UNCOV
14
        @xpath = xpath
×
15
      end
16

17
      # Specifies the Mediaflux service to use when running a query
18
      # @return [String]
19
      def self.service
1✔
UNCOV
20
        "asset.query"
×
21
      end
22

23
      # minimum value for xpath
24
      def minimum
1✔
UNCOV
25
        min_str = response_xml.xpath("/response/reply/result/value/min").text
×
UNCOV
26
        min_str.to_i
×
27
      end
28

29
      # maximum value for xpath
30
      def maximum
1✔
UNCOV
31
        max_str = response_xml.xpath("/response/reply/result/value/max").text
×
UNCOV
32
        max_str.to_i
×
33
      end
34

35
      private
1✔
36

37
        def build_http_request_body(name:)
1✔
UNCOV
38
          super do |xml|
×
UNCOV
39
            xml.args do
×
UNCOV
40
              xml.collection @collection
×
UNCOV
41
              xml.action "range"
×
UNCOV
42
              xml.xpath @xpath
×
43
            end
44
          end
45
        end
46
    end
47
  end
48
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