capistrano-deploy-management 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.
data/.DS_Store CHANGED
Binary file
data/.rspec CHANGED
@@ -1,2 +1,2 @@
1
1
  --backtrace
2
- --color
2
+ --color
@@ -1,12 +1,12 @@
1
1
  # -*- encoding: utf-8 -*-
2
2
  Gem::Specification.new do |s|
3
3
  s.name = 'capistrano-deploy-management'
4
- s.version = '0.1.0'
4
+ s.version = '0.1.1'
5
5
  s.platform = Gem::Platform::RUBY
6
6
  s.authors = ['Dominik Rodler']
7
7
  s.email = ['dominik.rodler@gmail.com']
8
8
  s.homepage = 'https://github.com/drdla/capistrano-deploy-management'
9
- s.summary = 'Capistrano deploy recipes'
9
+ s.summary = 'Capistrano deploy recipes; forked from https://github.com/lest/capistrano-deploy'
10
10
 
11
11
  s.files = `git ls-files`.split("\n")
12
12
  s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
@@ -0,0 +1,10 @@
1
+ - 0.1.1
2
+ integrated / updated further recipes:
3
+ - unicorn
4
+ - rails_assets
5
+ - puma # yet untested
6
+ code formatting
7
+
8
+ - 0.1.0
9
+ initial commit;
10
+ gem forked from https://github.com/lest/capistrano-deploy and adjusted paths
@@ -54,4 +54,4 @@ end
54
54
 
55
55
  if Capistrano::Configuration.instance
56
56
  CapistranoDeployManagement.load_into(Capistrano::Configuration.instance)
57
- end
57
+ end
@@ -2,6 +2,7 @@ module CapistranoDeployManagement
2
2
  module Bundle
3
3
  def self.load_into(configuration)
4
4
  configuration.load do
5
+
5
6
  namespace :bundle do
6
7
  desc 'Install gems'
7
8
  task :install, :except => {:no_release => true} do
@@ -15,7 +16,8 @@ module CapistranoDeployManagement
15
16
  run "cd #{current_path} && #{bundle_cmd} install #{args.join(' ')}"
16
17
  end
17
18
  end
19
+
18
20
  end
19
21
  end
20
22
  end
21
- end
23
+ end
@@ -1,2 +1,2 @@
1
1
  require 'capistrano-deploy-management/bundle'
2
- CapistranoDeployManagement::Bundler = CapistranoDeployManagement::Bundle
2
+ CapistranoDeployManagement::Bundler = CapistranoDeployManagement::Bundle
@@ -2,6 +2,7 @@ module CapistranoDeployManagement
2
2
  module Git
3
3
  def self.load_into(configuration)
4
4
  configuration.load do
5
+
5
6
  ssh_options[:forward_agent] = true
6
7
 
7
8
  set(:application) { repository.slice(/[^\/:]+?(?=\.git$)/) }
@@ -36,7 +37,8 @@ module CapistranoDeployManagement
36
37
  system("git log --pretty=medium --stat #{current_revision}..#{commit}")
37
38
  end
38
39
  end
40
+
39
41
  end
40
42
  end
41
43
  end
42
- end
44
+ end
@@ -2,6 +2,7 @@ module CapistranoDeployManagement
2
2
  module Memcached
3
3
  def self.load_into(configuration)
4
4
  configuration.load do
5
+
5
6
  namespace :deploy do
6
7
  namespace :memcached do
7
8
  desc "Restart the Memcache daemon."
@@ -22,7 +23,8 @@ module CapistranoDeployManagement
22
23
  end
23
24
  end
24
25
  end
26
+
25
27
  end
26
28
  end
27
29
  end
28
- end
30
+ end
@@ -0,0 +1,16 @@
1
+ module CapistranoDeployManagement
2
+ module Paperclip
3
+ def self.load_into(configuration)
4
+ configuration.load do
5
+
6
+ namespace :paperclip do
7
+ desc 'Build missing paperclip styles.'
8
+ task :build_missing_paperclip_styles, roles: :app do
9
+ run "cd #{current_path}; RAILS_ENV=production bundle exec rake paperclip:refresh:missing_styles"
10
+ end
11
+ end
12
+
13
+ end
14
+ end
15
+ end
16
+ end
@@ -2,6 +2,7 @@ module CapistranoDeployManagement
2
2
  module Passenger
3
3
  def self.load_into(configuration)
4
4
  configuration.load do
5
+
5
6
  namespace :passenger do
6
7
  desc 'Restart passenger'
7
8
  task :restart, :roles => :app, :except => {:no_release => true} do
@@ -10,7 +11,8 @@ module CapistranoDeployManagement
10
11
  end
11
12
 
12
13
  after 'deploy:restart', 'passenger:restart'
14
+
13
15
  end
14
16
  end
15
17
  end
16
- end
18
+ end
@@ -0,0 +1,32 @@
1
+ module CapistranoDeployManagement
2
+ module Puma
3
+ def self.load_into(configuration)
4
+ configuration.load do
5
+
6
+ set(:puma_config) { "#{current_path}/config/puma.rb" }
7
+ set(:puma_pidfile) { "cat #{deploy_to}/shared/pids/puma.pid" }
8
+
9
+ namespace :puma do
10
+ desc 'Restart puma.'
11
+ task :restart, :roles => :app, :except => {:no_release => true} do
12
+ puma.stop
13
+ puma.start
14
+ end
15
+
16
+ desc 'Start puma.'
17
+ task :start, :roles => :app, :except => {:no_release => true} do
18
+ run "cd #{current_path} && puma -c #{puma_pidfile} -E production -D"
19
+ end
20
+
21
+ desc 'Stop puma.'
22
+ task :stop, :roles => :app, :except => {:no_release => true} do
23
+ run "cd #{current_path} && kill $(#{puma_pidfile})"
24
+ end
25
+ end
26
+
27
+ after 'deploy:restart', 'puma:restart'
28
+
29
+ end
30
+ end
31
+ end
32
+ end
@@ -25,7 +25,8 @@ module CapistranoDeployManagement
25
25
  run "cd #{current_path} && RAILS_ENV=#{rails_env} #{rake} db:migrate"
