capistrano-deploy-rsync 0.1.0

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.
Files changed (3) hide show
  1. checksums.yaml +7 -0
  2. data/lib/capistrano/deploy_rsync.rb +49 -0
  3. metadata +44 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 0f1e4d001f85ff9d0a4ec0d9a37cf89985d770e8
4
+ data.tar.gz: 494f776164f79611b6ef2a2733a918b674bf43d1
5
+ SHA512:
6
+ metadata.gz: e9dd0b7c13bd88801f9dc287a372373748bc861c40d2673f331f752f8eeca47ab6a336ce59b958ab609dfb8eb0d4b7d3b4c116d320c782f57081568d0d18c0e3
7
+ data.tar.gz: 22d7543cf9c4f01282ed67cffaadec8f53f4433da671088991cb22ae929141de916b9ea9379fe853676d1d37711fdb36a283f3640c5f167b807d9e70e5872ba1
@@ -0,0 +1,49 @@
1
+ require 'capistrano/git'
2
+
3
+ class Capistrano::Git
4
+
5
+ module RsyncStrategy
6
+ # execute rsync in context with arguments
7
+ def rsync(*args)
8
+ args.unshift(:rsync)
9
+ context.execute *args
10
+ end
11
+
12
+ def test
13
+ puts "Nothings to test"
14
+ end
15
+
16
+ def check
17
+ puts "Nothing to check"
18
+ end
19
+
20
+ def clone
21
+ on roles(:all) do |role|
22
+ run_locally do
23
+ execute "rsync", "-avz", "dist/", "#{role.user}@#{role.hostname}:#{repo_path}"
24
+ end
25
+ end
26
+ end
27
+
28
+ def update
29
+ clone
30
+ end
31
+
32
+ def release
33
+ on roles(:all) do
34
+ execute :cp, '-r', "#{repo_path}/", "#{release_path}/dist"
35
+ end
36
+ end
37
+
38
+ def fetch_revision
39
+ run_locally do
40
+ IO.popen ("git rev-list --max-count=1 --abbrev-commit #{fetch(:branch)}") do |f|
41
+ set :current_revision, f.gets
42
+ end
43
+ end
44
+ end
45
+ end
46
+ end
47
+
48
+
49
+
metadata ADDED
@@ -0,0 +1,44 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: capistrano-deploy-rsync
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - nachinius
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2015-07-18 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: Use rsync as a deployment strategy for your capistrano3 deployments
14
+ email: ignacio.peixoto@gmail.com
15
+ executables: []
16
+ extensions: []
17
+ extra_rdoc_files: []
18
+ files:
19
+ - lib/capistrano/deploy_rsync.rb
20
+ homepage: https://github.com/nachinius/capistrano-deploy-rsync
21
+ licenses:
22
+ - MIT
23
+ metadata: {}
24
+ post_install_message:
25
+ rdoc_options: []
26
+ require_paths:
27
+ - lib
28
+ required_ruby_version: !ruby/object:Gem::Requirement
29
+ requirements:
30
+ - - ">="
31
+ - !ruby/object:Gem::Version
32
+ version: '0'
33
+ required_rubygems_version: !ruby/object:Gem::Requirement
34
+ requirements:
35
+ - - ">="
36
+ - !ruby/object:Gem::Version
37
+ version: '0'
38
+ requirements: []
39
+ rubyforge_project:
40
+ rubygems_version: 2.4.5
41
+ signing_key:
42
+ specification_version: 4
43
+ summary: Simple Capistrano3 deployments using rsync
44
+ test_files: []