ghedsh 1.1.5 → 1.1.6
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 +5 -3
- data/lib/actions/repo.rb +8 -2
- data/lib/actions/system.rb +3 -2
- data/lib/interface.rb +8 -6
- 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: 5531c3b5660cdfd6546b38acd4b5790661059655
|
4
|
+
data.tar.gz: 8606e5bb3e19a2ee9b9d9a5d4a9125a8f6520bf1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 098338fb6c2cc94b0b2a71c03522859efe8726ab36b9377ede809a538d9b7280a24d8b7b2b2ca9e60e5ad767b1106e0aa2045499ecb798e6feecc09f653ffc49
|
7
|
+
data.tar.gz: d5fa13872ab7bb5780e28b56a6bdcd8aa741f52b00f74f6d6b0de3de8042b995be563a3a41e11d3bd580a227b08b48680fa41b7c774e38dfcea88ac4a486b357
|
data/lib/actions/help.rb
CHANGED
@@ -58,10 +58,12 @@ class HelpM
|
|
58
58
|
def bin
|
59
59
|
puts "\nList of commands\n\n"
|
60
60
|
puts "ghedsh"
|
61
|
-
puts "Run with default configuration"
|
61
|
+
puts "Run with default configuration. Configuration files are being set in #{ENV['HOME']}"
|
62
62
|
puts "ghedsh --token TOKEN"
|
63
|
-
puts "Provides a github access token by argument"
|
63
|
+
puts "Provides a github access token by argument. Also works with ghedsh -t"
|
64
|
+
puts "ghedsh --version"
|
65
|
+
puts "Show the current version of GHEDSH. Also works with ghedsh -v"
|
64
66
|
puts "ghedsh --help"
|
65
|
-
puts "Show the executable options"
|
67
|
+
puts "Show the executable options. Also works with ghedsh -h\n\n"
|
66
68
|
end
|
67
69
|
end
|
data/lib/actions/repo.rb
CHANGED
@@ -151,8 +151,14 @@ class Repositories
|
|
151
151
|
web="https://github.com/"
|
152
152
|
web2="git@github.com:"
|
153
153
|
|
154
|
-
|
155
|
-
|
154
|
+
if exp.match(/^\//)
|
155
|
+
exps=exp.split('/')
|
156
|
+
list=self.get_repos_list(client,config,scope)
|
157
|
+
list=Sys.new.search_rexp(list,exps[1])
|
158
|
+
else
|
159
|
+
list=[]
|
160
|
+
list.push(exp)
|
161
|
+
end
|
156
162
|
|
157
163
|
if (list.empty?) == false
|
158
164
|
case
|
data/lib/actions/system.rb
CHANGED
@@ -23,7 +23,7 @@ class Sys
|
|
23
23
|
config["User"]=@client.login
|
24
24
|
if argv_token!=nil
|
25
25
|
self.save_token(configure_path,argv_token)
|
26
|
-
end
|
26
|
+
end
|
27
27
|
return config
|
28
28
|
else
|
29
29
|
return self.set_loguin_data_sh(config,configure_path)
|
@@ -52,7 +52,7 @@ class Sys
|
|
52
52
|
token = gets.chomp
|
53
53
|
us=self.login(token)
|
54
54
|
if us!=nil
|
55
|
-
puts "Login succesful as #{us.login}"
|
55
|
+
puts "Login succesful as #{us.login}\n"
|
56
56
|
config["User"]=us.login
|
57
57
|
File.write("#{configure_path}/ghedsh-token",token) #config["Token"]=token
|
58
58
|
@client=us
|
@@ -76,6 +76,7 @@ class Sys
|
|
76
76
|
FileUtils.mkdir_p(configure_path)
|
77
77
|
File.new("#{configure_path}/ghedsh-token","w")
|
78
78
|
File.write("#{configure_path}/ghedsh-cache.json",con.to_json)
|
79
|
+
puts "Confiration files created in #{configure_path}"
|
79
80
|
end
|
80
81
|
|
81
82
|
|
data/lib/interface.rb
CHANGED
@@ -10,6 +10,7 @@ require 'actions/repo'
|
|
10
10
|
require 'actions/system'
|
11
11
|
require 'actions/teams'
|
12
12
|
require 'actions/user'
|
13
|
+
require 'version'
|
13
14
|
|
14
15
|
class Interface
|
15
16
|
attr_reader :option
|
@@ -24,19 +25,22 @@ class Interface
|
|
24
25
|
@sysbh=Sys.new()
|
25
26
|
|
26
27
|
if ARGV.empty?
|
27
|
-
self.run('./.ghedsh',nil)
|
28
|
+
#self.run('./.ghedsh',nil)
|
29
|
+
self.run("#{ENV['HOME']}/.ghedsh",nil)
|
28
30
|
else
|
29
31
|
case
|
30
|
-
when ARGV[0]=="--configpath"
|
32
|
+
when ARGV[0]=="--configpath" || ARGV[0]=="-c"
|
31
33
|
if File.exist?(ARGV[1])
|
32
34
|
self.run(ARGV[1],nil)
|
33
35
|
else
|
34
36
|
puts "the path doesn't exists"
|
35
37
|
end
|
36
|
-
when ARGV[0]=="--help"
|
38
|
+
when ARGV[0]=="--help" || ARGV[0]=="-h"
|
37
39
|
HelpM.new.bin()
|
38
|
-
when ARGV[0]=="--token"
|
40
|
+
when ARGV[0]=="--token" || ARGV[0]=="-t"
|
39
41
|
self.run('./.ghedsh',ARGV[1])
|
42
|
+
when ARGV[0]=="--version" || ARGV[0]=="-v"
|
43
|
+
puts "GitHub Education Shell v#{Ghedsh::VERSION}"
|
40
44
|
end
|
41
45
|
end
|
42
46
|
end
|
@@ -248,8 +252,6 @@ class Interface
|
|
248
252
|
case
|
249
253
|
when op == "exit" then ex=0
|
250
254
|
when op == "help" then self.help()
|
251
|
-
#when op == "repos" then self.repos()
|
252
|
-
#when op == "ls -l" then self.lsl()
|
253
255
|
when op == "orgs" then self.orgs()
|
254
256
|
when op == "cd .." then self.cdback()
|
255
257
|
when op == "members" then self.members()
|
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.6
|
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: 2016-04-
|
12
|
+
date: 2016-04-19 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: octokit
|