summaryrefslogtreecommitdiff
path: root/spec/models
Commit message (Collapse)AuthorAgeFilesLines
* Refactor can_be_merged logic for merge requestDmitriy Zaporozhets2015-07-011-0/+14
| | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* Repository#blob_at should return nil for 00000000... shafix-zero-sha-lookupDmitriy Zaporozhets2015-07-011-0/+8
| | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* Rename abilities to correspond contoller/model action namesrename-abilitiesDmitriy Zaporozhets2015-06-262-4/+4
| | | | | | | | | | | | | | | | | write_ was renamed to create_ modify_ was renamed to update_ So now in update action we have next code def create can?(current_user, :create_issue, @issue) end def update can?(current_user, :update_issue, @issue) end Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* Only look up Commit authors/committers by emailrs-issue-1850Robert Speicher2015-06-231-10/+4
| | | | | - Removes looking up authors/committers by name - Renames `User.find_for_commit` to `User.find_by_any_email`
* Merge branch 'rubocop-for-tests' into 'master'Dmitriy Zaporozhets2015-06-2314-69/+55
|\ | | | | | | | | | | | | | | | | | | Enable rubocop for tests too cc @DouweM @rspeicher Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> See merge request !862
| * Merge branch 'master' into rubocop-for-testsDmitriy Zaporozhets2015-06-2325-80/+87
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> Conflicts: spec/features/issues_spec.rb spec/models/forked_project_link_spec.rb spec/models/hooks/service_hook_spec.rb spec/models/hooks/web_hook_spec.rb spec/models/project_services/hipchat_service_spec.rb spec/requests/api/project_members_spec.rb spec/requests/api/projects_spec.rb spec/requests/api/system_hooks_spec.rb spec/services/archive_repository_service_spec.rb spec/support/matchers.rb spec/tasks/gitlab/backup_rake_spec.rb
| * | Fix Style/Blocks cop violationsRobert Speicher2015-06-227-26/+27
| | |
| * | Fix Style/SpaceInsideHashLiteralBraces cop violationsRobert Speicher2015-06-228-27/+27
| | | | | | | | | | | | These fixes were performed automatically by Rubocop's `-a` flag.
| * | Fix Style/TrailingBlankLines cop violationsRobert Speicher2015-06-223-16/+0
| | |
| * | Remove unnecessary whitespace between let and (Dmitriy Zaporozhets2015-06-221-2/+2
| | | | | | | | | | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* | | Merge branch 'rs-dev-issue-2414' into 'master'Dmitriy Zaporozhets2015-06-231-36/+38
|\ \ \ | |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | Allow Admin to filter users by 2FA status > ![Screen_Shot_2015-06-19_at_4.38.12_PM](https://gitlab.com/gitlab-org/gitlab-ce/uploads/deba7f2a6b8d1548c1d1ac401e0e35a1/Screen_Shot_2015-06-19_at_4.38.12_PM.png) Closes internal https://dev.gitlab.org/gitlab/gitlabhq/issues/2414 See merge request !852
| * | Use alias_attribute to define User#two_factor_enabledrs-dev-issue-2414Robert Speicher2015-06-221-24/+0
| | |
| * | Make default value for otp_required_for_login false instead of nullRobert Speicher2015-06-201-2/+2
| | |
| * | Allow Admin to filter users by 2FA statusRobert Speicher2015-06-191-10/+36
| | |
* | | Fix `raise_error` without an argument deprecation warningsRobert Speicher2015-06-223-3/+3
| | |
* | | Replace remaining references to `Note.create_cross_reference_note`Robert Speicher2015-06-221-1/+1
| | |
* | | Use to_reference for issue and merge request mentionable specsRobert Speicher2015-06-222-4/+4
| | |
* | | Update mock and stub syntax for specsRobert Speicher2015-06-2220-73/+79
| |/ |/|
* | Merge branch 'rs-dev-issue-2355' into 'master'Dmitriy Zaporozhets2015-06-221-0/+25
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MergeRequest#show performance improvements This is a first pass on improving the performance of the `MergeRequests#show` page. Notable changes: - The "Commits" tab is loaded lazily, so the initial page load should be much faster for MRs with many commits. - Relative timestamps via `timeago` are only initialized once per load instead of `O(n^2)`. This greatly improves frontend rendering times for a large number of commits. - Refactored `User.find_for_commit` to use a single ARel-generated SQL query instead of the old method which resulted in one query, and could result in up to three. See merge request !838
| * | Spec and refactor User.find_for_commitRobert Speicher2015-06-171-0/+25
| | | | | | | | | | | | | | | Now it executes a single query instead of a possible three at the cost of some scary-looking ARel calls.
* | | Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ceDmitriy Zaporozhets2015-06-221-0/+24
|\ \ \ | | |/ | |/|
| * | Add convenience methods to User for getting and setting 2FA statusRobert Speicher2015-06-191-0/+24
| |/
* | Merge branch 'snippet_optional_filename' into 'master'Douwe Maan2015-06-201-1/+0
|\ \ | |/ |/| | | | | | | | | | | Make snippet filename optional. Fixes #2384. See merge request !1866
| * Make snippet filename optional.Nicolas2015-06-201-1/+0
| | | | | | | | Fixes #2384.
* | Look for .gitlab-ci.yml only if checkout_sha is presentfix-gitlab-ci-ymlDmitriy Zaporozhets2015-06-151-1/+1
| | | | | | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* | Merge branch 'rs-dev-issue-2228' into 'master'Dmitriy Zaporozhets2015-06-151-3/+4
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow user to customize default Dashboard page Renames the "Design" profile page to "Preferences" and adds a field to customize the default Dashboard page: > ![Screen_Shot_2015-06-11_at_11.12.53_PM](https://gitlab.com/gitlab-org/gitlab-ce/uploads/b5282a3be7861d1148528c6bc9e7a0e0/Screen_Shot_2015-06-11_at_11.12.53_PM.png) See merge request !778
| * | Add `dashboard` attribute to User modelRobert Speicher2015-06-131-1/+2
| | |
| * | Add Gitlab::Themes module; remove Gitlab::ThemeRobert Speicher2015-06-131-2/+2
| | | | | | | | | | | | | | | | | | | | | Now we can simply loop through all themes, among other things. This also removes the `dark_theme` / `light_theme` classes and the `theme_type` helper, since they weren't used anywhere.
* | | Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ceDmitriy Zaporozhets2015-06-142-6/+6
|\ \ \
| * | | Change `foo.should` syntax to `expect(foo).to` in specsRobert Speicher2015-06-132-5/+5
| | | |
| * | | Change `foo.should_not` syntax to `expect(foo).not_to` in specsRobert Speicher2015-06-131-1/+1
| |/ /
* | | Merge pull request #9340 from jvanbaarsen/update-noteableDmitriy Zaporozhets2015-06-141-1/+1
|\ \ \ | |/ / |/| | Update noteable after a new note is added
| * | Update noteable after a new note is addedJeroen van Baarsen2015-06-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | **What does this do?** It makes sure that whenever a new note is added to an noteable item, the updated_at of that item is also updated. **Why is this needed?** At this moment when you post a comment on an issue or add a label to an issue, the updated_at is not changed. Because of this the filtering for least recently updated is not really useful (since it only takes in account the original text from the noteable). Signed-off-by: Jeroen van Baarsen <jeroenvanbaarsen@gmail.com>
* | | Merge branch 'feature-session-expire-seconds-ui' into 'master'Douwe Maan2015-06-121-0/+1
|\ \ \ | |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add session expiration delay configuration through UI application Setting is accessible by the administrator through the UI and defaults to 1 week (the current setting) Answers the following suggestions: * http://feedback.gitlab.com/forums/176466-general/suggestions/6210719-make-session-length-configurable * http://feedback.gitlab.com/forums/176466-general/suggestions/6730512-automatic-logout-after-a-time-being-idle See merge request !774
| * | session_expire_seconds => session_expire_delaythemaze752015-06-101-1/+1
| | | | | | | | | | | | | | | delay is in seconds more legible code in session_store Added `GitLab restart required` help block to session_expire_delay
| * | Add session expiration delay configuration through UI applicationEric Maziade2015-06-051-0/+1
| | | | | | | | | settings
* | | "expect { }.not_to raise_error" no longer takes a specific classRobert Speicher2015-06-101-6/+2
| | |
* | | ensure_length_of -> validate_length_ofRobert Speicher2015-06-105-10/+10
| | |
* | | Correctly remove already-mentioned commits for cross referencesrs-issue-1778Robert Speicher2015-06-081-2/+19
| | | | | | | | | | | | Fixes #1778
* | | Merge branch 'make-namespaces-api-available-to-all-users' into 'master'Dmitriy Zaporozhets2015-06-041-0/+2
|\ \ \ | |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make namespace API available to all users ### What does this MR do? This MR makes it possible for a user to query namespaces to which he/she has access. Also, it adds documentation for the existing API. ### Why was this MR needed? Even though the `groups` API exists, it might still be useful to have an endpoint that tells the namespace type (e.g. `user` vs. `group`), especially if a user has access to a number of different projects. ### What are the relevant issue numbers? Closes https://github.com/gitlabhq/gitlabhq/issues/9328 See merge request !708
| * | Make namespace API available to all usersStan Hu2015-05-281-0/+2
| |/ | | | | | | Closes https://github.com/gitlabhq/gitlabhq/issues/9328
* | GitLab CI service sends gitlab-ci.yml fileci_yml_fileValery Sizov2015-06-021-0/+15
| |
* | You can not remove user if he/she is an only owner of groupDmitriy Zaporozhets2015-05-281-1/+17
|/ | | | | | | To prevent loose of group data you need to transfer or remove group first before you can remove user Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* Merge branch 'rs-to_reference' into 'master'Dmitriy Zaporozhets2015-05-2710-56/+257
|\ | | | | | | | | | | | | | | Add to_reference method to referable models Now there is a single source of information for which attribute a model uses to be referenced, and its special character. See merge request !641
| * Make use of to_reference in more specsRobert Speicher2015-05-261-1/+1
| |
| * Support only double quotes for multi-word label referencesRobert Speicher2015-05-261-5/+14
| |
| * Update CommitRange#to_reference to use full SHAsRobert Speicher2015-05-261-13/+13
| | | | | | | | We only want them shortened by the filter, which calls to_s
| * Minor model spec cleanupsRobert Speicher2015-05-264-26/+15
| | | | | | | | Snippet model was missing project association
| * Add `to_reference` for models that support referencesRobert Speicher2015-05-2610-36/+239
| | | | | | | | | | Now there is a single source of information for which attribute a model uses to be referenced, and its special character.
* | Merge branch 'fix-hipchat-default-api-version' into 'master'Douwe Maan2015-05-271-4/+27
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow HipChat API version to be blank and default to v2 ### What does this MR do? This MR fixes a regression introduced in v7.11 that requires a HipChat API version to be specified when it is supposed to be optional. ### Why was this MR needed? The "optional" HipChat API version in 57c724558 passed in a blank `api_version` when nothing was specified, and the code was not tested. This would cause a 500 Error. ### What are the relevant issue numbers? Closes #772 See merge request !718