Hello community,

here is the log from the commit of package rubygem-capistrano for 
openSUSE:Factory checked in at 2017-11-01 11:09:45
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rubygem-capistrano (Old)
 and      /work/SRC/openSUSE:Factory/.rubygem-capistrano.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "rubygem-capistrano"

Wed Nov  1 11:09:45 2017 rev:30 rq:537515 version:3.10.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/rubygem-capistrano/rubygem-capistrano.changes    
2017-09-12 19:57:25.225988838 +0200
+++ 
/work/SRC/openSUSE:Factory/.rubygem-capistrano.new/rubygem-capistrano.changes   
    2017-11-01 11:09:43.761573720 +0100
@@ -1,0 +2,6 @@
+Thu Oct 26 09:57:34 UTC 2017 - [email protected]
+
+- updated to version 3.10.0
+ see installed CHANGELOG.md
+
+-------------------------------------------------------------------

Old:
----
  capistrano-3.9.1.gem

New:
----
  capistrano-3.10.0.gem

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ rubygem-capistrano.spec ++++++
--- /var/tmp/diff_new_pack.dw2eVD/_old  2017-11-01 11:09:44.277554873 +0100
+++ /var/tmp/diff_new_pack.dw2eVD/_new  2017-11-01 11:09:44.281554727 +0100
@@ -24,7 +24,7 @@
 #
 
 Name:           rubygem-capistrano
-Version:        3.9.1
+Version:        3.10.0
 Release:        0
 %define mod_name capistrano
 %define mod_full_name %{mod_name}-%{version}

