bash_help 0.0.2 → 0.0.4

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: c383874ecdec88d015f3c85156bb93e9d5384498682ea76dcf5bf442c07d16f5
4
- data.tar.gz: 4a3f559b76fdbd066bf36ae0dd53ab558e2488b38718eb1df9f243445b052da4
3
+ metadata.gz: 0e6351dbe0a2ca1473d06c15a41460079b6bc53ebd46f7a9984b8ddbb5b67f70
4
+ data.tar.gz: 2c0a520522035fde608a777168ca921269cac0099ff3f202b4c05a95b79230ff
5
5
  SHA512:
6
- metadata.gz: d64c70d15e623d55c008c69bca7b506cf72c0b0117e87afac5a6a38b9324091691e8ef54fbba4947e4d6cb3cf25f8a4da7dc23a946810d5c2ad31e0f872c6df8
7
- data.tar.gz: 1be7cf2c0f24e6ca133890a3ecba280fa217bf9e0339bbab6153061eee82421114c384781e0c59dcff154a674281d0a08f487f3d0cb8a88e96f10f39e801b02c
6
+ metadata.gz: 6e3a2940b69d6729f5871fce4f77f0a7044fc7052e247699bc26dca7f3040f67dcf8384d1c6d0bdec97bb8f83213125050bcbcb917c35f454caa1a1f515677cc
7
+ data.tar.gz: c156f96ebf96172ebfa27fb765eaaaa4164533563c3c7ea5251dcf61082f10f4fc02ae4a9524aa7c6810b33177bb16d8e6f483068b321b8dac93f7e07203ff7f
data/lib/bash_help.rb CHANGED
@@ -6,3 +6,4 @@
6
6
 
7
7
  require_relative 'hello_module.rb'
8
8
  require_relative 'bash_standins.rb'
9
+ require_relative 'general_helpers.rb'
@@ -8,3 +8,11 @@ def normalize(path)
8
8
  dirpath = File.dirname(filepath)
9
9
  Dir.chdir(dirpath)
10
10
  end
11
+
12
+ # system(command), but aborts if the command fails.
13
+ def safe_system(command)
14
+ unless system(command)
15
+ puts "Command '#{command}' failed. Aborting."
16
+ exit
17
+ end
18
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bash_help
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Zack Fisher