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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2a1a864132415df805ab19a42f9a8c5d3892602742fca35cf3a8aff5ae5e7a97
4
- data.tar.gz: 62fcb6feb51b50944d9622fb4306d815125c9338efc1be888775037e853b6d70
3
+ metadata.gz: ce0ace7de8deb6d1ed1c75f04e3a4bab456ca7e359b04862ae3130c5055ec2b5
4
+ data.tar.gz: 1126e77a12912921eba8cdb78491a1061d25e5534cf9de3f51a8be0150d874ce
5
5
  SHA512:
6
- metadata.gz: 52ab71e5a63eec57aba9391d97255d4aca85e62c9adae8dadb7f02efb0591d6f3d0637a203fca5b1c47fb27cd627c935d837b2e05f55f79f0b7dc1ebbcf025d7
7
- data.tar.gz: 94c627e54f10bbb7ae74f482c4d806ccba4de548b6530843524d950c6a5da3286d5e2e422a70a242daa1e51f66181950c991927e5f0eac38af874195bf176e23
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 = Reference.new(base: @base, name: current_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 LearnTest::Git::Wip::NoChangesError, @wip_branch if tree_diff.count.zero?
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(LearnTest::Git::Wip::NoCommitsError::REGEX) ? LearnTest::Git::Wip::NoCommitsError.new(@name) : e
20
+ raise e.message.match(NoCommitsError::REGEX) ? NoCommitsError.new(@name) : e
21
21
  end
22
22
 
23
- raise unless e.message.match(LearnTest::Git::Wip::NoCommitsError::REGEX)
23
+ raise unless e.message.match(NoCommitsError::REGEX)
24
24
 
25
25
  false
26
26
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module LearnTest
4
- VERSION = '3.3.0.pre.3'
4
+ VERSION = '3.3.0.pre.4'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: learn-test
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.3.0.pre.3
4
+ version: 3.3.0.pre.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Flatiron School