Commit Graph
1774 Commits
Author SHA1 Message Date
Robert Speicher 51c167eeb7 Enable Performance/RangeInclude cop and fix single offense 2016-05-23 13:10:42 -04:00
Grzegorz Bizon 7f9092da1e Extend comment for migrations helper MySQL fix 2016-05-22 23:31:33 +02:00
Grzegorz Bizon 2df8b48dbb Add MySQL compatibility fix in migration helpers 2016-05-22 22:44:59 +02:00
Douwe Maan ec86644545 Merge branch 'zj-gitignore-dropdown' 2016-05-20 17:14:22 -05:00
Douwe Maan fc1910ddc5 Merge branch 'adambutler/gitlab-ce-feature/support-diff-of-issue-title-rename'
# Conflicts:
#	app/services/system_note_service.rb
2016-05-20 16:23:04 -05:00
Zeger-Jan van de WegandAlfredo Sumaran 79620c501d Update API and fetching task 2016-05-20 15:58:36 -05:00
Zeger-Jan van de WegandAlfredo Sumaran e166a8022a Backend for a gitignores dropdown 2016-05-20 15:58:36 -05:00
Douwe Maan 18ef054bc7 Merge branch '17464-backport-email-syntax-highlighting' into 'master'
Syntax-highlight diffs in push emails

![image](/uploads/8ecbabc65382214b8de63aae24f66cea/image.png)

Based on:
https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/151



See merge request !4147
2016-05-19 21:12:53 +00:00
Yorick Peterse c22be75794 Removed outdated comment from migration helpers 2016-05-19 12:36:02 -05:00
Robert Speicher 883e2d2187 Merge branch 'migration-helpers' into 'master'
Added helper methods for database migrations

These helpers can ultimately be used to write migrations that don't
require downtime.

See #15464 for more information.

See merge request !3860
2016-05-19 16:49:14 +00:00
Yorick Peterse 59640866ce Remove left-over use of strip_heredoc 2016-05-19 10:04:46 -05:00
Stan Hu e9ecbd3d4e Fix warning messages with SVG ALLOWED_ELEMENTS
Eliminates "warning: already initialized constant Gitlab::Sanitizers::SVG::ALLOWED_ELEMENTS"
2016-05-19 01:35:04 -05:00
Robert Speicher 4607323e13 Merge branch 'issue_17560' into 'master'
Mask credentials from URL when the import of project has failed.

REF: #17560 

See merge request !4185
2016-05-19 03:00:01 +00:00
Rubén Dávila 0c47b68d04 Mask credentials from URL when import of project has failed. 2016-05-18 21:16:36 -05:00
Rémy Coutable 5341b16fc9 Reuse existing SCSS variables
Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-05-18 13:20:46 -05:00
Kamil Trzciński 08fddae744 Merge branch 'docker-registry-view' into 'master'
Add container registry support

Tasks:

- [x] Merge docker/distribution authentication service: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/3787
- [x] Implement Docker Registry API
- [x] Show a list of docker images in GitLab
- [x] Remove registry repository on project deletion
- [x] Support project rename, move and namespace rename
- [x] Use token when connecting the registry
- [x] Allow to delete images from GitLab
- [x] Support pushing from GitLab CI (gitlab-ci-token / $CI_BUILD_TOKEN)
- [x] Support GitLab Runner pulling for public repositories
- [ ] Support GitLab Runner pulling for private repositories
- [x] Add tests for Docker Registry API
- [x] Add tests for a views
- [x] Make texts nicer
- [x] Implement a backup support

- [ ] Create administration documentation https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/4141
- [ ] Create user documentation

See merge request !4040
2016-05-18 18:19:01 +00:00
Adam ButlerandRémy Coutable 8a8b5497c5 Create DiffFilter and change SystemNoteService#change_title to use Gitlab::Diff::InlineDiff 2016-05-18 11:15:10 -05:00
Rémy Coutable f4d2a2d97b Merge branch 'fix/import-data-issue' into 'master'
Create import data in service and fix timing issues when scheduling job

Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/17401

Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/17376

See merge request !4106
2016-05-18 15:28:11 +00:00
James Lopez 4e9ce5abe2 fix typo from bad refactoring 2016-05-17 15:19:59 +02:00
Sean McGivern a9977f2b7a Syntax-highlight diffs in push emails
Based on:
https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/151
2016-05-17 13:23:17 +01:00
Kamil Trzcinski eb42f95c18 Merge remote-tracking branch 'origin/master' into docker-registry-view 2016-05-16 16:15:40 -05:00
Rémy Coutable 4f66799738 Merge branch 'wiki-fix-reloaded' into 'master'
Use the relative url prefix for links in Wiki

Retry of gitlab-org/gitlab-ce!4026

