capistrano_rsync_with_remote_cache 2.3.6 → 2.3.7

Sign up to get free protection for your applications and to get access to all the features.
data/.document CHANGED
@@ -1,4 +1,4 @@
1
- README.rdoc
1
+ README.md
2
2
  lib/**/*.rb
3
3
  bin/*
4
4
  features/**/*.feature
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.3.6
1
+ 2.3.7
@@ -1,15 +1,15 @@
1
1
  # Generated by jeweler
2
- # DO NOT EDIT THIS FILE
3
- # Instead, edit Jeweler::Tasks in Rakefile, and run `rake gemspec`
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
4
4
  # -*- encoding: utf-8 -*-
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{capistrano_rsync_with_remote_cache}
8
- s.version = "2.3.6"
8
+ s.version = "2.3.7"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Mark Cornick"]
12
- s.date = %q{2009-09-08}
12
+ s.date = %q{2010-03-12}
13
13
  s.description = %q{A deployment strategy for Capistrano 2.0 which combines rsync with a remote cache, allowing fast deployments from SCM servers behind firewalls.}
14
14
  s.email = %q{mark@viget.com}
15
15
  s.extra_rdoc_files = [
@@ -33,7 +33,7 @@ Gem::Specification.new do |s|
33
33
  s.rdoc_options = ["--charset=UTF-8"]
34
34
  s.require_paths = ["lib"]
35
35
  s.rubyforge_project = %q{viget}
36
- s.rubygems_version = %q{1.3.4}
36
+ s.rubygems_version = %q{1.3.6}
37
37
  s.summary = %q{rsync_with_remote_cache strategy for Capistrano}
38
38
  s.test_files = [
39
39
  "test/capistrano_rsync_with_remote_cache_test.rb",
@@ -59,3 +59,4 @@ Gem::Specification.new do |s|
59
59
  s.add_dependency(%q<yard>, [">= 0"])
60
60
  end
61
61
  end
62
+
@@ -46,26 +46,34 @@ module Capistrano
46
46
 
47
47
  # Path to the remote cache. We use a variable name and default that are compatible with
48
48
  # the stock remote_cache strategy, for easy migration.
49
+ # @return [String] the path to the remote cache
49
50
  def repository_cache
50
51
  File.join(shared_path, configuration[:repository_cache] || "cached-copy")
51
52
  end
52
53
 
53
54
  # Path to the local cache. If not specified in the Capfile, we use an arbitrary default.
55
+ # @return [String] the path to the local cache
54
56
  def local_cache
55
57
  configuration[:local_cache] || ".rsync_cache"
56
58
  end
57
59
 
58
60
  # Options to use for rsync in step 2. If not specified in the Capfile, we use the default
59
61
  # from prior versions.
62
+ # @return [String] the options to be passed to rsync
60
63
  def rsync_options
61
64
  configuration[:rsync_options] || "-az --delete"
62
65
  end
63
66
 
67
+ # Port to use for rsync in step 2. If not specified with (ssh_options) in the Capfile, we
68
+ # use the default well-known port 22.
69
+ # @return [Fixnum] the port to connect to with rsync
64
70
  def ssh_port
65
71
  ssh_options[:port] || 22
66
72
  end
67
73
 
68
- # Returns the host used in the rsync command, prefixed with user@ if user is specified in Capfile.
74
+ # Get a hostname to be used in the rsync command.
75
+ # @param [Capistrano::ServerDefinition, #host] the host which rsync will connect to
76
+ # @return [String] the hostname, prefixed with user@ if necessary
69
77
  def rsync_host(server)
70
78
  if configuration[:user]
71
79
  "#{configuration[:user]}@#{server.host}"
@@ -79,7 +87,7 @@ module Capistrano
79
87
  # TODO: punt in some sensible way if local_cache exists but is a regular file.
80
88
  def remove_cache_if_repo_changed
81
89
  if INFO_COMMANDS[configuration[:scm]] && File.directory?(local_cache)
82
- info_command = "cd #{local_cache} && #{INFO_COMMANDS[configuration[:scm]]}"
90
+ info_command = "cd #{File.expand_path(local_cache)} && #{INFO_COMMANDS[configuration[:scm]]}"
83
91
  cached_repo_url = IO.popen(info_command){|pipe| pipe.readline}.chomp
84
92
  if cached_repo_url != configuration[:repository]
85
93
  logger.trace "repository has changed; removing old local cache"
@@ -91,6 +99,7 @@ module Capistrano
91
99
  # Command to get source from SCM on the local side. The local cache is either created,
92
100
  # updated, or destroyed and recreated depending on whether it exists and is a cache of
93
101
  # the right repository.
102
+ # @return [String] command to either checkout or update the local cache
94
103
  def command
95
104
  remove_cache_if_repo_changed
96
105
  if File.exists?(local_cache) && File.directory?(local_cache)
metadata CHANGED
@@ -1,7 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano_rsync_with_remote_cache
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.6
4
+ prerelease: false
5
+ segments:
6
+ - 2
7
+ - 3
8
+ - 7
9
+ version: 2.3.7
5
10
  platform: ruby
6
11
  authors:
7
12
  - Mark Cornick
@@ -9,39 +14,46 @@ autorequire:
9
14
  bindir: bin
10
15
  cert_chain: []
11
16
 
12
- date: 2009-09-08 00:00:00 -04:00
17
+ date: 2010-03-12 00:00:00 -05:00
13
18
  default_executable:
14
19
  dependencies:
15
20
  - !ruby/object:Gem::Dependency
16
21
  name: capistrano
17
- type: :runtime
18
- version_requirement:
19
- version_requirements: !ruby/object:Gem::Requirement
22
+ prerelease: false
23
+ requirement: &id001 !ruby/object:Gem::Requirement
20
24
  requirements:
21
25
  - - ">="
22
26
  - !ruby/object:Gem::Version
27
+ segments:
28
+ - 2
29
+ - 0
23
30
  version: "2.0"
24
- version:
31
+ type: :runtime
32
+ version_requirements: *id001
25
33
  - !ruby/object:Gem::Dependency
26
34
  name: thoughtbot-shoulda
27
- type: :development
28
- version_requirement:
29
- version_requirements: !ruby/object:Gem::Requirement
35
+ prerelease: false
36
+ requirement: &id002 !ruby/object:Gem::Requirement
30
37
  requirements:
31
38
  - - ">="
32
39
  - !ruby/object:Gem::Version
40
+ segments:
41
+ - 0
33
42
  version: "0"
34
- version:
43
+ type: :development
44
+ version_requirements: *id002
35
45
  - !ruby/object:Gem::Dependency
36
46
  name: yard
37
- type: :development
38
- version_requirement:
39
- version_requirements: !ruby/object:Gem::Requirement
47
+ prerelease: false
48
+ requirement: &id003 !ruby/object:Gem::Requirement
40
49
  requirements:
41
50
  - - ">="
42
51
  - !ruby/object:Gem::Version
52
+ segments:
53
+ - 0
43
54
  version: "0"
44
- version:
55
+ type: :development
56
+ version_requirements: *id003
45
57
  description: A deployment strategy for Capistrano 2.0 which combines rsync with a remote cache, allowing fast deployments from SCM servers behind firewalls.
46
58
  email: mark@viget.com
47
59
  executables: []
@@ -76,18 +88,20 @@ required_ruby_version: !ruby/object:Gem::Requirement
76
88
  requirements:
77
89
  - - ">="
78
90
  - !ruby/object:Gem::Version
91
+ segments:
92
+ - 0
79
93
  version: "0"
80
- version:
81
94
  required_rubygems_version: !ruby/object:Gem::Requirement
82
95
  requirements:
83
96
  - - ">="
84
97
  - !ruby/object:Gem::Version
98
+ segments:
99
+ - 0
85
100
  version: "0"
86
- version:
87
101
  requirements: []
88
102
 
89
103
  rubyforge_project: viget
90
- rubygems_version: 1.3.4
104
+ rubygems_version: 1.3.6
91
105
  signing_key:
92
106
  specification_version: 3
93
107
  summary: rsync_with_remote_cache strategy for Capistrano