26
26
  end
27
27
  end
28
+
28
29
  end
29
30
  end
30
31
  end
31
- end
32
+ end
@@ -2,6 +2,7 @@ module CapistranoDeployManagement
2
2
  module RailsAssets
3
3
  def self.load_into(configuration)
4
4
  configuration.load do
5
+
5
6
  use_recipe :rails
6
7
 
7
8
  namespace :deploy do
@@ -22,6 +23,10 @@ module CapistranoDeployManagement
22
23
  end
23
24
  end
24
25
  end
26
+
27
+ before 'deploy:assets:precompile', 'deploy:assets:clean'
28
+ after 'deploy:assets:precompile', 'deploy:assets:refresh_cache'
29
+
25
30
  end
26
31
  end
27
32
  end
@@ -24,4 +24,4 @@ module CapistranoDeployManagement
24
24
  end
25
25
  end
26
26
  end
27
- end
27
+ end
@@ -2,26 +2,31 @@ module CapistranoDeployManagement
2
2
  module Unicorn
3
3
  def self.load_into(configuration)
4
4
  configuration.load do
5
- set(:unicorn_config) { "#{deploy_to}/current/config/unicorn.rb" }
6
- set(:unicorn_pidfile) { "#{deploy_to}/shared/pids/unicorn.pid" }
5
+
6
+ set(:unicorn_config) { "#{current_path}/config/unicorn.rb" }
7
+ set(:unicorn_pidfile) { "cat #{deploy_to}/shared/pids/unicorn.pid" }
7
8
 
8
9
  namespace :unicorn do
9
- desc 'Reload unicorn'
10
- task :reload, :roles => :app, :except => {:no_release => true} do
11
- run "test -s #{unicorn_pidfile} && kill -s USR2 `cat #{unicorn_pidfile}` || echo 'pidfile does not exist'"
10
+ desc 'Restart unicorn.'
11
+ task :restart, :roles => :app, :except => {:no_release => true} do
12
+ unicorn.stop
13
+ unicorn.start
12
14
  end
13
15
 
14
- desc 'Stop unicorn'
15
- task :stop, :roles => :app, :except => {:no_release => true} do
16
- run "test -s #{unicorn_pidfile} && kill -s QUIT `cat #{unicorn_pidfile}` || echo 'pidfile does not exist'"
16
+ desc 'Start unicorn.'
17
+ task :start, :roles => :app, :except => {:no_release => true} do
18
+ run "cd #{current_path} && unicorn -c #{unicorn_pidfile} -E production -D"
17
19
  end
18
20
 
19
- desc 'Reexecute unicorn'
20
- task :reexec, :roles => :app, :except => {:no_release => true} do
21
- run "test ! -s #{unicorn_pidfile} && unicorn -c #{unicorn_config} -E production -D || echo 'pidfile already exists'"
21
+ desc 'Stop unicorn.'
22
+ task :stop, :roles => :app, :except => {:no_release => true} do
23
+ run "cd #{current_path} && kill $(#{unicorn_pidfile})"
22
24
  end
23
25
  end
26
+
27
+ after 'deploy:restart', 'unicorn:restart'
28
+
24
29
  end
25
30
  end
26
31
  end
27
- end
32
+ end
@@ -2,6 +2,7 @@ module CapistranoDeployManagement
2
2
  module Whenever
3
3
  def self.load_into(configuration)
4
4
  configuration.load do
5
+
5
6
  set :whenever_cmd do
6
7
  if using_recipe?(:bundle)
7
8
  'bundle exec whenever'
@@ -29,6 +30,7 @@ module CapistranoDeployManagement
29
30
  run "cd #{current_path} && #{whenever_cmd} --clear-crontab #{whenever_identifier}"
30
31
  end
31
32
  end
33
+
32
34
  end
33
35
  end
34
36
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano-deploy-management
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:
@@ -43,6 +43,7 @@ files:
43
43
  - README.md
44
44
  - Rakefile
45
45
  - capistrano-deploy-management.gemspec
46
+ - changelog.md
46
47
  - lib/.DS_Store
47
48
  - lib/capistrano-deploy-management.rb
48
49
  - lib/capistrano-deploy-management/bundle.rb
@@ -50,7 +51,9 @@ files:
50
51
  - lib/capistrano-deploy-management/git.rb
51
52
  - lib/capistrano-deploy-management/memcached.rb
52
53
  - lib/capistrano-deploy-management/multistage.rb
54
+ - lib/capistrano-deploy-management/paperclip.rb
53
55
  - lib/capistrano-deploy-management/passenger.rb
56
+ - lib/capistrano-deploy-management/puma.rb
54
57
  - lib/capistrano-deploy-management/rails.rb
55
58
  - lib/capistrano-deploy-management/rails_assets.rb
56
59
  - lib/capistrano-deploy-management/rvm.rb
@@ -90,7 +93,7 @@ rubyforge_project:
90
93
  rubygems_version: 1.8.24
91
94
  signing_key:
92
95
  specification_version: 3
93
- summary: Capistrano deploy recipes
96
+ summary: Capistrano deploy recipes; forked from https://github.com/lest/capistrano-deploy
94
97
  test_files:
95
98
  - spec/bundle_spec.rb
96
99
  - spec/deploy_spec.rb