summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Update testslegacy-diff-notes-are-dumbDouwe Maan2016-07-151-4/+4
|
* Don't fail when a LegacyDiffNote didn't store the right diffDouwe Maan2016-07-152-3/+3
|
* Merge branch 'feature.rouge-20' into 'master' Robert Speicher2016-07-1511-236/+74
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Upgrade to Rouge 2.0 ## What does this MR do? This MR is a refactor of the HTMLGitlab formatter. The original was copy-pasted from the legacy HTML formatter and adapted to suit our needs. In particular, this MR: * Strips dead code and unused options * Factors out the "wrapping" into the places that care about it - Bonzai and the view helpers * Uses the Rouge 2.0 `token_lines` method to split tokens into lines, removing the custom code we used to do the same * Uses the now-public `span` method instead of re-implementing it ourselves * Removes options to not split into lines - the places where this feature wasn't being used are now using the plain `Formatters::HTML` instead of this class See merge request !4691
| * use %(...) and %[...] in favor of %<...>feature.rouge-20http://jneen.net/2016-07-144-6/+6
| |
| * use the proper variable names o_Ohttp://jneen.net/2016-07-141-2/+2
| |
| * bump rouge to 2.0.3http://jneen.net/2016-07-141-1/+1
| |
| * style: factor out `@lexer` into a methodhttp://jneen.net/2016-07-141-9/+13
| |
| * fix Gitlab::Highlight#initializer bugs from rebasehttp://jneen.net/2016-07-141-1/+2
| |
| * update to rouge 2.0.2http://jneen.net/2016-07-141-1/+1
| |
| * expect final newlines from the banzai filterhttp://jneen.net/2016-07-141-1/+1
| |
| * stub out errors from the formatterhttp://jneen.net/2016-07-141-1/+1
| | | | | | | | since we've eliminated #block_code
| * don't expect a random newline at the end of the thing?http://jneen.net/2016-07-141-1/+1
| |
| * don't expect &quot; encoding anymorehttp://jneen.net/2016-07-141-6/+6
| |
| * remove uses of the nowrap: featurehttp://jneen.net/2016-07-141-9/+9
| |
| * eliminate the final newline in <pre> blockshttp://jneen.net/2016-07-141-1/+5
| |
| * rm spec for a deleted methodhttp://jneen.net/2016-07-141-14/+0
| |
| * bugfix: don't error in css_classeshttp://jneen.net/2016-07-141-5/+8
| |
| * apparently this gets encoded now?http://jneen.net/2016-07-141-1/+1
| |
| * use the local lexer variable to respect plain: ...http://jneen.net/2016-07-141-1/+1
| |
| * we no longer encode double-quoteshttp://jneen.net/2016-07-141-3/+3
| |
| * no longer need cgihttp://jneen.net/2016-07-141-2/+0
| |
| * inline #rouge_formatterhttp://jneen.net/2016-07-141-6/+2
| |
| * use the new token_lines interface to format lineshttp://jneen.net/2016-07-142-74/+12
| |
| * without line anchors, this is just the plain HTML formatterhttp://jneen.net/2016-07-141-1/+1
| |
| * kill the :cssclass optionhttp://jneen.net/2016-07-143-5/+1
| |
| * trim more dead codehttp://jneen.net/2016-07-141-18/+3
| |
| * remove the dead linenos and linenostart optionshttp://jneen.net/2016-07-141-44/+2
| | | | | | | | and the methods that relied on them
| * add the wrapping back in for the banzai filterhttp://jneen.net/2016-07-141-1/+5
| |
| * kill the nowrap option in HTMLGitlab itselfhttp://jneen.net/2016-07-141-11/+1
| |
| * kill the nowrap optionhttp://jneen.net/2016-07-142-13/+8
| | | | | | | | | | the <pre><code> wrapping is *always* used by the helper, and *never* by anywhere else, so pull the wrapping into the helper
| * rm dead `highlighter` methodhttp://jneen.net/2016-07-141-4/+0
| |
| * the call site always specifies this optionhttp://jneen.net/2016-07-141-1/+0
| |
| * do this thing in a clearer wayhttp://jneen.net/2016-07-141-3/+6
| |
| * remove the unused inline_theme featurehttp://jneen.net/2016-07-141-10/+2
| |
| * deprecate @anchorlinenoshttp://jneen.net/2016-07-141-10/+0
| |
| * update rouge, gollum-lib, and github-markuphttp://jneen.net/2016-07-142-12/+12
| |
* | Merge branch '17341-firefox-u2f' into 'master' Robert Speicher2016-07-1516-47/+85
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow U2F devices to be used in Firefox - Adds U2F support for Firefox - Improve U2F feature detection logic - Have authentication flow be closer to the spec (single challenge instead of a challenge for each `signRequest`) - Closes #17341 - Related to #15337 See merge request !5177
| * | Add a U2F feature spec for multiple devices owned by the same user.17341-firefox-u2fTimothy Andrew2016-07-145-21/+57
| | | | | | | | | | | | | | | 1. This scenario was previously tested for the registration flow, but not authentication.
| * | Use a single challenge for U2F authentication.Timothy Andrew2016-07-145-12/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. According to the spec, either we have a single challenge with a number of `signRequests`, or a number of `signRequests`, each with it's own challenge. 2. Previously, we had both these - per-request challenges, as well as a single extra challenge. 3. This commit changes this so that the per-request challenges are removed, leaving only a single challenge, as per the v1.1 U2F API. 4. The existing implementation didn't work in Firefox, because the Firefox (extension) implementation is less flexible with regard to the inputs. 5. Fix teaspoon specs. 6. References: https://fidoalliance.org/specs/fido-u2f-v1.0-nfc-bt-amendment-20150514/fido-u2f-javascript-api.html#h2_background
| * | Load Javascript U2F library selectively.Timothy Andrew2016-07-1410-22/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. Only on supported Chrome versions 2. Mainly, this lets us simplify the javascript-based U2F check to `window.u2f`, where `window.u2f` can either be loaded from the GitLab server (for Chrome) or from the Firefox extension. 3. This is a better way to provide browser detection for U2F.
* | | Merge branch 'dont-ask-nearlythere' into 'master' Achilleas Pipinellis2016-07-151-1/+1
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Don't ask Heather to review documentation MR's See merge request !5282
| * | | Don't ask Heather to review documentation MR'sdont-ask-nearlythereJacob Vosmaer (GitLab)2016-07-151-1/+1
| | | |
* | | | Merge branch ↵Douwe Maan2016-07-153-17/+22
|\ \ \ \ | | | | | | | | | | | | | | | 'kradydal/gitlab-ce-create-todos-when-issue-author-assigne-or-mention-himself'
| * | | | When Issue author assign or mention himself Todos are createdKatarzyna Kobierska2016-07-143-17/+22
| | | | |
* | | | | Merge branch 'fix/project-export-filename' into 'master' Douwe Maan2016-07-155-3/+33
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | add project name and namespace to filename on project export Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/19848 Export filename now includes project and namespace path - [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 !5268
| * \ \ \ \ Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ce into ↵fix/project-export-filenameJames Lopez2016-07-156-26/+56
| |\ \ \ \ \ | | | |/ / / | | |/| | | | | | | | | fix/project-export-filename
| * | | | | Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ce into ↵James Lopez2016-07-1518-65/+53
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | fix/project-export-filename
| * | | | | | add project name and namespace to filename on project exportJames Lopez2016-07-155-3/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | added changelog
* | | | | | | Merge branch 'fix-mentioned-users-on-diff-notes' into 'master' Douwe Maan2016-07-154-6/+28
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix mentioned users on diff notes ## Summary `DiffNote`, and `LegacyDiffNote` returns empty array for `mentionable_attrs`, because `mentionable_attrs` is not inheritable by subclasses. The problem can be illustrated with this small sample: ```ruby module Mentionable extend ActiveSupport::Concern module ClassMethods def attr_mentionable(attr) mentionable_attrs << [attr.to_s] end def mentionable_attrs @mentionable_attrs ||= [] end end end class A include Mentionable attr_mentionable :foo end class B < A end A.mentionable_attrs => [["foo", {}]] B.mentionable_attrs => [] ``` Possible solution using `cattr_accessor`: ```ruby module Mentionable extend ActiveSupport::Concern module ClassMethods def attr_mentionable(attr) mentionable_attrs << [attr.to_s] end end included do cattr_accessor :mentionable_attrs, instance_accessor: false do [] end end end class A include Mentionable attr_mentionable :foo end class B < A end A.mentionable_attrs => [["foo"]] B.mentionable_attrs => [["foo"]] B.mentionable_attrs < [:bar] => [["foo"], ["bar"]] A.mentionable_attrs => [["foo"], ["bar"]] ``` `mentionable_attrs` is inheritable by subclasses. If a subclass changes the value then that would also change the value for parent class. Similarly if parent class changes the value then that would change the value of subclasses too. ## What are the relevant issue numbers? Fixes #19807 Fixes #18022 /cc @stanhu @DouweM @rspeicher See merge request !5243
| * | | | | | | Update CHANGELOGfix-mentioned-users-on-diff-notesDouglas Barbosa Alexandre2016-07-151-0/+1
| | | | | | | |