@rymai !4050 solved all other problems how it looks like. I [tested](https://gitlab.com/artem-forks/gitlab-ce/commit/ff01eca7b559efa7cacf3412aa01cd8ae8a6db7e/builds) this with ruby22

Fixes #17071 



See merge request !4131
2016-05-16 20:30:42 +00:00
Douwe Maan 5dd013f145 Merge branch 'gh-pull-requests' 2016-05-16 12:12:20 -05:00
Pablo Carranza b9306c2e82 Add cache count metrics to rails cache 2016-05-15 19:47:41 +01:00
Douglas Barbosa Alexandre 290aa75e6f Remove branches that does exist on GitHub after PRs were imported 2016-05-13 17:55:43 -05:00
Douglas Barbosa Alexandre ebaa19c162 Fix validation method for Gitlab::GithubImport::PullRequestFormatter 2016-05-13 17:55:43 -05:00
Douglas Barbosa Alexandre 795a7ca8f1 Extract GitHub branch formatter 2016-05-13 17:55:42 -05:00
Douglas Barbosa Alexandre e001bd5e3d Import PRs where branch names were reused across PRs 2016-05-13 17:55:42 -05:00
Douglas Barbosa Alexandre 7e1f14e215 Preserve commits/diff/comments for PRs that were merged on GitHub 2016-05-13 17:55:42 -05:00
Kamil Trzcinski f4f59d0f13 Merge branch 'docker-registry' into docker-registry-view 2016-05-13 17:15:01 -05:00
Douglas Barbosa Alexandre 3b50867550 Fix spec for Gitlab::GithubImport::PullRequestFormatter 2016-05-13 16:49:27 -05:00
Douglas Barbosa Alexandre 9b4dc552cb Import pull requests from GitHub where the target branch was removed 2016-05-13 16:49:27 -05:00
Douglas Barbosa Alexandre 8532dc0d77 Import pull requests from GitHub where the source branch was removed 2016-05-13 16:49:27 -05:00
Artem Sidorenko e5c9710147 Use the relative url prefix for links in Wiki 2016-05-13 22:42:07 +02:00
Gabriel Mazetto f5a0ac0fc1 Codestyle: make sure we have space around operators 2016-05-13 04:46:56 -03:00
Robert Speicher 4735a75340 Merge branch 'deprecated-class-methods-cop' into 'master'
Enable the Rubocop DeprecatedClassMethods cop

This reports uses of `File.exists?` and `Dir.exists?`, which were both
deprecated in Ruby and will eventually be removed in favor of `.exist?`.
Also fixes all existing uses of the deprecated methods.

See merge request !4087
2016-05-12 22:41:01 +00:00
Yorick Peterse 6a29117793 Removed stray strip_heredoc from migration helpers 2016-05-13 00:11:01 +02:00
James Lopez 6a70c060fa Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ce into fix/import-data-issue 2016-05-12 18:39:52 +02:00
Yorick Peterse 945c5b3fe6 Removed tracking of total method execution times
Because method call timings are inclusive (that is, they include the
time of any sub method calls) this would lead to the total method
execution time often being far greater than the total transaction time.
Because this is incredibly confusing it's best to simply _not_ track the
total method execution time, after all it's not that useful to begin
with.

Fixes gitlab-org/gitlab-ce#17239
2016-05-12 15:15:45 +02:00
Yorick Peterse 36083b4d0e Fixed styling per Rubocop pedantics 2016-05-12 13:03:55 +02:00
Yorick Peterse e867099091 Added helper methods for database migrations
These helpers can be used to perform migrations without taking down the
entire application.

For example, the method "add_column_with_default" can be used to add a
new column with a default value without locking the entire table.
2016-05-12 12:59:40 +02:00
James Lopez 1074980abb Merge branches 'fix/import-data-issue' and 'master' of gitlab.com:gitlab-org/gitlab-ce into fix/import-data-issue 2016-05-11 17:54:25 +02:00
Robert Speicher d526cda502 Merge branch '17270-only-generate-email-on-push-once-for-all-recipients' into 'master'
Only generate repository push email once

The repository push email can be very expensive to generate, especially
with syntax-highlighted diffs. Instead of generating the email for each
recipient, generate one email object and reset the Message-Id and To
headers for each recipient. (Cloning would also be expensive in the case
of large emails, although probably not as bad as generating from
scratch.)

Closes #17270.

See merge request !4070
2016-05-11 12:45:39 +00:00
Rémy Coutable e77a9a342e Merge branch 'casecmp-cop' into 'master'
Enable Rubocop Casecmp Performance Cop.

Also fixes the errors caused by enabling the cop.

`casecmp` is more performant than `.downcase` and `==`.

See also: https://github.com/bbatsov/rubocop/blob/master/lib/rubocop/cop/performance/casecmp.rb

See merge request !3957
2016-05-11 08:59:44 +00:00
Rémy Coutable de5ae1bf06 Merge branch 'string-replacement-cop' into 'master'
Enable the StringReplacement cop.

Also fix one use of `gsub` that would be faster as `delete`.

Use `tr` instead of `gsub` when you are replacing the same number of characters. Use `delete` instead of `gsub` when you are deleting characters.

See merge request !3960
2016-05-11 08:58:59 +00:00
Sean McGivern 5f27e26bb4 Only generate repository push email once
The repository push email can be very expensive to generate, especially
with syntax-highlighted diffs. Instead of generating the email for each
recipient, generate one email object and reset the Message-Id and To
headers for each recipient. (Cloning would also be expensive in the case
of large emails, although probably not as bad as generating from
scratch.)
2016-05-11 09:16:01 +01:00
Connor Shea 4995302df6 Enable the StringReplacement cop.
Also fix one use of `gsub` that would be faster as `delete`.

Use `tr` instead of `gsub` when you are replacing the same number of
characters. Use `delete` instead of `gsub` when you are deleting
characters.
2016-05-10 18:34:15 -06:00
Connor Shea 377583a361 Enable Rubocop Casecmp Performance Cop.
Also fixes the errors caused by enabling the cop. casecmp is more performant than `.downcase` and `==`.
2016-05-10 18:23:25 -06:00
James Lopez 1322c981a0 create import data in service 2016-05-10 11:10:51 +02:00
Rémy Coutable f52a15e022 Revert "Merge branch 'wiki-fix' into 'master' "
This reverts commit 4cc85a58e8, reversing
changes made to 90ae445ba9.

Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-05-10 10:57:48 +02:00