++++++ capistrano-3.9.1.gem -> capistrano-3.10.0.gem ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/CHANGELOG.md new/CHANGELOG.md
--- old/CHANGELOG.md    2017-09-08 18:36:50.000000000 +0200
+++ new/CHANGELOG.md    2017-10-23 18:27:32.000000000 +0200
@@ -14,15 +14,35 @@
 gem "capistrano", :github => "capistrano/capistrano"
 ```
 
-## master
+## [master]
 
-https://github.com/capistrano/capistrano/compare/v3.9.1...HEAD
+[master]: https://github.com/capistrano/capistrano/compare/v3.10.0...HEAD
 
 * Your contribution here!
 
-## `3.9.1` (2017-09-08)
+## [`3.10.0`] (2017-10-23)
 
-https://github.com/capistrano/capistrano/compare/v3.9.0...v3.9.1
+[`3.10.0`]: https://github.com/capistrano/capistrano/compare/v3.9.1...v3.10.0
+
+As of this release, version 2.x of Capistrano is officially End of Life. No 
further releases of 2.x series are planned, and pull requests against 2.x are 
no longer accepted. The maintainers encourage you to upgrade to 3.x if possible.
+
+### Breaking changes:
+
+* None
+
+### New features:
+
+* [#1943](https://github.com/capistrano/capistrano/issues/1943): Make 
'releases' and 'shared' directory names configurable from deployment target
+* [#1922](https://github.com/capistrano/capistrano/pull/1922): Prevents last 
good release from being deleted during cleanup if there are too many subsequent 
failed deploys
+* [#1930](https://github.com/capistrano/capistrano/issues/1930): Default to 
locking the version using the pessimistic version operator at the patch level.
+
+### Fixes:
+
+* [#1937](https://github.com/capistrano/capistrano/pull/1937): Clarify error 
message when plugin is required in the wrong config file.
+
+## [`3.9.1`] (2017-09-08)
+
+[`3.9.1`]: https://github.com/capistrano/capistrano/compare/v3.9.0...v3.9.1
 
 ### Breaking changes:
 
@@ -32,9 +52,9 @@
 
 * [#1912](https://github.com/capistrano/capistrano/pull/1912): Fixed an issue 
where questions posed by `ask` were not printed on certain platforms - 
[@kminiatures](https://github.com/kminiatures)
 
-## `3.9.0` (2017-07-28)
+## [`3.9.0`] (2017-07-28)
 
-https://github.com/capistrano/capistrano/compare/v3.8.2...v3.9.0
+[`3.9.0`]: https://github.com/capistrano/capistrano/compare/v3.8.2...v3.9.0
 
 ### Breaking changes:
 
@@ -48,9 +68,9 @@
 
 * [#1899](https://github.com/capistrano/capistrano/pull/1899): Updated 
`deploy:cleanup` to continue rotating the releases and skip the invalid 
directory names instead of skipping the whole rotation of releases. The warning 
message has changed slightly due to the change of behavior.
 
-## `3.8.2` (2017-06-16)
+## [`3.8.2`] (2017-06-16)
 
-https://github.com/capistrano/capistrano/compare/v3.8.1...v3.8.2
+[`3.8.2`]: https://github.com/capistrano/capistrano/compare/v3.8.1...v3.8.2
 
 ### Breaking changes:
 
@@ -60,9 +80,9 @@
 
 * [#1882](https://github.com/capistrano/capistrano/pull/1882): Explain where 
to add new Capfile lines in scm deprecation warning - 
[@robd](https://github.com/robd)
 
-## `3.8.1` (2017-04-21)
+## [`3.8.1`] (2017-04-21)
 
-https://github.com/capistrano/capistrano/compare/v3.8.0...v3.8.1
+[`3.8.1`]: https://github.com/capistrano/capistrano/compare/v3.8.0...v3.8.1
 
 ### Breaking changes:
 
@@ -72,9 +92,9 @@
 
 * [#1867](https://github.com/capistrano/capistrano/pull/1867): Allow `cap -T` 
to run without Capfile present - 
[@mattbrictson](https://github.com/mattbrictson)
 
-## `3.8.0` (2017-03-10)
+## [`3.8.0`] (2017-03-10)
 
-https://github.com/capistrano/capistrano/compare/v3.7.2...v3.8.0
+[`3.8.0`]: https://github.com/capistrano/capistrano/compare/v3.7.2...v3.8.0
 
 ### Minor breaking changes:
 
@@ -100,9 +120,9 @@
 * [#1859](https://github.com/capistrano/capistrano/pull/1859): Move 
git-specific repo_url logic into git plugin - 
[@mattbrictson](https://github.com/mattbrictson)
 * [#1858](https://github.com/capistrano/capistrano/pull/1858): Unset the :scm 
variable when an SCM plugin is used - 
[@mattbrictson](https://github.com/mattbrictson)
 
-## `3.7.2` (2017-01-27)
+## [`3.7.2`] (2017-01-27)
 
-https://github.com/capistrano/capistrano/compare/v3.7.1...v3.7.2
+[`3.7.2`]: https://github.com/capistrano/capistrano/compare/v3.7.1...v3.7.2
 
 ### Potentially breaking changes:
 
@@ -113,9 +133,9 @@
 * Suppress log messages of `git ls-remote` by filtering remote refs 
(@aeroastro)
 * The Git SCM now allows the repo_url to be changed without manually wiping 
out the mirror on each target host first (@javanthropus)
 
-## `3.7.1` (2016-12-16)
+## [`3.7.1`] (2016-12-16)
 
-https://github.com/capistrano/capistrano/compare/v3.7.0...v3.7.1
+[`3.7.1`]: https://github.com/capistrano/capistrano/compare/v3.7.0...v3.7.1
 
 ### Potentially breaking changes:
 
@@ -125,9 +145,9 @@
 
 * Fixed a bug with mercurial deploys failing due to an undefined variable
 
-## `3.7.0` (2016-12-10)
+## [`3.7.0`] (2016-12-10)
 
-https://github.com/capistrano/capistrano/compare/v3.6.1...v3.7.0
+[`3.7.0`]: https://github.com/capistrano/capistrano/compare/v3.6.1...v3.7.0
 
 *Note: These release notes include all changes since 3.6.1, including the 
changes that were first published in 3.7.0.beta1.*
 
@@ -151,9 +171,9 @@
 * Fix bug where host_filter and role_filter were overly greedy 
[#1766](https://github.com/capistrano/capistrano/issues/1766) (@cseeger-epages)
 * Fix the removal of old releases `deploy:cleanup`. Logic is changed because 
of unreliable modification times on folders. Removal of directories is now 
decided by sorting on folder names (name is generated from current datetime 
format YmdHis). Cleanup is skipped, and a warning is given when a folder name 
is in a different format
 
-## `3.7.0.beta1` (2016-11-02)
+## [`3.7.0.beta1`] (2016-11-02)
 
-https://github.com/capistrano/capistrano/compare/v3.6.1...v3.7.0.beta1
+[`3.7.0.beta1`]: 
https://github.com/capistrano/capistrano/compare/v3.6.1...v3.7.0.beta1
 
 ### Deprecations:
 
@@ -177,9 +197,9 @@
 * Fix test suite to work with Mocha 1.2.0 (@caius)
 * Fix bug where host_filter and role_filter were overly greedy 
[#1766](https://github.com/capistrano/capistrano/issues/1766) (@cseeger-epages)
 
-## `3.6.1` (2016-08-23)
+## [`3.6.1`] (2016-08-23)
 
-https://github.com/capistrano/capistrano/compare/v3.6.0...v3.6.1
+[`3.6.1`]: https://github.com/capistrano/capistrano/compare/v3.6.0...v3.6.1
 
 ### Fixes:
 
@@ -187,9 +207,9 @@
 * Fix `NoMethodError: undefined method gsub` when setting `:application` to a 
Proc. The original fix released in 3.6.0 worked for values specified with 
blocks, but not for those specified with procs or lambdas (the latter syntax is 
much more common). [#1681](https://github.com/capistrano/capistrano/issues/1681)
 * Fix a bug where deploy would fail if `:local_user` contained a space; spaces 
are now replaced with dashes when computing the git-ssh suffix. (@will_in_wi)
 
-## `3.6.0` (2016-07-26)
+## [`3.6.0`] (2016-07-26)
 
-https://github.com/capistrano/capistrano/compare/v3.5.0...v3.6.0
+[`3.6.0`]: https://github.com/capistrano/capistrano/compare/v3.5.0...v3.6.0
 
 Thank you to the many first-time contributors from the Capistrano community who
 helped with this release!
@@ -227,9 +247,9 @@
   * Restrict the uploaded git wrapper script permissions to 700 
(@irvingwashington)
   * Add `net-ssh` gem version to `doctor:gems` output (@lebedev-yury)
 
-## `3.5.0`
+## [`3.5.0`]
 
-https://github.com/capistrano/capistrano/compare/v3.4.1...v3.5.0
+[`3.5.0`]: https://github.com/capistrano/capistrano/compare/v3.4.1...v3.5.0
 
 **You'll notice a big cosmetic change in this release: the default logging
 format has been changed to
@@ -300,9 +320,9 @@
   of case statements (@cshaffer)
 * Clean up rubocop lint warnings (@cshaffer)
 
-## `3.4.0`
+## [`3.4.0`]
 
-https://github.com/capistrano/capistrano/compare/v3.3.5...v3.4.0
+[`3.4.0`]: https://github.com/capistrano/capistrano/compare/v3.3.5...v3.4.0
 
 * Fixed fetch revision for annotated git tags. (@igorsokolov)
 * Fixed updating roles when custom user or port is specified. (@ayastreb)
@@ -334,16 +354,16 @@
   * Allow specification of repo_path using stage variable
     default is as before (@townsen)
 
-## `3.3.5`
+## [`3.3.5`]
 
-https://github.com/capistrano/capistrano/compare/v3.3.4...v3.3.5
+[`3.3.5`]: https://github.com/capistrano/capistrano/compare/v3.3.4...v3.3.5
 
 * Fixed setting properties twice when creating new server. See [issue
   #1214](https://github.com/capistrano/capistrano/issues/1214) (@ayastreb)
 
-## `3.3.4`
+## [`3.3.4`]
 
-https://github.com/capistrano/capistrano/compare/v3.3.3...v3.3.4
+[`3.3.4`]: https://github.com/capistrano/capistrano/compare/v3.3.3...v3.3.4
 
 * Minor changes:
   * Rely on a newer version of capistrano-stats with better privacy 
(@leehambley)
@@ -352,9 +372,9 @@
   * Spec improvements (@dimitrid, @sponomarev)
   * Fix to CLI flags for git-ls-remote (@dimitrid)
 
-## `3.3.3`
+## [`3.3.3`]
 
-https://github.com/capistrano/capistrano/compare/v3.2.1...v3.3.3
+[`3.3.3`]: https://github.com/capistrano/capistrano/compare/v3.2.1...v3.3.3
 
 * Enhancement (@townsen)
   * Added the variable `:repo_tree` which allows the specification of a 
sub-tree that
@@ -438,9 +458,9 @@
   * Updated svn fetch_revision method to use `svnversion`
   * `cap install` no longer overwrites existing files. (@dmarkow)
 
-## `3.2.1`
+## [`3.2.1`]
 
-https://github.com/capistrano/capistrano/compare/v3.2.0...v3.2.1
+[`3.2.1`]: https://github.com/capistrano/capistrano/compare/v3.2.0...v3.2.1
 
 * Bug Fixes:
   * 3.2.0 introduced some behaviour to modify the way before/after hooks were 
called, to allow the optional
@@ -455,12 +475,12 @@
   * Added `keys` method to Configuration to allow introspection of 
configuration options. (@juanibiapina)
   * Improve error message when git:check fails (raise instead of silently 
`exit 1`) (@mbrictson)
 
-## `3.2.0`
+## [`3.2.0`]
 
 The changelog entries here are incomplete, because many authors choose not to
 be credited for their work, check the tag comparison link for Github.
 
-https://github.com/capistrano/capistrano/compare/v3.1.0...v3.2.0
+[`3.2.0`]: https://github.com/capistrano/capistrano/compare/v3.1.0...v3.2.0
 
 * Minor changes:
   * Added `keys` method to Server properties to allow introspection of 
automatically added
@@ -468,9 +488,9 @@
   * Compatibility with Rake 10.2.0 - `ensure_task` is now added to 
`@top_level_tasks` as a string. (@dmarkow)
   * Amended the git check command, "ls-remote", to use "-h", limiting the list 
to refs/heads
 
-## `3.1.0`
+## [`3.1.0`]
 
-https://github.com/capistrano/capistrano/compare/v3.0.1...v3.1.0
+[`3.1.0`]: https://github.com/capistrano/capistrano/compare/v3.0.1...v3.1.0
 
 Breaking changes:
 
@@ -504,17 +524,17 @@
 
 Big thanks to @Kriechi for his help.
 
-## `3.0.1`
+## [`3.0.1`]
 
-https://github.com/capistrano/capistrano/compare/v3.0.0...v3.0.1
+[`3.0.1`]: https://github.com/capistrano/capistrano/compare/v3.0.0...v3.0.1
 
   * `capify` not listed as executable (@leehambley)
   * Confirm license as MIT (@leehambley)
   * Move the git ssh helper to application path (@mpapis)
 
-## `3.0.0`
+## [`3.0.0`]
 
-https://github.com/capistrano/capistrano/compare/2.15.5...v3.0.0
+[`3.0.0`]: https://github.com/capistrano/capistrano/compare/2.15.5...v3.0.0
 
 If you are coming here to wonder why your Capfile doesn't work anymore, please
 vendor lock your Capistrano at 2.x, whichever version was working for you
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/DEVELOPMENT.md new/DEVELOPMENT.md
--- old/DEVELOPMENT.md  2017-09-08 18:36:50.000000000 +0200
+++ new/DEVELOPMENT.md  2017-10-23 18:27:32.000000000 +0200
@@ -71,7 +71,7 @@
 
 Your code should conform to these guidelines:
 
- * The code is MIT licenced, your code will fall under the same license if we 
merge it.
+ * The code is MIT licensed, your code will fall under the same license if we 
merge it.
  * We can't merge it without a [good commit 
message](http://robots.thoughtbot.com/5-useful-tips-for-a-better-commit-message).
 If you do this right, Github will use the commit message as the body of your 
pull request, double win.
  * If you are making an improvement/fix for an existing issue, make sure to 
mention the issue number (if we have not yet merged it )
  * Add an entry to the `CHANGELOG` under the `### master` section, but please 
