Merge branch 'master' into emoji
This commit is contained in:
commit
8808c5fa8d
|
@ -1,11 +0,0 @@
|
||||||
$(document).ready(function(){
|
|
||||||
$('input#user_force_random_password').on('change', function(elem) {
|
|
||||||
var elems = $('#user_password, #user_password_confirmation');
|
|
||||||
|
|
||||||
if ($(this).attr('checked')) {
|
|
||||||
elems.val('').attr('disabled', true);
|
|
||||||
} else {
|
|
||||||
elems.removeAttr('disabled');
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
8
app/assets/javascripts/admin.js.coffee
Normal file
8
app/assets/javascripts/admin.js.coffee
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
$ ->
|
||||||
|
$('input#user_force_random_password').on 'change', (elem) ->
|
||||||
|
elems = $('#user_password, #user_password_confirmation')
|
||||||
|
|
||||||
|
if $(@).attr 'checked'
|
||||||
|
elems.val('').attr 'disabled', true
|
||||||
|
else
|
||||||
|
elems.removeAttr 'disabled'
|
|
@ -17,134 +17,3 @@
|
||||||
//= require raphael
|
//= require raphael
|
||||||
//= require branch-graph
|
//= require branch-graph
|
||||||
//= require_tree .
|
//= require_tree .
|
||||||
|
|
||||||
$(document).ready(function(){
|
|
||||||
|
|
||||||
$(".one_click_select").live("click", function(){
|
|
||||||
$(this).select();
|
|
||||||
});
|
|
||||||
|
|
||||||
$('body').on('ajax:complete, ajax:beforeSend, submit', 'form', function(e){
|
|
||||||
var buttons = $('[type="submit"]', this);
|
|
||||||
switch( e.type ){
|
|
||||||
case 'ajax:beforeSend':
|
|
||||||
case 'submit':
|
|
||||||
buttons.attr('disabled', 'disabled');
|
|
||||||
break;
|
|
||||||
case ' ajax:complete':
|
|
||||||
default:
|
|
||||||
buttons.removeAttr('disabled');
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
$(".account-box").mouseenter(showMenu);
|
|
||||||
$(".account-box").mouseleave(resetMenu);
|
|
||||||
|
|
||||||
$("#projects-list .project").live('click', function(e){
|
|
||||||
if(e.target.nodeName != "A" && e.target.nodeName != "INPUT") {
|
|
||||||
location.href = $(this).attr("url");
|
|
||||||
e.stopPropagation();
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Focus search field by pressing 's' key
|
|
||||||
*/
|
|
||||||
$(document).keypress(function(e) {
|
|
||||||
if( $(e.target).is(":input") ) return;
|
|
||||||
switch(e.which) {
|
|
||||||
case 115: focusSearch();
|
|
||||||
e.preventDefault();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Commit show suppressed diff
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
$(".supp_diff_link").bind("click", function() {
|
|
||||||
showDiff(this);
|
|
||||||
});
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Note markdown preview
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
$(document).on('click', '#preview-link', function(e) {
|
|
||||||
$('#preview-note').text('Loading...');
|
|
||||||
|
|
||||||
var previewLinkText = ($(this).text() == 'Preview' ? 'Edit' : 'Preview');
|
|
||||||
$(this).text(previewLinkText);
|
|
||||||
|
|
||||||
var note = $('#note_note').val();
|
|
||||||
if (note.trim().length === 0) { note = 'Nothing to preview'; }
|
|
||||||
$.post($(this).attr('href'), {note: note}, function(data) {
|
|
||||||
$('#preview-note').html(data);
|
|
||||||
});
|
|
||||||
|
|
||||||
$('#preview-note, #note_note').toggle();
|
|
||||||
e.preventDefault();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
function focusSearch() {
|
|
||||||
$("#search").focus();
|
|
||||||
}
|
|
||||||
|
|
||||||
function updatePage(data){
|
|
||||||
$.ajax({type: "GET", url: location.href, data: data, dataType: "script"});
|
|
||||||
}
|
|
||||||
|
|
||||||
function showMenu() {
|
|
||||||
$(this).toggleClass('hover');
|
|
||||||
}
|
|
||||||
|
|
||||||
function resetMenu() {
|
|
||||||
$(this).removeClass("hover");
|
|
||||||
}
|
|
||||||
|
|
||||||
function slugify(text) {
|
|
||||||
return text.replace(/[^-a-zA-Z0-9]+/g, '_').toLowerCase();
|
|
||||||
}
|
|
||||||
|
|
||||||
function showDiff(link) {
|
|
||||||
$(link).next('table').show();
|
|
||||||
$(link).remove();
|
|
||||||
}
|
|
||||||
|
|
||||||
(function($){
|
|
||||||
var _chosen = $.fn.chosen;
|
|
||||||
$.fn.extend({
|
|
||||||
chosen: function(options) {
|
|
||||||
var default_options = {'search_contains' : 'true'};
|
|
||||||
$.extend(default_options, options);
|
|
||||||
return _chosen.apply(this, [default_options]);
|
|
||||||
}})
|
|
||||||
})(jQuery);
|
|
||||||
|
|
||||||
|
|
||||||
function ajaxGet(url) {
|
|
||||||
$.ajax({type: "GET", url: url, dataType: "script"});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Disable button if text field is empty
|
|
||||||
*/
|
|
||||||
function disableButtonIfEmtpyField(field_selector, button_selector) {
|
|
||||||
field = $(field_selector);
|
|
||||||
if(field.val() == "") {
|
|
||||||
field.closest("form").find(button_selector).attr("disabled", "disabled").addClass("disabled");
|
|
||||||
}
|
|
||||||
|
|
||||||
field.on('keyup', function(){
|
|
||||||
var field = $(this);
|
|
||||||
var closest_submit = field.closest("form").find(button_selector);
|
|
||||||
if(field.val() == "") {
|
|
||||||
closest_submit.attr("disabled", "disabled").addClass("disabled");
|
|
||||||
} else {
|
|
||||||
closest_submit.removeAttr("disabled").removeClass("disabled");
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,10 +0,0 @@
|
||||||
function initGraphNav() {
|
|
||||||
$(".graph svg").css("position", "relative");
|
|
||||||
$("body").bind("keyup", function(e) {
|
|
||||||
if(e.keyCode == 37) { // left
|
|
||||||
$(".graph svg").animate({ left: "+=400" });
|
|
||||||
} else if(e.keyCode == 39) { // right
|
|
||||||
$(".graph svg").animate({ left: "-=400" });
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
10
app/assets/javascripts/graph.js.coffee
Normal file
10
app/assets/javascripts/graph.js.coffee
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
initGraphNav = ->
|
||||||
|
$('.graph svg').css 'position', 'relative'
|
||||||
|
|
||||||
|
$('body').bind 'keyup', (e) ->
|
||||||
|
if e.keyCode is 37 # left
|
||||||
|
$('.graph svg').animate left: '+=400'
|
||||||
|
else if e.keyCode is 39 # right
|
||||||
|
$('.graph svg').animate left: '-=400'
|
||||||
|
|
||||||
|
window.initGraphNav = initGraphNav
|
|
@ -1,11 +0,0 @@
|
||||||
var Loader = {
|
|
||||||
img_src: "/assets/ajax-loader.gif",
|
|
||||||
|
|
||||||
html:
|
|
||||||
function(width) {
|
|
||||||
img = $("<img>");
|
|
||||||
img.attr("width", width);
|
|
||||||
img.attr("src", this.img_src);
|
|
||||||
return img;
|
|
||||||
}
|
|
||||||
}
|
|
5
app/assets/javascripts/loader.js.coffee
Normal file
5
app/assets/javascripts/loader.js.coffee
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
Loader =
|
||||||
|
html: (width) ->
|
||||||
|
$('<img>').attr src: '/assets/ajax-loader.gif', width: width
|
||||||
|
|
||||||
|
window.Loader = Loader
|
130
app/assets/javascripts/main.js
Normal file
130
app/assets/javascripts/main.js
Normal file
|
@ -0,0 +1,130 @@
|
||||||
|
$(document).ready(function(){
|
||||||
|
|
||||||
|
$(".one_click_select").live("click", function(){
|
||||||
|
$(this).select();
|
||||||
|
});
|
||||||
|
|
||||||
|
$('body').on('ajax:complete, ajax:beforeSend, submit', 'form', function(e){
|
||||||
|
var buttons = $('[type="submit"]', this);
|
||||||
|
switch( e.type ){
|
||||||
|
case 'ajax:beforeSend':
|
||||||
|
case 'submit':
|
||||||
|
buttons.attr('disabled', 'disabled');
|
||||||
|
break;
|
||||||
|
case ' ajax:complete':
|
||||||
|
default:
|
||||||
|
buttons.removeAttr('disabled');
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
$(".account-box").mouseenter(showMenu);
|
||||||
|
$(".account-box").mouseleave(resetMenu);
|
||||||
|
|
||||||
|
$("#projects-list .project").live('click', function(e){
|
||||||
|
if(e.target.nodeName != "A" && e.target.nodeName != "INPUT") {
|
||||||
|
location.href = $(this).attr("url");
|
||||||
|
e.stopPropagation();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Focus search field by pressing 's' key
|
||||||
|
*/
|
||||||
|
$(document).keypress(function(e) {
|
||||||
|
if( $(e.target).is(":input") ) return;
|
||||||
|
switch(e.which) {
|
||||||
|
case 115: focusSearch();
|
||||||
|
e.preventDefault();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Commit show suppressed diff
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
$(".supp_diff_link").bind("click", function() {
|
||||||
|
showDiff(this);
|
||||||
|
});
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Note markdown preview
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
$(document).on('click', '#preview-link', function(e) {
|
||||||
|
$('#preview-note').text('Loading...');
|
||||||
|
|
||||||
|
var previewLinkText = ($(this).text() == 'Preview' ? 'Edit' : 'Preview');
|
||||||
|
$(this).text(previewLinkText);
|
||||||
|
|
||||||
|
var note = $('#note_note').val();
|
||||||
|
if (note.trim().length === 0) { note = 'Nothing to preview'; }
|
||||||
|
$.post($(this).attr('href'), {note: note}, function(data) {
|
||||||
|
$('#preview-note').html(data);
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#preview-note, #note_note').toggle();
|
||||||
|
e.preventDefault();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
function focusSearch() {
|
||||||
|
$("#search").focus();
|
||||||
|
}
|
||||||
|
|
||||||
|
function updatePage(data){
|
||||||
|
$.ajax({type: "GET", url: location.href, data: data, dataType: "script"});
|
||||||
|
}
|
||||||
|
|
||||||
|
function showMenu() {
|
||||||
|
$(this).toggleClass('hover');
|
||||||
|
}
|
||||||
|
|
||||||
|
function resetMenu() {
|
||||||
|
$(this).removeClass("hover");
|
||||||
|
}
|
||||||
|
|
||||||
|
function slugify(text) {
|
||||||
|
return text.replace(/[^-a-zA-Z0-9]+/g, '_').toLowerCase();
|
||||||
|
}
|
||||||
|
|
||||||
|
function showDiff(link) {
|
||||||
|
$(link).next('table').show();
|
||||||
|
$(link).remove();
|
||||||
|
}
|
||||||
|
|
||||||
|
(function($){
|
||||||
|
var _chosen = $.fn.chosen;
|
||||||
|
$.fn.extend({
|
||||||
|
chosen: function(options) {
|
||||||
|
var default_options = {'search_contains' : 'true'};
|
||||||
|
$.extend(default_options, options);
|
||||||
|
return _chosen.apply(this, [default_options]);
|
||||||
|
}})
|
||||||
|
})(jQuery);
|
||||||
|
|
||||||
|
|
||||||
|
function ajaxGet(url) {
|
||||||
|
$.ajax({type: "GET", url: url, dataType: "script"});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Disable button if text field is empty
|
||||||
|
*/
|
||||||
|
function disableButtonIfEmtpyField(field_selector, button_selector) {
|
||||||
|
field = $(field_selector);
|
||||||
|
if(field.val() == "") {
|
||||||
|
field.closest("form").find(button_selector).attr("disabled", "disabled").addClass("disabled");
|
||||||
|
}
|
||||||
|
|
||||||
|
field.on('keyup', function(){
|
||||||
|
var field = $(this);
|
||||||
|
var closest_submit = field.closest("form").find(button_selector);
|
||||||
|
if(field.val() == "") {
|
||||||
|
closest_submit.attr("disabled", "disabled").addClass("disabled");
|
||||||
|
} else {
|
||||||
|
closest_submit.removeAttr("disabled").removeClass("disabled");
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
|
@ -1,21 +1,20 @@
|
||||||
window.Projects = ->
|
window.Projects = ->
|
||||||
$("#project_name").live "change", ->
|
$('#project_name').on 'change', ->
|
||||||
slug = slugify($(this).val())
|
slug = slugify $(@).val()
|
||||||
$("#project_code").val(slug)
|
$('#project_code, #project_path').val slug
|
||||||
$("#project_path").val(slug)
|
|
||||||
|
|
||||||
$(".new_project, .edit_project").live "ajax:before", ->
|
$('.new_project, .edit_project').on 'ajax:before', ->
|
||||||
$(".project_new_holder, .project_edit_holder").hide()
|
$('.project_new_holder, .project_edit_holder').hide()
|
||||||
$(".save-project-loader").show()
|
$('.save-project-loader').show()
|
||||||
|
|
||||||
$("form #project_default_branch").chosen()
|
$('form #project_default_branch').chosen()
|
||||||
disableButtonIfEmtpyField "#project_name", ".project-submit"
|
disableButtonIfEmtpyField '#project_name', '.project-submit'
|
||||||
|
|
||||||
# Git clone panel switcher
|
# Git clone panel switcher
|
||||||
$ ->
|
$ ->
|
||||||
scope = $('.project_clone_holder')
|
scope = $ '.project_clone_holder'
|
||||||
if scope.length > 0
|
if scope.length > 0
|
||||||
$('a, button', scope).click ->
|
$('a, button', scope).click ->
|
||||||
$('a, button', scope).removeClass('active')
|
$('a, button', scope).removeClass 'active'
|
||||||
$(this).addClass('active')
|
$(@).addClass 'active'
|
||||||
$('#project_clone', scope).val($(this).data('clone'))
|
$('#project_clone', scope).val $(@).data 'clone'
|
||||||
|
|
|
@ -1,9 +0,0 @@
|
||||||
$(document).ready(function(){
|
|
||||||
$("#snippets-table .snippet").live('click', function(e){
|
|
||||||
if(e.target.nodeName != "A" && e.target.nodeName != "INPUT") {
|
|
||||||
location.href = $(this).attr("url");
|
|
||||||
e.stopPropagation();
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
6
app/assets/javascripts/snippets.js.coffee
Normal file
6
app/assets/javascripts/snippets.js.coffee
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
$ ->
|
||||||
|
$('#snippets-table .snippet').live 'click', (e) ->
|
||||||
|
if e.target.nodeName isnt 'A' and e.target.nodeName isnt 'INPUT'
|
||||||
|
location.href = $(@).attr 'url'
|
||||||
|
e.stopPropagation()
|
||||||
|
false
|
|
@ -1,8 +0,0 @@
|
||||||
function backToMembers(){
|
|
||||||
$("#new_team_member").hide("slide", { direction: "right" }, 150, function(){
|
|
||||||
$("#team-table").show("slide", { direction: "left" }, 150, function() {
|
|
||||||
$("#new_team_member").remove();
|
|
||||||
$(".add_new").show();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
|
@ -3,7 +3,7 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
.file_holder {
|
.file_holder {
|
||||||
border:1px solid #CCC;
|
border:1px solid #BBB;
|
||||||
margin-bottom:1em;
|
margin-bottom:1em;
|
||||||
@include solid_shade;
|
@include solid_shade;
|
||||||
|
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
@import "bootstrap";
|
@import "bootstrap";
|
||||||
@import "bootstrap-responsive";
|
@import "bootstrap-responsive";
|
||||||
|
|
||||||
/** GITLAB colors **/
|
/** GitLab colors **/
|
||||||
$link_color:#3A89A3;
|
$link_color:#3A89A3;
|
||||||
$blue_link: #2fa0bb;
|
$blue_link: #2fa0bb;
|
||||||
$style_color: #474d57;
|
$style_color: #474d57;
|
||||||
$hover: #fdf5d9;
|
$hover: #fdf5d9;
|
||||||
|
|
||||||
/** GITLAB Fonts **/
|
/** GitLab Fonts **/
|
||||||
@font-face { font-family: Korolev; src: url('korolev-medium-compressed.otf'); }
|
@font-face { font-family: Korolev; src: url('korolev-medium-compressed.otf'); }
|
||||||
|
|
||||||
/** MIXINS **/
|
/** MIXINS **/
|
||||||
|
@ -113,9 +113,9 @@ $hover: #fdf5d9;
|
||||||
@import "themes/ui_modern.scss";
|
@import "themes/ui_modern.scss";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gitlab bootstrap.
|
* GitLab bootstrap.
|
||||||
* Overrides some styles of twitter bootstrap.
|
* Overrides some styles of twitter bootstrap.
|
||||||
* Also give some common classes for gitlab app
|
* Also give some common classes for GitLab app
|
||||||
*/
|
*/
|
||||||
@import "gitlab_bootstrap/common.scss";
|
@import "gitlab_bootstrap/common.scss";
|
||||||
@import "gitlab_bootstrap/typography.scss";
|
@import "gitlab_bootstrap/typography.scss";
|
||||||
|
|
|
@ -22,7 +22,7 @@ header {
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
.app_logo {
|
.app_logo {
|
||||||
width:230px;
|
width:200px;
|
||||||
float:left;
|
float:left;
|
||||||
position:relative;
|
position:relative;
|
||||||
top:-5px;
|
top:-5px;
|
||||||
|
@ -31,7 +31,7 @@ header {
|
||||||
|
|
||||||
h1 {
|
h1 {
|
||||||
padding-top: 5px;
|
padding-top: 5px;
|
||||||
width:102px;
|
width:90px;
|
||||||
background: url('logo_dark.png') no-repeat 0px -3px;
|
background: url('logo_dark.png') no-repeat 0px -3px;
|
||||||
float:left;
|
float:left;
|
||||||
margin-left:5px;
|
margin-left:5px;
|
||||||
|
|
|
@ -55,7 +55,7 @@ ul.main_menu {
|
||||||
|
|
||||||
&.current {
|
&.current {
|
||||||
background-color:#D5D5D5;
|
background-color:#D5D5D5;
|
||||||
border-bottom: 2px solid $style_color;
|
border-bottom: 1px solid #AAA;
|
||||||
border-right: 1px solid #BBB;
|
border-right: 1px solid #BBB;
|
||||||
border-left: 1px solid #BBB;
|
border-left: 1px solid #BBB;
|
||||||
border-radius: 0 0 1px 1px;
|
border-radius: 0 0 1px 1px;
|
||||||
|
|
|
@ -64,19 +64,14 @@ class CommitsController < ApplicationController
|
||||||
@commit.to_patch,
|
@commit.to_patch,
|
||||||
type: "text/plain",
|
type: "text/plain",
|
||||||
disposition: 'attachment',
|
disposition: 'attachment',
|
||||||
filename: (@commit.id.to_s + ".patch")
|
filename: "#{@commit.id.patch}"
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
protected
|
protected
|
||||||
|
|
||||||
def load_refs
|
def load_refs
|
||||||
if params[:ref].blank?
|
@ref ||= params[:ref].presence || params[:branch].presence || params[:tag].presence
|
||||||
@branch = params[:branch].blank? ? nil : params[:branch]
|
@ref ||= @ref || @project.try(:default_branch) || 'master'
|
||||||
@tag = params[:tag].blank? ? nil : params[:tag]
|
|
||||||
@ref = @branch || @tag || @project.try(:default_branch) || 'master'
|
|
||||||
else
|
|
||||||
@ref = params[:ref]
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -111,18 +111,18 @@ class Notify < ActionMailer::Base
|
||||||
# Examples
|
# Examples
|
||||||
#
|
#
|
||||||
# >> subject('Lorem ipsum')
|
# >> subject('Lorem ipsum')
|
||||||
# => "gitlab | Lorem ipsum"
|
# => "GitLab | Lorem ipsum"
|
||||||
#
|
#
|
||||||
# # Automatically inserts Project name when @project is set
|
# # Automatically inserts Project name when @project is set
|
||||||
# >> @project = Project.last
|
# >> @project = Project.last
|
||||||
# => #<Project id: 1, name: "Ruby on Rails", path: "ruby_on_rails", ...>
|
# => #<Project id: 1, name: "Ruby on Rails", path: "ruby_on_rails", ...>
|
||||||
# >> subject('Lorem ipsum')
|
# >> subject('Lorem ipsum')
|
||||||
# => "gitlab | Lorem ipsum | Ruby on Rails"
|
# => "GitLab | Lorem ipsum | Ruby on Rails"
|
||||||
#
|
#
|
||||||
# # Accepts multiple arguments
|
# # Accepts multiple arguments
|
||||||
# >> subject('Lorem ipsum', 'Dolor sit amet')
|
# >> subject('Lorem ipsum', 'Dolor sit amet')
|
||||||
# => "gitlab | Lorem ipsum | Dolor sit amet"
|
# => "GitLab | Lorem ipsum | Dolor sit amet"
|
||||||
def subject(*extra)
|
def subject(*extra)
|
||||||
"gitlab | " << extra.join(' | ') << (@project ? " | #{@project.name}" : "")
|
"GitLab | " << extra.join(' | ') << (@project ? " | #{@project.name}" : "")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
%h1 Git Error
|
%h1 Git Error
|
||||||
%hr
|
%hr
|
||||||
%h2 Gitlab was unable to access your Gitolite system.
|
%h2 GitLab was unable to access your Gitolite system.
|
||||||
|
|
||||||
.git_error_tips
|
.git_error_tips
|
||||||
%h4 Tips for Administrator:
|
%h4 Tips for Administrator:
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
%h5= link_to "API", help_api_path
|
%h5= link_to "API", help_api_path
|
||||||
|
|
||||||
%li
|
%li
|
||||||
%h5= link_to "Gitlab Markdown", help_markdown_path
|
%h5= link_to "GitLab Markdown", help_markdown_path
|
||||||
|
|
||||||
%li
|
%li
|
||||||
%h5= link_to "SSH keys", help_ssh_path
|
%h5= link_to "SSH keys", help_ssh_path
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
%h3.page_title Gitlab Flavored Markdown
|
%h3.page_title GitLab Flavored Markdown
|
||||||
.back_link
|
.back_link
|
||||||
= link_to help_path do
|
= link_to help_path do
|
||||||
← to index
|
← to index
|
||||||
|
@ -7,7 +7,7 @@
|
||||||
.row
|
.row
|
||||||
.span8
|
.span8
|
||||||
%p
|
%p
|
||||||
For Gitlab we developed something we call "Gitlab Flavored Markdown" (GFM).
|
For GitLab we developed something we call "GitLab Flavored Markdown" (GFM).
|
||||||
It extends the standard Markdown in a few significant ways adds some useful functionality.
|
It extends the standard Markdown in a few significant ways adds some useful functionality.
|
||||||
|
|
||||||
%p You can use GFM in:
|
%p You can use GFM in:
|
||||||
|
@ -62,7 +62,7 @@
|
||||||
%p becomes
|
%p becomes
|
||||||
= markdown %Q{```ruby\nrequire 'redcarpet'\nmarkdown = Redcarpet.new("Hello World!")\nputs markdown.to_html\n```}
|
= markdown %Q{```ruby\nrequire 'redcarpet'\nmarkdown = Redcarpet.new("Hello World!")\nputs markdown.to_html\n```}
|
||||||
|
|
||||||
%h4 Special Gitlab references
|
%h4 Special GitLab references
|
||||||
|
|
||||||
%p
|
%p
|
||||||
GFM recognizes special references.
|
GFM recognizes special references.
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
%hr
|
%hr
|
||||||
|
|
||||||
%p.slead
|
%p.slead
|
||||||
SSH key allows you to establish a secure connection between your computer and Gitlab
|
SSH key allows you to establish a secure connection between your computer and GitLab
|
||||||
|
|
||||||
%p.slead
|
%p.slead
|
||||||
To generate a new SSH key just open your terminal and use code below.
|
To generate a new SSH key just open your terminal and use code below.
|
||||||
|
@ -17,7 +17,7 @@
|
||||||
\# Generating public/private rsa key pair...
|
\# Generating public/private rsa key pair...
|
||||||
|
|
||||||
%p.slead
|
%p.slead
|
||||||
Next just use code below to dump your public key and add to GITLAB SSH Keys
|
Next just use code below to dump your public key and add to GitLab SSH Keys
|
||||||
|
|
||||||
%pre.dark
|
%pre.dark
|
||||||
cat ~/.ssh/id_rsa.pub
|
cat ~/.ssh/id_rsa.pub
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
%hr
|
%hr
|
||||||
|
|
||||||
%p.slead
|
%p.slead
|
||||||
Your Gitlab instance can perform HTTP POST request on next event: create_project, delete_project, create_user, delete_user, change_team_member.
|
Your GitLab instance can perform HTTP POST request on next event: create_project, delete_project, create_user, delete_user, change_team_member.
|
||||||
%br
|
%br
|
||||||
System Hooks can be used for logging or change information in LDAP server.
|
System Hooks can be used for logging or change information in LDAP server.
|
||||||
%br
|
%br
|
||||||
|
|
|
@ -5,11 +5,11 @@
|
||||||
%hr
|
%hr
|
||||||
|
|
||||||
%p.slead
|
%p.slead
|
||||||
Every Gitlab project can trigger a web server whenever the repo is pushed to.
|
Every GitLab project can trigger a web server whenever the repo is pushed to.
|
||||||
%br
|
%br
|
||||||
Web Hooks can be used to update an external issue tracker, trigger CI builds, update a backup mirror, or even deploy to your production server.
|
Web Hooks can be used to update an external issue tracker, trigger CI builds, update a backup mirror, or even deploy to your production server.
|
||||||
%br
|
%br
|
||||||
GITLAB will send POST request with commits information on every push.
|
GitLab will send POST request with commits information on every push.
|
||||||
%h5 Hooks request example:
|
%h5 Hooks request example:
|
||||||
= render "hooks/data_ex"
|
= render "hooks/data_ex"
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
git commit -am "My feature is ready"
|
git commit -am "My feature is ready"
|
||||||
|
|
||||||
%li
|
%li
|
||||||
%p Push your branch to gitlabhq
|
%p Push your branch to GitLab
|
||||||
.bash
|
.bash
|
||||||
%pre.dark
|
%pre.dark
|
||||||
git push origin $feature_name
|
git push origin $feature_name
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
:timestamp => "2012-01-03T23:36:29+02:00",
|
:timestamp => "2012-01-03T23:36:29+02:00",
|
||||||
:url => "http://localhost/diaspora/commits/da1560886d...",
|
:url => "http://localhost/diaspora/commits/da1560886d...",
|
||||||
:author => {
|
:author => {
|
||||||
:name => "gitlab dev user",
|
:name => "GitLab dev user",
|
||||||
:email => "gitlabdev@dv6700.(none)"
|
:email => "gitlabdev@dv6700.(none)"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,7 +38,7 @@
|
||||||
= f.label :description, "Details"
|
= f.label :description, "Details"
|
||||||
.input
|
.input
|
||||||
= f.text_area :description, maxlength: 2000, class: "xxlarge", rows: 14
|
= f.text_area :description, maxlength: 2000, class: "xxlarge", rows: 14
|
||||||
%p.hint Issues are parsed with #{link_to "Gitlab Flavored Markdown", help_markdown_path, target: '_blank'}.
|
%p.hint Issues are parsed with #{link_to "GitLab Flavored Markdown", help_markdown_path, target: '_blank'}.
|
||||||
|
|
||||||
|
|
||||||
.actions
|
.actions
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
%hr
|
%hr
|
||||||
%p.slead
|
%p.slead
|
||||||
SSH key allows you to establish a secure connection between your computer and Gitlab
|
SSH key allows you to establish a secure connection between your computer and GitLab
|
||||||
|
|
||||||
|
|
||||||
%table#keys-table
|
%table#keys-table
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
%head
|
%head
|
||||||
%meta{content: "text/html; charset=utf-8", "http-equiv" => "Content-Type"}
|
%meta{content: "text/html; charset=utf-8", "http-equiv" => "Content-Type"}
|
||||||
%title
|
%title
|
||||||
gitlabhq
|
GitLab
|
||||||
:css
|
:css
|
||||||
.header h1 {color: #BBBBBB !important; font: bold 32px Helvetica, Arial, sans-serif; margin: 0; padding: 0; line-height: 40px;}
|
.header h1 {color: #BBBBBB !important; font: bold 32px Helvetica, Arial, sans-serif; margin: 0; padding: 0; line-height: 40px;}
|
||||||
.header p {color: #c6c6c6; font: normal 12px Helvetica, Arial, sans-serif; margin: 0; padding: 0; line-height: 18px;}
|
.header p {color: #c6c6c6; font: normal 12px Helvetica, Arial, sans-serif; margin: 0; padding: 0; line-height: 18px;}
|
||||||
|
@ -21,7 +21,7 @@
|
||||||
\
|
\
|
||||||
%td{align: "left", style: "padding: 18px 0 10px;", width: "580"}
|
%td{align: "left", style: "padding: 18px 0 10px;", width: "580"}
|
||||||
%h1{style: "color: #BBBBBB; font: normal 32px Helvetica, Arial, sans-serif; margin: 0; padding: 0; line-height: 40px;"}
|
%h1{style: "color: #BBBBBB; font: normal 32px Helvetica, Arial, sans-serif; margin: 0; padding: 0; line-height: 40px;"}
|
||||||
gitlab
|
GITLAB
|
||||||
- if @project
|
- if @project
|
||||||
| #{@project.name}
|
| #{@project.name}
|
||||||
%table{align: "center", bgcolor: "#fff", border: "0", cellpadding: "0", cellspacing: "0", style: "font-family: Helvetica, Arial, sans-serif; background: #fff;", width: "600"}
|
%table{align: "center", bgcolor: "#fff", border: "0", cellpadding: "0", cellspacing: "0", style: "font-family: Helvetica, Arial, sans-serif; background: #fff;", width: "600"}
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
= f.label :description, "Description", class: "control-label"
|
= f.label :description, "Description", class: "control-label"
|
||||||
.controls
|
.controls
|
||||||
= f.text_area :description, maxlength: 2000, class: "input-xlarge", rows: 10
|
= f.text_area :description, maxlength: 2000, class: "input-xlarge", rows: 10
|
||||||
%p.hint Milestones are parsed with #{link_to "Gitlab Flavored Markdown", help_markdown_path, target: '_blank'}.
|
%p.hint Milestones are parsed with #{link_to "GitLab Flavored Markdown", help_markdown_path, target: '_blank'}.
|
||||||
.span6
|
.span6
|
||||||
.control-group
|
.control-group
|
||||||
= f.label :due_date, "Due Date", class: "control-label"
|
= f.label :due_date, "Due Date", class: "control-label"
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
= f.text_area :note, size: 255, class: 'note-text'
|
= f.text_area :note, size: 255, class: 'note-text'
|
||||||
#preview-note.preview_note.hide
|
#preview-note.preview_note.hide
|
||||||
.hint
|
.hint
|
||||||
.right Comments are parsed with #{link_to "Gitlab Flavored Markdown", help_markdown_path, target: '_blank'}.
|
.right Comments are parsed with #{link_to "GitLab Flavored Markdown", help_markdown_path, target: '_blank'}.
|
||||||
.clearfix
|
.clearfix
|
||||||
|
|
||||||
.row.note_advanced_opts.hide
|
.row.note_advanced_opts.hide
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
%h2{style: "color:#646464; font-weight: bold; margin: 0; padding: 0; line-height: 26px; font-size: 18px; font-family: Helvetica, Arial, sans-serif; "}
|
%h2{style: "color:#646464; font-weight: bold; margin: 0; padding: 0; line-height: 26px; font-size: 18px; font-family: Helvetica, Arial, sans-serif; "}
|
||||||
Hi #{@user['name']}!
|
Hi #{@user['name']}!
|
||||||
%p{style: "color:#767676; font-weight: normal; margin: 0; padding: 0; line-height: 20px; font-size: 12px;font-family: Helvetica, Arial, sans-serif; "}
|
%p{style: "color:#767676; font-weight: normal; margin: 0; padding: 0; line-height: 20px; font-size: 12px;font-family: Helvetica, Arial, sans-serif; "}
|
||||||
Administrator created account for you. Now you are a member of company gitlab application.
|
Administrator created account for you. Now you are a member of company GitLab application.
|
||||||
%td{style: "font-size: 1px; line-height: 1px;", width: "21"}
|
%td{style: "font-size: 1px; line-height: 1px;", width: "21"}
|
||||||
%tr
|
%tr
|
||||||
%td{style: "font-size: 1px; line-height: 1px;", width: "21"}
|
%td{style: "font-size: 1px; line-height: 1px;", width: "21"}
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
.middle_box_content
|
.middle_box_content
|
||||||
.input
|
.input
|
||||||
%span.cgray
|
%span.cgray
|
||||||
Wiki content is parsed with #{link_to "Gitlab Flavored Markdown", help_markdown_path, target: '_blank'}.
|
Wiki content is parsed with #{link_to "GitLab Flavored Markdown", help_markdown_path, target: '_blank'}.
|
||||||
To link to a (new) page you can just type
|
To link to a (new) page you can just type
|
||||||
%code [Link Title](page-slug)
|
%code [Link Title](page-slug)
|
||||||
\.
|
\.
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# Gitlab API
|
# GitLab API
|
||||||
|
|
||||||
All API requests require authentication. You need to pass a `private_token` parameter to authenticate. You can find or reset your private token in your profile.
|
All API requests require authentication. You need to pass a `private_token` parameter to authenticate. You can find or reset your private token in your profile.
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@ If no, or an invalid, `private_token` is provided then an error message will be
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
API requests should be prefixed with `api` and the API version. The API version is equal to the Gitlab major version number, which is defined in `lib/api.rb`.
|
API requests should be prefixed with `api` and the API version. The API version is equal to the GitLab major version number, which is defined in `lib/api.rb`.
|
||||||
|
|
||||||
Example of a valid API request:
|
Example of a valid API request:
|
||||||
|
|
||||||
|
|
|
@ -167,7 +167,7 @@ and ensure you have followed all of the above steps carefully.
|
||||||
# Login to MySQL
|
# Login to MySQL
|
||||||
$ mysql -u root -p
|
$ mysql -u root -p
|
||||||
|
|
||||||
# Create the gitlabhq production database
|
# Create the GitLab production database
|
||||||
mysql> CREATE DATABASE IF NOT EXISTS `gitlabhq_production` DEFAULT CHARACTER SET `utf8` COLLATE `utf8_unicode_ci`;
|
mysql> CREATE DATABASE IF NOT EXISTS `gitlabhq_production` DEFAULT CHARACTER SET `utf8` COLLATE `utf8_unicode_ci`;
|
||||||
|
|
||||||
# Create the MySQL User change $password to a real password
|
# Create the MySQL User change $password to a real password
|
||||||
|
|
|
@ -36,3 +36,31 @@ Feature: Issues
|
||||||
Given I visit issue page "Release 0.4"
|
Given I visit issue page "Release 0.4"
|
||||||
And I leave a comment like "XML attached"
|
And I leave a comment like "XML attached"
|
||||||
Then I should see comment "XML attached"
|
Then I should see comment "XML attached"
|
||||||
|
|
||||||
|
@javascript
|
||||||
|
Scenario: I search issue
|
||||||
|
Given I fill in issue search with "Release"
|
||||||
|
Then I should see "Release 0.4" in issues
|
||||||
|
And I should not see "Release 0.3" in issues
|
||||||
|
|
||||||
|
@javascript
|
||||||
|
Scenario: I search issue that not exist
|
||||||
|
Given I fill in issue search with "Bug"
|
||||||
|
Then I should not see "Release 0.4" in issues
|
||||||
|
And I should not see "Release 0.3" in issues
|
||||||
|
|
||||||
|
|
||||||
|
@javascript
|
||||||
|
Scenario: I search all issues
|
||||||
|
Given I click link "All"
|
||||||
|
And I fill in issue search with "0.3"
|
||||||
|
Then I should see "Release 0.3" in issues
|
||||||
|
And I should not see "Release 0.4" in issues
|
||||||
|
|
||||||
|
@javascript
|
||||||
|
Scenario: I clear search
|
||||||
|
Given I click link "All"
|
||||||
|
And I fill in issue search with "Something"
|
||||||
|
And I fill in issue search with ""
|
||||||
|
Then I should see "Release 0.4" in issues
|
||||||
|
And I should see "Release 0.3" in issues
|
||||||
|
|
21
features/step_definitions/common_steps.rb
Normal file
21
features/step_definitions/common_steps.rb
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
include LoginHelpers
|
||||||
|
|
||||||
|
Given /^I signin as a user$/ do
|
||||||
|
login_as :user
|
||||||
|
end
|
||||||
|
|
||||||
|
When /^I click link "(.*?)"$/ do |link|
|
||||||
|
click_link link
|
||||||
|
end
|
||||||
|
|
||||||
|
When /^I click button "(.*?)"$/ do |button|
|
||||||
|
click_button button
|
||||||
|
end
|
||||||
|
|
||||||
|
When /^I fill in "(.*?)" with "(.*?)"$/ do |field, value|
|
||||||
|
fill_in field, :with => value
|
||||||
|
end
|
||||||
|
|
||||||
|
Given /^show me page$/ do
|
||||||
|
save_and_open_page
|
||||||
|
end
|
|
@ -1,7 +1,3 @@
|
||||||
Given /^I visit dashboard page$/ do
|
|
||||||
visit dashboard_path
|
|
||||||
end
|
|
||||||
|
|
||||||
Then /^I should see "(.*?)" link$/ do |arg1|
|
Then /^I should see "(.*?)" link$/ do |arg1|
|
||||||
page.should have_link(arg1)
|
page.should have_link(arg1)
|
||||||
end
|
end
|
||||||
|
@ -66,10 +62,6 @@ Given /^I search for "(.*?)"$/ do |arg1|
|
||||||
click_button "Search"
|
click_button "Search"
|
||||||
end
|
end
|
||||||
|
|
||||||
Given /^I visit dashboard issues page$/ do
|
|
||||||
visit dashboard_issues_path
|
|
||||||
end
|
|
||||||
|
|
||||||
Then /^I should see issues assigned to me$/ do
|
Then /^I should see issues assigned to me$/ do
|
||||||
issues = @user.issues
|
issues = @user.issues
|
||||||
issues.each do |issue|
|
issues.each do |issue|
|
||||||
|
@ -78,10 +70,6 @@ Then /^I should see issues assigned to me$/ do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
Given /^I visit dashboard merge requests page$/ do
|
|
||||||
visit dashboard_merge_requests_path
|
|
||||||
end
|
|
||||||
|
|
||||||
Then /^I should see my merge requests$/ do
|
Then /^I should see my merge requests$/ do
|
||||||
merge_requests = @user.merge_requests
|
merge_requests = @user.merge_requests
|
||||||
merge_requests.each do |mr|
|
merge_requests.each do |mr|
|
||||||
|
|
|
@ -1,17 +1,9 @@
|
||||||
Given /^I visit profile page$/ do
|
|
||||||
visit profile_path
|
|
||||||
end
|
|
||||||
|
|
||||||
Then /^I should see my profile info$/ do
|
Then /^I should see my profile info$/ do
|
||||||
page.should have_content "Profile"
|
page.should have_content "Profile"
|
||||||
page.should have_content @user.name
|
page.should have_content @user.name
|
||||||
page.should have_content @user.email
|
page.should have_content @user.email
|
||||||
end
|
end
|
||||||
|
|
||||||
Given /^I visit profile password page$/ do
|
|
||||||
visit profile_password_path
|
|
||||||
end
|
|
||||||
|
|
||||||
Then /^I change my password$/ do
|
Then /^I change my password$/ do
|
||||||
fill_in "user_password", :with => "222333"
|
fill_in "user_password", :with => "222333"
|
||||||
fill_in "user_password_confirmation", :with => "222333"
|
fill_in "user_password_confirmation", :with => "222333"
|
||||||
|
@ -22,10 +14,6 @@ Then /^I should be redirected to sign in page$/ do
|
||||||
current_path.should == new_user_session_path
|
current_path.should == new_user_session_path
|
||||||
end
|
end
|
||||||
|
|
||||||
Given /^I visit profile token page$/ do
|
|
||||||
visit profile_token_path
|
|
||||||
end
|
|
||||||
|
|
||||||
Then /^I reset my token$/ do
|
Then /^I reset my token$/ do
|
||||||
@old_token = @user.private_token
|
@old_token = @user.private_token
|
||||||
click_button "Reset"
|
click_button "Reset"
|
||||||
|
|
|
@ -1,17 +1,9 @@
|
||||||
Given /^I visit project source page$/ do
|
|
||||||
visit tree_project_ref_path(@project, @project.root_ref)
|
|
||||||
end
|
|
||||||
|
|
||||||
Then /^I should see files from repository$/ do
|
Then /^I should see files from repository$/ do
|
||||||
page.should have_content("app")
|
page.should have_content("app")
|
||||||
page.should have_content("History")
|
page.should have_content("History")
|
||||||
page.should have_content("Gemfile")
|
page.should have_content("Gemfile")
|
||||||
end
|
end
|
||||||
|
|
||||||
Given /^I visit project source page for "(.*?)"$/ do |arg1|
|
|
||||||
visit tree_project_ref_path(@project, arg1)
|
|
||||||
end
|
|
||||||
|
|
||||||
Then /^I should see files from repository for "(.*?)"$/ do |arg1|
|
Then /^I should see files from repository for "(.*?)"$/ do |arg1|
|
||||||
current_path.should == tree_project_ref_path(@project, arg1)
|
current_path.should == tree_project_ref_path(@project, arg1)
|
||||||
page.should have_content("app")
|
page.should have_content("app")
|
||||||
|
@ -31,10 +23,6 @@ Given /^I click on raw button$/ do
|
||||||
click_link "raw"
|
click_link "raw"
|
||||||
end
|
end
|
||||||
|
|
||||||
Given /^I visit blob file from repo$/ do
|
|
||||||
visit tree_project_ref_path(@project, ValidCommit::ID, :path => ValidCommit::BLOB_FILE_PATH)
|
|
||||||
end
|
|
||||||
|
|
||||||
Then /^I should see raw file content$/ do
|
Then /^I should see raw file content$/ do
|
||||||
page.source.should == ValidCommit::BLOB_FILE
|
page.source.should == ValidCommit::BLOB_FILE
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,7 +1,3 @@
|
||||||
Given /^I visit project commits page$/ do
|
|
||||||
visit project_commits_path(@project)
|
|
||||||
end
|
|
||||||
|
|
||||||
Then /^I see project commits$/ do
|
Then /^I see project commits$/ do
|
||||||
current_path.should == project_commits_path(@project)
|
current_path.should == project_commits_path(@project)
|
||||||
|
|
||||||
|
@ -23,19 +19,11 @@ Then /^I see commits atom feed$/ do
|
||||||
page.body.should have_selector("entry summary", :text => commit.description)
|
page.body.should have_selector("entry summary", :text => commit.description)
|
||||||
end
|
end
|
||||||
|
|
||||||
Given /^I click on commit link$/ do
|
|
||||||
visit project_commit_path(@project, ValidCommit::ID)
|
|
||||||
end
|
|
||||||
|
|
||||||
Then /^I see commit info$/ do
|
Then /^I see commit info$/ do
|
||||||
page.should have_content ValidCommit::MESSAGE
|
page.should have_content ValidCommit::MESSAGE
|
||||||
page.should have_content "Showing 1 changed file"
|
page.should have_content "Showing 1 changed file"
|
||||||
end
|
end
|
||||||
|
|
||||||
Given /^I visit compare refs page$/ do
|
|
||||||
visit compare_project_commits_path(@project)
|
|
||||||
end
|
|
||||||
|
|
||||||
Given /^I fill compare fields with refs$/ do
|
Given /^I fill compare fields with refs$/ do
|
||||||
fill_in "from", :with => "master"
|
fill_in "from", :with => "master"
|
||||||
fill_in "to", :with => "stable"
|
fill_in "to", :with => "stable"
|
||||||
|
@ -48,18 +36,6 @@ Given /^I see compared refs$/ do
|
||||||
page.should have_content "Showing 73 changed files"
|
page.should have_content "Showing 73 changed files"
|
||||||
end
|
end
|
||||||
|
|
||||||
Given /^I visit project branches page$/ do
|
|
||||||
visit branches_project_repository_path(@project)
|
|
||||||
end
|
|
||||||
|
|
||||||
Given /^I visit project commit page$/ do
|
|
||||||
visit project_commit_path(@project, ValidCommit::ID)
|
|
||||||
end
|
|
||||||
|
|
||||||
Given /^I visit project tags page$/ do
|
|
||||||
visit tags_project_repository_path(@project)
|
|
||||||
end
|
|
||||||
|
|
||||||
Then /^I should see "(.*?)" recent branches list$/ do |arg1|
|
Then /^I should see "(.*?)" recent branches list$/ do |arg1|
|
||||||
page.should have_content("Branches")
|
page.should have_content("Branches")
|
||||||
page.should have_content("master")
|
page.should have_content("master")
|
||||||
|
|
|
@ -8,10 +8,6 @@ Given /^project "(.*?)" have "(.*?)" closed issue$/ do |arg1, arg2|
|
||||||
Factory.create(:issue, :title => arg2, :project => project, :author => project.users.first, :closed => true)
|
Factory.create(:issue, :title => arg2, :project => project, :author => project.users.first, :closed => true)
|
||||||
end
|
end
|
||||||
|
|
||||||
Given /^I visit project "(.*?)" issues page$/ do |arg1|
|
|
||||||
visit project_issues_path(Project.find_by_name(arg1))
|
|
||||||
end
|
|
||||||
|
|
||||||
Given /^I should see "(.*?)" in issues$/ do |arg1|
|
Given /^I should see "(.*?)" in issues$/ do |arg1|
|
||||||
page.should have_content arg1
|
page.should have_content arg1
|
||||||
end
|
end
|
||||||
|
@ -27,11 +23,6 @@ Then /^I should see issue "(.*?)"$/ do |arg1|
|
||||||
page.should have_content issue.project.name
|
page.should have_content issue.project.name
|
||||||
end
|
end
|
||||||
|
|
||||||
Given /^I visit issue page "(.*?)"$/ do |arg1|
|
|
||||||
issue = Issue.find_by_title(arg1)
|
|
||||||
visit project_issue_path(issue.project, issue)
|
|
||||||
end
|
|
||||||
|
|
||||||
Given /^I submit new issue "(.*?)"$/ do |arg1|
|
Given /^I submit new issue "(.*?)"$/ do |arg1|
|
||||||
fill_in "issue_title", with: arg1
|
fill_in "issue_title", with: arg1
|
||||||
click_button "Submit new issue"
|
click_button "Submit new issue"
|
||||||
|
@ -55,3 +46,12 @@ Then /^I should see label "(.*?)"$/ do |arg1|
|
||||||
page.should have_content arg1
|
page.should have_content arg1
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Given /^I fill in issue search with "(.*?)"$/ do |arg1|
|
||||||
|
# Because fill_in, with: "" triggers nothing
|
||||||
|
# we need to trigger a keyup event
|
||||||
|
if arg1 == ''
|
||||||
|
page.execute_script("$('.issue_search').val('').keyup();");
|
||||||
|
end
|
||||||
|
fill_in 'issue_search', with: arg1
|
||||||
|
end
|
||||||
|
|
|
@ -8,10 +8,6 @@ Given /^project "(.*?)" have "(.*?)" closed merge request$/ do |arg1, arg2|
|
||||||
Factory.create(:merge_request, :title => arg2, :project => project, :author => project.users.first, :closed => true)
|
Factory.create(:merge_request, :title => arg2, :project => project, :author => project.users.first, :closed => true)
|
||||||
end
|
end
|
||||||
|
|
||||||
Given /^I visit project "(.*?)" merge requests page$/ do |arg1|
|
|
||||||
visit project_merge_requests_path(Project.find_by_name(arg1))
|
|
||||||
end
|
|
||||||
|
|
||||||
Then /^I should see "(.*?)" in merge requests$/ do |arg1|
|
Then /^I should see "(.*?)" in merge requests$/ do |arg1|
|
||||||
page.should have_content arg1
|
page.should have_content arg1
|
||||||
end
|
end
|
||||||
|
@ -34,11 +30,6 @@ Given /^I submit new merge request "(.*?)"$/ do |arg1|
|
||||||
click_button "Save"
|
click_button "Save"
|
||||||
end
|
end
|
||||||
|
|
||||||
Given /^I visit merge request page "(.*?)"$/ do |arg1|
|
|
||||||
mr = MergeRequest.find_by_title(arg1)
|
|
||||||
visit project_merge_request_path(mr.project, mr)
|
|
||||||
end
|
|
||||||
|
|
||||||
Then /^I should see closed merge request "(.*?)"$/ do |arg1|
|
Then /^I should see closed merge request "(.*?)"$/ do |arg1|
|
||||||
mr = MergeRequest.find_by_title(arg1)
|
mr = MergeRequest.find_by_title(arg1)
|
||||||
mr.closed.should be_true
|
mr.closed.should be_true
|
||||||
|
|
|
@ -12,11 +12,6 @@ Given /^project "(.*?)" has milestone "(.*?)"$/ do |arg1, arg2|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
Given /^I visit project "(.*?)" milestones page$/ do |arg1|
|
|
||||||
@project = Project.find_by_name(arg1)
|
|
||||||
visit project_milestones_path(@project)
|
|
||||||
end
|
|
||||||
|
|
||||||
Then /^I should see active milestones$/ do
|
Then /^I should see active milestones$/ do
|
||||||
milestone = @project.milestones.first
|
milestone = @project.milestones.first
|
||||||
page.should have_content(milestone.title[0..10])
|
page.should have_content(milestone.title[0..10])
|
||||||
|
|
|
@ -8,10 +8,6 @@ Given /^"(.*?)" is "(.*?)" developer$/ do |arg1, arg2|
|
||||||
project.add_access(user, :write)
|
project.add_access(user, :write)
|
||||||
end
|
end
|
||||||
|
|
||||||
Given /^I visit project "(.*?)" team page$/ do |arg1|
|
|
||||||
visit team_project_path(Project.find_by_name(arg1))
|
|
||||||
end
|
|
||||||
|
|
||||||
Then /^I should be able to see myself in team$/ do
|
Then /^I should be able to see myself in team$/ do
|
||||||
page.should have_content(@user.name)
|
page.should have_content(@user.name)
|
||||||
page.should have_content(@user.email)
|
page.should have_content(@user.email)
|
||||||
|
@ -23,10 +19,6 @@ Then /^I should see "(.*?)" in team list$/ do |arg1|
|
||||||
page.should have_content(user.email)
|
page.should have_content(user.email)
|
||||||
end
|
end
|
||||||
|
|
||||||
Given /^I click link "(.*?)"$/ do |arg1|
|
|
||||||
click_link arg1
|
|
||||||
end
|
|
||||||
|
|
||||||
Given /^I select "(.*?)" as "(.*?)"$/ do |arg1, arg2|
|
Given /^I select "(.*?)" as "(.*?)"$/ do |arg1, arg2|
|
||||||
user = User.find_by_name(arg1)
|
user = User.find_by_name(arg1)
|
||||||
within "#new_team_member" do
|
within "#new_team_member" do
|
||||||
|
|
|
@ -1,7 +1,3 @@
|
||||||
Given /^I visit project wiki page$/ do
|
|
||||||
visit project_wiki_path(@project, :index)
|
|
||||||
end
|
|
||||||
|
|
||||||
Given /^I create Wiki page$/ do
|
Given /^I create Wiki page$/ do
|
||||||
fill_in "Title", :with => 'Test title'
|
fill_in "Title", :with => 'Test title'
|
||||||
fill_in "Content", :with => '[link test](test)'
|
fill_in "Content", :with => '[link test](test)'
|
||||||
|
|
|
@ -1,9 +1,3 @@
|
||||||
include LoginHelpers
|
|
||||||
|
|
||||||
Given /^I signin as a user$/ do
|
|
||||||
login_as :user
|
|
||||||
end
|
|
||||||
|
|
||||||
When /^I visit new project page$/ do
|
When /^I visit new project page$/ do
|
||||||
visit new_project_path
|
visit new_project_path
|
||||||
end
|
end
|
||||||
|
@ -65,10 +59,6 @@ Given /^I visit project "(.*?)" network page$/ do |arg1|
|
||||||
visit graph_project_path(project)
|
visit graph_project_path(project)
|
||||||
end
|
end
|
||||||
|
|
||||||
Given /^show me page$/ do
|
|
||||||
save_and_open_page
|
|
||||||
end
|
|
||||||
|
|
||||||
Given /^page should have network graph$/ do
|
Given /^page should have network graph$/ do
|
||||||
page.should have_content "Project Network Graph"
|
page.should have_content "Project Network Graph"
|
||||||
within ".graph" do
|
within ".graph" do
|
||||||
|
|
91
features/step_definitions/visit_steps.rb
Normal file
91
features/step_definitions/visit_steps.rb
Normal file
|
@ -0,0 +1,91 @@
|
||||||
|
Given /^I visit project "(.*?)" issues page$/ do |arg1|
|
||||||
|
visit project_issues_path(Project.find_by_name(arg1))
|
||||||
|
end
|
||||||
|
|
||||||
|
Given /^I visit issue page "(.*?)"$/ do |arg1|
|
||||||
|
issue = Issue.find_by_title(arg1)
|
||||||
|
visit project_issue_path(issue.project, issue)
|
||||||
|
end
|
||||||
|
|
||||||
|
Given /^I visit project "(.*?)" merge requests page$/ do |arg1|
|
||||||
|
visit project_merge_requests_path(Project.find_by_name(arg1))
|
||||||
|
end
|
||||||
|
|
||||||
|
Given /^I visit merge request page "(.*?)"$/ do |arg1|
|
||||||
|
mr = MergeRequest.find_by_title(arg1)
|
||||||
|
visit project_merge_request_path(mr.project, mr)
|
||||||
|
end
|
||||||
|
|
||||||
|
Given /^I visit project "(.*?)" milestones page$/ do |arg1|
|
||||||
|
@project = Project.find_by_name(arg1)
|
||||||
|
visit project_milestones_path(@project)
|
||||||
|
end
|
||||||
|
|
||||||
|
Given /^I visit project commits page$/ do
|
||||||
|
visit project_commits_path(@project)
|
||||||
|
end
|
||||||
|
|
||||||
|
Given /^I visit compare refs page$/ do
|
||||||
|
visit compare_project_commits_path(@project)
|
||||||
|
end
|
||||||
|
|
||||||
|
Given /^I visit project branches page$/ do
|
||||||
|
visit branches_project_repository_path(@project)
|
||||||
|
end
|
||||||
|
|
||||||
|
Given /^I visit project commit page$/ do
|
||||||
|
visit project_commit_path(@project, ValidCommit::ID)
|
||||||
|
end
|
||||||
|
|
||||||
|
Given /^I visit project tags page$/ do
|
||||||
|
visit tags_project_repository_path(@project)
|
||||||
|
end
|
||||||
|
|
||||||
|
Given /^I click on commit link$/ do
|
||||||
|
visit project_commit_path(@project, ValidCommit::ID)
|
||||||
|
end
|
||||||
|
|
||||||
|
Given /^I visit project source page$/ do
|
||||||
|
visit tree_project_ref_path(@project, @project.root_ref)
|
||||||
|
end
|
||||||
|
|
||||||
|
Given /^I visit project source page for "(.*?)"$/ do |arg1|
|
||||||
|
visit tree_project_ref_path(@project, arg1)
|
||||||
|
end
|
||||||
|
|
||||||
|
Given /^I visit blob file from repo$/ do
|
||||||
|
visit tree_project_ref_path(@project, ValidCommit::ID, :path => ValidCommit::BLOB_FILE_PATH)
|
||||||
|
end
|
||||||
|
|
||||||
|
Given /^I visit project "(.*?)" team page$/ do |arg1|
|
||||||
|
visit team_project_path(Project.find_by_name(arg1))
|
||||||
|
end
|
||||||
|
|
||||||
|
Given /^I visit project wiki page$/ do
|
||||||
|
visit project_wiki_path(@project, :index)
|
||||||
|
end
|
||||||
|
|
||||||
|
Given /^I visit profile page$/ do
|
||||||
|
visit profile_path
|
||||||
|
end
|
||||||
|
|
||||||
|
Given /^I visit profile token page$/ do
|
||||||
|
visit profile_token_path
|
||||||
|
end
|
||||||
|
|
||||||
|
Given /^I visit profile password page$/ do
|
||||||
|
visit profile_password_path
|
||||||
|
end
|
||||||
|
|
||||||
|
Given /^I visit dashboard page$/ do
|
||||||
|
visit dashboard_path
|
||||||
|
end
|
||||||
|
|
||||||
|
Given /^I visit dashboard issues page$/ do
|
||||||
|
visit dashboard_issues_path
|
||||||
|
end
|
||||||
|
|
||||||
|
Given /^I visit dashboard merge requests page$/ do
|
||||||
|
visit dashboard_merge_requests_path
|
||||||
|
end
|
||||||
|
|
|
@ -170,7 +170,7 @@ module Gitlab
|
||||||
def push
|
def push
|
||||||
Dir.chdir(File.join(@local_dir, "gitolite"))
|
Dir.chdir(File.join(@local_dir, "gitolite"))
|
||||||
`git add -A`
|
`git add -A`
|
||||||
`git commit -am "Gitlab"`
|
`git commit -am "GitLab"`
|
||||||
`git push`
|
`git push`
|
||||||
Dir.chdir(Rails.root)
|
Dir.chdir(Rails.root)
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
module Gitlab
|
module Gitlab
|
||||||
# Custom parser for Gitlab-flavored Markdown
|
# Custom parser for GitLab-flavored Markdown
|
||||||
#
|
#
|
||||||
# It replaces references in the text with links to the appropriate items in
|
# It replaces references in the text with links to the appropriate items in
|
||||||
# Gitlab.
|
# GitLab.
|
||||||
#
|
#
|
||||||
# Supported reference formats are:
|
# Supported reference formats are:
|
||||||
# * @foo for team members
|
# * @foo for team members
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
# This file was placed here by Gitlab. It makes sure that your pushed commits
|
# This file was placed here by GitLab. It makes sure that your pushed commits
|
||||||
# will be processed properly.
|
# will be processed properly.
|
||||||
|
|
||||||
while read oldrev newrev ref
|
while read oldrev newrev ref
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
namespace :gitlab do
|
namespace :gitlab do
|
||||||
namespace :gitolite do
|
namespace :gitolite do
|
||||||
desc "GITLAB | Write GITLAB hook for gitolite"
|
desc "GITLAB | Write GitLab hook for gitolite"
|
||||||
task :write_hooks => :environment do
|
task :write_hooks => :environment do
|
||||||
gitolite_hooks_path = File.join(Gitlab.config.git_hooks_path, "common")
|
gitolite_hooks_path = File.join(Gitlab.config.git_hooks_path, "common")
|
||||||
gitlab_hooks_path = Rails.root.join("lib", "hooks")
|
gitlab_hooks_path = Rails.root.join("lib", "hooks")
|
||||||
|
|
|
@ -1,91 +1,9 @@
|
||||||
require 'spec_helper'
|
require 'spec_helper'
|
||||||
|
|
||||||
describe "Factories" do
|
FactoryGirl.factories.map(&:name).each do |factory_name|
|
||||||
describe 'User' do
|
describe "#{factory_name} factory" do
|
||||||
it "builds a valid instance" do
|
it 'should be valid' do
|
||||||
build(:user).should be_valid
|
build(factory_name).should be_valid
|
||||||
end
|
|
||||||
|
|
||||||
it "builds a valid admin instance" do
|
|
||||||
build(:admin).should be_valid
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
describe 'Project' do
|
|
||||||
it "builds a valid instance" do
|
|
||||||
build(:project).should be_valid
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
describe 'Issue' do
|
|
||||||
it "builds a valid instance" do
|
|
||||||
build(:issue).should be_valid
|
|
||||||
end
|
|
||||||
|
|
||||||
it "builds a valid closed instance" do
|
|
||||||
build(:closed_issue).should be_valid
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
describe 'MergeRequest' do
|
|
||||||
it "builds a valid instance" do
|
|
||||||
build(:merge_request).should be_valid
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
describe 'Note' do
|
|
||||||
it "builds a valid instance" do
|
|
||||||
build(:note).should be_valid
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
describe 'Event' do
|
|
||||||
it "builds a valid instance" do
|
|
||||||
build(:event).should be_valid
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
describe 'Key' do
|
|
||||||
it "builds a valid instance" do
|
|
||||||
build(:key).should be_valid
|
|
||||||
end
|
|
||||||
|
|
||||||
it "builds a valid deploy key instance" do
|
|
||||||
build(:deploy_key).should be_valid
|
|
||||||
end
|
|
||||||
|
|
||||||
it "builds a valid personal key instance" do
|
|
||||||
build(:personal_key).should be_valid
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
describe 'Milestone' do
|
|
||||||
it "builds a valid instance" do
|
|
||||||
build(:milestone).should be_valid
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
describe 'SystemHook' do
|
|
||||||
it "builds a valid instance" do
|
|
||||||
build(:system_hook).should be_valid
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
describe 'ProjectHook' do
|
|
||||||
it "builds a valid instance" do
|
|
||||||
build(:project_hook).should be_valid
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
describe 'Wiki' do
|
|
||||||
it "builds a valid instance" do
|
|
||||||
build(:wiki).should be_valid
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
describe 'Snippet' do
|
|
||||||
it "builds a valid instance" do
|
|
||||||
build(:snippet).should be_valid
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -24,7 +24,7 @@ describe Notify do
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'has the correct subject' do
|
it 'has the correct subject' do
|
||||||
should have_subject /^gitlab \| Account was created for you$/
|
should have_subject /^gitlab \| Account was created for you$/i
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'contains the new user\'s login name' do
|
it 'contains the new user\'s login name' do
|
||||||
|
|
Loading…
Reference in a new issue