capifony 0.4.2 → 0.4.3

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.
Files changed (3) hide show
  1. data/README +22 -0
  2. data/lib/capifony.rb +20 -0
  3. metadata +5 -5
data/README CHANGED
@@ -61,6 +61,11 @@ To deploy your application, simply run:
61
61
 
62
62
  ## Deployment ##
63
63
 
64
+ To specify the username/password to use over SSH, add the following configuration to your `config/deploy.rb` file:
65
+
66
+ set :user, 'username'
67
+ set :password, 'password'
68
+
64
69
  To configure database on production environment, run:
65
70
 
66
71
  cap symfony:configure:database
@@ -103,6 +108,22 @@ If you need to upload some shared folders to remote server, run:
103
108
 
104
109
  cap shared:{databases OR log OR uploads]:to_remote
105
110
 
111
+ ## Host Permissions ##
112
+
113
+ If you are not allowed sudo ability on your host you can add the following configuration to your `config/deploy.rb` file:
114
+
115
+ set :use_sudo, false
116
+
117
+ If your host complains about the entire project being group-writable you can add the following configuration to your `config/deploy.rb` file:
118
+
119
+ set :group_writable, false
120
+
121
+ ## Git Specific Options ##
122
+
123
+ If you are using Git submoduleis you'll want to add the following to your `config/deploy.rb` file or the submodule files won't be brought down with your project:
124
+
125
+ set :git_enable_submodules, 1
126
+
106
127
  ## Other tasks ##
107
128
 
108
129
  If you need to deploy and run your migrations you can call:
@@ -131,3 +152,4 @@ We’ve been using this setup for a little while now, and it’s saved us a ton
131
152
  * Arlo (contributor): [http://github.com/arlo](http://github.com/arlo)
132
153
  * Xavier Gorse (contributor): [http://github.com/xgorse](http://github.com/xgorse)
133
154
  * Travis Roberts (creator of improved version): [http://blog.centresource.com/author/troberts/](http://blog.centresource.com/author/troberts/)
155
+ * Brent Shaffer (contributor): [http://github.com/bshaffer](http://github.com/bshaffer)
data/lib/capifony.rb CHANGED
@@ -207,6 +207,26 @@ namespace :symfony do
207
207
 
208
208
  stream "#{php_bin} #{latest_release}/symfony project:send-emails --message-limit=#{message_limit} --time-limit=#{time_limit} --env=#{symfony_env}"
209
209
  end
210
+
211
+ desc 'Task to set all front controllers to a specific environment'
212
+ task :set_environment do
213
+ if (env = fetch(:symfony_env, nil)) && env != 'prod'
214
+ cmd = []
215
+ apps = fetch(:symfony_apps, ['frontend'])
216
+
217
+ # First application listed becomes index.php
218
+ if app = apps.shift
219
+ cmd << "cp #{release_path}/web/#{app}_#{env}.php #{release_path}/web/index.php"
220
+ end
221
+
222
+ # All other apps are copied to their default controllers
223
+ for app in apps
224
+ cmd << "cp #{release_path}/web/#{app}_#{env}.php #{release_path}/web/#{app}.php"
225
+ end
226
+
227
+ run cmd.join(';') if cmd.join(';')
228
+ end
229
+ end
210
230
  end
211
231
 
212
232
  namespace :plugin do
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capifony
3
3
  version: !ruby/object:Gem::Version
4
- hash: 11
4
+ hash: 9
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 4
9
- - 2
10
- version: 0.4.2
9
+ - 3
10
+ version: 0.4.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - Konstantin Kudryashov
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-09-23 00:00:00 +03:00
18
+ date: 2010-10-20 00:00:00 +03:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -48,7 +48,7 @@ files:
48
48
  - README
49
49
  - LICENSE
50
50
  - CHANGELOG
51
- has_rdoc: false
51
+ has_rdoc: true
52
52
  homepage: http://everzet.com/projects/symfony-helpers/capifony
53
53
  licenses: []
54
54