gitlab-org--gitlab-foss/app
Robert Speicher 5ffed49fef Merge branch 'lazy-reference-extractor' into 'master'
Move Markdown/reference logic from `Gitlab::Markdown` to `Banzai`

- Moves from `Gitlab::Markdown` to `Banzai`
- Moves filters and pipelines into their own namespace: `Banzai::Filter` and `Banzai::Pipeline`
- No more `autoload`!
- Split up `Gitlab::ReferenceExtractor` into `Banzai::ReferenceExtractor` and `Gitlab::ReferenceExtractor`
- Replace `something(load_lazy_references: true)` by `Gitlab::ReferenceExtractor.lazily { something }`

Goes from:

```ruby
def referenced_merge_requests
  references = [self, *notes].flat_map do |note|
    note.all_references(load_lazy_references: false).merge_requests
  end.uniq!

  Gitlab::Markdown::ReferenceFilter::LazyReference.load(references).uniq.sort_by(&:iid)
end
```

to

```ruby
def referenced_merge_requests
  Gitlab::ReferenceExtractor.lazily do
    [self, *notes].flat_map do |note|
      note.all_references.merge_requests
    end
  end.sort_by(&:iid)
end
```

See merge request !2027
2015-12-15 20:52:04 +00:00
..
assets Merge branch 'wider-layout' into 'master' 2015-12-15 18:19:55 +00:00
controllers Merge branch 'rs-issue-4032' into 'master' 2015-12-15 13:18:13 +00:00
finders sort milestones by due_date 2015-12-03 08:53:34 -06:00
helpers Banzai::XFilter -> Banzai::Filter::XFilter 2015-12-15 16:10:32 +01:00
mailers Merge branch 'ci-services-migrate' into 'master' 2015-12-14 10:32:57 +00:00
models Use lazy reference extractor to get issue's MRs 2015-12-15 16:57:11 +01:00
services Merge branch 'ci-project-migrate' into 'master' 2015-12-14 10:35:40 +00:00
uploaders Expose artifacts path 2015-11-23 13:05:22 +01:00
validators Inline Gitlab::Blacklist in NamespaceValidator 2015-12-07 16:57:26 -05:00
views Assign notes object to a variable 2015-12-15 14:19:35 +01:00
workers Migrate CI WebHooks and Emails to new tables 2015-12-10 16:04:08 +01:00