Commit Graph
16604 Commits
Author SHA1 Message Date
Robert Speicher 81a09bc74c Support only double quotes for multi-word label references 2015-05-26 15:49:20 -04:00
Robert Speicher 35853033b9 Fix for Snippets with a project 2015-05-26 15:48:32 -04:00
Robert Speicher 1a277c5025 Minor documentation updates 2015-05-26 15:48:32 -04:00
Robert Speicher b88da58cb6 Add reference_pattern to Referable models 2015-05-26 15:48:32 -04:00
Robert Speicher 94af050117 Use to_reference in reference filter specs 2015-05-26 15:48:32 -04:00
Robert Speicher 91eb346de6 Add invalidate_reference to ReferenceFilterSpecHelper 2015-05-26 15:48:31 -04:00
Robert Speicher 136ab73803 Update CommitRange#to_reference to use full SHAs
We only want them shortened by the filter, which calls to_s
2015-05-26 15:48:31 -04:00
Robert Speicher 9d032cddf5 Correct the ReferenceFilter html/pipeline/filter require 2015-05-26 15:48:31 -04:00
Robert Speicher 0359d41b06 Implement gfm_reference directly in Mentionable
Except for Note, which still overrides it.
2015-05-26 15:48:31 -04:00
Robert Speicher 38fb6279f9 Simplify cross_project_reference with to_reference 2015-05-26 15:48:31 -04:00
Robert Speicher ca268b85f6 Use to_reference in Markdown feature spec 2015-05-26 15:48:30 -04:00
Robert Speicher 3b80cf524c Use to_reference in Mentionable shared examples 2015-05-26 15:48:30 -04:00
Robert Speicher 8773f339a3 Minor model spec cleanups
Snippet model was missing project association
2015-05-26 15:48:30 -04:00
Robert Speicher c0faf91ff2 Add to_reference for models that support references
Now there is a single source of information for which attribute a model
uses to be referenced, and its special character.
2015-05-26 15:48:30 -04:00
Robert Speicher b06dc74d61 Add Referable concern 2015-05-26 15:48:30 -04:00
Robert Speicher 38cd3d6451 Add Commit#==
Prior, comparison would use the Ruby object's ID, which got out of sync
after a Spring fork and would result in erroneous test failures.

Now we just check that the compared object is a Commit and then compare
their underlying raw commit objects.
2015-05-26 15:48:29 -04:00
Robert Schilling 0ec1e4c028 Merge branch 'milestoneRescue' into 'master'
Change percent_complete rescue value from 100 to 0

The percent_complete method returns a value of 100 when a
ZeroDivisionError occurs. That seems like a very strange default for an
error case, and results in a bug when a milestone has no corresponding
issues (new, empty milestones show 100% completion). This commit changes
the rescue value to 0, and subsequently fixes #1656, which reported this
problem.

See merge request !714
2015-05-26 19:12:27 +00:00
Jonah Bishop 8b92946b54 Change percent_complete rescue value from 100 to 0
The percent_complete method returns a value of 100 when a
ZeroDivisionError occurs. That seems like a very strange default for an
error case, and results in a bug when a milestone has no corresponding
issues (new, empty milestones show 100% completion). This commit changes
the rescue value to 0, and subsequently fixes #1656, which reported this
problem.
2015-05-26 14:57:53 -04:00
Dmitriy Zaporozhets f955554d0f Merge branch 'master' of github.com:gitlabhq/gitlabhq 2015-05-26 20:32:55 +02:00
Dmitriy Zaporozhets a94dc7319c Merge branch 'master' of dev.gitlab.org:gitlab/gitlabhq 2015-05-26 20:32:23 +02:00
Dmitriy Zaporozhets b11bcb8a74 Use default control for search field in header
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-05-26 20:32:11 +02:00
Jeroen van Baarsen aa36a19613 Merge pull request #9319 from jvanbaarsen/validate-wiki-page-creation
Validate wiki page creation
2015-05-26 20:05:25 +02:00
Robert Schilling 5c2acc51e2 Merge branch 'fix-escape-key-in-zen-mode' into 'master'
Fix Zen Mode not closing with ESC key

### What does this MR do?

