octokitted 0.0.4 → 0.0.5

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 (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/octokitted.rb +13 -0
  3. data/lib/version.rb +1 -1
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: df4ab1cbb4cf7f9f197be6f48bf19eadfc34fabaae33433e376a21c4327df0e4
4
- data.tar.gz: 04c286e8800c55ac4d55e71b3058e12733a498e91c1d4fb0bf9153bb39685bd5
3
+ metadata.gz: 0f1a1eec4292305ffb36ee14107f171a44eb4c4ec36b681ac1cbb43239fee2ca
4
+ data.tar.gz: f11e7f4e512223b975247f83720d6d9a465f5126e70e8928007c8be2e01fb350
5
5
  SHA512:
6
- metadata.gz: cd75ef4dbe2385bc1324a9b5762e0a542a5981f0195704a0a5b21a5d602b022ac61721e86d462540c464a7b193b3600b57579b8cfe0dde46e3dcbe1a78a14ad0
7
- data.tar.gz: 933e1cc9a5c42a650c3849ace20e8bea0cdc3e0a1855d5bb0eb2bc3b2c409da6041297441d70477fd78dab6b814dfe76d5f4fcd11552f50dd161a0784b37e84f
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
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Octokitted
4
4
  module Version
5
- VERSION = "0.0.4"
5
+ VERSION = "0.0.5"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: octokitted
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Grant Birkinbine