capistrano-shortcuts 0.1.0 → 0.2.0

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7129364675d867a264d3e314946bea8dc67da8eb
4
- data.tar.gz: 3d290aa7d306b1b24726f4085474529fe706554f
3
+ metadata.gz: 66629d80df71c92e7306bc993cee510cdc3adb19
4
+ data.tar.gz: e575b4bedd5686d4a9f2f623e34beabfe461a713
5
5
  SHA512:
6
- metadata.gz: 03a7c44944bd6e37d08e41b39bf420fdfb344da34496e7945598a70d0e0fa43d9d48a0e21e2daa85b52a1f480d293182f1493df1ad9ddb3f084c3e0f4825a5c4
7
- data.tar.gz: b2b8a9f6b72bc3a3a2be84e4c70e7307cae7deee1503d9cf558b59e1b723ac983f282ab9f783b039520c1531aec8052b70bb1cf222b3b6418d0ab4d75da829a9
6
+ metadata.gz: acda133c73e03c7b037822b841b7d20b29fbc69ab4419177268d851cb3ba3987a1386fb43862bd3c72ca0f59bfb087140ab447b5263bea6dafec561f5f396044
7
+ data.tar.gz: 2fefe4de8c6eb84d25bd6ded31c218dde272c3b0468ac9209d3939fbb1df561959df01939dc99a10748e204290bffb1dc4a95d0864aff43d00c1e9560ed1ac5f
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- capistrano-shortcuts (0.1.0)
4
+ capistrano-shortcuts (0.2.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/README.md CHANGED
@@ -25,8 +25,19 @@ And include the tasks via your Capfile:
25
25
 
26
26
  require 'capistrano/shortcuts'
27
27
 
28
+ ## Maintenance Mode
28
29
 
29
- ## Usage
30
+ Install the maintenance page and show it instead of executing the web app:
31
+
32
+ cap <environment> deploy:web:disable
33
+
34
+
35
+ Resume normal operation:
36
+
37
+ cap <environment> deploy:web:enable
38
+
39
+
40
+ ## Memcache
30
41
 
31
42
  Clears all data stored in memcache by restarting the server. This task requires passwordless sudo to be set up on the server.
32
43
 
@@ -0,0 +1,17 @@
1
+ namespace :deploy do
2
+ namespace :web do
3
+ desc "Enable maintenance mode for apache"
4
+ task :disable do
5
+ on roles(:web) do
6
+ execute("ln -s #{current_path}/public/maintenance.html #{current_path}/public/system/.")
7
+ end
8
+ end
9
+
10
+ desc "Disable maintenance mode for apache"
11
+ task :enable do
12
+ on roles(:web) do
13
+ execute "rm -f #{current_path}/public/system/maintenance.html"
14
+ end
15
+ end
16
+ end
17
+ end
@@ -1,5 +1,5 @@
1
1
  module Capistrano
2
2
  module Shortcuts
3
- VERSION = "0.1.0"
3
+ VERSION = "0.2.0"
4
4
  end
5
5
  end
@@ -1,6 +1,8 @@
1
1
  require "capistrano/shortcuts/version"
2
2
 
3
- load File.expand_path("../shortcuts/tasks/deploy_memcache.rake", __FILE__)
3
+ [:memcache, :web].each do |token|
4
+ load File.expand_path("../shortcuts/tasks/deploy_#{token}.rake", __FILE__)
5
+ end
4
6
 
5
7
 
6
8
  # module Capistrano
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.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Todd Gehman
@@ -56,6 +56,7 @@ files:
56
56
  - capistrano-shortcuts.gemspec
57
57
  - lib/capistrano/shortcuts.rb
58
58
  - lib/capistrano/shortcuts/tasks/deploy_memcache.rake
59
+ - lib/capistrano/shortcuts/tasks/deploy_web.rake
59
60
  - lib/capistrano/shortcuts/version.rb
60
61
  homepage: https://github.com/pugetive/capistrano-shortcuts
61
62
  licenses: