tbgit 1.1.1 → 1.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/tbgit/version.rb +1 -1
- data/lib/tbspec.rb +14 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9371c3b3beaa50e8be81c12a67101e97399e2b83
|
4
|
+
data.tar.gz: 487cdd223ff3fd3029c6238a44f7bd0dfa8b42b9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1a2cc682892b625dc26ec5dfe86f9103a07101fec0c05ffe7ae54b39a557a09fefe8eb58540ec5990726232e0f62264a479c0fd1867376ae4db3d65659ce8a6b
|
7
|
+
data.tar.gz: 2abc3a5699de3d3ae77a14e69af813e07317abf83e50a45c8cee9299036719196d2309b42da7471f71823ff7c0f02a571d0a1821be78dbf1f5ca56f7d0064533
|
data/lib/tbgit/version.rb
CHANGED
data/lib/tbspec.rb
CHANGED
@@ -38,6 +38,10 @@ class TBSpec
|
|
38
38
|
options[:all] = a
|
39
39
|
end
|
40
40
|
|
41
|
+
opts.on("--most-recent", "Use this option to spec the student with the most recent commit.") do |m|
|
42
|
+
options[:most_recent] = m
|
43
|
+
end
|
44
|
+
|
41
45
|
opts.on_tail("-h", "--help", "Show this message") do
|
42
46
|
puts opts
|
43
47
|
exit
|
@@ -81,7 +85,16 @@ class TBSpec
|
|
81
85
|
|
82
86
|
all = false
|
83
87
|
student = ""
|
84
|
-
if options[:
|
88
|
+
if options[:most_recent]
|
89
|
+
most_recent_file = Tempfile.new("recent")
|
90
|
+
|
91
|
+
command = "git for-each-ref --sort=-committerdate refs/heads/ --format='%(refname:short)' >> " + most_recent_file.path
|
92
|
+
system command
|
93
|
+
puts command
|
94
|
+
array = IO.readlines(most_recent_file)
|
95
|
+
|
96
|
+
student = array[0].chomp
|
97
|
+
elsif options[:student]==nil && !options[:all]
|
85
98
|
puts "Please specify a student to spec. Type 'all' to spec all students"
|
86
99
|
student = $stdin.gets.chomp
|
87
100
|
elsif options[:student]!=nil && !options[:all]
|