capistrano-shortcuts 0.3.0 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 31aa0f4f9163dec3015d1607598c1b38806098da
4
- data.tar.gz: 4fdba1e06d5248c438349179867fc666794f8942
3
+ metadata.gz: 2208a9dbae3d5ae54c9a4682033cbc92d13a7347
4
+ data.tar.gz: 53d1cd456f3b19705f32ef7feb3e9834609d1bd8
5
5
  SHA512:
6
- metadata.gz: ab579a9b6d2d1b4d8989770285d797fc5d8bd65a6923124c1a808ce96709915f75d9004fa5fbf589f0c2477564aa9689921b944df5a84bb67e1e2ad177e570af
7
- data.tar.gz: 57660e03e450d6f45f622d8ad543f852ba6dc687af5afe1dcb4bea849ccfa6d3aea77407a399e810c4e0c7e8c1fcaa55e369667956243668038f22b4816d047e
6
+ metadata.gz: 0efc360b45c570c510629974bf496ef31ed369af7c94e3f0711b8567407c2eb2e030beab667b9a121b22727ef8a40d82615ec4bf61523c39866a2dd1afbf24da
7
+ data.tar.gz: 42784ec533275a5f5d525902fcd6a1e40d31c010b9f53b51724d78186f8105956c676b74e0c5a69694f6dbb5f9e7c4a69f9d9bb9f84858d44f6d5620c7fd9fcc
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- capistrano-shortcuts (0.3.0)
4
+ capistrano-shortcuts (0.4.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/README.md CHANGED
@@ -59,6 +59,17 @@ Resume normal operation:
59
59
  cap <environment> deploy:web:enable
60
60
 
61
61
 
62
+ ## Apache
63
+
64
+ Reload or restart apache:
65
+
66
+ cap <environment> apache:reload
67
+ cap <environment> apache:restart
68
+
69
+ Copy all domain-related config files from the rails repo "config/apache" directory into the sites-available directory for apache to pick up, and re-enable the website specified in <code>&lt;domain-name&gt;.conf</code> as well as <code>assets.&lt;domain-name&gt;.conf</code>:
70
+
71
+ cap <environment> apache:install
72
+
62
73
  ## Memcache
63
74
 
64
75
  Clears all data stored in memcache by restarting the server. This task requires passwordless sudo to be set up on the server.
@@ -0,0 +1,26 @@
1
+ namespace :apache do
2
+ task :install do
3
+ on roles(:app) do
4
+ sudo("cp #{current_path}/config/apache/* /etc/apache2/sites-available/")
5
+ execute("cd /etc/apache2/sites-available")
6
+
7
+ sudo("a2dissite #{fetch(:domain)}.conf")
8
+ sudo("a2ensite #{fetch(:domain)}.conf")
9
+
10
+ sudo("a2dissite assets.#{fetch(:domain)}.conf")
11
+ sudo("a2ensite assets.#{fetch(:domain)}.conf")
12
+
13
+ sudo("service apache2 reload")
14
+ end
15
+ end
16
+ task :reload do
17
+ on roles(:app) do
18
+ sudo("service apache2 reload")
19
+ end
20
+ end
21
+ task :restart do
22
+ on roles(:app) do
23
+ sudo("service apache2 restart")
24
+ end
25
+ end
26
+ end
@@ -1,5 +1,5 @@
1
1
  module Capistrano
2
2
  module Shortcuts
3
- VERSION = "0.3.0"
3
+ VERSION = "0.4.0"
4
4
  end
5
5
  end
@@ -1,6 +1,6 @@
1
1
  require "capistrano/shortcuts/version"
2
2
 
3
- [:config, :memcache, :web].each do |token|
3
+ [:apache, :config, :memcache, :web].each do |token|
4
4
  load File.expand_path("../shortcuts/tasks/deploy_#{token}.rake", __FILE__)
5
5
  end
6
6
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano-shortcuts
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Todd Gehman
@@ -55,6 +55,7 @@ files:
55
55
  - bin/setup
56
56
  - capistrano-shortcuts.gemspec
57
57
  - lib/capistrano/shortcuts.rb
58
+ - lib/capistrano/shortcuts/tasks/deploy_apache.rake
58
59
  - lib/capistrano/shortcuts/tasks/deploy_config.rake
59
60
  - lib/capistrano/shortcuts/tasks/deploy_memcache.rake
60
61
  - lib/capistrano/shortcuts/tasks/deploy_web.rake