last_hit 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +15 -1
- data/lib/last_hit/rc_adapter/git.rb +1 -0
- data/lib/last_hit/version.rb +1 -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: d592cfa8e2d8af08c2b5dc48dd6042504258b660
|
4
|
+
data.tar.gz: 648ed4e26644a11bd0a6b5c5d7ff96c3b5ce81a0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0f0d9f46f822f2813af45cc049bb64e5972837683276c391c4e3d5e543690fa1336331118f9d48f7e81fdbef224b33ecca5e39e66b43c4fbdfffa257b7b79522
|
7
|
+
data.tar.gz: 6607e7202b02195607397d08a7105a3ec60c9e8d84aa65982389bf7f0f1158024a796956151219fc1c445fa7358fc58ff982ecd1493b210bcaf4b392e36206a3
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# LastHit
|
2
2
|
|
3
|
-
You finish your features, push code to test servers and they fails after centuries wating? This gem will reduce your waiting time by running relevant tests in your current branch.
|
3
|
+
You finish your features, push code to test servers and they fails after centuries wating? This gem will reduce your waiting time by running only relevant tests in your current branch before pushing. Then you can fix failed tests right before pushing them to the test server.
|
4
4
|
|
5
5
|
## Installation
|
6
6
|
|
@@ -40,12 +40,26 @@ end
|
|
40
40
|
|
41
41
|
```ruby
|
42
42
|
last_hit modified_tests
|
43
|
+
|
44
|
+
#=> Run files: spec/file_filter/spec_spec.rb
|
45
|
+
|
46
|
+
#=> .
|
47
|
+
|
48
|
+
#=> Finished in 0.00105 seconds (files took 0.04047 seconds to load)
|
49
|
+
#=> 1 examples, 0 failures
|
43
50
|
```
|
44
51
|
|
45
52
|
#### Run all modified tests of your current branch compared to the base branch
|
46
53
|
|
47
54
|
```ruby
|
48
55
|
last_hit all_tests -b develop
|
56
|
+
|
57
|
+
#=> Run files: spec/file_filter/spec_spec.rb spec/rc_adapter/git_spec.rb
|
58
|
+
|
59
|
+
#=> ...
|
60
|
+
|
61
|
+
#=> Finished in 0.00305 seconds (files took 0.14047 seconds to load)
|
62
|
+
#=> 3 examples, 0 failures
|
49
63
|
```
|
50
64
|
|
51
65
|
`develop` is your base branch
|
@@ -8,6 +8,7 @@ class LastHit
|
|
8
8
|
|
9
9
|
def current_branch_files(base_branch)
|
10
10
|
current_sha = current_commit_sha
|
11
|
+
$stdout.puts "Run tests changed between: #{base_branch} -> #{current_branch}"
|
11
12
|
ancestor_sha = common_ancestor(current_branch, base_branch)
|
12
13
|
|
13
14
|
`git diff --name-only #{current_sha} #{ancestor_sha} -z`.split("\x0")
|
data/lib/last_hit/version.rb
CHANGED