capistrano-bundle_rsync 0.2.2 → 0.2.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4081c3980ab6875e68c72e7b8c3582b2e2edd2f8
4
- data.tar.gz: 587a0ad49eae6c909c5a59470dd716bf4e736af4
3
+ metadata.gz: 1035560b71b189869e32da1fb5b02fb8a303b3b7
4
+ data.tar.gz: 7863c65ce64f61ae469996437bd85f474643c48e
5
5
  SHA512:
6
- metadata.gz: cbb74da8fe02fae8f4675e0db703c3b23901c06f052f8e56c77bf86bc6fd10c7fb2613cb47c6d06f73a1dacb22cf11ec219a96c2e4bdafef160aa53f756753f8
7
- data.tar.gz: d79a9c1d0cd7c430f019bdba761051a32bb85a8ef0e48e523398d249dbb249633dedfd587a31b74fb9f3aa545cc54008ab1897d2a22feb3fa82b2f2c28b0b938
6
+ metadata.gz: d36dd1494a102cec74809a5e18e8d3c7748230094718b4e0daafca5be4a43b95045272e24d0c7d5c4d2b2a0692f8ebf7dc436277ccb9679eb7c16e7dfc4ccb93
7
+ data.tar.gz: 5c10878e8c9acc5f8d975e91aad21e02e3b6158315310c624000bc8024f0112b24315720a04abbe2a5e484fc14d3732ffe08d0207c93431f1cfad748c486bc3d
data/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ # 0.2.3 (2014/07/18)
2
+
3
+ Enhancements:
4
+
5
+ * Add `bundle_rsync_skip_bundle` option
6
+
1
7
  # 0.2.2 (2014/07/17)
2
8
 
3
9
  Changes:
data/README.md CHANGED
@@ -13,8 +13,8 @@ Also saves you from having to install Git and Build Tools on your production mac
13
13
  Capistrano::BundleRsync works as followings:
14
14
 
15
15
  1. Do `git clone --mirror URL .local_repo/mirror` on a deploy (local) machine.
16
- 2. Extract a branch by `git archive {branch}` to `.local_repo/release_{time}`
17
- 3. Do `bundle --without development,test --path .local_repo/bundle` on a deploy (local) machine.
16
+ 2. Extract a branch by `git archive {branch}` to `.local_repo/releases/{datetime}`
17
+ 3. Do `bundle --without development test --path .local_repo/bundle` on a deploy (local) machine.
18
18
  4. Deploy the `release` directory to remote machines by `rsync`.
19
19
  5. Deploy the `bundle` directory to remote machines by `rsync`.
20
20
 
@@ -54,7 +54,7 @@ bundle_rsync_scm | `git` | SCM Strategy inside `bundle_rsync`. `git` uses git. `
54
54
  bundle_rsync_local_base_path | `$(pwd)/.local_repo` | The base directory to clone repository
55
55
  bundle_rsync_local_mirror_path | `#{base_path}/mirror"` | Path where to mirror your repository
56
56
  bundle_rsync_local_releases_path | `"#{base_path}/releases"` | Path of the directory to checkout your repository
57
- bundle_rsync_local_release_path | `"#{release_dir}/#{time}"` | Path to checkout your repository (releases_path + release_name)
57
+ bundle_rsync_local_release_path | `"#{releases_path}/#{datetime}"` | Path to checkout your repository (releases_path + release_name)
58
58
  bundle_rsync_local_bundle_path | `"#{base_path}/bundle"` | Path where to bundle install gems.
59
59
  bundle_rsync_config_files | `nil` | Additional files to rsync. Specified files are copied into `config` directory.
60
60
  bundle_rsync_ssh_options | `ssh_options` | Configuration of ssh for rsync. Default uses the value of `ssh_options`
@@ -62,6 +62,7 @@ bundle_rsync_keep_releases | `keep_releases` | The number of releases to keep on
62
62
  bundle_rsync_max_parallels | number of hosts | Number of concurrency. The default is the number of hosts to deploy.
63
63
  bundle_rsync_rsync_bwlimit | nil | Configuration of rsync --bwlimit (KBPS) option. Not Avabile if `bundle_rsync_rsync_options` is specified.
64
64
  bundle_rsync_rsync_options | `-az --delete` | Configuration of rsync options.
