system_cat 0.0.1 → 0.0.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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/system_cat/shell.rb +4 -5
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9b700dde73e999a3186e74f0d802df918d1bc39e
4
- data.tar.gz: 98f4e4b129b56e523a44ac626472b4800d910d29
3
+ metadata.gz: 3358c3acbc0a74512745793190c956c19918aaf3
4
+ data.tar.gz: bd07b04625440616c967678b11b97d34bc8afe63
5
5
  SHA512:
6
- metadata.gz: 9ba221f8e7eaa332bdb0e422a532e0bd24e75fa23e81a37c0fd84cb7200dbf8ed1193a8335744405c5a4dba4518983e155d3a1895ffe0360791307a352d8fcaf
7
- data.tar.gz: b12e7f649eeee943d54e7f665a24c390bcec24a60a13e3aa7bf2edf5ac42f3b5989d51d05c543db383b63ef8f4b640796b969faf2d8175ae63bb27c32dc65708
6
+ metadata.gz: d0921708961ffff675d11374cf112c561a85a06ad667fc71ed67dedfd6150f14bf1a58eb994d59f9c7f9487bdc0c7c740b1aaac5dd97f6c9de652e8e5a800d21
7
+ data.tar.gz: ce750fc2d54ea35241fc6b3976a8e1fe1ab5b68dba1ed2311c549060f817cfdd4e75f04325789e4b606db990dcc182c474fc9f71f36216708094c1f0109e6755
@@ -5,18 +5,17 @@ module SystemCat
5
5
  puts '_______________________________________________________________________________'
6
6
  puts command
7
7
 
8
- unless test
9
- result = `#{command}`
10
- puts result
11
- end
8
+ return if test
12
9
 
10
+ result = `#{command}`
11
+ puts result
13
12
  raise 'Command failed' unless exitstatus.zero? || force
14
13
 
15
14
  return result
16
15
  end
17
16
 
18
17
  def self.exitstatus
19
- $CHILD_STATUS.exitstatus
18
+ $?.exitstatus
20
19
  end
21
20
  end
22
21
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: system_cat
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rich Humphrey