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

pulibrary / tigerdata-app / a3f50227-2424-4d41-8788-b953b9d6c802

24 Nov 2025 05:22PM UTC coverage: 70.412% (-17.7%) from 88.064%
a3f50227-2424-4d41-8788-b953b9d6c802

push

circleci

web-flow
Deduplicate department field from requests (#2229)

ref #2147

1 of 4 new or added lines in 1 file covered. (25.0%)

833 existing lines in 48 files now uncovered.

2344 of 3329 relevant lines covered (70.41%)

150.39 hits per line

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

0.0
/app/models/mediaflux/namespace_describe_request.rb
1
# frozen_string_literal: true
UNCOV
2
module Mediaflux
×
3
  # Describes a namespace
4
  # @example
5
  #   namespace = Mediaflux::NamespaceDescribeRequest.new(session_token: session_id).metadata
6
  #   => {:id=>"1", :path=>"/", :name=>"", :description=>"", :store=>"data"}
7
  # @example
8
  #   namespace = Mediaflux::NamespaceDescribeRequest.new(session_token: session_id, path: "/td-test-001/tigerdataNS").metadata
9
  #   => {:id=>"1182", :path=>"/td-test-001/tigerdataNS", :name=>"tigerdataNS", :description=>"TigerData client app root namespace", :store=>"db"}
UNCOV
10
  class NamespaceDescribeRequest < Request
×
UNCOV
11
    attr_reader :path, :id
×
12

13
    # Constructor
14
    # @param session_token [String] the API token for the authenticated session
15
    # @param path [String] path of the asset to be described
16
    # @param id [Integer] TODO: Define what this is and how to use it.
UNCOV
17
    def initialize(session_token:, path: nil, id: nil)
×
UNCOV
18
      super(session_token: session_token)
×
UNCOV
19
      @path = path
×
UNCOV
20
      @id = id
×
UNCOV
21
    end
×
22

23
    # Specifies the Mediaflux service to use
24
    # @return [String]
UNCOV
25
    def self.service
×
UNCOV
26
      "asset.namespace.describe"
×
UNCOV
27
    end
×
28

UNCOV
29
    def metadata
×
UNCOV
30
      @metadata ||= begin
×
UNCOV
31
                      xml = response_xml
×
UNCOV
32
                      node = xml.xpath("/response/reply/result/namespace")
×
UNCOV
33
                      {
×
UNCOV
34
                        id: node.xpath("@id").text,
×
UNCOV
35
                        path: node.xpath("./path").text,
×
UNCOV
36
                        name: node.xpath("./name").text,
×
UNCOV
37
                        description: node.xpath("./description").text,
×
UNCOV
38
                        store: node.xpath("./store").text
×
UNCOV
39
                      }
×
UNCOV
40
                    end
×
UNCOV
41
    end
×
42

UNCOV
43
    def exists?
×
44
      metadata[:id].present?
×
UNCOV
45
    end
×
46

UNCOV
47
    private
×
48

UNCOV
49
      def build_http_request_body(name:)
×
UNCOV
50
        super do |xml|
×
UNCOV
51
          xml.args do
×
UNCOV
52
            xml.id id if id.present?
×
UNCOV
53
            xml.namespace path if path.present?
×
UNCOV
54
          end
×
UNCOV
55
        end
×
UNCOV
56
      end
×
UNCOV
57
  end
×
UNCOV
58
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