cap-laravel 0.0.3 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +16 -0
- data/lib/cap/laravel/defaults.rb +3 -0
- data/lib/cap/laravel/version.rb +1 -1
- data/lib/cap/laravel.rb +6 -0
- data/lib/cap/tasks/artisan.rake +9 -7
- data/lib/cap/tasks/assets.rake +7 -2
- data/lib/cap/tasks/composer.rake +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c4eabbeabb6ba4848c47e0b769f8f696dad0ce85
|
4
|
+
data.tar.gz: dd7ce3445d67f4b604f569113f20f449901d5699
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 31658f6f3c68a82749288ae55d8e739c0df59c9b97d07483521f86f601039c7df675e1fed535001cd58e5138f4cc659adec135c754a8129d34ae9c414200bf49
|
7
|
+
data.tar.gz: 2b6ca6af84d72209d5c517d69cbbd6875832d20430f0fca32d274a75bd669ee1e6f01997f9f5bab69c8b597b9b15b3b34651aa1fcf718b880b26f8eec89e6c12
|
data/README.md
CHANGED
@@ -24,6 +24,22 @@ Add it to your Capfile:
|
|
24
24
|
|
25
25
|
Bask in the glory of Capistrano.
|
26
26
|
|
27
|
+
## Settings
|
28
|
+
|
29
|
+
### Migrations
|
30
|
+
|
31
|
+
If you are creating an app that doesn't have any migrations, e.g. an API client, you can ignore migrations by setting the following in your `deploy.rb` file:
|
32
|
+
|
33
|
+
set :run_migrations, false
|
34
|
+
|
35
|
+
### Grunt
|
36
|
+
|
37
|
+
By default, the `grunt` task will be run when compiling CSS, etc. To alter the command that is run set the following:
|
38
|
+
|
39
|
+
set :grunt_cmd, "grunt task here"
|
40
|
+
|
41
|
+
This could be something like `grunt:prod`, or whatever you want it to be if it doesn't follow the normal practice.
|
42
|
+
|
27
43
|
## Contributing
|
28
44
|
|
29
45
|
1. Fork it ( https://github.com/[my-github-username]/cap-laravel/fork )
|
data/lib/cap/laravel/version.rb
CHANGED
data/lib/cap/laravel.rb
CHANGED
data/lib/cap/tasks/artisan.rake
CHANGED
@@ -6,7 +6,9 @@ namespace :artisan do
|
|
6
6
|
task :migrate do
|
7
7
|
on roles(:db) do
|
8
8
|
within release_path do
|
9
|
-
|
9
|
+
if fetch(:run_migrations)
|
10
|
+
execute :php, "artisan migrate"
|
11
|
+
end
|
10
12
|
end
|
11
13
|
end
|
12
14
|
end
|
@@ -14,7 +16,7 @@ namespace :artisan do
|
|
14
16
|
desc "Refresh database schema" # this will delete all the things
|
15
17
|
task :refresh do
|
16
18
|
on roles(:db) do
|
17
|
-
within
|
19
|
+
within release_path do
|
18
20
|
execute :php, "artisan migrate:refresh"
|
19
21
|
end
|
20
22
|
end
|
@@ -23,7 +25,7 @@ namespace :artisan do
|
|
23
25
|
desc "Seed the database"
|
24
26
|
task :seed do
|
25
27
|
on roles(:db) do
|
26
|
-
within
|
28
|
+
within release_path do
|
27
29
|
execute :php, "artisan db:seed"
|
28
30
|
end
|
29
31
|
end
|
@@ -33,7 +35,7 @@ namespace :artisan do
|
|
33
35
|
task :seed_class do
|
34
36
|
ask(:seed_class, "seeder")
|
35
37
|
on roles(:db) do |h|
|
36
|
-
within
|
38
|
+
within release_path do
|
37
39
|
execute :php, "artisan db:seed --class=#{fetch(:seed_class)}"
|
38
40
|
end
|
39
41
|
end
|
@@ -46,7 +48,7 @@ namespace :artisan do
|
|
46
48
|
desc "Make the storage dir more accessible"
|
47
49
|
task :storage do
|
48
50
|
on roles(:app) do
|
49
|
-
within
|
51
|
+
within release_path do
|
50
52
|
execute :sudo, "chmod -R 777 app/storage"
|
51
53
|
end
|
52
54
|
end
|
@@ -54,7 +56,7 @@ namespace :artisan do
|
|
54
56
|
|
55
57
|
end
|
56
58
|
|
57
|
-
before 'deploy:finishing', 'artisan:app:storage'
|
58
59
|
after 'deploy:updated', 'artisan:db:migrate'
|
59
|
-
|
60
|
+
after 'deploy:updated', 'artisan:app:storage'
|
61
|
+
|
60
62
|
end
|
data/lib/cap/tasks/assets.rake
CHANGED
@@ -4,7 +4,9 @@ namespace :assets do
|
|
4
4
|
task :npm do
|
5
5
|
on roles(:app) do
|
6
6
|
within release_path do
|
7
|
-
|
7
|
+
if test("[ -e #{release_path}/package.json ]")
|
8
|
+
execute :npm, :install, "--quiet"
|
9
|
+
end
|
8
10
|
end
|
9
11
|
end
|
10
12
|
end
|
@@ -13,11 +15,14 @@ namespace :assets do
|
|
13
15
|
task :grunt do
|
14
16
|
on roles(:app) do
|
15
17
|
within release_path do
|
16
|
-
|
18
|
+
if test("[ -e #{release_path}/Gruntfile.js ]")
|
19
|
+
execute fetch(:grunt_cmd)
|
20
|
+
end
|
17
21
|
end
|
18
22
|
end
|
19
23
|
end
|
20
24
|
|
25
|
+
# probs wont work
|
21
26
|
desc "Run the bower command"
|
22
27
|
task :bower do
|
23
28
|
on roles(:app) do
|
data/lib/cap/tasks/composer.rake
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cap-laravel
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gareth Bishop
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-04-
|
11
|
+
date: 2014-04-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: capistrano
|
@@ -69,6 +69,7 @@ files:
|
|
69
69
|
- lib/cap/laravel/artisan.rb
|
70
70
|
- lib/cap/laravel/assets.rb
|
71
71
|
- lib/cap/laravel/composer.rb
|
72
|
+
- lib/cap/laravel/defaults.rb
|
72
73
|
- lib/cap/laravel/version.rb
|
73
74
|
- lib/cap/tasks/artisan.rake
|
74
75
|
- lib/cap/tasks/assets.rake
|