learn_duplicate 0.0.8 → 0.0.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +3 -1
- data/lib/learn_duplicate.rb +9 -5
- 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: 956233a1edac2d47b513190d8e4ca6ed1f86af5b52044dfdaa5eee7f949d61ce
|
4
|
+
data.tar.gz: '0924ace0ecdeb4c3f92bc245dc314f38341e49e06a4b4200288514ec067aab78'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0fb7c4936ba0f180fb88a987db8f1f08d4c6447cfa0a883fb41be43fb11458f86ab181de720e6b152d740fad072e19178323bf952bf53622f4a0d6cc4304cd38
|
7
|
+
data.tar.gz: e29277782845f376760c1ab81b7232e1f9bb0d77fe76367f0ca0797d1d43e197fb08cf4de5ce88a9c664999385d670bfa6eb79d6d348d3a5b5b117d61d8795b5
|
data/README.md
CHANGED
@@ -46,8 +46,10 @@ Follow the command line prompts for setting up and naming your repository. The
|
|
46
46
|
repo will be duplicated locally and pushed to GitHub. When finished, you can `cd`
|
47
47
|
into the local folder or open it on github to start working.
|
48
48
|
|
49
|
+
Try using the repository `readme_template` to see the how it works.
|
50
|
+
|
49
51
|
## Resources
|
50
52
|
|
51
|
-
- [Hub]
|
53
|
+
- [Hub][hub]
|
52
54
|
|
53
55
|
[hub]: https://hub.github.com/hub.1.html
|
data/lib/learn_duplicate.rb
CHANGED
@@ -2,7 +2,6 @@ require 'require_all'
|
|
2
2
|
require 'faraday'
|
3
3
|
require 'uri'
|
4
4
|
require 'open3'
|
5
|
-
require 'pry'
|
6
5
|
|
7
6
|
class LearnDuplicate
|
8
7
|
def initialize()
|
@@ -42,13 +41,18 @@ class LearnDuplicate
|
|
42
41
|
encoded_url = URI.encode(url).slice(0, url.length)
|
43
42
|
check_existing = Faraday.get URI.parse(encoded_url)
|
44
43
|
|
45
|
-
|
44
|
+
|
45
|
+
if check_existing.body.include? '"Not Found"'
|
46
|
+
break
|
47
|
+
else
|
48
|
+
puts 'A repository with that name already exists or you may have hit a rate limit'
|
49
|
+
puts 'https://github.com/learn-co-curriculum/' + @repo_name
|
50
|
+
puts ''
|
51
|
+
end
|
46
52
|
end
|
47
53
|
|
48
54
|
|
49
|
-
|
50
|
-
puts 'https://github.com/learn-co-curriculum/' + @repo_name
|
51
|
-
puts ''
|
55
|
+
|
52
56
|
end
|
53
57
|
|
54
58
|
|