capistrano_deploy_lock 1.3.0 → 1.3.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- OTYzYjUxMGJjZWEwZjUwN2ZjMjg0MTM3ODYyZjViNTRkYTBiNDhmNA==
4
+ MTMyMmZhNmNhMWViYzU5NjNiYzFkM2NiMTFjNWMwMDUxNTk2N2Y4ZA==
5
5
  data.tar.gz: !binary |-
6
- ZDM5MjQ3YzUzYmJhMjhlMTAxMWM1MmYyZjRlYjY0NDAzZWE3OWM5NA==
6
+ MTYzNDA4MDk1MDY3YmViMDhiNTRlODllNWJiNDRmYzRmYzYzMjc0ZQ==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- MmY5YTA4MTIxZTliMTYxYzg4YTExNWViZGMwNGFjN2Q0MTJlZDY3ZmQwYWI4
10
- NjdlMGUxMDEyMWY3Y2MyODE5OWQ5NzJmMDc2NjNiYmFkYWViYThjNDBkNWVl
11
- Y2JlM2MwNmZjZGVhYmFiNDRkYzVjMDZkZDkzZjIwODkyOTliODI=
9
+ MGZkYzE1YTcwMTcyYWFhYWVlZmNjOTQzZmY0NWI3NDkxMDUyY2ZkNzNhMWNm
10
+ MWU2YTFmNmQ2ZDZlZWRhNWZkYjI1NmNjMWMzYmNlMzRkYjMwY2JmYmY5ZjQz
11
+ YzI3NjY5MGQ1Mjc0MDcyZmMxOTQwMmQ2YjRjOGEzNjZmOTEwMzg=
12
12
  data.tar.gz: !binary |-
13
- NjRmOGM2M2UwNjlmZGI5OTQxM2M3NTdjZWI0OTU2YjQ0YzBhNGQ4MGM2ODFk
14
- ZTg1ZjI5ODYzMTNhZDJiYzhhYTY0NGEwOWZmOTFhNDRkOTk1YjdmNDMwMTE1
15
- MGE3NjcxYmViY2VkMWRhYjAzZGZkN2FjM2ExMDdkNDgwNjQyZDg=
13
+ Njg2ZWYyYjE3YWQ5MmFlZTlhMmZhMTNkODAyNTAwMjMzZDQ2OTc4NmNlNjFm
14
+ YjZmMmI4MDllYjU4NGFjZmY4NzBmYjcyYzJkNGE4MGM0ZjRlYWM3ZTI5ZmZh
15
+ ZWRlYTU4YWRjMzM3NDBkOGExNjZiYWUxNTI5NTdhNWYyNTJjNmE=
@@ -18,7 +18,11 @@ module Capistrano
18
18
 
19
19
  module DeployLock
20
20
  def self.message(application, stage, deploy_lock)
21
- message = "#{application} (#{stage}) was locked"
21
+ if stage
22
+ message = "#{application} (#{stage}) was locked"
23
+ else
24
+ message = "#{application} was locked"
25
+ end
22
26
  if defined?(Capistrano::DateHelper)
23
27
  locked_ago = Capistrano::DateHelper.distance_of_time_in_words_to_now deploy_lock[:created_at].localtime
24
28
  message << " #{locked_ago} ago"
@@ -57,7 +61,7 @@ module Capistrano
57
61
  message << "\nLock expired at #{deploy_lock[:expire_at].localtime.strftime("%H:%M:%S")}"
58
62
  end
59
63
  else
60
- message << "\nLock must be manually removed with: cap #{stage} deploy:unlock"
64
+ message << "\nLock must be manually removed with: cap #{stage ? stage + ' ' : ''}deploy:unlock"
61
65
  end
62
66
  end
63
67
  end
@@ -66,4 +70,4 @@ end
66
70
  # Load recipe if required from deploy script
67
71
  if defined?(Capistrano::Configuration) && Capistrano::Configuration.instance
68
72
  require 'capistrano/recipes/deploy_lock'
69
- end
73
+ end
@@ -134,7 +134,7 @@ Capistrano::Configuration.instance(:must_exist).load do
134
134
  self[:custom_deploy_lock] = deploy_lock[:custom]
135
135
 
136
136
  # Unexpired lock is present, so display the lock message
137
- logger.important Capistrano::DeployLock.message(application, stage, deploy_lock)
137
+ logger.important Capistrano::DeployLock.message(application, (respond_to?(:stage) ? stage : nil), deploy_lock)
138
138
 
139
139
  # Don't raise exception if current user owns the lock, and lock has an expiry time.
140
140
  # Just sleep for a few seconds so they have a chance to cancel the deploy with Ctrl-C
@@ -1,3 +1,3 @@
1
1
  module CapistranoDeployLock
2
- VERSION = "1.3.0"
2
+ VERSION = "1.3.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano_deploy_lock
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
4
+ version: 1.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nathan Broadbent