capwagen 0.0.1 → 0.0.2

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/README.md CHANGED
@@ -3,8 +3,8 @@
3
3
  Capistrano integration for Kraftwagen projects. More information coming soon.
4
4
  For the more adventurous of you a very short tutorial below.
5
5
 
6
- * This is very inmature code at the moment. DO NOT use it for production
7
- deployments unless you do not care about breaking your production site.*
6
+ **This is very inmature code at the moment. DO NOT use it for production
7
+ deployments unless you do not care about breaking your production site.**
8
8
 
9
9
  ## Installation
10
10
 
@@ -26,4 +26,4 @@ Change `/path/to/project/src/cap/deploy.rb` to fit your configuration.
26
26
  ```
27
27
  cd /path/top/project/src
28
28
  cap deploy
29
- ```
29
+ ```
@@ -1,3 +1,3 @@
1
1
  module Capwagen
2
- VERSION = "0.0.1"
3
- end
2
+ VERSION = "0.0.2"
3
+ end
data/lib/capwagen.rb CHANGED
@@ -110,108 +110,4 @@ module Capwagen
110
110
  end
111
111
  end
112
112
 
113
- Capistrano::Configuration.instance.load do
114
- set :drush_cmd, 'drush'
115
-
116
- set :deploy_via, :capwagen_local_build
117
-
118
- set :capwagen_tmp_basename, 'capwagen'
119
- set :kraftwagen_environment, 'production'
120
-
121
- set :normalize_asset_timestamps, false
122
-
123
- set :drupal_site_name, 'default'
124
- set(:shared_files) {
125
- ["sites/#{drupal_site_name}/settings.php",
126
- "sites/#{drupal_site_name}/settings.local.php"]
127
- }
128
- set(:shared_dirs) {
129
- ["sites/#{drupal_site_name}/files"]
130
- }
131
-
132
- namespace :deploy do
133
- # We override the default update task, because we need to add our own
134
- # routines between the defaults
135
- task :update do
136
- transaction do
137
- update_code
138
- find_and_execute_task("drupal:offline")
139
- create_symlink
140
- find_and_execute_task("kraftwagen:update")
141
- find_and_execute_task("drupal:online")
142
- end
143
- end
144
-
145
- # We override the default finalize update task, because our logic for
146
- # filling projects with the correct symlinks, is completely different from
147
- # Rails projects.
148
- task :finalize_update, :except => { :no_release => true } do
149
- run "chmod -R g+w #{latest_release}" if fetch(:group_writable, true)
150
-
151
- # mkdir -p is making sure that the directories are there for some SCM's that don't
152
- # save empty folders
153
- (shared_files + shared_dirs).map do |d|
154
- if (d.rindex('/')) then
155
- run "rm -rf #{latest_release}/#{d} && mkdir -p #{latest_release}/#{d.slice(0..(d.rindex('/')))}"
156
- else
157
- run "rm -rf #{latest_release}/#{d}"
158
- end
159
- run "ln -s #{shared_path}/#{d.split('/').last} #{latest_release}/#{d}"
160
- end
161
- end
162
-
163
- task :setup, :except => { :no_release => true } do
164
- dirs = [deploy_to, releases_path, shared_path]
165
- dirs += shared_dirs.map { |d| File.join(shared_path, d.split('/').last) }
166
- run "#{try_sudo} mkdir -p #{dirs.join(' ')}"
167
- run "#{try_sudo} chmod g+w #{dirs.join(' ')}" if fetch(:group_writable, true)
168
- end
169
- end
170
-
171
- # The Drupal namespace contains the commands for Drupal that is not specific
172
- # to the Kraftwagen update process
173
- namespace :drupal do
174
- task :cache_clear, :except => { :no_release => true }, :only => { :primary => true } do
175
- run "cd #{latest_release} && #{drush_cmd} cache-clear all"
176
- end
177
- task :cache_clear_drush do
178
- run "cd #{latest_release} && #{drush_cmd} cache-clear drush"
179
- end
180
- task :offline, :except => { :no_release => true }, :only => { :primary => true } do
181
- run "cd #{latest_release} && #{drush_cmd} variable-set maintenance_mode 1 --yes"
182
- cache_clear
183
- end
184
- task :online, :except => { :no_release => true }, :only => { :primary => true } do
185
- run "cd #{latest_release} && #{drush_cmd} variable-set maintenance_mode 0 --yes"
186
- cache_clear
187
- end
188
- end
189
-
190
- # The Kraftwagen namespace contains the Kraftwagen update process
191
- namespace :kraftwagen do
192
- task :update do
193
- apply_module_dependencies
194
- updatedb
195
- find_and_execute_task("drupal:cache_clear_drush")
196
- features_revert
197
- find_and_execute_task("drupal:cache_clear")
198
- manifests
199
- find_and_execute_task("drupal:cache_clear")
200
- end
201
-
202
- task :apply_module_dependencies do
203
- run "cd #{latest_release} && #{drush_cmd} kw-apply-module-dependencies #{kraftwagen_environment}"
204
- end
205
- task :updatedb do
206
- run "cd #{latest_release} && #{drush_cmd} updatedb"
207
- end
208
- task :features_revert do
209
- run "cd #{latest_release} && #{drush_cmd} features-revert-all --yes"
210
- end
211
- task :manifests do
212
- run "cd #{latest_release} && #{drush_cmd} kw-manifests #{kraftwagen_environment}"
213
- end
214
- end
215
- end
216
-
217
113
  Capwagen.load_into(Capistrano::Configuration.instance)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capwagen
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
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: 2013-02-26 00:00:00.000000000 Z
12
+ date: 2013-02-27 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: capistrano