ghedsh 1.1.33 → 1.1.34

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9dca8d52441f8e5577b607f806391d21014b8520
4
- data.tar.gz: 812a9a01446c4180aecd626a6c4162432fb873d7
3
+ metadata.gz: c000cf17c43c9b07bfd32dac120393c4d1aba0f4
4
+ data.tar.gz: 08e5da6725f2183f3e06c2034516e3be04fd798c
5
5
  SHA512:
6
- metadata.gz: 0f970a8ecb8535662f24dac78a2f1039038f208f51f069c6f9fea090fd922598198fb2d7050cbf5dec5845a7e230f2afc53659524107b670a129ca6048a07581
7
- data.tar.gz: dc6172feedf7d0336cdeac6eec0c33c2a5ab0c2f9d5fc47820f8dc08269206acef96c64a93d79661c23e80497fd2ef2d80ae6692ca9cae756ba52659d00c875f
6
+ metadata.gz: a495ef83cc19ae0430e379521fc36f797cf490f81c3651907384f68b1cc2c4c469c603ebee66f1f9edd6eed304d8f6407b3d3baad7616922a64b125bc3289b38
7
+ data.tar.gz: 634663d451195320e5e25707f6d1f2be0380a54fa79102fef274ee0c32f4f3f41263db8f3d75b721c9a19d8ad15913d2d97c2dcf7fa0871e62f1d3b5157fb029
data/lib/actions/help.rb CHANGED
@@ -50,6 +50,8 @@ class HelpM
50
50
  print "\t\t\t\t->\tgroup [name of the group]\n\n"
51
51
  print "\tnew group\t\tCreate a new group. Expected the name and teams given one by one\n"
52
52
  print "\t\t\t\t->\tnew group [name of the group] [team1] [team2] [team3] ... \n\n"
53
+ print "\t\t\t\tIf you want to import the teams from a file, use the parameter -f\n"
54
+ print "\t\t\t\t->\tnew group -f [name of the group] [file]\n\n"
53
55
  print "\trm group\t\tDelete a created group\n"
54
56
  print "\t\t\t\t->\trm group [name of the group]\n\n"
55
57
  print "\trm team\t\t\tDelete a team in you organization. Expected the name of the team\n"
@@ -127,7 +129,7 @@ class HelpM
127
129
  self.common_opt
128
130
  puts " Assignment options:"
129
131
  print "\n\tCOMMAND\t\t\tDESCRIPTION\n\n"
130
- print "\tinfo\t\t\Show information about the assignment\n"
132
+ print "\tinfo\t\t\t\Show information about the assignment\n"
131
133
  print "\tadd repo\t\tAdd or create the repository of the assignment\n"
132
134
  print "\tadd group\t\tAdd a new group to the assignment\n"
133
135
  print "\tmake\t\t\tCreate the repository assignment in Github for each team of every group\n\n"
data/lib/actions/teams.rb CHANGED
@@ -159,6 +159,16 @@ class Teams
159
159
  end
160
160
  end
161
161
 
162
+ def new_group_file(client,config,name,file)
163
+ sys=Sys.new()
164
+ list=sys.loadfile(file)
165
+ if list!=nil
166
+ self.new_group(client,config,name,list)
167
+ else
168
+ puts "The file doesn't exist or It's empty."
169
+ end
170
+ end
171
+
162
172
  def new_group(client,config,name,listgroups)
163
173
  sys=Sys.new()
164
174
  list=sys.load_groups("#{ENV['HOME']}/.ghedsh")
data/lib/interface.rb CHANGED
@@ -548,7 +548,10 @@ class Interface
548
548
  @sysbh.add_history(opcd[2])
549
549
  end
550
550
  when op.include?("new group") && opcd[0]=="new" && opcd[1]="group"
551
- if opcd.size>3 and @deep==ORGS
551
+ if opcd.size==5 and @deep==ORGS and opcd[2]=="-f"
552
+ t.new_group_file(@client,@config,opcd[3],opcd[4])
553
+ end
554
+ if opcd.size>3 and @deep==ORGS and !op.include?("-f")
552
555
  t.new_group(@client,@config,opcd[2],opcd[3..opcd.size-1])
553
556
  end
554
557
 
data/lib/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Ghedsh
2
- VERSION='1.1.33'
2
+ VERSION='1.1.34'
3
3
  end
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.33
4
+ version: 1.1.34
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-19 00:00:00.000000000 Z
12
+ date: 2017-04-20 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: octokit