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

pulibrary / tigerdata-app / da06f62a-2e8b-4995-ae49-246e33b0661f

03 Nov 2025 07:07PM UTC coverage: 91.368% (-0.03%) from 91.4%
da06f62a-2e8b-4995-ae49-246e33b0661f

Pull #2126

circleci

bess
Bump tar in the npm_and_yarn group across 1 directory

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
- [Release notes](https://github.com/isaacs/node-tar/releases)
- [Changelog](https://github.com/isaacs/node-tar/blob/main/CHANGELOG.md)
- [Commits](https://github.com/isaacs/node-tar/compare/v7.5.1...v7.5.2)

---
updated-dependencies:
- dependency-name: tar
  dependency-version: 7.5.2
  dependency-type: indirect
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
Pull Request #2126: Bump tar from 7.5.1 to 7.5.2 in the npm_and_yarn group across 1 directory

2826 of 3093 relevant lines covered (91.37%)

486.76 hits per line

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

100.0
/app/operations/project_search.rb
1
class ProjectSearch < Dry::Operation
3✔
2
    def call(search_string:, requestor:, field_name: "Title")
3✔
3
        verified_search_string = step verify_search_string(search_string)
14✔
4
        result_ids = step query_mediaflux(search_string: verified_search_string, requestor:, field_name:)
13✔
5
        step convert_results(result_ids)
12✔
6
    end
7

8
    private
3✔
9

10
    def verify_search_string(search_string)
3✔
11
        # An empty search does not make sense
12
        if search_string.blank?
14✔
13
            Failure("Search String cannot be empty")
1✔
14
        # Assuming there may be more verifications in the future
15
        else
16
            Success(search_string)
13✔
17
        end
18
    end
19

20
    def query_mediaflux(search_string:, requestor:, field_name:)
3✔
21
      query = mediaflux_query(search_string:, requestor:, field_name:)
13✔
22
      if query.error?
13✔
23
        Failure("Error querying mediaflux: #{query.response_error[:message]}")
1✔
24
      else
25
        result_ids = query.result_items.map{|result| result[:id]}
26✔
26
        Success(result_ids)
12✔
27
      end
28
    end
29

30
    def mediaflux_query(search_string:, requestor:, field_name:)
3✔
31
      aql_query = "xpath(tigerdata:project/#{field_name}) matches ignore-case '#{search_string}'"
13✔
32
      Mediaflux::QueryRequest.new(session_token: requestor.mediaflux_session, aql_query: , iterator: false )
13✔
33
    end
34

35

36
    def convert_results(result_ids)
3✔
37
        errors = []
12✔
38
        projects = result_ids.map do |mediaflux_id|
12✔
39
          project = Project.find_by(mediaflux_id: )
14✔
40
          if project.blank?
14✔
41
            errors << mediaflux_id
1✔
42
          end
43
          project
14✔
44
        end
45
        if errors.count > 0
12✔
46
          Failure("The following Mediaflux Projects were not found in the Rails database: #{errors.join(', ')}")
1✔
47
        else
48
          Success(projects)
11✔
49
        end
50
    end
51
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