cap-laravel 0.0.3 → 0.0.5

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: dc2e96c30a8cf79a321f4a8507065fc3ac44bb3a
4
- data.tar.gz: 0fcf356b05132562ed89879ee7a84a02e5c3e392
3
+ metadata.gz: c4eabbeabb6ba4848c47e0b769f8f696dad0ce85
4
+ data.tar.gz: dd7ce3445d67f4b604f569113f20f449901d5699
5
5
  SHA512:
6
- metadata.gz: f971a751942458301802955722bfdeb4a84a3838dacc5cef64feec670d208a4fad166dc93b888d4948648931ba02df566d5f3fce48fcd86ad089117c22092dfe
7
- data.tar.gz: 7f92b5dad39235997f414a3164e8a5f4825f6823d48fb7ebc27f154c5f930e7f64124c795c357d13abaa815ff598d64581ddda421736c9ed79ce913afd5f09a0
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 )
@@ -0,0 +1,3 @@
1
+ set :run_migrations, true
2
+
3
+ set :grunt_cmd, "grunt"
@@ -1,5 +1,5 @@
1
1
  module Cap
2
2
  module Laravel
3
- VERSION = "0.0.3"
3
+ VERSION = "0.0.5"
4
4
  end
5
5
  end
data/lib/cap/laravel.rb CHANGED
@@ -7,3 +7,9 @@ module Cap
7
7
  module Laravel
8
8
  end
9
9
  end
10
+
11
+ namespace :load do
12
+ task :defaults do
13
+ load 'cap/laravel/defaults.rb'
14
+ end
15
+ end
@@ -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
- execute :php, "artisan migrate"
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 current_path do
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 current_path do
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 current_path do
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 current_path do
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
@@ -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
- execute "if [[ -e package.json ]]; then npm install; fi"
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
- execute "if [[ -e Gruntfile ]]; then grunt; fi"
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
@@ -4,7 +4,7 @@ namespace :composer do
4
4
  task :install do
5
5
  on roles(:app) do
6
6
  within release_path do
7
- execute :composer, "install --no-dev --quiet --no-scripts"
7
+ execute :composer, "install --no-dev --quiet"
8
8
  end
9
9
  end
10
10
  end
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.3
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 00:00:00.000000000 Z
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