tbgit 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 94635ee4762c4d5e5dc0e28679c657c67c1643c6
4
- data.tar.gz: 77117c9fdd487dcdfb6fa1154740029a4ab49402
3
+ metadata.gz: 9c8b1fa30525c2f20426afcef7c6df1b4a84157e
4
+ data.tar.gz: 04a1c270214b68765861dad3fa086c11c594ab2a
5
5
  SHA512:
6
- metadata.gz: cf7e40f9c7bd5e37969c43342b7988637b8dac74981aa0da0245bef429b9316c0831069262f9c2235a92536848c9e447e8b69e2490b96ad6bf944fe5ca099fe0
7
- data.tar.gz: 601fc398ffa97746179bfd895ab76c8cf73cbe0bc5fdc55cbc9abb5e22f75acc88a38a56f3b317930c0b6d55322dccbe891626984a92379b4eee813b78380398
6
+ metadata.gz: edfeffd1c96cc9524aab31547c7e7e1d61da06697dc5c611f01dccb91c56e632b94e14fe6e98320d84a84a0fd6283fdf9430b408c14fef938dbff4f19d992385
7
+ data.tar.gz: a0c2b7c9d1f0dfb03b41ccf4c62e9fc9cf473108276c92c2c3d07ef27df83b8f6e3d6df0844342a29ffba45579b1a27ab5d68a18232747e05fae1afbe79e932b
data/README.md CHANGED
@@ -16,6 +16,7 @@ TBGit is a command-line utility to facilitate the management of multiple GitHub
16
16
  - merge merges a specified branch with each student branch and then commits the changes
17
17
  - status runs `git status` on each students branch and displays the results
18
18
  - each executes a specified series of commands on each local student branch
19
+ - spec runs rspec on specified files in a students repo
19
20
 
20
21
  - add-remotes adds each student's repository as a remote
21
22
  - create-locals creates a local branch to track the students remote master branch
data/bin/tbgit CHANGED
@@ -33,6 +33,8 @@ when "status"
33
33
  tbgit.git_status
34
34
  when "each"
35
35
  tbgit.on_each_gather
36
+ when "spec"
37
+ tbgit.spec
36
38
  when "add-remotes"
37
39
  tbgit.gather
38
40
  tbgit.spacer
data/lib/tbgit/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Tbgit
2
- VERSION = "1.0.1"
2
+ VERSION = "1.0.2"
3
3
  end
data/lib/tbgit.rb CHANGED
@@ -221,6 +221,29 @@ module Main
221
221
  on_each_exec(["git status <branch>"])
222
222
  end
223
223
 
224
+ def spec
225
+ puts "Please specify the relative path from your pwd to the rspec file you would like to spec, eg. 'hw1/spec/spec.rb'"
226
+ specfile = $stdin.gets.chomp
227
+ puts "Where would you like to save the master copy of all results?"
228
+ puts "**Must be outside the student's repo directory, eg. '../results.txt'**"
229
+ mastercopy = $stdin.gets.chomp
230
+ puts "Where would you like to save each student's individual results?"
231
+ puts "**Must be inside the student's repo directory, eg. 'hw1/spec/results.txt'**"
232
+ studentcopy = $stdin.gets.chomp
233
+ puts "Commit message (commiting each student's results to their repo):"
234
+ commit_message = $stdin.gets.chomp
235
+ confirm("'rspec " + specfile + "' will be executed on each student's local branch. \
236
+ Individual results will be saved to " + studentcopy + " and master results to " + mastercopy + ". Continue?")
237
+
238
+ on_each_exec(["rspec " +specfile + " > " + studentcopy, #overwrite
239
+ "echo '<branch>' >> " + mastercopy,
240
+ "cat " + studentcopy + " >> " + mastercopy, #append
241
+ "git add --all",
242
+ "git commit -am '" + commit_message + "'",
243
+ "git push <branch> <branch>:master"])
244
+
245
+ end
246
+
224
247
  def help
225
248
  puts ""
226
249
  puts "TBGit is a command-line utility to facilitate the management of multiple GitHub student repositories."
@@ -233,6 +256,7 @@ module Main
233
256
  puts " ~ merge merges a specified branch with each student branch and then commits the changes"
234
257
  puts " ~ status runs `git status` on each students branch and displays the results"
235
258
  puts " ~ each executes a specified series of commands on each local student branch"
259
+ puts " ~ spec runs rspec on specified files in a students repo"
236
260
  puts ""
237
261
  puts " ~ add-remotes adds each student's repository as a remote"
238
262
  puts " ~ create-locals creates a local branch to track the students remote master branch"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tbgit
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Charlie Proctor
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-05-22 00:00:00.000000000 Z
11
+ date: 2014-05-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler