honkster-giternal 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION.yml CHANGED
@@ -1,5 +1,5 @@
1
1
  ---
2
2
  :major: 0
3
3
  :minor: 2
4
- :patch: 1
4
+ :patch: 2
5
5
  :build:
@@ -22,7 +22,7 @@ module Giternal
22
22
  FileUtils.mkdir_p checkout_path unless File.exist?(checkout_path)
23
23
  if checked_out?
24
24
  if !File.exist?(repo_path + '/.git')
25
- raise "Directory '#{@name}' exists but is not a git repository"
25
+ update_output { `cd #{checkout_path} && git clone --no-checkout #{@repo_url} #{@name}/.git && mv #{@name}/.git/.git/* #{@name}/.git && rmdir #{@name}/.git/.git` }
26
26
  else
27
27
  update_output { `cd #{repo_path} && git pull 2>&1` }
28
28
  end
@@ -39,7 +39,7 @@ module Giternal
39
39
  `find .git | sort | xargs tar czf .git.frozen.tgz`
40
40
  FileUtils.rm_r('.git')
41
41
  end
42
- `cd #{@base_dir} && git add -f #{rel_repo_path}`
42
+ `cd #{@base_dir} && git add -f #{rel_repo_path} && git rm --cached --ignore-unmatch #{rel_repo_path}/.git.frozen.tgz`
43
43
  true
44
44
  end
45
45
 
@@ -55,11 +55,11 @@ module Giternal
55
55
  should == 'newfile'
56
56
  end
57
57
 
58
- it "should raise an error if the directory exists but there's no .git dir" do
58
+ it "should clone the .git directory if the directory and .git.frozen.tgz does not exist and there's no .git dir" do
59
59
  FileUtils.mkdir_p(GiternalHelper.checked_out_path('foo'))
60
- lambda {
61
- @repository.update
62
- }.should raise_error(/Directory 'foo' exists but is not a git repository/)
60
+ File.exists?(GiternalHelper.checked_out_path('foo/.git')).should be_false
61
+ @repository.update
62
+ File.exists?(GiternalHelper.checked_out_path('foo/.git')).should be_true
63
63
  end
64
64
 
65
65
  describe "freezify" do
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: honkster-giternal
3
3
  version: !ruby/object:Gem::Version
4
- hash: 21
4
+ hash: 19
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 2
9
- - 1
10
- version: 0.2.1
9
+ - 2
10
+ version: 0.2.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Pat Maddox