Skip to content

Commit

Permalink
Merge branch 'master' into release
Browse files Browse the repository at this point in the history
* master:
  Update dependencies
  Ensure all integers are cast correctly, fixes #160
  Updated build script
  Cleanup
  Added DB server to migration
  Add composer auth to the vagrant provision
  Fixed migraiton
  • Loading branch information
REBELinBLUE committed Jan 31, 2016
2 parents 65b1e1d + 78f1fa6 commit 92eba10
Show file tree
Hide file tree
Showing 22 changed files with 141 additions and 54 deletions.
1 change: 1 addition & 0 deletions Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ Vagrant.configure("2") do |config|
end

config.vm.provision "file", source: "~/.gitconfig", destination: "~/.gitconfig"
config.vm.provision "file", source: "~/.composer/auth.json", destination: "~/.composer/auth.json"

# Copy deployer supervisor and cron config
config.vm.provision "shell", inline: "sudo apt-get install ruby ruby-dev -y"
Expand Down
5 changes: 4 additions & 1 deletion app/CheckUrl.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,10 @@ class CheckUrl extends Model
* @var array
*/
protected $casts = [
'is_report' => 'boolean',
'id' => 'integer',
'project_id' => 'integer',
'is_report' => 'boolean',
'period' => 'integer',
];

/**
Expand Down
3 changes: 3 additions & 0 deletions app/Command.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,12 @@ class Command extends Model
* @var array
*/
protected $casts = [
'id' => 'integer',
'project_id' => 'integer',
'step' => 'integer',
'optional' => 'boolean',
'default_on' => 'boolean',
'order' => 'integer',
];

/**
Expand Down
8 changes: 2 additions & 6 deletions app/Console/Commands/CheckUrl.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,8 @@ public function handle()
return true;
}

$command = $this;

CheckUrlModel::whereIn('period', $period)->chunk(self::URLS_TO_CHECK, function ($urls) use ($command) {

$command->dispatch(new RequestProjectCheckUrl($urls));

CheckUrlModel::whereIn('period', $period)->chunk(self::URLS_TO_CHECK, function ($urls) {
$this->dispatch(new RequestProjectCheckUrl($urls));
});
}
}
7 changes: 5 additions & 2 deletions app/DeployStep.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,11 @@ class DeployStep extends Model implements PresentableInterface
* @var array
*/
protected $casts = [
'stage' => 'integer',
'optional' => 'boolean',
'id' => 'integer',
'command_id' => 'integer',
'deployment_id' => 'integer',
'stage' => 'integer',
'optional' => 'boolean',
];

/**
Expand Down
5 changes: 4 additions & 1 deletion app/Deployment.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class Deployment extends Model implements PresentableInterface, RuntimeInterface
* @var array
*/
protected $appends = ['project_name', 'deployer_name', 'commit_url',
'short_commit', 'branch_url', 'repo_failure',];
'short_commit', 'branch_url', 'repo_failure', ];

/**
* The fields which should be tried as Carbon instances.
Expand All @@ -65,6 +65,9 @@ class Deployment extends Model implements PresentableInterface, RuntimeInterface
* @var array
*/
protected $casts = [
'id' => 'integer',
'project_id' => 'integer',
'user_id' => 'integer',
'status' => 'integer',
'is_webhook' => 'boolean',
];
Expand Down
9 changes: 9 additions & 0 deletions app/Group.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,15 @@ class Group extends Model
*/
protected $hidden = ['created_at', 'deleted_at', 'updated_at'];

/**
* The attributes that should be casted to native types.
*
* @var array
*/
protected $casts = [
'id' => 'integer',
];

/**
* Additional attributes to include in the JSON representation.
*
Expand Down
4 changes: 4 additions & 0 deletions app/Heartbeat.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ class Heartbeat extends Model
* @var array
*/
protected $casts = [
'id' => 'integer',
'project_id' => 'integer',
'missed' => 'integer',
'interval' => 'integer',
'status' => 'integer',
'deploy_code' => 'boolean',
];
Expand Down
2 changes: 2 additions & 0 deletions app/Notification.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ class Notification extends Model
* @var array
*/
protected $casts = [
'id' => 'integer',
'project_id' => 'integer',
'failure_only' => 'boolean',
];

Expand Down
10 changes: 10 additions & 0 deletions app/NotifyEmail.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,16 @@ class NotifyEmail extends Model
*/
protected $hidden = ['created_at', 'updated_at', 'deleted_at'];

/**
* The attributes that should be casted to native types.
*
* @var array
*/
protected $casts = [
'id' => 'integer',
'project_id' => 'integer',
];

/**
* Belongs to relationship.
*
Expand Down
2 changes: 2 additions & 0 deletions app/Project.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ class Project extends ProjectRelation implements PresentableInterface
* @var array
*/
protected $casts = [
'id' => 'integer',
'group_id' => 'integer',
'status' => 'integer',
'builds_to_keep' => 'integer',
'is_template' => 'boolean',
Expand Down
10 changes: 10 additions & 0 deletions app/ProjectFile.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,16 @@ class ProjectFile extends Model
*/
protected $hidden = ['created_at', 'updated_at', 'deleted_at'];

/**
* The attributes that should be casted to native types.
*
* @var array
*/
protected $casts = [
'id' => 'integer',
'project_id' => 'integer',
];

/**
* Belongs to relationship.
*
Expand Down
3 changes: 3 additions & 0 deletions app/Server.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,11 @@ class Server extends Model
* @var array
*/
protected $casts = [
'id' => 'integer',
'project_id' => 'integer',
'status' => 'integer',
'deploy_code' => 'boolean',
'port' => 'integer',
];

/**
Expand Down
5 changes: 4 additions & 1 deletion app/ServerLog.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,10 @@ class ServerLog extends Model implements PresentableInterface, RuntimeInterface
* @var array
*/
protected $casts = [
'status' => 'integer',
'id' => 'integer',
'server_id' => 'integer',
'deploy_step_id' => 'integer',
'status' => 'integer',
];

/**
Expand Down
10 changes: 10 additions & 0 deletions app/SharedFile.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,16 @@ class SharedFile extends Model
*/
protected $hidden = ['created_at', 'updated_at', 'deleted_at'];

/**
* The attributes that should be casted to native types.
*
* @var array
*/
protected $casts = [
'id' => 'integer',
'project_id' => 'integer',
];

/**
* Belongs to relationship.
*
Expand Down
2 changes: 2 additions & 0 deletions app/Template.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ class Template extends Model implements PresentableInterface
* @var array
*/
protected $casts = [
'id' => 'integer',
'group_id' => 'integer',
'is_template' => 'boolean',
];

Expand Down
9 changes: 9 additions & 0 deletions app/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,15 @@ class User extends Model implements
*/
protected $appends = ['has_two_factor_authentication'];

/**
* The attributes that should be casted to native types.
*
* @var array
*/
protected $casts = [
'id' => 'integer',
];

/**
* Generate a change email token.
*
Expand Down
10 changes: 10 additions & 0 deletions app/Variable.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,16 @@ class Variable extends Model
*/
protected $hidden = ['created_at', 'updated_at', 'deleted_at'];

/**
* The attributes that should be casted to native types.
*
* @var array
*/
protected $casts = [
'id' => 'integer',
'project_id' => 'integer',
];

/**
* Belongs to relationship.
*
Expand Down
50 changes: 25 additions & 25 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions create-release
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ git commit -am "Building new release"
git push

git checkout master
git branch -d release

# TODO: Increase dev version? May need to prompt
gulp
Expand Down
Loading

0 comments on commit 92eba10

Please sign in to comment.