smdev 0.8.0 → 0.9.0
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 +4 -4
- data/lib/smdev.rb +17 -6
- 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: fd3bd438e2a171908e6227b3361cfa8d851a04d8a7e72c76eb1b7fbf53f52b48
|
|
4
|
+
data.tar.gz: 9b45204d34f2b68fa9c8f693290e0fc67b9ca61d2d07831cf44e3f9a760cfb6b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3eaf68d9b2d3c6e8cb85255d59df6415b6255db21328f1835442340dd7efe47601421efc348277282013f3256265647d4a2afe99d983fab16efb0f1c38c9acf5
|
|
7
|
+
data.tar.gz: 2f2ad3110f162fc18abe33e1c59d2633169a8cd3dd2aee8c5f45fd393fce5be9fadc8c149777180860ea84430a66849aec9c2985d35b55fc95cd4015ea21e0c4
|
data/lib/smdev.rb
CHANGED
|
@@ -146,13 +146,16 @@ module Smdev
|
|
|
146
146
|
end
|
|
147
147
|
|
|
148
148
|
def get_repos(options)
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
149
|
+
if options[:https]
|
|
150
|
+
token = ENV['GITHUB_TOKEN']
|
|
151
|
+
if token.nil?
|
|
152
|
+
# Prompt the user for their GitHub personal access token
|
|
153
|
+
print "GitHub personal access token: "
|
|
154
|
+
token = STDIN.noecho(&:gets).chomp
|
|
155
|
+
puts ""
|
|
156
|
+
end
|
|
155
157
|
end
|
|
158
|
+
|
|
156
159
|
# Authenticate with the GitHub API using the user's credentials
|
|
157
160
|
client = Octokit::Client.new(access_token: token)
|
|
158
161
|
|
|
@@ -220,6 +223,14 @@ module Smdev
|
|
|
220
223
|
def checkout_repos(options)
|
|
221
224
|
repos = get_repos(options)
|
|
222
225
|
|
|
226
|
+
unless options[:https]
|
|
227
|
+
puts "*************************************************************************"
|
|
228
|
+
puts "* You must use https to get private repositories. *"
|
|
229
|
+
puts "* If you have not setup your github token, you will be prompted for it. *"
|
|
230
|
+
puts "* Use smdev -s to use https. *"
|
|
231
|
+
puts "*************************************************************************"
|
|
232
|
+
end
|
|
233
|
+
|
|
223
234
|
# Clone each repository to a local directory
|
|
224
235
|
repos.each do |repo|
|
|
225
236
|
clone_url = repo.clone_url
|