motion-html-pipeline 0.2 → 0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +2 -1
  3. data/lib/motion-html-pipeline.rb +4 -2
  4. data/lib/motion-html-pipeline/document_fragment.rb +3 -1
  5. data/lib/motion-html-pipeline/pipeline.rb +1 -2
  6. data/lib/motion-html-pipeline/pipeline/absolute_source_filter.rb +2 -0
  7. data/lib/motion-html-pipeline/pipeline/body_content.rb +2 -0
  8. data/lib/motion-html-pipeline/pipeline/disabled/@mention_filter.rb +2 -0
  9. data/lib/motion-html-pipeline/pipeline/disabled/@team_mention_filter.rb +99 -0
  10. data/lib/motion-html-pipeline/pipeline/disabled/autolink_filter.rb +2 -0
  11. data/lib/motion-html-pipeline/pipeline/disabled/camo_filter.rb +2 -0
  12. data/lib/motion-html-pipeline/pipeline/disabled/email_reply_filter.rb +2 -0
  13. data/lib/motion-html-pipeline/pipeline/disabled/emoji_filter.rb +2 -0
  14. data/lib/motion-html-pipeline/pipeline/disabled/markdown_filter.rb +25 -6
  15. data/lib/motion-html-pipeline/pipeline/disabled/plain_text_input_filter.rb +2 -0
  16. data/lib/motion-html-pipeline/pipeline/disabled/sanitization_filter.rb +2 -0
  17. data/lib/motion-html-pipeline/pipeline/disabled/syntax_highlight_filter.rb +17 -11
  18. data/lib/motion-html-pipeline/pipeline/disabled/toc_filter.rb +3 -1
  19. data/lib/motion-html-pipeline/pipeline/filter.rb +2 -0
  20. data/lib/motion-html-pipeline/pipeline/https_filter.rb +2 -0
  21. data/lib/motion-html-pipeline/pipeline/image_filter.rb +2 -0
  22. data/lib/motion-html-pipeline/pipeline/image_max_width_filter.rb +2 -0
  23. data/lib/motion-html-pipeline/pipeline/text_filter.rb +2 -0
  24. data/lib/motion-html-pipeline/pipeline/version.rb +3 -1
  25. data/spec/motion-html-pipeline/_helpers/mock_instumentation_service.rb +2 -0
  26. data/spec/motion-html-pipeline/pipeline/absolute_source_filter_spec.rb +2 -0
  27. data/spec/motion-html-pipeline/pipeline/disabled/auto_link_filter_spec.rb +2 -0
  28. data/spec/motion-html-pipeline/pipeline/disabled/camo_filter_spec.rb +2 -0
  29. data/spec/motion-html-pipeline/pipeline/disabled/email_reply_filter_spec.rb +2 -0
  30. data/spec/motion-html-pipeline/pipeline/disabled/emoji_filter_spec.rb +2 -0
  31. data/spec/motion-html-pipeline/pipeline/disabled/markdown_filter_spec.rb +64 -7
  32. data/spec/motion-html-pipeline/pipeline/disabled/mention_filter_test.rb +214 -0
  33. data/spec/motion-html-pipeline/pipeline/disabled/plain_text_input_filter_spec.rb +2 -0
  34. data/spec/motion-html-pipeline/pipeline/disabled/sanitization_filter_spec.rb +2 -0
  35. data/spec/motion-html-pipeline/pipeline/disabled/syntax_highlighting_filter_spec.rb +3 -0
  36. data/spec/motion-html-pipeline/pipeline/disabled/team_mention_filter_test.rb +202 -0
  37. data/spec/motion-html-pipeline/pipeline/disabled/toc_filter_spec.rb +2 -0
  38. data/spec/motion-html-pipeline/pipeline/https_filter_spec.rb +2 -0
  39. data/spec/motion-html-pipeline/pipeline/image_filter_spec.rb +2 -0
  40. data/spec/motion-html-pipeline/pipeline/image_max_width_filter_spec.rb +2 -0
  41. data/spec/motion-html-pipeline/pipeline_spec.rb +3 -1
  42. data/spec/spec_helper.rb +2 -0
  43. metadata +8 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 55c54e232963c7cf35b570d08254c1e606734fdfa9366b283a725ca000b93e27
4
- data.tar.gz: 88cc47077bb6987d072abd324721d5c31ec06d6ac24a4a829fdcc7bd860faa2b
3
+ metadata.gz: a2bf83e4abe0c69678a81a1861cbb829ec6899410f07436f934c708d595b4a94
4
+ data.tar.gz: abfafa964af397acada8022caa80579e8114d41f382dc26ac5f462b4dddad88a
5
5
  SHA512:
