Browse Source

Build process updates

Timothy J. Warren 2 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 @@
1 1
 # Tim's Todo
2 2
 
3
-[![Build Status](https://travis-ci.org/timw4mail/tims-todo.svg?branch=master)](https://travis-ci.org/timw4mail/tims-todo)
3
+[![Build Status](https://jenkins.timshomepage.net/buildStatus/icon?job=todo)](https://jenkins.timshomepage.net/job/todo/)
4 4
 [![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)
5 5
 [![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 {
175 175
 			//Get the current user's primary group
176 176
 			$group_id = $this->get_user_group();
177 177
 
178
-			//print_r($group_id);
179
-
180 178
 			$this->CI->db->set('title', $title)
181 179
 				->set('description', $desc)
182 180
 				->set('group_id', $group_id);
@@ -191,8 +189,6 @@ class Todo {
191 189
 			show_error('This category already exists!');
192 190
 			return false;
193 191
 		}
194
-
195
-
196 192
 	}
197 193
 
198 194
 	// --------------------------------------------------------------------------
@@ -322,14 +318,14 @@ class Todo {
322 318
 				->from('user')
323 319
 				->where('id', $user)
324 320
 				->get();
325
-		
321
+
326 322
 		$row = $user_check->row();
327
-		
323
+
328 324
 		if ( ! password_verify($old_pass, $row->password))
329 325
 		{
330 326
 			$err[] = "Wrong password";
331 327
 		}
332
-			
328
+
333 329
 		$res = (empty($err)) ? true : $err;
334 330
 
335 331
 		if($res == TRUE)
@@ -789,7 +785,7 @@ class Todo {
789 785
 	public function get_friend_requests()
790 786
 	{
791 787
 		static $requests = NULL;
792
-		
788
+
793 789
 		if (is_null($requests))
794 790
 		{
795 791
 			//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 {
531 531
 		$status = ($this->input->post('status') == FALSE) ? 1 : $this->input->post('status');
532 532
 		$created = time();
533 533
 
534
-		/*$title = $this->title;
535
-		$desc = $this->description;
536
-		$category = $this->category;
537
-		$priority = $this->priority;
538
-		$status = $this->status;
539
-		$created = $this->created;*/
540 534
 		$due = $this->due;
541 535
 		$uid = $this->user_id;
542 536
 

+ 4
- 4
build.xml View File

@@ -7,7 +7,7 @@
7 7
  <property name="phploc"  value="phploc"/>
8 8
  <property name="phpmd"   value="phpmd"/>
9 9
  <property name="phpunit" value="phpunit"/>
10
- <property name="sonar" value="sonar-runner"/>
10
+ <!-- <property name="sonar" value="sonar-runner"/> -->
11 11
 
12 12
  <!-- Use this when the tools are located as PHARs in build/tools
13 13
  <property name="pdepend" value="build/tools/pdepend.phar"/>
@@ -28,7 +28,7 @@
28 28
  <property name="phpunit" value="vendor/bin/phpunit"/> -->
29 29
 
30 30
  <target name="full-build"
31
-         depends="prepare,static-analysis,phpunit,sonar,-check-failure"
31
+         depends="prepare,static-analysis,phpunit,-check-failure"
32 32
          description="Performs static analysis, runs the tests, and generates project documentation"/>
33 33
 
34 34
  <target name="full-build-parallel"
@@ -249,11 +249,11 @@
249 249
   <property name="phpunit.done" value="true"/>
250 250
  </target>
251 251
 
252
-<target name="sonar"
252
+<!-- <target name="sonar"
253 253
 		depends="phpunit">
254 254
 	<exec executable="${sonar}" taskname="sonar"/>
255 255
 	<property name="sonar.done" value="true"/>
256
-</target>
256
+</target> -->
257 257
 
258 258
  <target name="-check-failure">
259 259
   <fail message="PHPUnit did not finish successfully">

+ 0
- 30
phpci.yml View File

@@ -1,30 +0,0 @@
1
-build_settings:
2
-  verbose: true
3
-  ignore:
4
-    - "application/third_party"
5
-    - "web"
6
-    - "system"
7
-    - "third_party"
8
-    - "tests"
9
-    - "vendor"
10
-    - "migrations"
11
-
12
-setup:
13
-  composer:
14
-    action: "install"
15
-  env:
16
-    APPLICATION_ENV: "development"
17
-#  shell:
18
-#    - "cd %BUILD_PATH% && vendor/bin/phinx migrate -e testing"
19
-
20
-test:
21
-  php_unit:
22
-    config: 'tests/phpunit.xml'
23
-    run_from: 'tests'
24
-  php_mess_detector:
25
-    allowed_warnings: 10
26
-    rules:
27
-      - "unusedcode"
28
-      - "naming"
29
-#  php_docblock_checker:
30
-#  php_loc: