cap-laravel 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +12 -0
- data/cap-laravel.gemspec +1 -1
- data/lib/cap/laravel/version.rb +1 -1
- data/lib/cap/tasks/artisan.rake +14 -17
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6c22ff3755a44f407bb8a13d63ba38af332572ff
|
4
|
+
data.tar.gz: 51995a0d7d6caeffbaa909c4aa04907d10664eab
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c9007f55d71706ba000d16b4da076bbd65b2c9aa9a53e344aceb8c70db4ac244e77910fba5438edf5f2a18a94f6f4c88533ba418d8e5dc01eaad973608745d50
|
7
|
+
data.tar.gz: d0b26e234a4b1506442c8774bd2a747d695f8e0bf202a21cc61a641b1f6059a298e388dd35ef068d6f3e3174894da296624a3a3b44eede698cc34085b15d4207
|
data/README.md
CHANGED
@@ -24,6 +24,18 @@ Add it to your Capfile:
|
|
24
24
|
|
25
25
|
Bask in the glory of Capistrano.
|
26
26
|
|
27
|
+
## Seeding
|
28
|
+
|
29
|
+
If you want to seed your database, you have a few options.
|
30
|
+
|
31
|
+
The basic task is `cap env artisan:db:seed` which will runn your bog standard seeding process.
|
32
|
+
|
33
|
+
If you want to seed a specific class do the following:
|
34
|
+
|
35
|
+
$ cap env artisan:db:seed[SeedClassHere]
|
36
|
+
|
37
|
+
`env` is a placeholder for the environment you are deploying to, so it will likely be `staging` or `production`.
|
38
|
+
|
27
39
|
## Settings
|
28
40
|
|
29
41
|
### Migrations
|
data/cap-laravel.gemspec
CHANGED
data/lib/cap/laravel/version.rb
CHANGED
data/lib/cap/tasks/artisan.rake
CHANGED
@@ -7,7 +7,7 @@ namespace :artisan do
|
|
7
7
|
on roles(:db) do
|
8
8
|
within release_path do
|
9
9
|
if fetch(:run_migrations)
|
10
|
-
execute :php,
|
10
|
+
execute :php, :artisan, "migrate"
|
11
11
|
end
|
12
12
|
end
|
13
13
|
end
|
@@ -17,29 +17,26 @@ namespace :artisan do
|
|
17
17
|
task :refresh do
|
18
18
|
on roles(:db) do
|
19
19
|
within release_path do
|
20
|
-
execute :php,
|
20
|
+
execute :php, :artisan, "migrate:refresh"
|
21
21
|
end
|
22
22
|
end
|
23
23
|
end
|
24
|
-
|
25
|
-
desc
|
26
|
-
task :seed do
|
24
|
+
|
25
|
+
desc 'Seed the database / Seed an individual class'
|
26
|
+
task :seed, :class do |t, args|
|
27
|
+
|
28
|
+
seed_class = args[:class]
|
29
|
+
|
27
30
|
on roles(:db) do
|
28
|
-
within
|
29
|
-
|
31
|
+
within current_path do
|
32
|
+
if seed_class
|
33
|
+
execute :php, :artisan, "db:seed --class=#{seed_class}"
|
34
|
+
else
|
35
|
+
execute :php, :artisan, "db:seed"
|
36
|
+
end
|
30
37
|
end
|
31
38
|
end
|
32
39
|
end
|
33
|
-
|
34
|
-
desc "Seed a specific class"
|
35
|
-
task :seed_class do
|
36
|
-
ask(:seed_class, "seeder")
|
37
|
-
on roles(:db) do |h|
|
38
|
-
within release_path do
|
39
|
-
execute :php, "artisan db:seed --class=#{fetch(:seed_class)}"
|
40
|
-
end
|
41
|
-
end
|
42
|
-
end
|
43
40
|
|
44
41
|
end
|
45
42
|
|
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.7
|
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-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: capistrano
|
@@ -42,16 +42,16 @@ dependencies:
|
|
42
42
|
name: rake
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - "
|
45
|
+
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
47
|
+
version: '10.2'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- - "
|
52
|
+
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
54
|
+
version: '10.2'
|
55
55
|
description: Capistrano tasks for deploying Laravel apps at Architect.
|
56
56
|
email:
|
57
57
|
- gbishop@wearearchitect.com
|