`, and ``.
-// $font-family-monospace: Menlo, Monaco, Consolas, "Courier New", monospace
-// $font-family-base: $font-family-sans-serif
-
-$font-size-base: $gl-font-size;
-// $font-size-large: ceil(($font-size-base * 1.25)) // ~18px
-// $font-size-small: ceil(($font-size-base * 0.85)) // ~12px
-
-// $font-size-h1: floor(($font-size-base * 2.6)) // ~36px
-// $font-size-h2: floor(($font-size-base * 2.15)) // ~30px
-// $font-size-h3: ceil(($font-size-base * 1.7)) // ~24px
-// $font-size-h4: ceil(($font-size-base * 1.25)) // ~18px
-// $font-size-h5: $font-size-base
-// $font-size-h6: ceil(($font-size-base * 0.85)) // ~12px
-
-//** Unit-less `line-height` for use in components like buttons.
-// $line-height-base: 1.428571429 // 20/14
-//** Computed "line-height" (`font-size` * `line-height`) for use with `margin`, `padding`, etc.
-// $line-height-computed: floor(($font-size-base * $line-height-base)) // ~20px
-
-//** By default, this inherits from the ``.
-// $headings-font-family: inherit
-// $headings-font-weight: 500
-// $headings-line-height: 1.1
-// $headings-color: inherit
-
-
-//== Iconography
-//
-//## Specify custom location and filename of the included Glyphicons icon font. Useful for those including Bootstrap via Bower.
-
-//** Load fonts from this directory.
-
-// [converter] If $bootstrap-sass-asset-helper if used, provide path relative to the assets load path.
-// [converter] This is because some asset helpers, such as Sprockets, do not work with file-relative paths.
-// $icon-font-path: if($bootstrap-sass-asset-helper, "bootstrap/", "../fonts/bootstrap/")
-
-//** File name for all font files.
-// $icon-font-name: "glyphicons-halflings-regular"
-//** Element ID within SVG icon file.
-// $icon-font-svg-id: "glyphicons_halflingsregular"
+$font-family-sans-serif: $regular_font;
+$font-family-monospace: $monospace_font;
+$font-size-base: $gl-font-size;
//== Components
@@ -102,348 +45,15 @@ $font-size-base: $gl-font-size;
$padding-base-vertical: 6px;
$padding-base-horizontal: 14px;
-// $padding-large-vertical: 10px
-// $padding-large-horizontal: 16px
-
-// $padding-small-vertical: 5px
-// $padding-small-horizontal: 10px
-
-// $padding-xs-vertical: 1px
-// $padding-xs-horizontal: 5px
-
-// $line-height-large: 1.3333333 // extra decimals for Win 8.1 Chrome
-// $line-height-small: 1.5
-
-// $border-radius-base: 4px
-// $border-radius-large: 6px
-// $border-radius-small: 3px
-
-//** Global color for active items (e.g., navs or dropdowns).
-// $component-active-color: #fff
-//** Global background color for active items (e.g., navs or dropdowns).
-// $component-active-bg: $brand-primary
-
-//** Width of the `border` for generating carets that indicator dropdowns.
-// $caret-width-base: 4px
-//** Carets increase slightly in size for larger components.
-// $caret-width-large: 5px
-
-
-//== Tables
-//
-//## Customizes the `.table` component with basic values, each used across all table variations.
-
-//** Padding for ``s and ` `s.
-// $table-cell-padding: 8px
-//** Padding for cells in `.table-condensed`.
-// $table-condensed-cell-padding: 5px
-
-//** Default background color used for all tables.
-// $table-bg: transparent
-//** Background color used for `.table-striped`.
-// $table-bg-accent: #f9f9f9
-//** Background color used for `.table-hover`.
-// $table-bg-hover: #f5f5f5
-// $table-bg-active: $table-bg-hover
-
-//** Border color for table and cell borders.
-// $table-border-color: #ddd
-
-
-//== Buttons
-//
-//## For each of Bootstrap's buttons, define text, background and border color.
-
-// $btn-font-weight: normal
-
-// $btn-default-color: #333
-// $btn-default-bg: #fff
-// $btn-default-border: #ccc
-
-// $btn-primary-color: #fff
-// $btn-primary-bg: $brand-primary
-// $btn-primary-border: darken($btn-primary-bg, 5%)
-
-// $btn-success-color: #fff
-// $btn-success-bg: $brand-success
-// $btn-success-border: darken($btn-success-bg, 5%)
-
-// $btn-info-color: #fff
-// $btn-info-bg: $brand-info
-// $btn-info-border: darken($btn-info-bg, 5%)
-
-// $btn-warning-color: #fff
-// $btn-warning-bg: $brand-warning
-// $btn-warning-border: darken($btn-warning-bg, 5%)
-
-// $btn-danger-color: #fff
-// $btn-danger-bg: $brand-danger
-// $btn-danger-border: darken($btn-danger-bg, 5%)
-
-// $btn-link-disabled-color: $gray-light
-
//== Forms
//
//##
-//** ` ` background color
-// $input-bg: #fff
-//** ` ` background color
-// $input-bg-disabled: $gray-lighter
-
-//** Text color for ` `s
$input-color: $text-color;
-//** ` ` border color
-$input-border: #dce4ec;
-
-// TODO: Rename `$input-border-radius` to `$input-border-radius-base` in v4
-//** Default `.form-control` border radius
-// This has no effect on ``s in some browsers, due to the limited stylability of ``s in CSS.
-// $input-border-radius: $border-radius-base
-//** Large `.form-control` border radius
-// $input-border-radius-large: $border-radius-large
-//** Small `.form-control` border radius
-// $input-border-radius-small: $border-radius-small
-
-//** Border color for inputs on focus
+$input-border: #DDD;
$input-border-focus: $brand-info;
-
-//** Placeholder text color
-// $input-color-placeholder: #999
-
-//** Default `.form-control` height
-// $input-height-base: ($line-height-computed + ($padding-base-vertical * 2) + 2)
-//** Large `.form-control` height
-// $input-height-large: (ceil($font-size-large * $line-height-large) + ($padding-large-vertical * 2) + 2)
-//** Small `.form-control` height
-// $input-height-small: (floor($font-size-small * $line-height-small) + ($padding-small-vertical * 2) + 2)
-
$legend-color: $text-color;
-// $legend-border-color: #e5e5e5
-
-//** Background color for textual input addons
-// $input-group-addon-bg: $gray-lighter
-//** Border color for textual input addons
-// $input-group-addon-border-color: $input-border
-
-//** Disabled cursor for form controls and buttons.
-// $cursor-disabled: not-allowed
-
-
-//== Dropdowns
-//
-//## Dropdown menu container and contents.
-
-//** Background for the dropdown menu.
-// $dropdown-bg: #fff
-//** Dropdown menu `border-color`.
-// $dropdown-border: rgba(0,0,0,.15)
-//** Dropdown menu `border-color` **for IE8**.
-// $dropdown-fallback-border: #ccc
-//** Divider color for between dropdown items.
-// $dropdown-divider-bg: #e5e5e5
-
-//** Dropdown link text color.
-// $dropdown-link-color: $gray-dark
-//** Hover color for dropdown links.
-// $dropdown-link-hover-color: darken($gray-dark, 5%)
-//** Hover background for dropdown links.
-// $dropdown-link-hover-bg: #f5f5f5
-
-//** Active dropdown menu item text color.
-// $dropdown-link-active-color: $component-active-color
-//** Active dropdown menu item background color.
-// $dropdown-link-active-bg: $component-active-bg
-
-//** Disabled dropdown menu item background color.
-// $dropdown-link-disabled-color: $gray-light
-
-//** Text color for headers within dropdown menus.
-// $dropdown-header-color: $gray-light
-
-//** Deprecated `$dropdown-caret-color` as of v3.1.0
-// $dropdown-caret-color: #000
-
-
-//-- Z-index master list
-//
-// Warning: Avoid customizing these values. They're used for a bird's eye view
-// of components dependent on the z-axis and are designed to all work together.
-//
-// Note: These variables are not generated into the Customizer.
-
-// $zindex-navbar: 1000
-// $zindex-dropdown: 1000
-// $zindex-popover: 1060
-// $zindex-tooltip: 1070
-// $zindex-navbar-fixed: 1030
-// $zindex-modal: 1040
-
-
-//== Media queries breakpoints
-//
-//## Define the breakpoints at which your layout will change, adapting to different screen sizes.
-
-// Extra small screen / phone
-//** Deprecated `$screen-xs` as of v3.0.1
-// $screen-xs: 480px
-//** Deprecated `$screen-xs-min` as of v3.2.0
-// $screen-xs-min: $screen-xs
-//** Deprecated `$screen-phone` as of v3.0.1
-// $screen-phone: $screen-xs-min
-
-// Small screen / tablet
-//** Deprecated `$screen-sm` as of v3.0.1
-// $screen-sm: 768px
-// $screen-sm-min: $screen-sm
-//** Deprecated `$screen-tablet` as of v3.0.1
-// $screen-tablet: $screen-sm-min
-
-// Medium screen / desktop
-//** Deprecated `$screen-md` as of v3.0.1
-// $screen-md: 992px
-// $screen-md-min: $screen-md
-//** Deprecated `$screen-desktop` as of v3.0.1
-// $screen-desktop: $screen-md-min
-
-// Large screen / wide desktop
-//** Deprecated `$screen-lg` as of v3.0.1
-// $screen-lg: 1200px
-// $screen-lg-min: $screen-lg
-//** Deprecated `$screen-lg-desktop` as of v3.0.1
-// $screen-lg-desktop: $screen-lg-min
-
-// So media queries don't overlap when required, provide a maximum
-// $screen-xs-max: ($screen-sm-min - 1)
-// $screen-sm-max: ($screen-md-min - 1)
-// $screen-md-max: ($screen-lg-min - 1)
-
-
-//== Grid system
-//
-//## Define your custom responsive grid.
-
-//** Number of columns in the grid.
-// $grid-columns: 12
-//** Padding between columns. Gets divided in half for the left and right.
-// $grid-gutter-width: 30px
-// Navbar collapse
-//** Point at which the navbar becomes uncollapsed.
-// $grid-float-breakpoint: $screen-sm-min
-//** Point at which the navbar begins collapsing.
-// $grid-float-breakpoint-max: ($grid-float-breakpoint - 1)
-
-
-//== Container sizes
-//
-//## Define the maximum width of `.container` for different screen sizes.
-
-// Small screen / tablet
-// $container-tablet: (720px + $grid-gutter-width)
-//** For `$screen-sm-min` and up.
-// $container-sm: $container-tablet
-
-// Medium screen / desktop
-// $container-desktop: (940px + $grid-gutter-width)
-//** For `$screen-md-min` and up.
-// $container-md: $container-desktop
-
-// Large screen / wide desktop
-// $container-large-desktop: (1140px + $grid-gutter-width)
-//** For `$screen-lg-min` and up.
-// $container-lg: $container-large-desktop
-
-
-//== Navbar
-//
-//##
-
-// Basics of a navbar
-// $navbar-height: 50px
-// $navbar-margin-bottom: $line-height-computed
-// $navbar-border-radius: $border-radius-base
-// $navbar-padding-horizontal: floor(($grid-gutter-width / 2))
-// $navbar-padding-vertical: (($navbar-height - $line-height-computed) / 2)
-// $navbar-collapse-max-height: 340px
-
-// $navbar-default-color: #777
-// $navbar-default-bg: #f8f8f8
-// $navbar-default-border: darken($navbar-default-bg, 6.5%)
-
-// Navbar links
-// $navbar-default-link-color: #777
-// $navbar-default-link-hover-color: #333
-// $navbar-default-link-hover-bg: transparent
-// $navbar-default-link-active-color: #555
-// $navbar-default-link-active-bg: darken($navbar-default-bg, 6.5%)
-// $navbar-default-link-disabled-color: #ccc
-// $navbar-default-link-disabled-bg: transparent
-
-// Navbar brand label
-// $navbar-default-brand-color: $navbar-default-link-color
-// $navbar-default-brand-hover-color: darken($navbar-default-brand-color, 10%)
-// $navbar-default-brand-hover-bg: transparent
-
-// Navbar toggle
-// $navbar-default-toggle-hover-bg: #ddd
-// $navbar-default-toggle-icon-bar-bg: #888
-// $navbar-default-toggle-border-color: #ddd
-
-
-// Inverted navbar
-// Reset inverted navbar basics
-// $navbar-inverse-color: lighten($gray-light, 15%)
-// $navbar-inverse-bg: #222
-// $navbar-inverse-border: darken($navbar-inverse-bg, 10%)
-
-// Inverted navbar links
-// $navbar-inverse-link-color: lighten($gray-light, 15%)
-// $navbar-inverse-link-hover-color: #fff
-// $navbar-inverse-link-hover-bg: transparent
-// $navbar-inverse-link-active-color: $navbar-inverse-link-hover-color
-// $navbar-inverse-link-active-bg: darken($navbar-inverse-bg, 10%)
-// $navbar-inverse-link-disabled-color: #444
-// $navbar-inverse-link-disabled-bg: transparent
-
-// Inverted navbar brand label
-// $navbar-inverse-brand-color: $navbar-inverse-link-color
-// $navbar-inverse-brand-hover-color: #fff
-// $navbar-inverse-brand-hover-bg: transparent
-
-// Inverted navbar toggle
-// $navbar-inverse-toggle-hover-bg: #333
-// $navbar-inverse-toggle-icon-bar-bg: #fff
-// $navbar-inverse-toggle-border-color: #333
-
-
-//== Navs
-//
-//##
-
-//=== Shared nav styles
-// $nav-link-padding: 10px 15px
-// $nav-link-hover-bg: $gray-lighter
-
-// $nav-disabled-link-color: $gray-light
-// $nav-disabled-link-hover-color: $gray-light
-
-//== Tabs
-// $nav-tabs-border-color: #ddd
-
-// $nav-tabs-link-hover-border-color: $gray-lighter
-
-// $nav-tabs-active-link-hover-bg: $body-bg
-// $nav-tabs-active-link-hover-color: $gray
-// $nav-tabs-active-link-hover-border-color: #ddd
-
-// $nav-tabs-justified-link-border-color: #ddd
-// $nav-tabs-justified-active-link-border-color: $body-bg
-
-//== Pills
-// $nav-pills-border-radius: $border-radius-base
-// $nav-pills-active-link-hover-bg: $component-active-bg
-// $nav-pills-active-link-hover-color: $component-active-color
//== Pagination
@@ -467,38 +77,10 @@ $pagination-disabled-bg: lighten($brand-success, 15%);
$pagination-disabled-border: transparent;
-//== Pager
-//
-//##
-
-// $pager-bg: $pagination-bg
-// $pager-border: $pagination-border
-// $pager-border-radius: 15px
-
-// $pager-hover-bg: $pagination-hover-bg
-
-// $pager-active-bg: $pagination-active-bg
-// $pager-active-color: $pagination-active-color
-
-// $pager-disabled-color: $pagination-disabled-color
-
-
-//== Jumbotron
-//
-//##
-
-// $jumbotron-padding: 30px
-// $jumbotron-color: inherit
-// $jumbotron-bg: $gray-lighter
-// $jumbotron-heading-color: inherit
-// $jumbotron-font-size: ceil(($font-size-base * 1.5))
-
-
//== Form states and alerts
//
//## Define colors for form feedback states and, by default, alerts.
-
$state-success-text: #fff;
$state-success-bg: $brand-success;
$state-success-border: $brand-success;
@@ -516,316 +98,22 @@ $state-danger-bg: $brand-danger;
$state-danger-border: $brand-danger;
-//== Tooltips
-//
-//##
-
-//** Tooltip max width
-// $tooltip-max-width: 200px
-//** Tooltip text color
-// $tooltip-color: #fff
-//** Tooltip background color
-// $tooltip-bg: #000
-// $tooltip-opacity: .9
-
-//** Tooltip arrow width
-// $tooltip-arrow-width: 5px
-//** Tooltip arrow color
-// $tooltip-arrow-color: $tooltip-bg
-
-
-//== Popovers
-//
-//##
-
-//** Popover body background color
-// $popover-bg: #fff
-//** Popover maximum width
-// $popover-max-width: 276px
-//** Popover border color
-// $popover-border-color: rgba(0,0,0,.2)
-//** Popover fallback border color
-// $popover-fallback-border-color: #ccc
-
-//** Popover title background color
-// $popover-title-bg: darken($popover-bg, 3%)
-
-//** Popover arrow width
-// $popover-arrow-width: 10px
-//** Popover arrow color
-// $popover-arrow-color: $popover-bg
-
-//** Popover outer arrow width
-// $popover-arrow-outer-width: ($popover-arrow-width + 1)
-//** Popover outer arrow color
-// $popover-arrow-outer-color: fade_in($popover-border-color, 0.05)
-//** Popover outer arrow fallback color
-// $popover-arrow-outer-fallback-color: darken($popover-fallback-border-color, 20%)
-
-
-//== Labels
-//
-//##
-
-//** Default label background color
-// $label-default-bg: $gray-light
-//** Primary label background color
-// $label-primary-bg: $brand-primary
-//** Success label background color
-// $label-success-bg: $brand-success
-//** Info label background color
-// $label-info-bg: $brand-info
-//** Warning label background color
-// $label-warning-bg: $brand-warning
-//** Danger label background color
-// $label-danger-bg: $brand-danger
-
-//** Default label text color
-// $label-color: #fff
-//** Default text color of a linked label
-// $label-link-hover-color: #fff
-
-
-//== Modals
-//
-//##
-
-//** Padding applied to the modal body
-// $modal-inner-padding: 15px
-
-//** Padding applied to the modal title
-// $modal-title-padding: 15px
-//** Modal title line-height
-// $modal-title-line-height: $line-height-base
-
-//** Background color of modal content area
-// $modal-content-bg: #fff
-//** Modal content border color
-// $modal-content-border-color: rgba(0,0,0,.2)
-//** Modal content border color **for IE8**
-// $modal-content-fallback-border-color: #999
-
-//** Modal backdrop background color
-// $modal-backdrop-bg: #000
-//** Modal backdrop opacity
-// $modal-backdrop-opacity: .5
-//** Modal header border color
-// $modal-header-border-color: #e5e5e5
-//** Modal footer border color
-// $modal-footer-border-color: $modal-header-border-color
-
-// $modal-lg: 900px
-// $modal-md: 600px
-// $modal-sm: 300px
-
-
//== Alerts
//
//## Define alert colors, border radius, and padding.
-// $alert-padding: 15px
$alert-border-radius: 0;
-// $alert-link-font-weight: bold
-
-// $alert-success-bg: $state-success-bg
-// $alert-success-text: $state-success-text
-// $alert-success-border: $state-success-border
-
-// $alert-info-bg: $state-info-bg
-// $alert-info-text: $state-info-text
-// $alert-info-border: $state-info-border
-
-// $alert-warning-bg: $state-warning-bg
-// $alert-warning-text: $state-warning-text
-// $alert-warning-border: $state-warning-border
-
-// $alert-danger-bg: $state-danger-bg
-// $alert-danger-text: $state-danger-text
-// $alert-danger-border: $state-danger-border
-
-
-//== Progress bars
-//
-//##
-
-//** Background color of the whole progress component
-// $progress-bg: #f5f5f5
-//** Progress bar text color
-// $progress-bar-color: #fff
-//** Variable for setting rounded corners on progress bar.
-// $progress-border-radius: $border-radius-base
-
-//** Default progress bar color
-// $progress-bar-bg: $brand-primary
-//** Success progress bar color
-// $progress-bar-success-bg: $brand-success
-//** Warning progress bar color
-// $progress-bar-warning-bg: $brand-warning
-//** Danger progress bar color
-// $progress-bar-danger-bg: $brand-danger
-//** Info progress bar color
-// $progress-bar-info-bg: $brand-info
-
-
-//== List group
-//
-//##
-
-//** Background color on `.list-group-item`
-// $list-group-bg: #fff
-//** `.list-group-item` border color
-// $list-group-border: #ddd
-//** List group border radius
-// $list-group-border-radius: $border-radius-base
-
-//** Background color of single list items on hover
-// $list-group-hover-bg: #f5f5f5
-//** Text color of active list items
-// $list-group-active-color: $component-active-color
-//** Background color of active list items
-// $list-group-active-bg: $component-active-bg
-//** Border color of active list elements
-// $list-group-active-border: $list-group-active-bg
-//** Text color for content within active list items
-// $list-group-active-text-color: lighten($list-group-active-bg, 40%)
-
-//** Text color of disabled list items
-// $list-group-disabled-color: $gray-light
-//** Background color of disabled list items
-// $list-group-disabled-bg: $gray-lighter
-//** Text color for content within disabled list items
-// $list-group-disabled-text-color: $list-group-disabled-color
-
-// $list-group-link-color: #555
-// $list-group-link-hover-color: $list-group-link-color
-// $list-group-link-heading-color: #333
//== Panels
//
//##
-// $panel-bg: #fff
-// $panel-body-padding: 15px
-// $panel-heading-padding: 10px 15px
-// $panel-footer-padding: $panel-heading-padding
$panel-border-radius: 0;
-
-//** Border color for elements within panels
-// $panel-inner-border: #ddd
-// $panel-footer-bg: #f5f5f5
-
$panel-default-text: $text-color;
$panel-default-border: $border-color;
$panel-default-heading-bg: $background-color;
-// $panel-primary-text: #fff
-// $panel-primary-border: $brand-primary
-// $panel-primary-heading-bg: $brand-primary
-
-// $panel-success-text: $state-success-text
-// $panel-success-border: $state-success-border
-// $panel-success-heading-bg: $state-success-bg
-
-// $panel-info-text: $state-info-text
-// $panel-info-border: $state-info-border
-// $panel-info-heading-bg: $state-info-bg
-
-// $panel-warning-text: $state-warning-text
-// $panel-warning-border: $state-warning-border
-// $panel-warning-heading-bg: $state-warning-bg
-
-// $panel-danger-text: $state-danger-text
-// $panel-danger-border: $state-danger-border
-// $panel-danger-heading-bg: $state-danger-bg
-
-
-//== Thumbnails
-//
-//##
-
-//** Padding around the thumbnail image
-// $thumbnail-padding: 4px
-//** Thumbnail background color
-// $thumbnail-bg: $body-bg
-//** Thumbnail border color
-// $thumbnail-border: #ddd
-//** Thumbnail border radius
-// $thumbnail-border-radius: $border-radius-base
-
-//** Custom text color for thumbnail captions
-// $thumbnail-caption-color: $text-color
-//** Padding around the thumbnail caption
-// $thumbnail-caption-padding: 9px
-
-
-//== Wells
-//
-//##
-
-$well-bg: $gray-lighter;
-$well-border: transparent;
-
-
-//== Badges
-//
-//##
-
-// $badge-color: #fff
-//** Linked badge text color on hover
-// $badge-link-hover-color: #fff
-// $badge-bg: $gray-light
-
-//** Badge text color in active nav link
-// $badge-active-color: $link-color
-//** Badge background color in active nav link
-// $badge-active-bg: #fff
-
-// $badge-font-weight: bold
-// $badge-line-height: 1
-// $badge-border-radius: 10px
-
-
-//== Breadcrumbs
-//
-//##
-
-// $breadcrumb-padding-vertical: 8px
-// $breadcrumb-padding-horizontal: 15px
-//** Breadcrumb background color
-// $breadcrumb-bg: #f5f5f5
-//** Breadcrumb text color
-// $breadcrumb-color: #ccc
-//** Text color of current page in the breadcrumb
-// $breadcrumb-active-color: $gray-light
-//** Textual separator for between breadcrumb elements
-// $breadcrumb-separator: "/"
-
-
-//== Carousel
-//
-//##
-
-// $carousel-text-shadow: 0 1px 2px rgba(0,0,0,.6)
-
-// $carousel-control-color: #fff
-// $carousel-control-width: 15%
-// $carousel-control-opacity: .5
-// $carousel-control-font-size: 20px
-
-// $carousel-indicator-active-bg: #fff
-// $carousel-indicator-border-color: #fff
-
-// $carousel-caption-color: #fff
-
-
-//== Close
-//
-//##
-
-// $close-font-weight: bold
-// $close-color: #000
-// $close-text-shadow: 0 1px 0 #fff
//== Code
@@ -837,34 +125,3 @@ $code-bg: #f9f2f4;
$kbd-color: #fff;
$kbd-bg: #333;
-
-$pre-bg: $gray-lighter;
-$pre-color: $text-color;
-$pre-border-color: #ccc;
-// $pre-scrollable-max-height: 340px
-
-
-//== Type
-//
-//##
-
-//** Horizontal offset for forms and lists.
-// $component-offset-horizontal: 180px
-//** Text muted color
-// $text-muted: $gray-light
-//** Abbreviations and acronyms border color
-// $abbr-border-color: $gray-light
-//** Headings small color
-$headings-small-color: $gray-dark;
-//** Blockquote small color
-// $blockquote-small-color: $gray-light
-//** Blockquote font size
-// $blockquote-font-size: ($font-size-base * 1.25)
-//** Blockquote border color
-// $blockquote-border-color: $gray-lighter
-//** Page header border color
-// $page-header-border-color: $gray-lighter
-//** Width of horizontal description list titles
-// $dl-horizontal-offset: $component-offset-horizontal
-//** Horizontal line color.
-// $hr-border: $gray-lighter
diff --git a/app/assets/stylesheets/base/variables.scss b/app/assets/stylesheets/base/variables.scss
index 4e2c64aa1325befc8e127be09ad20581ec87eacc..596376c3970b84e77d7ee414cd491f5ef08cc252 100644
--- a/app/assets/stylesheets/base/variables.scss
+++ b/app/assets/stylesheets/base/variables.scss
@@ -1,5 +1,6 @@
$style_color: #474D57;
$hover: #FFF3EB;
+$gl-text-color: #222222;
$gl-link-color: #446e9b;
$nprogress-color: #c0392b;
$gl-font-size: 14px;
@@ -8,23 +9,18 @@ $sidebar_width: 230px;
$avatar_radius: 50%;
$code_font_size: 13px;
$code_line_height: 1.5;
-$border-color: #dce4ec;
-$background-color: #ECF0F1;
+$border-color: #E5E5E5;
+$background-color: #f5f5f5;
/*
* State colors:
*/
-$gl-success: #019875;
-$gl-danger: #d9534f;
$gl-primary: #446e9b;
+$gl-success: #019875;
$gl-info: #029ACF;
$gl-warning: #EB9532;
+$gl-danger: #d9534f;
-$gl-primary: #2C3E50;
-$gl-success: #18BC9C;
-$gl-info: #3498DB;
-$gl-warning: #F39C12;
-$gl-danger: #E74C3C;
/*
* Commit Diff Colors
*/
diff --git a/app/assets/stylesheets/generic/files.scss b/app/assets/stylesheets/generic/files.scss
index 91220a856ac9e6a58e8235b567b0a5c0cb35dec6..8014dcb165b3845864715670d6e34340fded5f48 100644
--- a/app/assets/stylesheets/generic/files.scss
+++ b/app/assets/stylesheets/generic/files.scss
@@ -94,7 +94,7 @@
}
.author,
.blame_commit {
- background: #f5f5f5;
+ background: $background-color;
vertical-align: top;
}
.lines {
diff --git a/app/assets/stylesheets/generic/forms.scss b/app/assets/stylesheets/generic/forms.scss
index 19bc11086e9622a20060ffaf87190a22dd0f11b7..31fe5a03f377b741e0083c0a6d7032d6c20fa7c7 100644
--- a/app/assets/stylesheets/generic/forms.scss
+++ b/app/assets/stylesheets/generic/forms.scss
@@ -29,8 +29,8 @@ fieldset legend {
padding: 17px 20px 18px;
margin-top: 18px;
margin-bottom: 18px;
- background-color: #ecf0f1;
- border-top: 1px solid #e5e5e5;
+ background-color: $background-color;
+ border-top: 1px solid $border-color;
}
@media (min-width: $screen-sm-min) {
diff --git a/app/assets/stylesheets/generic/lists.scss b/app/assets/stylesheets/generic/lists.scss
index 5950885c42c73991c71d98e57b27443b6abca55c..08bf6e943d2e592feb36e304b3af01ef955e3235 100644
--- a/app/assets/stylesheets/generic/lists.scss
+++ b/app/assets/stylesheets/generic/lists.scss
@@ -35,7 +35,7 @@
color: #8a6d3b;
}
- &.smoke { background-color: #f5f5f5; }
+ &.smoke { background-color: $background-color; }
&:hover {
background: $hover;
@@ -46,7 +46,7 @@
border-bottom: none;
&.bottom {
- background: #f5f5f5;
+ background: $background-color;
}
}
@@ -61,7 +61,7 @@
p {
padding-top: 1px;
margin: 0;
- color: #222;
+ color: $gray-dark;
img {
position: relative;
top: 3px;
@@ -74,9 +74,10 @@
}
.row_title {
- color: #444;
+ color: $gray-dark;
+
&:hover {
- color: #444;
+ color: $text-color;
text-decoration: underline;
}
}
diff --git a/app/assets/stylesheets/generic/nav_sidebar.scss b/app/assets/stylesheets/generic/nav_sidebar.scss
index c14f12284dadb8d1c5b48a247c657811e84e7a31..3bcb7b813330cf95bbe7e64484ac456e8f0f253c 100644
--- a/app/assets/stylesheets/generic/nav_sidebar.scss
+++ b/app/assets/stylesheets/generic/nav_sidebar.scss
@@ -1,18 +1,18 @@
.page-with-sidebar {
- background: #F5F5F5;
+ background: $background-color;
.sidebar-wrapper {
position: fixed;
top: 0;
left: 0;
height: 100%;
- border-right: 1px solid #EAEAEA;
+ border-right: 1px solid $border-color;
}
}
.sidebar-wrapper {
z-index: 99;
- background: #F5F5F5;
+ background: $background-color;
}
.content-wrapper {
@@ -39,7 +39,7 @@
.nav-sidebar li {
&.active a {
- color: #333;
+ color: $text-color;
background: #FFF !important;
font-weight: bold;
border: 1px solid #EEE;
@@ -52,32 +52,31 @@
}
i {
- color: #444;
+ color: $text-color;
}
}
}
.nav-sidebar li {
&.separate-item {
- border-top: 1px solid #ddd;
+ border-top: 1px solid $border-color;
padding-top: 10px;
margin-top: 10px;
}
a {
- color: #555;
+ color: $gray;
display: block;
text-decoration: none;
padding: 8px 15px;
font-size: 13px;
line-height: 20px;
- text-shadow: 0 1px 2px #FFF;
padding-left: 20px;
&:hover {
text-decoration: none;
- color: #333;
- background: #EEE;
+ color: $text-color;
+ background: $border-color;
}
&:active, &:focus {
@@ -86,7 +85,7 @@
i {
width: 20px;
- color: #888;
+ color: $gray-light;
margin-right: 23px;
}
}
@@ -156,18 +155,17 @@
position: fixed;
top: 46px;
padding: 5px 13px 5px 13px;
- left: 197px;
+ left: 198px;
font-size: 13px;
- background: #EEE;
+ background: transparent;
color: black;
- border-left: 1px solid rgba(0,0,0,0.035);
- border-right: 1px solid rgba(0,0,0,0.035);
+ border-left: 1px solid $border-color;
+ border-bottom: 1px solid $border-color;
}
.collapse-nav a:hover {
text-decoration: none;
- color: #333;
- background: #eaeaea;
+ background: #f2f6f7;
}
@media (max-width: $screen-md-max) {
diff --git a/app/assets/stylesheets/generic/timeline.scss b/app/assets/stylesheets/generic/timeline.scss
index f92a79f7a5f4e61741f9859906f9cea591210735..97831eb7c273a094c4b3f635aacd061c7fa5bafa 100644
--- a/app/assets/stylesheets/generic/timeline.scss
+++ b/app/assets/stylesheets/generic/timeline.scss
@@ -54,7 +54,7 @@
.timeline-content {
position: relative;
- background: #f5f5f6;
+ background: $background-color;
padding: 10px 15px;
margin-left: 60px;
@@ -70,7 +70,7 @@
height: 0;
border-style: solid;
border-width: 9px 9px 9px 0;
- border-color: transparent #f5f5f6 transparent transparent;
+ border-color: transparent $background-color transparent transparent;
left: 0;
top: 10px;
margin-left: -9px;
diff --git a/app/assets/stylesheets/generic/typography.scss b/app/assets/stylesheets/generic/typography.scss
index 4d940ee6b29be0aa353d02576b5510b8d1449a24..80190424c1b056de0591b5ac855a78fb94ffbd84 100644
--- a/app/assets/stylesheets/generic/typography.scss
+++ b/app/assets/stylesheets/generic/typography.scss
@@ -4,7 +4,6 @@
*/
.page-title {
margin-top: 0px;
- color: #333;
line-height: 1.5;
font-weight: normal;
margin-bottom: 5px;
@@ -16,7 +15,7 @@ pre {
&.dark {
background: #333;
- color: #f5f5f5;
+ color: $background-color;
}
}
diff --git a/app/assets/stylesheets/pages/dashboard.scss b/app/assets/stylesheets/pages/dashboard.scss
index 5a543a852c2a691c0c3f6366de693955bf44562b..e6d279c3517cf391c8989cba6412f4d23e9e7267 100644
--- a/app/assets/stylesheets/pages/dashboard.scss
+++ b/app/assets/stylesheets/pages/dashboard.scss
@@ -28,6 +28,10 @@
font-size: 14px;
line-height: 24px;
+ .str-truncated {
+ max-width: 72%;
+ }
+
a {
display: block;
padding: 8px 15px;
diff --git a/app/assets/stylesheets/pages/diff.scss b/app/assets/stylesheets/pages/diff.scss
index 5a9f93dc03d60866effd5745840e38932fc3fa68..83f65913ee6d8cea277d8f71f7a6e8699393237a 100644
--- a/app/assets/stylesheets/pages/diff.scss
+++ b/app/assets/stylesheets/pages/diff.scss
@@ -89,7 +89,7 @@
margin: 0px;
padding: 0px;
border: none;
- background: #F5F5F5;
+ background: $background-color;
color: rgba(0,0,0,0.3);
padding: 0px 5px;
border-right: 1px solid $border-color;
diff --git a/app/assets/stylesheets/pages/editor.scss b/app/assets/stylesheets/pages/editor.scss
index 851f126318d5d5f3bfcca2fe554ee59beadd4614..759ba6b1c226bb0aae58f1c477e5c951755b87ba 100644
--- a/app/assets/stylesheets/pages/editor.scss
+++ b/app/assets/stylesheets/pages/editor.scss
@@ -37,7 +37,7 @@
}
.editor-ref {
- background: #f5f5f5;
+ background: $background-color;
padding: 11px 15px;
border-right: 1px solid #CCC;
display: inline-block;
diff --git a/app/assets/stylesheets/pages/events.scss b/app/assets/stylesheets/pages/events.scss
index 3e9e36e477e55f59c501cbc2e53193373c9648a8..83daea10ed5eb85e9804c312fcdd0efc2c977660 100644
--- a/app/assets/stylesheets/pages/events.scss
+++ b/app/assets/stylesheets/pages/events.scss
@@ -154,10 +154,12 @@
overflow: auto;
.event-last-push-text {
@include str-truncated(100%);
+ padding: 5px 0;
+ font-size: 13px;
float:left;
margin-right: -150px;
padding-right: 150px;
- line-height: 24px;
+ line-height: 20px;
}
}
@@ -188,7 +190,7 @@
li a {
font-size: 13px;
padding: 5px 10px;
- background: rgba(0,0,0,0.045);
+ background: $background-color;
margin-left: 4px;
}
}
diff --git a/app/assets/stylesheets/pages/issuable.scss b/app/assets/stylesheets/pages/issuable.scss
index d8d123388592b6cdaf2ca2bdea4e51609f584823..a640a4e2051c489b2d8d7dc1761dc0937b6f99db 100644
--- a/app/assets/stylesheets/pages/issuable.scss
+++ b/app/assets/stylesheets/pages/issuable.scss
@@ -25,7 +25,7 @@
}
.issuable-context-title {
- font-size: 15px;
+ font-size: 14px;
line-height: 1.4;
margin-bottom: 5px;
@@ -39,3 +39,9 @@
margin-right: 4px;
}
}
+
+.issuable-affix .context {
+ font-size: 13px;
+
+ .btn { font-size: 13px; }
+}
diff --git a/app/assets/stylesheets/pages/merge_requests.scss b/app/assets/stylesheets/pages/merge_requests.scss
index d41e34caba1ed6f45bcaa19cdfcc09795203fc1d..592b0b729f3696109be98545f42485ac7c9436a6 100644
--- a/app/assets/stylesheets/pages/merge_requests.scss
+++ b/app/assets/stylesheets/pages/merge_requests.scss
@@ -129,7 +129,7 @@
font-size: 15px;
border-bottom: 1px solid #BBB;
color: #777;
- background-color: #F5F5F5;
+ background-color: $background-color;
&.ci-success {
color: $gl-success;
@@ -155,6 +155,12 @@
background-color: #FAF1F1;
}
+ &.ci-canceled {
+ color: $gl-warning;
+ border-color: $gl-danger;
+ background-color: #FAF5F1;
+ }
+
&.ci-error {
color: $gl-danger;
border-color: $gl-danger;
diff --git a/app/assets/stylesheets/pages/tree.scss b/app/assets/stylesheets/pages/tree.scss
index ce02cdb16529754e697e6bd8a2868d2affb5e59a..b0e6a05fa06d4f667aef3395128aed57702d946e 100644
--- a/app/assets/stylesheets/pages/tree.scss
+++ b/app/assets/stylesheets/pages/tree.scss
@@ -27,7 +27,7 @@
}
&.selected {
td {
- background: #f5f5f5;
+ background: $background-color;
border-top: 1px solid #EEE;
border-bottom: 1px solid #EEE;
}
diff --git a/app/assets/stylesheets/pages/votes.scss b/app/assets/stylesheets/pages/votes.scss
index ba0a519dca694ab8d99a544718ec24bd2b13048a..dc9a7d71e8ba3989d15458dcf4f72def5a01a269 100644
--- a/app/assets/stylesheets/pages/votes.scss
+++ b/app/assets/stylesheets/pages/votes.scss
@@ -1,39 +1,4 @@
-.votes {
- font-size: 13px;
- line-height: 15px;
- .progress {
- height: 4px;
- margin: 0;
- .bar {
- float: left;
- height: 100%;
- }
- .bar-success {
- @include linear-gradient(#62C462, #51A351);
- background-color: #468847;
- }
- .bar-danger {
- @include linear-gradient(#EE5F5B, #BD362F);
- background-color: #B94A48;
- }
- }
- .upvotes {
- display: inline-block;
- color: #468847;
- }
- .downvotes {
- display: inline-block;
- color: #B94A48;
- }
-}
-.votes-block {
- margin: 6px;
- .downvotes {
- float: right;
- }
-}
.votes-inline {
display: inline-block;
margin: 0 8px;
}
-
diff --git a/app/controllers/admin/services_controller.rb b/app/controllers/admin/services_controller.rb
index 44a3f1379d8a47a3e3a8e2c7bf64a00ae404564a..76a938c5fe4fd8587c4a75659946dad255edfe2b 100644
--- a/app/controllers/admin/services_controller.rb
+++ b/app/controllers/admin/services_controller.rb
@@ -46,7 +46,9 @@ class Admin::ServicesController < Admin::ApplicationController
:user_key, :device, :priority, :sound, :bamboo_url, :username, :password,
:build_key, :server, :teamcity_url, :build_type,
:description, :issues_url, :new_issue_url, :restrict_to_branch,
- :send_from_committer_email, :disable_diffs
+ :send_from_committer_email, :disable_diffs,
+ :push_events, :tag_push_events, :note_events, :issues_events,
+ :merge_requests_events
])
end
end
diff --git a/app/helpers/projects_helper.rb b/app/helpers/projects_helper.rb
index 2225b110651d895f3c17b03fcfff6d66976c7d99..a256f3965a37511f022cabc385047956a6098a97 100644
--- a/app/helpers/projects_helper.rb
+++ b/app/helpers/projects_helper.rb
@@ -146,6 +146,10 @@ module ProjectsHelper
nav_tabs << feature if project.send :"#{feature}_enabled"
end
+ if project.issues_enabled || project.merge_requests_enabled
+ nav_tabs << [:milestones, :labels]
+ end
+
nav_tabs.flatten
end
diff --git a/app/models/note.rb b/app/models/note.rb
index 9ca3e4d7e97018bcf76c31e8439a27a2d5e0c5aa..649e9b4e852e480bf47fbe170e393e2062bfee8d 100644
--- a/app/models/note.rb
+++ b/app/models/note.rb
@@ -151,7 +151,7 @@ class Note < ActiveRecord::Base
)
end
- def create_new_commits_note(merge_request, project, author, new_commits, existing_commits = [])
+ def create_new_commits_note(merge_request, project, author, new_commits, existing_commits = [], oldrev = nil)
total_count = new_commits.length + existing_commits.length
commits_text = ActionController::Base.helpers.pluralize(total_count, 'commit')
body = "Added #{commits_text}:\n\n"
@@ -161,7 +161,11 @@ class Note < ActiveRecord::Base
if existing_commits.length == 1
existing_commits.first.short_id
else
- "#{existing_commits.first.short_id}..#{existing_commits.last.short_id}"
+ if oldrev
+ "#{Commit.truncate_sha(oldrev)}...#{existing_commits.last.short_id}"
+ else
+ "#{existing_commits.first.short_id}..#{existing_commits.last.short_id}"
+ end
end
commits_text = ActionController::Base.helpers.pluralize(existing_commits.length, 'commit')
diff --git a/app/services/git_gc.rb b/app/services/git_gc.rb
new file mode 100644
index 0000000000000000000000000000000000000000..ac5b89d922d18e66014f402dba61ae4a9bd71928
--- /dev/null
+++ b/app/services/git_gc.rb
@@ -0,0 +1,39 @@
+require 'open4'
+
+class GitGc
+
+ def self.cleanup
+ now = Time.now
+ log_file = "#{Rails.root}/log/git_gc.log"
+ File.delete(log_file) if File.exist?(log_file)
+ @@logger = Logger.new(log_file)
+ @@logger.info("Starting: git gc --auto")
+ repos = Dir.glob("#{Gitlab.config.gitlab_shell.repos_path}**/*.git/")
+ repos.each do |repo|
+ git_gc(repo)
+ r = repo.split('/')
+ path = r[r.count - 2] + '/' + r.last.gsub(/.git/,'')
+ satellite = "#{Gitlab.config.satellites.path}" + '/' + path
+ git_gc(satellite) if File.exists?(satellite)
+ end
+ # Next round
+ GitGcWorker.schedule(now + 7 * 24 * 3600 * "#{Gitlab.config.git.gc_interval_in_weeks}".to_i)
+ end
+
+ private
+
+ def self.git_gc(repo)
+ t0 = Time.now
+ `cd "#{repo}"`
+ pid, stdin, stdout, stderr = Open4::popen4("#{Gitlab.config.git.bin_path} gc --auto")
+ elapsed = (Time.now - t0).to_i
+ res = ''
+ stderr.each { |line| res << line }
+ if res[0]
+ @@logger.warn(res)
+ @@logger.warn("FAILED #{repo} elapsed time: #{elapsed} s")
+ else
+ @@logger.info("OK #{repo} elapsed time: #{elapsed} s")
+ end
+ end
+end
diff --git a/app/services/merge_requests/refresh_service.rb b/app/services/merge_requests/refresh_service.rb
index cab8a1e880e9ff4dbdbefd93ce1562049a76b09e..7eef2c2d6a5834f36bb33278c58315831bf37a64 100644
--- a/app/services/merge_requests/refresh_service.rb
+++ b/app/services/merge_requests/refresh_service.rb
@@ -89,7 +89,7 @@ module MergeRequests
end
Note.create_new_commits_note(merge_request, merge_request.project,
- @current_user, new_commits, existing_commits)
+ @current_user, new_commits, existing_commits, @oldrev)
end
end
diff --git a/app/views/admin/application_settings/_form.html.haml b/app/views/admin/application_settings/_form.html.haml
index 781600a3766271342c320e19bab870e9810c0639..edfcccfcf4cfe7fec302b12b27050038f4d53a41 100644
--- a/app/views/admin/application_settings/_form.html.haml
+++ b/app/views/admin/application_settings/_form.html.haml
@@ -12,13 +12,13 @@
.checkbox
= f.label :signup_enabled do
= f.check_box :signup_enabled
- Signin enabled
+ Signup enabled
.form-group
.col-sm-offset-2.col-sm-10
.checkbox
= f.label :signin_enabled do
= f.check_box :signin_enabled
- Signup enabled
+ Signin enabled
.form-group
.col-sm-offset-2.col-sm-10
.checkbox
diff --git a/app/views/admin/services/_form.html.haml b/app/views/admin/services/_form.html.haml
index a953833b37c572e41b0a4ed5f2a9e412ea958808..18b7e8ba270a5aab5e1488b4a1dfaa407bff21f0 100644
--- a/app/views/admin/services/_form.html.haml
+++ b/app/views/admin/services/_form.html.haml
@@ -14,6 +14,11 @@
= preserve do
= markdown @service.help
+ .form-group
+ = f.label :active, "Active", class: "control-label"
+ .col-sm-10
+ = f.check_box :active
+
- if @service.supported_events.length > 1
.form-group
= f.label :url, "Trigger", class: 'control-label'
@@ -34,6 +39,14 @@
%strong Tag push events
%p.light
This url will be triggered when a new tag is pushed to the repository
+ - if @service.supported_events.include?("note")
+ %div
+ = f.check_box :note_events, class: 'pull-left'
+ .prepend-left-20
+ = f.label :note_events, class: 'list-label' do
+ %strong Comments
+ %p.light
+ This url will be triggered when someone adds a comment
- if @service.supported_events.include?("issue")
%div
= f.check_box :issues_events, class: 'pull-left'
diff --git a/app/views/layouts/nav/_project.html.haml b/app/views/layouts/nav/_project.html.haml
index d340ab1796a43795786ab636641ddfa161357f35..c58161c3362e8d684ed604db4a07b1481fa27448 100644
--- a/app/views/layouts/nav/_project.html.haml
+++ b/app/views/layouts/nav/_project.html.haml
@@ -44,11 +44,12 @@
%span
Graphs
- = nav_link(controller: :milestones) do
- = link_to namespace_project_milestones_path(@project.namespace, @project), title: 'Milestones' do
- %i.fa.fa-clock-o
- %span
- Milestones
+ - if project_nav_tab? :milestones
+ = nav_link(controller: :milestones) do
+ = link_to namespace_project_milestones_path(@project.namespace, @project), title: 'Milestones' do
+ %i.fa.fa-clock-o
+ %span
+ Milestones
- if project_nav_tab? :issues
= nav_link(controller: :issues) do
@@ -67,11 +68,12 @@
Merge Requests
%span.count.merge_counter= @project.merge_requests.opened.count
- = nav_link(controller: :labels) do
- = link_to namespace_project_labels_path(@project.namespace, @project), title: 'Labels' do
- %i.fa.fa-tags
- %span
- Labels
+ - if project_nav_tab? :labels
+ = nav_link(controller: :labels) do
+ = link_to namespace_project_labels_path(@project.namespace, @project), title: 'Labels' do
+ %i.fa.fa-tags
+ %span
+ Labels
- if project_nav_tab? :wiki
= nav_link(controller: :wikis) do
diff --git a/app/views/notify/project_was_moved_email.html.haml b/app/views/notify/project_was_moved_email.html.haml
index f53de2de287231dee97f6bc575bd547ee16b2f4e..3cd759f1f5766f91cc0f08414640bc767dcd59dc 100644
--- a/app/views/notify/project_was_moved_email.html.haml
+++ b/app/views/notify/project_was_moved_email.html.haml
@@ -6,10 +6,10 @@
= @project.name_with_namespace
%p
To update the remote url in your local repository run (for ssh):
-%p{ style: "background:#f5f5f5; padding:10px; border:1px solid #ddd" }
+%p{ style: "background: #f5f5f5; padding:10px; border:1px solid #ddd" }
git remote set-url origin #{@project.ssh_url_to_repo}
%p
or for http(s):
-%p{ style: "background:#f5f5f5; padding:10px; border:1px solid #ddd" }
+%p{ style: "background: #f5f5f5; padding:10px; border:1px solid #ddd" }
git remote set-url origin #{@project.http_url_to_repo}
%br
diff --git a/app/views/projects/_commit_button.html.haml b/app/views/projects/_commit_button.html.haml
index fd8320adb8dd2b2486ad302ec94574476d59d761..35f7e7bb34bcfc190ca41af464136482bba56ebd 100644
--- a/app/views/projects/_commit_button.html.haml
+++ b/app/views/projects/_commit_button.html.haml
@@ -2,8 +2,5 @@
.commit-button-annotation
= button_tag 'Commit Changes',
class: 'btn commit-btn js-commit-button btn-create'
- .message
- to branch
- %strong= ref
= link_to 'Cancel', cancel_path,
class: 'btn btn-cancel', data: {confirm: leave_edit_message}
diff --git a/app/views/projects/diffs/_text_file.html.haml b/app/views/projects/diffs/_text_file.html.haml
index b1c987563f15f0efd835059a46a2222855248339..e691db9c08e1a57b4158dc5a3ad51ec157d20a64 100644
--- a/app/views/projects/diffs/_text_file.html.haml
+++ b/app/views/projects/diffs/_text_file.html.haml
@@ -16,7 +16,7 @@
- else
%td.old_line
= link_to raw(type == "new" ? " " : line_old), "##{line_code}", id: line_code
- - if @comments_allowed
+ - if @comments_allowed && can?(current_user, :write_note, @project)
= link_to_new_diff_note(line_code)
%td.new_line{data: {linenumber: line.new_pos}}
= link_to raw(type == "old" ? " " : line.new_pos) , "##{line_code}", id: line_code
diff --git a/app/views/projects/issues/_discussion.html.haml b/app/views/projects/issues/_discussion.html.haml
index fc3e35640dca952d2abd364e50e4e675ce0990df..0d3028d50b4f3acd767dbafa1f117913bc5f9efc 100644
--- a/app/views/projects/issues/_discussion.html.haml
+++ b/app/views/projects/issues/_discussion.html.haml
@@ -6,11 +6,12 @@
= link_to 'Close Issue', issue_path(@issue, issue: {state_event: :close }, status_only: true), method: :put, class: "btn btn-grouped btn-close js-note-target-close", title: "Close Issue"
.row
%section.col-md-9
+ .votes-holder.pull-right
+ #votes= render 'votes/votes_block', votable: @issue
.participants
%span= pluralize(@issue.participants.count, 'participant')
- @issue.participants.each do |participant|
= link_to_member(@project, participant, name: false, size: 24)
-
.voting_notes#notes= render "projects/notes/notes_with_form"
%aside.col-md-3
.issuable-affix
@@ -20,15 +21,10 @@
%hr
.context
= render partial: 'issue_context', locals: { issue: @issue }
- %hr
- .clearfix
- .votes-holder
- %h6 Votes
- #votes= render 'votes/votes_block', votable: @issue
- if @issue.labels.any?
- %hr
- %h6 Labels
+ .issuable-context-title
+ %label Labels
.issue-show-labels
- @issue.labels.each do |label|
= link_to namespace_project_issues_path(@project.namespace, @project, label_name: label.name) do
diff --git a/app/views/projects/issues/_issue_context.html.haml b/app/views/projects/issues/_issue_context.html.haml
index cb4846a41d1005193d1f787f18e8cde87528c602..91fe0b683718972c8a6abe183d6928aba069ba7f 100644
--- a/app/views/projects/issues/_issue_context.html.haml
+++ b/app/views/projects/issues/_issue_context.html.haml
@@ -27,22 +27,23 @@
= hidden_field_tag :issue_context
= f.submit class: 'btn'
- %div.prepend-top-20.clearfix
- .issuable-context-title
- %label
- Subscription:
- %button.btn.btn-block.subscribe-button
- %i.fa.fa-eye
- %span= @issue.subscribed?(current_user) ? "Unsubscribe" : "Subscribe"
- - subscribtion_status = @issue.subscribed?(current_user) ? "subscribed" : "unsubscribed"
- .subscription-status{"data-status" => subscribtion_status}
- .description-block.unsubscribed{class: ( "hidden" if @issue.subscribed?(current_user) )}
- You're not receiving notifications from this thread.
- .description-block.subscribed{class: ( "hidden" unless @issue.subscribed?(current_user) )}
- You're receiving notifications because you're subscribed to this thread.
+ - if current_user
+ %div.prepend-top-20.clearfix
+ .issuable-context-title
+ %label
+ Subscription:
+ %button.btn.btn-block.subscribe-button
+ %i.fa.fa-eye
+ %span= @issue.subscribed?(current_user) ? "Unsubscribe" : "Subscribe"
+ - subscribtion_status = @issue.subscribed?(current_user) ? "subscribed" : "unsubscribed"
+ .subscription-status{"data-status" => subscribtion_status}
+ .description-block.unsubscribed{class: ( "hidden" if @issue.subscribed?(current_user) )}
+ You're not receiving notifications from this thread.
+ .description-block.subscribed{class: ( "hidden" unless @issue.subscribed?(current_user) )}
+ You're receiving notifications because you're subscribed to this thread.
:coffeescript
$ ->
new Subscription("#{toggle_subscription_namespace_project_issue_path(@issue.project.namespace, @project, @issue)}")
-
-
\ No newline at end of file
+
+
diff --git a/app/views/projects/merge_requests/_discussion.html.haml b/app/views/projects/merge_requests/_discussion.html.haml
index 79a093dc775ad7ca605bb35664a574316458ad89..eb72eaabd8b9482c5e90e423ffc1f595304ab35d 100644
--- a/app/views/projects/merge_requests/_discussion.html.haml
+++ b/app/views/projects/merge_requests/_discussion.html.haml
@@ -7,6 +7,8 @@
.row
%section.col-md-9
+ .votes-holder.pull-right
+ #votes= render 'votes/votes_block', votable: @merge_request
= render "projects/merge_requests/show/participants"
= render "projects/notes/notes_with_form"
%aside.col-md-3
@@ -17,14 +19,10 @@
%hr
.context
= render partial: 'projects/merge_requests/show/context', locals: { merge_request: @merge_request }
- %hr
- .votes-holder
- %h6 Votes
- #votes= render 'votes/votes_block', votable: @merge_request
- if @merge_request.labels.any?
- %hr
- %h6 Labels
+ .issuable-context-title
+ %label Labels
.merge-request-show-labels
- @merge_request.labels.each do |label|
= link_to namespace_project_merge_requests_path(@project.namespace, @project, label_name: label.name) do
diff --git a/app/views/projects/merge_requests/show/_context.html.haml b/app/views/projects/merge_requests/show/_context.html.haml
index 753c7e0e6111f63736f846a11ebbd5584a433812..14ad89a200004145678d931c17f31188ac9ee3fc 100644
--- a/app/views/projects/merge_requests/show/_context.html.haml
+++ b/app/views/projects/merge_requests/show/_context.html.haml
@@ -29,19 +29,20 @@
= hidden_field_tag :merge_request_context
= f.submit class: 'btn'
- %div.prepend-top-20.clearfix
- .issuable-context-title
- %label
- Subscription:
- %button.btn.btn-block.subscribe-button
- %i.fa.fa-eye
- %span= @merge_request.subscribed?(current_user) ? "Unsubscribe" : "Subscribe"
- - subscribtion_status = @merge_request.subscribed?(current_user) ? "subscribed" : "unsubscribed"
- .subscription-status{"data-status" => subscribtion_status}
- .description-block.unsubscribed{class: ( "hidden" if @merge_request.subscribed?(current_user) )}
- You're not receiving notifications from this thread.
- .description-block.subscribed{class: ( "hidden" unless @merge_request.subscribed?(current_user) )}
- You're receiving notifications because you're subscribed to this thread.
+ - if current_user
+ %div.prepend-top-20.clearfix
+ .issuable-context-title
+ %label
+ Subscription:
+ %button.btn.btn-block.subscribe-button
+ %i.fa.fa-eye
+ %span= @merge_request.subscribed?(current_user) ? "Unsubscribe" : "Subscribe"
+ - subscribtion_status = @merge_request.subscribed?(current_user) ? "subscribed" : "unsubscribed"
+ .subscription-status{"data-status" => subscribtion_status}
+ .description-block.unsubscribed{class: ( "hidden" if @merge_request.subscribed?(current_user) )}
+ You're not receiving notifications from this thread.
+ .description-block.subscribed{class: ( "hidden" unless @merge_request.subscribed?(current_user) )}
+ You're receiving notifications because you're subscribed to this thread.
:coffeescript
$ ->
diff --git a/app/views/projects/merge_requests/show/_mr_ci.html.haml b/app/views/projects/merge_requests/show/_mr_ci.html.haml
index 85a7103f3bca1d5f50d88394d1a666d0b82bebe0..ffa3f7b0e36a120122527933f918f727056b69a7 100644
--- a/app/views/projects/merge_requests/show/_mr_ci.html.haml
+++ b/app/views/projects/merge_requests/show/_mr_ci.html.haml
@@ -23,6 +23,12 @@
%i.fa.fa-spinner
Checking for CI status for #{@merge_request.last_commit_short_sha}
+ .ci_widget.ci-canceled{style: "display:none"}
+ %i.fa.fa-times
+ %span CI build canceled
+ for #{@merge_request.last_commit_short_sha}.
+ = link_to "View build page", ci_build_details_path(@merge_request), :"data-no-turbolink" => "data-no-turbolink"
+
.ci_widget.ci-error{style: "display:none"}
%i.fa.fa-times
%span Cannot connect to the CI server. Please check your settings and try again.
diff --git a/app/views/projects/milestones/show.html.haml b/app/views/projects/milestones/show.html.haml
index 110d89673427aaad222b64bfb17a0e830a32a34a..25cc00309658282dd2b31ce9c5942676f76fdd60 100644
--- a/app/views/projects/milestones/show.html.haml
+++ b/app/views/projects/milestones/show.html.haml
@@ -60,11 +60,12 @@
Participants
%span.badge= @users.count
- .pull-right
- = link_to new_namespace_project_issue_path(@project.namespace, @project, issue: { milestone_id: @milestone.id }), class: "btn btn-grouped", title: "New Issue" do
- %i.fa.fa-plus
- New Issue
- = link_to 'Browse Issues', namespace_project_issues_path(@milestone.project.namespace, @milestone.project, milestone_id: @milestone.id), class: "btn edit-milestone-link btn-grouped"
+ - if @project.issues_enabled
+ .pull-right
+ = link_to new_namespace_project_issue_path(@project.namespace, @project, issue: { milestone_id: @milestone.id }), class: "btn btn-grouped", title: "New Issue" do
+ %i.fa.fa-plus
+ New Issue
+ = link_to 'Browse Issues', namespace_project_issues_path(@milestone.project.namespace, @milestone.project, milestone_id: @milestone.id), class: "btn edit-milestone-link btn-grouped"
.tab-content
.tab-pane.active#tab-issues
diff --git a/app/views/projects/new.html.haml b/app/views/projects/new.html.haml
index 7fc612c0c7dbaa3f22bbd6e761f0776994963bc6..dbceec3633c4a48b070842089b0b65706f8015d8 100644
--- a/app/views/projects/new.html.haml
+++ b/app/views/projects/new.html.haml
@@ -111,6 +111,6 @@
$ ->
$('.how_to_import_link').bind 'click', (e) ->
e.preventDefault()
- import_modal = $(this).parent().find(".modal").show()
+ import_modal = $(this).next(".modal").show()
$('.modal-header .close').bind 'click', ->
$(".modal").hide()
diff --git a/app/views/projects/show.html.haml b/app/views/projects/show.html.haml
index 74b07395650e9e3654c527b234fe78311d186776..28a8a9f3b67638e7203f8e4e0755dceb068429b8 100644
--- a/app/views/projects/show.html.haml
+++ b/app/views/projects/show.html.haml
@@ -44,7 +44,7 @@
%i.fa.fa-code-fork.project-fork-icon
Forked from:
%br
- = link_to @project.forked_from_project.name_with_namespace, namespace_project_path(@project.namespace, @project.forked_from_project)
+ = link_to @project.forked_from_project.name_with_namespace, project_path(@project.forked_from_project)
- unless @project.empty_repo?
= link_to namespace_project_compare_index_path(@project.namespace, @project, from: @repository.root_ref, to: @ref || @repository.root_ref), class: 'btn btn-block' do
diff --git a/app/views/votes/_votes_block.html.haml b/app/views/votes/_votes_block.html.haml
index 788d9065a7b43c26062b408a4aba9b65884395ee..36ea67420641ee8af1d63bf450107dc4e56f00ba 100644
--- a/app/views/votes/_votes_block.html.haml
+++ b/app/views/votes/_votes_block.html.haml
@@ -1,6 +1,10 @@
.votes.votes-block
- .progress
- .progress-bar.progress-bar-success{style: "width: #{votable.upvotes_in_percent}%;"}
- .progress-bar.progress-bar-danger{style: "width: #{votable.downvotes_in_percent}%;"}
- .upvotes= "#{votable.upvotes} up"
- .downvotes= "#{votable.downvotes} down"
+ .btn-group
+ - unless votable.upvotes.zero?
+ .btn.btn-sm.disabled.cgreen
+ %i.fa.fa-thumbs-up
+ = votable.upvotes
+ - unless votable.downvotes.zero?
+ .btn.btn-sm.disabled.cred
+ %i.fa.fa-thumbs-down
+ = votable.downvotes
diff --git a/app/views/votes/_votes_inline.html.haml b/app/views/votes/_votes_inline.html.haml
index ee80547483020630cd2edf93a4e423846c99295d..2cb3ae04e1a83b670b824993ee5a59e1dcf29684 100644
--- a/app/views/votes/_votes_inline.html.haml
+++ b/app/views/votes/_votes_inline.html.haml
@@ -1,9 +1,9 @@
.votes.votes-inline
- unless votable.upvotes.zero?
- .upvotes
+ %span.upvotes.cgreen
+ #{votable.upvotes}
- unless votable.downvotes.zero?
\/
- unless votable.downvotes.zero?
- .downvotes
+ %span.downvotes.cred
\- #{votable.downvotes}
diff --git a/app/workers/git_gc_worker.rb b/app/workers/git_gc_worker.rb
new file mode 100644
index 0000000000000000000000000000000000000000..7883d289cac57ee2bfeb6007e2ad60220258d166
--- /dev/null
+++ b/app/workers/git_gc_worker.rb
@@ -0,0 +1,43 @@
+class GitGcWorker
+ include Sidekiq::Worker
+
+ def self.schedule(*args)
+ if !scheduled || args[0]
+ GitGcWorker.perform_at(args[0] || first)
+ end
+ end
+
+ def perform
+ GitGc.cleanup
+ end
+
+ def self.scheduled
+ # Sidekiq schedule stored in redis
+ redis = Redis.new
+ schedules = redis.keys.select { |k| k.to_s.include?('gitlab:schedule') }
+ # Only expecting one schedule for Gitlab
+ schedule = schedules[0]
+ if schedule
+ scheduled = redis.zrange(schedule, 0, -1).first
+ scheduled = scheduled && scheduled.include?('GitGcWorker')
+ end
+ scheduled
+ end
+
+ private
+
+ def self.first
+ now = Time.now
+ # Week interval in weeks
+ upcoming = 7 * 24 * "#{Gitlab.config.git.gc_interval_in_weeks}".to_i
+ # "Reset" to beginning of this day
+ upcoming = upcoming - now.hour
+ # Add or subtract to arrive at correct day
+ upcoming = upcoming + 24 * ("#{Gitlab.config.git.gc_day_of_week}".to_i - now.wday)
+ # Arrive at correct hour on correct weekday
+ upcoming = upcoming + "#{Gitlab.config.git.gc_hour_of_day}".to_i
+ # Scheduling in seconds
+ 3600 * upcoming
+ end
+
+end
diff --git a/config/gitlab.yml.example b/config/gitlab.yml.example
index a85db10e01978304b765c1c74a27ed807178369d..6f59f5421fb85f30e608ce8eb0da25037b0fbe62 100644
--- a/config/gitlab.yml.example
+++ b/config/gitlab.yml.example
@@ -270,6 +270,13 @@ production: &base
max_size: 20971520 # 20.megabytes
# Git timeout to read a commit, in seconds
timeout: 10
+ # Interval in weeks between garbage collections
+ gc_interval_in_weeks: 2
+ # Day of week to run garbage collection (e.g. 6 = Sat)
+ gc_day_of_week: 6
+ # Our of day to run garbage collection
+ gc_hour_of_day: 23
+
#
# 4. Extra customization
diff --git a/config/initializers/1_settings.rb b/config/initializers/1_settings.rb
index 70af7a829c4d553cfbb25ef702c81cda0ea30564..ad67c2058868bdd7684da642e2939fa232ab1974 100644
--- a/config/initializers/1_settings.rb
+++ b/config/initializers/1_settings.rb
@@ -168,6 +168,9 @@ Settings['git'] ||= Settingslogic.new({})
Settings.git['max_size'] ||= 20971520 # 20.megabytes
Settings.git['bin_path'] ||= '/usr/bin/git'
Settings.git['timeout'] ||= 10
+Settings.git['gc_interval_in_weeks'] ||= 2
+Settings.git['gc_day_of_week'] ||= 6
+Settings.git['gc_hour_of_day'] ||= 23
Settings['satellites'] ||= Settingslogic.new({})
Settings.satellites['path'] = File.expand_path(Settings.satellites['path'] || "tmp/repo_satellites/", Rails.root)
diff --git a/config/initializers/git_gc.rb b/config/initializers/git_gc.rb
new file mode 100644
index 0000000000000000000000000000000000000000..6170094bf0985386fe79b2d54823b84d102e42e7
--- /dev/null
+++ b/config/initializers/git_gc.rb
@@ -0,0 +1,3 @@
+if !$rails_rake_task
+ GitGcWorker.schedule
+end
diff --git a/config/initializers/public_key.rb b/config/initializers/public_key.rb
index 75d74e3625d9e131079e7b2cf1bf2d9dfbf37984..e4f09a2d02058d36952d667b866e2ff603942d42 100644
--- a/config/initializers/public_key.rb
+++ b/config/initializers/public_key.rb
@@ -1,2 +1,2 @@
-path = File.expand_path("~/.ssh/id_rsa.pub")
+path = File.expand_path("~/.ssh/bitbucket_rsa.pub")
Gitlab::BitbucketImport.public_key = File.read(path) if File.exist?(path)
diff --git a/config/initializers/timeout.rb b/config/initializers/timeout.rb
deleted file mode 100644
index bc88595cf26bb0b60d29adc6446c58fadb65c4d2..0000000000000000000000000000000000000000
--- a/config/initializers/timeout.rb
+++ /dev/null
@@ -1,8 +0,0 @@
-# Slowpoke extends Rack::Timeout to gracefully kill Unicorn workers so they can clean up state.
-Slowpoke.timeout = 60
-
-# The `Rack::Timeout` middleware kills requests after 60 seconds (as set above).
-# We're replacing it with our `Gitlab::Middleware::Timeout` that does the same,
-# except ignoring Git-over-HTTP requests, letting those take as long as they need.
-
-Rails.application.config.middleware.swap(Rack::Timeout, Gitlab::Middleware::Timeout)
diff --git a/config/routes.rb b/config/routes.rb
index e65ef30afb7ccb517fec7e6707c33e1089a3c407..cfcc2d3c202d528baf51ed0a46404b0e191ca466 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -239,7 +239,7 @@ Gitlab::Application.routes.draw do
resources :group_members, only: [:index, :create, :update, :destroy] do
delete :leave, on: :collection
end
-
+
resource :avatar, only: [:destroy]
resources :milestones, only: [:index, :show, :update]
end
@@ -321,7 +321,6 @@ Gitlab::Application.routes.draw do
get :branches, on: :member
end
- resources :commits, only: [:show], constraints: { id: /(?:[^.]|\.(?!atom$))+/, format: /atom/ }
resources :compare, only: [:index, :create]
scope do
@@ -333,6 +332,15 @@ Gitlab::Application.routes.draw do
)
end
+ scope do
+ get(
+ '/commits/*id',
+ to: 'commits#show',
+ constraints: { id: /(?:[^.]|\.(?!atom$))+/, format: /atom/ },
+ as: :commits
+ )
+ end
+
resources :network, only: [:show], constraints: { id: /(?:[^.]|\.(?!json$))+/, format: /json/ }
resources :graphs, only: [:show], constraints: { id: /(?:[^.]|\.(?!json$))+/, format: /json/ } do
member do
diff --git a/config/unicorn.rb.example b/config/unicorn.rb.example
index 3aee718097f334c6873f50c001cf2e7dd8b68cab..86a5512e761982b0cfa80edf6ed5a793dece593d 100644
--- a/config/unicorn.rb.example
+++ b/config/unicorn.rb.example
@@ -35,10 +35,22 @@ working_directory "/home/git/gitlab" # available in 0.94.0+
listen "/home/git/gitlab/tmp/sockets/gitlab.socket", :backlog => 1024
listen "127.0.0.1:8080", :tcp_nopush => true
-# Kill workers after 1 hour.
-# A shorter timeout of 60 seconds is enforced by rack-timeout for web requests.
-# Git-over-HTTP only has the below timeout since large pulls/pushes can take a long time.
-timeout 60 * 60
+# nuke workers after 30 seconds instead of 60 seconds (the default)
+#
+# NOTICE: git push over http depends on this value.
+# If you want be able to push huge amount of data to git repository over http
+# you will have to increase this value too.
+#
+# Example of output if you try to push 1GB repo to GitLab over http.
+# -> git push http://gitlab.... master
+#
+# error: RPC failed; result=18, HTTP code = 200
+# fatal: The remote end hung up unexpectedly
+# fatal: The remote end hung up unexpectedly
+#
+# For more information see http://stackoverflow.com/a/21682112/752049
+#
+timeout 60
# feel free to point this anywhere accessible on the filesystem
pid "/home/git/gitlab/tmp/pids/unicorn.pid"
diff --git a/doc/integration/bitbucket.md b/doc/integration/bitbucket.md
index cc6389f5aafcbd8c83ea149437098ff76ccbc82b..d82e1f8b41ba02c89e8155099628b5fad30c144c 100644
--- a/doc/integration/bitbucket.md
+++ b/doc/integration/bitbucket.md
@@ -2,7 +2,7 @@
Import projects from Bitbucket and login to your GitLab instance with your Bitbucket account.
-To enable the Bitbucket OmniAuth provider you must register your application with Bitbucket.
+To enable the Bitbucket OmniAuth provider you must register your application with Bitbucket.
Bitbucket will generate an application ID and secret key for you to use.
1. Sign in to Bitbucket.
@@ -19,8 +19,8 @@ Bitbucket will generate an application ID and secret key for you to use.
- URL: The URL to your GitLab installation. 'https://gitlab.company.com'
1. Select "Save".
-1. You should now see a Key and Secret in the list of OAuth customers.
- Keep this page open as you continue configuration.
+1. You should now see a Key and Secret in the list of OAuth customers.
+ Keep this page open as you continue configuration.
1. On your GitLab server, open the configuration file.
@@ -70,13 +70,13 @@ Bitbucket will generate an application ID and secret key for you to use.
1. Restart GitLab for the changes to take effect.
-On the sign in page there should now be a Bitbucket icon below the regular sign in form.
-Click the icon to begin the authentication process. Bitbucket will ask the user to sign in and authorize the GitLab application.
+On the sign in page there should now be a Bitbucket icon below the regular sign in form.
+Click the icon to begin the authentication process. Bitbucket will ask the user to sign in and authorize the GitLab application.
If everything goes well the user will be returned to GitLab and will be signed in.
## Bitbucket project import
-To allow projects to be imported directly into GitLab, Bitbucket requires two extra setup steps compared to GitHub and GitLab.com.
+To allow projects to be imported directly into GitLab, Bitbucket requires two extra setup steps compared to GitHub and GitLab.com.
Bitbucket doesn't allow OAuth applications to clone repositories over HTTPS, and instead requires GitLab to use SSH and identify itself using your GitLab server's SSH key.
@@ -95,7 +95,7 @@ To allow GitLab to connect to Bitbucket over SSH, you need to add 'bitbucket.org
```sh
The authenticity of host 'bitbucket.org (207.223.240.182)' can't be established.
RSA key fingerprint is 97:8c:1b:f2:6f:14:6b:5c:3b:ec:aa:46:46:74:7c:40.
- Are you sure you want to continue connecting (yes/no)?
+ Are you sure you want to continue connecting (yes/no)?
```
1. If the fingerprint matches, type `yes` to continue connecting and have 'bitbucket.org' be added to your known hosts.
@@ -104,7 +104,7 @@ To allow GitLab to connect to Bitbucket over SSH, you need to add 'bitbucket.org
### Step 2: Public key
-To be able to access repositories on Bitbucket, GitLab will automatically register your public key with Bitbucket as a deploy key for the repositories to be imported. Your public key needs to be at `~/.ssh/id_rsa.pub`, which will expand to `/home/git/.ssh/id_rsa.pub` in most configurations.
+To be able to access repositories on Bitbucket, GitLab will automatically register your public key with Bitbucket as a deploy key for the repositories to be imported. Your public key needs to be at `~/.ssh/bitbucket_rsa.pub`, which will expand to `/home/git/.ssh/bitbucket_rsa.pub` in most configurations.
If you have that file in place, you're all set and should see the "Import projects from Bitbucket" option enabled. If you don't, do the following:
@@ -114,6 +114,7 @@ If you have that file in place, you're all set and should see the "Import projec
sudo -u git -H ssh-keygen
```
+ When asked `Enter file in which to save the key` specify the correct path, eg. `/home/git/.ssh/bitbucket_rsa`.
Make sure to use an **empty passphrase**.
2. Restart GitLab to allow it to find the new public key.
diff --git a/features/admin/settings.feature b/features/admin/settings.feature
index 8fdf0575c2c346f8457cebd37982f3f02d0aeeb4..52e47307b23494f57c351161b0730a0b29de68e3 100644
--- a/features/admin/settings.feature
+++ b/features/admin/settings.feature
@@ -7,3 +7,10 @@ Feature: Admin Settings
Scenario: Change application settings
When I modify settings and save form
Then I should see application settings saved
+
+ Scenario: Change Slack Service Template settings
+ When I click on "Service Templates"
+ And I click on "Slack" service
+ Then I check all events and submit form
+ And I should see service template settings saved
+ And I should see all checkboxes checked
diff --git a/features/dashboard/new_project.feature b/features/dashboard/new_project.feature
new file mode 100644
index 0000000000000000000000000000000000000000..431dc4ccfcb258c50a042274bb53d40832049b3b
--- /dev/null
+++ b/features/dashboard/new_project.feature
@@ -0,0 +1,13 @@
+@dashboard
+Feature: New Project
+Background:
+ Given I sign in as a user
+ And I own project "Shop"
+ And I visit dashboard page
+
+ @javascript
+ Scenario: I should see New projects page
+ Given I click "New project" link
+ Then I see "New project" page
+ When I click on "Import project from GitHub"
+ Then I see instructions on how to import from GitHub
diff --git a/features/steps/admin/settings.rb b/features/steps/admin/settings.rb
index c2d0d2a3fa35ca17eace300b9ee3b509a417322a..87d4e969ff51ec1582b3c0b568d94cc59e19ec15 100644
--- a/features/steps/admin/settings.rb
+++ b/features/steps/admin/settings.rb
@@ -15,4 +15,33 @@ class Spinach::Features::AdminSettings < Spinach::FeatureSteps
current_application_settings.home_page_url.should == 'https://about.gitlab.com/'
page.should have_content 'Application settings saved successfully'
end
+
+ step 'I click on "Service Templates"' do
+ click_link 'Service Templates'
+ end
+
+ step 'I click on "Slack" service' do
+ click_link 'Slack'
+ end
+
+ step 'I check all events and submit form' do
+ page.check('Active')
+ page.check('Push events')
+ page.check('Tag push events')
+ page.check('Comments')
+ page.check('Issues events')
+ page.check('Merge Request events')
+ fill_in 'Webhook', with: "http://localhost"
+ click_on 'Save'
+ end
+
+ step 'I should see service template settings saved' do
+ page.should have_content 'Application settings saved successfully'
+ end
+
+ step 'I should see all checkboxes checked' do
+ all('input[type=checkbox]').each do |checkbox|
+ checkbox.should be_checked
+ end
+ end
end
diff --git a/features/steps/dashboard/new_project.rb b/features/steps/dashboard/new_project.rb
new file mode 100644
index 0000000000000000000000000000000000000000..5e588ceb780c7f4196ad2702a0adbf6b81370662
--- /dev/null
+++ b/features/steps/dashboard/new_project.rb
@@ -0,0 +1,27 @@
+class Spinach::Features::NewProject < Spinach::FeatureSteps
+ include SharedAuthentication
+ include SharedPaths
+ include SharedProject
+
+ step 'I click "New project" link' do
+ click_link "New project"
+ end
+
+ step 'I see "New project" page' do
+ page.should have_content("Project path")
+ end
+
+ step 'I click on "Import project from GitHub"' do
+ first('.how_to_import_link').click
+ end
+
+ step 'I see instructions on how to import from GitHub' do
+ github_modal = first('.modal-body')
+ github_modal.should be_visible
+ github_modal.should have_content "To enable importing projects from GitHub"
+
+ all('.modal-body').each do |element|
+ element.should_not be_visible unless element == github_modal
+ end
+ end
+end
diff --git a/lib/backup/repository.rb b/lib/backup/repository.rb
index e18bc8044373af95793a69277403e0eec0283f40..dfb2da9f84e4b2598a3074fcf285e5242ebfe695 100644
--- a/lib/backup/repository.rb
+++ b/lib/backup/repository.rb
@@ -16,7 +16,7 @@ module Backup
if project.empty_repo?
$progress.puts "[SKIPPED]".cyan
else
- cmd = %W(git --git-dir=#{path_to_repo(project)} bundle create #{path_to_bundle(project)} --all)
+ cmd = %W(tar -cf #{path_to_bundle(project)} -C #{path_to_repo(project)} .)
output, status = Gitlab::Popen.popen(cmd)
if status.zero?
$progress.puts "[DONE]".green
@@ -64,7 +64,8 @@ module Backup
project.namespace.ensure_dir_exist if project.namespace
if File.exists?(path_to_bundle(project))
- cmd = %W(git clone --bare #{path_to_bundle(project)} #{path_to_repo(project)})
+ FileUtils.mkdir_p(path_to_repo(project))
+ cmd = %W(tar -xf #{path_to_bundle(project)} -C #{path_to_repo(project)})
else
cmd = %W(git init --bare #{path_to_repo(project)})
end
diff --git a/lib/gitlab/bitbucket_import/client.rb b/lib/gitlab/bitbucket_import/client.rb
index 1e4906c9e31785d9929cad0453b3a312e07d8601..5b1952b9675f126671b0d85db88e149e13b52f54 100644
--- a/lib/gitlab/bitbucket_import/client.rb
+++ b/lib/gitlab/bitbucket_import/client.rb
@@ -62,7 +62,7 @@ module Gitlab
end
def find_deploy_key(project_identifier, key)
- JSON.parse(api.get("/api/1.0/repositories/#{project_identifier}/deploy-keys").body).find do |deploy_key|
+ JSON.parse(api.get("/api/1.0/repositories/#{project_identifier}/deploy-keys").body).find do |deploy_key|
deploy_key["key"].chomp == key.chomp
end
end
@@ -92,7 +92,7 @@ module Gitlab
end
def bitbucket_options
- OmniAuth::Strategies::Bitbucket.default_options[:client_options].dup
+ OmniAuth::Strategies::Bitbucket.default_options[:client_options].symbolize_keys
end
end
end
diff --git a/lib/gitlab/github_import/client.rb b/lib/gitlab/github_import/client.rb
index 7fe076b333b6c109bdb46af8c4bb082629f70fc4..270cbcd9ccd92b9ec35da9d90ec688b81f05b983 100644
--- a/lib/gitlab/github_import/client.rb
+++ b/lib/gitlab/github_import/client.rb
@@ -46,7 +46,7 @@ module Gitlab
end
def github_options
- OmniAuth::Strategies::GitHub.default_options[:client_options].dup
+ OmniAuth::Strategies::GitHub.default_options[:client_options].symbolize_keys
end
end
end
diff --git a/lib/gitlab/gitlab_import/client.rb b/lib/gitlab/gitlab_import/client.rb
index 2236439c6cef353e2fd2b83a5fe6d9b028a3d6ff..f48ede9d06795fb87f12eb128b2c5af783ec60e3 100644
--- a/lib/gitlab/gitlab_import/client.rb
+++ b/lib/gitlab/gitlab_import/client.rb
@@ -71,7 +71,7 @@ module Gitlab
end
def gitlab_options
- OmniAuth::Strategies::GitLab.default_options[:client_options].dup
+ OmniAuth::Strategies::GitLab.default_options[:client_options].symbolize_keys
end
end
end
diff --git a/lib/gitlab/ldap/person.rb b/lib/gitlab/ldap/person.rb
index 3c426179375a7aa83d19179bb7e4bb1f4573ac56..b81f3e8e8f5b8d18312cc583b5239de090663853 100644
--- a/lib/gitlab/ldap/person.rb
+++ b/lib/gitlab/ldap/person.rb
@@ -14,7 +14,6 @@ module Gitlab
end
def self.find_by_dn(dn, adapter)
- dn = Net::LDAP::Filter.escape(dn)
adapter.user('dn', dn)
end
diff --git a/lib/gitlab/middleware/timeout.rb b/lib/gitlab/middleware/timeout.rb
deleted file mode 100644
index 015600392b90747891880c85ee9b3e0e2e6b55b2..0000000000000000000000000000000000000000
--- a/lib/gitlab/middleware/timeout.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-module Gitlab
- module Middleware
- class Timeout < Rack::Timeout
- GRACK_REGEX = /[-\/\w\.]+\.git\//.freeze
-
- def call(env)
- return @app.call(env) if env['PATH_INFO'] =~ GRACK_REGEX
-
- super
- end
- end
- end
-end
diff --git a/lib/gitlab/push_data_builder.rb b/lib/gitlab/push_data_builder.rb
index ea9012b884498a9995db2e410261758fbf961eea..1e35f67ca0ff440ddbef1a8ef003afb7dc2bd5fd 100644
--- a/lib/gitlab/push_data_builder.rb
+++ b/lib/gitlab/push_data_builder.rb
@@ -28,6 +28,12 @@ module Gitlab
# Get latest 20 commits ASC
commits_limited = commits.last(20)
+ # For performance purposes maximum 20 latest commits
+ # will be passed as post receive hook data.
+ commit_attrs = commits_limited.map do |commit|
+ commit.hook_attrs(project)
+ end
+
type = Gitlab::Git.tag_ref?(ref) ? "tag_push" : "push"
# Hash to be passed as post_receive_data
data = {
@@ -49,17 +55,10 @@ module Gitlab
git_ssh_url: project.ssh_url_to_repo,
visibility_level: project.visibility_level
},
- commits: [],
+ commits: commit_attrs,
total_commits_count: commits_count
}
- # For performance purposes maximum 20 latest commits
- # will be passed as post receive hook data.
- commits_limited.each do |commit|
- data[:commits] << commit.hook_attrs(project)
- end
-
- data[:commits] = "" if data[:commits].count == 0
data
end
diff --git a/lib/gitlab/visibility_level.rb b/lib/gitlab/visibility_level.rb
index 1851e76067c0c01eda9216a712500fdb3d9de2e7..582fc759efd2026ef45165b08c9c5541c6c11d54 100644
--- a/lib/gitlab/visibility_level.rb
+++ b/lib/gitlab/visibility_level.rb
@@ -35,7 +35,13 @@ module Gitlab
end
def non_restricted_level?(level)
- ! current_application_settings.restricted_visibility_levels.include?(level)
+ restricted_levels = current_application_settings.restricted_visibility_levels
+
+ if restricted_levels.nil?
+ true
+ else
+ !restricted_levels.include?(level)
+ end
end
def valid_level?(level)
diff --git a/public/503.html b/public/503.html
deleted file mode 100644
index efdae0f512df50bfb1e235491f4408648b07462c..0000000000000000000000000000000000000000
--- a/public/503.html
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
- Page took too long to load (503)
-
-
-
- 503
- Page took too long to load.
-
- Please contact your GitLab administrator if this problem persists.
-
-
diff --git a/spec/lib/gitlab/bitbucket_import/client_spec.rb b/spec/lib/gitlab/bitbucket_import/client_spec.rb
new file mode 100644
index 0000000000000000000000000000000000000000..dd450e9967b338f0b0ffb2929fb1afd1749272c2
--- /dev/null
+++ b/spec/lib/gitlab/bitbucket_import/client_spec.rb
@@ -0,0 +1,17 @@
+require 'spec_helper'
+
+describe Gitlab::BitbucketImport::Client do
+ let(:token) { '123456' }
+ let(:secret) { 'secret' }
+ let(:client) { Gitlab::BitbucketImport::Client.new(token, secret) }
+
+ before do
+ Gitlab.config.omniauth.providers << OpenStruct.new(app_id: "asd123", app_secret: "asd123", name: "bitbucket")
+ end
+
+ it 'all OAuth client options are symbols' do
+ client.consumer.options.keys.each do |key|
+ expect(key).to be_kind_of(Symbol)
+ end
+ end
+end
diff --git a/spec/lib/gitlab/github_import/client_spec.rb b/spec/lib/gitlab/github_import/client_spec.rb
new file mode 100644
index 0000000000000000000000000000000000000000..26618120316ace4d5aef3ddf6eab3f5b7d546a21
--- /dev/null
+++ b/spec/lib/gitlab/github_import/client_spec.rb
@@ -0,0 +1,16 @@
+require 'spec_helper'
+
+describe Gitlab::GithubImport::Client do
+ let(:token) { '123456' }
+ let(:client) { Gitlab::GithubImport::Client.new(token) }
+
+ before do
+ Gitlab.config.omniauth.providers << OpenStruct.new(app_id: "asd123", app_secret: "asd123", name: "github")
+ end
+
+ it 'all OAuth2 client options are symbols' do
+ client.client.options.keys.each do |key|
+ expect(key).to be_kind_of(Symbol)
+ end
+ end
+end
diff --git a/spec/lib/gitlab/gitlab_import/client_spec.rb b/spec/lib/gitlab/gitlab_import/client_spec.rb
new file mode 100644
index 0000000000000000000000000000000000000000..c511c51547409ac98519b97c4b4de59159c4d139
--- /dev/null
+++ b/spec/lib/gitlab/gitlab_import/client_spec.rb
@@ -0,0 +1,16 @@
+require 'spec_helper'
+
+describe Gitlab::GitlabImport::Client do
+ let(:token) { '123456' }
+ let(:client) { Gitlab::GitlabImport::Client.new(token) }
+
+ before do
+ Gitlab.config.omniauth.providers << OpenStruct.new(app_id: "asd123", app_secret: "asd123", name: "gitlab")
+ end
+
+ it 'all OAuth2 client options are symbols' do
+ client.client.options.keys.each do |key|
+ expect(key).to be_kind_of(Symbol)
+ end
+ end
+end