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

pulibrary / tigerdata-app / 08446ce4-7a5c-4747-9e3c-78b2b9815a03

10 Oct 2025 03:22PM UTC coverage: 90.897% (-0.08%) from 90.976%
08446ce4-7a5c-4747-9e3c-78b2b9815a03

Pull #2019

circleci

hectorcorrea
Remove code not longer needed
Pull Request #2019: Remove code used to experiment with Mediaflux custom headers

6 of 14 new or added lines in 8 files covered. (42.86%)

2 existing lines in 1 file now uncovered.

2696 of 2966 relevant lines covered (90.9%)

387.9 hits per line

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

0.0
/app/models/mediaflux/script_file_list_init_request.rb
1
# frozen_string_literal: true
2
module Mediaflux
×
3
  class ScriptFileListInitRequest < Request
×
4
    # Constructor
5
    # @param session_token [String] the API token for the authenticated session
6
    # @param path [String] path to the collection we want the list of files for
NEW
7
    def initialize(session_token:, path:)
×
NEW
8
      super(session_token: session_token)
×
9
      @path = path
×
10
    end
×
11

12
    # Specifies the Mediaflux service to use
13
    # @return [String]
14
    def self.service
×
15
      "asset.script.execute"
×
16
    end
×
17

18
    # Returns the iterator that would be use to fetch the file list
19
    def result
×
20
      # Weird: the result comes as an XML inside the typical /response/reply/result
21
      nested_response = response_xml.xpath("/response/reply/result").text
×
22
      nested_xml = Nokogiri::XML.parse(nested_response)
×
23
      nested_xml.xpath("/result/iterator").text.to_i
×
24
    end
×
25

26
    private
×
27

28
      # NOTE: This code is hard-coded to a very specific TCL script that must have been
29
      # installed in Mediaflux ahead of time (via ScriptUploadRequest).
30
      #
31
      # We could make the script name configurable but the complication is that
32
      # different scripts will have different parameters and return entirely different
33
      # kind of results.
34
      def build_http_request_body(name:)
×
35
        super do |xml|
×
36
          # asset.script.execute :id path="/system/scripts/fileList.tcl" :arg -name path "/path/to/collection"
37
          xml.args do
×
38
            xml.id "path=/system/scripts/fileList.tcl"
×
39
            xml.arg name: "path" do
×
40
              xml.text(@path)
×
41
            end
×
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