easy-deployment 0.4.2 → 0.4.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,5 @@
1
1
  module Easy
2
2
  module Deployment
3
- VERSION = "0.4.2"
3
+ VERSION = "0.4.3"
4
4
  end
5
5
  end
@@ -3,6 +3,7 @@
3
3
 
4
4
  Capistrano::Configuration.instance(:must_exist).load do
5
5
  set :niet_process_count, 2
6
+ set :niet_roles, [:job]
6
7
 
7
8
  def remote_file_exists?(full_path)
8
9
  'true' == capture("if [ -e #{full_path} ]; then echo 'true'; fi").strip
@@ -10,12 +11,12 @@ Capistrano::Configuration.instance(:must_exist).load do
10
11
 
11
12
  namespace :niet do
12
13
  desc "Setup Niet"
13
- task :setup, roles: :job do
14
+ task :setup, roles: niet_roles do
14
15
  run "mkdir -p #{shared_path}/niet"
15
16
  end
16
17
 
17
18
  desc "Starts the niet process monitor and its jobs"
18
- task :start, roles: :job do
19
+ task :start, roles: niet_roles do
19
20
  if remote_file_exists?("#{shared_path}/niet")
20
21
  niet_process_count.times do |i|
21
22
  run "niet -p #{shared_path}/niet/jobs_worker_#{i}.pid -c #{current_path} bundle exec rake jobs:work RAILS_ENV=#{stage}"
@@ -26,7 +27,7 @@ Capistrano::Configuration.instance(:must_exist).load do
26
27
  end
27
28
 
28
29
  desc "Restarts the processes running under niet"
29
- task :restart, roles: :job do
30
+ task :restart, roles: niet_roles do
30
31
  if remote_file_exists?("#{shared_path}/niet")
31
32
  run "for job in #{shared_path}/niet/* ; do kill -TERM `cat $job`; done"
32
33
  else
@@ -35,12 +36,12 @@ Capistrano::Configuration.instance(:must_exist).load do
35
36
  end
36
37
 
37
38
  desc "Stops the processes running under niet and the niet process monitor"
38
- task :stop, roles: :job do
39
+ task :stop, roles: niet_roles do
39
40
  run "for job in #{shared_path}/niet/* ; do kill -QUIT `cat $job`; done"
40
41
  end
41
42
 
42
43
  desc "Diplays the status of the niet process monitor"
43
- task :status, roles: :job do
44
+ task :status, roles: niet_roles do
44
45
  run "for job in #{shared_path}/niet/* ; do ps -fw `cat $job`; done"
45
46
  end
46
47
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: easy-deployment
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.2
4
+ version: 0.4.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -12,7 +12,7 @@ authors:
12
12
  autorequire:
13
13
  bindir: bin
14
14
  cert_chain: []
15
- date: 2013-01-09 00:00:00.000000000 Z
15
+ date: 2013-01-10 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: rails
@@ -159,15 +159,21 @@ required_ruby_version: !ruby/object:Gem::Requirement
159
159
  - - ! '>='
160
160
  - !ruby/object:Gem::Version
161
161
  version: '0'
162
+ segments:
163
+ - 0
164
+ hash: 3147197610721835817
162
165
  required_rubygems_version: !ruby/object:Gem::Requirement
163
166
  none: false
164
167
  requirements:
165
168
  - - ! '>='
166
169
  - !ruby/object:Gem::Version
167
170
  version: '0'
171
+ segments:
172
+ - 0
173
+ hash: 3147197610721835817
168
174
  requirements: []
169
175
  rubyforge_project:
170
- rubygems_version: 1.8.23
176
+ rubygems_version: 1.8.24
171
177
  signing_key:
172
178
  specification_version: 3
173
179
  summary: Gem for encapsulating Abletech's deployment practices