capistrano-olympus 0.0.5 → 0.0.6

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: 2a3a668a419dce29834faaae46ed730855072358
4
- data.tar.gz: 084ada6c1ffc182f736a25764198a5b69bf04c04
3
+ metadata.gz: 305153a056afb0c3c8826cf865537e8c0edfc589
4
+ data.tar.gz: 3fd00c040615ce49ed7610f93971f5f983bad985
5
5
  SHA512:
6
- metadata.gz: debb92ef54160eeec08b8056157d19ba32530e16ce878310a97d5cbe48e624f5b366fd90892cfb76c570def6f0652880e4cb2a0a094605500c010ed69b99330e
7
- data.tar.gz: 6accbdea6bc62ce76d0a4444fa1ae848cb7ab31d6afd79515180b26218b3d4b827492087d2cc95a728097f08b022cfcd45435cbaa38bf9800385ec20b8c1dd02
6
+ metadata.gz: 6bdb7249637a74349c7d6616834809355f9d0d92799ff8d9cedb42d9fa43c2871ee9b54d457fa5628b6e822604ccbcbbbe4193b2cd050143d5d6eeee6294cc2e
7
+ data.tar.gz: c1003254260c5f65f4cb2a89b60aef4371abeae44219d858c83ae863e7f935039d10586efe32a307cf042d5fa1412ef1f44886a1cc2aa278ffd293fde5ca9e94
data/CHANGELOG CHANGED
@@ -1,3 +1,12 @@
1
+ ## v0.0.6 (April 03, 2016)
2
+ Use our own Composer task.
3
+
4
+ ## v0.0.5 (April 01, 2016)
5
+ Remove all servers actions.
6
+
7
+ ## v0.0.4 (April 01, 2016)
8
+ Required gem included.
9
+
1
10
  ## v0.0.3 (April 01, 2016)
2
11
  Fix path to olympus.rb file.
3
12
 
data/README.md CHANGED
@@ -17,6 +17,7 @@ Build with ♥ for **WordPress developers**._
17
17
  It depends on the following Capistrano tasks to deploy a WordPress application:
18
18
 
19
19
  + capistrano-composer: https://github.com/capistrano/composer
20
+ + composer: https://github.com/fazibear/colorize
20
21
  + sshkit-sudo: https://github.com/kentaroi/sshkit-sudo
21
22
 
22
23
  ---
@@ -28,7 +29,7 @@ Require `capistrano-olympus` in your gem file:
28
29
  ```
29
30
  # Gemfile
30
31
  gem 'capistrano', '~> 3.4'
31
- gem 'capistrano-olympus', '~> 0.0.5'
32
+ gem 'capistrano-olympus', '~> 0.0.6'
32
33
  ```
33
34
 
34
35
  ### Usage
@@ -59,6 +60,16 @@ set :localurl, fetch(:localurl, 'http://www.domain.tld')
59
60
 
60
61
  ---
61
62
 
63
+ ### Deployment
64
+
65
+ Depending on your stage files, you can deploy simply thanks to the following command line:
66
+
67
+ ```
68
+ bundle exec cap production deploy
69
+ ```
70
+
71
+ ---
72
+
62
73
  ### All we need is looooooooooooove :)
63
74
 
