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

pulibrary / tigerdata-app / 9ea7e350-740c-4caa-ad7a-7e6162ff5bd1

02 Jul 2025 09:00PM UTC coverage: 71.378% (-0.7%) from 72.117%
9ea7e350-740c-4caa-ad7a-7e6162ff5bd1

Pull #1572

circleci

hectorcorrea
Switched to pass the correct arguments (with dashes instead of underscores) to the service
Pull Request #1572: Create a project in MediaFlux via the tigerdata.project.create service

4 of 18 branches covered (22.22%)

0 of 44 new or added lines in 2 files covered. (0.0%)

17 existing lines in 1 file now uncovered.

2995 of 4196 relevant lines covered (71.38%)

483.21 hits per line

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

0.0
/app/models/mediaflux/project_create_service_request.rb
1
# frozen_string_literal: true
NEW
2
module Mediaflux
×
NEW
3
  class ProjectCreateServiceRequest < Request
×
NEW
4
    attr_reader :token, :service_name, :document
×
5

6
    # Constructor
7
    # @param session_token [String] the API token for the authenticated session
8
    # @param token         [String] Optional User token for the person executing the command
9
    #
NEW
10
    def initialize(session_token:, data_manager:, data_sponsor:, title:, description:, directory:, project_id:, department:, quota:, store:, token: nil)
×
NEW
11
      super(session_token: session_token)
×
NEW
12
      @token = token
×
NEW
13
      @data_manager = data_manager
×
NEW
14
      @data_sponsor = data_sponsor
×
NEW
15
      @title = title
×
NEW
16
      @description = description
×
NEW
17
      @directory = directory
×
NEW
18
      @project_id = project_id
×
NEW
19
      @department = department
×
NEW
20
      @quota = quota
×
NEW
21
      @store = store
×
NEW
22
    end
×
23

24
    # Specifies the Mediaflux service to use when creating project
25
    # @return [String]
NEW
26
    def self.service
×
NEW
27
      "tigerdata.project.create"
×
NEW
28
    end
×
29

NEW
30
    private
×
31

32
      # rubocop:disable Metrics/MethodLength
33
      #
34
      # This is what the call would look like from aterm:
35
      # tigerdata.project.create \
36
      #   :data-manager md1908 \
37
      #   :data-sponsor hc8719 \
38
      #   :department "Physics" \
39
      #   :description "Our fake project" \
40
      #   :directory tigerdata/RC/td-testing/md1908/HectorProject2 \
41
      #   :project-id "fake.id" \
42
      #   :quota "10 TB" \
43
      #   :store db \
44
      #   :title "Fake Study"
45
      #
NEW
46
      def build_http_request_body(name:)
×
NEW
47
        super do |xml|
×
NEW
48
          xml.args do
×
NEW
49
            xml.send("data-manager") do
×
NEW
50
              xml.text(@data_manager)
×
NEW
51
            end
×
NEW
52
            xml.send("data-sponsor") do
×
NEW
53
              xml.text(@data_sponsor)
×
NEW
54
            end
×
NEW
55
            xml.department @department
×
NEW
56
            xml.description @description
×
NEW
57
            xml.directory @directory
×
NEW
58
            xml.send("project-id") do
×
NEW
59
              xml.text(@project_id)
×
NEW
60
            end
×
NEW
61
            xml.quota @quota
×
NEW
62
            xml.store @store
×
NEW
63
            xml.title @title
×
NEW
64
          end
×
NEW
65
        end
×
NEW
66
      end
×
67
    # rubocop:enable Metrics/MethodLength
NEW
68
  end
×
NEW
69
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