don't mess with the version.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/README.md new/README.md
--- old/README.md       2017-09-08 18:36:50.000000000 +0200
+++ new/README.md       2017-10-23 18:27:32.000000000 +0200
@@ -88,6 +88,10 @@
 
 Capistrano is designed to deploy using a single, non-privileged SSH user, 
using a *non-interactive* SSH session. If your deployment requires `sudo`, 
interactive prompts, authenticating as one user but running commands as 
another, you can probably accomplish this with Capistrano, but it may be 
difficult. Your automated deployments will be much smoother if you can avoid 
such requirements.
 
+#### Shells
+
+Capistrano 3 expects a POSIX shell like Bash or Sh. Shells like tcsh, csh, and 
such may work, but probably will not.
+
 ## Quick start
 
 ### Requirements
@@ -103,7 +107,7 @@
 
 ``` ruby
 group :development do
-  gem "capistrano", "~> 3.9"
+  gem "capistrano", "~> 3.10"
 end
 ```
 
Binary files old/checksums.yaml.gz and new/checksums.yaml.gz differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/features/deploy.feature new/features/deploy.feature
--- old/features/deploy.feature 2017-09-08 18:36:50.000000000 +0200
+++ new/features/deploy.feature 2017-10-23 18:27:32.000000000 +0200
@@ -60,6 +60,16 @@
     Then 3 valid releases are kept
     And the invalid "new" release is ignored
 
