thredded-markdown_coderay 0.1.1 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 4c12c4897fb9fff83b2e5969c0fc3df3b6b4605b
4
- data.tar.gz: b43457c2bd42be95e8158dfe8e5fb9967651b780
2
+ SHA256:
3
+ metadata.gz: 9d4a56fe7aeb4122702bc111ea967e0dbd7bf7302a08055933aac7404bfb8d83
4
+ data.tar.gz: 6d408ab858a16da5531be05b63cf0cf1c7e14912e0a43eaa7fb1767e1babc662
5
5
  SHA512:
6
- metadata.gz: 8a382cf5cd6e2c789f5c77e7919d19509e901c47dec1a9696029df4932edef7157b76a4b2ab7499ba29c3618ab61b2f0070f27f12a08a626cf548f1f4068d8d8
7
- data.tar.gz: d0954e12d34773fb51b6b7f871d6303adf1353c60d382a47089b093ff9bef4112ec42676e889c0abade3162bc18c1a4cf56a8648022764e9ee1d20de85acbbc4
6
+ metadata.gz: 6a1ef019d3b4b93ad9c65794ca4f8bbcbb92b1e3de63436958e9ca466c88ab53411dac1158f6a35a2d1f8827a71956371b55b01d1210e2e2baeaf98dc3edc340
7
+ data.tar.gz: 29a638c16b601c524b63dcdbb600d0340de7f902d6d2c3b8ae5be043a59023fe7c738ce108723d71ccd0c4689b414ac303287e6360ce37fac85bed2c2c79e25d
@@ -28,6 +28,7 @@ module Thredded
28
28
  def add_import_if_file_exists(file, import)
29
29
  path = File.join('app', 'assets', 'stylesheets', file)
30
30
  return unless File.exist?(path)
31
+
31
32
  append_to_file path, <<~SCSS
32
33
  @import "#{import}";
33
34
  SCSS
@@ -2,6 +2,8 @@
2
2
 
3
3
  require 'thredded/markdown_coderay/version'
4
4
  require 'thredded/markdown_coderay/railtie' if defined?(Rails)
5
+ require 'kramdown'
6
+ require 'kramdown-syntax-coderay'
5
7
 
6
8
  module Thredded
7
9
  module MarkdownCoderay
@@ -11,7 +13,7 @@ module Thredded
11
13
  def setup!
12
14
  assert_pipeline_contains! 'Thredded::HtmlPipeline::KramdownFilter'
13
15
  Thredded::HtmlPipeline::KramdownFilter.options.update(options)
14
- %w(div span code table td ol).each do |tag|
16
+ %w[div span code table td ol].each do |tag|
15
17
  whitelist_attribute! tag, 'class'
16
18
  end
17
19
  end
@@ -20,6 +22,7 @@ module Thredded
20
22
 
21
23
  def assert_pipeline_contains!(name)
22
24
  return if pipeline_contains?(name)
25
+
23
26
  raise "#{self.class.name} requires #{name} in" \
24
27
  'Thredded::ContentFormatter.pipeline_filters'
25
28
  end
@@ -32,6 +35,7 @@ module Thredded
32
35
  whitelist_attr = Thredded::ContentFormatter.whitelist[:attributes]
33
36
  whitelist_attr[tag] ||= []
34
37
  return if whitelist_attr[tag].include?(attribute)
38
+
35
39
  whitelist_attr[tag] << attribute
36
40
  end
37
41
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Thredded
4
4
  module MarkdownCoderay
5
- VERSION = '0.1.1'
5
+ VERSION = '0.2.0'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: thredded-markdown_coderay
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gleb Mazovetskiy
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-03-26 00:00:00.000000000 Z
11
+ date: 2019-01-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: coderay
@@ -25,19 +25,19 @@ dependencies:
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
- name: rubocop
28
+ name: kramdown-syntax-coderay
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "~>"
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: '0.45'
34
- type: :development
33
+ version: '0'
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: '0.45'
40
+ version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rspec
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -52,6 +52,20 @@ dependencies:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: '3.5'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rubocop
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '0.63'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '0.63'
55
69
  - !ruby/object:Gem::Dependency
56
70
  name: simplecov
57
71
  requirement: !ruby/object:Gem::Requirement
@@ -117,7 +131,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
117
131
  version: '0'
118
132
  requirements: []
119
133
  rubyforge_project:
120
- rubygems_version: 2.6.11
134
+ rubygems_version: 2.7.8
121
135
  signing_key:
122
136
  specification_version: 4
123
137
  summary: Thredded Markdown code blocks highlighting via Coderay.