summaryrefslogtreecommitdiff
path: root/spec/models/project_wiki_spec.rb
Commit message (Collapse)AuthorAgeFilesLines
* Added list_pages method to avoid loading all wiki pages contentFrancisco Javier López2019-04-251-16/+58
| | | | | | | | | | | | | | Inside a wiki, when we show the sidebar or browse to the `pages`, all page contents are retrieved from Gitaly and that is a waste of resources, since no content from that pages are going to be showed. This MR introduces the method `ProjectWiki#list_pages`, which uses new wiki_list_pages RPC call to retrieve pages without content Also in the `WikisController` we're using the method to show pages in the sidebar and also on the `pages` page.
* [CE] Reduce diff with EE in spec/models/project_wiki_spec.rbce-reduce-diff-in-spec-modelsRémy Coutable2019-04-021-1/+0
| | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* Add # frozen_string_literal to spec/modelsThong Kuah2019-04-011-0/+2
| | | | Adds `# frozen_string_literal: true` to spec/models ruby files
* Fix Error 500 when user commits Wiki page with no commit messageStan Hu2019-03-161-0/+8
| | | | | | | | | Previously if a user submitted a blank commit message, Gitaly would error out with `3:WikiWritePage: empty CommitDetails.Message` since Gitaly checks whether any content is present for the message. We now use a default commit message if a user leaves it blank. Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/59065
* Add convenience methods for creating project and Wiki repositoriesStan Hu2019-02-051-1/+1
| | | | This makes it easier to access other project arguments in the future.
* Send project name with Gitaly repository requestsStan Hu2019-02-051-1/+1
| | | | | | | When hashed storage is in use, it's helpful to have the project name associated with the request. Closes https://gitlab.com/gitlab-org/gitaly/issues/1394
* Revert "Merge branch 'revert-e2aa2177' into 'master'"Zeger-Jan van de Weg2018-11-201-145/+105
| | | This reverts merge request !23229
* Revert "Merge branch 'zj-improve-gitaly-pb' into 'master'"revert-e2aa2177Sean McGivern2018-11-201-105/+145
| | | This reverts merge request !23140
* Remove duplicate tests for GitalyZeger-Jan van de Weg2018-11-191-145/+105
| | | | | The disabling of Gitaly was basically stubbing `Feature.enabled?` call, which was never triggered.
* Fix typos in comments and specsGeorge Tsiolis2018-11-011-2/+2
|
* Guard against regressions in commit email specsNick Thomas2018-09-181-0/+3
|
* Use commit email for wiki actionsNick Thomas2018-09-171-3/+23
|
* Merge remote-tracking branch 'upstream/master' into 14995-custom_wiki_sidebarLin Jen-Shin2018-07-131-1/+9
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * upstream/master: (467 commits) Update docs board features tier Upgrade grape-path-helpers to 1.0.6 Remove healthchecks from prometheus endpoint Fix find_branch call sites Ensure Encoding.default_external is set to UTF-8 when running QA scenarios i18n: externalize strings from 'app/views/admin/groups' Backport mr widget changes from EE Allow to toggle notifications for issues due soon Vuex test helper improvements whitespace Make more ref RPC's mandatory Resolve "Improve performance of MR Changes tab: reduce event listeners on scroll event" Remove old service architecture from Vue docs Adding spec to test basic forking functionalities Fix performance problem of accessing tag list for projects api endpoints typo Add sleep to QA test before installing tiller Include Vue files that are not covered by tests in test coverage Remove Repository#path memoization Resolve "do not set updated_at when creating note" ...
| * Optimize ProjectWiki#empty? checkStan Hu2018-07-121-1/+9
| | | | | | | | | | | | | | | | | | | | | | The `empty?` check was iterating over all Wiki pages to determine whether it was empty. Using the limit parameter allows us to bail out early once we found a page. Note that this currently only improves performance for GitLab 11.0 until https://gitlab.com/gitlab-org/gitaly/issues/1204 is fixed. Relates to #40101
* | Merge remote-tracking branch 'upstream/master' into 14995-custom_wiki_sidebarLin Jen-Shin2018-06-271-5/+32
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * upstream/master: (4180 commits) Enable frozen string literals for app/workers/*.rb Resolve "Search dropdown hides & shows when typing" Revert merge request widget button max height Update CHANGELOG.md for 11.0.2 Update external link icon in header user dropdown Added Diff Viewer to new VUE based MR page Fixed eslint failure in IDE spec helpers Use refs instead of querySelector. Show file in tree on WebIDE open Resolve "Remove unused bootstrap component CSS" Resolve "Explain what Groups are in the New Group page" [QA] Make sure we wait for the deploy key list to load Update _scopes_form.html.haml to remove duplicate information Use the branch instead of the tag to install port the EE changes Add index on deployable_type/id for deployments Add a helper to rename a column using a background migration Fix performance bottleneck when rendering large wiki pages Port Namespace#root_ancestor to CE Remove duplicate spec ...
| * Deny repository disk access in development and testJacob Vosmaer (GitLab)2018-06-141-1/+5
| |
| * Fix finding wiki pages when they have invalidly-encoded contentAhmad Sherif2018-05-091-0/+11
| | | | | | | | Fixes #43715
| * Bump Gitaly to 0.98.0Zeger-Jan van de Weg2018-05-071-1/+5
| | | | | | | | | | | | Hooks were run for wikis, but given the internal API wasn't responding failures happended, as seen on: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/18693
| * Gitlab::Shell works on shard name, not pathZeger-Jan van de Weg2018-04-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | Direct disk access is done through Gitaly now, so the legacy path was deprecated. This path was used in Gitlab::Shell however. This required the refactoring in this commit. Added is the removal of direct path access on the project model, as that lookup wasn't needed anymore is most cases. Closes https://gitlab.com/gitlab-org/gitaly/issues/1111
| * Fix Custom hooks are not triggered by UI wiki editFrancisco Javier López2018-04-181-1/+1
| |
| * Fix finding wiki file when Gitaly is enabledAhmad Sherif2018-04-111-2/+10
| | | | | | | | Fixes gitaly#1126
* | Introduce #find_sidebar and use a constant to find the page14995-custom_wiki_sidebarLin Jen-Shin2018-03-261-0/+16
|/
* Change Gitlab::Shell#add_namespace to #create_namespaceZeger-Jan van de Weg2018-03-141-1/+1
| | | | | | | | | | | Prior to this change, this method was called add_namespace, which broke the CRUD convention and made it harder to grep for what I was looking for. Given the change was a find and replace kind of fix, this was changed without opening an issue and on another feature branch. If more dynamic calls are made to add_namespace, these could've been missed which might lead to incorrect bahaviour. However, going through the commit log it seems thats not the case.
* Replace deprecated path_with_namespace with full_pathDmitriy Zaporozhets2018-03-051-3/+3
| | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* Encode GitalyClient::WikiPage attributes to UTF-8fix/gitaly-wiki-encoding-issuesAhmad Sherif2018-02-051-1/+12
|
* Fix dumping hashed storage based repositoryGabriel Mazetto2017-11-151-0/+4
|
* Migrate Gitlab::Git::Wiki#file to Gitalyfeature/migrate-find-wiki-file-to-gitalyAhmad Sherif2017-10-311-24/+23
| | | | Closes gitaly#689
* Migrate Gitlab::Git::Wiki#page to Gitalyfeature/migrate-find-wiki-page-to-gitalyAhmad Sherif2017-10-311-18/+28
| | | | Closes gitaly#677
* Migrate Gitlab::Git::Wiki#delete_page to GitalyAhmad Sherif2017-10-311-14/+24
| | | | Closes gitaly#673
* Migrate Gitlab::Git::Wiki#write_page to Gitalyfeature/migrate-wiki-write-page-to-gitalyAhmad Sherif2017-10-161-24/+34
| | | | Closes gitaly#638
* Hide Gollum inside Gitlab::Git::WikiJacob Vosmaer (GitLab)2017-10-031-34/+30
|
* Merge branch 'wiki_title' into 'master'Robert Speicher2017-08-071-2/+12
|\ | | | | | | | | | | | | add feature rename wiki title Closes #27800 See merge request !10069
| * Allow wiki pages to be renamed in the UIwendy04022017-08-031-2/+12
| |
* | Change all `:empty_project` to `:project`rs-empty_project-defaultRobert Speicher2017-08-021-2/+2
|/
* Rename more path_with_namespace -> full_path or disk_pathGabriel Mazetto2017-08-011-7/+11
|
* Ensure Gitlab::Application.routes.default_url_options are set correctly in ↵Rémy Coutable2017-07-281-1/+1
| | | | | | Capybara + :js specs Signed-off-by: Rémy Coutable <remy@rymai.me>
* Use described_class when possibleRémy Coutable2017-07-271-1/+1
| | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* Remove superfluous lib: true, type: redis, service: true, models: true, ↵Rémy Coutable2017-07-271-1/+1
| | | | | | services: true, no_db: true, api: true Signed-off-by: Rémy Coutable <remy@rymai.me>
* Fix project wiki web_url specMichael Kozono2017-07-261-1/+1
|
* Add ProjectWiki#ensure_repositoryport-changes-ee-2467Douglas Barbosa Alexandre2017-06-281-0/+18
|
* Enable Style/DotPosition Rubocop :cop:Grzegorz Bizon2017-06-211-12/+12
|
* Correct RSpec/SingleLineHook cop offensesRobert Speicher2017-06-141-1/+4
|
* Don't allow to pass a user to ProjectWiki#http_url_to_repoRémy Coutable2017-05-301-14/+4
| | | | | | This partially reverts be25bbc4d2c7e3d5cf3da6f51cb7f7355295ef52. Signed-off-by: Rémy Coutable <remy@rymai.me>
* Update last_repository_updated_at when the wiki is updatedDouglas Barbosa Alexandre2017-05-041-6/+15
|
* Fix ProjectWiki#http_url_to_repo signatureRémy Coutable2017-03-201-4/+17
| | | | | | | New Gitlab::UrlSanitizer.http_credentials_for_user method responsible for generating a credentials hash from a user. Signed-off-by: Rémy Coutable <remy@rymai.me>
* Fix hook data for Wiki Page eventGabriel Mazetto2016-05-311-0/+13
| | | | Added "wiki" section and removed "repository"
* Use the relative url prefix for links in WikiArtem Sidorenko2016-05-131-1/+2
|
* Revert "Merge branch 'wiki-fix' into 'master' "Rémy Coutable2016-05-101-3/+1
| | | | | | | This reverts commit 4cc85a58e8ca00f5a4ecbd2bca40a0cad867b817, reversing changes made to 90ae445ba930068d04adc5a009dbdeabe4cb3e34. Signed-off-by: Rémy Coutable <remy@rymai.me>
* Use the proper GitLab URL for links in WikiArtem Sidorenko2016-05-091-1/+3
|
* Cache output of Repository#exists?Yorick Peterse2016-03-191-0/+12
| | | | | | | | | This caches the output of Repository#exists? in Redis while making sure it's flushed properly when creating new repositories, deleting them, etc. For the ProjectWiki tests to work I had to make ProjectWiki#create_repo! public as testing private methods in RSpec is a bit of a pain.