rbname 0.0.3 → 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 +8 -8
- data/lib/main.rb +13 -3
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
---
|
|
2
2
|
!binary "U0hBMQ==":
|
|
3
3
|
metadata.gz: !binary |-
|
|
4
|
-
|
|
4
|
+
ZjBiMmE4NzBhMTE2MDk5Y2Y3MTUyYWFjMDBhNjhlMzA1YTRhYzkwZg==
|
|
5
5
|
data.tar.gz: !binary |-
|
|
6
|
-
|
|
6
|
+
NmUyMmZkY2U5OTViMTRlZjRjNzI3YmFiZWU0MjIzMmRiMDkyZjU5Nw==
|
|
7
7
|
SHA512:
|
|
8
8
|
metadata.gz: !binary |-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
OGVkOGIwZDIwZGEzZTM4YWE2ODAyMTQ1MzViMjk0MzIzYjViOWZjMDE2ODll
|
|
10
|
+
NWJiYzM1ZmNhNDkwMzM4NjBlZTYwOTJmMDRlMWI5MTBmZmMzYTQ3NzIyYmYy
|
|
11
|
+
NzczZTM0YmMzZjBkMDA5YmIxODFmNzQ3ZmMxNWVjODE2OTQ0MzA=
|
|
12
12
|
data.tar.gz: !binary |-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
NTJhMDgwMThmMGIxYjUxZGEyZmI3MDc2MGE1NWY1MjhkMzAzMjdjZWM5NjZm
|
|
14
|
+
ZWY1MDAyMzE3NDFmOTVjNDcwNjgxODFiMDk4YzAxMjk3MGFkYzAzMzM1MDBj
|
|
15
|
+
MDY3Y2I4MmE3ZWQ1M2RjZDkxYTc3OGY2YmFjNjAxZWZiNmNlZGQ=
|
data/lib/main.rb
CHANGED
|
@@ -46,13 +46,23 @@ class Main
|
|
|
46
46
|
end
|
|
47
47
|
|
|
48
48
|
def get_root_path
|
|
49
|
-
|
|
50
|
-
|
|
49
|
+
search_root_input = gets.chomp
|
|
50
|
+
|
|
51
|
+
until valid_path?(search_root_input)
|
|
52
|
+
puts "That path doesn't exist, buddy. Hit me again"
|
|
53
|
+
search_root_input = gets.chomp
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
if search_root_input.empty?
|
|
51
57
|
puts "Defaulting to current directory. Hit return to begin"
|
|
52
58
|
gets
|
|
53
59
|
return "."
|
|
54
60
|
end
|
|
55
|
-
return
|
|
61
|
+
return search_root_input
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
def valid_path?(path_input)
|
|
65
|
+
File.exist?(path_input) || path_input.empty?
|
|
56
66
|
end
|
|
57
67
|
|
|
58
68
|
def record_manual_replacement!(replacement_collection, old_contents, file_line)
|