kstrano 1.1.9 → 1.1.10

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/lib/kstrano.rb CHANGED
@@ -8,8 +8,9 @@ set :webserver_user, "www-data"
8
8
  set :permission_method, :acl
9
9
  set :server_name, nil
10
10
  set :port, 22
11
- set :shared_files, false
12
- set :shared_children, false
11
+ set :shared_files, []
12
+ set :shared_children, []
13
+ set :npm_flags, '--production --silent'
13
14
 
14
15
  set :copy_node_modules, true
15
16
  set :copy_bower_vendors, true
@@ -23,7 +24,7 @@ namespace :files do
23
24
  desc "Rsync uploaded files from online to local"
24
25
  task :to_local do
25
26
  KStrano.say "Copying files"
26
- log = `rsync -qazhL --progress --del --rsh=/usr/bin/ssh -e "ssh -p #{port}" --exclude "*bak" --exclude "*~" --exclude ".*" #{domain}:#{current_path}/#{uploaded_files_path}/* #{uploaded_files_path}/`
27
+ log = `rsync -qazhL ngress --del --rsh=/usr/bin/ssh -e "ssh -p #{port}" --exclude "*bak" --exclude "*~" --exclude ".*" #{domain}:#{current_path}/#{uploaded_files_path}/* #{uploaded_files_path}/`
27
28
  KStrano.say log
28
29
  end
29
30
 
@@ -177,7 +178,7 @@ namespace :frontend do
177
178
  namespace :npm do
178
179
  desc "Install the node modules"
179
180
  task :install do
180
- run "#{try_sudo} -i sh -c 'cd #{latest_release} && npm install'"
181
+ run "#{try_sudo} -i sh -c 'cd #{latest_release} && npm install #{npm_flags}'"
181
182
  end
182
183
 
183
184
  task :copy, :except => { :no_release => true } do
@@ -126,8 +126,8 @@ module KStrano
126
126
  ["symfony:composer:install", "symfony:composer:update", "symfony:vendors:install", "symfony:vendors:upgrade"].each do |action|
127
127
  after action do |variable|
128
128
 
129
- sudo "sh -c 'php #{release_path}/vendor/sensio/distribution-bundle/Sensio/Bundle/DistributionBundle/Resources/bin/build_bootstrap.php'"
130
-
129
+ sudo "sh -c 'if [ -f #{release_path}/vendor/sensio/distribution-bundle/Sensio/Bundle/DistributionBundle/Resources/bin/build_bootstrap.php ]; then php #{release_path}/vendor/sensio/distribution-bundle/Sensio/Bundle/DistributionBundle/Resources/bin/build_bootstrap.php; fi'"
130
+
131
131
  if bower_install
132
132
  frontend.bower.install
133
133
  end
@@ -155,6 +155,7 @@ module KStrano
155
155
  before "deploy:finalize_update", "kuma:apc:prepare_clear"
156
156
  after "deploy:finalize_update", "kuma:apc:clear", "kuma:fpm:graceful_restart"
157
157
  after "deploy:create_symlink", "kuma:apc:clear", "kuma:fpm:graceful_restart"
158
+ before "symfony:cache:warmup", "symfony:cache:clear"
158
159
 
159
160
  end
160
161
  end
@@ -0,0 +1,41 @@
1
+ require 'railsless-deploy'
2
+
3
+ module KStrano
4
+ module Web
5
+ def self.load_into(configuration)
6
+ configuration.load do
7
+
8
+ load_paths.push File.expand_path('../', __FILE__)
9
+ load 'kstrano'
10
+
11
+ set :npm_install, true
12
+ set :bower_install, true
13
+ set :grunt_build, true
14
+ set :group_writable, false
15
+
16
+ before "kuma::share_childs" do
17
+ kuma.share_childs
18
+ end
19
+
20
+ after "deploy:finalize_update" do
21
+ if bower_install
22
+ frontend.bower.install
23
+ end
24
+
25
+ if npm_install
26
+ frontend.npm.install
27
+ end
28
+
29
+ if grunt_build
30
+ frontend.grunt.build
31
+ end
32
+ end
33
+
34
+ end
35
+ end
36
+ end
37
+ end
38
+
39
+ if Capistrano::Configuration.instance
40
+ KStrano::Web.load_into(Capistrano::Configuration.instance)
41
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kstrano
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.9
4
+ version: 1.1.10
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-01-09 00:00:00.000000000 Z
12
+ date: 2014-02-05 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: capifony
@@ -107,6 +107,22 @@ dependencies:
107
107
  - - ~>
108
108
  - !ruby/object:Gem::Version
109
109
  version: 1.1.2
110
+ - !ruby/object:Gem::Dependency
111
+ name: net-ssh
112
+ requirement: !ruby/object:Gem::Requirement
113
+ none: false
114
+ requirements:
115
+ - - ~>
116
+ - !ruby/object:Gem::Version
117
+ version: 2.7.0
118
+ type: :runtime
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ none: false
122
+ requirements:
123
+ - - ~>
124
+ - !ruby/object:Gem::Version
125
+ version: 2.7.0
110
126
  description: Deploying symfony2 applications for the kDeploy server setup.
111
127
  email: support@kunstmaan.be
112
128
  executables:
@@ -125,6 +141,7 @@ files:
125
141
  - lib/kstrano_play.rb
126
142
  - lib/kstrano_silex.rb
127
143
  - lib/kstrano_symfony2.rb
144
+ - lib/kstrano_web.rb
128
145
  - lib/kstrano_wordpress.rb
129
146
  - resources/deploy.rb
130
147
  - resources/deploy_production.rb