cachivache 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +5 -0
- data/bin/template/stuff/php-site-sample/cachivache-com.conf +15 -0
- data/bin/template/stuff/php-site-sample/cachivache-com.rb +60 -0
- data/bin/template/stuff/php-site-sample/config.rb +4 -0
- data/bin/template/stuff/php-site-sample/populate-mysql.sql +1 -0
- data/bin/template/stuff/{stuff_sample.rb → stuff-sample.rb} +0 -0
- data/lib/cachivache/version.rb +1 -1
- metadata +7 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bf2ed35a7f97756fd6d5f77e493fb6374487cbbd
|
4
|
+
data.tar.gz: 382c31fa83803e2449449886701a62094aadc4a6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f296ef7d286668e36caeaf82dc1109e5f29f6cc3f75c11ee49d2204c431558dafe0e53c7ba3725d08372fba0fc7d73e7bf9a385a5b881b65cd2a000faee78eca
|
7
|
+
data.tar.gz: f1e873970fb228b2feb05b04f8b4f1bb3a0bfea5e629f2ed62a0cdccd1d4ef65af7f72256b1d112da2e93d8626dd6b7f0fc203ff2011ef780f148aeec4dc1f1d
|
data/README.md
CHANGED
@@ -95,6 +95,11 @@ configure :PhpJsonSpec do
|
|
95
95
|
let(:project_folder) { Cachivache.src_folder }
|
96
96
|
end
|
97
97
|
```
|
98
|
+
|
99
|
+
## How about a more complex stuff, like setting up an app for apache?
|
100
|
+
|
101
|
+
Here is an example of that: [php-site-sample](bin/template/stuff/php-site-sample)
|
102
|
+
|
98
103
|
## How do I tell Cachivache what to install?
|
99
104
|
|
100
105
|
Edit the file `cachivache.rb` and define the stuffs to install in the section
|
@@ -0,0 +1,15 @@
|
|
1
|
+
<VirtualHost *:80>
|
2
|
+
ServerName cachivache.com
|
3
|
+
ServerAlias www.cachivache.com
|
4
|
+
|
5
|
+
DocumentRoot /var/www/cachivache.com
|
6
|
+
<Directory /var/www/cachivache.com >
|
7
|
+
# enable the .htaccess rewrites
|
8
|
+
AllowOverride All
|
9
|
+
Order allow,deny
|
10
|
+
Allow from All
|
11
|
+
</Directory>
|
12
|
+
LogLevel info
|
13
|
+
ErrorLog /var/log/apache2/cachivache.com-error.log
|
14
|
+
CustomLog /var/log/apache2/cachivache.com-access.log combined
|
15
|
+
</VirtualHost>
|
@@ -0,0 +1,60 @@
|
|
1
|
+
dependencies = [
|
2
|
+
:'projects-setup',
|
3
|
+
:apache,
|
4
|
+
:php,
|
5
|
+
:'mysql-server', :'mysql-client',
|
6
|
+
:composer,
|
7
|
+
]
|
8
|
+
|
9
|
+
task :'cachivache-com' => dependencies do
|
10
|
+
invoke 'cachivache-com:enable-site'
|
11
|
+
invoke 'cachivache-com:setup-config-files'
|
12
|
+
invoke 'cachivache-com:composer-install'
|
13
|
+
invoke 'cachivache-com:enable-hosts'
|
14
|
+
invoke 'cachivache-com:populate-mysql'
|
15
|
+
execute 'apache-restart'
|
16
|
+
|
17
|
+
remind_to "Remember to add: '#{Cachivache.vagrant_ip_address} #{CachivacheDotCom.domain}' to your local '/etc/hosts' file"
|
18
|
+
end
|
19
|
+
|
20
|
+
namespace :'cachivache-com' do
|
21
|
+
task :'enable-site' do
|
22
|
+
sh %Q{
|
23
|
+
# Copy .conf to /etc/apache2/sites-available
|
24
|
+
sudo cp -f #{Cachivache.provision_folder}/stuff/php-site-sample/cachivache-com.conf /etc/apache2/sites-available
|
25
|
+
|
26
|
+
# Enable cachivache-com.conf
|
27
|
+
sudo a2ensite cachivache-com.conf
|
28
|
+
|
29
|
+
# Link the /data/www to the actual src location
|
30
|
+
sudo ln -s #{CachivacheDotCom.app_folder}/web /var/www/cachivache-com
|
31
|
+
}
|
32
|
+
end
|
33
|
+
|
34
|
+
task :'setup-config-files' do
|
35
|
+
in_file "#{CachivacheDotCom.app_folder}/config/db.php" do
|
36
|
+
shell replace "'username' => ''", with: "'username' => 'root'"
|
37
|
+
shell replace "'password' => ''", with: "'password' => '#{MysqlServer.root_password}'"
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
task :'composer-install' do
|
42
|
+
shell %Q{
|
43
|
+
cd #{CachivacheDotCom.app_folder}
|
44
|
+
|
45
|
+
composer install
|
46
|
+
}
|
47
|
+
end
|
48
|
+
|
49
|
+
task :'enable-hosts' do
|
50
|
+
sh_unless file: "/etc/hosts", contains: "127.0.0.1 #{CachivacheDotCom.domain}" do
|
51
|
+
shell append "127.0.0.1 #{CachivacheDotCom.domain}"
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
55
|
+
task :'populate-mysql' do
|
56
|
+
sh %Q{
|
57
|
+
mysql -uroot -p#{MysqlServer.root_password} < #{Cachivache.provision_folder}/stuff/php-site-sample/populate-mysql.sql
|
58
|
+
}
|
59
|
+
end
|
60
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
CREATE DATABASE IF NOT EXISTS `cachivache_com`;
|
File without changes
|
data/lib/cachivache/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cachivache
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Martin Rubi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-12-
|
11
|
+
date: 2015-12-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -97,7 +97,11 @@ files:
|
|
97
97
|
- bin/template/lib/stuff-configuration.rb
|
98
98
|
- bin/template/lib/stuff-reminders-behaviour.rb
|
99
99
|
- bin/template/stuff/.gitkeep
|
100
|
-
- bin/template/stuff/
|
100
|
+
- bin/template/stuff/php-site-sample/cachivache-com.conf
|
101
|
+
- bin/template/stuff/php-site-sample/cachivache-com.rb
|
102
|
+
- bin/template/stuff/php-site-sample/config.rb
|
103
|
+
- bin/template/stuff/php-site-sample/populate-mysql.sql
|
104
|
+
- bin/template/stuff/stuff-sample.rb
|
101
105
|
- cachivache.gemspec
|
102
106
|
- lib/cachivache.rb
|
103
107
|
- lib/cachivache/add-stuff-libraries-command.rb
|