rip 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -43,7 +43,7 @@ module Rip
43
43
 
44
44
  def unpack!
45
45
  Dir.chdir cache_path do
46
- git_reset_hard(version)
46
+ git_reset_hard version_is_branch? ? "origin/#{version}" : version
47
47
  git_submodule_init
48
48
  git_submodule_update
49
49
  end
@@ -60,8 +60,12 @@ module Rip
60
60
 
61
61
  fetch
62
62
  Dir.chdir(cache_path) do
63
- git_cat_file(@version).size > 0
63
+ git_cat_file(@version).size > 0 || version_is_branch?
64
64
  end
65
65
  end
66
+
67
+ def version_is_branch?
68
+ git_cat_file("origin/#{version}").size > 0
69
+ end
66
70
  end
67
71
  end
@@ -1,6 +1,6 @@
1
1
  module Rip
2
2
  module Version
3
- VERSION = "0.0.4"
3
+ VERSION = "0.0.5"
4
4
 
5
5
  def self.to_s
6
6
  VERSION
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rip
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Wanstrath