summaryrefslogtreecommitdiff
path: root/spec/models
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'merge-request-closes-issues-performance' into 'master'Robert Speicher2016-02-011-15/+7
|\ | | | | | | | | | | | | | | Optimize fetching issues closed by a merge request Related issue: #12419 See merge request !2625
| * Optimize fetching issues closed by a merge requestmerge-request-closes-issues-performanceYorick Peterse2016-02-011-15/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of running ClosingIssueExtractor for every commit in a merge request we can gather all the commit messages (and the merge request description), concatenate all this together and then run ClosingIssueExtractor only once. The result of this is that MergeRequest#closes_issues is now between 3.5x and 4x faster than the old setup. Using a merge request with 10 commits (each referencing a number of issues to close) this reduced the call duration from around 200 milliseconds to around 50 milliseconds. As a result of these changes the Jira related tests for MergeRequest#closes_issues have been removed. These tests stubbed Commit#closes_issues meaning that the only code that was really tested was the call to Array#uniq to filter out duplicate issues. As this code is no longer used (nor present) the corresponding tests were removed. Related: gitlab-org/gitlab-ce#12419
* | Merge remote-tracking branch 'origin/background-delete-process'Dmitriy Zaporozhets2016-01-301-3/+3
|\ \
| * | First pass at deleting projects in the background.Josh Frye2016-01-291-3/+3
| | |
* | | Fix old version warning when viewing wiki latest version via version_idfix-viewing-wiki-page-lastest-version-via-version-idDouglas Barbosa Alexandre2016-01-291-0/+32
|/ /
* | Merge branch 'hotfix/ruby-21-broken-update' into 'master' Marin Jankovski2016-01-291-6/+6
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fix syntax error on 2.1 and rubocop on 2.2 Background: Hashes `{:'key': 'value'}` are not valid in 2.1 but are recommended by Rubocop on 2.2. We only use those when we have a key such as `weird-key`, `weird.key`, etc... We could disable Rubocop but it wouldn't warn us about the recommended syntax since `Ruby 1.9`: `{key: 'value'}`, which is valid for `Ruby 1.9+`. Workaround 1 could be disabling `Style/HashSyntax:` in `rubocop.yml`. Workaround 2 (tried in this MR) is to trick Rubocop using `.to_sym` which is effectively the same as adding the `:`. This would allow to keep the warning in place. Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/12801 See merge request !2637
| * | trick rubocop and temporarily add ruby 2.1 images for any branchJames Lopez2016-01-281-6/+6
| |/
* | Merge branch 'master' into mr-merge-basemr-merge-baseDouwe Maan2016-01-282-27/+6
|\ \ | |/
| * Merge branch 'update-ruby-2.2.4' into 'master' Douwe Maan2016-01-271-6/+6
| |\ | | | | | | | | | | | | | | | | | | | | | | | | Update Ruby version to 2.2.4 (latest previous stable) and update docs Tests and issues added to https://github.com/gitlabhq/gitlabhq/issues/8696 were all fine after the upgrade. Main issue: https://gitlab.com/gitlab-org/gitlab-ce/issues/3340 See merge request !2534
| | * Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ce into update-ruby-2.2.4James Lopez2016-01-273-0/+99
| | |\
| | * | fix rubocop new 2.2 syntax issuesJames Lopez2016-01-251-6/+6
| | | |
| * | | Merge branch 'events-performance' into 'master' Robert Speicher2016-01-271-21/+0
| |\ \ \ | | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Improve performance of retrieving last update times for events See 75195eefcca4cb3961986c90c8e837da02f30134 and https://gitlab.com/gitlab-org/gitlab-ce/issues/12415#note_3387317 for the juicy details. Related issue: https://gitlab.com/gitlab-org/gitlab-ce/issues/12415 See merge request !2613
| | * | Use Atom update times of the first eventevents-performanceYorick Peterse2016-01-271-21/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By simply loading the first event from the already sorted set we save ourselves extra (slow) queries just to get the latest update timestamp. This removes the need for Event.latest_update_time and significantly reduces the time needed to build an Atom feed. Fixes gitlab-org/gitlab-ce#12415
* | | | Fix specsDouwe Maan2016-01-281-1/+1
|/ / /
* | | Update ExternalIssue regex for JIRA integrationBlake Hitchcock2016-01-261-0/+15
|/ / | | | | | | | | | | | | | | | | | | | | | | | | The pattern in the `::reference_pattern` class method in the ExternalIssue model does not match all valid forms of JIRA project names. I have updated the regex to match JIRA project names with numbers and underscores. More information on valid JIRA project names can be found here: https://confluence.atlassian.com/jira/changing-the-project-key-format-192534.html * The first character must be a letter, * All letters used in the project key must be from the Modern Roman Alphabet and upper case, and * Only letters, numbers or the underscore character can be used.
* | Prioritize previewable over plain README filesprioritize-previewable-over-plain-readmesDouglas Barbosa Alexandre2016-01-251-0/+64
| |
* | Merge branch 'update-gitlab-git' into 'master' Douwe Maan2016-01-251-0/+20
|\ \ | |/ |/| | | | | | | | | | | | | Update gitlab_git & use new method for counting branches Corresponding gitlab_git merge request detailing some of the rationale behind this: https://gitlab.com/gitlab-org/gitlab_git/merge_requests/62 Fixes #12418 See merge request !2535
| * Use branch_count in Repository#has_visible_content?Yorick Peterse2016-01-211-0/+20
| | | | | | | | | | Gitlab::Git::Repository#branch_count is a tad faster than the previous setup. See gitlab-org/gitlab_git!62 for more information.
* | Merge branch 'ci/recursive-artifacts-entries' into 'master' Robert Speicher2016-01-211-4/+4
|\ \ | |/ |/| | | | | Add method to calculate total size of artifacts in subpath See merge request !2500
| * Add method that calculates total size for artifacts subfolderci/recursive-artifacts-entriesKamil Trzcinski2016-01-201-4/+4
| |
* | Add sentry integrationJeroen Nijhof2016-01-181-0/+2
|/
* Use a more sensible message for the AbuseReport uniqueness validationrs-abuse-report-validationRobert Speicher2016-01-161-1/+1
| | | | | Previously it was "user has already been taken", when really we were saying the user has already been reported.
* Let the CI runner know about builds that this build depends onci/build_dependenciesKamil Trzcinski2016-01-141-0/+24
| | | | This allows us to implement artifacts passing: runner will download artifacts from all prior builds
* Add Banzai::Filter::GollumTagsFilter for parsing Gollum's tags in HTMLDouglas Barbosa Alexandre2016-01-141-0/+7
|
* Update build model specsGrzegorz Bizon2016-01-141-5/+4
|
* Update build specs for artifacts browser supportGrzegorz Bizon2016-01-141-12/+11
|
* Add method that checks if artifacts browser is supportedGrzegorz Bizon2016-01-141-0/+23
| | | | | | This is needed because of backward compatibility. Previously artifacts archive had `.tar.gz` format, but artifacts browser requires ZIP format now.
* Update specs for CI Build, add `artifacts?` methodGrzegorz Bizon2016-01-141-26/+34
| | | | `artifacts?` method checks if artifacts archive is available.
* Rename method that returns url to CI build artifacts downloadGrzegorz Bizon2016-01-141-2/+2
|
* Merge branch 'feature/ldap-sync-edgecases' into 'master' Douwe Maan2016-01-142-16/+66
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | LDAP Sync blocked user edgecases Allow GitLab admins to block otherwise valid GitLab LDAP users (https://gitlab.com/gitlab-org/gitlab-ce/issues/3462) Based on the discussion on the original issue, we are going to differentiate "normal" block operations to the ldap automatic ones in order to make some decisions when its one or the other. Expected behavior: - [x] "ldap_blocked" users respond to both `blocked?` and `ldap_blocked?` - [x] "ldap_blocked" users can't be unblocked by the Admin UI - [x] "ldap_blocked" users can't be unblocked by the API - [x] Block operations that are originated from LDAP synchronization will flag user as "ldap_blocked" - [x] Only "ldap_blocked" users will be automatically unblocked by LDAP synchronization - [x] When LDAP identity is removed, we should convert `ldap_blocked` into `blocked` Mockup for the Admin UI with both "ldap_blocked" and normal "blocked" users: ![image](/uploads/4f56fc17b73cb2c9e2a154a22e7ad291/image.png) There will be another MR for the EE version. See merge request !2242
| * Codestyle changesGabriel Mazetto2016-01-121-2/+2
| |
| * Repair ldap_blocked state when no ldap identity exist anymoreGabriel Mazetto2016-01-081-0/+38
| |
| * Add ldap_blocked as new state to users state machineGabriel Mazetto2016-01-081-16/+28
| |
* | Merge branch 'fix/private-references' into 'master' Douwe Maan2016-01-141-0/+24
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Show referenced MRs & Issues only when the current viewer can access them This addresses both issues identified in #6066. ## The private MR by user `remy2` with a note referencing to a public issue ![Screen_Shot_2016-01-12_at_16.45.02](/uploads/c245ec2c1fdea1f9ba05183c24e142d9/Screen_Shot_2016-01-12_at_16.45.02.png) --- ## The public issue viewed by user `remy` **who doesn't have access to `remy2/private-project`** before the fix ![Screen_Shot_2016-01-12_at_18.14.50](/uploads/8db5580e803f5bddd6cb935233c579a0/Screen_Shot_2016-01-12_at_18.14.50.png) --- ## The public issue viewed by user `remy` **who doesn't have access to `remy2/private-project`** with the fix ![Screen_Shot_2016-01-13_at_12.02.32](/uploads/cb199f7b78191fba486a11412412e307/Screen_Shot_2016-01-13_at_12.02.32.png) --- ## The public issue viewed by user `remy2` with the fix (no change) ![Screen_Shot_2016-01-13_at_11.54.06](/uploads/ddece590d69f597a95559beddcd36660/Screen_Shot_2016-01-13_at_11.54.06.png) See merge request !2405
| * | Fix specs and rubocop warningsfix/private-referencesRémy Coutable2016-01-141-2/+2
| | |
| * | Merge branch 'master' of https://gitlab.com/gitlab-org/gitlab-ce into ↵Rémy Coutable2016-01-131-0/+16
| |\ \ | | | | | | | | | | | | fix/private-references
| * | | Add spec for Note#cross_reference_not_visible_for?Rémy Coutable2016-01-131-0/+24
| | | |
* | | | Move `BroadcastMessage#status` to a helper since it's presentationalRobert Speicher2016-01-131-20/+0
| | | |
* | | | Update BroadcastMessage modelRobert Speicher2016-01-131-5/+86
| | | | | | | | | | | | | | | | | | | | - Adds default values for `color` and `font` attributes - Adds `active?`, `started?`, `ended?`, and 'status' methods
* | | | Remove alert_type attribute from BroadcastMessageRobert Speicher2016-01-131-1/+0
| |/ / |/| |
* | | Block the reported user before destroying the recordrs-block-user-before-removalRobert Speicher2016-01-121-0/+16
|/ / | | | | | | | | | | | | | | This is intended to prevent the user from creating new objects while the transaction that removes them is being run, resulting in objects with nil authors which can then not be edited. See https://gitlab.com/gitlab-org/gitlab-ce/issues/7117
* | Fix Error 500 when visiting build page of project with nil runners_tokenStan Hu2016-01-101-0/+22
|/ | | | | | | Properly ensure that the token exists and add defensively check for a non-nil value. Closes #4294
* Merge branch 'suppress-allow-failure-builds' into 'master' Stan Hu2016-01-081-0/+23
|\ | | | | | | | | | | | | | | | | Suppress e-mails on failed builds if allow_failure is set Every time I push to GitLab, I get > 2 emails saying a spec failed when I don't care about the benchmarks and others that have `allow_failure` set to `true`. @ayufan mentioned creating a summary e-mail to prevent getting one e-mail per build, but the latter might actually be desirable. For example, I do want to know if Rubocop errors fail right away. See merge request !2178
| * Suppress e-mails on failed builds if allow_failure is setStan Hu2016-01-071-0/+23
| | | | | | | | | | Every time I push to GitLab, I get > 2 emails saying a spec failed when I don't care about benchmarks and other specs that have `allow_failure` set to `true`.
* | Merge branch 'accept-2xx-status-codes-for-webhooks' into 'master' Dmitriy Zaporozhets2016-01-081-0/+12
|\ \ | |/ |/| | | | | | | | | Accept 2xx status codes for successful Web hook triggers Closes https://github.com/gitlabhq/gitlabhq/issues/9956 See merge request !2332
| * Accept 2xx status codes for successful Web hook triggersStan Hu2016-01-071-0/+12
| | | | | | | | Closes https://github.com/gitlabhq/gitlabhq/issues/9956
* | Merge branch 'annotate-models-20160105' into 'master' Dmitriy Zaporozhets2016-01-0714-116/+145
|\ \ | |/ |/| | | | | | | | | | | Annotate models Time to refresh the comments via `annotate`. See merge request !2311
| * Annotate modelsStan Hu2016-01-0614-116/+145
| |
* | Add regression test.fix-banzai-cacheDouwe Maan2016-01-061-1/+14
|/
* Merge branch 'mikew1/gitlab-ce-better-asana-refs' into 'master' Douwe Maan2016-01-051-6/+71
|\ | | | | | | | | | | | | Better support for referencing and closing issues in asana_service.rb (by @mikew1) See merge request !2302