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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8da3eddd4099be9c7fdedb2666c1700006385eff
4
- data.tar.gz: f60651f824f36b29b74b1dcc40f51fc34b454f7a
3
+ metadata.gz: 6c22ff3755a44f407bb8a13d63ba38af332572ff
4
+ data.tar.gz: 51995a0d7d6caeffbaa909c4aa04907d10664eab
5
5
  SHA512:
6
- metadata.gz: b72b06aa766566179994049ac9cf93f9189d21cf46266a72d11c8dd0aa48d5dedaf957df7b8c17ed4855ca8d1729dde355404c44a96a29b4e8b84334c030bfed
7
- data.tar.gz: 50674e569cec9b25751ec22acd692a1986346b17a716a6d435c70c8cbee750cb2416249dd28d2db12b169188658d4728b42dfbf2e10bc3d93ecaf5acbaa90f17
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
@@ -21,5 +21,5 @@ Gem::Specification.new do |spec|
21
21
  spec.add_dependency "capistrano", "~> 3.1"
22
22
 
23
23
  spec.add_development_dependency "bundler", "~> 1.6"
24
- spec.add_development_dependency "rake"
24
+ spec.add_development_dependency "rake", "~> 10.2"
25
25
  end
@@ -1,5 +1,5 @@
1
1
  module Cap
2
2
  module Laravel
3
- VERSION = "0.0.6"
3
+ VERSION = "0.0.7"
4
4
  end
5
5
  end
@@ -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, "artisan migrate"
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, "artisan migrate:refresh"
20
+ execute :php, :artisan, "migrate:refresh"
21
21
  end
22
22
  end
23
23
  end
24
-
25
- desc "Seed the database"
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 release_path do
29
- execute :php, "artisan db:seed"
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.6
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-24 00:00:00.000000000 Z
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: '0'
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: '0'
54
+ version: '10.2'
55
55
  description: Capistrano tasks for deploying Laravel apps at Architect.
56
56
  email:
57
57
  - gbishop@wearearchitect.com