octokitted 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/octokitted.rb +13 -0
- data/lib/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0f1a1eec4292305ffb36ee14107f171a44eb4c4ec36b681ac1cbb43239fee2ca
|
4
|
+
data.tar.gz: f11e7f4e512223b975247f83720d6d9a465f5126e70e8928007c8be2e01fb350
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 520b1c0f16cb7ff369e287eeebeb8c27efbca078ca31fc16825682dd4bc4cd30594532c63eaf76787af5245092fa5a092a7c71f1e0faa07ea1efc48503ec973a
|
7
|
+
data.tar.gz: f2b6bf07d1a3463b960daaa02aded2db981bb0640affb5b87afc78a3c7726040f907e915bb3e3c2796c404b35ec9c3d08c666e6347c8ba54dde612eaa7ec3014
|
data/lib/octokitted.rb
CHANGED
@@ -67,6 +67,19 @@ class Octokitted
|
|
67
67
|
end
|
68
68
|
|
69
69
|
def remove_clone!(path)
|
70
|
+
valid = false
|
71
|
+
|
72
|
+
# check if the repo exists in the cloned_repos array
|
73
|
+
valid = true if @cloned_repos.include?(path)
|
74
|
+
|
75
|
+
# check if the repo exists in the cloned_repos array with a leading './'
|
76
|
+
if @cloned_repos.include?("./#{path}")
|
77
|
+
valid = true
|
78
|
+
path = "./#{path}" # update the path to include the relative path so the .delete method works
|
79
|
+
end
|
80
|
+
|
81
|
+
raise StandardError, "Not a cloned repository - path: #{path}" unless valid
|
82
|
+
|
70
83
|
@git.remove_clone!(path)
|
71
84
|
@cloned_repos.delete(path)
|
72
85
|
end
|
data/lib/version.rb
CHANGED