6
- metadata.gz: 9a0826f7b29520d89e95ceb4c29ebf14c4e6d6a9c545ffccff10e36d8dab55a4bbb395f1b3a05bb322eac611589c0b5b44a59abdca439b803be26bcca1136481
7
- data.tar.gz: 455fda735e854253104bc9562bb6e6b06ce56fd9c598577356ac2d38b353d15e3b8aa63ff1cfbd0b228a5e58c42f0a30d178ac8afcad5e142e4058aa044c6e5d
6
+ metadata.gz: '048abc1ca29f81a1c54395eee5ab57ab07905c76ed38801846fab5c1e25ec6799cd9aa546d4850d8fae30bca6a85aae30422b2c39f562aecb7d709a26021f86e'
7
+ data.tar.gz: d2e83504949146542b7ac984758587dade9cfb2d2895ca824ecd45aec5816db70aeee5039333450a85b7b484bea506624d72500cc5257077fec3451df74f5814
data/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
  [![Gem Version](https://badge.fury.io/rb/motion-html-pipeline.svg)](http://badge.fury.io/rb/motion-html-pipeline)
4
4
  [![Build Status](https://travis-ci.org/digitalmoksha/motion-html-pipeline.svg?branch=master)](https://travis-ci.org/digitalmoksha/motion-html-pipeline)
5
5
 
6
- _This gem is a port of the [`html-pipeline` gem](https://github.com/jch/html-pipeline) to RubyMotion, for use on iOS and macOS. Currently synced with `html-pipeline` release [`v.2.11.0`](https://github.com/jch/html-pipeline/releases/tag/v2.11.0)_
6
+ _This gem is a port of the [`html-pipeline` gem](https://github.com/jch/html-pipeline) to RubyMotion, for use on iOS and macOS. Currently synced with `html-pipeline` release [`v.2.12.3`](https://github.com/jch/html-pipeline/releases/tag/v2.12.3)_
7
7
 
8
8
  GitHub HTML processing filters and utilities. This module includes a small
9
9
  framework for defining DOM based content filters and applying them to user
@@ -164,6 +164,7 @@ EmojiPipeline = Pipeline.new [
164
164
  Several of the standard filters, such as `AutolinkFilter` and `EmojiFilter`, are initially disabled, as they rely on other Ruby gems that don't have RubyMotion equivalents. Please feel free to submit a pull request that enables any of them.
165
165
 
166
166
  * `MentionFilter` - replace `@user` mentions with links
167
+ * `TeamMentionFilter` - replace `@org/team` mentions with links
167
168
  * `AutolinkFilter` - auto_linking urls in HTML
168
169
  * `CamoFilter` - replace http image urls with [camo-fied](https://github.com/atmos/camo) https versions
169
170
  * `EmailReplyFilter` - util filter for working with emails
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  unless defined?(Motion::Project::Config)
2
4
  raise "This file must be required within a RubyMotion project Rakefile."
3
5
  end
@@ -9,6 +11,6 @@ Motion::Project::App.setup do |app|
9
11
  app.files.unshift(Dir.glob(File.join(lib_dir_path, "motion-html-pipeline/**/*.rb")))
10
12
 
11
13
  app.pods do
12
- pod 'HTMLKit', '~> 2.1'
14
+ pod 'HTMLKit', '~> 3.1'
13
15
  end
14
- end
16
+ end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Gives a Nokogiri type of interface, but uses
2
4
  # HTMLKit (https://github.com/iabudiab/HTMLKit)
3
5
  #
@@ -24,4 +26,4 @@ module MotionHTMLPipeline
24
26
  end
25
27
  alias :to_s :to_html
26
28
  end
27
- end
29
+ end
@@ -1,5 +1,4 @@
1
- # require 'nokogiri'
2
- # require 'active_support/xml_mini/nokogiri' # convert Documents to hashes
1
+ # frozen_string_literal: true
3
2
 
4
3
  module MotionHTMLPipeline
5
4
  # GitHub HTML processing filters and utilities. This module includes a small
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module MotionHTMLPipeline
2
4
  class Pipeline
3
5
  class AbsoluteSourceFilter < Filter
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module MotionHTMLPipeline
2
4
  class Pipeline
3
5
  # Public: Runs a String of content through an HTML processing pipeline,
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # TODO Requires Set (or something similar)
2
4
  #------------------------------------------------------------------------------
3
5
  # require 'set'
@@ -0,0 +1,99 @@
1
+ # frozen_string_literal: true
2
+
3
+ # require 'set'
4
+ #
5
+ # module MotionHTMLPipeline
6
+ # class Pipeline
7
+ # # HTML filter that replaces @org/team mentions with links. Mentions within
8
+ # # <pre>, <code>, <a>, <style>, and <script> elements are ignored.
9
+ # #
10
+ # # Context options:
11
+ # # :base_url - Used to construct links to team profile pages for each
12
+ # # mention.
13
+ # # :team_pattern - Used to provide a custom regular expression to
14
+ # # identify team names
15
+ # #
16
+ # class TeamMentionFilter < Filter
17
+ # # Public: Find @org/team mentions in text. See
18
+ # # TeamMentionFilter#team_mention_link_filter.
19
+ # #
20
+ # # TeamMentionFilter.mentioned_teams_in(text) do |match, org, team|
21
+ # # "<a href=...>#{team}</a>"
22
+ # # end
23
+ # #
24
+ # # text - String text to search.
25
+ # #
26
+ # # Yields the String match, org name, and team name. The yield's
27
+ # # return replaces the match in the original text.
28
+ # #
29
+ # # Returns a String replaced with the return of the block.
30
+ # def self.mentioned_teams_in(text, team_pattern = TeamPattern)
31
+ # text.gsub team_pattern do |match|
32
+ # org = $1
33
+ # team = $2
34
+ # yield match, org, team
35
+ # end
36
+ # end
37
+ #
38
+ # # Default pattern used to extract team names from text. The value can be
39
+ # # overridden by providing the team_pattern variable in the context. To
40
+ # # properly link the mention, should be in the format of /@(1)\/(2)/.
41
+ # TeamPattern = /
42
+ # (?<=^|\W) # beginning of string or non-word char
43
+ # @([a-z0-9][a-z0-9-]*) # @organization
44
+ # \/ # dividing slash
45
+ # ([a-z0-9][a-z0-9\-_]*) # team
46
+ # \b
47
+ # /ix
48
+ #
49
+ # # Don't look for mentions in text nodes that are children of these elements
50
+ # IGNORE_PARENTS = %w[pre code a style script].to_set
51
+ #
52
+ # def call
53
+ # result[:mentioned_teams] ||= []
54
+ #
55
+ # doc.search('.//text()').each do |node|
56
+ # content = node.to_html
57
+ # next unless content.include?('@')
58
+ # next if has_ancestor?(node, IGNORE_PARENTS)
59
+ # html = mention_link_filter(content, base_url, team_pattern)
60
+ # next if html == content
61
+ # node.replace(html)
62
+ # end
63
+ # doc
64
+ # end
65
+ #
66
+ # def team_pattern
67
+ # context[:team_pattern] || TeamPattern
68
+ # end
69
+ #
70
+ # # Replace @org/team mentions in text with links to the mentioned team's
71
+ # # page.
72
+ # #
73
+ # # text - String text to replace @mention team names in.
74
+ # # base_url - The base URL used to construct team page URLs.
75
+ # # team_pattern - Regular expression used to identify teams in text
76
+ # #
77
+ # # Returns a string with @team mentions replaced with links. All links have a
78
+ # # 'team-mention' class name attached for styling.
79
+ # def mention_link_filter(text, _base_url = '/', team_pattern = TeamPattern)
80
+ # self.class.mentioned_teams_in(text, team_pattern) do |match, org, team|
81
+ # link = link_to_mentioned_team(org, team)
82
+ #
83
+ # link ? match.sub("@#{org}/#{team}", link) : match
84
+ # end
85
+ # end
86
+ #
87
+ # def link_to_mentioned_team(org, team)
88
+ # result[:mentioned_teams] |= [team]
89
+ #
90
+ # url = base_url.dup
91
+ # url << '/' unless url =~ /[\/~]\z/
92
+ #
93
+ # "<a href='#{url << org}/#{team}' class='team-mention'>" \
94
+ # "@#{org}/#{team}" \
95
+ # '</a>'
96
+ # end
97
+ # end
98
+ # end
99
+ # end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # TODO Requires Rinku gem (or something similar)
2
4
  #------------------------------------------------------------------------------
3
5
  # module MotionHTMLPipeline
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # require 'openssl'
2
4
  # require 'uri'
3
5
  #
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # MotionHTMLPipeline::Pipeline.require_dependency('escape_utils', 'EmailReplyFilter')
2
4
  # MotionHTMLPipeline::Pipeline.require_dependency('email_reply_parser', 'EmailReplyFilter')
3
5
  #
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # require 'cgi'
2
4
  # MotionHTMLPipeline::Pipeline.require_dependency('gemoji', 'EmojiFilter')
3
5
  #
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # MotionHTMLPipeline::Pipeline.require_dependency('commonmarker', 'MarkdownFilter')
2
4
  #
3
5
  # module MotionHTMLPipeline
@@ -9,10 +11,12 @@
9
11
  # # Context options:
10
12
  # # :gfm => false Disable GFM line-end processing
11
13
  # # :commonmarker_extensions => [ :table, :strikethrough,
12
- # # :tagfilter, :autolink ] Common marker extensions to include
14
+ # # :tagfilter, :autolink ] Commonmarker extensions to include
13
15
  # #
14
16
  # # This filter does not write any additional information to the context hash.
15
17
  # class MarkdownFilter < TextFilter
18
+ # DEFAULT_COMMONMARKER_EXTENSIONS = %i[table strikethrough tagfilter autolink].freeze
19
+ #
16
20
  # def initialize(text, context = nil, result = nil)
17
21
  # super text, context, result
18
22
  # @text = @text.delete "\r"
@@ -21,14 +25,29 @@
21
25
  # # Convert Markdown to HTML using the best available implementation
22
26
  # # and convert into a DocumentFragment.
23
27
  # def call
24
- # options = [:GITHUB_PRE_LANG]
25
- # options << :HARDBREAKS if context[:gfm] != false
26
- # options << :UNSAFE if context[:unsafe]
27
28
  # extensions = context.fetch(
28
29
  # :commonmarker_extensions,
29
- # ['table', 'strikethrough', 'tagfilter', 'autolink']
30
+ # DEFAULT_COMMONMARKER_EXTENSIONS
30
31
  # )
31
- # html = CommonMarker.render_html(@text, options, extensions)
32
+ # html = if (renderer = context[:commonmarker_renderer])
33
+ # unless renderer < CommonMarker::HtmlRenderer
34
+ # raise ArgumentError, "`commonmark_renderer` must be derived from `CommonMarker::HtmlRenderer`"
35
+ # end
36
+ # parse_options = :DEFAULT
37
+ # parse_options = [:UNSAFE] if context[:unsafe]
38
+ #
39
+ # render_options = [:GITHUB_PRE_LANG]
40
+ # render_options << :HARDBREAKS if context[:gfm] != false
41
+ # render_options = [:UNSAFE] if context[:unsafe]
42
+ #
43
+ # doc = CommonMarker.render_doc(@text, parse_options, extensions)
44
+ # renderer.new(options: render_options, extensions: extensions).render(doc)
45
+ # else
46
+ # options = [:GITHUB_PRE_LANG]
47
+ # options << :HARDBREAKS if context[:gfm] != false
48
+ # options << :UNSAFE if context[:unsafe]
49
+ # CommonMarker.render_html(@text, options, extensions)
50
+ # end
32
51
  # html.rstrip!
33
52
  # html
34
53
  # end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # MotionHTMLPipeline::Pipeline.require_dependency('escape_utils', 'PlainTextInputFilter')
2
4
  #
3
5
  # module MotionHTMLPipeline
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # MotionHTMLPipeline::Pipeline.require_dependency('sanitize', 'SanitizationFilter')
2
4
  #
3
5
  # module MotionHTMLPipeline
@@ -1,9 +1,18 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # MotionHTMLPipeline::Pipeline.require_dependency('rouge', 'SyntaxHighlightFilter')
2
4
  #
3
5
  # module MotionHTMLPipeline
4
6
  # class Pipeline
5
- # # HTML Filter that syntax highlights code blocks wrapped
6
- # # in <pre lang="...">.
7
+ # # HTML Filter that syntax highlights text inside code blocks.
8
+ # #
9
+ # # Context options:
10
+ # #
11
+ # # :highlight => String represents the language to pick lexer. Defaults to empty string.
12
+ # # :scope => String represents the class attribute adds to pre element after.
13
+ # # Defaults to "highlight highlight-css" if highlights a css code block.
14
+ # #
15
+ # # This filter does not write any additional information to the context hash.
7
16
  # class SyntaxHighlightFilter < Filter
8
17
  # def initialize(*args)
9
18
  # super(*args)
@@ -15,23 +24,20 @@
15
24
  # default = context[:highlight] && context[:highlight].to_s
16
25
  # next unless lang = node['lang'] || default
17
26
  # next unless lexer = lexer_for(lang)
18
- # text = node.inner_text
19
27
  #
20
- # html = highlight_with_timeout_handling(text, lang)
28
+ # text = node.inner_text
29
+ # html = highlight_with_timeout_handling(text, lexer)
21
30
  # next if html.nil?
22
31
  #
23
32
  # node.inner_html = html
24
- # klass = node['class']
25
- # scope = context[:scope] || "highlight-#{lang}"
26
- # klass = [klass, scope].compact.join ' '
27
- #
28
- # node['class'] = klass
33
+ # scope = context.fetch(:scope) { 'highlight' }
34
+ # node['class'] = "#{scope} #{scope}-#{lang}"
29
35
  # end
30
36
  # doc
31
37
  # end
32
38
  #
33
- # def highlight_with_timeout_handling(text, lang)
34
- # Rouge.highlight(text, lang, @formatter)
39
+ # def highlight_with_timeout_handling(text, lexer)
40
+ # Rouge.highlight(text, lexer, @formatter)
35
41
  # rescue Timeout::Error => _
36
42
  # nil
37
43
  # end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # MotionHTMLPipeline::Pipeline.require_dependency('escape_utils', 'TableOfContentsFilter')
2
4
  #
3
5
  # module MotionHTMLPipeline
@@ -33,7 +35,7 @@
33
35
  # end
34
36
  #
35
37
  # def call
36
- # result[:toc] = ''
38
+ # result[:toc] = String.new('')
37
39
  #
38
40
  # headers = Hash.new(0)
39
41
  # doc.css('h1, h2, h3, h4, h5, h6').each do |node|
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module MotionHTMLPipeline
2
4
  class Pipeline
3
5
  # Base class for user content HTML filters. Each filter takes an
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module MotionHTMLPipeline
2
4
  class Pipeline
3
5
  # HTML Filter for replacing http references to :http_url with https versions.
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module MotionHTMLPipeline
2
4
  class Pipeline
3
5
  # HTML Filter that converts image's url into <img> tag.
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module MotionHTMLPipeline
2
4
  class Pipeline
3
5
  # This filter rewrites image tags with a max-width inline style and also wraps
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module MotionHTMLPipeline
2
4
  class Pipeline
3
5
  class TextFilter < Filter
@@ -1,5 +1,7 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module MotionHTMLPipeline
2
4
  class Pipeline
3
- VERSION = '0.2'.freeze
5
+ VERSION = '0.3'.freeze
4
6
  end
5
7
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class MockedInstrumentationService
2
4
  attr_reader :events
3
5
  def initialize(event = nil, events = [])
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  describe 'MotionHTMLPipeline::Pipeline::AbsoluteSourceFilterTest' do
2
4
  AbsoluteSourceFilter = MotionHTMLPipeline::Pipeline::AbsoluteSourceFilter
3
5
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # describe 'MotionHTMLPipeline::Pipeline::AutolinkFilterTest' do
2
4
  # AutolinkFilter = MotionHTMLPipeline::Pipeline::AutolinkFilter
3
5
  #
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # describe 'MotionHTMLPipeline::Pipeline::CamoFilterTest' do
2
4
  # CamoFilter = MotionHTMLPipeline::Pipeline::CamoFilter
3
5
  #
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # describe 'MotionHTMLPipeline::Pipeline::EmailReplyFilterTest' do
2
4
  # EmailReplyFilter = MotionHTMLPipeline::Pipeline::EmailReplyFilter
3
5
  #
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # describe 'MotionHTMLPipeline::Pipeline::EmojiFilterTest' do
2
4
  # EmojiFilter = MotionHTMLPipeline::Pipeline::EmojiFilter
3
5
  #
@@ -1,19 +1,41 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # describe 'MotionHTMLPipeline::Pipeline::MarkdownFilterTest' do
2
4
  # MarkdownFilter = MotionHTMLPipeline::Pipeline::MarkdownFilter
3
5
  #
6
+ # class CustomRenderer < CommonMarker::HtmlRenderer
7
+ # def header(node)
8
+ # block do
9
+ # text = node.first_child.string_content
10
+ # level = node.header_level
11
+ # out("{level: #{level}, text: #{text}}")
12
+ # super
13
+ # end
14
+ # end
15
+ # end
16
+ #
4
17
  # def setup
5
18
  # @haiku =
6
19
  # "Pointing at the moon\n" \
7
- # "Reminded of simple things\n" \
8
- # 'Moments matter most'
20
+ # "Reminded of simple things\n" \
21
+ # 'Moments matter most'
9
22
  # @links =
10
23
  # 'See http://example.org/ for more info'
11
24
  # @code =
12
25
  # "```\n" \
13
- # 'def hello()' \
14
- # " 'world'" \
15
- # 'end' \
16
- # '```'
26
+ # 'def hello()' \
27
+ # " 'world'" \
28
+ # 'end' \
29
+ # '```'
30
+ # @header = <<~DOC
31
+ # # Words
32
+ #
33
+ # Some words
34
+ #
35
+ # ## Words
36
+ #
37
+ # More words?
38
+ # DOC
17
39
  # end
18
40
  #
19
41
  # def test_fails_when_given_a_documentfragment
@@ -59,6 +81,42 @@
59
81
  # doc = MarkdownFilter.new(iframe, commonmarker_extensions: [], unsafe: true).call
60
82
  # assert_equal(doc, iframe)
61
83
  # end
84
+ #
85
+ # def test_bogus_renderer
86
+ # assert_raises ArgumentError do
87
+ # MarkdownFilter.to_document(@haiku, commonmarker_renderer: 23)
88
+ # end
89
+ # end
90
+ #
91
+ # def test_legitimate_renderer
92
+ # results = MarkdownFilter.new(@header, commonmarker_renderer: CustomRenderer).call
93
+ # expected = <<~DOC
94
+ # {level: 1, text: Words}
95
+ # <h1>Words</h1>
96
+ # <p>Some words</p>
97
+ # {level: 2, text: Words}
98
+ # <h2>Words</h2>
99
+ # <p>More words?</p>
100
+ # DOC
101
+ #
102
+ # assert_equal results, expected.chomp
103
+ # end
104
+ #
105
+ # def test_without_tagfilter
106
+ # extensions = HTML::Pipeline::MarkdownFilter::DEFAULT_COMMONMARKER_EXTENSIONS - [:tagfilter]
107
+ # script = '<script>foobar</script>'
108
+ # results = MarkdownFilter.new(script, unsafe: true, commonmarker_extensions: extensions).call
109
+ #
110
+ # assert_equal results, script
111
+ # end
112
+ #
113
+ # def test_legitimate_custom_renderer_without_tagfilter
114
+ # extensions = HTML::Pipeline::MarkdownFilter::DEFAULT_COMMONMARKER_EXTENSIONS - [:tagfilter]
115
+ # script = '<script>foobar</script>'
116
+ # results = MarkdownFilter.new(script, unsafe: true, commonmarker_extensions: extensions, commonmarker_renderer: CustomRenderer).call
117
+ #
118
+ # assert_equal results, script
119
+ # end
62
120
  # end
63
121
  #
64
122
  # class GFMTest < Minitest::Test
@@ -109,4 +167,3 @@
109
167
  # assert_equal "<ul>\n<li>foo</li>\n<li>bar</li>\n</ul>",
110
168
  # gfm("* foo\n* bar")
111
169
  # end
112
- # end
@@ -0,0 +1,214 @@
1
+ # frozen_string_literal: true
2
+
3
+ # require 'test_helper'
4
+
5
+ # describe 'MotionHTMLPipeline::Pipeline::MentionFilterTest' do
6
+ # def filter(html, base_url = '/', info_url = nil, username_pattern = nil)
7
+ # HTML::Pipeline::MentionFilter.call(html, base_url: base_url, info_url: info_url, username_pattern: username_pattern)
8
+ # end
9
+ #
10
+ # def test_filtering_a_documentfragment
11
+ # body = '<p>@kneath: check it out.</p>'
12
+ # doc = Nokogiri::HTML::DocumentFragment.parse(body)
13
+ #
14
+ # res = filter(doc, '/')
15
+ # assert_same doc, res
16
+ #
17
+ # link = '<a href="/kneath" class="user-mention">@kneath</a>'
18
+ # assert_equal "<p>#{link}: check it out.</p>",
19
+ # res.to_html
20
+ # end
21
+ #
22
+ # def test_filtering_plain_text
23
+ # body = '<p>@kneath: check it out.</p>'
24
+ # res = filter(body, '/')
25
+ #
26
+ # link = '<a href="/kneath" class="user-mention">@kneath</a>'
27
+ # assert_equal "<p>#{link}: check it out.</p>",
28
+ # res.to_html
29
+ # end
30
+ #
31
+ # def test_not_replacing_mentions_in_pre_tags
32
+ # body = '<pre>@kneath: okay</pre>'
33
+ # assert_equal body, filter(body).to_html
34
+ # end
35
+ #
36
+ # def test_not_replacing_mentions_in_code_tags
37
+ # body = '<p><code>@kneath:</code> okay</p>'
38
+ # assert_equal body, filter(body).to_html
39
+ # end
40
+ #
41
+ # def test_not_replacing_mentions_in_style_tags
42
+ # body = '<style>@media (min-width: 768px) { color: red; }</style>'
43
+ # assert_equal body, filter(body).to_html
44
+ # end
45
+ #
46
+ # def test_not_replacing_mentions_in_links
47
+ # body = '<p><a>@kneath</a> okay</p>'
48
+ # assert_equal body, filter(body).to_html
49
+ # end
50
+ #
51
+ # def test_entity_encoding_and_whatnot
52
+ # body = "<p>@&#x6b;neath what's up</p>"
53
+ # link = '<a href="/kneath" class="user-mention">@kneath</a>'
54
+ # assert_equal "<p>#{link} what's up</p>", filter(body, '/').to_html
55
+ # end
56
+ #
57
+ # def test_html_injection
58
+ # body = '<p>@kneath &lt;script>alert(0)&lt;/script></p>'
59
+ # link = '<a href="/kneath" class="user-mention">@kneath</a>'
60
+ # assert_equal "<p>#{link} &lt;script&gt;alert(0)&lt;/script&gt;</p>",
61
+ # filter(body, '/').to_html
62
+ # end
63
+ #
64
+ # def test_links_to_nothing_when_no_info_url_given
65
+ # body = '<p>How do I @mention someone?</p>'
66
+ # assert_equal '<p>How do I @mention someone?</p>',
67
+ # filter(body, '/').to_html
68
+ # end
69
+ #
70
+ # def test_links_to_more_info_when_info_url_given
71
+ # body = '<p>How do I @mention someone?</p>'
72
+ # link = '<a href="https://github.com/blog/821" class="user-mention">@mention</a>'
73
+ # assert_equal "<p>How do I #{link} someone?</p>",
74
+ # filter(body, '/', 'https://github.com/blog/821').to_html
75
+ # end
76
+ #
77
+ # def test_base_url_slash
78
+ # body = '<p>Hi, @jch!</p>'
79
+ # link = '<a href="/jch" class="user-mention">@jch</a>'
80
+ # assert_equal "<p>Hi, #{link}!</p>",
81
+ # filter(body, '/').to_html
82
+ # end
83
+ #
84
+ # def test_base_url_under_custom_route
85
+ # body = '<p>Hi, @jch!</p>'
86
+ # link = '<a href="/userprofile/jch" class="user-mention">@jch</a>'
87
+ # assert_equal "<p>Hi, #{link}!</p>",
88
+ # filter(body, '/userprofile').to_html
89
+ # end
90
+ #
91
+ # def test_base_url_slash_with_tilde
92
+ # body = '<p>Hi, @jch!</p>'
93
+ # link = '<a href="/~jch" class="user-mention">@jch</a>'
94
+ # assert_equal "<p>Hi, #{link}!</p>",
95
+ # filter(body, '/~').to_html
96
+ # end
97
+ #
98
+ # MarkdownPipeline =
99
+ # HTML::Pipeline.new [
100
+ # HTML::Pipeline::MarkdownFilter,
101
+ # HTML::Pipeline::MentionFilter
102
+ # ]
103
+ #
104
+ # def mentioned_usernames
105
+ # result = {}
106
+ # MarkdownPipeline.call(@body, {}, result)
107
+ # result[:mentioned_usernames]
108
+ # end
109
+ #
110
+ # def test_matches_usernames_in_body
111
+ # @body = '@test how are you?'
112
+ # assert_equal %w[test], mentioned_usernames
113
+ # end
114
+ #
115
+ # def test_matches_usernames_with_dashes
116
+ # @body = 'hi @some-user'
117
+ # assert_equal %w[some-user], mentioned_usernames
118
+ # end
119
+ #
120
+ # def test_matches_usernames_followed_by_a_single_dot
121
+ # @body = 'okay @some-user.'
122
+ # assert_equal %w[some-user], mentioned_usernames
123
+ # end
124
+ #
125
+ # def test_matches_usernames_followed_by_multiple_dots
126
+ # @body = 'okay @some-user...'
127
+ # assert_equal %w[some-user], mentioned_usernames
128
+ # end
129
+ #
130
+ # def test_does_not_match_email_addresses
131
+ # @body = 'aman@tmm1.net'
132
+ # assert_equal [], mentioned_usernames
133
+ # end
134
+ #
135
+ # def test_does_not_match_domain_name_looking_things
136
+ # @body = 'we need a @github.com email'
137
+ # assert_equal [], mentioned_usernames
138
+ # end
139
+ #
140
+ # def test_does_not_match_organization_team_mentions
141
+ # @body = 'we need to @github/enterprise know'
142
+ # assert_equal [], mentioned_usernames
143
+ # end
144
+ #
145
+ # def test_matches_colon_suffixed_names
146
+ # @body = '@tmm1: what do you think?'
147
+ # assert_equal %w[tmm1], mentioned_usernames
148
+ # end
149
+ #
150
+ # def test_matches_list_of_names
151
+ # @body = '@defunkt @atmos @kneath'
152
+ # assert_equal %w[defunkt atmos kneath], mentioned_usernames
153
+ # end
154
+ #
155
+ # def test_matches_list_of_names_with_commas
156
+ # @body = '/cc @defunkt, @atmos, @kneath'
157
+ # assert_equal %w[defunkt atmos kneath], mentioned_usernames
158
+ # end
159
+ #
160
+ # def test_matches_inside_brackets
161
+ # @body = '(@mislav) and [@rtomayko]'
162
+ # assert_equal %w[mislav rtomayko], mentioned_usernames
163
+ # end
164
+ #
165
+ # def test_doesnt_ignore_invalid_users
166
+ # @body = '@defunkt @mojombo and @somedude'
167
+ # assert_equal %w[defunkt mojombo somedude], mentioned_usernames
168
+ # end
169
+ #
170
+ # def test_returns_distinct_set
171
+ # @body = '/cc @defunkt, @atmos, @kneath, @defunkt, @defunkt'
172
+ # assert_equal %w[defunkt atmos kneath], mentioned_usernames
173
+ # end
174
+ #
175
+ # def test_does_not_match_inline_code_block_with_multiple_code_blocks
176
+ # @body = "something\n\n`/cc @defunkt @atmos @kneath` `/cc @atmos/atmos`"
177
+ # assert_equal %w[], mentioned_usernames
178
+ # end
179
+ #
180
+ # def test_mention_at_end_of_parenthetical_sentence
181
+ # @body = "(We're talking 'bout @ymendel.)"
182
+ # assert_equal %w[ymendel], mentioned_usernames
183
+ # end
184
+ #
185
+ # def test_username_pattern_can_be_customized
186
+ # body = '<p>@_abc: test.</p>'
187
+ # doc = Nokogiri::HTML::DocumentFragment.parse(body)
188
+ #
189
+ # res = filter(doc, '/', nil, /(_[a-z]{3})/)
190
+ #
191
+ # link = '<a href="/_abc" class="user-mention">@_abc</a>'
192
+ # assert_equal "<p>#{link}: test.</p>",
193
+ # res.to_html
194
+ # end
195
+ #
196
+ # def test_filter_does_not_create_a_new_object_for_default_username_pattern
197
+ # body = '<div>@test</div>'
198
+ # doc = Nokogiri::HTML::DocumentFragment.parse(body)
199
+ #
200
+ # filter(doc.clone, '/', nil)
201
+ # pattern_count = HTML::Pipeline::MentionFilter::MentionPatterns.length
202
+ # filter(doc.clone, '/', nil)
203
+ #
204
+ # assert_equal pattern_count, HTML::Pipeline::MentionFilter::MentionPatterns.length
205
+ # filter(doc.clone, '/', nil, /test/)
206
+ # assert_equal pattern_count + 1, HTML::Pipeline::MentionFilter::MentionPatterns.length
207
+ # end
208
+ #
209
+ # def test_mention_link_filter
210
+ # filter = HTML::Pipeline::MentionFilter.new nil
211
+ # expected = "<a href='/hubot' class='user-mention'>@hubot</a>"
212
+ # assert_equal expected, filter.mention_link_filter('@hubot')
213
+ # end
214
+ # end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # describe 'MotionHTMLPipeline::Pipeline::PlainTextInputFilterTest' do
2
4
  # PlainTextInputFilter = MotionHTMLPipeline::Pipeline::PlainTextInputFilter
3
5
  #
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # describe 'MotionHTMLPipeline::Pipeline::SanitizationFilterTest' do
2
4
  # SanitizationFilter = MotionHTMLPipeline::Pipeline::SanitizationFilter
3
5
  #
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # describe 'MotionHTMLPipeline::Pipeline::SyntaxHighlightFilterTest' do
2
4
  # SyntaxHighlightFilter = MotionHTMLPipeline::Pipeline::SyntaxHighlightFilter
3
5
  #
@@ -6,6 +8,7 @@
6
8
  # '<pre>hello</pre>', highlight: 'coffeescript'
7
9
  #
8
10
  # doc = filter.call
11
+ # assert !doc.css('.highlight').empty?
9
12
  # assert !doc.css('.highlight-coffeescript').empty?
10
13
  # end
11
14
  #
@@ -0,0 +1,202 @@
1
+ # frozen_string_literal: true
2
+
3
+ # require 'test_helper'
4
+
5
+ # describe 'MotionHTMLPipeline::Pipeline::TeamMentionFilterTest' do
6
+ # def filter(html, base_url = '/', team_pattern = nil)
7
+ # HTML::Pipeline::TeamMentionFilter.call(html, base_url: base_url, team_pattern: team_pattern)
8
+ # end
9
+ #
10
+ # def test_filtering_plain_text
11
+ # body = '<p>@github/team: check it out.</p>'
12
+ # res = filter(body, '/')
13
+ #
14
+ # link = '<a href="/github/team" class="team-mention">@github/team</a>'
15
+ # assert_equal "<p>#{link}: check it out.</p>",
16
+ # res.to_html
17
+ # end
18
+ #
19
+ # def test_filtering_a_documentfragment
20
+ # body = '<p>@github/team: check it out.</p>'
21
+ # doc = Nokogiri::HTML::DocumentFragment.parse(body)
22
+ #
23
+ # res = filter(doc, '/')
24
+ # assert_same doc, res
25
+ #
26
+ # link = '<a href="/github/team" class="team-mention">@github/team</a>'
27
+ # assert_equal "<p>#{link}: check it out.</p>",
28
+ # res.to_html
29
+ # end
30
+ #
31
+ # def test_not_replacing_mentions_in_pre_tags
32
+ # body = '<pre>@github/team: okay</pre>'
33
+ # assert_equal body, filter(body).to_html
34
+ # end
35
+ #
36
+ # def test_not_replacing_mentions_in_code_tags
37
+ # body = '<p><code>@github/team:</code> okay</p>'
38
+ # assert_equal body, filter(body).to_html
39
+ # end
40
+ #
41
+ # def test_not_replacing_mentions_in_style_tags
42
+ # body = '<style>@github/team (min-width: 768px) { color: red; }</style>'
43
+ # assert_equal body, filter(body).to_html
44
+ # end
45
+ #
46
+ # def test_not_replacing_mentions_in_links
47
+ # body = '<p><a>@github/team</a> okay</p>'
48
+ # assert_equal body, filter(body).to_html
49
+ # end
50
+ #
51
+ # def test_entity_encoding_and_whatnot
52
+ # body = "<p>@github&#47team what's up</p>"
53
+ # link = '<a href="/github/team" class="team-mention">@github/team</a>'
54
+ # assert_equal "<p>#{link} what's up</p>", filter(body, '/').to_html
55
+ # end
56
+ #
57
+ # def test_html_injection
58
+ # body = '<p>@github/team &lt;script>alert(0)&lt;/script></p>'
59
+ # link = '<a href="/github/team" class="team-mention">@github/team</a>'
60
+ # assert_equal "<p>#{link} &lt;script&gt;alert(0)&lt;/script&gt;</p>",
61
+ # filter(body, '/').to_html
62
+ # end
63
+ #
64
+ # def test_links_to_nothing_with_user_mention
65
+ # body = '<p>Hi, @kneath</p>'
66
+ # assert_equal '<p>Hi, @kneath</p>',
67
+ # filter(body, '/').to_html
68
+ # end
69
+ #
70
+ # def test_base_url_slash
71
+ # body = '<p>Hi, @github/team!</p>'
72
+ # link = '<a href="/github/team" class="team-mention">@github/team</a>'
73
+ # assert_equal "<p>Hi, #{link}!</p>",
74
+ # filter(body, '/').to_html
75
+ # end
76
+ #
77
+ # def test_base_url_under_custom_route
78
+ # body = '<p>Hi, @org/team!</p>'
79
+ # link = '<a href="www.github.com/org/team" class="team-mention">@org/team</a>'
80
+ # assert_equal "<p>Hi, #{link}!</p>",
81
+ # filter(body, 'www.github.com').to_html
82
+ # end
83
+ #
84
+ # def test_base_url_slash_with_tilde
85
+ # body = '<p>Hi, @github/team!</p>'
86
+ # link = '<a href="/~github/team" class="team-mention">@github/team</a>'
87
+ # assert_equal "<p>Hi, #{link}!</p>",
88
+ # filter(body, '/~').to_html
89
+ # end
90
+ #
91
+ # def test_multiple_team_mentions
92
+ # body = '<p>Hi, @github/whale and @github/donut!</p>'
93
+ # link_whale = '<a href="/github/whale" class="team-mention">@github/whale</a>'
94
+ # link_donut = '<a href="/github/donut" class="team-mention">@github/donut</a>'
95
+ # assert_equal "<p>Hi, #{link_whale} and #{link_donut}!</p>",
96
+ # filter(body).to_html
97
+ # end
98
+ #
99
+ # MarkdownPipeline =
100
+ # HTML::Pipeline.new [
101
+ # HTML::Pipeline::MarkdownFilter,
102
+ # HTML::Pipeline::TeamMentionFilter
103
+ # ]
104
+ #
105
+ # def mentioned_teams
106
+ # result = {}
107
+ # MarkdownPipeline.call(@body, {}, result)
108
+ # result[:mentioned_teams]
109
+ # end
110
+ #
111
+ # def test_matches_teams_in_body
112
+ # @body = '@test/team how are you?'
113
+ # assert_equal %w[team], mentioned_teams
114
+ # end
115
+ #
116
+ # def test_matches_orgs_with_dashes
117
+ # @body = 'hi @some-org/team'
118
+ # assert_equal %w[team], mentioned_teams
119
+ # end
120
+ #
121
+ # def test_matches_teams_with_dashes
122
+ # @body = 'hi @github/some-team'
123
+ # assert_equal %w[some-team], mentioned_teams
124
+ # end
125
+ #
126
+ # def test_matches_teams_followed_by_a_single_dot
127
+ # @body = 'okay @github/team.'
128
+ # assert_equal %w[team], mentioned_teams
129
+ # end
130
+ #
131
+ # def test_matches_teams_followed_by_multiple_dots
132
+ # @body = 'okay @github/team...'
133
+ # assert_equal %w[team], mentioned_teams
134
+ # end
135
+ #
136
+ # def test_does_not_match_email_addresses
137
+ # @body = 'aman@tmm1.net'
138
+ # assert_equal [], mentioned_teams
139
+ # end
140
+ #
141
+ # def test_does_not_match_domain_name_looking_things
142
+ # @body = 'we need a @github.com email'
143
+ # assert_equal [], mentioned_teams
144
+ # end
145
+ #
146
+ # def test_does_not_match_user_mentions
147
+ # @body = 'we need to @enterprise know'
148
+ # assert_equal [], mentioned_teams
149
+ # end
150
+ #
151
+ # def test_matches_colon_suffixed_team_names
152
+ # @body = '@github/team: what do you think?'
153
+ # assert_equal %w[team], mentioned_teams
154
+ # end
155
+ #
156
+ # def test_matches_list_of_teams
157
+ # @body = '@github/whale @github/donut @github/green'
158
+ # assert_equal %w[whale donut green], mentioned_teams
159
+ # end
160
+ #
161
+ # def test_matches_list_of_teams_with_commas
162
+ # @body = '/cc @github/whale, @github/donut, @github/green'
163
+ # assert_equal %w[whale donut green], mentioned_teams
164
+ # end
165
+ #
166
+ # def test_matches_inside_brackets
167
+ # @body = '(@github/whale) and [@github/donut]'
168
+ # assert_equal %w[whale donut], mentioned_teams
169
+ # end
170
+ #
171
+ # def test_returns_distinct_set
172
+ # @body = '/cc @github/whale, @github/donut, @github/whale, @github/whale'
173
+ # assert_equal %w[whale donut], mentioned_teams
174
+ # end
175
+ #
176
+ # def test_does_not_match_inline_code_block_with_multiple_code_blocks
177
+ # @body = "something\n\n`/cc @github/whale @github/donut @github/green` `/cc @donut/donut`"
178
+ # assert_equal %w[], mentioned_teams
179
+ # end
180
+ #
181
+ # def test_mention_at_end_of_parenthetical_sentence
182
+ # @body = "(We're talking 'bout @some-org/some-team.)"
183
+ # assert_equal %w[some-team], mentioned_teams
184
+ # end
185
+ #
186
+ # def test_team_pattern_can_be_customized
187
+ # body = '<p>@_abc/XYZ: test</p>'
188
+ # doc = Nokogiri::HTML::DocumentFragment.parse(body)
189
+ #
190
+ # res = filter(doc, '/', /@(_[a-z]{3})\/([A-Z]{3})/)
191
+ #
192
+ # link = '<a href="/_abc/XYZ" class="team-mention">@_abc/XYZ</a>'
193
+ # assert_equal "<p>#{link}: test</p>",
194
+ # res.to_html
195
+ # end
196
+ #
197
+ # def test_mention_link_filter
198
+ # filter = HTML::Pipeline::TeamMentionFilter.new nil
199
+ # expected = "<a href='/bot/hubot' class='team-mention'>@bot/hubot</a>"
200
+ # assert_equal expected, filter.mention_link_filter('@bot/hubot')
201
+ # end
202
+ # end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # describe 'MotionHTMLPipeline::Pipeline::TableOfContentsFilterTest' do
2
4
  # TocFilter = MotionHTMLPipeline::Pipeline::TableOfContentsFilter
3
5
  #
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  describe 'MotionHTMLPipeline::Pipeline::HttpsFilter' do
2
4
  HttpsFilter = MotionHTMLPipeline::Pipeline::HttpsFilter
3
5
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  describe 'MotionHTMLPipeline::Pipeline::ImageFilterTest' do
2
4
  ImageFilter = MotionHTMLPipeline::Pipeline::ImageFilter
3
5
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  describe 'MotionHTMLPipeline::Pipeline::ImageMaxWidthFilterTest' do
2
4
  def filter(html)
3
5
  MotionHTMLPipeline::Pipeline::ImageMaxWidthFilter.call(html)
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  describe 'MotionHTMLPipeline::PipelineTest' do
2
4
  Pipeline = MotionHTMLPipeline::Pipeline
3
5
 
@@ -77,4 +79,4 @@ describe 'MotionHTMLPipeline::PipelineTest' do
77
79
  def filter(input)
78
80
  @pipeline.call(input)
79
81
  end
80
- end
82
+ end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Add following abilities
2
4
  #
3
5
  # rake spec filter="name of spec" # To filter by spec name
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: motion-html-pipeline
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.2'
4
+ version: '0.3'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Tomayko
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2019-07-16 00:00:00.000000000 Z
14
+ date: 2020-04-11 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: motion-cocoapods
@@ -72,6 +72,7 @@ files:
72
72
  - lib/motion-html-pipeline/pipeline/absolute_source_filter.rb
73
73
  - lib/motion-html-pipeline/pipeline/body_content.rb
74
74
  - lib/motion-html-pipeline/pipeline/disabled/@mention_filter.rb
75
+ - lib/motion-html-pipeline/pipeline/disabled/@team_mention_filter.rb
75
76
  - lib/motion-html-pipeline/pipeline/disabled/autolink_filter.rb
76
77
  - lib/motion-html-pipeline/pipeline/disabled/camo_filter.rb
77
78
  - lib/motion-html-pipeline/pipeline/disabled/email_reply_filter.rb
@@ -94,9 +95,11 @@ files:
94
95
  - spec/motion-html-pipeline/pipeline/disabled/email_reply_filter_spec.rb
95
96
  - spec/motion-html-pipeline/pipeline/disabled/emoji_filter_spec.rb
96
97
  - spec/motion-html-pipeline/pipeline/disabled/markdown_filter_spec.rb
98
+ - spec/motion-html-pipeline/pipeline/disabled/mention_filter_test.rb
97
99
  - spec/motion-html-pipeline/pipeline/disabled/plain_text_input_filter_spec.rb
98
100
  - spec/motion-html-pipeline/pipeline/disabled/sanitization_filter_spec.rb
99
101
  - spec/motion-html-pipeline/pipeline/disabled/syntax_highlighting_filter_spec.rb
102
+ - spec/motion-html-pipeline/pipeline/disabled/team_mention_filter_test.rb
100
103
  - spec/motion-html-pipeline/pipeline/disabled/toc_filter_spec.rb
101
104
  - spec/motion-html-pipeline/pipeline/https_filter_spec.rb
102
105
  - spec/motion-html-pipeline/pipeline/image_filter_spec.rb
@@ -122,8 +125,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
122
125
  - !ruby/object:Gem::Version
123
126
  version: '0'
124
127
  requirements: []
125
- rubyforge_project:
126
- rubygems_version: 2.7.6
128
+ rubygems_version: 3.0.6
127
129
  signing_key:
128
130
  specification_version: 4
129
131
  summary: Helpers for processing content through a chain of filters (RubyMotion version,
@@ -137,11 +139,13 @@ test_files:
137
139
  - spec/motion-html-pipeline/pipeline/disabled/camo_filter_spec.rb
138
140
  - spec/motion-html-pipeline/pipeline/disabled/emoji_filter_spec.rb
139
141
  - spec/motion-html-pipeline/pipeline/disabled/email_reply_filter_spec.rb
142
+ - spec/motion-html-pipeline/pipeline/disabled/mention_filter_test.rb
140
143
  - spec/motion-html-pipeline/pipeline/disabled/toc_filter_spec.rb
141
144
  - spec/motion-html-pipeline/pipeline/disabled/sanitization_filter_spec.rb
142
145
  - spec/motion-html-pipeline/pipeline/disabled/syntax_highlighting_filter_spec.rb
143
146
  - spec/motion-html-pipeline/pipeline/disabled/markdown_filter_spec.rb
144
147
  - spec/motion-html-pipeline/pipeline/disabled/auto_link_filter_spec.rb
145
148
  - spec/motion-html-pipeline/pipeline/disabled/plain_text_input_filter_spec.rb
149
+ - spec/motion-html-pipeline/pipeline/disabled/team_mention_filter_test.rb
146
150
  - spec/motion-html-pipeline/_helpers/mock_instumentation_service.rb
147
151
  - spec/motion-html-pipeline/pipeline_spec.rb