process_settings 0.10.1 → 0.10.2

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: da736f5bcda926a346f3c125fdeb36f936cf9221df5c3c209394c95627c6c47b
4
- data.tar.gz: 5b726059cd24532410a70e8417b9e30ebd0685496ae457defce22b1c11d1544b
3
+ metadata.gz: 8ce718980ddaa00d22cd609a921834e2d9d175086ac8564b26c85449cbc84189
4
+ data.tar.gz: aa33fa784feeb0dda12a9787502fec4b044022b2f10ee5c859202d95700a1c65
5
5
  SHA512:
6
- metadata.gz: a8fa6fce27fc8b1fa91196ea95cca1c843b7bf460143b44de0e824e87be530fae61d1ace71c4c3d4c36c08d918d234a1e5b0ea7fa101df962e43af323a0e9bf3
7
- data.tar.gz: 931090768b94558c83f4ddfa1ec5f674f69709f3831587238e5f3e8cc8f761cf1fa2c6d9b403d3761f866069dde264841008d2efe9d6a040611d5cb02c5d14b6
6
+ metadata.gz: e1c47ff17b641fd0699bef1546de45f5910aa6458d08c97c8dabc697c25a491c0741d58540062f1ef81b68c2d87f120ce0b12e15dececdc2ffae16a9b1f3b54b
7
+ data.tar.gz: 6a4df9a86fc29231ff414f0f0448da615682d78e8425b4e5aa6f672b7d6a63a334610be11f08853cf58fc51d4976b63ee2e57aaaf2c84cd2eab0a856b0636fdb
@@ -7,6 +7,7 @@
7
7
  require 'fileutils'
8
8
  require 'optparse'
9
9
  require 'ostruct'
10
+ require 'tempfile'
10
11
 
11
12
  PROGRAM_NAME = File.basename($PROGRAM_NAME)
12
13
 
@@ -41,19 +42,22 @@ input_files =
41
42
  end
42
43
  end
43
44
 
44
- system("rm -f tmp/combined_process_settings-A.yml tmp/combined_process_settings-B.yml")
45
+ tempfile_a = Tempfile.new(['combined_process_settings', '.yml'], 'tmp').path
46
+ tempfile_b = Tempfile.new(['combined_process_settings', '.yml'], 'tmp').path
47
+
48
+ system("rm -f #{tempfile_a} #{tempfile_b}")
45
49
 
46
50
  # remove the meta-data from the end
47
- system("sed '/^- meta:$/,$d' #{input_files[0]} > tmp/combined_process_settings-A.yml")
48
- system("sed '/^- meta:$/,$d' #{input_files[1]} > tmp/combined_process_settings-B.yml")
51
+ system("sed '/^- meta:$/,$d' #{input_files[0]} > #{tempfile_a}")
52
+ system("sed '/^- meta:$/,$d' #{input_files[1]} > #{tempfile_b}")
49
53
 
50
54
  if options.silent
51
- system("cmp --silent tmp/combined_process_settings-A.yml tmp/combined_process_settings-B.yml")
55
+ system("cmp --silent #{tempfile_a} #{tempfile_b}")
52
56
  else
53
- system("diff -c tmp/combined_process_settings-A.yml tmp/combined_process_settings-B.yml | sed '1,3d'")
57
+ system("diff -c #{tempfile_a} #{tempfile_b} | sed '1,3d'")
54
58
  end
55
59
  exit_code = $?.exitstatus
56
60
 
57
- system("rm -f tmp/combined_process_settings-A.yml tmp/combined_process_settings-B.yml")
61
+ system("rm -f #{tempfile_a} #{tempfile_b}")
58
62
 
59
63
  exit(exit_code)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ProcessSettings
4
- VERSION = '0.10.1'
4
+ VERSION = '0.10.2'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: process_settings
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.1
4
+ version: 0.10.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Invoca