Skip to content

Commit 09a5bb0

Browse files
author
Shawn McCool
committed
update vagrant-chef configuration
add database-backup dependency sort contributors by contribution count
1 parent 8b658d3 commit 09a5bb0

File tree

6 files changed

+274
-63
lines changed

6 files changed

+274
-63
lines changed

Vagrantfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,6 @@ end
5353
Vagrant::Config.run do |config|
5454
# permissions for the application's storage folder
5555
config.vm.provision :shell do |shell|
56-
shell.inline = "bash /vagrant/vagrant-chef/scripts/shell.sh"
56+
shell.inline = "sudo bash /vagrant/vagrant-chef/scripts/shell.sh"
5757
end
5858
end

app/Controllers/ContributorsController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public function __construct(ContributorRepository $contributors)
1414

1515
public function getIndex()
1616
{
17-
$contributors = $this->contributors->getAll();
17+
$contributors = $this->contributors->getAllByContributionsPaginated();
1818

1919
$this->view('contributors.index', compact('contributors'));
2020
}

app/domain/Lio/Contributors/ContributorRepository.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,9 @@ public function getByGitHubId($githubId)
1313
{
1414
return $this->model->where('github_id', '=', $githubId)->first();
1515
}
16+
17+
public function getAllByContributionsPaginated($perPage = 40)
18+
{
19+
return $this->model->orderBy('contributions_count', 'desc')->paginate($perPage);
20+
}
1621
}

composer.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
"artdarek/oauth-4-laravel": "dev-master",
77
"juy/profiler": "dev-master",
88
"mccool/laravel-auto-presenter": "dev-master",
9-
"mccool/laravel-slugs": "dev-master"
9+
"mccool/laravel-slugs": "dev-master",
10+
"mccool/database-backup": "dev-master"
1011
},
1112
"require-dev": {
1213
"fzaninotto/faker": "1.2.*@dev"
@@ -29,7 +30,7 @@
2930
"php artisan optimize"
3031
],
3132
"pre-update-cmd": [
32-
33+
3334
],
3435
"post-update-cmd": [
3536
"php artisan optimize"

0 commit comments

Comments
 (0)