capistrano-git-submodule-strategy 0.1.16 → 0.1.17

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- MDhlZmFjZDM3NjczNDk4Nzc1NGEzNDZmZTVlMTAxOGM4ZWJmMGMwOA==
4
+ OTJiZDJlYjdiYzVlNGM4NjJkZTU2N2E1MGU2OGY1MGQ4YzZmZTM0OQ==
5
5
  data.tar.gz: !binary |-
6
- Mzk0MTczNTcxNTY5ZDg3MGRlOTQ2OGE4MWNhMWVkNjA4ODYyMjY3MA==
6
+ MWEzNzY0OWEyYzljODQ4OWVlNTExZTg0ZjhiZDVlMTlmNWM4YmU2MQ==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- NTIxOWIwYmFiY2ZjNzQ1ODg5MmVhNjMwNDk3NzVhNjkxNjdiZTk2NDU5NDUx
10
- NzVjYTBjZWI2ODdmNzEzMjhlMTMyY2YxZTYxYzdhMjlhZmZmYzA3Mjk3ODMw
11
- OTIzMmNkMTRjZTgzMjU2MDU1ZjVlMGYxOWU2OTVjMWI0NjE2MWI=
9
+ OTVjZGZjM2MxMTJiYTliYWI4ZDYzYjQ0MjM2NGMyODNmNmIyZTQ0MzcxMTVh
10
+ ODllMzViY2E1M2M1MmZlZDI5MzA4OGVjMWE3ODNmNTU1ZTMwODFiNDhiZmIw
11
+ ZjMyMzRiNzBjNzI1NGUwYTg3YWZhZjk1ZTIzZTI5OGJmZDE4NDY=
12
12
  data.tar.gz: !binary |-
13
- N2M0YjRjODQxNDZjY2M2MzIyMTU3ZjI1MzRmMGVmMmFmYTY4NWExNjBmNTg5
14
- NjljNzg2MTY1YThiNGViMjE0MGRhNDFkZDM1MWZlZjU4NTIyMWI0MzY5MjFk
15
- MDQwODExNzY2Mzg5YzNlNjlhZWJhNzE0NzBkMTkzYWJlYTEyZGI=
13
+ ODEwODgzNDY2Yjg0OTRmOWM1ZTdhY2Y3NDc5ZjgyYzE2YzhiODZjYTRmNGMz
14
+ MTZhZmY5NDQ1YjhjMGJkZjE5YjFjNDQ0YWIxZGFmMDdjZGM0OGU4YzI0ZGZj
15
+ YzVkMTIyMjc1MzRlZmMwNTNjODYzNDJhY2E3Mjk0NjdlN2I4NGM=
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.16
1
+ 0.1.17
@@ -2,11 +2,11 @@
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
3
  # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
- # stub: capistrano-git-submodule-strategy 0.1.16 ruby lib
5
+ # stub: capistrano-git-submodule-strategy 0.1.17 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "capistrano-git-submodule-strategy"
9
- s.version = "0.1.16"
9
+ s.version = "0.1.17"
10
10
 
11
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
12
12
  s.require_paths = ["lib"]
@@ -38,7 +38,9 @@ class Capistrano::Git
38
38
  unless context.test(:test, '-e', release_path) && context.test("ls -A #{release_path} | read linevar")
39
39
  git :clone, (fetch(:git_keep_meta, false) ? '' : '--depth=1'), '--recursive', '-b', fetch(:branch), "file://#{repo_path}", release_path
40
40
  if fetch(:git_keep_meta, false)
41
- git :remote, 'set-url', 'origin', repo_url
41
+ context.within_only release_path do
42
+ git :remote, 'set-url', 'origin', repo_url
43
+ end
42
44
  else
43
45
  context.execute("find #{release_path} -name '.git*' | xargs -I {} rm -rfv '{}'")
44
46
  end
@@ -46,3 +48,18 @@ class Capistrano::Git
46
48
  end
47
49
  end
48
50
  end
51
+
52
+ # shit hack to execute command only in specified directory
53
+ module SSHKit
54
+ module Backend
55
+ class Abstract
56
+ def within_only(directory, &block)
57
+ pwd = @pwd
58
+ @pwd = []
59
+ within directory, &block
60
+ ensure
61
+ @pwd = pwd
62
+ end
63
+ end
64
+ end
65
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano-git-submodule-strategy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.16
4
+ version: 0.1.17
5
5
  platform: ruby
6
6
  authors:
7
7
  - Boris Gorbylev