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

pulibrary / tigerdata-app / 5205f704-d89d-4c43-8cfa-9e6783edc33a

29 Feb 2024 07:04PM UTC coverage: 60.206% (-29.9%) from 90.092%
5205f704-d89d-4c43-8cfa-9e6783edc33a

push

circleci

jrgriffiniii
Ensuring that the storage usage and storage capacity is retrieved for
Mediaflux Projects and rendered on the "contents" Project View

11 of 34 new or added lines in 4 files covered. (32.35%)

451 existing lines in 34 files now uncovered.

935 of 1553 relevant lines covered (60.21%)

9.47 hits per line

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

45.0
/app/models/mediaflux/http/create_collection_accumulator_request.rb
1
# frozen_string_literal: true
2
module Mediaflux
1✔
3
  module Http
1✔
4
    class CreateCollectionAccumulatorRequest < Request
1✔
5
      attr_reader :namespace, :asset_name, :collection
1✔
6

7
      # Constructor
8
      # @param session_token [String] the API token for the authenticated session
9
      # @param collection [String] Id of the collection
10
      # @param name [String] Name of the Accumulator
11
      # @param type [String] type of the Accumulator
12
      #             "collection.asset.count"
13
      #              "content.all.copy.tag.size"
14
      #             "content.all.size"
15
      #              "content.all.store.size"
16
      #              "content.all.store.size.by.owner"
17
      #              "content.all.store.size.by.xpath"
18
      #              "content.all.type.size"
19
      def initialize(session_token:, collection:, name:, type:)
1✔
20
        super(session_token: session_token)
1✔
UNCOV
21
        @name = name
×
UNCOV
22
        @collection = collection
×
UNCOV
23
        @type = type
×
24
      end
25

26
      # Specifies the Mediaflux service to use when creating assets
27
      # @return [String]
28
      def self.service
1✔
UNCOV
29
        "asset.collection.accumulator.add"
×
30
      end
31

32
      private
1✔
33

34
        # The generated XML mimics what we get when we issue an Aterm command as follows:
35
        # > asset.collection.accumulator.add :id 3218 :cascade true
36
        #      :accumulator < :name mytest-01509-count :type collection.asset.count >
37
        #
38
        def build_http_request_body(name:)
1✔
UNCOV
39
          super do |xml|
×
UNCOV
40
            xml.args do
×
UNCOV
41
              xml.id @collection
×
UNCOV
42
              xml.cascade true
×
UNCOV
43
              xml.accumulator do
×
UNCOV
44
                xml.name @name
×
UNCOV
45
                xml.type @type
×
46
              end
47
            end
48
          end
49
        end
50
    end
51
  end
52
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