tbgit 1.0.1 → 1.0.2
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 +4 -4
- data/README.md +1 -0
- data/bin/tbgit +2 -0
- data/lib/tbgit/version.rb +1 -1
- data/lib/tbgit.rb +24 -0
- 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: 9c8b1fa30525c2f20426afcef7c6df1b4a84157e
|
4
|
+
data.tar.gz: 04a1c270214b68765861dad3fa086c11c594ab2a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
data/lib/tbgit/version.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2014-05-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|