ndr_dev_support 6.1.3 → 6.1.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 538f2514db4fc9b6227cbb94aa9d72521b7c0a36ee24e6a711e9bc1d369fbc57
4
- data.tar.gz: 9f939ecd79212a0d8818d2c718d71b7f95e148bf86671c2c349d32f8e5675cb7
3
+ metadata.gz: 64a3efbb44c782bd62b06b12a1ccf5a8390173b7cff796141f044df5c79bf6a6
4
+ data.tar.gz: 7ebfe41c07779cb4a90ad956359827f277bae624a254204b3460a99fa361b37f
5
5
  SHA512:
6
- metadata.gz: 6b13169c99faddabcce0a28bdafb78ca5c7c899e1affc263df976030dcfef3a991742aaab569e80ab763726c9d525cd1f792a45b8bf0daed91bae60e404a4aa9
7
- data.tar.gz: df4d686cd9d8e2de66c6bdfc070a4221baff52c6fe5bf4ca064f9f94dd4ab30311848e15f5f955b82d1d3c16f0845ac07afbba93c6a4d4b77226b217928226ab
6
+ metadata.gz: 2ecc17440ed412719ea08f742c3c853401ebf06ba8ab1ec82eb143395f81ed0206ad857e300fbbb284441c248349364db12110a22511401887c007a15491800d
7
+ data.tar.gz: 2e4c6023991fe8a7bdb685fce3d21eef9aa9baf89b2c491a51a5fbe65d586bf1471103ff0d57212b4fc9f8a51809138f17a482aca3f15c961aa8dd227b215838
data/CHANGELOG.md CHANGED
@@ -1,6 +1,18 @@
1
1
  ## [Unreleased]
2
2
  * No unreleased changes
3
3
 
4
+ ## 6.1.6 / 2022-07-01
5
+ ### Added
6
+ * capistrano: use DEPLOYER environment variable for non-interactive deployments
7
+
8
+ ## 6.1.5 / 2022-06-24
9
+ ### Fixed
10
+ * audit:code should allow special characters in filenames
11
+
12
+ ## 6.1.4 / 2022-06-16
13
+ ### Added
14
+ * Add warning when upgrading webpacker
15
+
4
16
  ## 6.1.3 / 2022-05-25
5
17
  ### Fixed
6
18
  * bundle:update should update secondary gem lock files
@@ -30,6 +30,8 @@ require_relative 'sysadmin_scripts'
30
30
  # and SVN branches. To use the latter, be sure to set the `:repository_branches` variable
31
31
  # to point at the root of the branches. Otherwise, just set `:repository` directly as normal.
32
32
  #
33
+ # Set environment variable DEPLOYER to deploy as a particular user instead of prompting.
34
+ #
33
35
  Capistrano::Configuration.instance(:must_exist).load do
34
36
  # Paths that are symlinked for each release to the "shared" directory:
35
37
  set :shared_paths, %w[config/database.yml config/secrets.yml log tmp]
@@ -94,9 +96,14 @@ Capistrano::Configuration.instance(:must_exist).load do
94
96
 
95
97
  # Gather SSH credentials: (password is asked for by Net::SSH, if needed)
96
98
  set :use_sudo, false
97
- set :user, Capistrano::CLI.ui.ask('Deploy as: ')
99
+ if ENV['DEPLOYER']
100
+ set :user, ENV['DEPLOYER']
101
+ Capistrano::CLI.ui.say "Deploy as: #{fetch(:user)}"
102
+ else
103
+ set :user, Capistrano::CLI.ui.ask('Deploy as: ')
104
+ end
98
105
 
99
- # If no alternate user is specified, deploy to the crediental-holding user.
106
+ # If no alternate user is specified, deploy to the credential-holding user.
100
107
  set :application_user, fetch(:user) unless fetch(:application_user)
101
108
 
102
109
  # The home folder of the application user:
@@ -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.3'
5
+ VERSION = '6.1.6'
6
6
  end
@@ -143,6 +143,11 @@ namespace :bundle do
143
143
  platforms.each do |platform|
144
144
  system("gem fetch #{gem} --version=#{new_gem_version2} --platform=#{platform}")
145
145
  end
146
+ end if Dir.exist?('vendor/cache')
147
+
148
+ if gem == 'webpacker'
149
+ puts 'TODO: update package.json and yarn.lock with bin/rails webpacker:install'
150
+ puts ' and git add / git remove files in vendor/npm-packages-offline-cache'
146
151
  end
147
152
 
148
153
  if File.exist?(SAFETY_FILE)
@@ -1,6 +1,7 @@
1
1
  require 'csv'
2
2
  require 'pathname'
3
3
  require 'yaml'
4
+ require 'shellwords'
4
5
 
5
6
  SAFETY_FILE =
6
7
  if File.exist?('code_safety.yml')
@@ -338,7 +339,8 @@ def get_last_changed_revision(repo, fname)
338
339
  %x[git log -n 1 -- "#{fname}"].split("\n").first[7..-1]
339
340
  when 'git-svn', 'svn'
340
341
  begin
341
- svn_info = %x[svn info -r head "#{repo}/#{fname}"]
342
+ dest = "#{repo}/#{fname}@"
343
+ svn_info = %x[svn info -r head #{Shellwords.escape(dest)}]
342
344
  rescue
343
345
  puts 'we have an error in the svn info line'
344
346
  end
@@ -376,9 +378,10 @@ def capture_file_diffs(repo, fname, safe_revision, repolatest)
376
378
  cmd =
377
379
  case repository_type
378
380
  when 'git'
379
- cmd = ['git', '--no-pager', 'diff', '--color', '-b', "#{safe_revision}..#{repolatest}", fname]
381
+ ['git', '--no-pager', 'diff', '--color', '-b', "#{safe_revision}..#{repolatest}", fname]
380
382
  when 'git-svn', 'svn'
381
- cmd = ['svn', 'diff', '-r', "#{safe_revision.to_i}:#{repolatest.to_i}", '-x', '-b', "#{repo}/#{fname}"]
383
+ ['svn', 'diff', '-r', "#{safe_revision.to_i}:#{repolatest.to_i}", '-x', '-b',
384
+ "#{repo}/#{fname}@"]
382
385
  end
383
386
 
384
387
  stdout_and_err_str, _status = Open3.capture2e(*cmd)
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.3
4
+ version: 6.1.6
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-25 00:00:00.000000000 Z
11
+ date: 2022-07-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pry