capistrano-sumo 0.2.0 → 0.3.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: 97db649190e9888495fd7809b17eaafb8c4b833c
4
- data.tar.gz: 627e2ad6d4034fe15089701a9d544258d371dfd5
3
+ metadata.gz: 2ae58102ac93e65be42a6fca4731ceb36fac2bc3
4
+ data.tar.gz: '089285b38481ef224978fea23db12e5361292f51'
5
5
  SHA512:
6
- metadata.gz: cef5b9c214578570ce55a6a1f2280a4154428505a722925ff5fdc6948715e22907ca09353fa1fa6ecf4cc42e8262d369710369925e6ac50dac65b51da90743fa
7
- data.tar.gz: 6f32f27469dbe00eee2df4430c3e538ec52a4097fccb920fe76b24d50f669932378315052fe12ff806e85f445e087d47f0663d818fd6f55c1af482a5754c12f5
6
+ metadata.gz: 0ac5511cdfb877a8ea891812df2311bb48104ad86a59a193b02c85e495e81a93fe3386cc92de72c3687ec1539c17678cddb0494b7a4f5217dbcaa01bf427e68b
7
+ data.tar.gz: a0d50aff3232ca50b39a1a333464fee98c953b6a80c77e236a876dce9647386c3d0f07585f435545b58999bbbd574e691f7d611189175c15af828d3edc402075
@@ -1,5 +1,5 @@
1
1
  module Capistrano
2
2
  module Sumo
3
- VERSION = '0.2.0'
3
+ VERSION = '0.3.0'
4
4
  end
5
5
  end
@@ -2,3 +2,4 @@ require 'rake'
2
2
  require 'capistrano/sumo/version'
3
3
 
4
4
  load File.expand_path('../tasks/db.rake', __FILE__)
5
+ load File.expand_path('../tasks/redirect.rake', __FILE__)
@@ -0,0 +1,15 @@
1
+ namespace :sumo do
2
+ namespace :redirect do
3
+ desc "Enable a redirect page, all traffic will be redirected to this page."
4
+ task :enable do
5
+ on roles(:web) do
6
+ execute :mkdir, "-p", "#{shared_path}/redirect"
7
+ execute :wget, "-qO", "#{shared_path}/redirect/index.php http://static.sumocoders.be/redirect/index.phps"
8
+ execute :wget, "-qO", "#{shared_path}/redirect/.htaccess http://static.sumocoders.be/redirect/htaccess"
9
+ execute :sed, "-i", "'s|<real-url>|#{fetch :production_url}|' #{shared_path}/redirect/index.php"
10
+ execute :rm, "-f", "#{fetch :deploy_to}/current"
11
+ execute :ln, "-s", "#{shared_path}/redirect #{fetch :deploy_to}/current"
12
+ end
13
+ end
14
+ end
15
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano-sumo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tijs Verkoyen
@@ -71,6 +71,7 @@ files:
71
71
  - lib/capistrano/sumo.rb
72
72
  - lib/capistrano/sumo/version.rb
73
73
  - lib/capistrano/tasks/db.rake
74
+ - lib/capistrano/tasks/redirect.rake
74
75
  homepage: https://github.com/tijsverkoyen/capistrano-sumo
75
76
  licenses:
76
77
  - MIT