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

pulibrary / pdc_discovery / af9d18f9-5897-471a-b60b-dcfc3193b61a

11 Sep 2025 06:37PM UTC coverage: 96.873% (-0.1%) from 97.006%
af9d18f9-5897-471a-b60b-dcfc3193b61a

push

circleci

web-flow
Bump vite from 6.2.7 to 6.3.6 (#821)

Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 6.2.7 to 6.3.6.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v6.3.6/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v6.3.6/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-version: 6.3.6
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

2912 of 3006 relevant lines covered (96.87%)

117.39 hits per line

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

92.75
/app/models/version_footer.rb
1
# frozen_string_literal: true
2

3
# Retrieves version information from Capistrano's files. The general approach is
4
# to read the version information (branch name, git SHA, and date deployed) out
5
# of Capistrano's revisions.log file.
6
#
7
# The code is a bit more complicated than it should because Capistrano does not
8
# always update the revision.log file before the application reads this information.
9
# Therefore there is logic in this class to detect if the version information is
10
# stale and re-read it until it is up to date. Because re-reading this file is
11
# an expensive operation we cache the information as soon as we are sure it's
12
# current.
13
#
14
# rubocop:disable Style/ClassVars
15
class VersionFooter
1✔
16
  DEPLOYMENT_LOGFILE_COL_NUMBER = 7
1✔
17
  REVISIONS_LOG_COL = 3
1✔
18
  DEFAULT_SHA = "Unknown SHA"
1✔
19

20
  @@stale = true
1✔
21
  @@git_sha = nil
1✔
22
  @@branch = nil
1✔
23
  @@version = nil
1✔
24

25
  # Returns a hash with version information.
26
  def self.info
1✔
27
    reset! if stale?
75✔
28
    { sha: git_sha, branch: branch, version: version, stale: stale?, tagged_release: tagged_release? }
75✔
29
  end
30

31
  def self.reset!
1✔
32
    # Initalize these values so that they recalculated
33
    @@git_sha = nil
78✔
34
    @@branch = nil
78✔
35
    @@version = nil
78✔
36

37
    @@local_sha = nil
78✔
38
    @@revisions = nil
78✔
39

40
    @@git_sha = nil
78✔
41
    @@revisions_head = nil
78✔
42
    @@revisions_log = nil
78✔
43
  end
44

45
  def self.revisions
1✔
46
    return unless File.exist?(revision_file)
376✔
47

48
    @@revisions ||= File.read(revision_file).chomp
376✔
49
  end
50

51
  def self.local_sha
1✔
52
    return unless revisions
300✔
53

54
    @@local_sha ||= revisions.gsub(/\)$/, '')
300✔
55
  end
56

57
  def self.revisions_log
1✔
58
    return unless File.exist?(revisions_logfile)
76✔
59

60
    content = `tail -1 #{revisions_logfile}`.chomp
76✔
61
    elements = content.split(" ")
76✔
62
    return if elements.length < REVISIONS_LOG_COL
76✔
63

64
    element = elements[REVISIONS_LOG_COL]
76✔
65
    @@revisions_log ||= element.gsub(/\)$/, '')
76✔
66
  end
67

68
  def self.revisions_head
1✔
69
    return unless Rails.env.development? || Rails.env.test?
×
70

71
    @@revisions_head ||= `git rev-parse HEAD`.chomp
×
72
  end
73

74
  def self.git_sha
1✔
75
    @@git_sha ||= revisions_log || revisions_head || DEFAULT_SHA
225✔
76
  end
77

78
  def self.stale?
1✔
79
    return false unless local_sha
150✔
80

81
    local_sha != git_sha
150✔
82
  end
83

84
  def self.tagged_release?
1✔
85
    # e.g. v0.8.0
86
    branch.match(/^v[\d+\.+]+/) != nil
75✔
87
  end
88

89
  def self.branch
1✔
90
    @@branch ||= if File.exist?(revisions_logfile)
150✔
91
                   `tail -1 #{revisions_logfile}`.chomp.split(" ")[1]
75✔
92
                 elsif Rails.env.development? || Rails.env.test?
×
93
                   `git rev-parse --abbrev-ref HEAD`.chomp
×
94
                 else
95
                   "Unknown branch"
×
96
                 end
97
  end
98

99
  def self.find_version
1✔
100
    return "Not in deployed environment" unless File.exist?(revisions_logfile)
75✔
101

102
    output = `tail -1 #{revisions_logfile}`
75✔
103
    entries = output.chomp.split(" ")
75✔
104
    return "(Deployment date could not be parsed from: #{output}.)" if entries.length <= DEPLOYMENT_LOGFILE_COL_NUMBER
75✔
105

106
    deployment_entry = entries[DEPLOYMENT_LOGFILE_COL_NUMBER]
1✔
107
    deployment_date = Date.parse(deployment_entry)
1✔
108
    return "(Deployment date could not be parsed from: #{deployment_entry}.)" if deployment_date.nil?
1✔
109

110
    formatted = deployment_date.strftime("%d %B %Y")
1✔
111
    formatted
1✔
112
  end
113

114
  def self.version
1✔
115
    @@version ||= find_version
75✔
116
  end
117

118
  # This file is local to the application.
119
  # This file only has the git SHA of the version deployed (i.e. no date or branch)
120
  def self.revision_file
1✔
121
    @@revision_file ||= Rails.root.join("REVISION")
452✔
122
  end
123

124
  # Capistrano keeps this file a couple of levels up _outside_ the application.
125
  # This file includes all the information that we need (git SHA, branch name, date)
126
  def self.revisions_logfile
1✔
127
    @@revisions_logfile ||= Rails.root.join("..", "..", "revisions.log")
452✔
128
  end
129

130
  # These assignment methods are needed to facilitate testing
131
  def self.revision_file=(x)
1✔
132
    @@revision_file = x
2✔
133
  end
134

135
  def self.revisions_logfile=(x)
1✔
136
    @@revisions_logfile = x
2✔
137
  end
138
end
139
# rubocop:enable RuboCop::Cop::Style::ClassVars
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