+  Scenario: Cleanup after many failed releases doesn't remove last good release
+    Given config stage file has line "set :keep_releases, 2"
+    And I make 2 deployments
+    And an invalid release named "77777777777777"
+    And an invalid release named "88888888888888"
+    And an invalid release named "99999999999999"
+    When I run cap "deploy:cleanup"
+    Then 3 valid releases are kept
+    And the current directory will be a symlink to the release
+
   Scenario: Rolling Back
     Given I make 2 deployments
     When I run cap "deploy:rollback"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/features/step_definitions/assertions.rb 
new/features/step_definitions/assertions.rb
--- old/features/step_definitions/assertions.rb 2017-09-08 18:36:50.000000000 
+0200
+++ new/features/step_definitions/assertions.rb 2017-10-23 18:27:32.000000000 
+0200
@@ -66,7 +66,7 @@
 end
 
 Then(/^the current directory will be a symlink to the release$/) do
-  run_vagrant_command(test_symlink_exists(TestApp.current_path))
+  run_vagrant_command(exists?("e", TestApp.current_path))
 end
 
 Then(/^the deploy\.rb file is created$/) do
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/capistrano/configuration/host_filter.rb 
new/lib/capistrano/configuration/host_filter.rb
--- old/lib/capistrano/configuration/host_filter.rb     2017-09-08 
18:36:50.000000000 +0200
+++ new/lib/capistrano/configuration/host_filter.rb     2017-10-23 
18:27:32.000000000 +0200
@@ -3,8 +3,7 @@
     class HostFilter
       def initialize(values)
         av = Array(values).dup
