tbgit 1.1.4 → 1.1.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/tbgit/version.rb +1 -1
  3. data/lib/tbspec.rb +23 -12
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f1a40485a658295dfd055b6a956acd880751e2d6
4
- data.tar.gz: a78b1d691414b11fbea988dc3fb8fd1138770ac7
3
+ metadata.gz: f8b95081e1b70cc31da11403e85e0ecbe13c42d5
4
+ data.tar.gz: 9176dd591015efa7ae6909b0bd714ef7463a8c50
5
5
  SHA512:
6
- metadata.gz: f321f0900b7896a949dbb98fce8310afd910a604ba15e7dad04e31e0c8e61afa382a6acdd729749feb0dfc0f86bf316e5d41a1304065985e465eef094fa330b5
7
- data.tar.gz: ad1a2a01e23c6a1b50634c6d2adb22aaaf9990c2c2a4ca7ce439c8260463652aedd6c26033e881282d0bc3eb45694d5b7305ac1d83b7f67ec84c6372620daadb
6
+ metadata.gz: afb5b7d42201cfb573eaf55c3f546ceda08c522342a77c6dea19743d024850d82d89be2e0bf2a2ed451f8675902d8a5ca3cc432ca4d06b0e810cf8d77f978358
7
+ data.tar.gz: b349af5525ab0545f0fb031ce3d09d197efc884687d291fa09a236f29fe8761c10e07ef565c05129d9f88c3f9f588eb1cfa968975c66c1b28ec4580ea25c328b
data/lib/tbgit/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Tbgit
2
- VERSION = "1.1.4"
2
+ VERSION = "1.1.5"
3
3
  end
data/lib/tbspec.rb CHANGED
@@ -42,6 +42,10 @@ class TBSpec
42
42
  options[:most_recent] = m
43
43
  end
44
44
 
45
+ opts.on("-c", "--check USERNAME", "Check to make sure that the most recent commit was NOT from the specified user.") do |u|
46
+ options[:check] = u
47
+ end
48
+
45
49
  opts.on_tail("-h", "--help", "Show this message") do
46
50
  puts opts
47
51
  exit
@@ -122,18 +126,25 @@ class TBSpec
122
126
  "git push <branch> <branch>:master"])
123
127
  else
124
128
  system("git checkout " + student)
125
- puts "rspec " + specfile + " > " + studentcopy
126
- system("rspec " + specfile + " > " + studentcopy)
127
- puts "rspec --format json --out " + mastercopy + "/"+student+" " + specfile
128
- system("rspec --format json --out " + mastercopy + "/"+student+" " + specfile)
129
- puts "git add --all"
130
- system("git add --all")
131
- puts "git commit -am '" + commit_message + "'"
132
- system("git commit -am '" + commit_message + "'")
133
- puts "git push "+student+" "+student+":master"
134
- system("git push "+student+" "+student+":master")
135
- tbgit.switch_to_master
136
-
129
+ if options[:check]!=nil
130
+ output = system("git log -1 | egrep " + options[:check])
131
+ if output!=nil && output != ""
132
+ #do nothing
133
+ else
134
+ puts "rspec " + specfile + " > " + studentcopy
135
+ system("rspec " + specfile + " > " + studentcopy)
136
+ puts "rspec --format json --out " + mastercopy + "/"+student+" " + specfile
137
+ system("rspec --format json --out " + mastercopy + "/"+student+" " + specfile)
138
+ puts "git add --all"
139
+ system("git add --all")
140
+ puts "git commit -am '" + commit_message + "'"
141
+ system("git commit -am '" + commit_message + "'")
142
+ puts "git push "+student+" "+student+":master"
143
+ system("git push "+student+" "+student+":master")
144
+
145
+ tbgit.switch_to_master
146
+ end
147
+ end
137
148
  end
138
149
 
139
150
  my_parser = Parser.new
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tbgit
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.4
4
+ version: 1.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Charlie Proctor