ndr_dev_support 6.1.0 → 6.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +12 -0
- data/code_safety.yml +8 -8
- data/lib/ndr_dev_support/version.rb +1 -1
- data/lib/tasks/audit_bundle.rake +40 -4
- data/lib/tasks/ci/brakeman.rake +18 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 538f2514db4fc9b6227cbb94aa9d72521b7c0a36ee24e6a711e9bc1d369fbc57
|
4
|
+
data.tar.gz: 9f939ecd79212a0d8818d2c718d71b7f95e148bf86671c2c349d32f8e5675cb7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6b13169c99faddabcce0a28bdafb78ca5c7c899e1affc263df976030dcfef3a991742aaab569e80ab763726c9d525cd1f792a45b8bf0daed91bae60e404a4aa9
|
7
|
+
data.tar.gz: df4d686cd9d8e2de66c6bdfc070a4221baff52c6fe5bf4ca064f9f94dd4ab30311848e15f5f955b82d1d3c16f0845ac07afbba93c6a4d4b77226b217928226ab
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,18 @@
|
|
1
1
|
## [Unreleased]
|
2
2
|
* No unreleased changes
|
3
3
|
|
4
|
+
## 6.1.3 / 2022-05-25
|
5
|
+
### Fixed
|
6
|
+
* bundle:update should update secondary gem lock files
|
7
|
+
|
8
|
+
## 6.1.2 / 2022-05-24
|
9
|
+
### Fixed
|
10
|
+
* bundle:update should fetch binary gems for all bundled platforms
|
11
|
+
|
12
|
+
## 6.1.1 / 2022-04-29
|
13
|
+
### Fixed
|
14
|
+
* CI: fix crashes when brakeman parsing fails
|
15
|
+
|
4
16
|
## 6.1.0 / 2022-04-28
|
5
17
|
### Fixed
|
6
18
|
* CI: support Ruby 3.0
|
data/code_safety.yml
CHANGED
@@ -11,7 +11,7 @@ file safety:
|
|
11
11
|
".github/workflows/test.yml":
|
12
12
|
comments:
|
13
13
|
reviewed_by: brian.shand
|
14
|
-
safe_revision:
|
14
|
+
safe_revision: c911246250d5387264d5a926c2572f98db58be6e
|
15
15
|
".gitignore":
|
16
16
|
comments:
|
17
17
|
reviewed_by: josh.pencheon
|
@@ -27,7 +27,7 @@ file safety:
|
|
27
27
|
CHANGELOG.md:
|
28
28
|
comments:
|
29
29
|
reviewed_by: brian.shand
|
30
|
-
safe_revision:
|
30
|
+
safe_revision: 5d47f0c8574b6fbc69f9144ce508f169b95cd90c
|
31
31
|
CODE_OF_CONDUCT.md:
|
32
32
|
comments:
|
33
33
|
reviewed_by: timgentry
|
@@ -126,8 +126,8 @@ file safety:
|
|
126
126
|
safe_revision: 3fdf010a91bd9927ef34e3df66b8a4bbbd20315a
|
127
127
|
lib/ndr_dev_support/daemon/stoppable.rb:
|
128
128
|
comments:
|
129
|
-
reviewed_by:
|
130
|
-
safe_revision:
|
129
|
+
reviewed_by: brian.shand
|
130
|
+
safe_revision: ff47991823556a6936a7457b4a1eb9373851ee57
|
131
131
|
lib/ndr_dev_support/integration_testing.rb:
|
132
132
|
comments:
|
133
133
|
reviewed_by: josh.pencheon
|
@@ -231,7 +231,7 @@ file safety:
|
|
231
231
|
lib/ndr_dev_support/version.rb:
|
232
232
|
comments:
|
233
233
|
reviewed_by: brian.shand
|
234
|
-
safe_revision:
|
234
|
+
safe_revision: 5d47f0c8574b6fbc69f9144ce508f169b95cd90c
|
235
235
|
lib/tasks/audit_bundle.rake:
|
236
236
|
comments:
|
237
237
|
reviewed_by: brian.shand
|
@@ -275,8 +275,8 @@ file safety:
|
|
275
275
|
safe_revision: f828113894a16581d0aa181504c799e661f8401d
|
276
276
|
lib/tasks/ci/prometheus.rake:
|
277
277
|
comments:
|
278
|
-
reviewed_by:
|
279
|
-
safe_revision:
|
278
|
+
reviewed_by: brian.shand
|
279
|
+
safe_revision: b30f609f1978015522eb8f60b2a81730d4b7de62
|
280
280
|
lib/tasks/ci/redmine.rake:
|
281
281
|
comments:
|
282
282
|
reviewed_by: josh.pencheon
|
@@ -308,7 +308,7 @@ file safety:
|
|
308
308
|
ndr_dev_support.gemspec:
|
309
309
|
comments:
|
310
310
|
reviewed_by: brian.shand
|
311
|
-
safe_revision:
|
311
|
+
safe_revision: c911246250d5387264d5a926c2572f98db58be6e
|
312
312
|
test/daemon/ci_server_test.rb:
|
313
313
|
comments:
|
314
314
|
reviewed_by: josh.pencheon
|
data/lib/tasks/audit_bundle.rake
CHANGED
@@ -11,6 +11,10 @@ namespace :bundle do
|
|
11
11
|
Updates the bundled gem (e.g. rails) version to e.g. 6.0.4.7
|
12
12
|
and provides instructions for committing changes.
|
13
13
|
It will attempt to modify a hardcoded version in the Gemfile if necessary.
|
14
|
+
|
15
|
+
If a secondary Gemfile is present in the same directory, e.g. Gemfile.monterey,
|
16
|
+
and it defines constants such as BUNDLER_OVERRIDE_PUMA=true, then this task
|
17
|
+
will attempt to update the secondary lock file, e.g. Gemfile.monterey.lock too.
|
14
18
|
USAGE
|
15
19
|
task(:update) do
|
16
20
|
unless %w[git git-svn].include?(repository_type)
|
@@ -108,14 +112,44 @@ namespace :bundle do
|
|
108
112
|
exit 1
|
109
113
|
end
|
110
114
|
|
115
|
+
gem_list = Bundler.with_unbundled_env { `bundle exec gem list ^#{gem}$` }
|
116
|
+
new_gem_version2 = gem_list.match(/ \(([0-9.]+)( [a-z0-9_-]*)?\)$/).to_a[1]
|
117
|
+
|
118
|
+
# Update secondary Gemfile.lock to keep vendored gems in sync
|
119
|
+
secondary_gemfiles = `git ls-tree --name-only HEAD Gemfile.*`.split("\n").grep_v(/[.]lock$/)
|
120
|
+
secondary_gemfiles.each do |secondary_gemfile|
|
121
|
+
gem_re = /^BUNDLER_OVERRIDE_([^ =]*) *=/
|
122
|
+
secondary_gems = File.readlines(secondary_gemfile).grep(gem_re).
|
123
|
+
collect { |s| gem_re.match(s)[1].downcase }
|
124
|
+
if secondary_gems.empty?
|
125
|
+
puts "Warning: cannot update #{secondary_gemfile}.lock - no BUNDLER_OVERRIDE_... entries"
|
126
|
+
next
|
127
|
+
end
|
128
|
+
puts "Updating #{secondary_gemfile}.lock"
|
129
|
+
FileUtils.cp('Gemfile.lock', "#{secondary_gemfile}.lock")
|
130
|
+
Bundler.with_unbundled_env do
|
131
|
+
system("BUNDLE_GEMFILE=#{secondary_gemfile} bundle update --quiet \
|
132
|
+
--conservative --minor #{secondary_gems.join(' ')}")
|
133
|
+
end
|
134
|
+
system('git checkout -q vendor/cache/')
|
135
|
+
system('git clean -q -f vendor/cache')
|
136
|
+
Bundler.with_unbundled_env { system('bundle install --local --quiet 2> /dev/null') }
|
137
|
+
puts "Finished updating #{secondary_gemfile}.lock"
|
138
|
+
end
|
139
|
+
|
140
|
+
# Retrieve binary gems for platforms listed in Gemfile.lock
|
141
|
+
platforms = `bundle platform`.split("\n").grep(/^[*] x86_64-/).collect { |s| s[2..] }
|
142
|
+
Dir.chdir('vendor/cache') do
|
143
|
+
platforms.each do |platform|
|
144
|
+
system("gem fetch #{gem} --version=#{new_gem_version2} --platform=#{platform}")
|
145
|
+
end
|
146
|
+
end
|
147
|
+
|
111
148
|
if File.exist?(SAFETY_FILE)
|
112
149
|
# Remove references to unused files in code_safety.yml
|
113
150
|
system('rake audit:tidy_code_safety_file')
|
114
151
|
end
|
115
152
|
|
116
|
-
gem_list = Bundler.with_unbundled_env { `bundle exec gem list ^#{gem}$` }
|
117
|
-
new_gem_version2 = gem_list.match(/ \(([0-9.]+)( [a-z0-9_-]*)?\)$/).to_a[1]
|
118
|
-
|
119
153
|
if new_gem_version && new_gem_version != new_gem_version2
|
120
154
|
puts <<~MSG
|
121
155
|
Error: Tried to update gem #{gem} to version #{new_gem_version} but ended up at version #{new_gem_version2}. Aborting.
|
@@ -132,7 +166,9 @@ namespace :bundle do
|
|
132
166
|
puts "Looking for changed files using git status\n\n"
|
133
167
|
files_to_git_rm = `git status vendor/cache/|grep 'deleted: ' | \
|
134
168
|
grep -o ': .*' | sed -e 's/^: *//'`.split("\n")
|
135
|
-
|
169
|
+
secondary_lockfiles = secondary_gemfiles.collect { |s| "#{s}.lock" }
|
170
|
+
files_to_git_add = `git status Gemfile Gemfile.lock #{secondary_gemfiles.join(' ')} \
|
171
|
+
#{secondary_lockfiles.join(' ')} code_safety.yml config/code_safety.yml| \
|
136
172
|
grep 'modified: ' | \
|
137
173
|
grep -o ': .*' | sed -e 's/^: *//'`.split("\n")
|
138
174
|
files_to_git_add += `git status vendor/cache|expand|grep '^\s*vendor/cache' | \
|
data/lib/tasks/ci/brakeman.rake
CHANGED
@@ -32,7 +32,24 @@ namespace :ci do
|
|
32
32
|
|
33
33
|
brakeman = NdrDevSupport::RakeCI::BrakemanHelper.new
|
34
34
|
brakeman.commit = @commit
|
35
|
-
|
35
|
+
begin
|
36
|
+
brakeman.run(strict: true)
|
37
|
+
rescue StandardError => e
|
38
|
+
warn <<~MESSAGE
|
39
|
+
Error: Brakeman failed with #{e.class}: #{e}
|
40
|
+
There is probably a ruby syntax error in one of the files. To find it, run:
|
41
|
+
$ brakeman -I --debug
|
42
|
+
For the full backtrace, run
|
43
|
+
$ rake ci:brakeman --trace
|
44
|
+
MESSAGE
|
45
|
+
@attachments << {
|
46
|
+
color: 'danger',
|
47
|
+
title: 'Brakeman Error',
|
48
|
+
text: 'Brakeman run failed. Run brakeman -I --debug',
|
49
|
+
footer: 'bundle exec rake ci:brakeman:strict'
|
50
|
+
}
|
51
|
+
next
|
52
|
+
end
|
36
53
|
|
37
54
|
@metrics.concat(brakeman.metrics)
|
38
55
|
@attachments.concat(brakeman.attachments)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ndr_dev_support
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 6.1.
|
4
|
+
version: 6.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- NCRS Development Team
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-05-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pry
|