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

pulibrary / tigerdata-app / c9cc5bd1-5545-45fd-aea5-122080e1b208

04 Nov 2025 01:10PM UTC coverage: 91.403%. Remained the same
c9cc5bd1-5545-45fd-aea5-122080e1b208

push

circleci

web-flow
Bump tar from 7.5.1 to 7.5.2 in the npm_and_yarn group across 1 directory (#2126)

Bumps the npm_and_yarn group with 1 update in the / directory:
[tar](https://github.com/isaacs/node-tar).

Updates `tar` from 7.5.1 to 7.5.2
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/isaacs/node-tar/commit/d9ea73a9b"><code>d9ea73a</code></a>
7.5.2</li>
<li><a
href="https://github.com/isaacs/node-tar/commit/5e1a8e638"><code>5e1a8e6</code></a>
Fix sync tar.list when file size reduces while reading</li>
<li><a
href="https://github.com/isaacs/node-tar/commit/0fbeaeddf"><code>0fbeaed</code></a>
formatting</li>
<li><a
href="https://github.com/isaacs/node-tar/commit/2dbacfe33"><code>2dbacfe</code></a>
add types for make-tar util</li>
<li><a
href="https://github.com/isaacs/node-tar/commit/c5865d312"><code>c5865d3</code></a>
remove unused taprc file</li>
<li><a
href="https://github.com/isaacs/node-tar/commit/bdb38096a"><code>bdb3809</code></a>
header: only read from ustar block if not specified in Pax</li>
<li><a
href="https://github.com/isaacs/node-tar/commit/d094cd7b7"><code>d094cd7</code></a>
BlueOak-1.0.0</li>
<li><a
href="https://github.com/isaacs/node-tar/commit/4a6ae729b"><code>4a6ae72</code></a>
Verify invulnerability to tarmageddon attack</li>
<li>See full diff in <a
href="https://github.com/isaacs/node-tar/compare/v7.5.1...v7.5.2">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=tar&package-manager=npm_and_yarn&previous-version=7.5.1&new-version=7.5.2)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores... (continued)

2828 of 3094 relevant lines covered (91.4%)

493.13 hits per line

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

100.0
/app/models/mediaflux/asset.rb
1
# frozen_string_literal: true
2
module Mediaflux
3✔
3
  class Asset
3✔
4
    attr_accessor :id, :path, :collection, :size
3✔
5

6
    def initialize(id:, name:, collection:, path: nil, last_modified_mf: nil, size: nil)
3✔
7
      @id = id
223✔
8
      @name = name
223✔
9
      @path = path
223✔
10
      @collection = collection
223✔
11
      @size = size
223✔
12
      @last_modified_mf = last_modified_mf
223✔
13
    end
14

15
    def name
3✔
16
      # Mediaflux supports the concept of files without a name and in those cases the
17
      # "name" property might be empty, but the actual name assigned internally by
18
      # Mediaflux (e.g. __asset_id__4665) is still reflected in the path.
19
      if @name == ""
184✔
20
        Pathname.new(path).basename.to_s
166✔
21
      else
22
        @name
18✔
23
      end
24
    end
25

26
    # Returns the path to the asset but without the root collection namespace as part of it.
27
    #
28
    # Example:
29
    #   path        -> "/tigerdata/projectg/folder1/file-abc.txt"
30
    #   path_short  -> "/projectg/folder1/file-abc.txt"
31
    def path_short
3✔
32
      return nil if path.nil?
180✔
33
      if path.starts_with?(Mediaflux::Connection.root_collection_namespace)
180✔
34
        path[Mediaflux::Connection.root_collection_namespace.length..-1]
4✔
35
      else
36
        path
176✔
37
      end
38
    end
39

40
    # Returns the last modified date but using the standard ISO 8601 (https://en.wikipedia.org/wiki/ISO_8601)
41
    def last_modified
3✔
42
      return nil if @last_modified_mf.nil?
179✔
43
      # https://nandovieira.com/working-with-dates-on-ruby-on-rails
44
      # Mediaflux dates are in UTC and look like this "07-Feb-2024 21:48:01"
45
      Object::Time.zone.parse(@last_modified_mf).in_time_zone("America/New_York").iso8601
179✔
46
    end
47

48
    # Returns the path for the asset
49
    # For a collection returns the path_short, but for a file is the dirname of the path_short
50
    #
51
    # Example for a file:
52
    #   path        -> "/tigerdata/projectg/folder1/file-abc.txt"
53
    #   path_short  -> "/projectg/folder1/file-abc.txt"
54
    #   path_only  -> "/projectg/folder1"
55
    # Example for a collection:
56
    #   path        -> "/tigerdata/projectg/folder1"
57
    #   path_short  -> "/projectg/folder1"
58
    #   path_only  -> "/projectg/folder1"
59
    def path_only
3✔
60
      return nil if path.nil?
178✔
61
      if collection
178✔
62
        path_short
1✔
63
      else
64
        p = Pathname.new(path_short)
177✔
65
        p.dirname.to_s
177✔
66
      end
67
    end
68
  end
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