64
75
  [![Salt Bountysource page](https://img.shields.io/badge/Salt%20Bountysource-♥-brightgreen.svg?style=flat-square)](https://salt.bountysource.com/teams/olympus) [![Bountysource page](https://img.shields.io/badge/Bountysource-♥-brightgreen.svg?style=flat-square)](https://www.bountysource.com/teams/olympus)
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |gem|
6
6
  gem.name = 'capistrano-olympus'
7
- gem.version = '0.0.5'
7
+ gem.version = '0.0.6'
8
8
  gem.date = Time.now.strftime("%Y-%m-%d")
9
9
  gem.authors = ['Achraf Chouk']
10
10
  gem.email = ['achrafchouk@gmail.com']
@@ -21,6 +21,7 @@ Gem::Specification.new do |gem|
21
21
  'lib/capistrano-olympus.rb',
22
22
  'lib/capistrano/olympus.rb',
23
23
  'lib/capistrano/tasks/capistrano-deploy.rake',
24
+ 'lib/capistrano/tasks/composer.rake',
24
25
  'lib/capistrano/tasks/database.rake',
25
26
  'lib/capistrano/tasks/directories.rake',
26
27
  'lib/capistrano/tasks/files.rake',
@@ -1,8 +1,9 @@
1
1
  require 'colorize'
2
2
  require 'sshkit/sudo'
3
3
 
4
- # Core tasks for deploying Olympus framework with WordPress
4
+ # Core tasks for deploying Olympus framework with WordPress and composer
5
5
  load File.expand_path("../tasks/capistrano-deploy.rake", __FILE__)
6
+ load File.expand_path("../tasks/composer.rake", __FILE__)
6
7
  load File.expand_path("../tasks/database.rake", __FILE__)
7
8
  load File.expand_path("../tasks/directories.rake", __FILE__)
8
9
  load File.expand_path("../tasks/files.rake", __FILE__)
@@ -17,6 +18,7 @@ load File.expand_path("../tasks/varnish.rake", __FILE__)
17
18
  # Load defaults variables
18
19
  namespace :load do
19
20
 
21
+ desc "Include defaults vars"
20
22
  task :defaults do
21
23
  load "capistrano/vars/defaults.rb"
22
24
  end
@@ -12,16 +12,21 @@ namespace :deploy do
12
12
 
13
13
  # Check the very last action made: it means all setup processes are done!
14
14
  if test "[ ! -f \"#{shared_path}/web/robots.txt\" ]"
15
- puts "Create directories"
15
+ puts "Create directories".colorize(:light_blue)
16
16
  invoke "directories:do_actions"
17
17
 
18
- puts "Create files"
18
+ puts "Create files".colorize(:light_blue)
19
19
  invoke "files:do_actions"
20
20
  end
21
21
 
22
22
  end
23
23
  end
24
24
 
25
+ desc "Install composer vendors"
26
+ task :composer do
27
+ invoke "composer:install"
28
+ end
29
+
25
30
  desc "Restart services and clear caches"
26
31
  task :clear do
27
32
  on release_roles(:all) do
@@ -42,7 +47,10 @@ namespace :deploy do
42
47
  end
43
48
 
44
49
  # Create files and dirs when its needed
45
- before 'deploy:starting', 'deploy:setup'
50
+ before :starting, 'deploy:setup'
51
+
52
+ # Initialize composer
53
+ after :starting, 'deploy:composer'
46
54
 
47
55
  # Restart services and clear caches
48
56
  after :publishing, 'deploy:clear'
@@ -0,0 +1,14 @@
1
+ # Composer
2
+ namespace :composer do
3
+
4
+ desc "Composer run install"
5
+ task :install do
6
+ on release_roles(:all) do
7
+
8
+ puts "Install composer vendors in #{release_path}".colorize(:light_blue)
9
+ execute "cd #{release_path} && composer install --quiet"
10
+
11
+ end
12
+ end
13
+
14
+ end
@@ -26,11 +26,7 @@ set :ssh_options, {
26
26
  # ~~~~
27
27
 
28
28
  # Setup Composer
29
- set :composer_install_flags, '--no-dev --no-interaction --quiet --optimize-autoloader'
30
- set :composer_roles, :all
31
- set :composer_working_dir, -> { fetch(:release_path) }
32
- set :composer_dump_autoload_flags, '--optimize'
33
- set :composer_download_url, 'https://getcomposer.org/installer'
29
+ # Nothing to customize
34
30
 
35
31
  # ~~~~
36
32
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano-olympus
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Achraf Chouk
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-04-01 00:00:00.000000000 Z
11
+ date: 2016-04-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: capistrano
@@ -80,6 +80,7 @@ files:
80
80
  - lib/capistrano-olympus.rb
81
81
  - lib/capistrano/olympus.rb
82
82
  - lib/capistrano/tasks/capistrano-deploy.rake
83
+ - lib/capistrano/tasks/composer.rake
83
84
  - lib/capistrano/tasks/database.rake
84
85
  - lib/capistrano/tasks/directories.rake
85
86
  - lib/capistrano/tasks/files.rake