html-pipeline-rouge_filter 1.0.5 → 1.0.6

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
2
  SHA1:
3
- metadata.gz: 5ec698413b76cb0330270b096cf6d64faef47fe1
4
- data.tar.gz: '029766af68a0f1b973c293efc55c940381bfa070'
3
+ metadata.gz: eb9957bb82c049a7415269f075d5dcc3ab02fc29
4
+ data.tar.gz: 379110b9425d2fc856245cd6adb7414efdfb6286
5
5
  SHA512:
6
- metadata.gz: bf60bf8184e4b79e87b3aa6bb0720b79c55e502a2bb08e96dc53a85dae39e2543c9904d5aa7db42c063a2e6b307cf831aded4ec8fc5e3debe11119fd5365c2d1
7
- data.tar.gz: a25f8369672d19b898fff61a30c84f044d1b194efb8533434395c842a5fd8cdc06e00916d1726994f2cd1735b95faafcc86f22a3a2ff502e6e81b92e39758ce3
6
+ metadata.gz: 77a8acb14a1baef18a39a23b75fd8d379b3da1d2587ff9cc218d915e597b95e948b8000881af19920804bed7480270e64cba7b507c0ce0a535d911969302020c
7
+ data.tar.gz: d4fd44a0477242aceb414135e3a24cac1de036e825b06d26a977f7ce69eeac98690d3fb97092856aa3f708ae839a69d9d09665c8fc94e82cdd6c3a19138b7555
data/.hound.yml ADDED
@@ -0,0 +1,2 @@
1
+ ruby:
2
+ config_file: .rubocop.yml
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.1
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
@@ -7,6 +7,7 @@ group :development do
7
7
  gem "rake"
8
8
  gem "bundler"
9
9
  gem "pry"
10
+ gem "rubocop", "0.49.1" # same as houndci/hound's Gemfile.lock
10
11
  end
11
12
 
12
13
  group :test do
@@ -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", "~> 2.0.7"
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"
@@ -2,6 +2,6 @@
2
2
  # and we don't want to define it here inadvertently
3
3
  module HTML_Pipeline
4
4
  class RougeFilter
5
- VERSION = "1.0.5"
5
+ VERSION = "1.0.6"
6
6
  end
7
7
  end
@@ -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
- assert_equal %(<pre class="highlight"><code><span class="n">hello</span></code></pre>), filter.highlight_with(Rouge::Lexers::Ruby, "hello").chomp
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
- doc = filter.call
97
- assert_equal "<pre class=\"highlight highlight-ruby\"><code>"\
98
- "<span class=\"n\">hello</span>\n"\
99
- "<span class=\"n\">world</span></code></pre>", doc.to_html
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.5
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-04-06 00:00:00.000000000 Z
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: 2.0.7
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: 2.0.7
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.5.2
102
+ rubygems_version: 2.6.12
95
103
  signing_key:
96
104
  specification_version: 4
97
105
  summary: Rouge integration with html-pipeline.