learn-test 3.3.0.pre.3 → 3.3.0.pre.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/learn_test/git/wip/base.rb +3 -2
- data/lib/learn_test/git/wip/branch.rb +2 -2
- data/lib/learn_test/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ce0ace7de8deb6d1ed1c75f04e3a4bab456ca7e359b04862ae3130c5055ec2b5
|
4
|
+
data.tar.gz: 1126e77a12912921eba8cdb78491a1061d25e5534cf9de3f51a8be0150d874ce
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d7bca7e41c472fbd244ffa1a4622958fb002f35e39fe5315ff10f3b78764d31f0061354661c73d2c85a0328380ffebfd212ed90d15d1b6d9796fa3276da27d78
|
7
|
+
data.tar.gz: cc8978a4410022a1f8089db3c17b87eec877234f9b91e138eb3c4e0c4043d169fc1686d419b71f40c35e5f605a5c5525ba54cd59b19234b0827a21bbba614a65
|
@@ -10,6 +10,7 @@ module LearnTest
|
|
10
10
|
module Wip
|
11
11
|
class Base < ::Git::Path
|
12
12
|
TEMPFILE = '.wip'
|
13
|
+
PREFIX = 'refs/wip/'
|
13
14
|
|
14
15
|
attr_reader :working_branch, :wip_branch
|
15
16
|
|
@@ -24,7 +25,7 @@ module LearnTest
|
|
24
25
|
|
25
26
|
@tmp = Tempfile.new(TEMPFILE)
|
26
27
|
@working_branch = Branch.new(base: @base, name: current_branch)
|
27
|
-
@wip_branch =
|
28
|
+
@wip_branch = Branch.new(base: @base, name: "#{PREFIX}#{current_branch}")
|
28
29
|
end
|
29
30
|
|
30
31
|
def process!
|
@@ -44,7 +45,7 @@ module LearnTest
|
|
44
45
|
@base.diff(new_tree, @wip_branch.parent)
|
45
46
|
|
46
47
|
# tree_diff = @base.diff(new_tree, @wip_branch.parent)
|
47
|
-
# raise
|
48
|
+
# raise NoChangesError, @wip_branch if tree_diff.count.zero?
|
48
49
|
|
49
50
|
commit = @base.commit_tree(new_tree, parent: @wip_branch.parent)
|
50
51
|
|
@@ -17,10 +17,10 @@ module LearnTest
|
|
17
17
|
@base.revparse(@name)
|
18
18
|
rescue ::Git::GitExecuteError => e
|
19
19
|
if raise_no_commits
|
20
|
-
raise e.message.match(
|
20
|
+
raise e.message.match(NoCommitsError::REGEX) ? NoCommitsError.new(@name) : e
|
21
21
|
end
|
22
22
|
|
23
|
-
raise unless e.message.match(
|
23
|
+
raise unless e.message.match(NoCommitsError::REGEX)
|
24
24
|
|
25
25
|
false
|
26
26
|
end
|
data/lib/learn_test/version.rb
CHANGED