capistrano2-remote_cache_from_local 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +10 -0
- data/README.md +4 -5
- data/Rakefile +0 -5
- data/capistrano2-remote_cache_from_local.gemspec +0 -1
- data/lib/capistrano/recipes/deploy/strategy/remote_cache_from_local.rb +5 -0
- data/lib/capistrano/remote_cache_from_local/version.rb +1 -1
- metadata +3 -18
- data/.rspec +0 -2
- data/.travis.yml +0 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7d3eb8e513c87e2fc3ca213293bba55ae0a9cd18
|
4
|
+
data.tar.gz: cc4fda4b1e22f7523bb39d28691202c879da61d1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e674d83127bff152c4cd31a4767f69b1ea4311e2bd531acc6f6f73abe627e6154fa9456436f439798ca865b37c2861fefa6a9524b6f7d912f1d76d083ee5f0c7
|
7
|
+
data.tar.gz: 13dbf29a28df3f3f2606b33cf8e3ec1ca114c6fabefe8deb5acdfe78e24a231f6b8b786c6a92176453e8bb853be25e2ae1d213d805265c395342ad337b6b8862
|
data/CHANGELOG.md
ADDED
data/README.md
CHANGED
@@ -45,7 +45,7 @@ require 'capistrano/remote_cache_from_local'
|
|
45
45
|
set. This strategy needs to specify those values for you.
|
46
46
|
|
47
47
|
```ruby
|
48
|
-
# set :repository, 'git+
|
48
|
+
# set :repository, 'git+ssh://git.example.com/foo.git'
|
49
49
|
# set :scm, :git
|
50
50
|
# set :deploy_via, :remote_cache
|
51
51
|
```
|
@@ -54,8 +54,8 @@ Set any of the following variables if you need a value other than the defaults
|
|
54
54
|
listed here:
|
55
55
|
|
56
56
|
```ruby
|
57
|
-
# The path to the root of the local working copy
|
58
|
-
set :local_repository, '.'
|
57
|
+
# The path to the root of the local working copy. Must be absolute.
|
58
|
+
set :local_repository, File.expand_path('.')
|
59
59
|
# The port used for the temporary git daemon.
|
60
60
|
set :git_tunnel_local_port, 50123
|
61
61
|
# The port used for the remote side of the temporary SSH tunnel used for cloning
|
@@ -93,8 +93,7 @@ machine you are deploying from.
|
|
93
93
|
|
94
94
|
## Development
|
95
95
|
|
96
|
-
After checking out the repo, run `bundle install` to install dependencies.
|
97
|
-
run `rake spec` to run the tests.
|
96
|
+
After checking out the repo, run `bundle install` to install dependencies.
|
98
97
|
|
99
98
|
To install this gem onto your local machine, run `bundle exec rake install`. To
|
100
99
|
release a new version, update the version number in `version.rb`, and then run
|
data/Rakefile
CHANGED
@@ -24,6 +24,7 @@ module Capistrano::Deploy::Strategy
|
|
24
24
|
|
25
25
|
# Forward remote connections to local git daemon via capistrano's SSH session
|
26
26
|
session = sessions[s]
|
27
|
+
logger.debug "Open git tunnel from local #{git_tunnel_local_port} to remote #{git_tunnel_remote_port}"
|
27
28
|
session.forward.remote(git_tunnel_local_port, '127.0.0.1', git_tunnel_remote_port)
|
28
29
|
keep_looping = true
|
29
30
|
Thread.new { session.loop { sleep(0.1); keep_looping } }
|
@@ -31,6 +32,10 @@ module Capistrano::Deploy::Strategy
|
|
31
32
|
yield
|
32
33
|
ensure
|
33
34
|
keep_looping = false
|
35
|
+
if session.forward.active_remotes.include?([git_tunnel_remote_port, '127.0.0.1'])
|
36
|
+
logger.debug "Close git tunnel from local #{git_tunnel_local_port} to remote #{git_tunnel_remote_port}"
|
37
|
+
session.forward.cancel_remote(git_tunnel_remote_port, '127.0.0.1')
|
38
|
+
end
|
34
39
|
execute "Kill local git daemon if running" do
|
35
40
|
system "if [ -e #{git_daemon_pid_file} ]; then kill `cat '#{git_daemon_pid_file}'`; rm '#{git_daemon_pid_file}'; fi"
|
36
41
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capistrano2-remote_cache_from_local
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rhett Sutphin
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-11-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: capistrano
|
@@ -52,20 +52,6 @@ dependencies:
|
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '10.0'
|
55
|
-
- !ruby/object:Gem::Dependency
|
56
|
-
name: rspec
|
57
|
-
requirement: !ruby/object:Gem::Requirement
|
58
|
-
requirements:
|
59
|
-
- - ">="
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
version: '0'
|
62
|
-
type: :development
|
63
|
-
prerelease: false
|
64
|
-
version_requirements: !ruby/object:Gem::Requirement
|
65
|
-
requirements:
|
66
|
-
- - ">="
|
67
|
-
- !ruby/object:Gem::Version
|
68
|
-
version: '0'
|
69
55
|
description: A deployment strategy for Capistrano 2 that allows deploying directly
|
70
56
|
from the local git repo, piggybacking on Capistrano's existing SSH connection.
|
71
57
|
email:
|
@@ -75,8 +61,7 @@ extensions: []
|
|
75
61
|
extra_rdoc_files: []
|
76
62
|
files:
|
77
63
|
- ".gitignore"
|
78
|
-
-
|
79
|
-
- ".travis.yml"
|
64
|
+
- CHANGELOG.md
|
80
65
|
- Gemfile
|
81
66
|
- LICENSE.txt
|
82
67
|
- README.md
|
data/.rspec
DELETED
data/.travis.yml
DELETED