capistrano-scm-local 0.1.9 → 0.1.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |gem|
6
6
  gem.name = "capistrano-scm-local"
7
- gem.version = '0.1.9'
7
+ gem.version = '0.1.10'
8
8
  gem.authors = ["Boris Gorbylev"]
9
9
  gem.email = ["ekho@ekho.name"]
10
10
  gem.description = %q{Capistrano extension for deploying form local directory}
@@ -13,7 +13,6 @@ require 'rake/packagetask'
13
13
  class Capistrano::Local < Capistrano::SCM
14
14
  module PlainStrategy
15
15
  def check
16
- puts repo_url
17
16
  test! " [ -e #{repo_url} ] "
18
17
  end
19
18
 
@@ -37,11 +36,17 @@ class Capistrano::Local < Capistrano::SCM
37
36
  run_locally do
38
37
  archive = fetch(:tmp_dir, Dir::tmpdir()) + '/capistrano/' + fetch(:application, 'distr') + "-#{fetch(:current_revision)}.tar.gz"
39
38
  execute :mkdir, '-p', File.dirname(archive)
39
+
40
+ if File.exists?(archive) && !test(:tar, 'tzf', archive)
41
+ execute :rm, '-f', archive
42
+ end
43
+
40
44
  unless File.exists?(archive)
41
45
  if File.directory?(repo_url) || !File.fnmatch('*.tar.gz', repo_url)
42
46
  within repo_url do
43
47
  execute :tar, 'czf', archive, './*'
44
48
  end
49
+ execute :tar, 'tzf', archive
45
50
  else
46
51
  execute :cp, repo_url, archive
47
52
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano-scm-local
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.9
4
+ version: 0.1.10
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-05-29 00:00:00.000000000 Z
12
+ date: 2014-07-08 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: capistrano