mina-cakephp 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +2 -0
- data/README.md +67 -28
- data/VERSION +1 -1
- data/lib/mina-cakephp/cakephp.rb +3 -3
- data/lib/mina-cakephp/cakephp/tmp.rb +1 -1
- metadata +10 -6
data/.gitignore
CHANGED
data/README.md
CHANGED
@@ -1,24 +1,45 @@
|
|
1
1
|
# mina-cakephp
|
2
2
|
|
3
|
-
mina-cakephp
|
3
|
+
mina-cakephp is a gem that adds many tasks to aid in the deployment of [CakePHP] (http://www.cakephp.org) applications
|
4
|
+
using [Mina] (http://nadarei.co/mina).
|
4
5
|
|
5
|
-
|
6
|
+
# Getting Start
|
6
7
|
|
7
|
-
|
8
|
+
## Instalation
|
9
|
+
|
10
|
+
gem install mina-cakephp
|
11
|
+
|
12
|
+
## Configuration
|
13
|
+
|
14
|
+
After installation, create a file in the root directory of your project called `Minafile`.
|
15
|
+
|
16
|
+
Note: Mina uses the command `mina init` to create a config file at `config/deploy.rb`, but CakePHP use the `Config` directory to hold configurations.
|
17
|
+
To avoid problems we recommend using `Minafile` instead of `config/deploy.rb`
|
18
|
+
|
19
|
+
`Minafile` sample:
|
8
20
|
|
9
21
|
require 'mina/git'
|
22
|
+
# Load tasks of mina-cakephp
|
10
23
|
require 'mina-cakephp'
|
11
24
|
|
25
|
+
# Mina default configuration
|
26
|
+
# more info at http://nadarei.co/mina
|
12
27
|
set :domain, 'server.to.deploy.com'
|
13
28
|
set :deploy_to, '/var/www/my-app'
|
14
29
|
set :repository, 'git@mysever:my-app.git'
|
15
30
|
set :user, 'root'
|
16
31
|
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
32
|
+
# Shared file or folder between deploys
|
33
|
+
# more at http://nadarei.co/mina/tasks/deploy_link_shared_paths.html
|
34
|
+
set :shared_paths, ['Config/database.php', 'tmp']
|
35
|
+
|
36
|
+
## mina-cakephp Settings
|
37
|
+
# Defines the CakePHP core path.
|
38
|
+
# This path is used to execute bake commands and update webroot/index.php if needed.
|
39
|
+
set :cake_path, '/var/www/libs/cakephp'
|
40
|
+
# Database connection settings.
|
41
|
+
# This will be used to create Config/database.php
|
42
|
+
set :cake_database, {
|
22
43
|
'datasource' => 'Database/Mysql',
|
23
44
|
'persistent' => false,
|
24
45
|
'host' => 'localhost',
|
@@ -28,44 +49,62 @@ Create one file at root directory of app named Minafile. Sample:
|
|
28
49
|
'prefix' => ''
|
29
50
|
}
|
30
51
|
|
31
|
-
|
32
|
-
|
52
|
+
## Deploy Task
|
33
53
|
task :deploy do
|
34
54
|
deploy do
|
35
|
-
|
36
|
-
invoke :'
|
55
|
+
# Clone project, more at http://nadarei.co/mina/tasks/git_clone.html
|
56
|
+
invoke :'git:clone'
|
57
|
+
# Create symlinks
|
58
|
+
# more at http://nadarei.co/mina/tasks/deploy_link_shared_paths.html
|
59
|
+
invoke :'deploy:link_shared_paths'
|
37
60
|
|
38
|
-
|
39
|
-
|
40
|
-
invoke :'cakephp:
|
41
|
-
|
42
|
-
invoke :'cakephp:
|
43
|
-
|
61
|
+
# If you do not have CakePHP in your include_path, you will need to set CakePHP core path at webroot/index.php.
|
62
|
+
# This task will do it for you.
|
63
|
+
invoke :'cakephp:cake_core_path'
|
64
|
+
# This task changes the debug level to 0 at Config/core.php
|
65
|
+
invoke :'cakephp:debug_disable'
|
66
|
+
# This task will delete all temporary files at tmp/
|
67
|
+
invoke :'cakephp:tmp:clean_cache'
|
68
|
+
|
69
|
+
# This task will create a folder and set correct permissions
|
70
|
+
# to receive build files of AssetCompress plugin (https://github.com/markstory/asset_compress)
|
71
|
+
invoke :'cakephp:asset_compress:setup'
|
72
|
+
# Build asset files
|
73
|
+
invoke :'cakephp:asset_compress:build'
|
44
74
|
|
45
75
|
to :launch do
|
46
|
-
|
76
|
+
# If you are using the Migrations plugin of CakeDC
|
77
|
+
# you need to invoke this task to run all migrations before launching the application.
|
78
|
+
invoke :'cakephp:migrations:run_all'
|
47
79
|
end
|
48
80
|
end
|
49
81
|
end
|
50
82
|
|
51
|
-
|
83
|
+
# Taks to prepare the environment
|
52
84
|
task :setup do
|
53
|
-
#
|
54
|
-
|
55
|
-
#invoke :'cakephp:git:clone'
|
85
|
+
# Invoke this task if you need to clone CakePHP core when setting up the enviroment.
|
86
|
+
invoke :'cakephp:git:clone'
|
56
87
|
end
|
57
88
|
|
58
|
-
|
59
|
-
|
89
|
+
## Setup Environment
|
90
|
+
|
60
91
|
mina setup
|
61
92
|
|
62
|
-
|
93
|
+
More at http://nadarei.co/mina/directory_structure.html
|
63
94
|
|
64
|
-
|
95
|
+
## Deploying
|
65
96
|
|
66
97
|
mina deploy
|
67
98
|
|
68
|
-
|
99
|
+
More at http://nadarei.co/mina/deploying.html
|
100
|
+
|
101
|
+
## More tasks
|
102
|
+
|
103
|
+
Run
|
104
|
+
|
105
|
+
mina -T
|
106
|
+
|
107
|
+
To list all tasks.
|
69
108
|
|
70
109
|
## Contributing to mina-cakephp
|
71
110
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0.
|
1
|
+
1.0.1
|
data/lib/mina-cakephp/cakephp.rb
CHANGED
@@ -20,7 +20,7 @@ namespace :cakephp do
|
|
20
20
|
end
|
21
21
|
|
22
22
|
desc "Configure CakePHP debug to 0."
|
23
|
-
task :
|
23
|
+
task :debug_disable do
|
24
24
|
regex = "((\\/\\/)?\\s*Configure::write\\('debug',(.*)\\);)"
|
25
25
|
queue %{
|
26
26
|
echo "-----> Setting up CakePHP debug to 0" && (
|
@@ -56,8 +56,8 @@ namespace :cakephp do
|
|
56
56
|
|
57
57
|
queue %{
|
58
58
|
echo "-----> Creating CakePHP database config file." && (
|
59
|
-
#{echo_cmd %{mkdir -p #{shared_path}/Config}} &&
|
60
|
-
#{echo_cmd %{echo "#{content}" > #{shared_path}/Config/database.php}} &&
|
59
|
+
#{echo_cmd %{mkdir -p #{deploy_to}/#{shared_path}/Config}} &&
|
60
|
+
#{echo_cmd %{echo "#{content}" > #{deploy_to}/#{shared_path}/Config/database.php}} &&
|
61
61
|
echo "-----> Done."
|
62
62
|
) || (
|
63
63
|
echo "ERROR: Problem to create database config file."
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mina-cakephp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2013-01-30 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: mina
|
16
|
-
requirement:
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,7 +21,12 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements:
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ! '>='
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '0'
|
25
30
|
description: Tools to deploy CakePHP apps with mina.
|
26
31
|
email:
|
27
32
|
- contato@danielpk.com.br
|
@@ -62,9 +67,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
62
67
|
version: '0'
|
63
68
|
requirements: []
|
64
69
|
rubyforge_project:
|
65
|
-
rubygems_version: 1.8.
|
70
|
+
rubygems_version: 1.8.24
|
66
71
|
signing_key:
|
67
72
|
specification_version: 3
|
68
73
|
summary: Tools to deploy CakePHP apps with mina.
|
69
74
|
test_files: []
|
70
|
-
has_rdoc:
|