65
+ bundle_rsync_skip_bundle | nil | (Secret option) Do not `bundle` and rsync bundle.
65
66
 
66
67
  ## Task Orders
67
68
 
@@ -92,7 +93,7 @@ Or install it yourself as:
92
93
 
93
94
  ## Usage
94
95
 
95
- Add followings to your Gemfile:
96
+ Add followings to your Gemfile (capistrano-rvm should work, but not verified):
96
97
 
97
98
  ```ruby
98
99
  gem 'capistrano'
@@ -171,6 +172,25 @@ Deploy by following command:
171
172
  $ bundle exec cap localhost deploy
172
173
  ```
173
174
 
175
+ ## Run a custom task before rsyncing
176
+
177
+ For example, if you want to precompile rails assets before rsyncing,
178
+ you may add your own task before `bundle_rsync:rsync_release`.
179
+
180
+ ```
181
+ task :precompile do
182
+ run_locally do
183
+ Bundler.with_clean_env do
184
+ within BundleRsync::Config.release_path do
185
+ execute :bundle, 'exec rake assets:precompile'
186
+ end
187
+ end
188
+ end
189
+ end
190
+
191
+ before "bundle_rsync:rsync_release", "precompile"
192
+ ```
193
+
174
194
  ## FAQ
175
195
 
176
196
  Q. What is difference with [capistrano-rsync](https://github.com/moll/capistrano-rsync)?
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = "capistrano-bundle_rsync"
7
- spec.version = "0.2.2"
7
+ spec.version = "0.2.3"
8
8
  spec.authors = ["sonots", "tohae"]
9
9
  spec.email = ["sonots@gmail.com", "tohaechan@gmail.com"]
10
10
  spec.description = %q{Deploy an application and bundled gems via rsync}
@@ -0,0 +1,6 @@
1
+ set :bundle_rsync_scm, 'git'
2
+ set :repo_url, 'https://github.com/sonots/try_rails4'
3
+ set :branch, 'master'
4
+ set :bundle_rsync_skip_bundle, true
5
+
6
+ role :app, ['127.0.0.1']
@@ -83,5 +83,9 @@ module Capistrano::BundleRsync
83
83
  bwlimit = fetch(:bundle_rsync_rsync_bwlimit) ? " --bwlimit #{fetch(:bundle_rsync_rsync_bwlimit)}" : ""
84
84
  fetch(:bundle_rsync_rsync_options) || "-az --delete#{bwlimit}"
85
85
  end
86
+
87
+ def self.skip_bundle
88
+ fetch(:bundle_rsync_skip_bundle)
89
+ end
86
90
  end
87
91
  end
@@ -5,6 +5,10 @@ require 'parallel'
5
5
  require 'capistrano/bundle_rsync/bundler'
6
6
 
7
7
  namespace :bundle_rsync do
8
+ def config
9
+ Capistrano::BundleRsync::Config
10
+ end
11
+
8
12
  def bundler
9
13
  @bundler ||= Capistrano::BundleRsync::Bundler.new(self)
10
14
  end
@@ -24,13 +28,21 @@ namespace :bundle_rsync do
24
28
  namespace :bundler do
25
29
  task :install do
26
30
  run_locally do
27
- bundler.install
31
+ if config.skip_bundle
32
+ info "Skip bundle"
33
+ else
34
+ bundler.install
35
+ end
28
36
  end
29
37
  end
30
38
 
31
39
  task :rsync do
32
40
  run_locally do
33
- bundler.rsync
41
+ if config.skip_bundle
42
+ info "Skip bundle rsync"
43
+ else
44
+ bundler.rsync
45
+ end
34
46
  end
35
47
  end
36
48
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano-bundle_rsync
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - sonots
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-07-17 00:00:00.000000000 Z
12
+ date: 2014-07-18 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: capistrano
@@ -87,6 +87,7 @@ files:
87
87
  - example/config/deploy.rb
88
88
  - example/config/deploy/local_git.rb
89
89
  - example/config/deploy/sample.rb
90
+ - example/config/deploy/skip_bundle.rb
90
91
  - lib/capistrano-bundle_rsync.rb
91
92
  - lib/capistrano/bundle_rsync.rb
92
93
  - lib/capistrano/bundle_rsync/base.rb