-        av.map! { |v| v.is_a?(String) && v =~ 
/^(?<name>[-A-Za-z0-9.]+)(,\g<name>)*$/ ? v.split(",") : v }
-        av.flatten!
+        av = av.flat_map { |v| v.is_a?(String) && v =~ 
/^(?<name>[-A-Za-z1-9.]+)(,\g<name>)*$/ ? v.split(",") : v }
         @rex = regex_matcher(av)
       end
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/capistrano/configuration/role_filter.rb 
new/lib/capistrano/configuration/role_filter.rb
--- old/lib/capistrano/configuration/role_filter.rb     2017-09-08 
18:36:50.000000000 +0200
+++ new/lib/capistrano/configuration/role_filter.rb     2017-10-23 
18:27:32.000000000 +0200
@@ -3,8 +3,7 @@
     class RoleFilter
       def initialize(values)
         av = Array(values).dup
-        av.map! { |v| v.is_a?(String) ? v.split(",") : v }
-        av.flatten!
+        av = av.flat_map { |v| v.is_a?(String) ? v.split(",") : v }
         @rex = regex_matcher(av)
       end
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/capistrano/doctor/servers_doctor.rb 
new/lib/capistrano/doctor/servers_doctor.rb
--- old/lib/capistrano/doctor/servers_doctor.rb 2017-09-08 18:36:50.000000000 
+0200
+++ new/lib/capistrano/doctor/servers_doctor.rb 2017-10-23 18:27:32.000000000 
+0200
@@ -56,7 +56,7 @@
         private
 
         def find_whitespace_roles
