smdev 0.8.0 → 0.9.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/smdev.rb +17 -6
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6756e94f34ed4d1ec94eba484d664034bb59a90a508d36b1261c5744c8d9082f
4
- data.tar.gz: 4b3c3a8f3478d71247c90a38226d9cd263fd47aba6ccebaa76a8d86a1e0dd502
3
+ metadata.gz: fd3bd438e2a171908e6227b3361cfa8d851a04d8a7e72c76eb1b7fbf53f52b48
4
+ data.tar.gz: 9b45204d34f2b68fa9c8f693290e0fc67b9ca61d2d07831cf44e3f9a760cfb6b
5
5
  SHA512:
6
- metadata.gz: b77a5e17d8b7e23241c4f3645894e6ab86b498f50b919e9b1b367c70b0f9d5644199ed45440741f1f19b4d5d1163571efa222d83ace85be8faf498b74cd69d6a
7
- data.tar.gz: 73d4de11312a3cae6ab6d7d4a1e80bad8e22cda5ec2f2604e772f14e4d505a3c39cc0cea17a6add21ba1241cbeff05c9af41bdfa025d119d1d72b11b3c7fef7f
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
- token = ENV['GITHUB_TOKEN']
150
- if token.nil?
151
- # Prompt the user for their GitHub personal access token
152
- print "GitHub personal access token: "
153
- token = STDIN.noecho(&:gets).chomp
154
- puts ""
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: smdev
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 0.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Derek Neighbors