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

pulibrary / tigerdata-app / d7ce1bf9-25b8-4b3e-b9dd-43f9a26f2d96

17 Oct 2025 05:51PM UTC coverage: 91.054%. Remained the same
d7ce1bf9-25b8-4b3e-b9dd-43f9a26f2d96

Pull #2055

circleci

jrgriffiniii
- Ensuring that `parallelism` is set to 4
- Separating `system` RSpec spec suites in the CI build
- Using an `inconsistent` RSpec tag to mark inconsistently failing tests
- Ensuring that CI does not run for `inconsistent` tests
Pull Request #2055: Ensuring that `parallelism` is set to 4 for CircleCI and separates `system` and inconsistently-failing tests into separate CI jobs

2738 of 3007 relevant lines covered (91.05%)

380.37 hits per line

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

100.0
/app/models/mediaflux/logon_request.rb
1
# frozen_string_literal: true
2
module Mediaflux
5✔
3
  class LogonRequest < Request
5✔
4
    # Specifies the logon service within the Mediaflux API
5
    # @return [String]
6
    def self.service
5✔
7
      "system.logon"
3,504✔
8
    end
9

10
    # Specifies the user domain for the Mediaflux API authentication
11
    # @return [String]
12
    def self.mediaflux_domain
5✔
13
      mediaflux["api_domain"]
1,751✔
14
    end
15

16
    # Specifies the user for the Mediaflux API authentication
17
    # @return [String]
18
    def self.mediaflux_user
5✔
19
      mediaflux["api_user"]
1,751✔
20
    end
21

22
    # Specifies the password for the Mediaflux API authentication
23
    # @return [String]
24
    def self.mediaflux_password
5✔
25
      mediaflux["api_password"]
1,751✔
26
    end
27

28
    def initialize(domain: self.class.mediaflux_domain, user: self.class.mediaflux_user, password: self.class.mediaflux_password, identity_token: nil, token_type: nil)
5✔
29
      @domain = domain
1,752✔
30
      @user = user
1,752✔
31
      @password = password
1,752✔
32
      @identity_token = identity_token
1,752✔
33
      @token_type = token_type
1,752✔
34
      super()
1,752✔
35
    end
36

37
    # Authenticates the Mediaflux API using the credentials set within the Rails configuration,
38
    # and set the token for the API session if the request has not already been resolved
39
    # @return [String] the session token generated by the Mediaflux API
40
    def session_token
5✔
41
      @session_token ||= response_session_token
1,749✔
42
    end
43

44
    private
5✔
45

46
      class << self
5✔
47
        # The Rails configuration options specifying the Mediaflux server
48
        # @return [Hash]
49
        def mediaflux
5✔
50
          Rails.configuration.mediaflux
5,253✔
51
        end
52
      end
53

54
      def response_session_element
5✔
55
        response_xml.xpath("response/reply/result/session")
1,749✔
56
      end
57

58
      def response_session_token
5✔
59
        value = response_session_element.text
1,749✔
60
        value.strip
1,749✔
61
      end
62

63
      def build_http_request_body(name:)
5✔
64
        super do |xml|
3,504✔
65
          xml.args do
3,504✔
66
            if @identity_token.nil?
3,504✔
67
              xml.domain @domain
3,502✔
68
              xml.user @user
3,502✔
69
              xml.password @password
3,502✔
70
            else
71
              xml.token do
2✔
72
                xml.parent.set_attribute("type", @token_type) if @token_type
2✔
73
                xml.text(@identity_token)
2✔
74
              end
75
            end
76
          end
77
        end
78
      end
79
  end
80
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