-          servers.map(&:roles).map(&:to_a).flatten.uniq
+          servers.map(&:roles).flat_map(&:to_a).uniq
                  .select { |role| include_whitespace?(role) }
         end
       end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/capistrano/doctor/variables_doctor.rb 
new/lib/capistrano/doctor/variables_doctor.rb
--- old/lib/capistrano/doctor/variables_doctor.rb       2017-09-08 
18:36:50.000000000 +0200
+++ new/lib/capistrano/doctor/variables_doctor.rb       2017-10-23 
18:27:32.000000000 +0200
@@ -5,9 +5,16 @@
     # Prints a table of all Capistrano variables and their current values. If
     # there are unrecognized variables, print warnings for them.
     class VariablesDoctor
-      # These are keys that have no default values in Capistrano, but are
-      # nonetheless expected to be set.
-      WHITELIST = %i(application repo_url repo_tree).freeze
+      # These are keys that are recognized by Capistrano, but do not have 
values
+      # set by default.
+      WHITELIST = %i(
+        application
+        current_directory
+        releases_directory
+        repo_url
+        repo_tree
+        shared_directory
+      ).freeze
       private_constant :WHITELIST
 
       include Capistrano::Doctor::OutputHelpers
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/capistrano/dsl/paths.rb 
new/lib/capistrano/dsl/paths.rb
--- old/lib/capistrano/dsl/paths.rb     2017-09-08 18:36:50.000000000 +0200
+++ new/lib/capistrano/dsl/paths.rb     2017-10-23 18:27:32.000000000 +0200
@@ -15,7 +15,7 @@
       end
 
       def releases_path
-        deploy_path.join("releases")
+        deploy_path.join(fetch(:releases_directory, "releases"))
       end
 
       def release_path
@@ -44,7 +44,7 @@
       end
 
       def shared_path
-        deploy_path.join("shared")
+        deploy_path.join(fetch(:shared_directory, "shared"))
       end
 
       def revision_log
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/capistrano/i18n.rb new/lib/capistrano/i18n.rb
--- old/lib/capistrano/i18n.rb  2017-09-08 18:36:50.000000000 +0200
+++ new/lib/capistrano/i18n.rb  2017-10-23 18:27:32.000000000 +0200
@@ -14,6 +14,8 @@
   question_default: "Please enter %{key} (%{default_value}): ",
   keeping_releases: "Keeping %{keep_releases} of %{releases} deployed releases 
on %{host}",
   skip_cleanup: "Skipping cleanup of invalid releases on %{host}; unexpected 
foldername found (should be timestamp)",
+  wont_delete_current_release: "Current release was marked for being removed 
but it's going to be skipped on %{host}",
+  no_current_release: "There is no current release present on %{host}",
   no_old_releases: "No old releases (keeping newest %{keep_releases}) on 
%{host}",
   linked_file_does_not_exist: "linked file %{file} does not exist on %{host}",
   cannot_rollback: "There are no older releases to rollback to",
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/capistrano/immutable_task.rb 
new/lib/capistrano/immutable_task.rb
--- old/lib/capistrano/immutable_task.rb        2017-09-08 18:36:50.000000000 
+0200
+++ new/lib/capistrano/immutable_task.rb        2017-10-23 18:27:32.000000000 
+0200
@@ -17,8 +17,9 @@
 
     def enhance(*args, &block)
       $stderr.puts <<-MESSAGE
