ndr_dev_support 6.1.2 → 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 +4 -0
- data/lib/ndr_dev_support/version.rb +1 -1
- data/lib/tasks/audit_bundle.rake +29 -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
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)
|
@@ -111,6 +115,28 @@ namespace :bundle do
|
|
111
115
|
gem_list = Bundler.with_unbundled_env { `bundle exec gem list ^#{gem}$` }
|
112
116
|
new_gem_version2 = gem_list.match(/ \(([0-9.]+)( [a-z0-9_-]*)?\)$/).to_a[1]
|
113
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
|
+
|
114
140
|
# Retrieve binary gems for platforms listed in Gemfile.lock
|
115
141
|
platforms = `bundle platform`.split("\n").grep(/^[*] x86_64-/).collect { |s| s[2..] }
|
116
142
|
Dir.chdir('vendor/cache') do
|
@@ -140,7 +166,9 @@ namespace :bundle do
|
|
140
166
|
puts "Looking for changed files using git status\n\n"
|
141
167
|
files_to_git_rm = `git status vendor/cache/|grep 'deleted: ' | \
|
142
168
|
grep -o ': .*' | sed -e 's/^: *//'`.split("\n")
|
143
|
-
|
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| \
|
144
172
|
grep 'modified: ' | \
|
145
173
|
grep -o ': .*' | sed -e 's/^: *//'`.split("\n")
|
146
174
|
files_to_git_add += `git status vendor/cache|expand|grep '^\s*vendor/cache' | \
|
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-05-
|
11
|
+
date: 2022-05-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pry
|