This MR fixes the ESC key not leaving Zen Mode (fullscreen).

### Why was this MR needed?

This has been broken since GitLab v7.8. The `change` event for `zen-toggle-comment` was never fired. See:

http://stackoverflow.com/questions/19505011/checkbox-checked-with-prop-does-not-fire-events-attached-to-change?answertab=votes#tab-top

### What are the relevant issue numbers?

* Closes #1025
* Closes https://github.com/gitlabhq/gitlabhq/issues/9018

See merge request !710
2015-05-26 17:26:28 +00:00
Dmitriy Zaporozhets f815094e6d Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ce 2015-05-26 19:08:03 +02:00
Jeroen van Baarsen b16aad9dd1 Validate wiki page creation
**What does this do?**
It adds validation to the creation of a wiki page, that way the user gets real
feedback instead of just a 404 page if the name of the wiki page was invalid

**Why is this needed?**
There are a lot of characters that are not allowed in the creation of a wiki
page, there is even a small text that is saying: Please don't use spaces.
Although we have that text there, we don't actually validate on this. This
commit adds validation on the title and gives the user actual feedback.

**What issues does this fix?**
Fixes http://github.com/gitlabhq/gitlabhq/issues/5357
Fixes https://github.com/gitlabhq/gitlabhq/issues/8565
Fixes https://github.com/gitlabhq/gitlabhq/issues/3913
Fixes https://github.com/gitlabhq/gitlabhq/issues/8166

Signed-off-by: Jeroen van Baarsen <jeroenvanbaarsen@gmail.com>
2015-05-26 19:01:11 +02:00
Jeroen van Baarsen b6117074cc Merge pull request #9320 from jvanbaarsen/wiki-extention
Use .md as extention for wiki pages
2015-05-26 19:00:43 +02:00
Jeroen van Baarsen fa2aee5048 Use .md as extention for wiki pages
**What does this do?**
It makes sure that when you create a wiki page via the web interface, the
extention is .md instead of .markdown

**Why is this needed?**
When you're using Gollum locally, it will create pages with the .md extention.
Also .md is the best known extention for markdown. This fix will make sure that
if you're using gollum or the webinterface, the extention will be the same.

**What issues does this fix?**
Fixes https://github.com/gitlabhq/gitlabhq/issues/5204

Signed-off-by: Jeroen van Baarsen <jeroenvanbaarsen@gmail.com>
2015-05-26 18:12:46 +02:00
Dmitriy Zaporozhets b5ea355078 Merge branch 'rs-link_to_label' into 'master'
Add link_to_label helper

The primary purpose of this change was to make the actual labels on `Labels#index` clickable.

See merge request !690
2015-05-26 15:09:04 +00:00
Dmitriy Zaporozhets b23025b669 Merge branch 'rs-gems' into 'master'
Update ffaker gem

Adds a version requirement which it didn't have before, at 2.0.0. This version has breaking API changes in that the namespace is now `FFaker` instead of `Faker`.

Prior, if a new developer checked out the repo, ran `bundle install` and then tried `rake dev:setup`, seeding would fail due to having the latest version of ffaker without the API changes in this MR.

Also updates `spring` version and the binstubs, just for kicks.

See merge request !686
2015-05-26 14:42:15 +00:00
Dmitriy Zaporozhets 08102ad748 Merge branch 'rs-issue-1690' into 'master'
Better handle label references that aren't actually references

Fixes #1690

See merge request !705
2015-05-26 14:35:54 +00:00
Dmitriy Zaporozhets 8ea443b6d6 Merge branch 'fix-fullscreen-preview-in-milestones' into 'master'
Fix Markdown preview not working in Edit Milestone page

### What does this MR do?

