easy-deployment 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  module Easy
2
2
  module Deployment
3
- VERSION = "0.1.0"
3
+ VERSION = "0.1.1"
4
4
  end
5
5
  end
@@ -3,30 +3,36 @@
3
3
 
4
4
  Capistrano::Configuration.instance(:must_exist).load do
5
5
  namespace :niet do
6
+ desc "Setup Niet"
7
+ task :setup, roles: :job do
8
+ run "mkdir -p #{shared_path}/niet"
9
+ end
10
+
6
11
  desc "Starts the niet process monitor"
7
12
  task :start, roles: :job do
8
- 2.times do
9
- run "niet -c #{current_path} bundle exec rake jobs:work RAILS_ENV=#{stage}"
13
+ 2.times do |i|
14
+ run "niet -p #{shared_path}/niet/jobs_worker_#{i}.pid -c #{current_path} bundle exec rake jobs:work RAILS_ENV=#{stage}"
10
15
  end
11
16
  end
12
17
 
13
18
  desc "Restarts the niet process monitor"
14
19
  task :restart, roles: :job do
15
- run "killall -u deploy niet"
20
+ run "for job in #{shared_path}/niet/* ; do kill `cat $job`; done"
16
21
  end
17
22
 
18
23
  desc "Stops the niet process monitor"
19
24
  task :stop, roles: :job do
20
- run "killall -u deploy -QUIT niet"
25
+ run "for job in #{shared_path}/niet/* ; do kill -QUIT `cat $job`; done"
21
26
  end
22
27
 
23
28
  desc "Diplays the status of the niet process monitor"
24
29
  task :status, roles: :job do
25
- run "ps -fu deploy"
30
+ run "for job in #{shared_path}/niet/* ; do ps -fw `cat $job`; done"
26
31
  end
27
32
  end
28
33
 
29
34
  # niet hooks
35
+ after 'deploy:setup', 'niet:setup'
30
36
  after 'deploy:start', 'niet:start'
31
37
  after 'deploy:restart', 'niet:restart'
32
38
  end
@@ -4,12 +4,14 @@ Capistrano::Configuration.instance(:must_exist).load do
4
4
  namespace :whenever do
5
5
  desc "Removes this application's entries from the user's crontab file"
6
6
  task :clear_crontab do
7
- run "cd #{release_path} && #{bundle_cmd} exec whenever -f #{release_path}/config/deploy/#{rails_env}/whenever.rb --clear-crontab #{application}"
7
+ puts "Deprecated - use whenever/capistrano instead"
8
+ run "cd #{release_path} && bundle exec whenever -f #{release_path}/config/deploy/#{rails_env}/whenever.rb --clear-crontab #{application}"
8
9
  end
9
10
 
10
11
  desc "Updates this application's crontab file entries"
11
12
  task :update_crontab do
12
- run "cd #{current_path} && #{bundle_cmd} exec whenever -f #{current_path}/config/deploy/#{rails_env}/whenever.rb --update-crontab #{application} --set \"current_path=#{current_path}&bundle_cmd=#{fetch(:bundle_cmd, 'bundle')}&rails_env=#{rails_env}&application=#{application}\""
13
+ puts "Deprecated - use whenever/capistrano instead"
14
+ run "cd #{current_path} && bundle exec whenever -f #{current_path}/config/deploy/#{rails_env}/whenever.rb --update-crontab #{application} --set \"current_path=#{current_path}&bundle_cmd=#{fetch(:bundle_cmd, 'bundle')}&rails_env=#{rails_env}&application=#{application}\""
13
15
  end
14
16
  end
15
17
  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.1.0
4
+ version: 0.1.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2012-06-17 00:00:00.000000000 Z
14
+ date: 2012-06-27 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: rails
@@ -153,18 +153,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
153
153
  - - ! '>='
154
154
  - !ruby/object:Gem::Version
155
155
  version: '0'
156
- segments:
157
- - 0
158
- hash: 1686020329756533171
159
156
  required_rubygems_version: !ruby/object:Gem::Requirement
160
157
  none: false
161
158
  requirements:
162
159
  - - ! '>='
163
160
  - !ruby/object:Gem::Version
164
161
  version: '0'
165
- segments:
166
- - 0
167
- hash: 1686020329756533171
168
162
  requirements: []
169
163
  rubyforge_project:
170
164
  rubygems_version: 1.8.24
@@ -174,3 +168,4 @@ summary: Gem for encapsulating abletech's deployment practices
174
168
  test_files:
175
169
  - spec/easy_deployment_spec.rb
176
170
  - spec/spec_helper.rb
171
+ has_rdoc: