capistrano-rsync 0.1.337

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.
checksums.yaml ADDED
@@ -0,0 +1,15 @@
1
+ ---
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ OTI4ZDY4NmE2NzRlMWRhMjEwMTExNDc2MGJjMGI3YTU2YzE2NzZiZQ==
5
+ data.tar.gz: !binary |-
6
+ M2EwMTAwY2IxMjgwNDRlOTdhZWY4OTczMGE1Nzk3YWRiNjg0Mzg3Nw==
7
+ !binary "U0hBNTEy":
8
+ metadata.gz: !binary |-
9
+ N2FlZjJlOWQ5OGQzODk2MGU1YjU0NjM0ODM3MWM2ODQzMGRhZjY0OGNhNDIw
10
+ OTczYjBhNTJhOTM3NjY2NWYwNWY3ZGIzODFiZmZhYjZkOTgyMDEwZWVjZDUw
11
+ MTEwYmIxZDUxMDU2YmQ5M2VkMTI5NzdmMWEzZDIxYzg5YTdkZGI=
12
+ data.tar.gz: !binary |-
13
+ YjhhYmQ2YjdmOTdlYTBmNGVlMWU1M2RlMmNiZGMxZGVmNGVmNzc0YzhiOTRl
14
+ M2FjY2E3NjdlMzEyZDRjNGNjYjVkNjQ5YjRmMzY3YTFiODdiOGM2OTdjYzcz
15
+ ZDkxZmQxOWMyNGE4OTJhMTY4ZDI5MjhlZTk4ZDE4NzQ3ZWZlNjg=
data/.gitignore ADDED
@@ -0,0 +1 @@
1
+ /*.gem
data/CHANGELOG.md ADDED
@@ -0,0 +1,2 @@
1
+ # 0.1.337 (Sep 1, 2013)
2
+ - First release. Let's get syncing!
data/LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ Capistrano::Rsync
2
+ Copyright (C) 2013 Andri Möll
3
+
4
+ This program is free software: you can redistribute it and/or modify it under
5
+ the terms of the GNU Affero General Public License as published by the Free
6
+ Software Foundation, either version 3 of the License, or any later version.
7
+
8
+ Additional permission under the GNU Affero GPL version 3 section 7:
9
+ If you modify this Program, or any covered work, by linking or
10
+ combining it with other code, such other code is not for that reason
11
+ alone subject to any of the requirements of the GNU Affero GPL version 3.
12
+
13
+ In summary:
14
+ - You can use this program for no cost.
15
+ - You can use this program for both personal and commercial reasons.
16
+ - You do not have to share your own program's code which uses this program.
17
+ - You have to share modifications (e.g bug-fixes) you've made to this program.
18
+
19
+ For the full copy of the GNU Affero General Public License see:
20
+ http://www.gnu.org/licenses.
data/Makefile ADDED
@@ -0,0 +1,12 @@
1
+ NAME = capistrano-rsync
2
+
3
+ love:
4
+ @echo "Feel like makin' love."
5
+
6
+ pack:
7
+ gem build $(NAME).gemspec
8
+
9
+ publish:
10
+ gem publish $(NAME)-*.gem
11
+
12
+ .PHONY: love pack publish
data/README.md ADDED
@@ -0,0 +1,89 @@
1
+ Capistrano::Rsync for Capistrano v3
2
+ ===================================
3
+ [![Gem version](https://badge.fury.io/rb/capistrano-rsync.png)](http://badge.fury.io/rb/capistrano-rsync)
4
+
5
+ Deploy with Rsync to your server from any local (or remote) repository.
6
+ Saves you from having to install Git on your production machine and allows you to customize which files you want to deploy.
7
+
8
+ Works with the new [**Capistrano v3**](http://www.capistranorb.com/) and is suitable for deploying any apps, be it Ruby or Node.js.
9
+ Currently works **only with Git** (as does Capistrano v3), so please shout out your interest in other SCMs.
10
+
11
+
12
+ Using
13
+ -----
14
+ Install with:
15
+ ```
16
+ gem install capistrano-rsync
17
+ ```
18
+
19
+ Require it at the top of your `Capfile`:
20
+ ```ruby
21
+ require "capistrano/setup"
22
+ require "capistrano/deploy"
23
+ require "capistrano/rsync"
24
+ ```
25
+
26
+ Set some `rsync_options` to your liking:
27
+ ```ruby
28
+ set :rsync_options, %w[--recursive --delete --delete-excluded --exclude .git*]
29
+ ```
30
+
31
+ And after setting regular Capistrano options, deploy as usual!
32
+ ```
33
+ cap deploy
34
+ ```
35
+
36
+ ### How does it work?
37
+ Capistrano::Rsync clones your repository to `tmp/cache` on your local machine, checks out the branch set in the `branch` variable (`master` by default) and then Rsyncs that directory to your servers.
38
+
39
+ ### Excluding files from being deployed
40
+ If you don't want to deploy everything you've committed to your repository, pass some `--exclude` options to Rsync:
41
+ ```ruby
42
+ set :rsync_options, %w[
43
+ --recursive --delete --delete-excluded
44
+ --exclude .git*
45
+ --exclude /config/database.yml
46
+ --exclude /test/***
47
+ ]
48
+ ```
49
+
50
+
51
+ Variables
52
+ ---------
53
+ Set Capistrano variables with `set name, value`.
54
+
55
+ #### branch
56
+ The Git branch to checkout.
57
+ Defaults to `master`.
58
+
59
+ #### repo_url
60
+ The path or URL to a Git repository to clone from.
61
+ Defaults to `.`.
62
+
63
+ #### rsync_stage
64
+ Location where to clone your repository for staging, checkouting and rsyncing.
65
+ Defaults to `tmp/cache`.
66
+
67
+ #### rsync_options
68
+ Array of options to pass to `rsync`.
69
+ Defaults to `[]`.
70
+
71
+
72
+ License
73
+ -------
74
+ Capistrano::Rsync is released under a *Lesser GNU Affero General Public License*, which in summary means:
75
+
76
+ - You **can** use this program for **no cost**.
77
+ - You **can** use this program for **both personal and commercial reasons**.
78
+ - You **do not have to share your own program's code** which uses this program.
79
+ - You **have to share modifications** (e.g bug-fixes) you've made to this program.
80
+
81
+ For more convoluted language, see the `LICENSE` file.
82
+
83
+
84
+ About
85
+ -----
86
+ **[Andri Möll](http://themoll.com)** made this happen.
87
+ [Monday Calendar](http://mondayapp.com) was the reason I needed this.
88
+
89
+ If you find Capistrano::Rsync needs improving, please don't hesitate to type to me now at [andri@dot.ee](mailto:andri@dot.ee) or [create an issue online](https://github.com/moll/capistrano-rsync/issues).
@@ -0,0 +1,30 @@
1
+ require File.expand_path("../lib/capistrano/rsync/version", __FILE__)
2
+
3
+ Gem::Specification.new do |gem|
4
+ gem.name = "capistrano-rsync"
5
+ gem.version = Capistrano::Rsync::VERSION
6
+ gem.homepage = "https://github.com/moll/capistrano-rsync"
7
+ gem.summary = <<-end.strip.gsub(/\s*\n\s*/, " ")
8
+ Deploy with Rsync from any local (or remote) repository.
9
+ Capistrano v3 ready!
10
+ end
11
+
12
+ gem.description = <<-end.strip.gsub(/\s*?\n(\n?)\s*/, " \\1\\1")
13
+ Deploy with Rsync to your server from any local (or remote) repository.
14
+
15
+ Saves you the need to install Git on your production machine and deploy all
16
+ of your development files each time!
17
+
18
+ Works with the new Capistrano v3!
19
+ Suitable for deploying any apps, be it Ruby or Node.js.
20
+ end
21
+
22
+ gem.author = "Andri Möll"
23
+ gem.email = "andri@dot.ee"
24
+ gem.license = "LAGPL"
25
+
26
+ gem.files = `git ls-files`.split($/)
27
+ gem.executables = gem.files.grep(/^bin\//).map(&File.method(:basename))
28
+ gem.test_files = gem.files.grep(/^spec\//)
29
+ gem.require_paths = ["lib"]
30
+ end
@@ -0,0 +1,5 @@
1
+ module Capistrano
2
+ module Rsync
3
+ VERSION = "0.1.337"
4
+ end
5
+ end
@@ -0,0 +1,10 @@
1
+ require File.expand_path("../rsync/version", __FILE__)
2
+ load File.expand_path("../tasks/rsync.rake", __FILE__)
3
+
4
+ set :rsync_stage, "tmp/deploy"
5
+ set :rsync_options, []
6
+
7
+ module Capistrano
8
+ module Rsync
9
+ end
10
+ end
@@ -0,0 +1,48 @@
1
+ Rake::Task["deploy:check"].enhance ["rsync:hook_scm"]
2
+ Rake::Task["deploy:updating"].enhance ["rsync:hook_scm"]
3
+
4
+ namespace :rsync do
5
+ task :hook_scm do
6
+ Rake::Task.define_task("#{scm}:check") do
7
+ invoke "rsync:check"
8
+ end
9
+
10
+ Rake::Task.define_task("#{scm}:create_release") do
11
+ invoke "rsync:create_release"
12
+ end
13
+ end
14
+
15
+ task :check do
16
+ # Everything's a-okay inherently!
17
+ end
18
+
19
+ task :create_stage do
20
+ next if File.directory?(fetch(:rsync_stage))
21
+
22
+ clone = %W[git clone --mirror]
23
+ clone << fetch(:repo_url, ".")
24
+ clone << fetch(:rsync_stage)
25
+ Kernel.system *clone
26
+ end
27
+
28
+ task :update_stage => %w[create_stage] do
29
+ Dir.chdir fetch(:rsync_stage) do
30
+ update = %W[git remote update]
31
+ Kernel.system *update
32
+
33
+ checkout = %W[git reset --hard #{fetch(:branch)}]
34
+ Kernel.system *checkout
35
+ end
36
+ end
37
+
38
+ desc "Copy the repository to the releases directory."
39
+ task :create_release => %w[update_stage] do
40
+ roles(:all).each do |role|
41
+ rsync = %w[rsync]
42
+ rsync.concat fetch(:rsync_options)
43
+ rsync << fetch(:rsync_stage) + "/"
44
+ rsync << "#{role}:#{release_path}"
45
+ Kernel.system *rsync
46
+ end
47
+ end
48
+ end
metadata ADDED
@@ -0,0 +1,56 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: capistrano-rsync
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.337
5
+ platform: ruby
6
+ authors:
7
+ - Andri Möll
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2013-09-01 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: ! "Deploy with Rsync to your server from any local (or remote) repository.
14
+ \n\nSaves you the need to install Git on your production machine and deploy all
15
+ of your development files each time! \n\nWorks with the new Capistrano v3! Suitable
16
+ for deploying any apps, be it Ruby or Node.js."
17
+ email: andri@dot.ee
18
+ executables: []
19
+ extensions: []
20
+ extra_rdoc_files: []
21
+ files:
22
+ - .gitignore
23
+ - CHANGELOG.md
24
+ - LICENSE
25
+ - Makefile
26
+ - README.md
27
+ - capistrano-rsync.gemspec
28
+ - lib/capistrano/rsync.rb
29
+ - lib/capistrano/rsync/version.rb
30
+ - lib/capistrano/tasks/rsync.rake
31
+ homepage: https://github.com/moll/capistrano-rsync
32
+ licenses:
33
+ - LAGPL
34
+ metadata: {}
35
+ post_install_message:
36
+ rdoc_options: []
37
+ require_paths:
38
+ - lib
39
+ required_ruby_version: !ruby/object:Gem::Requirement
40
+ requirements:
41
+ - - ! '>='
42
+ - !ruby/object:Gem::Version
43
+ version: '0'
44
+ required_rubygems_version: !ruby/object:Gem::Requirement
45
+ requirements:
46
+ - - ! '>='
47
+ - !ruby/object:Gem::Version
48
+ version: '0'
49
+ requirements: []
50
+ rubyforge_project:
51
+ rubygems_version: 2.0.6
52
+ signing_key:
53
+ specification_version: 4
54
+ summary: Deploy with Rsync from any local (or remote) repository. Capistrano v3 ready!
55
+ test_files: []
56
+ has_rdoc: