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

pulibrary / tigerdata-app / c9cc5bd1-5545-45fd-aea5-122080e1b208

04 Nov 2025 01:10PM UTC coverage: 91.403%. Remained the same
c9cc5bd1-5545-45fd-aea5-122080e1b208

push

circleci

web-flow
Bump tar from 7.5.1 to 7.5.2 in the npm_and_yarn group across 1 directory (#2126)

Bumps the npm_and_yarn group with 1 update in the / directory:
[tar](https://github.com/isaacs/node-tar).

Updates `tar` from 7.5.1 to 7.5.2
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/isaacs/node-tar/commit/d9ea73a9b"><code>d9ea73a</code></a>
7.5.2</li>
<li><a
href="https://github.com/isaacs/node-tar/commit/5e1a8e638"><code>5e1a8e6</code></a>
Fix sync tar.list when file size reduces while reading</li>
<li><a
href="https://github.com/isaacs/node-tar/commit/0fbeaeddf"><code>0fbeaed</code></a>
formatting</li>
<li><a
href="https://github.com/isaacs/node-tar/commit/2dbacfe33"><code>2dbacfe</code></a>
add types for make-tar util</li>
<li><a
href="https://github.com/isaacs/node-tar/commit/c5865d312"><code>c5865d3</code></a>
remove unused taprc file</li>
<li><a
href="https://github.com/isaacs/node-tar/commit/bdb38096a"><code>bdb3809</code></a>
header: only read from ustar block if not specified in Pax</li>
<li><a
href="https://github.com/isaacs/node-tar/commit/d094cd7b7"><code>d094cd7</code></a>
BlueOak-1.0.0</li>
<li><a
href="https://github.com/isaacs/node-tar/commit/4a6ae729b"><code>4a6ae72</code></a>
Verify invulnerability to tarmageddon attack</li>
<li>See full diff in <a
href="https://github.com/isaacs/node-tar/compare/v7.5.1...v7.5.2">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=tar&package-manager=npm_and_yarn&previous-version=7.5.1&new-version=7.5.2)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores... (continued)

2828 of 3094 relevant lines covered (91.4%)

493.13 hits per line

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

97.67
/app/models/mediaflux/query_request.rb
1
# frozen_string_literal: true
2
module Mediaflux
5✔
3
  class QueryRequest < Request
5✔
4
    attr_reader :aql_query, :collection, :action, :deep_search, :iterator
5✔
5

6
    # Constructor
7
    # @param session_token [String] the API token for the authenticated session
8
    # @param aql_query [String] Optional AQL query string
9
    # @param collection [Integer] Optional collection id
10
    # @param action [String] Optional, by default it uses get-name but it could also be get-meta to get all
11
    #                        the fields for the assets or `get-values` to get a limited list of fields.
12
    # @param deep_search [Bool] Optional, false by default. When true queries the collection and it subcollections.
13
    # @param iterator [Bool] Optional, true by default. When true returns an iterator.  When false returns a list of results
14
    def initialize(session_token:, aql_query: nil, collection: nil, action: "get-values", deep_search: false, iterator: true)
5✔
15
      super(session_token: session_token)
60✔
16
      @aql_query = aql_query
60✔
17
      @collection = collection
60✔
18
      @action = action
60✔
19
      @deep_search = deep_search
60✔
20
      @iterator = iterator
60✔
21
    end
22

23
    # Specifies the Mediaflux service to use when running a query
24
    # @return [String]
25
    def self.service
5✔
26
      "asset.query"
120✔
27
    end
28

29
    # Returns the iterator that could be used to fetch the data
30
    def result
5✔
31
      xml = response_xml
47✔
32
      xml.xpath("/response/reply/result/iterator").text.to_i
47✔
33
    end
34

35
    def result_items
5✔
36
      xml = response_xml
12✔
37
      xml.xpath("/response/reply/result").children.map do |node|
12✔
38
        {
39
          id: node.xpath("./@id").text,
14✔
40
          name: node.xpath("./name").text,
41
          path: node.xpath("./path").text
42
        }
43
      end
44
    end
45

46
    private
5✔
47

48
      def build_http_request_body(name:)
5✔
49
        super do |xml|
120✔
50
          xml.args do
120✔
51
            # TODO: there is a bug in mediaflux that does not allow the comented out line to paginate
52
            #      For the moment we will utilize the where clasue that does allow pagination
53
            # xml.collection collection if collection.present?
54
            if collection.present?
120✔
55
              xml.where mf_where(collection)
86✔
56
            end
57
            xml.where aql_query if aql_query.present?
120✔
58
            xml.action action if action.present?
120✔
59
            declare_get_values_fields(xml) if action == "get-values"
120✔
60
            xml.as "iterator" if iterator
120✔
61
          end
62
        end
63
      end
64

65
      def mf_where(collection)
5✔
66
        if deep_search
86✔
67
          "asset in static collection or subcollection of #{collection}"
86✔
68
        else
69
          "asset in collection #{collection}"
×
70
        end
71
      end
72

73
      # Adds the declarations to fetch specific fields
74
      def declare_get_values_fields(xml)
5✔
75
        declare_get_value_field(xml, "name", "name")
118✔
76
        declare_get_value_field(xml, "path", "path")
118✔
77
        declare_get_value_field(xml, "content/@total-size", "total-size")
118✔
78
        declare_get_value_field(xml, "mtime", "mtime")
118✔
79
        declare_get_value_field(xml, "@collection", "collection")
118✔
80
      end
81

82
      # Adds a single field declaration
83
      def declare_get_value_field(xml, field_xpath, field_name)
5✔
84
        xml.xpath do
590✔
85
          xml.parent.set_attribute("ename", field_name)
590✔
86
          xml.text(field_xpath)
590✔
87
        end
88
      end
89
  end
90
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