Browse Source

Build process updates

master
Timothy Warren 3 years ago
parent
commit
0e42b583aa
5 changed files with 9 additions and 49 deletions
  1. 1
    1
      README.md
  2. 4
    8
      application/libraries/Todo.php
  3. 0
    6
      application/models/task_model.php
  4. 4
    4
      build.xml
  5. 0
    30
      phpci.yml

+ 1
- 1
README.md View File

@@ -1,5 +1,5 @@
# Tim's Todo
[![Build Status](https://travis-ci.org/timw4mail/tims-todo.svg?branch=master)](https://travis-ci.org/timw4mail/tims-todo)
[![Build Status](https://jenkins.timshomepage.net/buildStatus/icon?job=todo)](https://jenkins.timshomepage.net/job/todo/)
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/timw4mail/tims-todo/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/timw4mail/tims-todo/?branch=master)
[![Code Coverage](https://scrutinizer-ci.com/g/timw4mail/tims-todo/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/timw4mail/tims-todo/?branch=master)

+ 4
- 8
application/libraries/Todo.php View File

@@ -175,8 +175,6 @@ class Todo {
//Get the current user's primary group
$group_id = $this->get_user_group();

//print_r($group_id);

$this->CI->db->set('title', $title)
->set('description', $desc)
->set('group_id', $group_id);
@@ -191,8 +189,6 @@ class Todo {
show_error('This category already exists!');
return false;
}


}

// --------------------------------------------------------------------------
@@ -322,14 +318,14 @@ class Todo {
->from('user')
->where('id', $user)
->get();
$row = $user_check->row();
if ( ! password_verify($old_pass, $row->password))
{
$err[] = "Wrong password";
}
$res = (empty($err)) ? true : $err;

if($res == TRUE)
@@ -789,7 +785,7 @@ class Todo {
public function get_friend_requests()
{
static $requests = NULL;
if (is_null($requests))
{
//Get friend requests for the current user

+ 0
- 6
application/models/task_model.php View File

@@ -531,12 +531,6 @@ class Task_model extends CI_Model {
$status = ($this->input->post('status') == FALSE) ? 1 : $this->input->post('status');
$created = time();

/*$title = $this->title;
$desc = $this->description;
$category = $this->category;
$priority = $this->priority;
$status = $this->status;
$created = $this->created;*/
$due = $this->due;
$uid = $this->user_id;


+ 4
- 4
build.xml View File

@@ -7,7 +7,7 @@
<property name="phploc" value="phploc"/>
<property name="phpmd" value="phpmd"/>
<property name="phpunit" value="phpunit"/>
<property name="sonar" value="sonar-runner"/>
<!-- <property name="sonar" value="sonar-runner"/> -->

<!-- Use this when the tools are located as PHARs in build/tools
<property name="pdepend" value="build/tools/pdepend.phar"/>
@@ -28,7 +28,7 @@
<property name="phpunit" value="vendor/bin/phpunit"/> -->

<target name="full-build"
depends="prepare,static-analysis,phpunit,sonar,-check-failure"
depends="prepare,static-analysis,phpunit,-check-failure"
description="Performs static analysis, runs the tests, and generates project documentation"/>

<target name="full-build-parallel"
@@ -249,11 +249,11 @@
<property name="phpunit.done" value="true"/>
</target>

<target name="sonar"
<!-- <target name="sonar"
depends="phpunit">
<exec executable="${sonar}" taskname="sonar"/>
<property name="sonar.done" value="true"/>
</target>
</target> -->

<target name="-check-failure">
<fail message="PHPUnit did not finish successfully">

+ 0
- 30
phpci.yml View File

@@ -1,30 +0,0 @@
build_settings:
verbose: true
ignore:
- "application/third_party"
- "web"
- "system"
- "third_party"
- "tests"
- "vendor"
- "migrations"

setup:
composer:
action: "install"
env:
APPLICATION_ENV: "development"
# shell:
# - "cd %BUILD_PATH% && vendor/bin/phinx migrate -e testing"

test:
php_unit:
config: 'tests/phpunit.xml'
run_from: 'tests'
php_mess_detector:
allowed_warnings: 10
rules:
- "unusedcode"
- "naming"
# php_docblock_checker:
# php_loc:

Loading…
Cancel
Save