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

pulibrary / tigerdata-app / b6e4a7c7-d411-4822-a760-84eba5096a52

01 Dec 2025 03:02PM UTC coverage: 74.875% (-12.7%) from 87.594%
b6e4a7c7-d411-4822-a760-84eba5096a52

Pull #2251

circleci

carolyncole
Updating the department select to utilize LuxInputMultiSelect
The component only allows an item to be selected once (only for non asynch results which departments are).
fiexs #2134
Pull Request #2251: Updating the department select to utilize LuxInputMultiSelect

2390 of 3192 relevant lines covered (74.87%)

215.79 hits per line

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

100.0
/app/models/mediaflux/schema_fetch_request.rb
1
# frozen_string_literal: true
2
module Mediaflux
2✔
3
  class SchemaFetchRequest < Request
2✔
4
    def self.service
2✔
5
      "asset.doc.type.describe"
984✔
6
    end
7

8
    def initialize(namespace:, type:, session_token:)
2✔
9
      super(session_token: session_token)
492✔
10
      @namespace = namespace
492✔
11
      @type = type
492✔
12
    end
13

14
    def fields
2✔
15
      elements = response_xml.xpath("/response/reply/result/type/definition/element")
492✔
16
      elements.map { |element| field_from_element(element) }
6,888✔
17
    end
18

19
    private
2✔
20

21
      def build_http_request_body(name:)
2✔
22
        super(name: name) do |xml|
984✔
23
          xml.args do
984✔
24
            xml.namespace @namespace
984✔
25
            xml.type @type
984✔
26
          end
27
        end
28
      end
29

30
      # rubocop:disable Metrics/AbcSize
31
      # rubocop:disable Metrics/MethodLength
32
      def field_from_element(element)
2✔
33
        field = {
34
          name: element.attributes["name"].value,
6,396✔
35
          type: element.attributes["type"].value,
36
          index: element.attributes["index"]&.value == "true",
37
          "min-occurs" => 1,
38
          label: element.attributes["label"]&.value || element.attributes["name"].value,
39
          description: element.xpath("description").text,
40
          instructions: element.xpath("instructions").text
41
        }
42

43
        if element.attributes["min-occurs"].present?
6,396✔
44
          field["min-occurs"] = element.attributes["min-occurs"].value.to_i
2,952✔
45
        end
46

47
        if element.attributes["max-occurs"].present?
6,396✔
48
          field["max-occurs"] = element.attributes["max-occurs"].value.to_i
5,904✔
49
        end
50

51
        field
6,396✔
52
      end
53
    # rubocop:disable Metrics/AbcSize
54
    # rubocop:disable Metrics/MethodLength
55
  end
56
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