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

pulibrary / tigerdata-app / 71d954da-08a6-4760-a6a6-2879d589de6f

28 Oct 2025 01:34PM UTC coverage: 72.228% (-19.1%) from 91.294%
71d954da-08a6-4760-a6a6-2879d589de6f

Pull #2057

circleci

web-flow
Merge branch 'main' into 2037-dashboard-mf
Pull Request #2057: Dashboard displays projects straights from Mediaflux

65 of 69 new or added lines in 4 files covered. (94.2%)

257 existing lines in 31 files now uncovered.

2221 of 3075 relevant lines covered (72.23%)

189.22 hits per line

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

38.1
/app/models/mediaflux/namespace_list_request.rb
1
# frozen_string_literal: true
2
module Mediaflux
1✔
3
  # List all of the namespaces that are inside of a given namespace
4
  # @example
5
  #   namespace_list = Mediaflux::NamespaceListRequest.new(session_token: session_id, parent_namespace: "/td-test-001/tigerdataNS").namespaces
6
  #   => [{:id=>"1264", :name=>"Avocado1NS"}, {:id=>"1282", :name=>"Banana1NS"}]
7
  class NamespaceListRequest < Request
1✔
8
    attr_reader :parent_namespace
1✔
9

10
    # Constructor
11
    # @param session_token [String] the API token for the authenticated session, same as session_id
12
    # @param parent_namespace [String] Parent namespace for the query
13
    def initialize(session_token:, parent_namespace:)
1✔
UNCOV
14
      super(session_token: session_token)
×
UNCOV
15
      @parent_namespace = parent_namespace
×
16
    end
17

18
    # Specifies the Mediaflux service to use when creating assets
19
    # @return [String]
20
    def self.service
1✔
UNCOV
21
      "asset.namespace.list"
×
22
    end
23

24
    def namespaces
1✔
25
      @namespaces ||= begin
×
26
                        xml = response_xml
×
27
                        namespaces = []
×
28
                        xml.xpath("/response/reply/result/namespace/namespace").each.each do |ns|
×
29
                          id = ns.xpath("@id").text
×
30
                          namespaces << { id: id, name: ns.text }
×
31
                        end
32
                        namespaces
×
33
                      end
34
    end
35

36
    private
1✔
37

38
      def build_http_request_body(name:)
1✔
UNCOV
39
        super do |xml|
×
UNCOV
40
          xml.args do
×
UNCOV
41
            xml.namespace parent_namespace
×
42
          end
43
        end
44
      end
45
  end
46
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