-WARNING: #{name} has already been invoked and can no longer be modified.
-Check that you haven't loaded a Capistrano plugin in deploy.rb by mistake.
+ERROR: #{name} has already been invoked and can no longer be modified.
+Check that you haven't loaded a Capistrano plugin in deploy.rb or a stage
+(e.g. deploy/production.rb) by mistake.
 Plugins must be loaded in the Capfile to initialize properly.
 MESSAGE
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/capistrano/tasks/deploy.rake 
new/lib/capistrano/tasks/deploy.rake
--- old/lib/capistrano/tasks/deploy.rake        2017-09-08 18:36:50.000000000 
+0200
+++ new/lib/capistrano/tasks/deploy.rake        2017-10-23 18:27:32.000000000 
+0200
@@ -155,11 +155,20 @@
 
       if valid.count >= fetch(:keep_releases)
         info t(:keeping_releases, host: host.to_s, keep_releases: 
fetch(:keep_releases), releases: valid.count)
-        directories = (valid - valid.last(fetch(:keep_releases)))
+        directories = (valid - valid.last(fetch(:keep_releases))).map do 
|release|
+          releases_path.join(release).to_s
+        end
+        if test("[ -d #{current_path} ]")
+          current_release = capture(:readlink, current_path).to_s
+          if directories.include?(current_release)
+            warn t(:wont_delete_current_release, host: host.to_s)
+            directories.delete(current_release)
+          end
+        else
+          debug t(:no_current_release, host: host.to_s)
+        end
         if directories.any?
-          directories_str = directories.map do |release|
-            releases_path.join(release)
-          end.join(" ")
+          directories_str = directories.join(" ")
           execute :rm, "-rf", directories_str
         else
           info t(:no_old_releases, host: host.to_s, keep_releases: 
fetch(:keep_releases))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/capistrano/templates/deploy.rb.erb 
new/lib/capistrano/templates/deploy.rb.erb
--- old/lib/capistrano/templates/deploy.rb.erb  2017-09-08 18:36:50.000000000 
+0200
+++ new/lib/capistrano/templates/deploy.rb.erb  2017-10-23 18:27:32.000000000 
+0200
@@ -1,5 +1,5 @@
-# config valid only for current version of Capistrano
-lock "<%= Capistrano::VERSION %>"
+# config valid for current version and patch releases of Capistrano
+lock "~> <%= Capistrano::VERSION %>"
 
 set :application, "my_app_name"
 set :repo_url, "[email protected]:me/my_repo.git"
@@ -34,3 +34,6 @@
 
 # Default value for keep_releases is 5
 # set :keep_releases, 5
+
+# Uncomment the following to require manually verifying the host key before 
first deploy.
+# set :ssh_options, verify_host_key: :secure
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/capistrano/version.rb 
new/lib/capistrano/version.rb
--- old/lib/capistrano/version.rb       2017-09-08 18:36:50.000000000 +0200
+++ new/lib/capistrano/version.rb       2017-10-23 18:27:32.000000000 +0200
@@ -1,3 +1,3 @@
 module Capistrano
-  VERSION = "3.9.1".freeze
+  VERSION = "3.10.0".freeze
 end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/metadata new/metadata
--- old/metadata        2017-09-08 18:36:50.000000000 +0200
+++ new/metadata        2017-10-23 18:27:32.000000000 +0200
@@ -1,7 +1,7 @@
 --- !ruby/object:Gem::Specification
 name: capistrano
 version: !ruby/object:Gem::Version
-  version: 3.9.1
+  version: 3.10.0
 platform: ruby
 authors:
 - Tom Clements
@@ -9,7 +9,7 @@
 autorequire: 
 bindir: bin
 cert_chain: []
-date: 2017-09-08 00:00:00.000000000 Z
+date: 2017-10-23 00:00:00.000000000 Z
 dependencies:
 - !ruby/object:Gem::Dependency
   name: airbrussh
@@ -285,7 +285,7 @@
       version: '0'
 requirements: []
 rubyforge_project: 
-rubygems_version: 2.6.13
+rubygems_version: 2.6.14
 signing_key: 
 specification_version: 4
 summary: Capistrano - Welcome to easy deployment with Ruby over SSH
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/spec/lib/capistrano/configuration/host_filter_spec.rb 
new/spec/lib/capistrano/configuration/host_filter_spec.rb
--- old/spec/lib/capistrano/configuration/host_filter_spec.rb   2017-09-08 
18:36:50.000000000 +0200
+++ new/spec/lib/capistrano/configuration/host_filter_spec.rb   2017-10-23 
18:27:32.000000000 +0200
@@ -41,6 +41,11 @@
           it_behaves_like "it filters hosts correctly", %w{server1 server3}
         end
 
+        context "with mixed splittable and unsplittable strings" do
+          let(:values) { %w{server1 server2,server3} }
+          it_behaves_like "it filters hosts correctly", %w{server1 server2 
server3}
+        end
+
         context "with a regexp" do
           let(:values) { "server[13]$" }
           it_behaves_like "it filters hosts correctly", %w{server1 server3}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/spec/lib/capistrano/dsl/paths_spec.rb 
new/spec/lib/capistrano/dsl/paths_spec.rb
--- old/spec/lib/capistrano/dsl/paths_spec.rb   2017-09-08 18:36:50.000000000 
+0200
+++ new/spec/lib/capistrano/dsl/paths_spec.rb   2017-10-23 18:27:32.000000000 
+0200
@@ -123,6 +123,36 @@
     end
   end
 
+  describe "#releases_path" do
+    subject { paths.releases_path }
+
+    context "with custom releases directory" do
+      before do
+        paths.expects(:fetch).with(:releases_directory, 
"releases").returns("test123")
+        paths.expects(:fetch).with(:deploy_to).returns("/var/www")
+      end
+
+      it "returns the releases path with the custom directory" do
+        expect(subject.to_s).to eq "/var/www/test123"
+      end
+    end
+  end
+
+  describe "#shared_path" do
+    subject { paths.shared_path }
+
+    context "with custom shared directory" do
+      before do
+        paths.expects(:fetch).with(:shared_directory, 
"shared").returns("test123")
+        paths.expects(:fetch).with(:deploy_to).returns("/var/www")
+      end
+
+      it "returns the shared path with the custom directory" do
+        expect(subject.to_s).to eq "/var/www/test123"
+      end
+    end
+  end
+
   describe "#deploy_config_path" do
     subject { dsl.deploy_config_path.to_s }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/spec/lib/capistrano/immutable_task_spec.rb 
new/spec/lib/capistrano/immutable_task_spec.rb
--- old/spec/lib/capistrano/immutable_task_spec.rb      2017-09-08 
18:36:50.000000000 +0200
+++ new/spec/lib/capistrano/immutable_task_spec.rb      2017-10-23 
18:27:32.000000000 +0200
@@ -16,7 +16,7 @@
       load_defaults.extend(Capistrano::ImmutableTask)
 
       $stderr.expects(:puts).with do |message|
-        message =~ /^WARNING: load:defaults has already been invoked/
+        message =~ /^ERROR: load:defaults has already been invoked/
       end
 
       expect do
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/spec/lib/capistrano/version_validator_spec.rb 
new/spec/lib/capistrano/version_validator_spec.rb
--- old/spec/lib/capistrano/version_validator_spec.rb   2017-09-08 
18:36:50.000000000 +0200
+++ new/spec/lib/capistrano/version_validator_spec.rb   2017-10-23 
18:27:32.000000000 +0200
@@ -89,6 +89,29 @@
             end
           end
         end
+
+        context "with multiple versions" do
+          let(:current_version) { "3.5.9" }
+
+          context "valid" do
+            let(:version) { [">= 3.5.0", "< 3.5.10"] }
+            it { is_expected.to be_truthy }
+          end
+
+          context "invalid" do
+            let(:version) { [">= 3.5.0", "< 3.5.8"] }
+            it "fails" do
+              expect { subject }.to raise_error(RuntimeError)
+            end
+          end
+
+          context "invalid" do
+            let(:version) { ["> 3.5.9", "< 3.5.13"] }
+            it "fails" do
+              expect { subject }.to raise_error(RuntimeError)
+            end
+          end
+        end
       end
     end
   end


Reply via email to