ghedsh 1.1.35 → 1.1.36
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/actions/help.rb +14 -0
- data/lib/actions/orgs.rb +188 -52
- data/lib/actions/system.rb +17 -0
- data/lib/interface.rb +44 -15
- data/lib/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 05400700524628b96f27e9cb871e74f39b4327a7
|
4
|
+
data.tar.gz: 5fdb40a95ceccdad4b6760d953894c15d4d13472
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d03347f2dc1c882cf5e9c7a5613c5bed5c8ee816f37d01ae372c581caaeb52f0e5e2419e913d53f226977d050c2ee3b83b2b63982e2db013df36f0c468607489
|
7
|
+
data.tar.gz: 6b08af74955bfe2ea8567a1ef1f2ac052413c9ad3ca3394f28190340ccd48d9b7411174dfb8739cd576b0dfeac44556d3ebb74fe0ca71a9f8cfda4aa7a1c7b8f
|
data/lib/actions/help.rb
CHANGED
@@ -42,6 +42,8 @@ class HelpM
|
|
42
42
|
print "\t\t\t\t->\tpeople info\n\n"
|
43
43
|
print "\t\t\t\tTo find a specific member extended info, you can give the github id as parameter.\n"
|
44
44
|
print "\t\t\t\t->\tpeople info [github id]\n\n"
|
45
|
+
print "\t\t\t\tTo use a RegExp search in each field of the information, you can use the parameter /.\n"
|
46
|
+
print "\t\t\t\t->\tpeople info /[RegExp]/\n\n"
|
45
47
|
print "\tteams\t\t\tTeams of a organization\n"
|
46
48
|
print "\tnew relation\t\tSet a relation for the extendend information between Github ID and an email from a .csv file\n"
|
47
49
|
print "\t\t\t\t->\tnew relation [name of the file]\n\n"
|
@@ -139,9 +141,21 @@ class HelpM
|
|
139
141
|
print "\tadd repo\t\tAdd or create the repository of the assignment\n"
|
140
142
|
print "\tchange repo\t\tChange a repository of the assignment\n"
|
141
143
|
print "\t\t\t\t->\tchange repo [number of the repo]\n\n"
|
144
|
+
print "\trm repo\t\t\tDelete a repository from the assignment list.\n"
|
145
|
+
print "\t\t\t\t->\trm repo [id]\n\n"
|
146
|
+
print "\tchange sufix\t\tChange a sufix from a repository of the assignment\n"
|
147
|
+
print "\t\t\t\t->\tchange sufix [number of the repo]\n\n"
|
142
148
|
print "\tadd group\t\tAdd a new group to the assignment\n"
|
149
|
+
print "\trm group\t\tDelete a group from the assignment list.\n"
|
150
|
+
print "\t\t\t\t->\trm group [name]\n\n"
|
151
|
+
print "\t\t\t\tTo delete all the groups list, use the parameter -all.\n"
|
152
|
+
print "\t\t\t\t->\trm group -all\n\n"
|
143
153
|
print "\topen\t\t\topen the github assignment repositories disposition\n"
|
144
154
|
print "\tadd students\t\tAdd new students to the assignment\n"
|
155
|
+
print "\trm student\t\tDelete a student from the assignment list.\n"
|
156
|
+
print "\t\t\t\t->\trm student [name]\n\n"
|
157
|
+
print "\t\t\t\tTo delete all the students list, use the parameter -all.\n"
|
158
|
+
print "\t\t\t\t->\trm student -all\n\n"
|
145
159
|
print "\tmake\t\t\tCreate the repository assignment in Github for each team of every group\n\n"
|
146
160
|
end
|
147
161
|
|
data/lib/actions/orgs.rb
CHANGED
@@ -61,7 +61,6 @@ class Organizations
|
|
61
61
|
list["orgs"].push({"name"=>config["Org"],"assigs"=>[]})
|
62
62
|
Sys.new.save_assigs("#{ENV['HOME']}/.ghedsh",list)
|
63
63
|
end
|
64
|
-
|
65
64
|
end
|
66
65
|
|
67
66
|
def assignment_repository(client,config,name)
|
@@ -70,17 +69,17 @@ class Organizations
|
|
70
69
|
puts "\n"
|
71
70
|
puts "Assignment: #{name}"
|
72
71
|
puts "1) Add a repository already created "
|
73
|
-
puts "2) Create a new empty repository"
|
74
|
-
puts "
|
72
|
+
# puts "2) Create a new empty repository"
|
73
|
+
puts "2) Don't assign a repository yet"
|
75
74
|
print "option => "
|
76
75
|
op=gets.chomp
|
77
76
|
puts "\n"
|
78
|
-
if op=="
|
77
|
+
if op=="1" or op=="2"
|
79
78
|
ex=true
|
80
79
|
end
|
81
80
|
end
|
82
81
|
case
|
83
|
-
when op=="1"
|
82
|
+
when op=="1"
|
84
83
|
|
85
84
|
if op=="1"
|
86
85
|
ex2=false
|
@@ -112,20 +111,7 @@ class Organizations
|
|
112
111
|
end
|
113
112
|
end
|
114
113
|
end
|
115
|
-
|
116
|
-
ex2=false
|
117
|
-
until ex2==true
|
118
|
-
puts "Name of the repository (To skip and add the repository later, press enter): "
|
119
|
-
reponame=gets.chomp
|
120
|
-
if reponame==""
|
121
|
-
ex2=true
|
122
|
-
else
|
123
|
-
ex2=Repositories.new().create_repository(client,config,reponame,false,ORGS)
|
124
|
-
reponame="#{config["Org"]}/#{reponame}"
|
125
|
-
end
|
126
|
-
end
|
127
|
-
end
|
128
|
-
when op=="3" then reponame=""
|
114
|
+
when op=="2" then reponame=""
|
129
115
|
end
|
130
116
|
return reponame
|
131
117
|
end
|
@@ -258,9 +244,11 @@ class Organizations
|
|
258
244
|
end
|
259
245
|
if op2!=4 and refuse==false
|
260
246
|
if op2!=2
|
261
|
-
list
|
262
|
-
|
263
|
-
|
247
|
+
if list!=nil
|
248
|
+
list.each do |i|
|
249
|
+
if !members.include?(i)
|
250
|
+
list.delete(i)
|
251
|
+
end
|
264
252
|
end
|
265
253
|
end
|
266
254
|
end
|
@@ -342,8 +330,11 @@ class Organizations
|
|
342
330
|
team=Teams.new()
|
343
331
|
puts "\n"
|
344
332
|
puts assig["name_assig"]
|
333
|
+
assig=assig.sort.to_h
|
345
334
|
assig.each{|key, value| if key.include?("repo") then puts "Repository #{key.delete("repo")}: #{value}" end}
|
346
|
-
|
335
|
+
puts
|
336
|
+
assig.each{|key, value| if key.include?("sufix") then puts "Sufix of Repository #{key.delete("sufix")} : #{value}" end}
|
337
|
+
print "\n"
|
347
338
|
if assig["groups"]!=[]
|
348
339
|
puts "\tGroups: "
|
349
340
|
assig["groups"].each do |y|
|
@@ -368,40 +359,54 @@ class Organizations
|
|
368
359
|
def make_assig(client,config,assig)
|
369
360
|
web="https://github.com/"
|
370
361
|
web2="git@github.com:"
|
371
|
-
|
362
|
+
r=Repositories.new()
|
372
363
|
team=Teams.new()
|
373
364
|
sys=Sys.new()
|
374
365
|
teamlist=team.read_teamlist(client,config)
|
375
366
|
assig=self.get_single_assig(config,assig)
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
|
390
|
-
|
391
|
-
|
392
|
-
|
393
|
-
|
367
|
+
repolist=[]
|
368
|
+
point=1
|
369
|
+
assig.each{|key, value| if key.include?("repo") then repolist.push(value) end}
|
370
|
+
|
371
|
+
if repolist!=[]
|
372
|
+
repolist.each do |repo|
|
373
|
+
sys.create_temp("#{ENV['HOME']}/.ghedsh/temp")
|
374
|
+
puts repo
|
375
|
+
if repolist.size>1
|
376
|
+
sufix="sufix#{point}"
|
377
|
+
sufix="-#{assig["#{sufix}"]}"
|
378
|
+
else
|
379
|
+
sufix=""
|
380
|
+
end
|
381
|
+
point=point+1
|
382
|
+
system("git clone #{web2}#{repo}.git #{ENV['HOME']}/.ghedsh/temp/#{repo}")
|
383
|
+
if assig["groups"]!=[]
|
384
|
+
assig["groups"].each do |i|
|
385
|
+
|
386
|
+
teamsforgroup=team.get_single_group(config,i)
|
387
|
+
if teamsforgroup!=nil
|
388
|
+
teamsforgroup.each do |y|
|
389
|
+
config["TeamID"]=teamlist["#{y}"]
|
390
|
+
config["Team"]=y
|
391
|
+
puts y
|
392
|
+
puts sufix
|
393
|
+
r.create_repository(client,config,"#{assig["name_assig"]}#{sufix}-#{y}",true,TEAM)
|
394
|
+
system("git -C #{ENV['HOME']}/.ghedsh/temp/#{repo} remote rm origin")
|
395
|
+
system("git -C #{ENV['HOME']}/.ghedsh/temp/#{repo} remote add origin #{web2}#{config["Org"]}/#{assig["name_assig"]}#{sufix}-#{y}.git")
|
396
|
+
|
397
|
+
system("git -C #{ENV['HOME']}/.ghedsh/temp/#{repo} push origin --all")
|
398
|
+
end
|
394
399
|
end
|
395
400
|
end
|
396
401
|
end
|
397
|
-
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
|
402
|
-
|
403
|
-
|
404
|
-
|
402
|
+
if assig["people"]!=[] and assig["people"]!=nil
|
403
|
+
assig["people"].each do |i|
|
404
|
+
r.create_repository(client,config,"#{assig["name_assig"]}#{sufix}-#{i}",true,ORGS)
|
405
|
+
system("git -C #{ENV['HOME']}/.ghedsh/temp/#{repo} remote rm origin")
|
406
|
+
system("git -C #{ENV['HOME']}/.ghedsh/temp/#{repo} remote add origin #{web2}#{config["Org"]}/#{assig["name_assig"]}#{sufix}-#{i}.git")
|
407
|
+
system("git -C #{ENV['HOME']}/.ghedsh/temp/#{repo} push origin --all")
|
408
|
+
r.add_collaborator(client,"#{config["Org"]}/#{assig["name_assig"]}#{sufix}-#{i}",i)
|
409
|
+
end
|
405
410
|
end
|
406
411
|
end
|
407
412
|
else
|
@@ -554,6 +559,37 @@ class Organizations
|
|
554
559
|
end
|
555
560
|
end
|
556
561
|
|
562
|
+
def search_rexp_people_info(client,config,exp)
|
563
|
+
list=self.load_people()
|
564
|
+
if list!=nil
|
565
|
+
if list["users"]!=[]
|
566
|
+
list=list["orgs"].detect{|aux| aux["name"]==config["Org"]}
|
567
|
+
if exp.match(/^\//)
|
568
|
+
sp=exp.split('/')
|
569
|
+
exp=Regexp.new(sp[1],sp[2])
|
570
|
+
end
|
571
|
+
list=Sys.new.search_rexp_peoplehash(list["users"],exp)
|
572
|
+
|
573
|
+
if list!=[]
|
574
|
+
fields=list[0].keys
|
575
|
+
list.each do |i|
|
576
|
+
puts "\n\e[31m#{i["github"]}\e[0m"
|
577
|
+
fields.each do |j|
|
578
|
+
puts "#{j.capitalize}:\t #{i[j]}"
|
579
|
+
end
|
580
|
+
puts
|
581
|
+
end
|
582
|
+
end
|
583
|
+
else
|
584
|
+
puts "Extended information has not been added yet"
|
585
|
+
end
|
586
|
+
else
|
587
|
+
list["orgs"].push({"name"=>config["Org"],"users"=>[]})
|
588
|
+
Sys.new.save_people("#{ENV['HOME']}/.ghedsh",list)
|
589
|
+
puts "Extended information has not been added yet"
|
590
|
+
end
|
591
|
+
end
|
592
|
+
|
557
593
|
def show_people_info(client,config,user)
|
558
594
|
list=self.load_people()
|
559
595
|
|
@@ -611,7 +647,7 @@ class Organizations
|
|
611
647
|
notexist=true
|
612
648
|
end
|
613
649
|
else
|
614
|
-
if !fields.include?("repo"+change)
|
650
|
+
if !fields.include?("repo"+change.to_s)
|
615
651
|
notexist=true
|
616
652
|
end
|
617
653
|
end
|
@@ -640,17 +676,117 @@ class Organizations
|
|
640
676
|
puts "Doesn't exist that repository"
|
641
677
|
else
|
642
678
|
reponame=self.assignment_repository(client,config,assig["name_assig"])
|
679
|
+
if reponumber.to_i>1
|
680
|
+
sufix="sufix#{reponumber}"
|
681
|
+
sufixname=self.assignment_repo_sufix(reponumber,1)
|
682
|
+
end
|
643
683
|
end
|
644
684
|
|
645
685
|
if reponame!="" and notexist==false
|
646
|
-
if reponumber==1
|
686
|
+
if reponumber.to_i==1
|
647
687
|
list["orgs"].detect{|aux| aux["name"]==config["Org"]}["assigs"].detect{|aux2| aux2["name_assig"]==assig}["repo"]=reponame
|
648
688
|
Sys.new.save_assigs("#{ENV['HOME']}/.ghedsh",list)
|
649
689
|
else
|
650
690
|
list["orgs"].detect{|aux| aux["name"]==config["Org"]}["assigs"].detect{|aux2| aux2["name_assig"]==assig}["repo#{reponumber}"]=reponame
|
691
|
+
list["orgs"].detect{|aux| aux["name"]==config["Org"]}["assigs"].detect{|aux2| aux2["name_assig"]==assig}["#{sufix}"]=sufixname
|
692
|
+
if sufix=="sufix2" and change==nil
|
693
|
+
sufixname=self.assignment_repo_sufix("1",2)
|
694
|
+
list["orgs"].detect{|aux| aux["name"]==config["Org"]}["assigs"].detect{|aux2| aux2["name_assig"]==assig}["sufix1"]=sufixname
|
695
|
+
end
|
696
|
+
Sys.new.save_assigs("#{ENV['HOME']}/.ghedsh",list)
|
697
|
+
end
|
698
|
+
end
|
699
|
+
end
|
700
|
+
|
701
|
+
def rm_assigment_repo(config,assig,reponumber)
|
702
|
+
list=self.load_assig()
|
703
|
+
|
704
|
+
if reponumber==1
|
705
|
+
if list["orgs"].detect{|aux| aux["name"]==config["Org"]}["assigs"].detect{|aux2| aux2["name_assig"]==assig}["repo"]!=nil
|
706
|
+
list["orgs"].detect{|aux| aux["name"]==config["Org"]}["assigs"].detect{|aux2| aux2["name_assig"]==assig}.delete("repo")
|
707
|
+
list["orgs"].detect{|aux| aux["name"]==config["Org"]}["assigs"].detect{|aux2| aux2["name_assig"]==assig}.delete("sufix1")
|
708
|
+
Sys.new.save_assigs("#{ENV['HOME']}/.ghedsh",list)
|
709
|
+
else
|
710
|
+
puts "Doesn't exist that repository"
|
711
|
+
end
|
712
|
+
else
|
713
|
+
if list["orgs"].detect{|aux| aux["name"]==config["Org"]}["assigs"].detect{|aux2| aux2["name_assig"]==assig}["repo#{reponumber}"]!=nil
|
714
|
+
list["orgs"].detect{|aux| aux["name"]==config["Org"]}["assigs"].detect{|aux2| aux2["name_assig"]==assig}.delete("repo#{reponumber}")
|
715
|
+
list["orgs"].detect{|aux| aux["name"]==config["Org"]}["assigs"].detect{|aux2| aux2["name_assig"]==assig}.delete("sufix#{reponumber}")
|
716
|
+
Sys.new.save_assigs("#{ENV['HOME']}/.ghedsh",list)
|
717
|
+
else
|
718
|
+
puts "Doesn't exist that repository"
|
719
|
+
end
|
720
|
+
end
|
721
|
+
end
|
722
|
+
|
723
|
+
def rm_assigment_student(config,assig,student,mode)
|
724
|
+
list=self.load_assig()
|
725
|
+
if mode==1
|
726
|
+
if list["orgs"].detect{|aux| aux["name"]==config["Org"]}["assigs"].detect{|aux2| aux2["name_assig"]==assig}["people"].include?(student)
|
727
|
+
list["orgs"].detect{|aux| aux["name"]==config["Org"]}["assigs"].detect{|aux2| aux2["name_assig"]==assig}["people"].delete(student)
|
728
|
+
puts "Student #{student} correctly deleted from the assignment"
|
729
|
+
Sys.new.save_assigs("#{ENV['HOME']}/.ghedsh",list)
|
730
|
+
else
|
731
|
+
puts "Student not found"
|
732
|
+
end
|
733
|
+
else
|
734
|
+
list["orgs"].detect{|aux| aux["name"]==config["Org"]}["assigs"].detect{|aux2| aux2["name_assig"]==assig}["people"].clear()
|
735
|
+
puts "All the students has been deleted from the assignment"
|
736
|
+
Sys.new.save_assigs("#{ENV['HOME']}/.ghedsh",list)
|
737
|
+
end
|
738
|
+
end
|
739
|
+
|
740
|
+
def rm_assigment_group(config,assig,group,mode)
|
741
|
+
list=self.load_assig()
|
742
|
+
if mode==1
|
743
|
+
if list["orgs"].detect{|aux| aux["name"]==config["Org"]}["assigs"].detect{|aux2| aux2["name_assig"]==assig}["groups"].include?(group)
|
744
|
+
list["orgs"].detect{|aux| aux["name"]==config["Org"]}["assigs"].detect{|aux2| aux2["name_assig"]==assig}["groups"].delete(group)
|
745
|
+
puts "Group #{group} correctly deleted from the assignment"
|
651
746
|
Sys.new.save_assigs("#{ENV['HOME']}/.ghedsh",list)
|
747
|
+
else
|
748
|
+
puts "Group not found"
|
749
|
+
end
|
750
|
+
else
|
751
|
+
list["orgs"].detect{|aux| aux["name"]==config["Org"]}["assigs"].detect{|aux2| aux2["name_assig"]==assig}["groups"].clear()
|
752
|
+
puts "All the groups has been deleted from the assignment"
|
753
|
+
Sys.new.save_assigs("#{ENV['HOME']}/.ghedsh",list)
|
754
|
+
end
|
755
|
+
end
|
756
|
+
|
757
|
+
def assignment_repo_sufix(reponumber,order)
|
758
|
+
op=""
|
759
|
+
print "\n"
|
760
|
+
if order==1
|
761
|
+
while op=="" or op=="\n"
|
762
|
+
puts "Add the suffix of the repository \"#{reponumber}\", in order to differentiate it from the other repositories: "
|
763
|
+
op=gets.chomp
|
764
|
+
end
|
765
|
+
else
|
766
|
+
while op=="" or op=="\n"
|
767
|
+
puts "Add the suffix of the first repository, in order to differentiate it from the other repositories: "
|
768
|
+
op=gets.chomp
|
652
769
|
end
|
653
770
|
end
|
771
|
+
return op
|
772
|
+
end
|
773
|
+
|
774
|
+
def change_repo_sufix(config,assig,reponumber)
|
775
|
+
list=self.load_assig()
|
776
|
+
if list["orgs"].detect{|aux| aux["name"]==config["Org"]}["assigs"].detect{|aux2| aux2["name_assig"]==assig}["sufix#{reponumber}"]!=nil
|
777
|
+
if reponumber==1
|
778
|
+
sufixname=self.assignment_repo_sufix(reponumber,2)
|
779
|
+
sufix="sufix1"
|
780
|
+
else
|
781
|
+
sufixname=self.assignment_repo_sufix(reponumber,1)
|
782
|
+
sufix="sufix#{reponumber}"
|
783
|
+
end
|
784
|
+
|
785
|
+
list["orgs"].detect{|aux| aux["name"]==config["Org"]}["assigs"].detect{|aux2| aux2["name_assig"]==assig}["#{sufix}"]=sufixname
|
786
|
+
Sys.new.save_assigs("#{ENV['HOME']}/.ghedsh",list)
|
787
|
+
else
|
788
|
+
puts "Doesn't exist a repository with that identifier"
|
789
|
+
end
|
654
790
|
end
|
655
791
|
|
656
792
|
def show_organization_members_bs(client,config)
|
data/lib/actions/system.rb
CHANGED
@@ -346,6 +346,23 @@ class Sys
|
|
346
346
|
return list
|
347
347
|
end
|
348
348
|
|
349
|
+
def search_rexp_peoplehash(list,exp)
|
350
|
+
found=[]
|
351
|
+
yes=false
|
352
|
+
list.each do |i|
|
353
|
+
i.each do |j|
|
354
|
+
if j[1].match(/#{exp}/)
|
355
|
+
yes=true
|
356
|
+
end
|
357
|
+
end
|
358
|
+
if yes==true
|
359
|
+
found.push(i)
|
360
|
+
yes=false
|
361
|
+
end
|
362
|
+
end
|
363
|
+
return found
|
364
|
+
end
|
365
|
+
|
349
366
|
def parse()
|
350
367
|
options = {:user => nil, :token => nil, :path => nil}
|
351
368
|
|
data/lib/interface.rb
CHANGED
@@ -35,21 +35,21 @@ class Interface
|
|
35
35
|
|
36
36
|
options=@sysbh.parse
|
37
37
|
|
38
|
-
|
39
|
-
|
40
|
-
|
38
|
+
trap("SIGINT") { throw :ctrl_c}
|
39
|
+
catch :ctrl_c do
|
40
|
+
begin
|
41
41
|
if options[:user]==nil && options[:token]==nil && options[:path]!=nil
|
42
42
|
self.run(options[:path],options[:token],options[:user])
|
43
43
|
else
|
44
44
|
self.run("#{ENV['HOME']}/.ghedsh",options[:token],options[:user])
|
45
45
|
end
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
46
|
+
rescue SystemExit, Interrupt
|
47
|
+
raise
|
48
|
+
rescue Exception => e
|
49
|
+
puts "exit"
|
50
|
+
puts e
|
51
|
+
end
|
52
|
+
end
|
53
53
|
end
|
54
54
|
|
55
55
|
def prompt()
|
@@ -137,7 +137,7 @@ class Interface
|
|
137
137
|
@config["Team"]=nil
|
138
138
|
@config["TeamID"]=nil
|
139
139
|
@teams_repos=[]
|
140
|
-
@deep=
|
140
|
+
@deep=ORGS
|
141
141
|
when @deep == ASSIG
|
142
142
|
@deep=ORGS
|
143
143
|
@config["Assig"]=nil
|
@@ -492,6 +492,10 @@ class Interface
|
|
492
492
|
when op == "cd .."
|
493
493
|
if @deep==ORGS then t.clean_groupsteams() end ##cleans groups cache
|
494
494
|
self.cdback(false)
|
495
|
+
when op.include?("cd assig") && opcd[0]=="cd" && opcd[1]=="assig" && opcd.size==3
|
496
|
+
if @deep==ORGS
|
497
|
+
self.cdassig(opcd[2])
|
498
|
+
end
|
495
499
|
when op == "people" then self.people()
|
496
500
|
when op == "teams"
|
497
501
|
if @deep==ORGS
|
@@ -579,7 +583,21 @@ class Interface
|
|
579
583
|
if opcd.size==3 and @deep==ORGS
|
580
584
|
t.delete_group(@config,opcd[2])
|
581
585
|
end
|
582
|
-
|
586
|
+
if opcd.size==3 and @deep==ASSIG
|
587
|
+
if opcd[2]!="-all"
|
588
|
+
o.rm_assigment_group(@config,@config["Assig"],opcd[2],1)
|
589
|
+
else
|
590
|
+
o.rm_assigment_group(@config,@config["Assig"],opcd[2],2)
|
591
|
+
end
|
592
|
+
end
|
593
|
+
when op.include?("rm student") && opcd[0]=="rm" && opcd[1]="student"
|
594
|
+
if opcd.size==3 and @deep==ASSIG
|
595
|
+
if opcd[2]!="-all"
|
596
|
+
o.rm_assigment_student(@config,@config["Assig"],opcd[2],1)
|
597
|
+
else
|
598
|
+
o.rm_assigment_student(@config,@config["Assig"],opcd[2],2)
|
599
|
+
end
|
600
|
+
end
|
583
601
|
when op.include?("rm repository") && opcd[0]=="rm" && opcd[1]="repository"
|
584
602
|
if @deep==ORGS || @deep==USER || @deep==TEAM
|
585
603
|
r.delete_repository(@client,@config,opcd[2],@deep)
|
@@ -587,13 +605,16 @@ class Interface
|
|
587
605
|
@orgs_repos.delete(opcd[2])
|
588
606
|
end
|
589
607
|
end
|
590
|
-
|
608
|
+
when op.include?("rm repo")&& opcd[0]=="rm" && opcd[1]="repo"
|
609
|
+
if @deep==ASSIG and opcd.size==3
|
610
|
+
o.rm_assigment_repo(@config,@config["Assig"],opcd[2])
|
611
|
+
end
|
591
612
|
when op == "info"
|
592
613
|
if @deep==ASSIG then o.show_assig_info(@config,@config["Assig"]) end
|
593
614
|
if @deep==USER_REPO || @deep==TEAM_REPO || @deep==ORGS_REPO then r.info_repository(@client,@config,@deep) end
|
594
615
|
when op== "add repo"
|
595
616
|
if @deep==ASSIG then o.add_repo_to_assig(@client,@config,@config["Assig"],nil) end
|
596
|
-
when op.include?("change repo") && opcd[0]=="change" && opcd[1]
|
617
|
+
when op.include?("change repo") && opcd[0]=="change" && opcd[1]=="repo"
|
597
618
|
if @deep==ASSIG
|
598
619
|
if opcd.size>2
|
599
620
|
o.add_repo_to_assig(@client,@config,@config["Assig"],opcd[2])
|
@@ -601,6 +622,10 @@ class Interface
|
|
601
622
|
o.add_repo_to_assig(@client,@config,@config["Assig"],1)
|
602
623
|
end
|
603
624
|
end
|
625
|
+
when op.include?("change sufix") && opcd[0]=="change" && opcd[1]=="sufix"
|
626
|
+
if @deep==ASSIG
|
627
|
+
if opcd.size>2 then o.change_repo_sufix(@config,@config["Assig"],opcd[2]) end
|
628
|
+
end
|
604
629
|
when op=="add students" && @deep==ASSIG
|
605
630
|
o.add_people_to_assig(@client,@config,@config["Assig"])
|
606
631
|
when op.include?("rm")
|
@@ -720,7 +745,11 @@ class Interface
|
|
720
745
|
info_strm=o.show_people_info(@client,@config,nil)
|
721
746
|
if info_strm!=nil then @sysbh.add_history_str(2,info_strm) end
|
722
747
|
else
|
723
|
-
|
748
|
+
if opcd[2].include?("/")
|
749
|
+
o.search_rexp_people_info(@client,@config,opcd[2])
|
750
|
+
else
|
751
|
+
o.show_people_info(@client,@config,opcd[2])
|
752
|
+
end
|
724
753
|
end
|
725
754
|
end
|
726
755
|
if opcd[0]=="clone"
|
data/lib/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ghedsh
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.36
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Javier Clemente
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2017-04
|
12
|
+
date: 2017-05-04 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: octokit
|