html-pipeline-rouge_filter 1.0.5 → 1.0.6
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 +4 -4
- data/.hound.yml +2 -0
- data/.rubocop.yml +161 -0
- data/.travis.yml +2 -4
- data/CHANGELOG.md +4 -0
- data/Gemfile +1 -0
- data/html-pipeline-rouge_filter.gemspec +1 -1
- data/lib/html/pipeline/rouge_filter/version.rb +1 -1
- data/test/rouge_filter_test.rb +11 -5
- metadata +15 -7
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: eb9957bb82c049a7415269f075d5dcc3ab02fc29
|
|
4
|
+
data.tar.gz: 379110b9425d2fc856245cd6adb7414efdfb6286
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 77a8acb14a1baef18a39a23b75fd8d379b3da1d2587ff9cc218d915e597b95e948b8000881af19920804bed7480270e64cba7b507c0ce0a535d911969302020c
|
|
7
|
+
data.tar.gz: d4fd44a0477242aceb414135e3a24cac1de036e825b06d26a977f7ce69eeac98690d3fb97092856aa3f708ae839a69d9d09665c8fc94e82cdd6c3a19138b7555
|
data/.hound.yml
ADDED
data/.rubocop.yml
ADDED
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
# This configuration was generated by
|
|
2
|
+
# `rubocop --auto-gen-config`
|
|
3
|
+
# on 2017-09-12 16:39:23 +0200 using RuboCop version 0.49.1.
|
|
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
|
+
# Cop supports --auto-correct.
|
|
11
|
+
# Configuration parameters: Include, TreatCommentsAsGroupSeparators.
|
|
12
|
+
# Include: **/Gemfile, **/gems.rb
|
|
13
|
+
Bundler/OrderedGems:
|
|
14
|
+
Exclude:
|
|
15
|
+
- 'Gemfile'
|
|
16
|
+
|
|
17
|
+
# Offense count: 1
|
|
18
|
+
# Cop supports --auto-correct.
|
|
19
|
+
# Configuration parameters: EnforcedHashRocketStyle, SupportedHashRocketStyles, EnforcedColonStyle, SupportedColonStyles, EnforcedLastArgumentHashStyle, SupportedLastArgumentHashStyles.
|
|
20
|
+
# SupportedHashRocketStyles: key, separator, table
|
|
21
|
+
# SupportedColonStyles: key, separator, table
|
|
22
|
+
# SupportedLastArgumentHashStyles: always_inspect, always_ignore, ignore_implicit, ignore_explicit
|
|
23
|
+
Layout/AlignHash:
|
|
24
|
+
Exclude:
|
|
25
|
+
- 'lib/html/pipeline/rouge_filter.rb'
|
|
26
|
+
|
|
27
|
+
# Offense count: 1
|
|
28
|
+
# Cop supports --auto-correct.
|
|
29
|
+
Layout/EmptyLineAfterMagicComment:
|
|
30
|
+
Exclude:
|
|
31
|
+
- 'html-pipeline-rouge_filter.gemspec'
|
|
32
|
+
|
|
33
|
+
# Offense count: 1
|
|
34
|
+
# Cop supports --auto-correct.
|
|
35
|
+
# Configuration parameters: AllowForAlignment, ForceEqualSignAlignment.
|
|
36
|
+
Layout/ExtraSpacing:
|
|
37
|
+
Exclude:
|
|
38
|
+
- 'lib/html/pipeline/rouge_filter.rb'
|
|
39
|
+
|
|
40
|
+
# Offense count: 2
|
|
41
|
+
# Cop supports --auto-correct.
|
|
42
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
|
43
|
+
# SupportedStyles: auto_detection, squiggly, active_support, powerpack, unindent
|
|
44
|
+
Layout/IndentHeredoc:
|
|
45
|
+
Exclude:
|
|
46
|
+
- 'test/rouge_filter_test.rb'
|
|
47
|
+
|
|
48
|
+
# Offense count: 1
|
|
49
|
+
# Cop supports --auto-correct.
|
|
50
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
|
51
|
+
# SupportedStyles: normal, rails
|
|
52
|
+
Layout/IndentationConsistency:
|
|
53
|
+
Exclude:
|
|
54
|
+
- 'lib/html/pipeline/rouge_filter.rb'
|
|
55
|
+
|
|
56
|
+
# Offense count: 1
|
|
57
|
+
# Cop supports --auto-correct.
|
|
58
|
+
# Configuration parameters: AllowForAlignment.
|
|
59
|
+
Layout/SpaceAroundOperators:
|
|
60
|
+
Exclude:
|
|
61
|
+
- 'lib/html/pipeline/rouge_filter.rb'
|
|
62
|
+
|
|
63
|
+
# Offense count: 2
|
|
64
|
+
# Configuration parameters: AllowSafeAssignment.
|
|
65
|
+
Lint/AssignmentInCondition:
|
|
66
|
+
Exclude:
|
|
67
|
+
- 'lib/html/pipeline/rouge_filter.rb'
|
|
68
|
+
|
|
69
|
+
# Offense count: 1
|
|
70
|
+
Metrics/AbcSize:
|
|
71
|
+
Max: 25
|
|
72
|
+
|
|
73
|
+
# Offense count: 1
|
|
74
|
+
Metrics/CyclomaticComplexity:
|
|
75
|
+
Max: 7
|
|
76
|
+
|
|
77
|
+
# Offense count: 1
|
|
78
|
+
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
|
|
79
|
+
# URISchemes: http, https
|
|
80
|
+
Metrics/LineLength:
|
|
81
|
+
Max: 83
|
|
82
|
+
|
|
83
|
+
# Offense count: 1
|
|
84
|
+
# Configuration parameters: CountComments.
|
|
85
|
+
Metrics/MethodLength:
|
|
86
|
+
Max: 15
|
|
87
|
+
|
|
88
|
+
# Offense count: 1
|
|
89
|
+
Style/ClassAndModuleCamelCase:
|
|
90
|
+
Exclude:
|
|
91
|
+
- 'lib/html/pipeline/rouge_filter/version.rb'
|
|
92
|
+
|
|
93
|
+
# Offense count: 1
|
|
94
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
|
95
|
+
# SupportedStyles: nested, compact
|
|
96
|
+
Style/ClassAndModuleChildren:
|
|
97
|
+
Exclude:
|
|
98
|
+
- 'test/rouge_filter_test.rb'
|
|
99
|
+
|
|
100
|
+
# Offense count: 1
|
|
101
|
+
Style/Documentation:
|
|
102
|
+
Exclude:
|
|
103
|
+
- 'spec/**/*'
|
|
104
|
+
- 'test/**/*'
|
|
105
|
+
- 'lib/html/pipeline/rouge_filter.rb'
|
|
106
|
+
|
|
107
|
+
# Offense count: 1
|
|
108
|
+
# Cop supports --auto-correct.
|
|
109
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
|
110
|
+
# SupportedStyles: compact, expanded
|
|
111
|
+
Style/EmptyMethod:
|
|
112
|
+
Exclude:
|
|
113
|
+
- 'test/rouge_filter_test.rb'
|
|
114
|
+
|
|
115
|
+
# Offense count: 2
|
|
116
|
+
# Cop supports --auto-correct.
|
|
117
|
+
# Configuration parameters: MaxLineLength.
|
|
118
|
+
Style/IfUnlessModifier:
|
|
119
|
+
Exclude:
|
|
120
|
+
- 'Gemfile'
|
|
121
|
+
|
|
122
|
+
# Offense count: 1
|
|
123
|
+
# Cop supports --auto-correct.
|
|
124
|
+
Style/MutableConstant:
|
|
125
|
+
Exclude:
|
|
126
|
+
- 'lib/html/pipeline/rouge_filter/version.rb'
|
|
127
|
+
|
|
128
|
+
# Offense count: 1
|
|
129
|
+
# Cop supports --auto-correct.
|
|
130
|
+
# Configuration parameters: EnforcedStyle, MinBodyLength, SupportedStyles.
|
|
131
|
+
# SupportedStyles: skip_modifier_ifs, always
|
|
132
|
+
Style/Next:
|
|
133
|
+
Exclude:
|
|
134
|
+
- 'lib/html/pipeline/rouge_filter.rb'
|
|
135
|
+
|
|
136
|
+
# Offense count: 1
|
|
137
|
+
# Cop supports --auto-correct.
|
|
138
|
+
# Configuration parameters: PreferredDelimiters.
|
|
139
|
+
Style/PercentLiteralDelimiters:
|
|
140
|
+
Exclude:
|
|
141
|
+
- 'html-pipeline-rouge_filter.gemspec'
|
|
142
|
+
|
|
143
|
+
# Offense count: 60
|
|
144
|
+
# Cop supports --auto-correct.
|
|
145
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles, ConsistentQuotesInMultiline.
|
|
146
|
+
# SupportedStyles: single_quotes, double_quotes
|
|
147
|
+
Style/StringLiterals:
|
|
148
|
+
Exclude:
|
|
149
|
+
- 'Gemfile'
|
|
150
|
+
- 'Rakefile'
|
|
151
|
+
- 'html-pipeline-rouge_filter.gemspec'
|
|
152
|
+
- 'lib/html/pipeline/rouge_filter.rb'
|
|
153
|
+
- 'lib/html/pipeline/rouge_filter/version.rb'
|
|
154
|
+
- 'test/rouge_filter_test.rb'
|
|
155
|
+
- 'test/test_helper.rb'
|
|
156
|
+
|
|
157
|
+
# Offense count: 1
|
|
158
|
+
# Cop supports --auto-correct.
|
|
159
|
+
Style/UnneededPercentQ:
|
|
160
|
+
Exclude:
|
|
161
|
+
- 'html-pipeline-rouge_filter.gemspec'
|
data/.travis.yml
CHANGED
|
@@ -4,9 +4,8 @@ language: ruby
|
|
|
4
4
|
sudo: false
|
|
5
5
|
rvm:
|
|
6
6
|
- 2.0.0
|
|
7
|
-
- 2.1
|
|
8
|
-
- 2.2.
|
|
9
|
-
- 2.2.0
|
|
7
|
+
- 2.1.9
|
|
8
|
+
- 2.2.7
|
|
10
9
|
- 2.3.4
|
|
11
10
|
- 2.4.1
|
|
12
11
|
- jruby-head
|
|
@@ -18,7 +17,6 @@ env:
|
|
|
18
17
|
- JRUBY_OPTS="-J-Xmx1024M --debug"
|
|
19
18
|
matrix:
|
|
20
19
|
allow_failures:
|
|
21
|
-
- rvm: 2.2.0
|
|
22
20
|
- rvm: jruby-head
|
|
23
21
|
- rvm: jruby-9.0.0.0.pre1
|
|
24
22
|
- rvm: rbx-2
|
data/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
+
## 1.0.6
|
|
6
|
+
|
|
7
|
+
- Soften rouge dependency to 2 <= x < 3 [#12](https://github.com/JuanitoFatas/html-pipeline-rouge_filter/pull/12) by @juanitofatas
|
|
8
|
+
|
|
5
9
|
## 1.0.5
|
|
6
10
|
|
|
7
11
|
- Update rouge to v2.0.7 [#10](https://github.com/JuanitoFatas/html-pipeline-rouge_filter/pull/10) by @hibariya
|
data/Gemfile
CHANGED
|
@@ -18,7 +18,7 @@ Gem::Specification.new do |spec|
|
|
|
18
18
|
spec.require_paths = ["lib"]
|
|
19
19
|
|
|
20
20
|
spec.add_dependency "html-pipeline", ">= 1.11"
|
|
21
|
-
spec.add_dependency "rouge", "
|
|
21
|
+
spec.add_dependency "rouge", ">= 2.0.0", "< 3"
|
|
22
22
|
spec.add_dependency "activesupport"
|
|
23
23
|
|
|
24
24
|
spec.required_ruby_version = "~> 2.0"
|
data/test/rouge_filter_test.rb
CHANGED
|
@@ -37,7 +37,11 @@ class HTML::Pipeline::RougeFilterTest < Minitest::Test
|
|
|
37
37
|
filter = RougeFilter.new \
|
|
38
38
|
"<pre lang='ruby'>hello</pre>"
|
|
39
39
|
|
|
40
|
-
|
|
40
|
+
result = filter.highlight_with(Rouge::Lexers::Ruby, "hello").chomp
|
|
41
|
+
|
|
42
|
+
assert_equal <<-EXPECTED.rstrip, result
|
|
43
|
+
<div class="highlight"><pre class="highlight"><code><span class="n">hello</span></code></pre></div>
|
|
44
|
+
EXPECTED
|
|
41
45
|
end
|
|
42
46
|
|
|
43
47
|
def test_default_css_class
|
|
@@ -93,9 +97,11 @@ class HTML::Pipeline::RougeFilterTest < Minitest::Test
|
|
|
93
97
|
filter = RougeFilter.new \
|
|
94
98
|
"<pre lang='ruby'>hello<br>world</pre>", replace_br: true
|
|
95
99
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
+
result = filter.call.to_html
|
|
101
|
+
|
|
102
|
+
assert_equal <<-EXPECTED.rstrip, result
|
|
103
|
+
<div class="highlight highlight-ruby"><pre class="highlight"><code><span class="n">hello</span>
|
|
104
|
+
<span class="n">world</span></code></pre></div>
|
|
105
|
+
EXPECTED
|
|
100
106
|
end
|
|
101
107
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: html-pipeline-rouge_filter
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.0.
|
|
4
|
+
version: 1.0.6
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Juanito Fatas
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2017-
|
|
11
|
+
date: 2017-09-16 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: html-pipeline
|
|
@@ -28,16 +28,22 @@ dependencies:
|
|
|
28
28
|
name: rouge
|
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
|
30
30
|
requirements:
|
|
31
|
-
- - "
|
|
31
|
+
- - ">="
|
|
32
|
+
- !ruby/object:Gem::Version
|
|
33
|
+
version: 2.0.0
|
|
34
|
+
- - "<"
|
|
32
35
|
- !ruby/object:Gem::Version
|
|
33
|
-
version:
|
|
36
|
+
version: '3'
|
|
34
37
|
type: :runtime
|
|
35
38
|
prerelease: false
|
|
36
39
|
version_requirements: !ruby/object:Gem::Requirement
|
|
37
40
|
requirements:
|
|
38
|
-
- - "
|
|
41
|
+
- - ">="
|
|
42
|
+
- !ruby/object:Gem::Version
|
|
43
|
+
version: 2.0.0
|
|
44
|
+
- - "<"
|
|
39
45
|
- !ruby/object:Gem::Version
|
|
40
|
-
version:
|
|
46
|
+
version: '3'
|
|
41
47
|
- !ruby/object:Gem::Dependency
|
|
42
48
|
name: activesupport
|
|
43
49
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -60,6 +66,8 @@ extensions: []
|
|
|
60
66
|
extra_rdoc_files: []
|
|
61
67
|
files:
|
|
62
68
|
- ".gitignore"
|
|
69
|
+
- ".hound.yml"
|
|
70
|
+
- ".rubocop.yml"
|
|
63
71
|
- ".travis.yml"
|
|
64
72
|
- CHANGELOG.md
|
|
65
73
|
- Gemfile
|
|
@@ -91,7 +99,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
91
99
|
version: '0'
|
|
92
100
|
requirements: []
|
|
93
101
|
rubyforge_project:
|
|
94
|
-
rubygems_version: 2.
|
|
102
|
+
rubygems_version: 2.6.12
|
|
95
103
|
signing_key:
|
|
96
104
|
specification_version: 4
|
|
97
105
|
summary: Rouge integration with html-pipeline.
|