• 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_upload_request.rb
1
# frozen_string_literal: true
2
module Mediaflux
×
3
  class ScriptUploadRequest < Request
×
4
    # Constructor
5
    # @param session_token [String] the API token for the authenticated session
6
    # @param namespace [String] namespace where the script will be saved
7
    # @param name [String] name of the script
8
    # @param url [String] URL where the content of the script will be fetched from
NEW
9
    def initialize(session_token:, namespace:, name:, url:)
×
NEW
10
      super(session_token: session_token)
×
11
      @namespace = namespace
×
12
      @name = name
×
13
      @url = url
×
14
    end
×
15

16
    # Specifies the Mediaflux service to use
17
    # @return [String]
18
    def self.service
×
19
      "asset.create"
×
20
    end
×
21

22
    # Returns the id of the asset created
23
    def result
×
24
      response_xml.xpath("/response/reply/result/id").text.to_i
×
25
    end
×
26

27
    private
×
28

29
      # Mimics asset.create :namespace -create true /system/scripts :name yourscript.tcl :url http://some-url/with/yourscript.tcl
30
      def build_http_request_body(name:)
×
31
        super do |xml|
×
32
          xml.args do
×
33
            xml.namespace do
×
34
              xml.parent.set_attribute("create", true)
×
35
              xml.text(@namespace)
×
36
            end
×
37
            xml.name @name
×
38
            xml.url @url
×
39
            # According to the documentation we should be able to pass the `xml-content`
40
            # directly to Mediaflux (instead of fetching it from a URL) but I have not
41
            # been able to pass the content formatted properly for Mediaflux to accept it.
42
            #
43
            # xml.send('xml-content') do
44
            #   xml.text(@content)
45
            # end
46
          end
×
47
        end
×
48
      end
×
49
  end
×
50
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