teachers_pet 0.0.0 → 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/forkcollab +31 -0
- data/lib/teachers_pet/version.rb +1 -1
- data/teachers_pet.gemspec +4 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2d30fbc91197f42ea30df5cd1a1347cc5da3b082
|
4
|
+
data.tar.gz: 3f740ae9fab9e2a13a09399db11cc6bc84e57529
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9af701ab906d0122f95778c8c0096dcbd4a9b22326d01b028d18dd1e2e01962944e90c96f19436c4e529a5d56efe749ca2c7911457c36b752e709b4c11acba49
|
7
|
+
data.tar.gz: e6ac88733408986a70c83fb5e7a6cdc131510f8a8a82c9b42d25cf1399c18309d425ada3c37c57f20c9e7deba78ce6c842416686ae90bc2fbacf4bccbb7315b5
|
data/bin/forkcollab
ADDED
@@ -0,0 +1,31 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require 'io/console'
|
4
|
+
require 'octokit'
|
5
|
+
|
6
|
+
puts "Create a personal access token: https://github.com/settings/applications"
|
7
|
+
print "Token: "
|
8
|
+
token = STDIN.noecho(&:gets).chomp
|
9
|
+
puts
|
10
|
+
|
11
|
+
print "Repository (name/owner): "
|
12
|
+
nwo = gets.chomp
|
13
|
+
|
14
|
+
client = Octokit::Client.new :access_token => token
|
15
|
+
|
16
|
+
forks = client.forks(nwo)
|
17
|
+
|
18
|
+
puts "Are you sure you want to add #{forks.count} users as collaborators on '#{nwo}'?"
|
19
|
+
print "Please type the name of the repository to confirm: "
|
20
|
+
confirm = gets.chomp
|
21
|
+
|
22
|
+
if confirm == nwo
|
23
|
+
forks.each do |fork|
|
24
|
+
if fork.owner.type == "User"
|
25
|
+
result = client.add_collab(nwo, fork.owner)
|
26
|
+
puts "#{fork.owner.login} - #{result}"
|
27
|
+
else
|
28
|
+
puts "#{fork.owner.login} - false (Organization)"
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
data/lib/teachers_pet/version.rb
CHANGED
data/teachers_pet.gemspec
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: teachers_pet
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- John Britton
|
@@ -26,11 +26,13 @@ dependencies:
|
|
26
26
|
version: '0'
|
27
27
|
description: A simple hello world gem
|
28
28
|
email: public@johndbritton.com
|
29
|
-
executables:
|
29
|
+
executables:
|
30
|
+
- forkcollab
|
30
31
|
extensions: []
|
31
32
|
extra_rdoc_files: []
|
32
33
|
files:
|
33
34
|
- .gitignore
|
35
|
+
- bin/forkcollab
|
34
36
|
- lib/teachers_pet.rb
|
35
37
|
- lib/teachers_pet/version.rb
|
36
38
|
- teachers_pet.gemspec
|