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

pulibrary / tigerdata-app / 16a249b4-5bc7-4c54-be75-3d7745d7b5c6

28 Oct 2025 08:31PM UTC coverage: 67.902% (-23.4%) from 91.333%
16a249b4-5bc7-4c54-be75-3d7745d7b5c6

Pull #2118

circleci

bess
Upgrade to mediaflux_dev v0.17.0
Pull Request #2118: Upgrade to mediaflux_dev v0.17.0

2181 of 3212 relevant lines covered (67.9%)

80.5 hits per line

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

0.0
/app/models/mediaflux/namespace_list_request.rb
1
# frozen_string_literal: true
2
module Mediaflux
×
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
×
8
    attr_reader :parent_namespace
×
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:)
×
14
      super(session_token: session_token)
×
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
×
21
      "asset.namespace.list"
×
22
    end
×
23

24
    def namespaces
×
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
×
37

38
      def build_http_request_body(name:)
×
39
        super do |xml|
×
40
          xml.args do
×
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