summaryrefslogtreecommitdiff
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* Enable Style/EmptyLines cop, remove redundant onesrubocop/enable-cops-for-empty-linesGrzegorz Bizon2016-07-0134-45/+0
|
* Merge branch 'fix-relative-root-emoji-support' into 'master' Stan Hu2016-07-011-1/+10
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix emoji paths in relative root configurations ## What does this MR do? If a site specifies a relative URL root, emoji files would omit the path from the URL, leading to lots of 404s. ## Are there points in the code the reviewer needs to double check? At first, I tried to use `ActionView::Helpers::AssetUrlHelper.asset_url` since this is what it's intended to do. But this helper function is extremely slow, and it took minutes to generate the URLs for the hundreds of links needed for each emoji. ## Why was this MR needed? Because emojis were broken in relative URL installations ## What are the relevant issue numbers? #15642 ## Does this MR meet the acceptance criteria? - [X] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added - Tests - [X] Added for this feature/bug - [x] All builds are passing - [X] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides) - [X] Branch has no merge conflicts with `master` (if you do - rebase it please) - [X] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits) See merge request !5027
| * Fix emoji paths in relative root configurationsStan Hu2016-07-011-1/+10
| | | | | | | | | | | | | | If a site specifies a relative URL root, emoji files would omit the path from the URL, leading to lots of 404s. Closes #15642
* | Merge branch 'todos-api' into 'master' Rémy Coutable2016-07-013-0/+108
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add Todos API * Closes #14068 * Closes #14675 - [x] Implementation - [x] Tests - [x] Documentation - [x] Changelog See merge request !3188
| * | Support creating a todo on issuables via APItodos-apiRobert Schilling2016-07-011-0/+30
| | |
| * | Expose target, filter by state as stringRobert Schilling2016-07-012-7/+7
| | |
| * | Add todos API documentation and changelogRobert Schilling2016-07-011-3/+1
| | |
| * | pass paginated array when deleting notesRobert Schilling2016-07-011-1/+1
| | |
| * | Expose action_nameRobert Schilling2016-07-011-1/+1
| | |
| * | Add user to project to see todosRobert Schilling2016-07-011-1/+1
| | |
| * | Move to helper, no instance variablesRobert Schilling2016-07-011-9/+9
| | |
| * | Fix rebaseRobert Schilling2016-07-011-4/+0
| | |
| * | Add Todos APIDouglas Barbosa Alexandre2016-07-013-0/+84
| | |
* | | Merge branch 'fix/import-export-events' into 'master' Rémy Coutable2016-07-013-6/+12
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixing problems with events for import/export Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/19202 A couple of issues related to target being missing in exported `Events` (as being polymorphic and not have `ActiveRecord` relationships is a bit more tricky than normal models) plus as the export was in JSON, the import retrieves hashed fields as stringified hashes and not symbolized - so fixed that as well, which was the cause of https://gitlab.com/gitlab-org/gitlab-ce/issues/19202 Also fixed / refactored tests :simpl Import/Export Version has been bumped to 0.1.1 as theses changes to events won't work very well with old exports - forcing users to generate a new export in the new version. See merge request !4987
| * | | use has_many relationship with eventsJames Lopez2016-07-011-0/+1
| | | |
| * | | Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ce into ↵James Lopez2016-07-0125-270/+380
| |\ \ \ | | | |/ | | |/| | | | | fix/import-export-events
| * | | bump version - as old exports wont be compatibleJames Lopez2016-06-291-1/+1
| | | |
| * | | fixing events for import/exportJames Lopez2016-06-291-5/+10
| | | |
* | | | Merge branch 'refactor-tags-branches-api' into 'master' Rémy Coutable2016-07-012-7/+7
|\ \ \ \ | |_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | Ensure that branch and tag names are given in API ## What does this MR do? It ensures that the tag or branch name is given. @rymai We talked in an earlier MR about this. See merge request !5012
| * | | Ensure that branch and tag names are given in APIrefactor-tags-branches-apiRobert Schilling2016-06-302-7/+7
| | | |
* | | | Metrics for Rouge::Plugins::Redcarpet and Rouge::Formatters::HTMLGitlab18592-syntaxhighlighter-slowPaco Guzman2016-07-011-2/+7
| |_|/ |/| |
* | | Merge branch 'fix-external-issue-rendering' into 'master' Robert Speicher2016-06-303-6/+30
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Handle external issues in IssueReferenceFilter Rendering issue references such as `#1` was broken for projects using an external issues tracker. See gitlab-org/gitlab-ce#19036 See merge request !4988
| * | | Handle external issues in IssueReferenceFilterYorick Peterse2016-06-303-6/+30
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | IssueReferenceFilter will end up processing internal issue references when a project uses an external issues tracker while still using internal issue references (in the form of `#\d+`). This commit ensures that these links are rendered as external issue links, regardless of whether the project one currently views uses an internal or external issues tracker. Fixes gitlab-org/gitlab-ce#19036, gitlab-com/performance#16
* | | Merge branch 'ericidema/gitlab-ce-import-with-github-personal-access-tokens' ↵Douwe Maan2016-06-301-14/+31
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into 'master' Allow importing from Github using Personal Access Tokens _Originally opened at !4005 by @ericidema._ ------ ## What does this MR do? * Made changes to `Gitlab::GithubImport::Client` so that it can be used with Github Personal Access Tokens without the need for OAuth. * Added UI to collect Personal Access Token from user. * Detect if the user has logged in with GitHub and use OAuth to skip the Personal Access Token form. ## Are there points in the code the reviewer needs to double check? Twin Omnibus MR: https://gitlab.com/gitlab-org/omnibus-gitlab/merge_requests/774 ## What are the relevant issue numbers? Closes #13970. ## Screenshots ### GitHub import is configured ![github_import_configured](/uploads/151e4f0edf3f87bfa03c2d97dda8b3d8/github_import_configured.png) ----- ### GitHub import is not configured ![github_import_not_configured](/uploads/cb129f7e2ffe66cceb28ccd9af480284/github_import_not_configured.png) ----- ## Does this MR meet the acceptance criteria? - [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added - [x] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md) - Tests - [x] Added for this feature/bug - [ ] All builds are passing - [ ] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides) - [x] Branch has no merge conflicts with `master` (if you do - rebase it please) - [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits) See merge request !4938
| * | | Import from Github using Personal Access Tokens.Eric K Idema2016-06-301-14/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This stands as an alternative to using OAuth to access a user's Github repositories. This is setup in such a way that it can be used without OAuth configuration. From a UI perspective, the how to import modal has been replaced by a full page, which includes a form for posting a personal access token back to the Import::GithubController. If the user has logged in via GitHub, skip the Personal Access Token and go directly to Github for an access token via OAuth.
* | | | Merge branch 'fix_restore_warning' into 'master' Rémy Coutable2016-06-301-1/+2
|\ \ \ \ | |/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix restore warning message ## What does this MR do? Fix the restore Rake task so it properly outputs the database warning. This is a pretty important warning and it was not even being output. After this fix, the output looks like the screenshot below. ![Screen_Shot_2016-06-28_at_3.53.46_PM](/uploads/d250189d39fcacd0c8ec0aacf9cd930d/Screen_Shot_2016-06-28_at_3.53.46_PM.png) See merge request !4980
| * | | Fix restore warning messageDrew Blessing2016-06-281-1/+2
| | | |
* | | | Merge branch 'rubocop/enable-unneeded-capital-w-cop' into 'master' Robert Speicher2016-06-301-1/+1
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Enable Style/UnneededCapitalW Rubocop cop ## What does this MR do? This MR enables Rubocop cop that checks if `%W[]`, which supports interpolation, is needed. ## What are the relevant issue numbers? #17478 See merge request !5010
| * | | | Enable Style/UnneededCapitalW Rubocop coprubocop/enable-unneeded-capital-w-copGrzegorz Bizon2016-06-301-1/+1
| | |_|/ | |/| |
* | | | Merge branch 'remove-converalls-gem' into 'master' Dmitriy Zaporozhets2016-06-301-3/+1
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove coveralls as its unused This gem is unused so could be removed. @dzaporozhets @connorshea We've discussed this some time ago on Slack See merge request !5001
| * | | | Remove coveralls as its unusedremove-converalls-gemZ.J. van de Weg2016-06-301-3/+1
| | |_|/ | |/| |
* | | | Add Application Setting to configure default Repository Path for new projectsshards-configAlejandro Rodríguez2016-06-291-0/+1
| | | |
* | | | Create (if necessary) and link the gitlab-shell secret file on the rake ↵shardsAlejandro Rodríguez2016-06-292-0/+19
| | | | | | | | | | | | | | | | install task
* | | | Refactor repository paths handling to allow multiple git mount pointsAlejandro Rodríguez2016-06-2911-236/+272
| |/ / |/| |
* | | Merge branch 'handle-redis-not-there' into 'master' Stan Hu2016-06-291-3/+7
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix database migrations when Redis is not running If Redis were not running or USE_DB were set to false, the application settings retrieval would fail completely. This change only attempts to use the cache if the system actually wants to connect to the DB and rescues any failures in talking to Redis. Closes #17557 See merge request !4924
| * | | Handle case when Redis cache returns an empty settingStan Hu2016-06-291-1/+1
| | | |
| * | | Fix database migrations when Redis is not runningStan Hu2016-06-291-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If Redis were not running or USE_DB were set to false, the application settings retrieval would fail completely. This change only attempts to use the cache if the system actually wants to connect to the DB and rescues any failures in talking to Redis. Closes #17557
* | | | Merge branch 'rs-gitalb-com-staging' into 'master' Robert Speicher2016-06-291-1/+6
|\ \ \ \ | |/ / / |/| | | | | | | | | | | | | | | | | | | Update `Gitlab.com?` to support staging Ref: https://gitlab.com/gitlab-com/operations/issues/324#note_12428337 See merge request !4637
| * | | Update `Gitlab.com?` to support stagingrs-gitalb-com-stagingRobert Speicher2016-06-271-1/+6
| | | |
* | | | Enable Style/SpaceAfterComma Rubocop coprubocop/enable-space-after-copsGrzegorz Bizon2016-06-293-3/+3
| |/ / |/| |
* | | Merge branch 'zj-workhorse-format-patch' into 'master' Robert Speicher2016-06-291-0/+13
|\ \ \ | |_|/ |/| | | | | | | | Workhorse to serve email diffs See merge request !4590
| * | Bump workhorse versionzj-workhorse-format-patchZ.J. van de Weg2016-06-281-4/+4
| | |
| * | Workhorse to serve email diffsZ.J. van de Weg2016-06-281-0/+13
| |/ | | | | | | Depends on the changes in Workhorse (gitlab-org/gitlab-workhorse!48).
* | Merge branch 'fix/builds-api-builds-for-commit-search' into 'master' Rémy Coutable2016-06-281-3/+3
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Find all builds for commit if there are multiple pipelines for it ## What does this MR do? This MR fixes a builds API. When multiple pipelines were triggered for a commit, then API returned builds only from the last pipeline. ## What are the relevant issue numbers? Closes #18912 Closes #19243 ## Does this MR meet the acceptance criteria? - [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added - [x] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md) - [x] API support added - Tests - [x] Added for this feature/bug - [x] All builds are passing - [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides) - [x] Branch has no merge conflicts with `master` (if you do - rebase it please) - [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits) See merge request !4849
| * | Remove redundant check in commit builds API endpointfix/builds-api-builds-for-commit-searchGrzegorz Bizon2016-06-281-2/+0
| | |
| * | Improve commit builds API endpoint RESTful behaviorGrzegorz Bizon2016-06-281-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | 1. Return 404 if commit is not found (RESTful resource not found) 2. Return an empty array if pipeline is not found (resource present, no associated builds found) 3. Return an empty array if pipeline found but no builds there (resource present, no associated builds)
| * | Find all builds for commit if multiple pipelinesGrzegorz Bizon2016-06-281-3/+3
| | |
* | | Use clock_gettime for all performance timestampsperformance-clock-adjustmentsYorick Peterse2016-06-284-19/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Process.clock_gettime allows getting the real time in nanoseconds as well as allowing one to get a monotonic timestamp. This offers greater accuracy without the overhead of having to allocate a Time instance. In general using Time.now/Time.new is about 2x slower than using Process.clock_gettime(). For example: require 'benchmark/ips' Benchmark.ips do |bench| bench.report 'Time.now' do Time.now.to_f end bench.report 'clock_gettime' do Process.clock_gettime(Process::CLOCK_MONOTONIC, :millisecond) end bench.compare! end Running this benchmark gives: Calculating ------------------------------------- Time.now 108.052k i/100ms clock_gettime 125.984k i/100ms ------------------------------------------------- Time.now 2.343M (± 7.1%) i/s - 11.670M clock_gettime 4.979M (± 0.8%) i/s - 24.945M Comparison: clock_gettime: 4979393.8 i/s Time.now: 2342986.8 i/s - 2.13x slower Another benefit of using Process.clock_gettime() is that we can simplify the code a bit since it can give timestamps in nanoseconds out of the box.
* | | Unused got variable with very bad performancePaco Guzman2016-06-281-1/+0
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In any case if just want the value which is always ‘gitlab’ require 'benchmark/ips' Project.first # To load database things GitlabIssueTrackerService.first # To load database things Benchmark.ips do |x| x.config(:time => 5, :warmup => 2) x.report("current") do Project.new.default_issue_tracker.to_param end x.report("") do 'gitlab' end x.compare! end Calculating ------------------------------------- current 4.000 i/100ms 30.938k i/100ms ------------------------------------------------- current 47.298 (±10.6%) i/s - 232.000 4.366M (±20.9%) i/s - 17.202M Comparison: : 4366456.0 i/s current: 47.3 i/s - 92318.26x slower
* | support cgi style options, such as erb?parent=jsonhttp://jneen.net/2016-06-271-3/+3
| |