Skip to content

Instantly share code, notes, and snippets.

diff --git a/app/controllers/projects/merge_requests_controller.rb b/app/controllers/projects/merge_requests_controller.rb
index 51509ec..e4a472e 100644
--- a/app/controllers/projects/merge_requests_controller.rb
+++ b/app/controllers/projects/merge_requests_controller.rb
@@ -166,7 +166,11 @@ class Projects::MergeRequestsController < Projects::ApplicationController
end
def ci_status
- status = @merge_request.source_project.gitlab_ci_service.commit_status(merge_request.last_commit.sha)
+ if @merge_request.source_project.gitlab_ci?
for f in $(find $1 -iname "*.wsp"); do
if [ -a $f ];
then /opt/graphite/bin/whisper-set-aggregation-method.py $f max;
fi;
done
/*
Orginally by cginzel at the Sencha Forums
http://www.sencha.com/forum/member.php?20865-cginzel
I'm playing with NodeJS and Connect which has an JSONRPC provider and so I managed to coble this proxy and reader together that I was able to successfully use to retrieve data into a grid. But I'm moving onto building an Ext.Direct provider instead so it'll be easier to build out the GUI. But for posterity's sake, I thought I'd post this code here just in case anyone else might find it useful.
I don't intend to support it, so use it at your own risk!
@nexeck
nexeck / git_history.php
Created November 24, 2011 15:01 — forked from geeknam/git_history.php
Parse git log with PHP to an array
<?php
// Author: Ngo Minh Nam
$dir = "/path/to/your/repo/";
$output = array();
chdir($dir);
// Linux
exec("git log",$output);
// Windows
exec('"C:\Program Files (x86)\Git\bin\git.exe" ' ."log", $output);
@nexeck
nexeck / gist:1257411
Created October 2, 2011 12:38 — forked from daGrevis/gist:1257357
Route for mini-CMS
<?php
Route::set('cms', function($uri) {
$is_empty = empty($uri);
$does_exists = class_exists('Controller_' . $uri);
if ($is_empty || $does_exists) {
$default_route = Route::get('default');
@nexeck
nexeck / controller_ajax_template.php
Created August 4, 2011 08:46 — forked from smgladkovskiy/Controller_Ajax_Template.php
Ajax Template Controller for Kohana 3.1
<?php defined('SYSPATH') or die('No direct access allowed.');
/**
* Ajax Template Controller template
*
* @author Sergei Gladkovskiy <smgladkovskiy@gmail.com>
*/
abstract class Controller_Ajax_Template extends Controller {
protected $_auth_required = FALSE;
<?php
/**
* Attempt to wrap Http Authentication into a separate class...
*
* Ideas and some code from FuelPHP Controller_Rest
* https://github.com/fuel/fuel/blob/develop/fuel/core/classes/controller/rest.php
*
*/
<?php
/**
* Test controller extending Controller_Cambiata_REST
* Jonas Nyström - cambiata
*
* To be used with a route like this one:
*
* Route::set('rest', 'rest(/<par1>(/<par2>(/<par3>(/<par4>(/<par5>)))))(.<format>)')
* ->defaults(array(
@nexeck
nexeck / rest.php
Created March 22, 2011 08:36 — forked from cambiata/rest.php
<?php
/**
* Quickly assemled rest controller based on Kohana 3's Kohana_Controller_REST
* https://github.com/kohana/core/blob/3.1%2Fmaster/classes/kohana/controller/rest.php
*
* Added functionality from FuelPHP's Controller_Rest
* https://github.com/fuel/fuel/blob/develop/fuel/core/classes/controller/rest.php
*
* All credits to Kohana and FuelPHP teams!
* Jonas Nyström - cambiata
<?php defined('SYSPATH') or die('No direct script access.');
/**
* People API - Example Code
*
* @author icyleaf <icyleaf.cn@gmail.com>
* @link http://icyleaf.com
* @version 0.1
*/
class Controller_API_People extends Controller_REST {