capistrano-bundle_rsync 0.4.0 → 0.4.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: 22c2743195991ea4910fac6fae9e521b7a4c4fb9
4
- data.tar.gz: 3b56d781ba6bb30bc140aba5048225c62c2bc76c
3
+ metadata.gz: c2b3294286dea3b0a2436175976e3ba1dd9ec905
4
+ data.tar.gz: 218228ef3e963c2cc48af03c2ed1dead69cd2ec3
5
5
  SHA512:
6
- metadata.gz: c1ecb673add2d7e4ebc3fb8b172212a2b7e1d9a911f329a14331c5a0059c91f1171fe8c62c634c480683f2ba74a1a6fc5b496ed1ea2b5df011a4eeefdec1abaf
7
- data.tar.gz: 9fbff9b33e2cb0cdc464ecd0a7da0dc2a2a0708e943b591d36bf496d2fd13f8a9d49b67471c082657160cbf292018c35b2b759e21a3da7a278d8df36cae10d0e
6
+ metadata.gz: 74b4cc2705cf7bb8e79c54603136fd17b9f1e96d11c4617f31813c195e967af576ac0e614eb5cd0735c78ca6616eed48f7c6daa7abddb09dd1fe268c37d0ca11
7
+ data.tar.gz: 372481372e8012703e5bcefedc878fe4c38915c6c66890b61bbe4d77542c7c384a48c9a83adf5d5eb9e42eada8a59da8902643c1e1cf9cc3e8b9433888892d1b
data/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ # 0.4.1 (2015/03/16)
2
+
3
+ Fixes:
4
+
5
+ * Fix --hosts and --roles options to work (thanks to @niku4i)
6
+ * Fix to config.bundle_rsync_max_parallels to be integer always (thanks to @niku4i)
7
+ * Fix for the case `bundle_rsync_ssh_options` and `ssh_options` are not configured (thanks to @niku4i)
8
+
1
9
  # 0.4.0 (2015/03/04)
2
10
 
3
11
  Enhancements:
@@ -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.4.0"
7
+ spec.version = "0.4.1"
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}
@@ -1,4 +1,5 @@
1
1
  require 'capistrano/bundle_rsync/base'
2
+ require 'capistrano/configuration/filter'
2
3
 
3
4
  class Capistrano::BundleRsync::Bundler < Capistrano::BundleRsync::Base
4
5
  def install
@@ -28,6 +29,7 @@ BUNDLE_BIN: #{release_path.join('bin')}
28
29
  bundle_config_path = "#{config.local_base_path}/bundle_config"
29
30
  File.open(bundle_config_path, "w") {|file| file.print(lines) }
30
31
 
32
+ hosts = ::Capistrano::Configuration.env.filter(hosts)
31
33
  rsync_options = config.rsync_options
32
34
  Parallel.each(hosts, in_threads: config.max_parallels(hosts)) do |host|
33
35
  ssh = config.build_ssh_command(host)
@@ -60,7 +60,7 @@ module Capistrano::BundleRsync
60
60
  # NOTE: :password is not supported.
61
61
  def self.build_ssh_command(host)
62
62
  user_opt, key_opt, port_opt = "", "", ""
63
- ssh_options = fetch(:bundle_rsync_ssh_options) || fetch(:ssh_options)
63
+ ssh_options = fetch(:bundle_rsync_ssh_options) || fetch(:ssh_options) || {}
64
64
  if user = host.user || ssh_options[:user]
65
65
  user_opt = " -l #{user}"
66
66
  end
@@ -81,7 +81,7 @@ module Capistrano::BundleRsync
81
81
  # Fetch the :bundle_rsync_max_parallels,
82
82
  # where the default is the number of hosts
83
83
  def self.max_parallels(hosts)
84
- fetch(:bundle_rsync_max_parallels) || hosts.size
84
+ fetch(:bundle_rsync_max_parallels, hosts.size).to_i
85
85
  end
86
86
 
87
87
  def self.rsync_options
@@ -1,4 +1,5 @@
1
1
  require 'capistrano/bundle_rsync/scm'
2
+ require 'capistrano/configuration/filter'
2
3
 
3
4
  class Capistrano::BundleRsync::Git < Capistrano::BundleRsync::SCM
4
5
  def check
@@ -35,7 +36,7 @@ class Capistrano::BundleRsync::Git < Capistrano::BundleRsync::SCM
35
36
  end
36
37
 
37
38
  def rsync_release
38
- hosts = release_roles(:all)
39
+ hosts = ::Capistrano::Configuration.env.filter(release_roles(:all))
39
40
  rsync_options = config.rsync_options
40
41
  Parallel.each(hosts, in_threads: config.max_parallels(hosts)) do |host|
41
42
  ssh = config.build_ssh_command(host)
@@ -1,4 +1,5 @@
1
1
  require 'capistrano/bundle_rsync/scm'
2
+ require 'capistrano/configuration/filter'
2
3
 
3
4
  class Capistrano::BundleRsync::LocalGit < Capistrano::BundleRsync::SCM
4
5
  def check
@@ -17,7 +18,7 @@ class Capistrano::BundleRsync::LocalGit < Capistrano::BundleRsync::SCM
17
18
  end
18
19
 
19
20
  def rsync_release
20
- hosts = release_roles(:all)
21
+ hosts = ::Capistrano::Configuration.env.filter(release_roles(:all))
21
22
  rsync_options = config.rsync_options
22
23
  Parallel.each(hosts, in_threads: config.max_parallels(hosts)) do |host|
23
24
  ssh = config.build_ssh_command(host)
@@ -1,4 +1,5 @@
1
1
  require 'capistrano/bundle_rsync/base'
2
+ require 'capistrano/configuration/filter'
2
3
 
3
4
  # Base class for SCM strategy providers.
4
5
  #
@@ -88,7 +89,7 @@ class Capistrano::BundleRsync::SCM < Capistrano::BundleRsync::Base
88
89
  #
89
90
  # @return void
90
91
  def rsync_shared
91
- hosts = release_roles(:all)
92
+ hosts = ::Capistrano::Configuration.env.filter(release_roles(:all))
92
93
  rsync_options = config.rsync_options
93
94
 
94
95
  if config_files = config.config_files
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.4.0
4
+ version: 0.4.1
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: 2015-03-04 00:00:00.000000000 Z
12
+ date: 2015-03-16 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: capistrano