Commit bba525d0 authored by Clement Ho's avatar Clement Ho

Merge branch 'ce-to-ee-2018-02-21' into 'master'

CE upstream - 2018-02-21 18:26 UTC

See merge request gitlab-org/gitlab-ee!4657
parents 24ad9469 da55884c
......@@ -686,7 +686,9 @@ codequality:
cache: {}
dependencies: []
script:
- ./scripts/codequality analyze -f json > codeclimate.json || true
- ./scripts/codequality analyze -f json > raw_codeclimate.json || true
# The following line keeps only the fields used in the MR widget, reducing the JSON artifact size
- cat raw_codeclimate.json | docker run -i stedolan/jq -c 'map({check_name,description,fingerprint,location})' > codeclimate.json
artifacts:
paths: [codeclimate.json]
expire_in: 1 week
......
......@@ -84,7 +84,7 @@ gem 'gollum-lib', '~> 4.2', require: false
gem 'gollum-rugged_adapter', '~> 0.4.4', require: false
# Language detection
gem 'github-linguist', '~> 4.7.0', require: 'linguist'
gem 'github-linguist', '~> 5.3.3', require: 'linguist'
# API
gem 'grape', '~> 1.0'
......@@ -430,7 +430,7 @@ gem 'gitaly-proto', '~> 0.84.0', require: 'gitaly'
# Locked until https://github.com/google/protobuf/issues/4210 is closed
gem 'google-protobuf', '= 3.5.1'
gem 'toml-rb', '~> 0.3.15', require: false
gem 'toml-rb', '~> 1.0.0', require: false
# Feature toggles
gem 'flipper', '~> 0.11.0'
......
......@@ -312,11 +312,11 @@ GEM
gitaly-proto (0.84.0)
google-protobuf (~> 3.1)
grpc (~> 1.0)
github-linguist (4.7.6)
charlock_holmes (~> 0.7.3)
github-linguist (5.3.3)
charlock_holmes (~> 0.7.5)
escape_utils (~> 1.1.0)
mime-types (>= 1.19)
rugged (>= 0.23.0b)
rugged (>= 0.25.1)
github-markup (1.6.1)
gitlab-flowdock-git-hook (1.0.1)
flowdock (~> 0.7)
......@@ -953,7 +953,7 @@ GEM
timfel-krb5-auth (0.8.3)
toml (0.1.2)
parslet (~> 1.5.0)
toml-rb (0.3.15)
toml-rb (1.0.0)
citrus (~> 3.0, > 3.0)
truncato (0.7.10)
htmlentities (~> 4.3.1)
......@@ -1092,7 +1092,7 @@ DEPENDENCIES
gettext_i18n_rails (~> 1.8.0)
gettext_i18n_rails_js (~> 1.2.0)
gitaly-proto (~> 0.84.0)
github-linguist (~> 4.7.0)
github-linguist (~> 5.3.3)
gitlab-flowdock-git-hook (~> 1.0.1)
gitlab-license (~> 1.0)
gitlab-markup (~> 1.6.2)
......@@ -1238,7 +1238,7 @@ DEPENDENCIES
test_after_commit (~> 1.1)
thin (~> 1.7.0)
timecop (~> 0.8.0)
toml-rb (~> 0.3.15)
toml-rb (~> 1.0.0)
truncato (~> 0.7.9)
u2f (~> 0.2.1)
uglifier (~> 2.7.2)
......
......@@ -167,7 +167,7 @@ label {
.input-group {
.select2-container {
display: table-cell;
width: 200px !important;
max-width: 180px;
}
.input-group-addon {
......
......@@ -8,7 +8,7 @@
.select2-choice {
background: $white-light;
border-color: $input-border;
height: 35px;
height: 34px;
padding: $gl-vert-padding $gl-input-padding;
font-size: $gl-font-size;
line-height: 1.42857143;
......
......@@ -565,6 +565,7 @@ $jq-ui-default-color: #777;
/*
* Label
*/
$label-font-size: 12px;
$label-padding: 7px;
$label-padding-modal: 10px;
$label-gray-bg: #f8fafc;
......
......@@ -72,7 +72,6 @@
.label {
color: $gl-text-color;
font-size: inherit;
}
iframe.twitter-share-button {
......
......@@ -102,12 +102,11 @@
.issuable-show-labels {
a {
margin-right: 5px;
margin-bottom: 5px;
display: inline-block;
.color-label {
padding: 6px 10px;
padding: 4px $grid-size;
border-radius: $label-border-radius;
}
......
......@@ -105,13 +105,16 @@
}
.label {
padding: 8px 12px;
font-size: 14px;
padding: 4px $grid-size;
font-size: $label-font-size;
position: relative;
top: ($grid-size / 2);
}
}
.color-label {
padding: 3px $label-padding;
padding: 0 $grid-size;
line-height: 16px;
border-radius: $label-border-radius;
}
......@@ -302,10 +305,11 @@
}
.label-link {
display: inline-block;
display: inline-flex;
vertical-align: top;
.label {
vertical-align: inherit;
font-size: $label-font-size;
}
}
......@@ -115,6 +115,10 @@
display: block;
margin-top: 7px;
.issue-link {
display: inline-block;
}
.issuable-number {
color: $gl-text-color-secondary;
margin-right: 5px;
......
......@@ -128,7 +128,6 @@
.label {
color: $gl-text-color;
font-size: inherit;
}
p {
......
......@@ -160,7 +160,7 @@ class Blob < SimpleDelegator
if stored_externally?
if rich_viewer
rich_viewer.binary?
elsif Linguist::Language.find_by_filename(name).any?
elsif Linguist::Language.find_by_extension(name).any?
false
elsif _mime_type
_mime_type.binary?
......
......@@ -687,8 +687,11 @@
= f.label :version_check_enabled do
= f.check_box :version_check_enabled
Version check enabled
= link_to icon('question-circle'), help_page_path("user/admin_area/settings/usage_statistics", anchor: "version-check")
.help-block
Let GitLab inform you when an update is available.
Let GitLab inform you when an update is available. When
enabled, GitLab Inc. will collect info about your hostname
and version.
.form-group
.col-sm-offset-2.col-sm-10
- can_be_configured = @application_setting.usage_ping_can_be_configured?
......
......@@ -17,7 +17,7 @@
= confidential_icon(issuable)
= link_to issuable.title, issuable_url_args, title: issuable.title
.issuable-detail
= link_to [namespace, project, issuable] do
= link_to [namespace, project, issuable], class: 'issue-link' do
%span.issuable-number= issuable.to_reference
- labels.each do |label|
......
......@@ -92,7 +92,7 @@
// Fallback while content is loading
.title.hide-collapsed
= _('Time tracking')
= icon('spinner spin', 'aria-hidden': 'true')
= icon('spinner spin')
= render 'shared/milestones/weight', milestone: milestone
......
---
title: Add missing pagination on the commit diff endpoint
merge_request: 17203
author: Maxime Roussin-Bélanger
type: fixed
---
title: Update to github-linguist 5.3.x
merge_request: 17241
author: Ken Ding
type: other
---
title: remove avater underline
merge_request: 17219
author: Ken Ding
type: fixed
---
title: update toml-rb to 1.0.0
merge_request: 17259
author: Ken Ding
type: other
---
title: Fix get a single pages domain when project path contains a period
merge_request: 17206
author: Travis Miller
type: fixed
---
title: Allow to call PUT /projects/:id API with only ci_config_path specified
merge_request: 17105
author: Laszlo Karpati
type: fixed
---
title: "#28481: Display time tracking totals on milestone page"
merge_request: 16753
author: Riccardo Padovani
type: added
---
title: Apply new default and inline label design
merge_request: 16956
author: George Tsiolis
type: changed
---
title: Fix new project path input overlapping
merge_request: 16755
author: George Tsiolis
type: fixed
---
title: Add more info about data collected when version check is enabled
merge_request: 17257
author:
type: changed
......@@ -5,5 +5,5 @@ Explore our features to monitor your GitLab instance:
- [Performance monitoring](performance/index.md): GitLab Performance Monitoring makes it possible to measure a wide variety of statistics of your instance.
- [Prometheus](prometheus/index.md): Prometheus is a powerful time-series monitoring service, providing a flexible platform for monitoring GitLab and other software products.
- [GitHub imports](github_imports.md): Monitor the health and progress of GitLab's GitHub importer with various Prometheus metrics.
- [Monitoring uptime](../user/admin_area/monitoring/health_check.md): Check the server status using the health check endpoint.
- [Monitoring uptime](../../user/admin_area/monitoring/health_check.md): Check the server status using the health check endpoint.
- [IP whitelists](ip_whitelist.md): Configure GitLab for monitoring endpoints that provide health check information when probed.
......@@ -276,7 +276,7 @@ To enable per-branch caching:
```yaml
cache:
key: "$CI_COMMIT_REF_NAME"
key: "$CI_COMMIT_REF_SLUG"
untracked: true
```
......@@ -284,7 +284,7 @@ To enable per-job and per-branch caching:
```yaml
cache:
key: "$CI_JOB_NAME-$CI_COMMIT_REF_NAME"
key: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG"
untracked: true
```
......@@ -292,7 +292,7 @@ To enable per-branch and per-stage caching:
```yaml
cache:
key: "$CI_JOB_STAGE-$CI_COMMIT_REF_NAME"
key: "$CI_JOB_STAGE-$CI_COMMIT_REF_SLUG"
untracked: true
```
......@@ -301,7 +301,7 @@ If you use **Windows Batch** to run your shell scripts you need to replace
```yaml
cache:
key: "%CI_JOB_STAGE%-%CI_COMMIT_REF_NAME%"
key: "%CI_JOB_STAGE%-%CI_COMMIT_REF_SLUG%"
untracked: true
```
......@@ -310,7 +310,7 @@ If you use **Windows PowerShell** to run your shell scripts you need to replace
```yaml
cache:
key: "$env:CI_JOB_STAGE-$env:CI_COMMIT_REF_NAME"
key: "$env:CI_JOB_STAGE-$env:CI_COMMIT_REF_SLUG"
untracked: true
```
......
......@@ -10,8 +10,9 @@ under **Admin area > Settings > Usage statistics**.
GitLab can inform you when an update is available and the importance of it.
No information other than the GitLab version and the instance's hostname (through the HTTP referer)
are collected.
GitLab Inc. collects version statistics, but no information other than
the GitLab version and the instance's hostname (through the HTTP
referer) is collected.
In the **Overview** tab you can see if your GitLab version is up to date. There
are three cases: 1) you are up to date (green), 2) there is an update available
......
......@@ -227,7 +227,7 @@ https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/user/markdown.md#emoji
If you are new to this, don't be :fearful:. You can easily join the emoji :family:. All you need to do is to look up on the supported codes.
Consult the [Emoji Cheat Sheet](http://emoji.codes) for a list of all supported emoji codes. :thumbsup:
Consult the [Emoji Cheat Sheet](https://www.emojicopy.com) for a list of all supported emoji codes. :thumbsup:
Sometimes you want to :monkey: around a bit and add some :star2: to your :speech_balloon:. Well we have a gift for you:
......@@ -237,7 +237,7 @@ You can use it to point out a :bug: or warn about :speak_no_evil: patches. And i
If you are new to this, don't be :fearful:. You can easily join the emoji :family:. All you need to do is to look up on the supported codes.
Consult the [Emoji Cheat Sheet](http://emoji.codes) for a list of all supported emoji codes. :thumbsup:
Consult the [Emoji Cheat Sheet](https://www.emojicopy.com) for a list of all supported emoji codes. :thumbsup:
### Special GitLab References
......
......@@ -102,13 +102,16 @@ module API
end
params do
requires :sha, type: String, desc: 'A commit sha, or the name of a branch or tag'
use :pagination
end
get ':id/repository/commits/:sha/diff', requirements: API::COMMIT_ENDPOINT_REQUIREMENTS do
commit = user_project.commit(params[:sha])
not_found! 'Commit' unless commit
present commit.raw_diffs.to_a, with: Entities::Diff
raw_diffs = ::Kaminari.paginate_array(commit.raw_diffs.to_a)
present paginate(raw_diffs), with: Entities::Diff
end
desc "Get a commit's comments" do
......
......@@ -2,6 +2,8 @@ module API
class PagesDomains < Grape::API
include PaginationParams
PAGES_DOMAINS_ENDPOINT_REQUIREMENTS = API::PROJECT_ENDPOINT_REQUIREMENTS.merge(domain: API::NO_SLASH_URL_PART_REGEX)
before do
authenticate!
end
......@@ -48,7 +50,7 @@ module API
params do
requires :id, type: String, desc: 'The ID of a project'
end
resource :projects, requirements: { id: %r{[^/]+} } do
resource :projects, requirements: API::PROJECT_ENDPOINT_REQUIREMENTS do
before do
require_pages_enabled!
end
......@@ -71,7 +73,7 @@ module API
params do
requires :domain, type: String, desc: 'The domain'
end
get ":id/pages/domains/:domain", requirements: { domain: %r{[^/]+} } do
get ":id/pages/domains/:domain", requirements: PAGES_DOMAINS_ENDPOINT_REQUIREMENTS do
authorize! :read_pages, user_project
present pages_domain, with: Entities::PagesDomain
......@@ -105,7 +107,7 @@ module API
optional :certificate, allow_blank: false, types: [File, String], desc: 'The certificate'
optional :key, allow_blank: false, types: [File, String], desc: 'The key'
end
put ":id/pages/domains/:domain", requirements: { domain: %r{[^/]+} } do
put ":id/pages/domains/:domain", requirements: PAGES_DOMAINS_ENDPOINT_REQUIREMENTS do
authorize! :update_pages, user_project
pages_domain_params = declared(params, include_parent_namespaces: false)
......@@ -126,7 +128,7 @@ module API
params do
requires :domain, type: String, desc: 'The domain'
end
delete ":id/pages/domains/:domain", requirements: { domain: %r{[^/]+} } do
delete ":id/pages/domains/:domain", requirements: PAGES_DOMAINS_ENDPOINT_REQUIREMENTS do
authorize! :update_pages, user_project
status 204
......
......@@ -277,6 +277,7 @@ module API
[
:jobs_enabled,
:resolve_outdated_diff_discussions,
:ci_config_path,
:container_registry_enabled,
:default_branch,
:description,
......
......@@ -23,7 +23,7 @@ module Gitlab
end
def stop_working
server.shutdown
server.shutdown if server
@server = nil
end
......
......@@ -37,7 +37,7 @@ module Gitlab
config[:'gitlab-shell'] = { dir: Gitlab.config.gitlab_shell.path }
config[:bin_dir] = Gitlab.config.gitaly.client_path
TOML.dump(config)
TomlRB.dump(config)
end
# rubocop:disable Rails/Output
......
......@@ -2,7 +2,7 @@ namespace :gitlab do
namespace :gitaly do
desc "GitLab | Install or upgrade gitaly"
task :install, [:dir, :repo] => :gitlab_environment do |t, args|
require 'toml'
require 'toml-rb'
warn_user_is_not_gitlab
......@@ -38,7 +38,7 @@ namespace :gitlab do
desc "GitLab | Print storage configuration in TOML format"
task storage_config: :environment do
require 'toml'
require 'toml-rb'
puts "# Gitaly storage configuration generated from #{Gitlab.config.source} on #{Time.current.to_s(:long)}"
puts "# This is in TOML format suitable for use in Gitaly's config.toml file."
......
......@@ -8,6 +8,7 @@ code_path=$(pwd)
# it will break codequality json file
[ "$CI" != "" ] || docker_tty="--tty"
# The codebase and instructions for the following image can be found at https://gitlab.com/gitlab-org/codeclimate-rubocop/wikis/home
docker pull dev.gitlab.org:5005/gitlab/gitlab-build-images:gitlab-codeclimate-rubocop-0-52-1 > /dev/null
docker tag dev.gitlab.org:5005/gitlab/gitlab-build-images:gitlab-codeclimate-rubocop-0-52-1 codeclimate/codeclimate-rubocop:gitlab-codeclimate-rubocop-0-52-1 > /dev/null
......
......@@ -1590,7 +1590,7 @@ describe Gitlab::Git::Repository, seed_helper: true do
expected_languages = [
{ value: 66.63, label: "Ruby", color: "#701516", highlight: "#701516" },
{ value: 22.96, label: "JavaScript", color: "#f1e05a", highlight: "#f1e05a" },
{ value: 7.9, label: "HTML", color: "#e44b23", highlight: "#e44b23" },
{ value: 7.9, label: "HTML", color: "#e34c26", highlight: "#e34c26" },
{ value: 2.51, label: "CoffeeScript", color: "#244776", highlight: "#244776" }
]
......
......@@ -706,6 +706,7 @@ describe API::Commits do
get api(route, current_user)
expect(response).to have_gitlab_http_status(200)
expect(response).to include_pagination_headers
expect(json_response.size).to be >= 1
expect(json_response.first.keys).to include 'diff'
end
......
require 'rails_helper'
describe API::PagesDomains do
set(:project) { create(:project) }
set(:project) { create(:project, path: 'my.project') }
set(:user) { create(:user) }
set(:admin) { create(:admin) }
......@@ -16,6 +16,7 @@ describe API::PagesDomains do
let(:route) { "/projects/#{project.id}/pages/domains" }
let(:route_domain) { "/projects/#{project.id}/pages/domains/#{pages_domain.domain}" }
let(:route_domain_path) { "/projects/#{project.path_with_namespace.gsub('/', '%2F')}/pages/domains/#{pages_domain.domain}" }
let(:route_secure_domain) { "/projects/#{project.id}/pages/domains/#{pages_domain_secure.domain}" }
let(:route_expired_domain) { "/projects/#{project.id}/pages/domains/#{pages_domain_expired.domain}" }
let(:route_vacant_domain) { "/projects/#{project.id}/pages/domains/www.vacant-domain.test" }
......@@ -144,6 +145,16 @@ describe API::PagesDomains do
expect(json_response['certificate']).to be_nil
end
it 'returns pages domain with project path' do
get api(route_domain_path, user)
expect(response).to have_gitlab_http_status(200)
expect(response).to match_response_schema('public_api/v4/pages_domain/detail')
expect(json_response['domain']).to eq(pages_domain.domain)
expect(json_response['url']).to eq(pages_domain.url)
expect(json_response['certificate']).to be_nil
end
it 'returns pages domain with a certificate' do
get api(route_secure_domain, user)
......
require 'rspec/mocks'
require 'toml'
require 'toml-rb'
module TestEnv
extend self
......
......@@ -132,7 +132,7 @@ describe 'gitlab:gitaly namespace rake task' do
expect { run_rake_task('gitlab:gitaly:storage_config')}
.to output(expected_output).to_stdout
parsed_output = TOML.parse(expected_output)
parsed_output = TomlRB.parse(expected_output)
config.each do |name, params|
expect(parsed_output['storage']).to include({ 'name' => name, 'path' => params['path'] })
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment