bash_help 0.0.1 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/bash_help.rb +1 -0
- data/lib/general_helpers.rb +10 -0
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 555eb2d3f9ef419bcc28d4a4ccfa6dc0d4a8a8584692b0af9f67fdd8b444243b
|
4
|
+
data.tar.gz: 3805ab638d2f46fd6ec6fc99fbeffd366e6a081285b36b91ae7a2b4202f2bde6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a2f058150c6593f7f63afdf44e380b2c7fd2e8519b880c8fadc5bd79e0be08698b2bfbce6a5ccaa7af9d8196e227aaffbe028b80cc228d025804078666524e00
|
7
|
+
data.tar.gz: 9cbe77a020edd8dccc5b135eac43a85242b45f5852f11f79c328bd8b5c5afc697fb60af074801e6349e0d5b1082c8174438131b359c16e798d92769ed9af1e35
|
data/lib/bash_help.rb
CHANGED
@@ -0,0 +1,10 @@
|
|
1
|
+
## usage: normalize __FILE__
|
2
|
+
# normalize the directory that your scripts execute in, even if they're running from different places.
|
3
|
+
# this is useful for when you want to reference a file in the same directory as your script, but you don't know where your script will be run from
|
4
|
+
def normalize(path)
|
5
|
+
filepath = File.expand_path(path)
|
6
|
+
puts filepath
|
7
|
+
# now get the dirpath of this file
|
8
|
+
dirpath = File.dirname(filepath)
|
9
|
+
Dir.chdir(dirpath)
|
10
|
+
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.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Zack Fisher
|
@@ -18,6 +18,7 @@ extra_rdoc_files: []
|
|
18
18
|
files:
|
19
19
|
- lib/bash_help.rb
|
20
20
|
- lib/bash_standins.rb
|
21
|
+
- lib/general_helpers.rb
|
21
22
|
- lib/hello_module.rb
|
22
23
|
homepage: https://github.com/zack-fisher
|
23
24
|
licenses: []
|