no_tbj 0.2.0 → 0.3.1

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: ff19e3807d2156ad011e5ed3c5d7a7028b2ec0a0b004a744e884de07a4482b0d
4
- data.tar.gz: bf9ccb6e1cc0e2fdddd66906c5d5ca47d21286590966abb29197471c582563b2
3
+ metadata.gz: bbcf85466ac0d34cab9c8908045a2003fd145aca87d90c96e57b49f4a1676453
4
+ data.tar.gz: c21df5d60b1c3ccb175d2a46c093a0bb1d77f7f6f0710a7295de53325b7641c4
5
5
  SHA512:
6
- metadata.gz: 7ee7642e119c33458773b935478378c3f116590a60900fdfc41a8857fce14ae6cacaee9e5628af39e639b3bea0b7bb18d4a6bd5461bd6204daae628ae0ee885c
7
- data.tar.gz: 71f57c4937f8f7770e0fc58b6ec5b6b280a5f3009b04f2c7ec2212795fd7e08d3ccc9608d30404d503df42ec4d7e21a83775afd0c03868e169fdb9767b0699ae
6
+ metadata.gz: 718b53eda88ddb60e54ea4ff127a305f9fa890a660911fd0495b446e57939a1bcfaad01dfd550dbce35dcb877b471c8d9f8a6a080cfc674495544f2f38d58085
7
+ data.tar.gz: 9aac4c42e16baeea7417a6a2750d356de1b5d25463f4ac330592937f6ea61db85fa537a964a39b3e62a4d73371a7d9a91cb4e6e23d56a9d7a080d376f9682f16
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- no_tbj (0.1.0)
4
+ no_tbj (0.3.1)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -16,4 +16,4 @@ DEPENDENCIES
16
16
  rake (~> 13.0)
17
17
 
18
18
  BUNDLED WITH
19
- 2.2.22
19
+ 2.3.16
data/go/runner.go CHANGED
@@ -25,6 +25,10 @@ func main() {
25
25
  go func() {
26
26
  <-trap
27
27
  cmd.Wait()
28
+ if cmd.ProcessState.ExitCode() != -1 {
29
+ os.Exit(cmd.ProcessState.ExitCode())
30
+ }
28
31
  }()
29
32
  cmd.Run()
33
+ os.Exit(cmd.ProcessState.ExitCode())
30
34
  }
data/go/runner_gemlib.go CHANGED
@@ -25,6 +25,10 @@ func main() {
25
25
  go func() {
26
26
  <-trap
27
27
  cmd.Wait()
28
+ if cmd.ProcessState.ExitCode() != -1 {
29
+ os.Exit(cmd.ProcessState.ExitCode())
30
+ }
28
31
  }()
29
32
  cmd.Run()
33
+ os.Exit(cmd.ProcessState.ExitCode())
30
34
  }
data/lib/no_tbj/core.rb CHANGED
@@ -4,7 +4,7 @@ require_relative "color"
4
4
 
5
5
  module NoTBJ
6
6
  using NoTBJ::Color
7
- CHECKS = "no_tbj"
7
+ CHECKS = "no_tbj@#{NoTBJ::VERSION}".encode("ASCII-8BIT").freeze
8
8
 
9
9
  class CLI
10
10
  def run
@@ -34,10 +34,15 @@ module NoTBJ
34
34
  verbose_level = ARGV.count("-v")
35
35
  bindirs.each do |bindir|
36
36
  Dir.glob(File.join(bindir, "*")).each do |file|
37
- next if File.directory?(file)
38
- next if File.fnmatch?("*.*", File.basename(file))
39
-
40
- if File.exist?(file + ".exe") && force_level < 1
37
+ next if File.directory?(file) # No directory
38
+ next if File.fnmatch?("*.*", File.basename(file)) # We only want ruby file
39
+ next if file == "no_tbj" # Ignore no_tbj itself
40
+
41
+ if File.exist?(file + ".exe") &&
42
+ File.open(file + ".exe", "rb")
43
+ .tap { |f| f.seek(-CHECKS.length, IO::SEEK_END) }
44
+ .then { |f| f.read(CHECKS.length) } == CHECKS &&
45
+ verbose_level < 1
41
46
  next files[:skipped_exist] << file
42
47
  end
43
48
  unless [
Binary file
Binary file
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module NoTBJ
4
- VERSION = "0.2.0"
4
+ VERSION = "0.3.1"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: no_tbj
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - sevenc-nanashi
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-07-04 00:00:00.000000000 Z
11
+ date: 2022-07-16 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: This gem deletes 'Terminate Batch Job (Y/N)' dialog.
14
14
  email:
@@ -59,7 +59,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
59
59
  - !ruby/object:Gem::Version
60
60
  version: '0'
61
61
  requirements: []
62
- rubygems_version: 3.3.3
62
+ rubygems_version: 3.3.17
63
63
  signing_key:
64
64
  specification_version: 4
65
65
  summary: No more Terminate Batch Job!