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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 300c48ccaf62c3a4b22e0423a2df1599fa236d7a
4
- data.tar.gz: ac55d5ea4cdbaed42f3c855a17e89a52f349ad8d
3
+ metadata.gz: 7d3eb8e513c87e2fc3ca213293bba55ae0a9cd18
4
+ data.tar.gz: cc4fda4b1e22f7523bb39d28691202c879da61d1
5
5
  SHA512:
6
- metadata.gz: b82947c59fd18a095120ed1fd38ce61987c37f8f3da5e2b2b437fae3ff4999f6a058a83f633a8931cda413605ddaa762a2cf225340b1a09ddaa1fca0c9e7abf8
7
- data.tar.gz: 64412d07911a9026874b85752b5e052fc065dd946994e3acb7596054ecebda47a494d4d5d6158f74e838e2400d8e556faaf8ef2659d7caaff73d2e41a7262e51
6
+ metadata.gz: e674d83127bff152c4cd31a4767f69b1ea4311e2bd531acc6f6f73abe627e6154fa9456436f439798ca865b37c2861fefa6a9524b6f7d912f1d76d083ee5f0c7
7
+ data.tar.gz: 13dbf29a28df3f3f2606b33cf8e3ec1ca114c6fabefe8deb5acdfe78e24a231f6b8b786c6a92176453e8bb853be25e2ae1d213d805265c395342ad337b6b8862
@@ -0,0 +1,10 @@
1
+ Changelog
2
+ =========
3
+
4
+ ## 0.1.1
5
+
6
+ * Explicitly close the remote tunnel. (#1)
7
+
8
+ ## 0.1.0
9
+
10
+ * Initial release
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+shh://git.example.com/foo.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, relative to this project's root.
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. Then,
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
@@ -1,6 +1 @@
1
1
  require "bundler/gem_tasks"
2
- require "rspec/core/rake_task"
3
-
4
- RSpec::Core::RakeTask.new(:spec)
5
-
6
- task :default => :spec
@@ -23,5 +23,4 @@ Gem::Specification.new do |spec|
23
23
 
24
24
  spec.add_development_dependency "bundler", "~> 1.10"
25
25
  spec.add_development_dependency "rake", "~> 10.0"
26
- spec.add_development_dependency "rspec"
27
26
  end
@@ -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
@@ -1,5 +1,5 @@
1
1
  module Capistrano
2
2
  module RemoteCacheFromLocal
3
- VERSION = "0.1.0"
3
+ VERSION = "0.1.1"
4
4
  end
5
5
  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.0
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-09-29 00:00:00.000000000 Z
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
- - ".rspec"
79
- - ".travis.yml"
64
+ - CHANGELOG.md
80
65
  - Gemfile
81
66
  - LICENSE.txt
82
67
  - README.md
data/.rspec DELETED
@@ -1,2 +0,0 @@
1
- --format documentation
2
- --color
@@ -1,4 +0,0 @@
1
- language: ruby
2
- rvm:
3
- - 2.2.3
4
- before_install: gem install bundler -v 1.10.6