gitlab-org--gitlab-foss/spec
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
..
benchmarks Move Markdown/reference logic from Gitlab::Markdown to Banzai 2015-12-15 15:51:16 +01:00
controllers Merge branch 'serve_lfs_object' into 'master' 2015-12-08 14:19:52 +00:00
factories Migrate CI::Project to Project 2015-12-11 18:02:09 +01:00
features Trigger notes refresh in specs instead of waiting for ajax 2015-12-15 14:19:35 +01:00
finders Port GitLab EE ProjectsFinder changes 2015-11-20 15:53:04 +01:00
fixtures Use URL helpers in specs 2015-12-03 14:00:09 +01:00
helpers Improve text indication visibility on snippets 2015-12-08 14:31:24 -08:00
javascripts Make tab target selectors less naive 2015-12-08 14:47:28 -05:00
lib Move Markdown/reference logic from Gitlab::Markdown to Banzai 2015-12-15 15:51:16 +01:00
mailers Migrate CI::Services and CI::WebHooks to Services and WebHooks 2015-12-10 16:04:08 +01:00
models Merge branch 'master' into ci/persist-registration-token 2015-12-14 12:26:40 +01:00
requests Merge branch 'master' into ci/persist-registration-token 2015-12-14 12:26:40 +01:00
routing Move partial to right place and fix tests. 2015-09-08 15:14:14 +01:00
services Merge branch 'ci-project-migrate' into 'master' 2015-12-14 10:35:40 +00:00
support Move Markdown/reference logic from Gitlab::Markdown to Banzai 2015-12-15 15:51:16 +01:00
tasks/gitlab Add lfs to backup specs. 2015-11-19 10:43:45 +01:00
views/help Allow non-admin users to see version information 2015-09-23 17:18:15 -04:00
workers Fix specs 2015-12-10 16:16:34 +01:00
factories.rb Improve personal snippet access workflow. Fixes #3258 2015-10-29 18:42:29 -02:00
factories_spec.rb
rails_helper.rb
spec_helper.rb fix notification_service specs 2015-11-30 11:21:10 +02:00
teaspoon_env.rb