This MR removes the automatic Zen Mode URL update when a hash is present and makes Markdown preview work again in the Edit Milestone page. I think the intent was to make it possible to link to a full-screen edit with a URL (e.g. http://foo/bar/issues/1/edit#fullscreen), but I don't this has ever worked. Perhaps a future MR can support this.

### Why was this MR needed?

A JavaScript error would be seen in the Milestone Edit page:

```javascript
Uncaught error, unrecognized expression: $('.zennable input[type=checkbox]##md-preview-holder')
```

In the Milestone Edit page, apparently the use of the hash `#md-preview-holder` causes the Zen Mode JavaScript to attempt to parse the hash for the `fullscreen_` prefix and look up the checkbox based on a unknown ID.

### Are there points in the code the reviewer needs to double check?

If we want to keep this hash update, an alternative fix is to add an `if` check in the beginning of `checkboxFromLocationHash`:

```coffeescript
if (window.location.hash.indexOf('#' + ZenMode.fullscreen_prefix) == -1)
  return null
```

### What are the relevant issue numbers?

* Closes #1687
* Closes https://github.com/gitlabhq/gitlabhq/issues/9325

See merge request !711
2015-05-26 14:15:17 +00:00
Dmitriy Zaporozhets ebe0aef269 Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ce 2015-05-26 16:41:15 +03:00
Douwe Maan 608ad7dde3 Merge branch 'fix-milestone-browse-issues-permission-check' into 'master'
Refactor permission checks with issues and merge requests project settings

Slight refinement for read/write permission checks for 04d44522 as discussed in !691. Currently it appears that there is [no role that only has read-only access to issues](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/permissions/permissions.md), but it could be possible.

/cc: @DouweM

See merge request !704
2015-05-26 07:48:32 +00:00
Douwe Maan 9bb00cd77f Merge branch 'get-monkey-off-my-rack-attack' into 'master'
Remove Rack Attack monkey patches and bump to version 4.3.0

I finally got these monkey patches into Rack Attack v4.3.0, so GitLab no longer needs them. Hooray!

See: https://github.com/kickstarter/rack-attack/pull/128

See merge request !693
2015-05-26 07:43:57 +00:00
Job van der Voort d9f4dfe94b Merge branch 'master' into 'master'
Added documentation styleguide

Hi. I added a documentation styleguide and linked it to https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides

See merge request !709
2015-05-26 07:24:04 +00:00
Job van der Voort 109a3684f0 Merge branch 'backup_gitlab.com' into 'master'
Added note about backups for gitlab.com

Added note about backups for Gitlab.com based on question on Twitter
https://twitter.com/MarcelloLins/status/598544357294272513

See merge request !1828
2015-05-26 07:22:38 +00:00
Stan Hu ae552ec315 Fix Markdown preview not working in Edit Milestone page
Closes #1687
Closes https://github.com/gitlabhq/gitlabhq/issues/9325
2015-05-25 21:03:55 -07:00
Stan Hu 710627fbd8 Fix Zen Mode not closing with ESC key
Closes #1025
2015-05-25 20:27:20 -07:00
Karen Carias 2b4eb7869e Explained info better 2015-05-26 01:18:24 +00:00
Karen 4e26407679 fixed info 2015-05-26 00:26:57 +00:00
Karen ef32c60a54 fixed link 2015-05-26 00:24:40 +00:00
Karen 5314d6ff88 added link to documentation style guide 2015-05-26 00:23:25 +00:00
Karen 4034af8131 removed unnecessary information 2015-05-26 00:20:18 +00:00
Karen cbeef2f5a8 fixed info box 2015-05-26 00:18:54 +00:00
Karen f1ae6807eb created a documentation style guide 2015-05-26 00:18:07 +00:00
Stan Hu 9bcd36396b Refactor permission checks to use can? instead of issues_enabled and merge_requests_enabled 2015-05-25 16:51:04 -07:00
Sytse Sijbrandij dfa1d96a1f Update reason for the merge window. 2015-05-25 23:00:23 +00:00
Sytse Sijbrandij bdf7b44ac3 Merge branch 'rs-document-autolink' into 'master'
Document expanded autolinking in doc/markdown/markdown.md

See merge request !706
2015-05-25 20:45:08 +00:00
Robert Speicher fdde284c97 Document expanded autolinking in doc/markdown/markdown.md 2015-05-25 16:22:46 -04:00
Douwe Maan 8bed55d247 Merge branch 'fix_timezonedoc' into 'master'
Time zone text fix

Added small fix to /etc/gitlab/gitlab.rb

See merge request !1830
2015-05-25 20:19:51 +00:00