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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a58e21dc2fa2f9a5fa7227b70cd0c6bdd769adb379df912c02e56675cea01b37
4
- data.tar.gz: 1b8d2ed30881f8e810ec995f32fbbf1db1528e43a8d983f34f2dd0c0afbdc6ad
3
+ metadata.gz: 538f2514db4fc9b6227cbb94aa9d72521b7c0a36ee24e6a711e9bc1d369fbc57
4
+ data.tar.gz: 9f939ecd79212a0d8818d2c718d71b7f95e148bf86671c2c349d32f8e5675cb7
5
5
  SHA512:
6
- metadata.gz: f81704490c03a2075c031c1e428259083404cff81c9fce8c051bb80744a94a8e4a3b066ce09f88ce69e5e9cc0870f389e29b11223401977e626da0b4b061bac3
7
- data.tar.gz: 1cebef3b8ee8e41c38577b8639618300332cf77a87c937aa9e575c30d4305748143325f5f9a90674c921d6c6eb86fe5a5245fa7df8c61c97c22bcec96eff1172
6
+ metadata.gz: 6b13169c99faddabcce0a28bdafb78ca5c7c899e1affc263df976030dcfef3a991742aaab569e80ab763726c9d525cd1f792a45b8bf0daed91bae60e404a4aa9
7
+ data.tar.gz: df4d686cd9d8e2de66c6bdfc070a4221baff52c6fe5bf4ca064f9f94dd4ab30311848e15f5f955b82d1d3c16f0845ac07afbba93c6a4d4b77226b217928226ab
data/CHANGELOG.md CHANGED
@@ -1,6 +1,10 @@
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
+
4
8
  ## 6.1.2 / 2022-05-24
5
9
  ### Fixed
6
10
  * bundle:update should fetch binary gems for all bundled platforms
@@ -2,5 +2,5 @@
2
2
  # This defines the NdrDevSupport version. If you change it, rebuild and commit the gem.
3
3
  # Use "rake build" to build the gem, see rake -T for all bundler rake tasks (and our own).
4
4
  module NdrDevSupport
5
- VERSION = '6.1.2'
5
+ VERSION = '6.1.3'
6
6
  end
@@ -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
- files_to_git_add = `git status Gemfile Gemfile.lock code_safety.yml config/code_safety.yml| \
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.2
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-24 00:00:00.000000000 Z
11
+ date: 2022-05-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pry