inline_svg 1.0.0 → 1.10.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/integration_test.yml +47 -0
- data/.github/workflows/rails_6_webpacker_integration_tests.yaml +62 -0
- data/.github/workflows/ruby.yml +20 -0
- data/.rubocop.yml +1 -0
- data/.rubocop_todo.yml +421 -0
- data/CHANGELOG.md +143 -3
- data/README.md +149 -30
- data/Rakefile +7 -0
- data/inline_svg.gemspec +2 -1
- data/lib/inline_svg/action_view/helpers.rb +68 -7
- data/lib/inline_svg/cached_asset_file.rb +71 -0
- data/lib/inline_svg/finds_asset_paths.rb +1 -1
- data/lib/inline_svg/id_generator.rb +12 -3
- data/lib/inline_svg/io_resource.rb +4 -3
- data/lib/inline_svg/propshaft_asset_finder.rb +16 -0
- data/lib/inline_svg/railtie.rb +8 -3
- data/lib/inline_svg/static_asset_finder.rb +5 -2
- data/lib/inline_svg/transform_pipeline/transformations/aria_attributes.rb +16 -19
- data/lib/inline_svg/transform_pipeline/transformations/aria_hidden.rb +9 -0
- data/lib/inline_svg/transform_pipeline/transformations/aria_hidden_attribute.rb +9 -0
- data/lib/inline_svg/transform_pipeline/transformations/class_attribute.rb +5 -6
- data/lib/inline_svg/transform_pipeline/transformations/data_attributes.rb +4 -5
- data/lib/inline_svg/transform_pipeline/transformations/description.rb +7 -6
- data/lib/inline_svg/transform_pipeline/transformations/height.rb +3 -4
- data/lib/inline_svg/transform_pipeline/transformations/id_attribute.rb +3 -4
- data/lib/inline_svg/transform_pipeline/transformations/no_comment.rb +4 -4
- data/lib/inline_svg/transform_pipeline/transformations/preserve_aspect_ratio.rb +3 -4
- data/lib/inline_svg/transform_pipeline/transformations/size.rb +4 -5
- data/lib/inline_svg/transform_pipeline/transformations/style_attribute.rb +11 -0
- data/lib/inline_svg/transform_pipeline/transformations/title.rb +7 -6
- data/lib/inline_svg/transform_pipeline/transformations/transformation.rb +13 -0
- data/lib/inline_svg/transform_pipeline/transformations/view_box.rb +9 -0
- data/lib/inline_svg/transform_pipeline/transformations/width.rb +3 -4
- data/lib/inline_svg/transform_pipeline/transformations.rb +11 -2
- data/lib/inline_svg/transform_pipeline.rb +1 -1
- data/lib/inline_svg/version.rb +1 -1
- data/lib/inline_svg/webpack_asset_finder.rb +60 -0
- data/lib/inline_svg.rb +46 -9
- data/spec/cached_asset_file_spec.rb +73 -0
- data/spec/files/static_assets/assets0/known-document-two.svg +1 -0
- data/spec/files/static_assets/assets0/known-document.svg +1 -0
- data/spec/files/static_assets/assets0/some-document.svg +1 -0
- data/spec/files/static_assets/assets1/known-document.svg +1 -0
- data/spec/files/static_assets/assets1/other-document.svg +3 -0
- data/spec/files/static_assets/assets1/some-file.txt +1 -0
- data/spec/finds_asset_paths_spec.rb +45 -0
- data/spec/helpers/inline_svg_spec.rb +117 -51
- data/spec/id_generator_spec.rb +5 -3
- data/spec/inline_svg_spec.rb +48 -0
- data/spec/propshaft_asset_finder_spec.rb +23 -0
- data/spec/static_asset_finder_spec.rb +25 -0
- data/spec/transformation_pipeline/transformations/aria_attributes_spec.rb +6 -6
- data/spec/transformation_pipeline/transformations/aria_hidden_attribute_spec.rb +12 -0
- data/spec/transformation_pipeline/transformations/height_spec.rb +9 -0
- data/spec/transformation_pipeline/transformations/style_attribute_spec.rb +26 -0
- data/spec/transformation_pipeline/transformations/title_spec.rb +9 -0
- data/spec/transformation_pipeline/transformations/transformation_spec.rb +39 -0
- data/spec/transformation_pipeline/transformations/view_box_spec.rb +13 -0
- data/spec/transformation_pipeline/transformations_spec.rb +7 -1
- data/spec/webpack_asset_finder_spec.rb +23 -0
- metadata +62 -10
- data/circle.yml +0 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 66214539304b60e87e9263afb26531212492ca77957e9ce8cf89d015cef86239
|
4
|
+
data.tar.gz: 6ab9cb3d75a9f268728600edb48bf27b3503145c80f1addabe8bc484c88af545
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1f8d4642dff97eb5bfc358fd1ce2257d5113a6f232c02f4ecd847007ee861b2537748539c689e5e2e67297951fdd158594740a754d49469cbd8c13c72002c290
|
7
|
+
data.tar.gz: 1b5cb2dfd5e7067d64ec0cc3449c2aeeead3a39cab42f8d51db33609a296478511fa9a24a965e32b10d7f01c98e5cb4b2ef8a6268fb055a7ad968068499eccd6
|
@@ -0,0 +1,47 @@
|
|
1
|
+
name: Integration Tests
|
2
|
+
|
3
|
+
on: [push]
|
4
|
+
|
5
|
+
jobs:
|
6
|
+
build:
|
7
|
+
runs-on: ubuntu-latest
|
8
|
+
strategy:
|
9
|
+
matrix:
|
10
|
+
test-branch: [rails5, rails6, rails7]
|
11
|
+
timeout-minutes: 20
|
12
|
+
steps:
|
13
|
+
- name: Checkout
|
14
|
+
uses: actions/checkout@v2
|
15
|
+
- name: Checkout test app
|
16
|
+
uses: actions/checkout@v2
|
17
|
+
with:
|
18
|
+
repository: jamesmartin/inline_svg_test_app
|
19
|
+
ref: ${{ matrix.test-branch }}
|
20
|
+
path: test_app
|
21
|
+
- name: Set up Ruby 2.7
|
22
|
+
uses: ruby/setup-ruby@v1
|
23
|
+
with:
|
24
|
+
ruby-version: 2.7.7
|
25
|
+
- name: Build local gem
|
26
|
+
run: |
|
27
|
+
gem install bundler
|
28
|
+
bundle install --jobs 4 --retry 3
|
29
|
+
bundle exec rake build
|
30
|
+
- name: Use the local gem in the test App
|
31
|
+
id: uselocalgem
|
32
|
+
uses: jacobtomlinson/gha-find-replace@0.1.1
|
33
|
+
with:
|
34
|
+
find: "gem 'inline_svg'"
|
35
|
+
replace: "gem 'inline_svg', path: '${{github.workspace}}'"
|
36
|
+
- name: Check local gem in use
|
37
|
+
run: |
|
38
|
+
test "${{ steps.uselocalgem.outputs.modifiedFiles }}" != "0"
|
39
|
+
grep "inline_svg" $GITHUB_WORKSPACE/test_app/Gemfile
|
40
|
+
- name: Bundle
|
41
|
+
run: |
|
42
|
+
cd $GITHUB_WORKSPACE/test_app
|
43
|
+
bundle install --jobs 4 --retry 3
|
44
|
+
- name: Test
|
45
|
+
run: |
|
46
|
+
cd $GITHUB_WORKSPACE/test_app
|
47
|
+
bundle exec rake test
|
@@ -0,0 +1,62 @@
|
|
1
|
+
name: Rails 6 Webpacker Integration Tests (unreliable)
|
2
|
+
|
3
|
+
on: [push]
|
4
|
+
|
5
|
+
jobs:
|
6
|
+
build:
|
7
|
+
|
8
|
+
runs-on: ubuntu-latest
|
9
|
+
strategy:
|
10
|
+
matrix:
|
11
|
+
test-branch: [rails6-webpacker]
|
12
|
+
steps:
|
13
|
+
- name: Checkout
|
14
|
+
uses: actions/checkout@v2
|
15
|
+
- name: Checkout test app
|
16
|
+
uses: actions/checkout@v2
|
17
|
+
with:
|
18
|
+
repository: jamesmartin/inline_svg_test_app
|
19
|
+
ref: ${{ matrix.test-branch }}
|
20
|
+
path: test_app
|
21
|
+
- name: Set up Ruby 3.1
|
22
|
+
uses: ruby/setup-ruby@v1
|
23
|
+
with:
|
24
|
+
ruby-version: 3.1
|
25
|
+
- name: Build local gem
|
26
|
+
run: |
|
27
|
+
gem install bundler
|
28
|
+
bundle install --jobs 4 --retry 3
|
29
|
+
bundle exec rake build
|
30
|
+
- name: Use the local gem in the test App
|
31
|
+
id: uselocalgem
|
32
|
+
uses: jacobtomlinson/gha-find-replace@0.1.1
|
33
|
+
with:
|
34
|
+
find: "gem 'inline_svg'"
|
35
|
+
replace: "gem 'inline_svg', path: '${{github.workspace}}'"
|
36
|
+
- name: Check local gem in use
|
37
|
+
run: |
|
38
|
+
test "${{ steps.uselocalgem.outputs.modifiedFiles }}" != "0"
|
39
|
+
grep "inline_svg" $GITHUB_WORKSPACE/test_app/Gemfile
|
40
|
+
- name: Bundle
|
41
|
+
run: |
|
42
|
+
cd $GITHUB_WORKSPACE/test_app
|
43
|
+
bundle install --jobs 4 --retry 3
|
44
|
+
- name: Set up Node.js 16.x
|
45
|
+
uses: actions/setup-node@v2
|
46
|
+
with:
|
47
|
+
node-version: 16
|
48
|
+
if: matrix.test-branch == 'rails6-webpacker'
|
49
|
+
- name: Set up Python 2.7
|
50
|
+
uses: actions/setup-python@v4
|
51
|
+
with:
|
52
|
+
python-version: '2.7'
|
53
|
+
- name: Generate Webpacker config
|
54
|
+
run: |
|
55
|
+
cd $GITHUB_WORKSPACE/test_app
|
56
|
+
CXXFLAGS="--std=c++17" yarn install --check-files
|
57
|
+
bundle exec rake webpacker:compile
|
58
|
+
if: matrix.test-branch == 'rails6-webpacker'
|
59
|
+
- name: Test
|
60
|
+
run: |
|
61
|
+
cd $GITHUB_WORKSPACE/test_app
|
62
|
+
bundle exec rake test
|
@@ -0,0 +1,20 @@
|
|
1
|
+
name: Ruby
|
2
|
+
|
3
|
+
on: [push]
|
4
|
+
|
5
|
+
jobs:
|
6
|
+
build:
|
7
|
+
|
8
|
+
runs-on: ubuntu-latest
|
9
|
+
|
10
|
+
steps:
|
11
|
+
- uses: actions/checkout@v2
|
12
|
+
- name: Set up Ruby 2.7
|
13
|
+
uses: ruby/setup-ruby@v1
|
14
|
+
with:
|
15
|
+
ruby-version: 2.7.7
|
16
|
+
- name: Build and test with Rake
|
17
|
+
run: |
|
18
|
+
gem install bundler
|
19
|
+
bundle install --jobs 4 --retry 3
|
20
|
+
bundle exec rake
|
data/.rubocop.yml
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
inherit_from: .rubocop_todo.yml
|
data/.rubocop_todo.yml
ADDED
@@ -0,0 +1,421 @@
|
|
1
|
+
# This configuration was generated by
|
2
|
+
# `rubocop --auto-gen-config`
|
3
|
+
# on 2017-10-10 17:17:56 -0400 using RuboCop version 0.50.0.
|
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: 17
|
10
|
+
# Cop supports --auto-correct.
|
11
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
12
|
+
# SupportedStyles: leading, trailing
|
13
|
+
Layout/DotPosition:
|
14
|
+
Exclude:
|
15
|
+
- 'spec/finds_asset_paths_spec.rb'
|
16
|
+
- 'spec/helpers/inline_svg_spec.rb'
|
17
|
+
- 'spec/id_generator_spec.rb'
|
18
|
+
- 'spec/transformation_pipeline/transformations/aria_attributes_spec.rb'
|
19
|
+
- 'spec/transformation_pipeline/transformations/data_attributes_spec.rb'
|
20
|
+
|
21
|
+
# Offense count: 2
|
22
|
+
# Cop supports --auto-correct.
|
23
|
+
Layout/EmptyLineAfterMagicComment:
|
24
|
+
Exclude:
|
25
|
+
- 'inline_svg.gemspec'
|
26
|
+
- 'spec/cached_asset_file_spec.rb'
|
27
|
+
|
28
|
+
# Offense count: 1
|
29
|
+
# Cop supports --auto-correct.
|
30
|
+
# Configuration parameters: AllowAdjacentOneLineDefs, NumberOfEmptyLines.
|
31
|
+
Layout/EmptyLineBetweenDefs:
|
32
|
+
Exclude:
|
33
|
+
- 'spec/inline_svg_spec.rb'
|
34
|
+
|
35
|
+
# Offense count: 1
|
36
|
+
# Cop supports --auto-correct.
|
37
|
+
Layout/EmptyLinesAroundAccessModifier:
|
38
|
+
Exclude:
|
39
|
+
- 'lib/inline_svg/cached_asset_file.rb'
|
40
|
+
|
41
|
+
# Offense count: 8
|
42
|
+
# Cop supports --auto-correct.
|
43
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
44
|
+
# SupportedStyles: empty_lines, no_empty_lines
|
45
|
+
Layout/EmptyLinesAroundBlockBody:
|
46
|
+
Exclude:
|
47
|
+
- 'spec/helpers/inline_svg_spec.rb'
|
48
|
+
- 'spec/inline_svg_spec.rb'
|
49
|
+
- 'spec/io_resource_spec.rb'
|
50
|
+
- 'spec/transformation_pipeline/transformations_spec.rb'
|
51
|
+
|
52
|
+
# Offense count: 1
|
53
|
+
# Cop supports --auto-correct.
|
54
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
55
|
+
# SupportedStyles: empty_lines, empty_lines_except_namespace, empty_lines_special, no_empty_lines
|
56
|
+
Layout/EmptyLinesAroundClassBody:
|
57
|
+
Exclude:
|
58
|
+
- 'lib/inline_svg.rb'
|
59
|
+
|
60
|
+
# Offense count: 4
|
61
|
+
# Cop supports --auto-correct.
|
62
|
+
# Configuration parameters: SupportedStyles, IndentationWidth.
|
63
|
+
# SupportedStyles: special_inside_parentheses, consistent, align_brackets
|
64
|
+
Layout/IndentArray:
|
65
|
+
EnforcedStyle: consistent
|
66
|
+
|
67
|
+
# Offense count: 11
|
68
|
+
# Cop supports --auto-correct.
|
69
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
70
|
+
# SupportedStyles: auto_detection, squiggly, active_support, powerpack, unindent
|
71
|
+
Layout/IndentHeredoc:
|
72
|
+
Exclude:
|
73
|
+
- 'spec/helpers/inline_svg_spec.rb'
|
74
|
+
|
75
|
+
# Offense count: 1
|
76
|
+
# Cop supports --auto-correct.
|
77
|
+
Layout/LeadingCommentSpace:
|
78
|
+
Exclude:
|
79
|
+
- 'Rakefile'
|
80
|
+
|
81
|
+
# Offense count: 4
|
82
|
+
# Cop supports --auto-correct.
|
83
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles, IndentationWidth.
|
84
|
+
# SupportedStyles: aligned, indented, indented_relative_to_receiver
|
85
|
+
Layout/MultilineMethodCallIndentation:
|
86
|
+
Exclude:
|
87
|
+
- 'spec/transformation_pipeline/transformations/data_attributes_spec.rb'
|
88
|
+
- 'spec/transformation_pipeline/transformations/style_attribute_spec.rb'
|
89
|
+
|
90
|
+
# Offense count: 2
|
91
|
+
# Cop supports --auto-correct.
|
92
|
+
# Configuration parameters: SupportedStyles.
|
93
|
+
# SupportedStyles: space, no_space
|
94
|
+
Layout/SpaceAroundEqualsInParameterDefault:
|
95
|
+
EnforcedStyle: no_space
|
96
|
+
|
97
|
+
# Offense count: 8
|
98
|
+
# Cop supports --auto-correct.
|
99
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles, EnforcedStyleForEmptyBraces, SupportedStylesForEmptyBraces, SpaceBeforeBlockParameters.
|
100
|
+
# SupportedStyles: space, no_space
|
101
|
+
# SupportedStylesForEmptyBraces: space, no_space
|
102
|
+
Layout/SpaceInsideBlockBraces:
|
103
|
+
Exclude:
|
104
|
+
- 'lib/inline_svg/transform_pipeline/transformations.rb'
|
105
|
+
|
106
|
+
# Offense count: 2
|
107
|
+
# Cop supports --auto-correct.
|
108
|
+
Layout/SpaceInsideBrackets:
|
109
|
+
Exclude:
|
110
|
+
- 'lib/inline_svg.rb'
|
111
|
+
|
112
|
+
# Offense count: 20
|
113
|
+
# Cop supports --auto-correct.
|
114
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles, EnforcedStyleForEmptyBraces, SupportedStylesForEmptyBraces.
|
115
|
+
# SupportedStyles: space, no_space, compact
|
116
|
+
# SupportedStylesForEmptyBraces: space, no_space
|
117
|
+
Layout/SpaceInsideHashLiteralBraces:
|
118
|
+
Exclude:
|
119
|
+
- 'spec/helpers/inline_svg_spec.rb'
|
120
|
+
- 'spec/inline_svg_spec.rb'
|
121
|
+
- 'spec/transformation_pipeline/transformations/data_attributes_spec.rb'
|
122
|
+
- 'spec/transformation_pipeline/transformations_spec.rb'
|
123
|
+
|
124
|
+
# Offense count: 4
|
125
|
+
# Cop supports --auto-correct.
|
126
|
+
Layout/SpaceInsideParens:
|
127
|
+
Exclude:
|
128
|
+
- 'lib/inline_svg/transform_pipeline/transformations.rb'
|
129
|
+
- 'spec/helpers/inline_svg_spec.rb'
|
130
|
+
|
131
|
+
# Offense count: 3
|
132
|
+
# Cop supports --auto-correct.
|
133
|
+
Layout/TrailingWhitespace:
|
134
|
+
Exclude:
|
135
|
+
- 'spec/io_resource_spec.rb'
|
136
|
+
|
137
|
+
# Offense count: 2
|
138
|
+
Lint/AmbiguousOperator:
|
139
|
+
Exclude:
|
140
|
+
- 'spec/io_resource_spec.rb'
|
141
|
+
|
142
|
+
# Offense count: 2
|
143
|
+
Lint/ShadowingOuterLocalVariable:
|
144
|
+
Exclude:
|
145
|
+
- 'lib/inline_svg/transform_pipeline/transformations/description.rb'
|
146
|
+
- 'lib/inline_svg/transform_pipeline/transformations/title.rb'
|
147
|
+
|
148
|
+
# Offense count: 1
|
149
|
+
# Cop supports --auto-correct.
|
150
|
+
Lint/UnneededSplatExpansion:
|
151
|
+
Exclude:
|
152
|
+
- 'lib/inline_svg.rb'
|
153
|
+
|
154
|
+
# Offense count: 2
|
155
|
+
# Cop supports --auto-correct.
|
156
|
+
# Configuration parameters: IgnoreEmptyBlocks, AllowUnusedKeywordArguments.
|
157
|
+
Lint/UnusedBlockArgument:
|
158
|
+
Exclude:
|
159
|
+
- 'lib/inline_svg/railtie.rb'
|
160
|
+
- 'lib/inline_svg/transform_pipeline/transformations.rb'
|
161
|
+
|
162
|
+
# Offense count: 3
|
163
|
+
# Cop supports --auto-correct.
|
164
|
+
# Configuration parameters: AllowUnusedKeywordArguments, IgnoreEmptyMethods.
|
165
|
+
Lint/UnusedMethodArgument:
|
166
|
+
Exclude:
|
167
|
+
- 'spec/inline_svg_spec.rb'
|
168
|
+
|
169
|
+
# Offense count: 2
|
170
|
+
Lint/UselessAssignment:
|
171
|
+
Exclude:
|
172
|
+
- 'spec/cached_asset_file_spec.rb'
|
173
|
+
- 'spec/transformation_pipeline/transformations/transformation_spec.rb'
|
174
|
+
|
175
|
+
# Offense count: 1
|
176
|
+
Metrics/AbcSize:
|
177
|
+
Max: 17
|
178
|
+
|
179
|
+
# Offense count: 20
|
180
|
+
# Configuration parameters: CountComments, ExcludedMethods.
|
181
|
+
Metrics/BlockLength:
|
182
|
+
Max: 169
|
183
|
+
|
184
|
+
# Offense count: 144
|
185
|
+
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
|
186
|
+
# URISchemes: http, https
|
187
|
+
Metrics/LineLength:
|
188
|
+
Max: 183
|
189
|
+
|
190
|
+
# Offense count: 3
|
191
|
+
# Configuration parameters: CountComments.
|
192
|
+
Metrics/MethodLength:
|
193
|
+
Max: 14
|
194
|
+
|
195
|
+
# Offense count: 6
|
196
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
197
|
+
# SupportedStyles: snake_case, normalcase, non_integer
|
198
|
+
Naming/VariableNumber:
|
199
|
+
Exclude:
|
200
|
+
- 'spec/cached_asset_file_spec.rb'
|
201
|
+
|
202
|
+
# Offense count: 1
|
203
|
+
# Cop supports --auto-correct.
|
204
|
+
Performance/StringReplacement:
|
205
|
+
Exclude:
|
206
|
+
- 'lib/inline_svg/transform_pipeline/transformations/data_attributes.rb'
|
207
|
+
|
208
|
+
# Offense count: 1
|
209
|
+
# Cop supports --auto-correct.
|
210
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
211
|
+
# SupportedStyles: always, conditionals
|
212
|
+
Style/AndOr:
|
213
|
+
Exclude:
|
214
|
+
- 'lib/inline_svg/cached_asset_file.rb'
|
215
|
+
|
216
|
+
# Offense count: 1
|
217
|
+
# Cop supports --auto-correct.
|
218
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles, ProceduralMethods, FunctionalMethods, IgnoredMethods.
|
219
|
+
# SupportedStyles: line_count_based, semantic, braces_for_chaining
|
220
|
+
# ProceduralMethods: benchmark, bm, bmbm, create, each_with_object, measure, new, realtime, tap, with_object
|
221
|
+
# FunctionalMethods: let, let!, subject, watch
|
222
|
+
# IgnoredMethods: lambda, proc, it
|
223
|
+
Style/BlockDelimiters:
|
224
|
+
Exclude:
|
225
|
+
- 'lib/inline_svg/transform_pipeline/transformations.rb'
|
226
|
+
|
227
|
+
# Offense count: 11
|
228
|
+
# Cop supports --auto-correct.
|
229
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
230
|
+
# SupportedStyles: braces, no_braces, context_dependent
|
231
|
+
Style/BracesAroundHashParameters:
|
232
|
+
Exclude:
|
233
|
+
- 'lib/inline_svg/transform_pipeline/transformations.rb'
|
234
|
+
- 'spec/helpers/inline_svg_spec.rb'
|
235
|
+
- 'spec/inline_svg_spec.rb'
|
236
|
+
- 'spec/transformation_pipeline/transformations/data_attributes_spec.rb'
|
237
|
+
- 'spec/transformation_pipeline/transformations_spec.rb'
|
238
|
+
|
239
|
+
# Offense count: 6
|
240
|
+
Style/CaseEquality:
|
241
|
+
Exclude:
|
242
|
+
- 'lib/inline_svg/action_view/helpers.rb'
|
243
|
+
- 'spec/io_resource_spec.rb'
|
244
|
+
|
245
|
+
# Offense count: 14
|
246
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
247
|
+
# SupportedStyles: nested, compact
|
248
|
+
Style/ClassAndModuleChildren:
|
249
|
+
Exclude:
|
250
|
+
- 'lib/inline_svg/transform_pipeline/transformations.rb'
|
251
|
+
- 'lib/inline_svg/transform_pipeline/transformations/aria_attributes.rb'
|
252
|
+
- 'lib/inline_svg/transform_pipeline/transformations/class_attribute.rb'
|
253
|
+
- 'lib/inline_svg/transform_pipeline/transformations/data_attributes.rb'
|
254
|
+
- 'lib/inline_svg/transform_pipeline/transformations/description.rb'
|
255
|
+
- 'lib/inline_svg/transform_pipeline/transformations/height.rb'
|
256
|
+
- 'lib/inline_svg/transform_pipeline/transformations/id_attribute.rb'
|
257
|
+
- 'lib/inline_svg/transform_pipeline/transformations/no_comment.rb'
|
258
|
+
- 'lib/inline_svg/transform_pipeline/transformations/preserve_aspect_ratio.rb'
|
259
|
+
- 'lib/inline_svg/transform_pipeline/transformations/size.rb'
|
260
|
+
- 'lib/inline_svg/transform_pipeline/transformations/style_attribute.rb'
|
261
|
+
- 'lib/inline_svg/transform_pipeline/transformations/title.rb'
|
262
|
+
- 'lib/inline_svg/transform_pipeline/transformations/transformation.rb'
|
263
|
+
- 'lib/inline_svg/transform_pipeline/transformations/width.rb'
|
264
|
+
|
265
|
+
# Offense count: 26
|
266
|
+
Style/Documentation:
|
267
|
+
Enabled: false
|
268
|
+
|
269
|
+
# Offense count: 1
|
270
|
+
# Cop supports --auto-correct.
|
271
|
+
Style/EachWithObject:
|
272
|
+
Exclude:
|
273
|
+
- 'lib/inline_svg/transform_pipeline/transformations.rb'
|
274
|
+
|
275
|
+
# Offense count: 1
|
276
|
+
# Cop supports --auto-correct.
|
277
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles, AutoCorrectEncodingComment.
|
278
|
+
# SupportedStyles: when_needed, always, never
|
279
|
+
Style/Encoding:
|
280
|
+
Exclude:
|
281
|
+
- 'inline_svg.gemspec'
|
282
|
+
|
283
|
+
# Offense count: 4
|
284
|
+
# Configuration parameters: MinBodyLength.
|
285
|
+
Style/GuardClause:
|
286
|
+
Exclude:
|
287
|
+
- 'lib/inline_svg.rb'
|
288
|
+
- 'lib/inline_svg/action_view/helpers.rb'
|
289
|
+
|
290
|
+
# Offense count: 1
|
291
|
+
# Cop supports --auto-correct.
|
292
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles, UseHashRocketsWithSymbolValues, PreferHashRocketsForNonAlnumEndingSymbols.
|
293
|
+
# SupportedStyles: ruby19, hash_rockets, no_mixed_keys, ruby19_no_mixed_keys
|
294
|
+
Style/HashSyntax:
|
295
|
+
Exclude:
|
296
|
+
- 'Rakefile'
|
297
|
+
|
298
|
+
# Offense count: 2
|
299
|
+
# Cop supports --auto-correct.
|
300
|
+
# Configuration parameters: MaxLineLength.
|
301
|
+
Style/IfUnlessModifier:
|
302
|
+
Exclude:
|
303
|
+
- 'lib/inline_svg/static_asset_finder.rb'
|
304
|
+
- 'lib/inline_svg/transform_pipeline/transformations/aria_attributes.rb'
|
305
|
+
|
306
|
+
# Offense count: 1
|
307
|
+
# Cop supports --auto-correct.
|
308
|
+
# Configuration parameters: InverseMethods, InverseBlocks.
|
309
|
+
Style/InverseMethods:
|
310
|
+
Exclude:
|
311
|
+
- 'lib/inline_svg/transform_pipeline/transformations.rb'
|
312
|
+
|
313
|
+
# Offense count: 2
|
314
|
+
# Cop supports --auto-correct.
|
315
|
+
Style/MutableConstant:
|
316
|
+
Exclude:
|
317
|
+
- 'lib/inline_svg/asset_file.rb'
|
318
|
+
- 'lib/inline_svg/version.rb'
|
319
|
+
|
320
|
+
# Offense count: 3
|
321
|
+
# Cop supports --auto-correct.
|
322
|
+
# Configuration parameters: Whitelist.
|
323
|
+
# Whitelist: be, be_a, be_an, be_between, be_falsey, be_kind_of, be_instance_of, be_truthy, be_within, eq, eql, end_with, include, match, raise_error, respond_to, start_with
|
324
|
+
Style/NestedParenthesizedCalls:
|
325
|
+
Exclude:
|
326
|
+
- 'spec/io_resource_spec.rb'
|
327
|
+
|
328
|
+
# Offense count: 1
|
329
|
+
# Cop supports --auto-correct.
|
330
|
+
# Configuration parameters: IncludeSemanticChanges.
|
331
|
+
Style/NonNilCheck:
|
332
|
+
Exclude:
|
333
|
+
- 'lib/inline_svg/transform_pipeline/transformations.rb'
|
334
|
+
|
335
|
+
# Offense count: 2
|
336
|
+
# Cop supports --auto-correct.
|
337
|
+
# Configuration parameters: PreferredDelimiters.
|
338
|
+
Style/PercentLiteralDelimiters:
|
339
|
+
Exclude:
|
340
|
+
- 'inline_svg.gemspec'
|
341
|
+
|
342
|
+
# Offense count: 6
|
343
|
+
# Cop supports --auto-correct.
|
344
|
+
# Configuration parameters: SupportedStyles.
|
345
|
+
# SupportedStyles: compact, exploded
|
346
|
+
Style/RaiseArgs:
|
347
|
+
EnforcedStyle: compact
|
348
|
+
|
349
|
+
# Offense count: 1
|
350
|
+
# Cop supports --auto-correct.
|
351
|
+
Style/RedundantBegin:
|
352
|
+
Exclude:
|
353
|
+
- 'lib/inline_svg.rb'
|
354
|
+
|
355
|
+
# Offense count: 8
|
356
|
+
# Cop supports --auto-correct.
|
357
|
+
Style/RedundantSelf:
|
358
|
+
Exclude:
|
359
|
+
- 'lib/inline_svg/transform_pipeline/transformations/data_attributes.rb'
|
360
|
+
- 'lib/inline_svg/transform_pipeline/transformations/height.rb'
|
361
|
+
- 'lib/inline_svg/transform_pipeline/transformations/id_attribute.rb'
|
362
|
+
- 'lib/inline_svg/transform_pipeline/transformations/preserve_aspect_ratio.rb'
|
363
|
+
- 'lib/inline_svg/transform_pipeline/transformations/size.rb'
|
364
|
+
- 'lib/inline_svg/transform_pipeline/transformations/transformation.rb'
|
365
|
+
- 'lib/inline_svg/transform_pipeline/transformations/width.rb'
|
366
|
+
|
367
|
+
# Offense count: 1
|
368
|
+
# Cop supports --auto-correct.
|
369
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles, AllowInnerSlashes.
|
370
|
+
# SupportedStyles: slashes, percent_r, mixed
|
371
|
+
Style/RegexpLiteral:
|
372
|
+
Exclude:
|
373
|
+
- 'spec/transformation_pipeline/transformations/transformation_spec.rb'
|
374
|
+
|
375
|
+
# Offense count: 1
|
376
|
+
# Cop supports --auto-correct.
|
377
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
378
|
+
# SupportedStyles: use_perl_names, use_english_names
|
379
|
+
Style/SpecialGlobalVars:
|
380
|
+
Exclude:
|
381
|
+
- 'inline_svg.gemspec'
|
382
|
+
|
383
|
+
# Offense count: 280
|
384
|
+
# Cop supports --auto-correct.
|
385
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles, ConsistentQuotesInMultiline.
|
386
|
+
# SupportedStyles: single_quotes, double_quotes
|
387
|
+
Style/StringLiterals:
|
388
|
+
Enabled: false
|
389
|
+
|
390
|
+
# Offense count: 3
|
391
|
+
# Cop supports --auto-correct.
|
392
|
+
# Configuration parameters: IgnoredMethods.
|
393
|
+
# IgnoredMethods: respond_to, define_method
|
394
|
+
Style/SymbolProc:
|
395
|
+
Exclude:
|
396
|
+
- 'lib/inline_svg/transform_pipeline/transformations/description.rb'
|
397
|
+
- 'lib/inline_svg/transform_pipeline/transformations/no_comment.rb'
|
398
|
+
- 'lib/inline_svg/transform_pipeline/transformations/title.rb'
|
399
|
+
|
400
|
+
# Offense count: 1
|
401
|
+
# Cop supports --auto-correct.
|
402
|
+
# Configuration parameters: EnforcedStyleForMultiline, SupportedStylesForMultiline.
|
403
|
+
# SupportedStylesForMultiline: comma, consistent_comma, no_comma
|
404
|
+
Style/TrailingCommaInArguments:
|
405
|
+
Exclude:
|
406
|
+
- 'spec/transformation_pipeline/transformations_spec.rb'
|
407
|
+
|
408
|
+
# Offense count: 3
|
409
|
+
# Cop supports --auto-correct.
|
410
|
+
# Configuration parameters: EnforcedStyleForMultiline, SupportedStylesForMultiline.
|
411
|
+
# SupportedStylesForMultiline: comma, consistent_comma, no_comma
|
412
|
+
Style/TrailingCommaInLiteral:
|
413
|
+
Exclude:
|
414
|
+
- 'lib/inline_svg/transform_pipeline/transformations.rb'
|
415
|
+
- 'spec/transformation_pipeline/transformations_spec.rb'
|
416
|
+
|
417
|
+
# Offense count: 2
|
418
|
+
# Cop supports --auto-correct.
|
419
|
+
Style/UnneededPercentQ:
|
420
|
+
Exclude:
|
421
|
+
- 'inline_svg.gemspec'
|