alpha_omega 0.0.222 → 0.0.223

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/VERSION +1 -1
  2. data/lib/alpha_omega/deploy.rb +14 -8
  3. metadata +1 -1
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.222
1
+ 0.0.223
@@ -81,7 +81,13 @@ Capistrano::Configuration.instance(:must_exist).load do |config|
81
81
  _cset :releases, [ "alpha", "beta", "omega" ]
82
82
  _cset(:releases_dir) { releases.length > 0 ? "releases" : "" }
83
83
  _cset(:releases_path) { File.join(deploy_to, releases_dir) }
84
- _cset(:current_workarea) { capture("readlink #{current_path} || true").strip.split("/")[-1] || releases[0] }
84
+ _cset(:current_workarea) {
85
+ unless releases.empty?
86
+ capture("readlink #{current_path} || true").strip.split("/")[-1] || releases[0]
87
+ else
88
+ ""
89
+ end
90
+ }
85
91
 
86
92
  # =========================================================================
87
93
  # releases, paths, names
@@ -103,7 +109,7 @@ Capistrano::Configuration.instance(:must_exist).load do |config|
103
109
  _cset(:deploy_path) { File.join(deploy_to, deploy_path_name) }
104
110
 
105
111
  _cset(:rollback_release_name) {
106
- if releases.length > 0
112
+ unless releases.empty?
107
113
  w = current_workarea
108
114
  releases.index(w) && releases[(releases.index(w))%releases.length]
109
115
  else
@@ -111,7 +117,7 @@ Capistrano::Configuration.instance(:must_exist).load do |config|
111
117
  end
112
118
  }
113
119
  _cset(:previous_release_name) {
114
- if releases.length > 0
120
+ unless releases.empty?
115
121
  w = current_workarea
116
122
  releases.index(w) && releases[(releases.index(w)-1)%releases.length]
117
123
  else
@@ -119,17 +125,17 @@ Capistrano::Configuration.instance(:must_exist).load do |config|
119
125
  end
120
126
  }
121
127
  _cset(:current_release_name) {
122
- if releases.length > 0
128
+ unless releases.empty?
123
129
  w = current_workarea
124
- stage = releases[((releases.index(w)?releases.index(w):-1)+1)%releases.length]
125
- system "#{figlet} -w 200 on #{stage}"
126
- stage
130
+ workarea = releases[((releases.index(w)?releases.index(w):-1)+1)%releases.length]
131
+ system "#{figlet} -w 200 on #{workarea}"
132
+ workarea
127
133
  else
128
134
  ""
129
135
  end
130
136
  }
131
137
  _cset(:next_release_name) {
132
- if releases.length > 0
138
+ unless releases.empty?
133
139
  w = current_workarea
134
140
  releases.index(w) && releases[(releases.index(w)+1)%releases.length]
135
141
  else
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: alpha_omega
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.222
4
+ version: 0.0.223
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: