slack_markdown 0.1.1 → 0.4.0
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.
- checksums.yaml +5 -5
- data/.github/workflows/spec.yml +17 -0
- data/.gitignore +0 -0
- data/.rubocop.yml +16 -0
- data/.rubocop_todo.yml +41 -0
- data/Gemfile +2 -0
- data/LICENSE.txt +0 -0
- data/README.md +2 -0
- data/Rakefile +6 -1
- data/lib/slack_markdown/filters/bold_filter.rb +6 -4
- data/lib/slack_markdown/filters/code_filter.rb +6 -4
- data/lib/slack_markdown/filters/convert_filter.rb +11 -10
- data/lib/slack_markdown/filters/emoji_filter.rb +8 -3
- data/lib/slack_markdown/filters/ignorable_ancestor_tags.rb +2 -2
- data/lib/slack_markdown/filters/italic_filter.rb +6 -4
- data/lib/slack_markdown/filters/line_break_filter.rb +4 -2
- data/lib/slack_markdown/filters/multiple_code_filter.rb +6 -4
- data/lib/slack_markdown/filters/multiple_quote_filter.rb +7 -5
- data/lib/slack_markdown/filters/quote_filter.rb +14 -3
- data/lib/slack_markdown/filters/strike_filter.rb +34 -0
- data/lib/slack_markdown/processor.rb +5 -3
- data/lib/slack_markdown/version.rb +3 -1
- data/lib/slack_markdown.rb +1 -1
- data/slack_markdown.gemspec +12 -10
- metadata +50 -33
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 1931dd5c91dc9b27769a94bd81486fa30701b1e69ac3a5b927e3718e780ab4dc
|
4
|
+
data.tar.gz: 92759f5c90effb4668698593a9c32e28f1a2d8620ef20068441e89f89b03f85e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 543e199083ecfd05a3408eac0d99fd59fb39c4befb06d9d4acc70aba43eef06185b946c176a04355e6779fbce735708f71967867972d048a8a046182d18e03bd
|
7
|
+
data.tar.gz: 6ce0750daa0bc6e14e6ea94abdecdc88057dd16ac8037dd79cf4d76b258099ae9c8613991038c1e5a7adcfaf78ce391226a1be9b52922e0e3e9818035552f145
|
@@ -0,0 +1,17 @@
|
|
1
|
+
name: spec
|
2
|
+
on: [push, pull_request]
|
3
|
+
jobs:
|
4
|
+
spec:
|
5
|
+
strategy:
|
6
|
+
fail-fast: false
|
7
|
+
matrix:
|
8
|
+
ruby: [2.6, 2.7, 3.0, head]
|
9
|
+
runs-on: ubuntu-latest
|
10
|
+
steps:
|
11
|
+
- uses: actions/checkout@v2
|
12
|
+
- uses: ruby/setup-ruby@v1
|
13
|
+
with:
|
14
|
+
ruby-version: ${{ matrix.ruby }}
|
15
|
+
bundler-cache: true
|
16
|
+
- run: bundle exec rubocop
|
17
|
+
- run: bundle exec rake spec
|
data/.gitignore
CHANGED
File without changes
|
data/.rubocop.yml
ADDED
data/.rubocop_todo.yml
ADDED
@@ -0,0 +1,41 @@
|
|
1
|
+
# This configuration was generated by
|
2
|
+
# `rubocop --auto-gen-config`
|
3
|
+
# on 2021-10-30 04:14:18 UTC using RuboCop version 1.22.3.
|
4
|
+
# The point is for the user to remove these configuration records
|
5
|
+
# one by one as the offenses are removed from the code base.
|
6
|
+
# Note that changes in the inspected code, or installation of new
|
7
|
+
# versions of RuboCop, may require this file to be generated again.
|
8
|
+
|
9
|
+
# Offense count: 1
|
10
|
+
# Configuration parameters: Include.
|
11
|
+
# Include: **/*.gemspec
|
12
|
+
Gemspec/RequiredRubyVersion:
|
13
|
+
Exclude:
|
14
|
+
- 'slack_markdown.gemspec'
|
15
|
+
|
16
|
+
# Offense count: 1
|
17
|
+
# Configuration parameters: IgnoredMethods, CountRepeatedAttributes.
|
18
|
+
Metrics/AbcSize:
|
19
|
+
Max: 42
|
20
|
+
|
21
|
+
# Offense count: 1
|
22
|
+
# Configuration parameters: IgnoredMethods.
|
23
|
+
Metrics/CyclomaticComplexity:
|
24
|
+
Max: 16
|
25
|
+
|
26
|
+
# Offense count: 2
|
27
|
+
# Configuration parameters: CountComments, CountAsOne, ExcludedMethods, IgnoredMethods.
|
28
|
+
Metrics/MethodLength:
|
29
|
+
Max: 40
|
30
|
+
|
31
|
+
# Offense count: 1
|
32
|
+
# Configuration parameters: IgnoredMethods.
|
33
|
+
Metrics/PerceivedComplexity:
|
34
|
+
Max: 19
|
35
|
+
|
36
|
+
# Offense count: 1
|
37
|
+
# Configuration parameters: ForbiddenDelimiters.
|
38
|
+
# ForbiddenDelimiters: (?-mix:(^|\s)(EO[A-Z]{1}|END)(\s|$))
|
39
|
+
Naming/HeredocDelimiterNaming:
|
40
|
+
Exclude:
|
41
|
+
- 'spec/slack_markdown/processor_spec.rb'
|
data/Gemfile
CHANGED
data/LICENSE.txt
CHANGED
File without changes
|
data/README.md
CHANGED
data/Rakefile
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
#
|
1
|
+
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require 'html/pipeline'
|
4
4
|
require 'slack_markdown/filters/ignorable_ancestor_tags'
|
@@ -9,12 +9,14 @@ module SlackMarkdown
|
|
9
9
|
include IgnorableAncestorTags
|
10
10
|
|
11
11
|
def call
|
12
|
-
doc.search(
|
12
|
+
doc.search('.//text()').each do |node|
|
13
13
|
content = node.to_html
|
14
14
|
next if has_ancestor?(node, ignored_ancestor_tags)
|
15
15
|
next unless content.include?('*')
|
16
|
+
|
16
17
|
html = bold_filter(content)
|
17
18
|
next if html == content
|
19
|
+
|
18
20
|
node.replace(html)
|
19
21
|
end
|
20
22
|
doc
|
@@ -22,11 +24,11 @@ module SlackMarkdown
|
|
22
24
|
|
23
25
|
def bold_filter(text)
|
24
26
|
text.gsub(BOLD_PATTERN) do
|
25
|
-
"<b>#{
|
27
|
+
"<b>#{Regexp.last_match(1)}</b>"
|
26
28
|
end
|
27
29
|
end
|
28
30
|
|
29
|
-
BOLD_PATTERN = /(?<=^|\W)\*(.+)\*(?=\W|$)
|
31
|
+
BOLD_PATTERN = /(?<=^|\W)\*(.+)\*(?=\W|$)/.freeze
|
30
32
|
end
|
31
33
|
end
|
32
34
|
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
#
|
1
|
+
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require 'html/pipeline'
|
4
4
|
require 'slack_markdown/filters/ignorable_ancestor_tags'
|
@@ -9,12 +9,14 @@ module SlackMarkdown
|
|
9
9
|
include IgnorableAncestorTags
|
10
10
|
|
11
11
|
def call
|
12
|
-
doc.search(
|
12
|
+
doc.search('.//text()').each do |node|
|
13
13
|
content = node.to_html
|
14
14
|
next if has_ancestor?(node, ignored_ancestor_tags)
|
15
15
|
next unless content.include?('`')
|
16
|
+
|
16
17
|
html = code_filter(content)
|
17
18
|
next if html == content
|
19
|
+
|
18
20
|
node.replace(html)
|
19
21
|
end
|
20
22
|
doc
|
@@ -24,11 +26,11 @@ module SlackMarkdown
|
|
24
26
|
|
25
27
|
def code_filter(text)
|
26
28
|
text.gsub(CODE_PATTERN) do
|
27
|
-
"<code>#{
|
29
|
+
"<code>#{Regexp.last_match(1)}</code>"
|
28
30
|
end
|
29
31
|
end
|
30
32
|
|
31
|
-
CODE_PATTERN = /(?<=^|\W)`(.+?)`(?=\W|$)
|
33
|
+
CODE_PATTERN = /(?<=^|\W)`(.+?)`(?=\W|$)/.freeze
|
32
34
|
end
|
33
35
|
end
|
34
36
|
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
#
|
1
|
+
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require 'html/pipeline'
|
4
4
|
require 'escape_utils'
|
@@ -8,9 +8,9 @@ module SlackMarkdown
|
|
8
8
|
# https://api.slack.com/docs/formatting
|
9
9
|
class ConvertFilter < ::HTML::Pipeline::TextFilter
|
10
10
|
def call
|
11
|
-
html = @text.gsub(/<([
|
12
|
-
link_data =
|
13
|
-
link_text =
|
11
|
+
html = @text.gsub(/<([^>|]+)(?:\|([^>]+))?>/) do |_match|
|
12
|
+
link_data = Regexp.last_match(1)
|
13
|
+
link_text = Regexp.last_match(2)
|
14
14
|
create_link(link_data, link_text)
|
15
15
|
end
|
16
16
|
Nokogiri::HTML.fragment(html)
|
@@ -22,21 +22,22 @@ module SlackMarkdown
|
|
22
22
|
klass, link, text =
|
23
23
|
case data
|
24
24
|
when /\A#(C.+)\z/ # channel
|
25
|
-
channel =
|
25
|
+
channel = context.include?(:on_slack_channel_id) ? context[:on_slack_channel_id].call(Regexp.last_match(1)) : nil
|
26
26
|
if channel
|
27
|
+
override_text = nil
|
27
28
|
['channel', channel[:url], "##{channel[:text]}"]
|
28
29
|
else
|
29
30
|
['channel', data, data]
|
30
31
|
end
|
31
32
|
when /\A@((?:U|B).+)/ # user or bot
|
32
|
-
user =
|
33
|
+
user = context.include?(:on_slack_user_id) ? context[:on_slack_user_id].call(Regexp.last_match(1)) : nil
|
33
34
|
if user
|
34
35
|
['mention', user[:url], "@#{user[:text]}"]
|
35
36
|
else
|
36
37
|
['mention', nil, data]
|
37
38
|
end
|
38
39
|
when /\A@(.+)/ # user name
|
39
|
-
user =
|
40
|
+
user = context.include?(:on_slack_user_name) ? context[:on_slack_user_name].call(Regexp.last_match(1)) : nil
|
40
41
|
if user
|
41
42
|
['mention', user[:url], "@#{user[:text]}"]
|
42
43
|
else
|
@@ -50,10 +51,10 @@ module SlackMarkdown
|
|
50
51
|
|
51
52
|
if link
|
52
53
|
escaped_link =
|
53
|
-
if
|
54
|
-
"#{EscapeUtils.escape_html
|
54
|
+
if context[:cushion_link] && link.match(%r{\A([A-Za-z0-9]+:)?//})
|
55
|
+
"#{EscapeUtils.escape_html context[:cushion_link]}#{EscapeUtils.escape_url link}"
|
55
56
|
else
|
56
|
-
|
57
|
+
EscapeUtils.escape_html(link).to_s
|
57
58
|
end
|
58
59
|
"<a href=\"#{escaped_link}\" class=\"#{EscapeUtils.escape_html(klass)}\">#{EscapeUtils.escape_html(override_text || text)}</a>"
|
59
60
|
else
|
@@ -1,11 +1,10 @@
|
|
1
|
-
#
|
1
|
+
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require 'html/pipeline'
|
4
4
|
|
5
5
|
module SlackMarkdown
|
6
6
|
module Filters
|
7
7
|
class EmojiFilter < ::HTML::Pipeline::EmojiFilter
|
8
|
-
|
9
8
|
def emoji_url(name)
|
10
9
|
emoji_names.include?(name) ? super : original_emoji_path(name)
|
11
10
|
end
|
@@ -27,7 +26,13 @@ module SlackMarkdown
|
|
27
26
|
end
|
28
27
|
|
29
28
|
def original_emoji_path(name)
|
30
|
-
original_emoji_set[name]
|
29
|
+
path = original_emoji_set[name]
|
30
|
+
|
31
|
+
if (matches = path.match(/\Aalias:(.+)\z/))
|
32
|
+
emoji_url(matches[1])
|
33
|
+
else
|
34
|
+
path
|
35
|
+
end
|
31
36
|
end
|
32
37
|
end
|
33
38
|
end
|
@@ -1,9 +1,9 @@
|
|
1
|
-
#
|
1
|
+
# frozen_string_literal: true
|
2
2
|
|
3
3
|
module SlackMarkdown
|
4
4
|
module Filters
|
5
5
|
module IgnorableAncestorTags
|
6
|
-
DEFAULT_IGNORED_ANCESTOR_TAGS = %w
|
6
|
+
DEFAULT_IGNORED_ANCESTOR_TAGS = %w[pre code tt].freeze
|
7
7
|
def ignored_ancestor_tags
|
8
8
|
if context[:ignored_ancestor_tags]
|
9
9
|
DEFAULT_IGNORED_ANCESTOR_TAGS | context[:ignored_ancestor_tags]
|
@@ -1,4 +1,4 @@
|
|
1
|
-
#
|
1
|
+
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require 'html/pipeline'
|
4
4
|
require 'slack_markdown/filters/ignorable_ancestor_tags'
|
@@ -9,12 +9,14 @@ module SlackMarkdown
|
|
9
9
|
include IgnorableAncestorTags
|
10
10
|
|
11
11
|
def call
|
12
|
-
doc.search(
|
12
|
+
doc.search('.//text()').each do |node|
|
13
13
|
content = node.to_html
|
14
14
|
next if has_ancestor?(node, ignored_ancestor_tags)
|
15
15
|
next unless content.include?('_')
|
16
|
+
|
16
17
|
html = italic_filter(content)
|
17
18
|
next if html == content
|
19
|
+
|
18
20
|
node.replace(html)
|
19
21
|
end
|
20
22
|
doc
|
@@ -22,11 +24,11 @@ module SlackMarkdown
|
|
22
24
|
|
23
25
|
def italic_filter(text)
|
24
26
|
text.gsub(ITALIC_PATTERN) do
|
25
|
-
"<i>#{
|
27
|
+
"<i>#{Regexp.last_match(1)}</i>"
|
26
28
|
end
|
27
29
|
end
|
28
30
|
|
29
|
-
ITALIC_PATTERN = /(?<=^|\W)_(.+)_(?=\W|$)
|
31
|
+
ITALIC_PATTERN = /(?<=^|\W)_(.+)_(?=\W|$)/.freeze
|
30
32
|
end
|
31
33
|
end
|
32
34
|
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
#
|
1
|
+
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require 'html/pipeline'
|
4
4
|
require 'slack_markdown/filters/ignorable_ancestor_tags'
|
@@ -9,12 +9,14 @@ module SlackMarkdown
|
|
9
9
|
include IgnorableAncestorTags
|
10
10
|
|
11
11
|
def call
|
12
|
-
doc.search(
|
12
|
+
doc.search('.//text()').each do |node|
|
13
13
|
content = node.to_html
|
14
14
|
next if has_ancestor?(node, ignored_ancestor_tags)
|
15
15
|
next unless content.include?("\n")
|
16
|
+
|
16
17
|
html = content.gsub("\n", '<br>')
|
17
18
|
next if html == content
|
19
|
+
|
18
20
|
node.replace(html)
|
19
21
|
end
|
20
22
|
doc
|
@@ -1,4 +1,4 @@
|
|
1
|
-
#
|
1
|
+
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require 'html/pipeline'
|
4
4
|
require 'slack_markdown/filters/ignorable_ancestor_tags'
|
@@ -9,12 +9,14 @@ module SlackMarkdown
|
|
9
9
|
include IgnorableAncestorTags
|
10
10
|
|
11
11
|
def call
|
12
|
-
doc.search(
|
12
|
+
doc.search('.//text()').each do |node|
|
13
13
|
content = node.to_html
|
14
14
|
next if has_ancestor?(node, ignored_ancestor_tags)
|
15
15
|
next unless content.include?('`')
|
16
|
+
|
16
17
|
html = multiple_code_filter(content)
|
17
18
|
next if html == content
|
19
|
+
|
18
20
|
node.replace(html)
|
19
21
|
end
|
20
22
|
doc
|
@@ -24,11 +26,11 @@ module SlackMarkdown
|
|
24
26
|
|
25
27
|
def multiple_code_filter(text)
|
26
28
|
text.gsub(CODE_PATTERN) do
|
27
|
-
"<pre><code>#{
|
29
|
+
"<pre><code>#{Regexp.last_match(1)}</code></pre>"
|
28
30
|
end
|
29
31
|
end
|
30
32
|
|
31
|
-
CODE_PATTERN = /(?<=^|\W)```\n?((?:.|\n)+?)```(?=\W|$)
|
33
|
+
CODE_PATTERN = /(?<=^|\W)```\n?((?:.|\n)+?)```(?=\W|$)/.freeze
|
32
34
|
end
|
33
35
|
end
|
34
36
|
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
#
|
1
|
+
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require 'html/pipeline'
|
4
4
|
require 'slack_markdown/filters/ignorable_ancestor_tags'
|
@@ -9,12 +9,14 @@ module SlackMarkdown
|
|
9
9
|
include IgnorableAncestorTags
|
10
10
|
|
11
11
|
def call
|
12
|
-
doc.search(
|
12
|
+
doc.search('.//text()').each do |node|
|
13
13
|
content = node.to_html
|
14
14
|
next if has_ancestor?(node, ignored_ancestor_tags)
|
15
15
|
next unless content.include?('>>>')
|
16
|
-
|
16
|
+
|
17
|
+
html = multiple_quote_filter(content)
|
17
18
|
next if html == content
|
19
|
+
|
18
20
|
node.replace(html)
|
19
21
|
end
|
20
22
|
doc
|
@@ -22,8 +24,8 @@ module SlackMarkdown
|
|
22
24
|
|
23
25
|
private
|
24
26
|
|
25
|
-
def
|
26
|
-
lines = text.split(/^>>>
|
27
|
+
def multiple_quote_filter(text)
|
28
|
+
lines = text.split(/^>>>(?:\s|\n)*/, 2)
|
27
29
|
if lines.size < 2
|
28
30
|
text
|
29
31
|
else
|
@@ -1,4 +1,4 @@
|
|
1
|
-
#
|
1
|
+
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require 'html/pipeline'
|
4
4
|
require 'slack_markdown/filters/ignorable_ancestor_tags'
|
@@ -9,12 +9,23 @@ module SlackMarkdown
|
|
9
9
|
include IgnorableAncestorTags
|
10
10
|
|
11
11
|
def call
|
12
|
-
html = doc.to_s
|
13
|
-
|
12
|
+
html = replace_quote_line(doc.to_s)
|
13
|
+
collect_blockquote(html)
|
14
|
+
end
|
15
|
+
|
16
|
+
private
|
17
|
+
|
18
|
+
def replace_quote_line(str)
|
19
|
+
str.gsub(/^>\s*(.+)(?:\n|$)/) do
|
20
|
+
"<blockquote>#{Regexp.last_match(1)}\n</blockquote>"
|
14
21
|
end
|
22
|
+
end
|
23
|
+
|
24
|
+
def collect_blockquote(html)
|
15
25
|
doc = Nokogiri::HTML.fragment(html)
|
16
26
|
doc.search('blockquote + blockquote').each do |node|
|
17
27
|
next unless node.previous.name == 'blockquote'
|
28
|
+
|
18
29
|
html = "<blockquote>#{node.previous.inner_html}#{node.inner_html}</blockquote>"
|
19
30
|
node.previous.remove
|
20
31
|
node.replace(html)
|
@@ -0,0 +1,34 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'html/pipeline'
|
4
|
+
require 'slack_markdown/filters/ignorable_ancestor_tags'
|
5
|
+
|
6
|
+
module SlackMarkdown
|
7
|
+
module Filters
|
8
|
+
class StrikeFilter < ::HTML::Pipeline::Filter
|
9
|
+
include IgnorableAncestorTags
|
10
|
+
|
11
|
+
def call
|
12
|
+
doc.search('.//text()').each do |node|
|
13
|
+
content = node.to_html
|
14
|
+
next if has_ancestor?(node, ignored_ancestor_tags)
|
15
|
+
next unless content.include?('~')
|
16
|
+
|
17
|
+
html = strike_filter(content)
|
18
|
+
next if html == content
|
19
|
+
|
20
|
+
node.replace(html)
|
21
|
+
end
|
22
|
+
doc
|
23
|
+
end
|
24
|
+
|
25
|
+
def strike_filter(text)
|
26
|
+
text.gsub(STRIKE_PATTERN) do
|
27
|
+
"<strike>#{Regexp.last_match(1)}</strike>"
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
STRIKE_PATTERN = /(?<=^|\W)~(.+)~(?=\W|$)/.freeze
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
#
|
1
|
+
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require 'html/pipeline'
|
4
4
|
require 'slack_markdown/filters/convert_filter'
|
@@ -9,6 +9,7 @@ require 'slack_markdown/filters/code_filter'
|
|
9
9
|
require 'slack_markdown/filters/emoji_filter'
|
10
10
|
require 'slack_markdown/filters/bold_filter'
|
11
11
|
require 'slack_markdown/filters/italic_filter'
|
12
|
+
require 'slack_markdown/filters/strike_filter'
|
12
13
|
require 'slack_markdown/filters/line_break_filter'
|
13
14
|
|
14
15
|
module SlackMarkdown
|
@@ -28,12 +29,13 @@ module SlackMarkdown
|
|
28
29
|
SlackMarkdown::Filters::EmojiFilter,
|
29
30
|
SlackMarkdown::Filters::BoldFilter,
|
30
31
|
SlackMarkdown::Filters::ItalicFilter,
|
31
|
-
SlackMarkdown::Filters::
|
32
|
+
SlackMarkdown::Filters::StrikeFilter,
|
33
|
+
SlackMarkdown::Filters::LineBreakFilter
|
32
34
|
]
|
33
35
|
end
|
34
36
|
|
35
37
|
def call(src_text, context = {}, result = nil)
|
36
|
-
HTML::Pipeline.new(
|
38
|
+
HTML::Pipeline.new(filters, self.context).call(src_text, context, result)
|
37
39
|
end
|
38
40
|
end
|
39
41
|
end
|
data/lib/slack_markdown.rb
CHANGED
data/slack_markdown.gemspec
CHANGED
@@ -1,5 +1,6 @@
|
|
1
|
-
#
|
2
|
-
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
lib = File.expand_path('lib', __dir__)
|
3
4
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
5
|
require 'slack_markdown/version'
|
5
6
|
|
@@ -9,8 +10,8 @@ Gem::Specification.new do |spec|
|
|
9
10
|
spec.authors = ['Ru/MuckRu']
|
10
11
|
spec.email = ['ru_shalm@hazimu.com']
|
11
12
|
|
12
|
-
spec.summary =
|
13
|
-
spec.description =
|
13
|
+
spec.summary = 'Convert Slack message markdown to HTML.'
|
14
|
+
spec.description = 'Convert Slack message markdown to HTML.'
|
14
15
|
spec.homepage = 'https://github.com/rutan/slack_markdown'
|
15
16
|
spec.license = 'MIT'
|
16
17
|
|
@@ -19,12 +20,13 @@ Gem::Specification.new do |spec|
|
|
19
20
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
20
21
|
spec.require_paths = ['lib']
|
21
22
|
|
22
|
-
spec.add_dependency '
|
23
|
-
spec.add_dependency '
|
24
|
-
spec.add_dependency '
|
23
|
+
spec.add_dependency 'escape_utils'
|
24
|
+
spec.add_dependency 'gemoji'
|
25
|
+
spec.add_dependency 'html-pipeline', '~> 2.0'
|
25
26
|
|
26
|
-
spec.add_development_dependency 'bundler'
|
27
|
-
spec.add_development_dependency 'rake', '~> 10.0'
|
28
|
-
spec.add_development_dependency 'rspec', '~> 3.2'
|
27
|
+
spec.add_development_dependency 'bundler'
|
29
28
|
spec.add_development_dependency 'pry'
|
29
|
+
spec.add_development_dependency 'rake'
|
30
|
+
spec.add_development_dependency 'rspec', '~> 3.2'
|
31
|
+
spec.add_development_dependency 'rubocop', '~> 1.22.3'
|
30
32
|
end
|
metadata
CHANGED
@@ -1,85 +1,99 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: slack_markdown
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ru/MuckRu
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-10-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: escape_utils
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: '0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
26
|
+
version: '0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
28
|
+
name: gemoji
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
33
|
+
version: '0'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - "
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
40
|
+
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
42
|
+
name: html-pipeline
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 2.
|
47
|
+
version: '2.0'
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 2.
|
54
|
+
version: '2.0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: bundler
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- - "
|
59
|
+
- - ">="
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '
|
61
|
+
version: '0'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- - "
|
66
|
+
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: '
|
68
|
+
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: pry
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
69
83
|
- !ruby/object:Gem::Dependency
|
70
84
|
name: rake
|
71
85
|
requirement: !ruby/object:Gem::Requirement
|
72
86
|
requirements:
|
73
|
-
- - "
|
87
|
+
- - ">="
|
74
88
|
- !ruby/object:Gem::Version
|
75
|
-
version: '
|
89
|
+
version: '0'
|
76
90
|
type: :development
|
77
91
|
prerelease: false
|
78
92
|
version_requirements: !ruby/object:Gem::Requirement
|
79
93
|
requirements:
|
80
|
-
- - "
|
94
|
+
- - ">="
|
81
95
|
- !ruby/object:Gem::Version
|
82
|
-
version: '
|
96
|
+
version: '0'
|
83
97
|
- !ruby/object:Gem::Dependency
|
84
98
|
name: rspec
|
85
99
|
requirement: !ruby/object:Gem::Requirement
|
@@ -95,19 +109,19 @@ dependencies:
|
|
95
109
|
- !ruby/object:Gem::Version
|
96
110
|
version: '3.2'
|
97
111
|
- !ruby/object:Gem::Dependency
|
98
|
-
name:
|
112
|
+
name: rubocop
|
99
113
|
requirement: !ruby/object:Gem::Requirement
|
100
114
|
requirements:
|
101
|
-
- - "
|
115
|
+
- - "~>"
|
102
116
|
- !ruby/object:Gem::Version
|
103
|
-
version:
|
117
|
+
version: 1.22.3
|
104
118
|
type: :development
|
105
119
|
prerelease: false
|
106
120
|
version_requirements: !ruby/object:Gem::Requirement
|
107
121
|
requirements:
|
108
|
-
- - "
|
122
|
+
- - "~>"
|
109
123
|
- !ruby/object:Gem::Version
|
110
|
-
version:
|
124
|
+
version: 1.22.3
|
111
125
|
description: Convert Slack message markdown to HTML.
|
112
126
|
email:
|
113
127
|
- ru_shalm@hazimu.com
|
@@ -115,7 +129,10 @@ executables: []
|
|
115
129
|
extensions: []
|
116
130
|
extra_rdoc_files: []
|
117
131
|
files:
|
132
|
+
- ".github/workflows/spec.yml"
|
118
133
|
- ".gitignore"
|
134
|
+
- ".rubocop.yml"
|
135
|
+
- ".rubocop_todo.yml"
|
119
136
|
- Gemfile
|
120
137
|
- LICENSE.txt
|
121
138
|
- README.md
|
@@ -131,6 +148,7 @@ files:
|
|
131
148
|
- lib/slack_markdown/filters/multiple_code_filter.rb
|
132
149
|
- lib/slack_markdown/filters/multiple_quote_filter.rb
|
133
150
|
- lib/slack_markdown/filters/quote_filter.rb
|
151
|
+
- lib/slack_markdown/filters/strike_filter.rb
|
134
152
|
- lib/slack_markdown/processor.rb
|
135
153
|
- lib/slack_markdown/version.rb
|
136
154
|
- slack_markdown.gemspec
|
@@ -138,7 +156,7 @@ homepage: https://github.com/rutan/slack_markdown
|
|
138
156
|
licenses:
|
139
157
|
- MIT
|
140
158
|
metadata: {}
|
141
|
-
post_install_message:
|
159
|
+
post_install_message:
|
142
160
|
rdoc_options: []
|
143
161
|
require_paths:
|
144
162
|
- lib
|
@@ -153,9 +171,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
153
171
|
- !ruby/object:Gem::Version
|
154
172
|
version: '0'
|
155
173
|
requirements: []
|
156
|
-
|
157
|
-
|
158
|
-
signing_key:
|
174
|
+
rubygems_version: 3.2.3
|
175
|
+
signing_key:
|
159
176
|
specification_version: 4
|
160
177
|
summary: Convert Slack message markdown to HTML.
|
161
178
|
test_files: []
|